makecc 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,57 @@
1
+ (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();function Iu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sd={exports:{}},qa={};var p0;function F2(){if(p0)return qa;p0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(l,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:l,key:c,ref:o!==void 0?o:null,props:u}}return qa.Fragment=n,qa.jsx=i,qa.jsxs=i,qa}var m0;function G2(){return m0||(m0=1,Sd.exports=F2()),Sd.exports}var S=G2(),Ed={exports:{}},Ce={};var g0;function Z2(){if(g0)return Ce;g0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),x=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=x&&O[x]||O["@@iterator"],typeof O=="function"?O:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function k(O,V,T){this.props=O,this.context=V,this.refs=C,this.updater=T||w}k.prototype.isReactComponent={},k.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,V,"setState")},k.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function j(){}j.prototype=k.prototype;function E(O,V,T){this.props=O,this.context=V,this.refs=C,this.updater=T||w}var D=E.prototype=new j;D.constructor=E,_(D,k.prototype),D.isPureReactComponent=!0;var U=Array.isArray;function z(){}var L={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function Q(O,V,T){var ne=T.ref;return{$$typeof:e,type:O,key:V,ref:ne!==void 0?ne:null,props:T}}function I(O,V){return Q(O.type,V,O.props)}function Y(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function X(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(T){return V[T]})}var te=/\/+/g;function R(O,V){return typeof O=="object"&&O!==null&&O.key!=null?X(""+O.key):V.toString(36)}function B(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(z,z):(O.status="pending",O.then(function(V){O.status==="pending"&&(O.status="fulfilled",O.value=V)},function(V){O.status==="pending"&&(O.status="rejected",O.reason=V)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function M(O,V,T,ne,ue){var ce=typeof O;(ce==="undefined"||ce==="boolean")&&(O=null);var de=!1;if(O===null)de=!0;else switch(ce){case"bigint":case"string":case"number":de=!0;break;case"object":switch(O.$$typeof){case e:case n:de=!0;break;case y:return de=O._init,M(de(O._payload),V,T,ne,ue)}}if(de)return ue=ue(O),de=ne===""?"."+R(O,0):ne,U(ue)?(T="",de!=null&&(T=de.replace(te,"$&/")+"/"),M(ue,V,T,"",function(Ee){return Ee})):ue!=null&&(Y(ue)&&(ue=I(ue,T+(ue.key==null||O&&O.key===ue.key?"":(""+ue.key).replace(te,"$&/")+"/")+de)),V.push(ue)),1;de=0;var se=ne===""?".":ne+":";if(U(O))for(var pe=0;pe<O.length;pe++)ne=O[pe],ce=se+R(ne,pe),de+=M(ne,V,T,ce,ue);else if(pe=b(O),typeof pe=="function")for(O=pe.call(O),pe=0;!(ne=O.next()).done;)ne=ne.value,ce=se+R(ne,pe++),de+=M(ne,V,T,ce,ue);else if(ce==="object"){if(typeof O.then=="function")return M(B(O),V,T,ne,ue);throw V=String(O),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return de}function H(O,V,T){if(O==null)return O;var ne=[],ue=0;return M(O,ne,"","",function(ce){return V.call(T,ce,ue++)}),ne}function $(O){if(O._status===-1){var V=O._result;V=V(),V.then(function(T){(O._status===0||O._status===-1)&&(O._status=1,O._result=T)},function(T){(O._status===0||O._status===-1)&&(O._status=2,O._result=T)}),O._status===-1&&(O._status=0,O._result=V)}if(O._status===1)return O._result.default;throw O._result}var P=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},A={map:H,forEach:function(O,V,T){H(O,function(){V.apply(this,arguments)},T)},count:function(O){var V=0;return H(O,function(){V++}),V},toArray:function(O){return H(O,function(V){return V})||[]},only:function(O){if(!Y(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ce.Activity=m,Ce.Children=A,Ce.Component=k,Ce.Fragment=i,Ce.Profiler=o,Ce.PureComponent=E,Ce.StrictMode=l,Ce.Suspense=p,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(O){return L.H.useMemoCache(O)}},Ce.cache=function(O){return function(){return O.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(O,V,T){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ne=_({},O.props),ue=O.key;if(V!=null)for(ce in V.key!==void 0&&(ue=""+V.key),V)!G.call(V,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&V.ref===void 0||(ne[ce]=V[ce]);var ce=arguments.length-2;if(ce===1)ne.children=T;else if(1<ce){for(var de=Array(ce),se=0;se<ce;se++)de[se]=arguments[se+2];ne.children=de}return Q(O.type,ue,ne)},Ce.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:u,_context:O},O},Ce.createElement=function(O,V,T){var ne,ue={},ce=null;if(V!=null)for(ne in V.key!==void 0&&(ce=""+V.key),V)G.call(V,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ue[ne]=V[ne]);var de=arguments.length-2;if(de===1)ue.children=T;else if(1<de){for(var se=Array(de),pe=0;pe<de;pe++)se[pe]=arguments[pe+2];ue.children=se}if(O&&O.defaultProps)for(ne in de=O.defaultProps,de)ue[ne]===void 0&&(ue[ne]=de[ne]);return Q(O,ce,ue)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(O){return{$$typeof:f,render:O}},Ce.isValidElement=Y,Ce.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:$}},Ce.memo=function(O,V){return{$$typeof:d,type:O,compare:V===void 0?null:V}},Ce.startTransition=function(O){var V=L.T,T={};L.T=T;try{var ne=O(),ue=L.S;ue!==null&&ue(T,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(z,P)}catch(ce){P(ce)}finally{V!==null&&T.types!==null&&(V.types=T.types),L.T=V}},Ce.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Ce.use=function(O){return L.H.use(O)},Ce.useActionState=function(O,V,T){return L.H.useActionState(O,V,T)},Ce.useCallback=function(O,V){return L.H.useCallback(O,V)},Ce.useContext=function(O){return L.H.useContext(O)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(O,V){return L.H.useDeferredValue(O,V)},Ce.useEffect=function(O,V){return L.H.useEffect(O,V)},Ce.useEffectEvent=function(O){return L.H.useEffectEvent(O)},Ce.useId=function(){return L.H.useId()},Ce.useImperativeHandle=function(O,V,T){return L.H.useImperativeHandle(O,V,T)},Ce.useInsertionEffect=function(O,V){return L.H.useInsertionEffect(O,V)},Ce.useLayoutEffect=function(O,V){return L.H.useLayoutEffect(O,V)},Ce.useMemo=function(O,V){return L.H.useMemo(O,V)},Ce.useOptimistic=function(O,V){return L.H.useOptimistic(O,V)},Ce.useReducer=function(O,V,T){return L.H.useReducer(O,V,T)},Ce.useRef=function(O){return L.H.useRef(O)},Ce.useState=function(O){return L.H.useState(O)},Ce.useSyncExternalStore=function(O,V,T){return L.H.useSyncExternalStore(O,V,T)},Ce.useTransition=function(){return L.H.useTransition()},Ce.version="19.2.3",Ce}var y0;function bo(){return y0||(y0=1,Ed.exports=Z2()),Ed.exports}var W=bo();const Pa=Iu(W);var kd={exports:{}},Ia={},_d={exports:{}},Cd={};var x0;function Q2(){return x0||(x0=1,(function(e){function n(M,H){var $=M.length;M.push(H);e:for(;0<$;){var P=$-1>>>1,A=M[P];if(0<o(A,H))M[P]=H,M[$]=A,$=P;else break e}}function i(M){return M.length===0?null:M[0]}function l(M){if(M.length===0)return null;var H=M[0],$=M.pop();if($!==H){M[0]=$;e:for(var P=0,A=M.length,O=A>>>1;P<O;){var V=2*(P+1)-1,T=M[V],ne=V+1,ue=M[ne];if(0>o(T,$))ne<A&&0>o(ue,T)?(M[P]=ue,M[ne]=$,P=ne):(M[P]=T,M[V]=$,P=V);else if(ne<A&&0>o(ue,$))M[P]=ue,M[ne]=$,P=ne;else break e}}return H}function o(M,H){var $=M.sortIndex-H.sortIndex;return $!==0?$:M.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],d=[],y=1,m=null,x=3,b=!1,w=!1,_=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function D(M){for(var H=i(d);H!==null;){if(H.callback===null)l(d);else if(H.startTime<=M)l(d),H.sortIndex=H.expirationTime,n(p,H);else break;H=i(d)}}function U(M){if(_=!1,D(M),!w)if(i(p)!==null)w=!0,z||(z=!0,X());else{var H=i(d);H!==null&&B(U,H.startTime-M)}}var z=!1,L=-1,G=5,Q=-1;function I(){return C?!0:!(e.unstable_now()-Q<G)}function Y(){if(C=!1,z){var M=e.unstable_now();Q=M;var H=!0;try{e:{w=!1,_&&(_=!1,j(L),L=-1),b=!0;var $=x;try{t:{for(D(M),m=i(p);m!==null&&!(m.expirationTime>M&&I());){var P=m.callback;if(typeof P=="function"){m.callback=null,x=m.priorityLevel;var A=P(m.expirationTime<=M);if(M=e.unstable_now(),typeof A=="function"){m.callback=A,D(M),H=!0;break t}m===i(p)&&l(p),D(M)}else l(p);m=i(p)}if(m!==null)H=!0;else{var O=i(d);O!==null&&B(U,O.startTime-M),H=!1}}break e}finally{m=null,x=$,b=!1}H=void 0}}finally{H?X():z=!1}}}var X;if(typeof E=="function")X=function(){E(Y)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,R=te.port2;te.port1.onmessage=Y,X=function(){R.postMessage(null)}}else X=function(){k(Y,0)};function B(M,H){L=k(function(){M(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(M){switch(x){case 1:case 2:case 3:var H=3;break;default:H=x}var $=x;x=H;try{return M()}finally{x=$}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(M,H){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var $=x;x=M;try{return H()}finally{x=$}},e.unstable_scheduleCallback=function(M,H,$){var P=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?P+$:P):$=P,M){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=$+A,M={id:y++,callback:H,priorityLevel:M,startTime:$,expirationTime:A,sortIndex:-1},$>P?(M.sortIndex=$,n(d,M),i(p)===null&&M===i(d)&&(_?(j(L),L=-1):_=!0,B(U,$-P))):(M.sortIndex=A,n(p,M),w||b||(w=!0,z||(z=!0,X()))),M},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(M){var H=x;return function(){var $=x;x=H;try{return M.apply(this,arguments)}finally{x=$}}}})(Cd)),Cd}var b0;function P2(){return b0||(b0=1,_d.exports=Q2()),_d.exports}var Nd={exports:{}},Rt={};var v0;function K2(){if(v0)return Rt;v0=1;var e=bo();function n(p){var d="https://react.dev/errors/"+p;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)d+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var l={d:{f:i,r:function(){throw Error(n(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 u(p,d,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:p,containerInfo:d,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,d){if(p==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Rt.createPortal=function(p,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(n(299));return u(p,d,null,y)},Rt.flushSync=function(p){var d=c.T,y=l.p;try{if(c.T=null,l.p=2,p)return p()}finally{c.T=d,l.p=y,l.d.f()}},Rt.preconnect=function(p,d){typeof p=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,l.d.C(p,d))},Rt.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},Rt.preinit=function(p,d){if(typeof p=="string"&&d&&typeof d.as=="string"){var y=d.as,m=f(y,d.crossOrigin),x=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;y==="style"?l.d.S(p,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:x,fetchPriority:b}):y==="script"&&l.d.X(p,{crossOrigin:m,integrity:x,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Rt.preinitModule=function(p,d){if(typeof p=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var y=f(d.as,d.crossOrigin);l.d.M(p,{crossOrigin:y,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&l.d.M(p)},Rt.preload=function(p,d){if(typeof p=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var y=d.as,m=f(y,d.crossOrigin);l.d.L(p,y,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Rt.preloadModule=function(p,d){if(typeof p=="string")if(d){var y=f(d.as,d.crossOrigin);l.d.m(p,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:y,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else l.d.m(p)},Rt.requestFormReset=function(p){l.d.r(p)},Rt.unstable_batchedUpdates=function(p,d){return p(d)},Rt.useFormState=function(p,d,y){return c.H.useFormState(p,d,y)},Rt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Rt.version="19.2.3",Rt}var w0;function T1(){if(w0)return Nd.exports;w0=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(n){console.error(n)}}return e(),Nd.exports=K2(),Nd.exports}var S0;function J2(){if(S0)return Ia;S0=1;var e=P2(),n=bo(),i=T1();function l(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(l(188))}function d(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(l(188));return r!==t?null:t}for(var a=t,s=r;;){var h=a.return;if(h===null)break;var g=h.alternate;if(g===null){if(s=h.return,s!==null){a=s;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===a)return p(h),t;if(g===s)return p(h),r;g=g.sibling}throw Error(l(188))}if(a.return!==s.return)a=h,s=g;else{for(var v=!1,N=h.child;N;){if(N===a){v=!0,a=h,s=g;break}if(N===s){v=!0,s=h,a=g;break}N=N.sibling}if(!v){for(N=g.child;N;){if(N===a){v=!0,a=g,s=h;break}if(N===s){v=!0,s=g,a=h;break}N=N.sibling}if(!v)throw Error(l(189))}}if(a.alternate!==s)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var m=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),E=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function X(t){return t===null||typeof t!="object"?null:(t=Y&&t[Y]||t["@@iterator"],typeof t=="function"?t:null)}var te=Symbol.for("react.client.reference");function R(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===te?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case _:return"Fragment";case k:return"Profiler";case C:return"StrictMode";case U:return"Suspense";case z:return"SuspenseList";case Q:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case E:return t.displayName||"Context";case j:return(t._context.displayName||"Context")+".Consumer";case D:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case L:return r=t.displayName||null,r!==null?r:R(t.type)||"Memo";case G:r=t._payload,t=t._init;try{return R(t(r))}catch{}}return null}var B=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},P=[],A=-1;function O(t){return{current:t}}function V(t){0>A||(t.current=P[A],P[A]=null,A--)}function T(t,r){A++,P[A]=t.current,t.current=r}var ne=O(null),ue=O(null),ce=O(null),de=O(null);function se(t,r){switch(T(ce,r),T(ue,t),T(ne,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?By(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=By(r),t=Hy(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}V(ne),T(ne,t)}function pe(){V(ne),V(ue),V(ce)}function Ee(t){t.memoizedState!==null&&T(de,t);var r=ne.current,a=Hy(r,t.type);r!==a&&(T(ue,t),T(ne,a))}function _e(t){ue.current===t&&(V(ne),V(ue)),de.current===t&&(V(de),La._currentValue=$)}var be,ke;function ze(t){if(be===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);be=r&&r[1]||"",ke=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+be+t+ke}var $e=!1;function Ve(t,r){if(!t||$e)return"";$e=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(r){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ie){var ee=ie}Reflect.construct(t,[],oe)}else{try{oe.call()}catch(ie){ee=ie}t.call(oe.prototype)}}else{try{throw Error()}catch(ie){ee=ie}(oe=t())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ie){if(ie&&ee&&typeof ie.stack=="string")return[ie.stack,ee.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),v=g[0],N=g[1];if(v&&N){var q=v.split(`
4
+ `),J=N.split(`
5
+ `);for(h=s=0;s<q.length&&!q[s].includes("DetermineComponentFrameRoot");)s++;for(;h<J.length&&!J[h].includes("DetermineComponentFrameRoot");)h++;if(s===q.length||h===J.length)for(s=q.length-1,h=J.length-1;1<=s&&0<=h&&q[s]!==J[h];)h--;for(;1<=s&&0<=h;s--,h--)if(q[s]!==J[h]){if(s!==1||h!==1)do if(s--,h--,0>h||q[s]!==J[h]){var le=`
6
+ `+q[s].replace(" at new "," at ");return t.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",t.displayName)),le}while(1<=s&&0<=h);break}}}finally{$e=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?ze(a):""}function ct(t,r){switch(t.tag){case 26:case 27:case 5:return ze(t.type);case 16:return ze("Lazy");case 13:return t.child!==r&&r!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return Ve(t.type,!1);case 11:return Ve(t.type.render,!1);case 1:return Ve(t.type,!0);case 31:return ze("Activity");default:return""}}function Jt(t){try{var r="",a=null;do r+=ct(t,a),a=t,t=t.return;while(t);return r}catch(s){return`
7
+ Error generating stack: `+s.message+`
8
+ `+s.stack}}var zt=Object.prototype.hasOwnProperty,qt=e.unstable_scheduleCallback,En=e.unstable_cancelCallback,Pn=e.unstable_shouldYield,Kn=e.unstable_requestPaint,St=e.unstable_now,_i=e.unstable_getCurrentPriorityLevel,re=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Me=e.unstable_LowPriority,Ue=e.unstable_IdlePriority,Bt=e.log,kn=e.unstable_setDisableYieldValue,Ct=null,ft=null;function Dt(t){if(typeof Bt=="function"&&kn(t),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(Ct,t)}catch{}}var Ze=Math.clz32?Math.clz32:uc,Ln=Math.log,Wt=Math.LN2;function uc(t){return t>>>=0,t===0?32:31-(Ln(t)/Wt|0)|0}var Ur=256,qr=262144,Ir=4194304;function Jn(t){var r=t&42;if(r!==0)return r;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Vr(t,r,a){var s=t.pendingLanes;if(s===0)return 0;var h=0,g=t.suspendedLanes,v=t.pingedLanes;t=t.warmLanes;var N=s&134217727;return N!==0?(s=N&~g,s!==0?h=Jn(s):(v&=N,v!==0?h=Jn(v):a||(a=N&~t,a!==0&&(h=Jn(a))))):(N=s&~g,N!==0?h=Jn(N):v!==0?h=Jn(v):a||(a=s&~t,a!==0&&(h=Jn(a)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,a=r&-r,g>=a||g===32&&(a&4194048)!==0)?r:h}function or(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function cc(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 zo(){var t=Ir;return Ir<<=1,(Ir&62914560)===0&&(Ir=4194304),t}function Gl(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function sr(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function fc(t,r,a,s,h,g){var v=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var N=t.entanglements,q=t.expirationTimes,J=t.hiddenUpdates;for(a=v&~a;0<a;){var le=31-Ze(a),oe=1<<le;N[le]=0,q[le]=-1;var ee=J[le];if(ee!==null)for(J[le]=null,le=0;le<ee.length;le++){var ie=ee[le];ie!==null&&(ie.lane&=-536870913)}a&=~oe}s!==0&&Do(t,s,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(v&~r))}function Do(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var s=31-Ze(r);t.entangledLanes|=r,t.entanglements[s]=t.entanglements[s]|1073741824|a&261930}function Oo(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var s=31-Ze(a),h=1<<s;h&r|t[s]&r&&(t[s]|=r),a&=~h}}function Ro(t,r){var a=r&-r;return a=(a&42)!==0?1:Zl(a),(a&(t.suspendedLanes|r))!==0?0:a}function Zl(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ql(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function jo(){var t=H.p;return t!==0?t:(t=window.event,t===void 0?32:o0(t.type))}function Lo(t,r){var a=H.p;try{return H.p=t,r()}finally{H.p=a}}var Bn=Math.random().toString(36).slice(2),Et="__reactFiber$"+Bn,Ot="__reactProps$"+Bn,Wn="__reactContainer$"+Bn,Yr="__reactEvents$"+Bn,Bo="__reactListeners$"+Bn,dc="__reactHandles$"+Bn,Ho="__reactResources$"+Bn,ur="__reactMarker$"+Bn;function Pl(t){delete t[Et],delete t[Ot],delete t[Yr],delete t[Bo],delete t[dc]}function Ci(t){var r=t[Et];if(r)return r;for(var a=t.parentNode;a;){if(r=a[Wn]||a[Et]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=$y(t);t!==null;){if(a=t[Et])return a;t=$y(t)}return r}t=a,a=t.parentNode}return null}function Ni(t){if(t=t[Et]||t[Wn]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function Ti(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(l(33))}function Ai(t){var r=t[Ho];return r||(r=t[Ho]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function pt(t){t[ur]=!0}var Uo=new Set,qo={};function ei(t,r){Mi(t,r),Mi(t+"Capture",r)}function Mi(t,r){for(qo[t]=r,t=0;t<r.length;t++)Uo.add(r[t])}var hc=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]*$"),Kl={},Io={};function pc(t){return zt.call(Io,t)?!0:zt.call(Kl,t)?!1:hc.test(t)?Io[t]=!0:(Kl[t]=!0,!1)}function Xr(t,r,a){if(pc(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var s=r.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function $r(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function _n(t,r,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+s)}}function It(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Vo(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function mc(t,r,a){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var h=s.get,g=s.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(v){a=""+v,g.call(this,v)}}),Object.defineProperty(t,r,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Fr(t){if(!t._valueTracker){var r=Vo(t)?"checked":"value";t._valueTracker=mc(t,r,""+t[r])}}function Yo(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),s="";return t&&(s=Vo(t)?t.checked?"true":"false":t.value),t=s,t!==a?(r.setValue(t),!0):!1}function cr(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var gc=/[\n"\\]/g;function Vt(t){return t.replace(gc,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function fr(t,r,a,s,h,g,v,N){t.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.type=v:t.removeAttribute("type"),r!=null?v==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+It(r)):t.value!==""+It(r)&&(t.value=""+It(r)):v!=="submit"&&v!=="reset"||t.removeAttribute("value"),r!=null?Jl(t,v,It(r)):a!=null?Jl(t,v,It(a)):s!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?t.name=""+It(N):t.removeAttribute("name")}function Xo(t,r,a,s,h,g,v,N){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||r!=null)){Fr(t);return}a=a!=null?""+It(a):"",r=r!=null?""+It(r):a,N||r===t.value||(t.value=r),t.defaultValue=r}s=s??h,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=N?t.checked:!!s,t.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.name=v),Fr(t)}function Jl(t,r,a){r==="number"&&cr(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function ti(t,r,a,s){if(t=t.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=r.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&s&&(t[a].defaultSelected=!0)}else{for(a=""+It(a),r=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,s&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Dp(t,r,a){if(r!=null&&(r=""+It(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+It(a):""}function Op(t,r,a,s){if(r==null){if(s!=null){if(a!=null)throw Error(l(92));if(B(s)){if(1<s.length)throw Error(l(93));s=s[0]}a=s}a==null&&(a=""),r=a}a=It(r),t.defaultValue=a,s=t.textContent,s===a&&s!==""&&s!==null&&(t.value=s),Fr(t)}function Gr(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var Iw=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 Rp(t,r,a){var s=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":s?t.setProperty(r,a):typeof a!="number"||a===0||Iw.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function jp(t,r,a){if(r!=null&&typeof r!="object")throw Error(l(62));if(t=t.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||r!=null&&r.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var h in r)s=r[h],r.hasOwnProperty(h)&&a[h]!==s&&Rp(t,h,s)}else for(var g in r)r.hasOwnProperty(g)&&Rp(t,g,r[g])}function yc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Vw=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"]]),Yw=/^[\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 $o(t){return Yw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ni(){}var xc=null;function bc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Zr=null,Qr=null;function Lp(t){var r=Ni(t);if(r&&(t=r.stateNode)){var a=t[Ot]||null;e:switch(t=r.stateNode,r.type){case"input":if(fr(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var s=a[r];if(s!==t&&s.form===t.form){var h=s[Ot]||null;if(!h)throw Error(l(90));fr(s,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<a.length;r++)s=a[r],s.form===t.form&&Yo(s)}break e;case"textarea":Dp(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&ti(t,!!a.multiple,r,!1)}}}var vc=!1;function Bp(t,r,a){if(vc)return t(r,a);vc=!0;try{var s=t(r);return s}finally{if(vc=!1,(Zr!==null||Qr!==null)&&(Ds(),Zr&&(r=Zr,t=Qr,Qr=Zr=null,Lp(r),t)))for(r=0;r<t.length;r++)Lp(t[r])}}function Wl(t,r){var a=t.stateNode;if(a===null)return null;var s=a[Ot]||null;if(s===null)return null;a=s[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,r,typeof a));return a}var ii=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wc=!1;if(ii)try{var ea={};Object.defineProperty(ea,"passive",{get:function(){wc=!0}}),window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch{wc=!1}var zi=null,Sc=null,Fo=null;function Hp(){if(Fo)return Fo;var t,r=Sc,a=r.length,s,h="value"in zi?zi.value:zi.textContent,g=h.length;for(t=0;t<a&&r[t]===h[t];t++);var v=a-t;for(s=1;s<=v&&r[a-s]===h[g-s];s++);return Fo=h.slice(t,1<s?1-s:void 0)}function Go(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Zo(){return!0}function Up(){return!1}function Yt(t){function r(a,s,h,g,v){this._reactName=a,this._targetInst=h,this.type=s,this.nativeEvent=g,this.target=v,this.currentTarget=null;for(var N in t)t.hasOwnProperty(N)&&(a=t[N],this[N]=a?a(g):g[N]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Zo:Up,this.isPropagationStopped=Up,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Zo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Zo)},persist:function(){},isPersistent:Zo}),r}var dr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qo=Yt(dr),ta=m({},dr,{view:0,detail:0}),Xw=Yt(ta),Ec,kc,na,Po=m({},ta,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==na&&(na&&t.type==="mousemove"?(Ec=t.screenX-na.screenX,kc=t.screenY-na.screenY):kc=Ec=0,na=t),Ec)},movementY:function(t){return"movementY"in t?t.movementY:kc}}),qp=Yt(Po),$w=m({},Po,{dataTransfer:0}),Fw=Yt($w),Gw=m({},ta,{relatedTarget:0}),_c=Yt(Gw),Zw=m({},dr,{animationName:0,elapsedTime:0,pseudoElement:0}),Qw=Yt(Zw),Pw=m({},dr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Kw=Yt(Pw),Jw=m({},dr,{data:0}),Ip=Yt(Jw),Ww={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eS={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"},tS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=tS[t])?!!r[t]:!1}function Cc(){return nS}var iS=m({},ta,{key:function(t){if(t.key){var r=Ww[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Go(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?eS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cc,charCode:function(t){return t.type==="keypress"?Go(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Go(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),rS=Yt(iS),lS=m({},Po,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vp=Yt(lS),aS=m({},ta,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cc}),oS=Yt(aS),sS=m({},dr,{propertyName:0,elapsedTime:0,pseudoElement:0}),uS=Yt(sS),cS=m({},Po,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),fS=Yt(cS),dS=m({},dr,{newState:0,oldState:0}),hS=Yt(dS),pS=[9,13,27,32],Nc=ii&&"CompositionEvent"in window,ia=null;ii&&"documentMode"in document&&(ia=document.documentMode);var mS=ii&&"TextEvent"in window&&!ia,Yp=ii&&(!Nc||ia&&8<ia&&11>=ia),Xp=" ",$p=!1;function Fp(t,r){switch(t){case"keyup":return pS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Pr=!1;function gS(t,r){switch(t){case"compositionend":return Gp(r);case"keypress":return r.which!==32?null:($p=!0,Xp);case"textInput":return t=r.data,t===Xp&&$p?null:t;default:return null}}function yS(t,r){if(Pr)return t==="compositionend"||!Nc&&Fp(t,r)?(t=Hp(),Fo=Sc=zi=null,Pr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Yp&&r.locale!=="ko"?null:r.data;default:return null}}var xS={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 Zp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!xS[t.type]:r==="textarea"}function Qp(t,r,a,s){Zr?Qr?Qr.push(s):Qr=[s]:Zr=s,r=Us(r,"onChange"),0<r.length&&(a=new Qo("onChange","change",null,a,s),t.push({event:a,listeners:r}))}var ra=null,la=null;function bS(t){zy(t,0)}function Ko(t){var r=Ti(t);if(Yo(r))return t}function Pp(t,r){if(t==="change")return r}var Kp=!1;if(ii){var Tc;if(ii){var Ac="oninput"in document;if(!Ac){var Jp=document.createElement("div");Jp.setAttribute("oninput","return;"),Ac=typeof Jp.oninput=="function"}Tc=Ac}else Tc=!1;Kp=Tc&&(!document.documentMode||9<document.documentMode)}function Wp(){ra&&(ra.detachEvent("onpropertychange",em),la=ra=null)}function em(t){if(t.propertyName==="value"&&Ko(la)){var r=[];Qp(r,la,t,bc(t)),Bp(bS,r)}}function vS(t,r,a){t==="focusin"?(Wp(),ra=r,la=a,ra.attachEvent("onpropertychange",em)):t==="focusout"&&Wp()}function wS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ko(la)}function SS(t,r){if(t==="click")return Ko(r)}function ES(t,r){if(t==="input"||t==="change")return Ko(r)}function kS(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var en=typeof Object.is=="function"?Object.is:kS;function aa(t,r){if(en(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),s=Object.keys(r);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var h=a[s];if(!zt.call(r,h)||!en(t[h],r[h]))return!1}return!0}function tm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function nm(t,r){var a=tm(t);t=0;for(var s;a;){if(a.nodeType===3){if(s=t+a.textContent.length,t<=r&&s>=r)return{node:a,offset:r-t};t=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=tm(a)}}function im(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?im(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function rm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=cr(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=cr(t.document)}return r}function Mc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var _S=ii&&"documentMode"in document&&11>=document.documentMode,Kr=null,zc=null,oa=null,Dc=!1;function lm(t,r,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Dc||Kr==null||Kr!==cr(s)||(s=Kr,"selectionStart"in s&&Mc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),oa&&aa(oa,s)||(oa=s,s=Us(zc,"onSelect"),0<s.length&&(r=new Qo("onSelect","select",null,r,a),t.push({event:r,listeners:s}),r.target=Kr)))}function hr(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var Jr={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionrun:hr("Transition","TransitionRun"),transitionstart:hr("Transition","TransitionStart"),transitioncancel:hr("Transition","TransitionCancel"),transitionend:hr("Transition","TransitionEnd")},Oc={},am={};ii&&(am=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);function pr(t){if(Oc[t])return Oc[t];if(!Jr[t])return t;var r=Jr[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in am)return Oc[t]=r[a];return t}var om=pr("animationend"),sm=pr("animationiteration"),um=pr("animationstart"),CS=pr("transitionrun"),NS=pr("transitionstart"),TS=pr("transitioncancel"),cm=pr("transitionend"),fm=new Map,Rc="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(" ");Rc.push("scrollEnd");function Cn(t,r){fm.set(t,r),ei(r,[t])}var Jo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},hn=[],Wr=0,jc=0;function Wo(){for(var t=Wr,r=jc=Wr=0;r<t;){var a=hn[r];hn[r++]=null;var s=hn[r];hn[r++]=null;var h=hn[r];hn[r++]=null;var g=hn[r];if(hn[r++]=null,s!==null&&h!==null){var v=s.pending;v===null?h.next=h:(h.next=v.next,v.next=h),s.pending=h}g!==0&&dm(a,h,g)}}function es(t,r,a,s){hn[Wr++]=t,hn[Wr++]=r,hn[Wr++]=a,hn[Wr++]=s,jc|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Lc(t,r,a,s){return es(t,r,a,s),ts(t)}function mr(t,r){return es(t,null,null,r),ts(t)}function dm(t,r,a){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a);for(var h=!1,g=t.return;g!==null;)g.childLanes|=a,s=g.alternate,s!==null&&(s.childLanes|=a),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&r!==null&&(h=31-Ze(a),t=g.hiddenUpdates,s=t[h],s===null?t[h]=[r]:s.push(r),r.lane=a|536870912),g):null}function ts(t){if(50<Aa)throw Aa=0,Ff=null,Error(l(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var el={};function AS(t,r,a,s){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(t,r,a,s){return new AS(t,r,a,s)}function Bc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ri(t,r){var a=t.alternate;return a===null?(a=tn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function hm(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function ns(t,r,a,s,h,g){var v=0;if(s=t,typeof t=="function")Bc(t)&&(v=1);else if(typeof t=="string")v=R2(t,a,ne.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Q:return t=tn(31,a,r,h),t.elementType=Q,t.lanes=g,t;case _:return gr(a.children,h,g,r);case C:v=8,h|=24;break;case k:return t=tn(12,a,r,h|2),t.elementType=k,t.lanes=g,t;case U:return t=tn(13,a,r,h),t.elementType=U,t.lanes=g,t;case z:return t=tn(19,a,r,h),t.elementType=z,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case E:v=10;break e;case j:v=9;break e;case D:v=11;break e;case L:v=14;break e;case G:v=16,s=null;break e}v=29,a=Error(l(130,t===null?"null":typeof t,"")),s=null}return r=tn(v,a,r,h),r.elementType=t,r.type=s,r.lanes=g,r}function gr(t,r,a,s){return t=tn(7,t,s,r),t.lanes=a,t}function Hc(t,r,a){return t=tn(6,t,null,r),t.lanes=a,t}function pm(t){var r=tn(18,null,null,0);return r.stateNode=t,r}function Uc(t,r,a){return r=tn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var mm=new WeakMap;function pn(t,r){if(typeof t=="object"&&t!==null){var a=mm.get(t);return a!==void 0?a:(r={value:t,source:r,stack:Jt(r)},mm.set(t,r),r)}return{value:t,source:r,stack:Jt(r)}}var tl=[],nl=0,is=null,sa=0,mn=[],gn=0,Di=null,Hn=1,Un="";function li(t,r){tl[nl++]=sa,tl[nl++]=is,is=t,sa=r}function gm(t,r,a){mn[gn++]=Hn,mn[gn++]=Un,mn[gn++]=Di,Di=t;var s=Hn;t=Un;var h=32-Ze(s)-1;s&=~(1<<h),a+=1;var g=32-Ze(r)+h;if(30<g){var v=h-h%5;g=(s&(1<<v)-1).toString(32),s>>=v,h-=v,Hn=1<<32-Ze(r)+h|a<<h|s,Un=g+t}else Hn=1<<g|a<<h|s,Un=t}function qc(t){t.return!==null&&(li(t,1),gm(t,1,0))}function Ic(t){for(;t===is;)is=tl[--nl],tl[nl]=null,sa=tl[--nl],tl[nl]=null;for(;t===Di;)Di=mn[--gn],mn[gn]=null,Un=mn[--gn],mn[gn]=null,Hn=mn[--gn],mn[gn]=null}function ym(t,r){mn[gn++]=Hn,mn[gn++]=Un,mn[gn++]=Di,Hn=r.id,Un=r.overflow,Di=t}var Nt=null,it=null,Be=!1,Oi=null,yn=!1,Vc=Error(l(519));function Ri(t){var r=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ua(pn(r,t)),Vc}function xm(t){var r=t.stateNode,a=t.type,s=t.memoizedProps;switch(r[Et]=t,r[Ot]=s,a){case"dialog":Oe("cancel",r),Oe("close",r);break;case"iframe":case"object":case"embed":Oe("load",r);break;case"video":case"audio":for(a=0;a<za.length;a++)Oe(za[a],r);break;case"source":Oe("error",r);break;case"img":case"image":case"link":Oe("error",r),Oe("load",r);break;case"details":Oe("toggle",r);break;case"input":Oe("invalid",r),Xo(r,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Oe("invalid",r);break;case"textarea":Oe("invalid",r),Op(r,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||s.suppressHydrationWarning===!0||jy(r.textContent,a)?(s.popover!=null&&(Oe("beforetoggle",r),Oe("toggle",r)),s.onScroll!=null&&Oe("scroll",r),s.onScrollEnd!=null&&Oe("scrollend",r),s.onClick!=null&&(r.onclick=ni),r=!0):r=!1,r||Ri(t,!0)}function bm(t){for(Nt=t.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:Nt=Nt.return}}function il(t){if(t!==Nt)return!1;if(!Be)return bm(t),Be=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||od(t.type,t.memoizedProps)),a=!a),a&&it&&Ri(t),bm(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));it=Xy(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));it=Xy(t)}else r===27?(r=it,Zi(t.type)?(t=dd,dd=null,it=t):it=r):it=Nt?bn(t.stateNode.nextSibling):null;return!0}function yr(){it=Nt=null,Be=!1}function Yc(){var t=Oi;return t!==null&&(Gt===null?Gt=t:Gt.push.apply(Gt,t),Oi=null),t}function ua(t){Oi===null?Oi=[t]:Oi.push(t)}var Xc=O(null),xr=null,ai=null;function ji(t,r,a){T(Xc,r._currentValue),r._currentValue=a}function oi(t){t._currentValue=Xc.current,V(Xc)}function $c(t,r,a){for(;t!==null;){var s=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,s!==null&&(s.childLanes|=r)):s!==null&&(s.childLanes&r)!==r&&(s.childLanes|=r),t===a)break;t=t.return}}function Fc(t,r,a,s){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var v=h.child;g=g.firstContext;e:for(;g!==null;){var N=g;g=h;for(var q=0;q<r.length;q++)if(N.context===r[q]){g.lanes|=a,N=g.alternate,N!==null&&(N.lanes|=a),$c(g.return,a,t),s||(v=null);break e}g=N.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(l(341));v.lanes|=a,g=v.alternate,g!==null&&(g.lanes|=a),$c(v,a,t),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===t){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function rl(t,r,a,s){t=null;for(var h=r,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(l(387));if(v=v.memoizedProps,v!==null){var N=h.type;en(h.pendingProps.value,v.value)||(t!==null?t.push(N):t=[N])}}else if(h===de.current){if(v=h.alternate,v===null)throw Error(l(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(La):t=[La])}h=h.return}t!==null&&Fc(r,t,a,s),r.flags|=262144}function rs(t){for(t=t.firstContext;t!==null;){if(!en(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function br(t){xr=t,ai=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Tt(t){return vm(xr,t)}function ls(t,r){return xr===null&&br(t),vm(t,r)}function vm(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},ai===null){if(t===null)throw Error(l(308));ai=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else ai=ai.next=r;return a}var MS=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,s){t.push(s)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},zS=e.unstable_scheduleCallback,DS=e.unstable_NormalPriority,mt={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gc(){return{controller:new MS,data:new Map,refCount:0}}function ca(t){t.refCount--,t.refCount===0&&zS(DS,function(){t.controller.abort()})}var fa=null,Zc=0,ll=0,al=null;function OS(t,r){if(fa===null){var a=fa=[];Zc=0,ll=Jf(),al={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Zc++,r.then(wm,wm),r}function wm(){if(--Zc===0&&fa!==null){al!==null&&(al.status="fulfilled");var t=fa;fa=null,ll=0,al=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function RS(t,r){var a=[],s={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return t.then(function(){s.status="fulfilled",s.value=r;for(var h=0;h<a.length;h++)(0,a[h])(r)},function(h){for(s.status="rejected",s.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),s}var Sm=M.S;M.S=function(t,r){ly=St(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&OS(t,r),Sm!==null&&Sm(t,r)};var vr=O(null);function Qc(){var t=vr.current;return t!==null?t:et.pooledCache}function as(t,r){r===null?T(vr,vr.current):T(vr,r.pool)}function Em(){var t=Qc();return t===null?null:{parent:mt._currentValue,pool:t}}var ol=Error(l(460)),Pc=Error(l(474)),os=Error(l(542)),ss={then:function(){}};function km(t){return t=t.status,t==="fulfilled"||t==="rejected"}function _m(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(ni,ni),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Nm(t),t;default:if(typeof r.status=="string")r.then(ni,ni);else{if(t=et,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=r,t.status="pending",t.then(function(s){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=s}},function(s){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=s}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Nm(t),t}throw Sr=r,ol}}function wr(t){try{var r=t._init;return r(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Sr=a,ol):a}}var Sr=null;function Cm(){if(Sr===null)throw Error(l(459));var t=Sr;return Sr=null,t}function Nm(t){if(t===ol||t===os)throw Error(l(483))}var sl=null,da=0;function us(t){var r=da;return da+=1,sl===null&&(sl=[]),_m(sl,t,r)}function ha(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function cs(t,r){throw r.$$typeof===x?Error(l(525)):(t=Object.prototype.toString.call(r),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Tm(t){function r(Z,F){if(t){var K=Z.deletions;K===null?(Z.deletions=[F],Z.flags|=16):K.push(F)}}function a(Z,F){if(!t)return null;for(;F!==null;)r(Z,F),F=F.sibling;return null}function s(Z){for(var F=new Map;Z!==null;)Z.key!==null?F.set(Z.key,Z):F.set(Z.index,Z),Z=Z.sibling;return F}function h(Z,F){return Z=ri(Z,F),Z.index=0,Z.sibling=null,Z}function g(Z,F,K){return Z.index=K,t?(K=Z.alternate,K!==null?(K=K.index,K<F?(Z.flags|=67108866,F):K):(Z.flags|=67108866,F)):(Z.flags|=1048576,F)}function v(Z){return t&&Z.alternate===null&&(Z.flags|=67108866),Z}function N(Z,F,K,ae){return F===null||F.tag!==6?(F=Hc(K,Z.mode,ae),F.return=Z,F):(F=h(F,K),F.return=Z,F)}function q(Z,F,K,ae){var xe=K.type;return xe===_?le(Z,F,K.props.children,ae,K.key):F!==null&&(F.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===G&&wr(xe)===F.type)?(F=h(F,K.props),ha(F,K),F.return=Z,F):(F=ns(K.type,K.key,K.props,null,Z.mode,ae),ha(F,K),F.return=Z,F)}function J(Z,F,K,ae){return F===null||F.tag!==4||F.stateNode.containerInfo!==K.containerInfo||F.stateNode.implementation!==K.implementation?(F=Uc(K,Z.mode,ae),F.return=Z,F):(F=h(F,K.children||[]),F.return=Z,F)}function le(Z,F,K,ae,xe){return F===null||F.tag!==7?(F=gr(K,Z.mode,ae,xe),F.return=Z,F):(F=h(F,K),F.return=Z,F)}function oe(Z,F,K){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Hc(""+F,Z.mode,K),F.return=Z,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case b:return K=ns(F.type,F.key,F.props,null,Z.mode,K),ha(K,F),K.return=Z,K;case w:return F=Uc(F,Z.mode,K),F.return=Z,F;case G:return F=wr(F),oe(Z,F,K)}if(B(F)||X(F))return F=gr(F,Z.mode,K,null),F.return=Z,F;if(typeof F.then=="function")return oe(Z,us(F),K);if(F.$$typeof===E)return oe(Z,ls(Z,F),K);cs(Z,F)}return null}function ee(Z,F,K,ae){var xe=F!==null?F.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return xe!==null?null:N(Z,F,""+K,ae);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return K.key===xe?q(Z,F,K,ae):null;case w:return K.key===xe?J(Z,F,K,ae):null;case G:return K=wr(K),ee(Z,F,K,ae)}if(B(K)||X(K))return xe!==null?null:le(Z,F,K,ae,null);if(typeof K.then=="function")return ee(Z,F,us(K),ae);if(K.$$typeof===E)return ee(Z,F,ls(Z,K),ae);cs(Z,K)}return null}function ie(Z,F,K,ae,xe){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Z=Z.get(K)||null,N(F,Z,""+ae,xe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return Z=Z.get(ae.key===null?K:ae.key)||null,q(F,Z,ae,xe);case w:return Z=Z.get(ae.key===null?K:ae.key)||null,J(F,Z,ae,xe);case G:return ae=wr(ae),ie(Z,F,K,ae,xe)}if(B(ae)||X(ae))return Z=Z.get(K)||null,le(F,Z,ae,xe,null);if(typeof ae.then=="function")return ie(Z,F,K,us(ae),xe);if(ae.$$typeof===E)return ie(Z,F,K,ls(F,ae),xe);cs(F,ae)}return null}function me(Z,F,K,ae){for(var xe=null,Ye=null,ge=F,Te=F=0,Le=null;ge!==null&&Te<K.length;Te++){ge.index>Te?(Le=ge,ge=null):Le=ge.sibling;var Xe=ee(Z,ge,K[Te],ae);if(Xe===null){ge===null&&(ge=Le);break}t&&ge&&Xe.alternate===null&&r(Z,ge),F=g(Xe,F,Te),Ye===null?xe=Xe:Ye.sibling=Xe,Ye=Xe,ge=Le}if(Te===K.length)return a(Z,ge),Be&&li(Z,Te),xe;if(ge===null){for(;Te<K.length;Te++)ge=oe(Z,K[Te],ae),ge!==null&&(F=g(ge,F,Te),Ye===null?xe=ge:Ye.sibling=ge,Ye=ge);return Be&&li(Z,Te),xe}for(ge=s(ge);Te<K.length;Te++)Le=ie(ge,Z,Te,K[Te],ae),Le!==null&&(t&&Le.alternate!==null&&ge.delete(Le.key===null?Te:Le.key),F=g(Le,F,Te),Ye===null?xe=Le:Ye.sibling=Le,Ye=Le);return t&&ge.forEach(function(Wi){return r(Z,Wi)}),Be&&li(Z,Te),xe}function Se(Z,F,K,ae){if(K==null)throw Error(l(151));for(var xe=null,Ye=null,ge=F,Te=F=0,Le=null,Xe=K.next();ge!==null&&!Xe.done;Te++,Xe=K.next()){ge.index>Te?(Le=ge,ge=null):Le=ge.sibling;var Wi=ee(Z,ge,Xe.value,ae);if(Wi===null){ge===null&&(ge=Le);break}t&&ge&&Wi.alternate===null&&r(Z,ge),F=g(Wi,F,Te),Ye===null?xe=Wi:Ye.sibling=Wi,Ye=Wi,ge=Le}if(Xe.done)return a(Z,ge),Be&&li(Z,Te),xe;if(ge===null){for(;!Xe.done;Te++,Xe=K.next())Xe=oe(Z,Xe.value,ae),Xe!==null&&(F=g(Xe,F,Te),Ye===null?xe=Xe:Ye.sibling=Xe,Ye=Xe);return Be&&li(Z,Te),xe}for(ge=s(ge);!Xe.done;Te++,Xe=K.next())Xe=ie(ge,Z,Te,Xe.value,ae),Xe!==null&&(t&&Xe.alternate!==null&&ge.delete(Xe.key===null?Te:Xe.key),F=g(Xe,F,Te),Ye===null?xe=Xe:Ye.sibling=Xe,Ye=Xe);return t&&ge.forEach(function($2){return r(Z,$2)}),Be&&li(Z,Te),xe}function We(Z,F,K,ae){if(typeof K=="object"&&K!==null&&K.type===_&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case b:e:{for(var xe=K.key;F!==null;){if(F.key===xe){if(xe=K.type,xe===_){if(F.tag===7){a(Z,F.sibling),ae=h(F,K.props.children),ae.return=Z,Z=ae;break e}}else if(F.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===G&&wr(xe)===F.type){a(Z,F.sibling),ae=h(F,K.props),ha(ae,K),ae.return=Z,Z=ae;break e}a(Z,F);break}else r(Z,F);F=F.sibling}K.type===_?(ae=gr(K.props.children,Z.mode,ae,K.key),ae.return=Z,Z=ae):(ae=ns(K.type,K.key,K.props,null,Z.mode,ae),ha(ae,K),ae.return=Z,Z=ae)}return v(Z);case w:e:{for(xe=K.key;F!==null;){if(F.key===xe)if(F.tag===4&&F.stateNode.containerInfo===K.containerInfo&&F.stateNode.implementation===K.implementation){a(Z,F.sibling),ae=h(F,K.children||[]),ae.return=Z,Z=ae;break e}else{a(Z,F);break}else r(Z,F);F=F.sibling}ae=Uc(K,Z.mode,ae),ae.return=Z,Z=ae}return v(Z);case G:return K=wr(K),We(Z,F,K,ae)}if(B(K))return me(Z,F,K,ae);if(X(K)){if(xe=X(K),typeof xe!="function")throw Error(l(150));return K=xe.call(K),Se(Z,F,K,ae)}if(typeof K.then=="function")return We(Z,F,us(K),ae);if(K.$$typeof===E)return We(Z,F,ls(Z,K),ae);cs(Z,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,F!==null&&F.tag===6?(a(Z,F.sibling),ae=h(F,K),ae.return=Z,Z=ae):(a(Z,F),ae=Hc(K,Z.mode,ae),ae.return=Z,Z=ae),v(Z)):a(Z,F)}return function(Z,F,K,ae){try{da=0;var xe=We(Z,F,K,ae);return sl=null,xe}catch(ge){if(ge===ol||ge===os)throw ge;var Ye=tn(29,ge,null,Z.mode);return Ye.lanes=ae,Ye.return=Z,Ye}}}var Er=Tm(!0),Am=Tm(!1),Li=!1;function Kc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jc(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Bi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Hi(t,r,a){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Fe&2)!==0){var h=s.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),s.pending=r,r=ts(t),dm(t,null,a),r}return es(t,s,r,a),ts(t)}function pa(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var s=r.lanes;s&=t.pendingLanes,a|=s,r.lanes=a,Oo(t,a)}}function Wc(t,r){var a=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var h=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?h=g=v:g=g.next=v,a=a.next}while(a!==null);g===null?h=g=r:g=g.next=r}else h=g=r;a={baseState:s.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:s.shared,callbacks:s.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var ef=!1;function ma(){if(ef){var t=al;if(t!==null)throw t}}function ga(t,r,a,s){ef=!1;var h=t.updateQueue;Li=!1;var g=h.firstBaseUpdate,v=h.lastBaseUpdate,N=h.shared.pending;if(N!==null){h.shared.pending=null;var q=N,J=q.next;q.next=null,v===null?g=J:v.next=J,v=q;var le=t.alternate;le!==null&&(le=le.updateQueue,N=le.lastBaseUpdate,N!==v&&(N===null?le.firstBaseUpdate=J:N.next=J,le.lastBaseUpdate=q))}if(g!==null){var oe=h.baseState;v=0,le=J=q=null,N=g;do{var ee=N.lane&-536870913,ie=ee!==N.lane;if(ie?(je&ee)===ee:(s&ee)===ee){ee!==0&&ee===ll&&(ef=!0),le!==null&&(le=le.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var me=t,Se=N;ee=r;var We=a;switch(Se.tag){case 1:if(me=Se.payload,typeof me=="function"){oe=me.call(We,oe,ee);break e}oe=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Se.payload,ee=typeof me=="function"?me.call(We,oe,ee):me,ee==null)break e;oe=m({},oe,ee);break e;case 2:Li=!0}}ee=N.callback,ee!==null&&(t.flags|=64,ie&&(t.flags|=8192),ie=h.callbacks,ie===null?h.callbacks=[ee]:ie.push(ee))}else ie={lane:ee,tag:N.tag,payload:N.payload,callback:N.callback,next:null},le===null?(J=le=ie,q=oe):le=le.next=ie,v|=ee;if(N=N.next,N===null){if(N=h.shared.pending,N===null)break;ie=N,N=ie.next,ie.next=null,h.lastBaseUpdate=ie,h.shared.pending=null}}while(!0);le===null&&(q=oe),h.baseState=q,h.firstBaseUpdate=J,h.lastBaseUpdate=le,g===null&&(h.shared.lanes=0),Yi|=v,t.lanes=v,t.memoizedState=oe}}function Mm(t,r){if(typeof t!="function")throw Error(l(191,t));t.call(r)}function zm(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Mm(a[t],r)}var ul=O(null),fs=O(0);function Dm(t,r){t=gi,T(fs,t),T(ul,r),gi=t|r.baseLanes}function tf(){T(fs,gi),T(ul,ul.current)}function nf(){gi=fs.current,V(ul),V(fs)}var nn=O(null),xn=null;function Ui(t){var r=t.alternate;T(dt,dt.current&1),T(nn,t),xn===null&&(r===null||ul.current!==null||r.memoizedState!==null)&&(xn=t)}function rf(t){T(dt,dt.current),T(nn,t),xn===null&&(xn=t)}function Om(t){t.tag===22?(T(dt,dt.current),T(nn,t),xn===null&&(xn=t)):qi()}function qi(){T(dt,dt.current),T(nn,nn.current)}function rn(t){V(nn),xn===t&&(xn=null),V(dt)}var dt=O(0);function ds(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||cd(a)||fd(a)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var si=0,Ne=null,Ke=null,gt=null,hs=!1,cl=!1,kr=!1,ps=0,ya=0,fl=null,jS=0;function st(){throw Error(l(321))}function lf(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!en(t[a],r[a]))return!1;return!0}function af(t,r,a,s,h,g){return si=g,Ne=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,M.H=t===null||t.memoizedState===null?gg:wf,kr=!1,g=a(s,h),kr=!1,cl&&(g=jm(r,a,s,h)),Rm(t),g}function Rm(t){M.H=va;var r=Ke!==null&&Ke.next!==null;if(si=0,gt=Ke=Ne=null,hs=!1,ya=0,fl=null,r)throw Error(l(300));t===null||yt||(t=t.dependencies,t!==null&&rs(t)&&(yt=!0))}function jm(t,r,a,s){Ne=t;var h=0;do{if(cl&&(fl=null),ya=0,cl=!1,25<=h)throw Error(l(301));if(h+=1,gt=Ke=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}M.H=yg,g=r(a,s)}while(cl);return g}function LS(){var t=M.H,r=t.useState()[0];return r=typeof r.then=="function"?xa(r):r,t=t.useState()[0],(Ke!==null?Ke.memoizedState:null)!==t&&(Ne.flags|=1024),r}function of(){var t=ps!==0;return ps=0,t}function sf(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function uf(t){if(hs){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}hs=!1}si=0,gt=Ke=Ne=null,cl=!1,ya=ps=0,fl=null}function Ht(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Ne.memoizedState=gt=t:gt=gt.next=t,gt}function ht(){if(Ke===null){var t=Ne.alternate;t=t!==null?t.memoizedState:null}else t=Ke.next;var r=gt===null?Ne.memoizedState:gt.next;if(r!==null)gt=r,Ke=t;else{if(t===null)throw Ne.alternate===null?Error(l(467)):Error(l(310));Ke=t,t={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},gt===null?Ne.memoizedState=gt=t:gt=gt.next=t}return gt}function ms(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xa(t){var r=ya;return ya+=1,fl===null&&(fl=[]),t=_m(fl,t,r),r=Ne,(gt===null?r.memoizedState:gt.next)===null&&(r=r.alternate,M.H=r===null||r.memoizedState===null?gg:wf),t}function gs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xa(t);if(t.$$typeof===E)return Tt(t)}throw Error(l(438,String(t)))}function cf(t){var r=null,a=Ne.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var s=Ne.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(r={data:s.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=ms(),Ne.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),s=0;s<t;s++)a[s]=I;return r.index++,a}function ui(t,r){return typeof r=="function"?r(t):r}function ys(t){var r=ht();return ff(r,Ke,t)}function ff(t,r,a){var s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=a;var h=t.baseQueue,g=s.pending;if(g!==null){if(h!==null){var v=h.next;h.next=g.next,g.next=v}r.baseQueue=h=g,s.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{r=h.next;var N=v=null,q=null,J=r,le=!1;do{var oe=J.lane&-536870913;if(oe!==J.lane?(je&oe)===oe:(si&oe)===oe){var ee=J.revertLane;if(ee===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),oe===ll&&(le=!0);else if((si&ee)===ee){J=J.next,ee===ll&&(le=!0);continue}else oe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},q===null?(N=q=oe,v=g):q=q.next=oe,Ne.lanes|=ee,Yi|=ee;oe=J.action,kr&&a(g,oe),g=J.hasEagerState?J.eagerState:a(g,oe)}else ee={lane:oe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},q===null?(N=q=ee,v=g):q=q.next=ee,Ne.lanes|=oe,Yi|=oe;J=J.next}while(J!==null&&J!==r);if(q===null?v=g:q.next=N,!en(g,t.memoizedState)&&(yt=!0,le&&(a=al,a!==null)))throw a;t.memoizedState=g,t.baseState=v,t.baseQueue=q,s.lastRenderedState=g}return h===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function df(t){var r=ht(),a=r.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var s=a.dispatch,h=a.pending,g=r.memoizedState;if(h!==null){a.pending=null;var v=h=h.next;do g=t(g,v.action),v=v.next;while(v!==h);en(g,r.memoizedState)||(yt=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),a.lastRenderedState=g}return[g,s]}function Lm(t,r,a){var s=Ne,h=ht(),g=Be;if(g){if(a===void 0)throw Error(l(407));a=a()}else a=r();var v=!en((Ke||h).memoizedState,a);if(v&&(h.memoizedState=a,yt=!0),h=h.queue,mf(Um.bind(null,s,h,t),[t]),h.getSnapshot!==r||v||gt!==null&&gt.memoizedState.tag&1){if(s.flags|=2048,dl(9,{destroy:void 0},Hm.bind(null,s,h,a,r),null),et===null)throw Error(l(349));g||(si&127)!==0||Bm(s,r,a)}return a}function Bm(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=Ne.updateQueue,r===null?(r=ms(),Ne.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function Hm(t,r,a,s){r.value=a,r.getSnapshot=s,qm(r)&&Im(t)}function Um(t,r,a){return a(function(){qm(r)&&Im(t)})}function qm(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!en(t,a)}catch{return!0}}function Im(t){var r=mr(t,2);r!==null&&Zt(r,t,2)}function hf(t){var r=Ht();if(typeof t=="function"){var a=t;if(t=a(),kr){Dt(!0);try{a()}finally{Dt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:t},r}function Vm(t,r,a,s){return t.baseState=a,ff(t,Ke,typeof s=="function"?s:ui)}function BS(t,r,a,s,h){if(vs(t))throw Error(l(485));if(t=r.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){g.listeners.push(v)}};M.T!==null?a(!0):g.isTransition=!1,s(g),a=r.pending,a===null?(g.next=r.pending=g,Ym(r,g)):(g.next=a.next,r.pending=a.next=g)}}function Ym(t,r){var a=r.action,s=r.payload,h=t.state;if(r.isTransition){var g=M.T,v={};M.T=v;try{var N=a(h,s),q=M.S;q!==null&&q(v,N),Xm(t,r,N)}catch(J){pf(t,r,J)}finally{g!==null&&v.types!==null&&(g.types=v.types),M.T=g}}else try{g=a(h,s),Xm(t,r,g)}catch(J){pf(t,r,J)}}function Xm(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){$m(t,r,s)},function(s){return pf(t,r,s)}):$m(t,r,a)}function $m(t,r,a){r.status="fulfilled",r.value=a,Fm(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,Ym(t,a)))}function pf(t,r,a){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do r.status="rejected",r.reason=a,Fm(r),r=r.next;while(r!==s)}t.action=null}function Fm(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Gm(t,r){return r}function Zm(t,r){if(Be){var a=et.formState;if(a!==null){e:{var s=Ne;if(Be){if(it){t:{for(var h=it,g=yn;h.nodeType!==8;){if(!g){h=null;break t}if(h=bn(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){it=bn(h.nextSibling),s=h.data==="F!";break e}}Ri(s)}s=!1}s&&(r=a[0])}}return a=Ht(),a.memoizedState=a.baseState=r,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gm,lastRenderedState:r},a.queue=s,a=hg.bind(null,Ne,s),s.dispatch=a,s=hf(!1),g=vf.bind(null,Ne,!1,s.queue),s=Ht(),h={state:r,dispatch:null,action:t,pending:null},s.queue=h,a=BS.bind(null,Ne,h,g,a),h.dispatch=a,s.memoizedState=t,[r,a,!1]}function Qm(t){var r=ht();return Pm(r,Ke,t)}function Pm(t,r,a){if(r=ff(t,r,Gm)[0],t=ys(ui)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var s=xa(r)}catch(v){throw v===ol?os:v}else s=r;r=ht();var h=r.queue,g=h.dispatch;return a!==r.memoizedState&&(Ne.flags|=2048,dl(9,{destroy:void 0},HS.bind(null,h,a),null)),[s,g,t]}function HS(t,r){t.action=r}function Km(t){var r=ht(),a=Ke;if(a!==null)return Pm(r,a,t);ht(),r=r.memoizedState,a=ht();var s=a.queue.dispatch;return a.memoizedState=t,[r,s,!1]}function dl(t,r,a,s){return t={tag:t,create:a,deps:s,inst:r,next:null},r=Ne.updateQueue,r===null&&(r=ms(),Ne.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(s=a.next,a.next=t,t.next=s,r.lastEffect=t),t}function Jm(){return ht().memoizedState}function xs(t,r,a,s){var h=Ht();Ne.flags|=t,h.memoizedState=dl(1|r,{destroy:void 0},a,s===void 0?null:s)}function bs(t,r,a,s){var h=ht();s=s===void 0?null:s;var g=h.memoizedState.inst;Ke!==null&&s!==null&&lf(s,Ke.memoizedState.deps)?h.memoizedState=dl(r,g,a,s):(Ne.flags|=t,h.memoizedState=dl(1|r,g,a,s))}function Wm(t,r){xs(8390656,8,t,r)}function mf(t,r){bs(2048,8,t,r)}function US(t){Ne.flags|=4;var r=Ne.updateQueue;if(r===null)r=ms(),Ne.updateQueue=r,r.events=[t];else{var a=r.events;a===null?r.events=[t]:a.push(t)}}function eg(t){var r=ht().memoizedState;return US({ref:r,nextImpl:t}),function(){if((Fe&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}function tg(t,r){return bs(4,2,t,r)}function ng(t,r){return bs(4,4,t,r)}function ig(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function rg(t,r,a){a=a!=null?a.concat([t]):null,bs(4,4,ig.bind(null,r,t),a)}function gf(){}function lg(t,r){var a=ht();r=r===void 0?null:r;var s=a.memoizedState;return r!==null&&lf(r,s[1])?s[0]:(a.memoizedState=[t,r],t)}function ag(t,r){var a=ht();r=r===void 0?null:r;var s=a.memoizedState;if(r!==null&&lf(r,s[1]))return s[0];if(s=t(),kr){Dt(!0);try{t()}finally{Dt(!1)}}return a.memoizedState=[s,r],s}function yf(t,r,a){return a===void 0||(si&1073741824)!==0&&(je&261930)===0?t.memoizedState=r:(t.memoizedState=a,t=oy(),Ne.lanes|=t,Yi|=t,a)}function og(t,r,a,s){return en(a,r)?a:ul.current!==null?(t=yf(t,a,s),en(t,r)||(yt=!0),t):(si&42)===0||(si&1073741824)!==0&&(je&261930)===0?(yt=!0,t.memoizedState=a):(t=oy(),Ne.lanes|=t,Yi|=t,r)}function sg(t,r,a,s,h){var g=H.p;H.p=g!==0&&8>g?g:8;var v=M.T,N={};M.T=N,vf(t,!1,r,a);try{var q=h(),J=M.S;if(J!==null&&J(N,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var le=RS(q,s);ba(t,r,le,on(t))}else ba(t,r,s,on(t))}catch(oe){ba(t,r,{then:function(){},status:"rejected",reason:oe},on())}finally{H.p=g,v!==null&&N.types!==null&&(v.types=N.types),M.T=v}}function qS(){}function xf(t,r,a,s){if(t.tag!==5)throw Error(l(476));var h=ug(t).queue;sg(t,h,r,$,a===null?qS:function(){return cg(t),a(s)})}function ug(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:$},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function cg(t){var r=ug(t);r.next===null&&(r=t.alternate.memoizedState),ba(t,r.next.queue,{},on())}function bf(){return Tt(La)}function fg(){return ht().memoizedState}function dg(){return ht().memoizedState}function IS(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=on();t=Bi(a);var s=Hi(r,t,a);s!==null&&(Zt(s,r,a),pa(s,r,a)),r={cache:Gc()},t.payload=r;return}r=r.return}}function VS(t,r,a){var s=on();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},vs(t)?pg(r,a):(a=Lc(t,r,a,s),a!==null&&(Zt(a,t,s),mg(a,r,s)))}function hg(t,r,a){var s=on();ba(t,r,a,s)}function ba(t,r,a,s){var h={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(vs(t))pg(r,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var v=r.lastRenderedState,N=g(v,a);if(h.hasEagerState=!0,h.eagerState=N,en(N,v))return es(t,r,h,0),et===null&&Wo(),!1}catch{}if(a=Lc(t,r,h,s),a!==null)return Zt(a,t,s),mg(a,r,s),!0}return!1}function vf(t,r,a,s){if(s={lane:2,revertLane:Jf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},vs(t)){if(r)throw Error(l(479))}else r=Lc(t,a,s,2),r!==null&&Zt(r,t,2)}function vs(t){var r=t.alternate;return t===Ne||r!==null&&r===Ne}function pg(t,r){cl=hs=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function mg(t,r,a){if((a&4194048)!==0){var s=r.lanes;s&=t.pendingLanes,a|=s,r.lanes=a,Oo(t,a)}}var va={readContext:Tt,use:gs,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};va.useEffectEvent=st;var gg={readContext:Tt,use:gs,useCallback:function(t,r){return Ht().memoizedState=[t,r===void 0?null:r],t},useContext:Tt,useEffect:Wm,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,xs(4194308,4,ig.bind(null,r,t),a)},useLayoutEffect:function(t,r){return xs(4194308,4,t,r)},useInsertionEffect:function(t,r){xs(4,2,t,r)},useMemo:function(t,r){var a=Ht();r=r===void 0?null:r;var s=t();if(kr){Dt(!0);try{t()}finally{Dt(!1)}}return a.memoizedState=[s,r],s},useReducer:function(t,r,a){var s=Ht();if(a!==void 0){var h=a(r);if(kr){Dt(!0);try{a(r)}finally{Dt(!1)}}}else h=r;return s.memoizedState=s.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},s.queue=t,t=t.dispatch=VS.bind(null,Ne,t),[s.memoizedState,t]},useRef:function(t){var r=Ht();return t={current:t},r.memoizedState=t},useState:function(t){t=hf(t);var r=t.queue,a=hg.bind(null,Ne,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:gf,useDeferredValue:function(t,r){var a=Ht();return yf(a,t,r)},useTransition:function(){var t=hf(!1);return t=sg.bind(null,Ne,t.queue,!0,!1),Ht().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var s=Ne,h=Ht();if(Be){if(a===void 0)throw Error(l(407));a=a()}else{if(a=r(),et===null)throw Error(l(349));(je&127)!==0||Bm(s,r,a)}h.memoizedState=a;var g={value:a,getSnapshot:r};return h.queue=g,Wm(Um.bind(null,s,g,t),[t]),s.flags|=2048,dl(9,{destroy:void 0},Hm.bind(null,s,g,a,r),null),a},useId:function(){var t=Ht(),r=et.identifierPrefix;if(Be){var a=Un,s=Hn;a=(s&~(1<<32-Ze(s)-1)).toString(32)+a,r="_"+r+"R_"+a,a=ps++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=jS++,r="_"+r+"r_"+a.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:bf,useFormState:Zm,useActionState:Zm,useOptimistic:function(t){var r=Ht();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=vf.bind(null,Ne,!0,a),a.dispatch=r,[t,r]},useMemoCache:cf,useCacheRefresh:function(){return Ht().memoizedState=IS.bind(null,Ne)},useEffectEvent:function(t){var r=Ht(),a={impl:t};return r.memoizedState=a,function(){if((Fe&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},wf={readContext:Tt,use:gs,useCallback:lg,useContext:Tt,useEffect:mf,useImperativeHandle:rg,useInsertionEffect:tg,useLayoutEffect:ng,useMemo:ag,useReducer:ys,useRef:Jm,useState:function(){return ys(ui)},useDebugValue:gf,useDeferredValue:function(t,r){var a=ht();return og(a,Ke.memoizedState,t,r)},useTransition:function(){var t=ys(ui)[0],r=ht().memoizedState;return[typeof t=="boolean"?t:xa(t),r]},useSyncExternalStore:Lm,useId:fg,useHostTransitionStatus:bf,useFormState:Qm,useActionState:Qm,useOptimistic:function(t,r){var a=ht();return Vm(a,Ke,t,r)},useMemoCache:cf,useCacheRefresh:dg};wf.useEffectEvent=eg;var yg={readContext:Tt,use:gs,useCallback:lg,useContext:Tt,useEffect:mf,useImperativeHandle:rg,useInsertionEffect:tg,useLayoutEffect:ng,useMemo:ag,useReducer:df,useRef:Jm,useState:function(){return df(ui)},useDebugValue:gf,useDeferredValue:function(t,r){var a=ht();return Ke===null?yf(a,t,r):og(a,Ke.memoizedState,t,r)},useTransition:function(){var t=df(ui)[0],r=ht().memoizedState;return[typeof t=="boolean"?t:xa(t),r]},useSyncExternalStore:Lm,useId:fg,useHostTransitionStatus:bf,useFormState:Km,useActionState:Km,useOptimistic:function(t,r){var a=ht();return Ke!==null?Vm(a,Ke,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:cf,useCacheRefresh:dg};yg.useEffectEvent=eg;function Sf(t,r,a,s){r=t.memoizedState,a=a(s,r),a=a==null?r:m({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Ef={enqueueSetState:function(t,r,a){t=t._reactInternals;var s=on(),h=Bi(s);h.payload=r,a!=null&&(h.callback=a),r=Hi(t,h,s),r!==null&&(Zt(r,t,s),pa(r,t,s))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var s=on(),h=Bi(s);h.tag=1,h.payload=r,a!=null&&(h.callback=a),r=Hi(t,h,s),r!==null&&(Zt(r,t,s),pa(r,t,s))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=on(),s=Bi(a);s.tag=2,r!=null&&(s.callback=r),r=Hi(t,s,a),r!==null&&(Zt(r,t,a),pa(r,t,a))}};function xg(t,r,a,s,h,g,v){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,g,v):r.prototype&&r.prototype.isPureReactComponent?!aa(a,s)||!aa(h,g):!0}function bg(t,r,a,s){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,s),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,s),r.state!==t&&Ef.enqueueReplaceState(r,r.state,null)}function _r(t,r){var a=r;if("ref"in r){a={};for(var s in r)s!=="ref"&&(a[s]=r[s])}if(t=t.defaultProps){a===r&&(a=m({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}function vg(t){Jo(t)}function wg(t){console.error(t)}function Sg(t){Jo(t)}function ws(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(s){setTimeout(function(){throw s})}}function Eg(t,r,a){try{var s=t.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function kf(t,r,a){return a=Bi(a),a.tag=3,a.payload={element:null},a.callback=function(){ws(t,r)},a}function kg(t){return t=Bi(t),t.tag=3,t}function _g(t,r,a,s){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;t.payload=function(){return h(g)},t.callback=function(){Eg(r,a,s)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(t.callback=function(){Eg(r,a,s),typeof h!="function"&&(Xi===null?Xi=new Set([this]):Xi.add(this));var N=s.stack;this.componentDidCatch(s.value,{componentStack:N!==null?N:""})})}function YS(t,r,a,s,h){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(r=a.alternate,r!==null&&rl(r,a,h,!0),a=nn.current,a!==null){switch(a.tag){case 31:case 13:return xn===null?Os():a.alternate===null&&ut===0&&(ut=3),a.flags&=-257,a.flags|=65536,a.lanes=h,s===ss?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([s]):r.add(s),Qf(t,s,h)),!1;case 22:return a.flags|=65536,s===ss?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([s]):a.add(s)),Qf(t,s,h)),!1}throw Error(l(435,a.tag))}return Qf(t,s,h),Os(),!1}if(Be)return r=nn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,s!==Vc&&(t=Error(l(422),{cause:s}),ua(pn(t,a)))):(s!==Vc&&(r=Error(l(423),{cause:s}),ua(pn(r,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,s=pn(s,a),h=kf(t.stateNode,s,h),Wc(t,h),ut!==4&&(ut=2)),!1;var g=Error(l(520),{cause:s});if(g=pn(g,a),Ta===null?Ta=[g]:Ta.push(g),ut!==4&&(ut=2),r===null)return!0;s=pn(s,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=kf(a.stateNode,s,t),Wc(a,t),!1;case 1:if(r=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Xi===null||!Xi.has(g))))return a.flags|=65536,h&=-h,a.lanes|=h,h=kg(h),_g(h,t,a,s),Wc(a,h),!1}a=a.return}while(a!==null);return!1}var _f=Error(l(461)),yt=!1;function At(t,r,a,s){r.child=t===null?Am(r,null,a,s):Er(r,t.child,a,s)}function Cg(t,r,a,s,h){a=a.render;var g=r.ref;if("ref"in s){var v={};for(var N in s)N!=="ref"&&(v[N]=s[N])}else v=s;return br(r),s=af(t,r,a,v,g,h),N=of(),t!==null&&!yt?(sf(t,r,h),ci(t,r,h)):(Be&&N&&qc(r),r.flags|=1,At(t,r,s,h),r.child)}function Ng(t,r,a,s,h){if(t===null){var g=a.type;return typeof g=="function"&&!Bc(g)&&g.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=g,Tg(t,r,g,s,h)):(t=ns(a.type,null,s,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!Of(t,h)){var v=g.memoizedProps;if(a=a.compare,a=a!==null?a:aa,a(v,s)&&t.ref===r.ref)return ci(t,r,h)}return r.flags|=1,t=ri(g,s),t.ref=r.ref,t.return=r,r.child=t}function Tg(t,r,a,s,h){if(t!==null){var g=t.memoizedProps;if(aa(g,s)&&t.ref===r.ref)if(yt=!1,r.pendingProps=s=g,Of(t,h))(t.flags&131072)!==0&&(yt=!0);else return r.lanes=t.lanes,ci(t,r,h)}return Cf(t,r,a,s,h)}function Ag(t,r,a,s){var h=s.children,g=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((r.flags&128)!==0){if(g=g!==null?g.baseLanes|a:a,t!==null){for(s=r.child=t.child,h=0;s!==null;)h=h|s.lanes|s.childLanes,s=s.sibling;s=h&~g}else s=0,r.child=null;return Mg(t,r,g,a,s)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&as(r,g!==null?g.cachePool:null),g!==null?Dm(r,g):tf(),Om(r);else return s=r.lanes=536870912,Mg(t,r,g!==null?g.baseLanes|a:a,a,s)}else g!==null?(as(r,g.cachePool),Dm(r,g),qi(),r.memoizedState=null):(t!==null&&as(r,null),tf(),qi());return At(t,r,h,a),r.child}function wa(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Mg(t,r,a,s,h){var g=Qc();return g=g===null?null:{parent:mt._currentValue,pool:g},r.memoizedState={baseLanes:a,cachePool:g},t!==null&&as(r,null),tf(),Om(r),t!==null&&rl(t,r,s,!0),r.childLanes=h,null}function Ss(t,r){return r=ks({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function zg(t,r,a){return Er(r,t.child,null,a),t=Ss(r,r.pendingProps),t.flags|=2,rn(r),r.memoizedState=null,t}function XS(t,r,a){var s=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Be){if(s.mode==="hidden")return t=Ss(r,s),r.lanes=536870912,wa(null,t);if(rf(r),(t=it)?(t=Yy(t,yn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Di!==null?{id:Hn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=pm(t),a.return=r,r.child=a,Nt=r,it=null)):t=null,t===null)throw Ri(r);return r.lanes=536870912,null}return Ss(r,s)}var g=t.memoizedState;if(g!==null){var v=g.dehydrated;if(rf(r),h)if(r.flags&256)r.flags&=-257,r=zg(t,r,a);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(l(558));else if(yt||rl(t,r,a,!1),h=(a&t.childLanes)!==0,yt||h){if(s=et,s!==null&&(v=Ro(s,a),v!==0&&v!==g.retryLane))throw g.retryLane=v,mr(t,v),Zt(s,t,v),_f;Os(),r=zg(t,r,a)}else t=g.treeContext,it=bn(v.nextSibling),Nt=r,Be=!0,Oi=null,yn=!1,t!==null&&ym(r,t),r=Ss(r,s),r.flags|=4096;return r}return t=ri(t.child,{mode:s.mode,children:s.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Es(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function Cf(t,r,a,s,h){return br(r),a=af(t,r,a,s,void 0,h),s=of(),t!==null&&!yt?(sf(t,r,h),ci(t,r,h)):(Be&&s&&qc(r),r.flags|=1,At(t,r,a,h),r.child)}function Dg(t,r,a,s,h,g){return br(r),r.updateQueue=null,a=jm(r,s,a,h),Rm(t),s=of(),t!==null&&!yt?(sf(t,r,g),ci(t,r,g)):(Be&&s&&qc(r),r.flags|=1,At(t,r,a,g),r.child)}function Og(t,r,a,s,h){if(br(r),r.stateNode===null){var g=el,v=a.contextType;typeof v=="object"&&v!==null&&(g=Tt(v)),g=new a(s,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Ef,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=s,g.state=r.memoizedState,g.refs={},Kc(r),v=a.contextType,g.context=typeof v=="object"&&v!==null?Tt(v):el,g.state=r.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Sf(r,a,v,s),g.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(v=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),v!==g.state&&Ef.enqueueReplaceState(g,g.state,null),ga(r,s,g,h),ma(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),s=!0}else if(t===null){g=r.stateNode;var N=r.memoizedProps,q=_r(a,N);g.props=q;var J=g.context,le=a.contextType;v=el,typeof le=="object"&&le!==null&&(v=Tt(le));var oe=a.getDerivedStateFromProps;le=typeof oe=="function"||typeof g.getSnapshotBeforeUpdate=="function",N=r.pendingProps!==N,le||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(N||J!==v)&&bg(r,g,s,v),Li=!1;var ee=r.memoizedState;g.state=ee,ga(r,s,g,h),ma(),J=r.memoizedState,N||ee!==J||Li?(typeof oe=="function"&&(Sf(r,a,oe,s),J=r.memoizedState),(q=Li||xg(r,a,q,s,ee,J,v))?(le||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=s,r.memoizedState=J),g.props=s,g.state=J,g.context=v,s=q):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),s=!1)}else{g=r.stateNode,Jc(t,r),v=r.memoizedProps,le=_r(a,v),g.props=le,oe=r.pendingProps,ee=g.context,J=a.contextType,q=el,typeof J=="object"&&J!==null&&(q=Tt(J)),N=a.getDerivedStateFromProps,(J=typeof N=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(v!==oe||ee!==q)&&bg(r,g,s,q),Li=!1,ee=r.memoizedState,g.state=ee,ga(r,s,g,h),ma();var ie=r.memoizedState;v!==oe||ee!==ie||Li||t!==null&&t.dependencies!==null&&rs(t.dependencies)?(typeof N=="function"&&(Sf(r,a,N,s),ie=r.memoizedState),(le=Li||xg(r,a,le,s,ee,ie,q)||t!==null&&t.dependencies!==null&&rs(t.dependencies))?(J||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,ie,q),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,ie,q)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||v===t.memoizedProps&&ee===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&ee===t.memoizedState||(r.flags|=1024),r.memoizedProps=s,r.memoizedState=ie),g.props=s,g.state=ie,g.context=q,s=le):(typeof g.componentDidUpdate!="function"||v===t.memoizedProps&&ee===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&ee===t.memoizedState||(r.flags|=1024),s=!1)}return g=s,Es(t,r),s=(r.flags&128)!==0,g||s?(g=r.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&s?(r.child=Er(r,t.child,null,h),r.child=Er(r,null,a,h)):At(t,r,a,h),r.memoizedState=g.state,t=r.child):t=ci(t,r,h),t}function Rg(t,r,a,s){return yr(),r.flags|=256,At(t,r,a,s),r.child}var Nf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tf(t){return{baseLanes:t,cachePool:Em()}}function Af(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=an),t}function jg(t,r,a){var s=r.pendingProps,h=!1,g=(r.flags&128)!==0,v;if((v=g)||(v=t!==null&&t.memoizedState===null?!1:(dt.current&2)!==0),v&&(h=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,t===null){if(Be){if(h?Ui(r):qi(),(t=it)?(t=Yy(t,yn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Di!==null?{id:Hn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=pm(t),a.return=r,r.child=a,Nt=r,it=null)):t=null,t===null)throw Ri(r);return fd(t)?r.lanes=32:r.lanes=536870912,null}var N=s.children;return s=s.fallback,h?(qi(),h=r.mode,N=ks({mode:"hidden",children:N},h),s=gr(s,h,a,null),N.return=r,s.return=r,N.sibling=s,r.child=N,s=r.child,s.memoizedState=Tf(a),s.childLanes=Af(t,v,a),r.memoizedState=Nf,wa(null,s)):(Ui(r),Mf(r,N))}var q=t.memoizedState;if(q!==null&&(N=q.dehydrated,N!==null)){if(g)r.flags&256?(Ui(r),r.flags&=-257,r=zf(t,r,a)):r.memoizedState!==null?(qi(),r.child=t.child,r.flags|=128,r=null):(qi(),N=s.fallback,h=r.mode,s=ks({mode:"visible",children:s.children},h),N=gr(N,h,a,null),N.flags|=2,s.return=r,N.return=r,s.sibling=N,r.child=s,Er(r,t.child,null,a),s=r.child,s.memoizedState=Tf(a),s.childLanes=Af(t,v,a),r.memoizedState=Nf,r=wa(null,s));else if(Ui(r),fd(N)){if(v=N.nextSibling&&N.nextSibling.dataset,v)var J=v.dgst;v=J,s=Error(l(419)),s.stack="",s.digest=v,ua({value:s,source:null,stack:null}),r=zf(t,r,a)}else if(yt||rl(t,r,a,!1),v=(a&t.childLanes)!==0,yt||v){if(v=et,v!==null&&(s=Ro(v,a),s!==0&&s!==q.retryLane))throw q.retryLane=s,mr(t,s),Zt(v,t,s),_f;cd(N)||Os(),r=zf(t,r,a)}else cd(N)?(r.flags|=192,r.child=t.child,r=null):(t=q.treeContext,it=bn(N.nextSibling),Nt=r,Be=!0,Oi=null,yn=!1,t!==null&&ym(r,t),r=Mf(r,s.children),r.flags|=4096);return r}return h?(qi(),N=s.fallback,h=r.mode,q=t.child,J=q.sibling,s=ri(q,{mode:"hidden",children:s.children}),s.subtreeFlags=q.subtreeFlags&65011712,J!==null?N=ri(J,N):(N=gr(N,h,a,null),N.flags|=2),N.return=r,s.return=r,s.sibling=N,r.child=s,wa(null,s),s=r.child,N=t.child.memoizedState,N===null?N=Tf(a):(h=N.cachePool,h!==null?(q=mt._currentValue,h=h.parent!==q?{parent:q,pool:q}:h):h=Em(),N={baseLanes:N.baseLanes|a,cachePool:h}),s.memoizedState=N,s.childLanes=Af(t,v,a),r.memoizedState=Nf,wa(t.child,s)):(Ui(r),a=t.child,t=a.sibling,a=ri(a,{mode:"visible",children:s.children}),a.return=r,a.sibling=null,t!==null&&(v=r.deletions,v===null?(r.deletions=[t],r.flags|=16):v.push(t)),r.child=a,r.memoizedState=null,a)}function Mf(t,r){return r=ks({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function ks(t,r){return t=tn(22,t,null,r),t.lanes=0,t}function zf(t,r,a){return Er(r,t.child,null,a),t=Mf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Lg(t,r,a){t.lanes|=r;var s=t.alternate;s!==null&&(s.lanes|=r),$c(t.return,r,a)}function Df(t,r,a,s,h,g){var v=t.memoizedState;v===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:h,treeForkCount:g}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=a,v.tailMode=h,v.treeForkCount=g)}function Bg(t,r,a){var s=r.pendingProps,h=s.revealOrder,g=s.tail;s=s.children;var v=dt.current,N=(v&2)!==0;if(N?(v=v&1|2,r.flags|=128):v&=1,T(dt,v),At(t,r,s,a),s=Be?sa:0,!N&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Lg(t,a,r);else if(t.tag===19)Lg(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(a=r.child,h=null;a!==null;)t=a.alternate,t!==null&&ds(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),Df(r,!1,h,a,g,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&ds(t)===null){r.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}Df(r,!0,a,null,g,s);break;case"together":Df(r,!1,null,null,void 0,s);break;default:r.memoizedState=null}return r.child}function ci(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),Yi|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(rl(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(l(153));if(r.child!==null){for(t=r.child,a=ri(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=ri(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function Of(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&rs(t)))}function $S(t,r,a){switch(r.tag){case 3:se(r,r.stateNode.containerInfo),ji(r,mt,t.memoizedState.cache),yr();break;case 27:case 5:Ee(r);break;case 4:se(r,r.stateNode.containerInfo);break;case 10:ji(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,rf(r),null;break;case 13:var s=r.memoizedState;if(s!==null)return s.dehydrated!==null?(Ui(r),r.flags|=128,null):(a&r.child.childLanes)!==0?jg(t,r,a):(Ui(r),t=ci(t,r,a),t!==null?t.sibling:null);Ui(r);break;case 19:var h=(t.flags&128)!==0;if(s=(a&r.childLanes)!==0,s||(rl(t,r,a,!1),s=(a&r.childLanes)!==0),h){if(s)return Bg(t,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),T(dt,dt.current),s)break;return null;case 22:return r.lanes=0,Ag(t,r,a,r.pendingProps);case 24:ji(r,mt,t.memoizedState.cache)}return ci(t,r,a)}function Hg(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)yt=!0;else{if(!Of(t,a)&&(r.flags&128)===0)return yt=!1,$S(t,r,a);yt=(t.flags&131072)!==0}else yt=!1,Be&&(r.flags&1048576)!==0&&gm(r,sa,r.index);switch(r.lanes=0,r.tag){case 16:e:{var s=r.pendingProps;if(t=wr(r.elementType),r.type=t,typeof t=="function")Bc(t)?(s=_r(t,s),r.tag=1,r=Og(null,r,t,s,a)):(r.tag=0,r=Cf(null,r,t,s,a));else{if(t!=null){var h=t.$$typeof;if(h===D){r.tag=11,r=Cg(null,r,t,s,a);break e}else if(h===L){r.tag=14,r=Ng(null,r,t,s,a);break e}}throw r=R(t)||t,Error(l(306,r,""))}}return r;case 0:return Cf(t,r,r.type,r.pendingProps,a);case 1:return s=r.type,h=_r(s,r.pendingProps),Og(t,r,s,h,a);case 3:e:{if(se(r,r.stateNode.containerInfo),t===null)throw Error(l(387));s=r.pendingProps;var g=r.memoizedState;h=g.element,Jc(t,r),ga(r,s,null,a);var v=r.memoizedState;if(s=v.cache,ji(r,mt,s),s!==g.cache&&Fc(r,[mt],a,!0),ma(),s=v.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Rg(t,r,s,a);break e}else if(s!==h){h=pn(Error(l(424)),r),ua(h),r=Rg(t,r,s,a);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,it=bn(t.firstChild),Nt=r,Be=!0,Oi=null,yn=!0,a=Am(r,null,s,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(yr(),s===h){r=ci(t,r,a);break e}At(t,r,s,a)}r=r.child}return r;case 26:return Es(t,r),t===null?(a=Qy(r.type,null,r.pendingProps,null))?r.memoizedState=a:Be||(a=r.type,t=r.pendingProps,s=qs(ce.current).createElement(a),s[Et]=r,s[Ot]=t,Mt(s,a,t),pt(s),r.stateNode=s):r.memoizedState=Qy(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Ee(r),t===null&&Be&&(s=r.stateNode=Fy(r.type,r.pendingProps,ce.current),Nt=r,yn=!0,h=it,Zi(r.type)?(dd=h,it=bn(s.firstChild)):it=h),At(t,r,r.pendingProps.children,a),Es(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Be&&((h=s=it)&&(s=w2(s,r.type,r.pendingProps,yn),s!==null?(r.stateNode=s,Nt=r,it=bn(s.firstChild),yn=!1,h=!0):h=!1),h||Ri(r)),Ee(r),h=r.type,g=r.pendingProps,v=t!==null?t.memoizedProps:null,s=g.children,od(h,g)?s=null:v!==null&&od(h,v)&&(r.flags|=32),r.memoizedState!==null&&(h=af(t,r,LS,null,null,a),La._currentValue=h),Es(t,r),At(t,r,s,a),r.child;case 6:return t===null&&Be&&((t=a=it)&&(a=S2(a,r.pendingProps,yn),a!==null?(r.stateNode=a,Nt=r,it=null,t=!0):t=!1),t||Ri(r)),null;case 13:return jg(t,r,a);case 4:return se(r,r.stateNode.containerInfo),s=r.pendingProps,t===null?r.child=Er(r,null,s,a):At(t,r,s,a),r.child;case 11:return Cg(t,r,r.type,r.pendingProps,a);case 7:return At(t,r,r.pendingProps,a),r.child;case 8:return At(t,r,r.pendingProps.children,a),r.child;case 12:return At(t,r,r.pendingProps.children,a),r.child;case 10:return s=r.pendingProps,ji(r,r.type,s.value),At(t,r,s.children,a),r.child;case 9:return h=r.type._context,s=r.pendingProps.children,br(r),h=Tt(h),s=s(h),r.flags|=1,At(t,r,s,a),r.child;case 14:return Ng(t,r,r.type,r.pendingProps,a);case 15:return Tg(t,r,r.type,r.pendingProps,a);case 19:return Bg(t,r,a);case 31:return XS(t,r,a);case 22:return Ag(t,r,a,r.pendingProps);case 24:return br(r),s=Tt(mt),t===null?(h=Qc(),h===null&&(h=et,g=Gc(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=a),h=g),r.memoizedState={parent:s,cache:h},Kc(r),ji(r,mt,h)):((t.lanes&a)!==0&&(Jc(t,r),ga(r,null,null,a),ma()),h=t.memoizedState,g=r.memoizedState,h.parent!==s?(h={parent:s,cache:s},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),ji(r,mt,s)):(s=g.cache,ji(r,mt,s),s!==h.cache&&Fc(r,[mt],a,!0))),At(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(l(156,r.tag))}function fi(t){t.flags|=4}function Rf(t,r,a,s,h){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(fy())t.flags|=8192;else throw Sr=ss,Pc}else t.flags&=-16777217}function Ug(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!e0(r))if(fy())t.flags|=8192;else throw Sr=ss,Pc}function _s(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?zo():536870912,t.lanes|=r,gl|=r)}function Sa(t,r){if(!Be)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function rt(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,s=0;if(r)for(var h=t.child;h!==null;)a|=h.lanes|h.childLanes,s|=h.subtreeFlags&65011712,s|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)a|=h.lanes|h.childLanes,s|=h.subtreeFlags,s|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=s,t.childLanes=a,r}function FS(t,r,a){var s=r.pendingProps;switch(Ic(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(r),null;case 1:return rt(r),null;case 3:return a=r.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),oi(mt),pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(il(r)?fi(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Yc())),rt(r),null;case 26:var h=r.type,g=r.memoizedState;return t===null?(fi(r),g!==null?(rt(r),Ug(r,g)):(rt(r),Rf(r,h,null,s,a))):g?g!==t.memoizedState?(fi(r),rt(r),Ug(r,g)):(rt(r),r.flags&=-16777217):(t=t.memoizedProps,t!==s&&fi(r),rt(r),Rf(r,h,t,s,a)),null;case 27:if(_e(r),a=ce.current,h=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==s&&fi(r);else{if(!s){if(r.stateNode===null)throw Error(l(166));return rt(r),null}t=ne.current,il(r)?xm(r):(t=Fy(h,s,a),r.stateNode=t,fi(r))}return rt(r),null;case 5:if(_e(r),h=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==s&&fi(r);else{if(!s){if(r.stateNode===null)throw Error(l(166));return rt(r),null}if(g=ne.current,il(r))xm(r);else{var v=qs(ce.current);switch(g){case 1:g=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=v.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?v.createElement(h,{is:s.is}):v.createElement(h)}}g[Et]=r,g[Ot]=s;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)g.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=g;e:switch(Mt(g,h,s),h){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&fi(r)}}return rt(r),Rf(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,a),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==s&&fi(r);else{if(typeof s!="string"&&r.stateNode===null)throw Error(l(166));if(t=ce.current,il(r)){if(t=r.stateNode,a=r.memoizedProps,s=null,h=Nt,h!==null)switch(h.tag){case 27:case 5:s=h.memoizedProps}t[Et]=r,t=!!(t.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||jy(t.nodeValue,a)),t||Ri(r,!0)}else t=qs(t).createTextNode(s),t[Et]=r,r.stateNode=t}return rt(r),null;case 31:if(a=r.memoizedState,t===null||t.memoizedState!==null){if(s=il(r),a!==null){if(t===null){if(!s)throw Error(l(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Et]=r}else yr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;rt(r),t=!1}else a=Yc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return r.flags&256?(rn(r),r):(rn(r),null);if((r.flags&128)!==0)throw Error(l(558))}return rt(r),null;case 13:if(s=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=il(r),s!==null&&s.dehydrated!==null){if(t===null){if(!h)throw Error(l(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(l(317));h[Et]=r}else yr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;rt(r),h=!1}else h=Yc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(rn(r),r):(rn(r),null)}return rn(r),(r.flags&128)!==0?(r.lanes=a,r):(a=s!==null,t=t!==null&&t.memoizedState!==null,a&&(s=r.child,h=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(h=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==h&&(s.flags|=2048)),a!==t&&a&&(r.child.flags|=8192),_s(r,r.updateQueue),rt(r),null);case 4:return pe(),t===null&&nd(r.stateNode.containerInfo),rt(r),null;case 10:return oi(r.type),rt(r),null;case 19:if(V(dt),s=r.memoizedState,s===null)return rt(r),null;if(h=(r.flags&128)!==0,g=s.rendering,g===null)if(h)Sa(s,!1);else{if(ut!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(g=ds(t),g!==null){for(r.flags|=128,Sa(s,!1),t=g.updateQueue,r.updateQueue=t,_s(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)hm(a,t),a=a.sibling;return T(dt,dt.current&1|2),Be&&li(r,s.treeForkCount),r.child}t=t.sibling}s.tail!==null&&St()>Ms&&(r.flags|=128,h=!0,Sa(s,!1),r.lanes=4194304)}else{if(!h)if(t=ds(g),t!==null){if(r.flags|=128,h=!0,t=t.updateQueue,r.updateQueue=t,_s(r,t),Sa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!g.alternate&&!Be)return rt(r),null}else 2*St()-s.renderingStartTime>Ms&&a!==536870912&&(r.flags|=128,h=!0,Sa(s,!1),r.lanes=4194304);s.isBackwards?(g.sibling=r.child,r.child=g):(t=s.last,t!==null?t.sibling=g:r.child=g,s.last=g)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=St(),t.sibling=null,a=dt.current,T(dt,h?a&1|2:a&1),Be&&li(r,s.treeForkCount),t):(rt(r),null);case 22:case 23:return rn(r),nf(),s=r.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(r.flags|=8192):s&&(r.flags|=8192),s?(a&536870912)!==0&&(r.flags&128)===0&&(rt(r),r.subtreeFlags&6&&(r.flags|=8192)):rt(r),a=r.updateQueue,a!==null&&_s(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==a&&(r.flags|=2048),t!==null&&V(vr),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),oi(mt),rt(r),null;case 25:return null;case 30:return null}throw Error(l(156,r.tag))}function GS(t,r){switch(Ic(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return oi(mt),pe(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return _e(r),null;case 31:if(r.memoizedState!==null){if(rn(r),r.alternate===null)throw Error(l(340));yr()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(rn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(l(340));yr()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return V(dt),null;case 4:return pe(),null;case 10:return oi(r.type),null;case 22:case 23:return rn(r),nf(),t!==null&&V(vr),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return oi(mt),null;case 25:return null;default:return null}}function qg(t,r){switch(Ic(r),r.tag){case 3:oi(mt),pe();break;case 26:case 27:case 5:_e(r);break;case 4:pe();break;case 31:r.memoizedState!==null&&rn(r);break;case 13:rn(r);break;case 19:V(dt);break;case 10:oi(r.type);break;case 22:case 23:rn(r),nf(),t!==null&&V(vr);break;case 24:oi(mt)}}function Ea(t,r){try{var a=r.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var h=s.next;a=h;do{if((a.tag&t)===t){s=void 0;var g=a.create,v=a.inst;s=g(),v.destroy=s}a=a.next}while(a!==h)}}catch(N){Pe(r,r.return,N)}}function Ii(t,r,a){try{var s=r.updateQueue,h=s!==null?s.lastEffect:null;if(h!==null){var g=h.next;s=g;do{if((s.tag&t)===t){var v=s.inst,N=v.destroy;if(N!==void 0){v.destroy=void 0,h=r;var q=a,J=N;try{J()}catch(le){Pe(h,q,le)}}}s=s.next}while(s!==g)}}catch(le){Pe(r,r.return,le)}}function Ig(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{zm(r,a)}catch(s){Pe(t,t.return,s)}}}function Vg(t,r,a){a.props=_r(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(s){Pe(t,r,s)}}function ka(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof a=="function"?t.refCleanup=a(s):a.current=s}}catch(h){Pe(t,r,h)}}function qn(t,r){var a=t.ref,s=t.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(h){Pe(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Pe(t,r,h)}else a.current=null}function Yg(t){var r=t.type,a=t.memoizedProps,s=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(h){Pe(t,t.return,h)}}function jf(t,r,a){try{var s=t.stateNode;m2(s,t.type,a,r),s[Ot]=r}catch(h){Pe(t,t.return,h)}}function Xg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Zi(t.type)||t.tag===4}function Lf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Xg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Zi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Bf(t,r,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=ni));else if(s!==4&&(s===27&&Zi(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(Bf(t,r,a),t=t.sibling;t!==null;)Bf(t,r,a),t=t.sibling}function Cs(t,r,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(s!==4&&(s===27&&Zi(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Cs(t,r,a),t=t.sibling;t!==null;)Cs(t,r,a),t=t.sibling}function $g(t){var r=t.stateNode,a=t.memoizedProps;try{for(var s=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);Mt(r,s,a),r[Et]=t,r[Ot]=a}catch(g){Pe(t,t.return,g)}}var di=!1,xt=!1,Hf=!1,Fg=typeof WeakSet=="function"?WeakSet:Set,_t=null;function ZS(t,r){if(t=t.containerInfo,ld=Gs,t=rm(t),Mc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var h=s.anchorOffset,g=s.focusNode;s=s.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var v=0,N=-1,q=-1,J=0,le=0,oe=t,ee=null;t:for(;;){for(var ie;oe!==a||h!==0&&oe.nodeType!==3||(N=v+h),oe!==g||s!==0&&oe.nodeType!==3||(q=v+s),oe.nodeType===3&&(v+=oe.nodeValue.length),(ie=oe.firstChild)!==null;)ee=oe,oe=ie;for(;;){if(oe===t)break t;if(ee===a&&++J===h&&(N=v),ee===g&&++le===s&&(q=v),(ie=oe.nextSibling)!==null)break;oe=ee,ee=oe.parentNode}oe=ie}a=N===-1||q===-1?null:{start:N,end:q}}else a=null}a=a||{start:0,end:0}}else a=null;for(ad={focusedElem:t,selectionRange:a},Gs=!1,_t=r;_t!==null;)if(r=_t,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,_t=t;else for(;_t!==null;){switch(r=_t,g=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)h=t[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,a=r,h=g.memoizedProps,g=g.memoizedState,s=a.stateNode;try{var me=_r(a.type,h);t=s.getSnapshotBeforeUpdate(me,g),s.__reactInternalSnapshotBeforeUpdate=t}catch(Se){Pe(a,a.return,Se)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)ud(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":ud(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=r.sibling,t!==null){t.return=r.return,_t=t;break}_t=r.return}}function Gg(t,r,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:pi(t,a),s&4&&Ea(5,a);break;case 1:if(pi(t,a),s&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(v){Pe(a,a.return,v)}else{var h=_r(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(v){Pe(a,a.return,v)}}s&64&&Ig(a),s&512&&ka(a,a.return);break;case 3:if(pi(t,a),s&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{zm(t,r)}catch(v){Pe(a,a.return,v)}}break;case 27:r===null&&s&4&&$g(a);case 26:case 5:pi(t,a),r===null&&s&4&&Yg(a),s&512&&ka(a,a.return);break;case 12:pi(t,a);break;case 31:pi(t,a),s&4&&Pg(t,a);break;case 13:pi(t,a),s&4&&Kg(t,a),s&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=i2.bind(null,a),E2(t,a))));break;case 22:if(s=a.memoizedState!==null||di,!s){r=r!==null&&r.memoizedState!==null||xt,h=di;var g=xt;di=s,(xt=r)&&!g?mi(t,a,(a.subtreeFlags&8772)!==0):pi(t,a),di=h,xt=g}break;case 30:break;default:pi(t,a)}}function Zg(t){var r=t.alternate;r!==null&&(t.alternate=null,Zg(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Pl(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var lt=null,Xt=!1;function hi(t,r,a){for(a=a.child;a!==null;)Qg(t,r,a),a=a.sibling}function Qg(t,r,a){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Ct,a)}catch{}switch(a.tag){case 26:xt||qn(a,r),hi(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:xt||qn(a,r);var s=lt,h=Xt;Zi(a.type)&&(lt=a.stateNode,Xt=!1),hi(t,r,a),Oa(a.stateNode),lt=s,Xt=h;break;case 5:xt||qn(a,r);case 6:if(s=lt,h=Xt,lt=null,hi(t,r,a),lt=s,Xt=h,lt!==null)if(Xt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(a.stateNode)}catch(g){Pe(a,r,g)}else try{lt.removeChild(a.stateNode)}catch(g){Pe(a,r,g)}break;case 18:lt!==null&&(Xt?(t=lt,Iy(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),kl(t)):Iy(lt,a.stateNode));break;case 4:s=lt,h=Xt,lt=a.stateNode.containerInfo,Xt=!0,hi(t,r,a),lt=s,Xt=h;break;case 0:case 11:case 14:case 15:Ii(2,a,r),xt||Ii(4,a,r),hi(t,r,a);break;case 1:xt||(qn(a,r),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Vg(a,r,s)),hi(t,r,a);break;case 21:hi(t,r,a);break;case 22:xt=(s=xt)||a.memoizedState!==null,hi(t,r,a),xt=s;break;default:hi(t,r,a)}}function Pg(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{kl(t)}catch(a){Pe(r,r.return,a)}}}function Kg(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{kl(t)}catch(a){Pe(r,r.return,a)}}function QS(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Fg),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Fg),r;default:throw Error(l(435,t.tag))}}function Ns(t,r){var a=QS(t);r.forEach(function(s){if(!a.has(s)){a.add(s);var h=r2.bind(null,t,s);s.then(h,h)}})}function $t(t,r){var a=r.deletions;if(a!==null)for(var s=0;s<a.length;s++){var h=a[s],g=t,v=r,N=v;e:for(;N!==null;){switch(N.tag){case 27:if(Zi(N.type)){lt=N.stateNode,Xt=!1;break e}break;case 5:lt=N.stateNode,Xt=!1;break e;case 3:case 4:lt=N.stateNode.containerInfo,Xt=!0;break e}N=N.return}if(lt===null)throw Error(l(160));Qg(g,v,h),lt=null,Xt=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Jg(r,t),r=r.sibling}var Nn=null;function Jg(t,r){var a=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:$t(r,t),Ft(t),s&4&&(Ii(3,t,t.return),Ea(3,t),Ii(5,t,t.return));break;case 1:$t(r,t),Ft(t),s&512&&(xt||a===null||qn(a,a.return)),s&64&&di&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var h=Nn;if($t(r,t),Ft(t),s&512&&(xt||a===null||qn(a,a.return)),s&4){var g=a!==null?a.memoizedState:null;if(s=t.memoizedState,a===null)if(s===null)if(t.stateNode===null){e:{s=t.type,a=t.memoizedProps,h=h.ownerDocument||h;t:switch(s){case"title":g=h.getElementsByTagName("title")[0],(!g||g[ur]||g[Et]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(s),h.head.insertBefore(g,h.querySelector("head > title"))),Mt(g,s,a),g[Et]=t,pt(g),s=g;break e;case"link":var v=Jy("link","href",h).get(s+(a.href||""));if(v){for(var N=0;N<v.length;N++)if(g=v[N],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(N,1);break t}}g=h.createElement(s),Mt(g,s,a),h.head.appendChild(g);break;case"meta":if(v=Jy("meta","content",h).get(s+(a.content||""))){for(N=0;N<v.length;N++)if(g=v[N],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(N,1);break t}}g=h.createElement(s),Mt(g,s,a),h.head.appendChild(g);break;default:throw Error(l(468,s))}g[Et]=t,pt(g),s=g}t.stateNode=s}else Wy(h,t.type,t.stateNode);else t.stateNode=Ky(h,s,t.memoizedProps);else g!==s?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,s===null?Wy(h,t.type,t.stateNode):Ky(h,s,t.memoizedProps)):s===null&&t.stateNode!==null&&jf(t,t.memoizedProps,a.memoizedProps)}break;case 27:$t(r,t),Ft(t),s&512&&(xt||a===null||qn(a,a.return)),a!==null&&s&4&&jf(t,t.memoizedProps,a.memoizedProps);break;case 5:if($t(r,t),Ft(t),s&512&&(xt||a===null||qn(a,a.return)),t.flags&32){h=t.stateNode;try{Gr(h,"")}catch(me){Pe(t,t.return,me)}}s&4&&t.stateNode!=null&&(h=t.memoizedProps,jf(t,h,a!==null?a.memoizedProps:h)),s&1024&&(Hf=!0);break;case 6:if($t(r,t),Ft(t),s&4){if(t.stateNode===null)throw Error(l(162));s=t.memoizedProps,a=t.stateNode;try{a.nodeValue=s}catch(me){Pe(t,t.return,me)}}break;case 3:if(Ys=null,h=Nn,Nn=Is(r.containerInfo),$t(r,t),Nn=h,Ft(t),s&4&&a!==null&&a.memoizedState.isDehydrated)try{kl(r.containerInfo)}catch(me){Pe(t,t.return,me)}Hf&&(Hf=!1,Wg(t));break;case 4:s=Nn,Nn=Is(t.stateNode.containerInfo),$t(r,t),Ft(t),Nn=s;break;case 12:$t(r,t),Ft(t);break;case 31:$t(r,t),Ft(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ns(t,s)));break;case 13:$t(r,t),Ft(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(As=St()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ns(t,s)));break;case 22:h=t.memoizedState!==null;var q=a!==null&&a.memoizedState!==null,J=di,le=xt;if(di=J||h,xt=le||q,$t(r,t),xt=le,di=J,Ft(t),s&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(a===null||q||di||xt||Cr(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){q=a=r;try{if(g=q.stateNode,h)v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{N=q.stateNode;var oe=q.memoizedProps.style,ee=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(me){Pe(q,q.return,me)}}}else if(r.tag===6){if(a===null){q=r;try{q.stateNode.nodeValue=h?"":q.memoizedProps}catch(me){Pe(q,q.return,me)}}}else if(r.tag===18){if(a===null){q=r;try{var ie=q.stateNode;h?Vy(ie,!0):Vy(q.stateNode,!1)}catch(me){Pe(q,q.return,me)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}s&4&&(s=t.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Ns(t,a))));break;case 19:$t(r,t),Ft(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ns(t,s)));break;case 30:break;case 21:break;default:$t(r,t),Ft(t)}}function Ft(t){var r=t.flags;if(r&2){try{for(var a,s=t.return;s!==null;){if(Xg(s)){a=s;break}s=s.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var h=a.stateNode,g=Lf(t);Cs(t,g,h);break;case 5:var v=a.stateNode;a.flags&32&&(Gr(v,""),a.flags&=-33);var N=Lf(t);Cs(t,N,v);break;case 3:case 4:var q=a.stateNode.containerInfo,J=Lf(t);Bf(t,J,q);break;default:throw Error(l(161))}}catch(le){Pe(t,t.return,le)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Wg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;Wg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function pi(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Gg(t,r.alternate,r),r=r.sibling}function Cr(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:Ii(4,r,r.return),Cr(r);break;case 1:qn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&Vg(r,r.return,a),Cr(r);break;case 27:Oa(r.stateNode);case 26:case 5:qn(r,r.return),Cr(r);break;case 22:r.memoizedState===null&&Cr(r);break;case 30:Cr(r);break;default:Cr(r)}t=t.sibling}}function mi(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var s=r.alternate,h=t,g=r,v=g.flags;switch(g.tag){case 0:case 11:case 15:mi(h,g,a),Ea(4,g);break;case 1:if(mi(h,g,a),s=g,h=s.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(J){Pe(s,s.return,J)}if(s=g,h=s.updateQueue,h!==null){var N=s.stateNode;try{var q=h.shared.hiddenCallbacks;if(q!==null)for(h.shared.hiddenCallbacks=null,h=0;h<q.length;h++)Mm(q[h],N)}catch(J){Pe(s,s.return,J)}}a&&v&64&&Ig(g),ka(g,g.return);break;case 27:$g(g);case 26:case 5:mi(h,g,a),a&&s===null&&v&4&&Yg(g),ka(g,g.return);break;case 12:mi(h,g,a);break;case 31:mi(h,g,a),a&&v&4&&Pg(h,g);break;case 13:mi(h,g,a),a&&v&4&&Kg(h,g);break;case 22:g.memoizedState===null&&mi(h,g,a),ka(g,g.return);break;case 30:break;default:mi(h,g,a)}r=r.sibling}}function Uf(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&ca(a))}function qf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&ca(t))}function Tn(t,r,a,s){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ey(t,r,a,s),r=r.sibling}function ey(t,r,a,s){var h=r.flags;switch(r.tag){case 0:case 11:case 15:Tn(t,r,a,s),h&2048&&Ea(9,r);break;case 1:Tn(t,r,a,s);break;case 3:Tn(t,r,a,s),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&ca(t)));break;case 12:if(h&2048){Tn(t,r,a,s),t=r.stateNode;try{var g=r.memoizedProps,v=g.id,N=g.onPostCommit;typeof N=="function"&&N(v,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(q){Pe(r,r.return,q)}}else Tn(t,r,a,s);break;case 31:Tn(t,r,a,s);break;case 13:Tn(t,r,a,s);break;case 23:break;case 22:g=r.stateNode,v=r.alternate,r.memoizedState!==null?g._visibility&2?Tn(t,r,a,s):_a(t,r):g._visibility&2?Tn(t,r,a,s):(g._visibility|=2,hl(t,r,a,s,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Uf(v,r);break;case 24:Tn(t,r,a,s),h&2048&&qf(r.alternate,r);break;default:Tn(t,r,a,s)}}function hl(t,r,a,s,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var g=t,v=r,N=a,q=s,J=v.flags;switch(v.tag){case 0:case 11:case 15:hl(g,v,N,q,h),Ea(8,v);break;case 23:break;case 22:var le=v.stateNode;v.memoizedState!==null?le._visibility&2?hl(g,v,N,q,h):_a(g,v):(le._visibility|=2,hl(g,v,N,q,h)),h&&J&2048&&Uf(v.alternate,v);break;case 24:hl(g,v,N,q,h),h&&J&2048&&qf(v.alternate,v);break;default:hl(g,v,N,q,h)}r=r.sibling}}function _a(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,s=r,h=s.flags;switch(s.tag){case 22:_a(a,s),h&2048&&Uf(s.alternate,s);break;case 24:_a(a,s),h&2048&&qf(s.alternate,s);break;default:_a(a,s)}r=r.sibling}}var Ca=8192;function pl(t,r,a){if(t.subtreeFlags&Ca)for(t=t.child;t!==null;)ty(t,r,a),t=t.sibling}function ty(t,r,a){switch(t.tag){case 26:pl(t,r,a),t.flags&Ca&&t.memoizedState!==null&&j2(a,Nn,t.memoizedState,t.memoizedProps);break;case 5:pl(t,r,a);break;case 3:case 4:var s=Nn;Nn=Is(t.stateNode.containerInfo),pl(t,r,a),Nn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Ca,Ca=16777216,pl(t,r,a),Ca=s):pl(t,r,a));break;default:pl(t,r,a)}}function ny(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Na(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var s=r[a];_t=s,ry(s,t)}ny(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)iy(t),t=t.sibling}function iy(t){switch(t.tag){case 0:case 11:case 15:Na(t),t.flags&2048&&Ii(9,t,t.return);break;case 3:Na(t);break;case 12:Na(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Ts(t)):Na(t);break;default:Na(t)}}function Ts(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var s=r[a];_t=s,ry(s,t)}ny(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:Ii(8,r,r.return),Ts(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,Ts(r));break;default:Ts(r)}t=t.sibling}}function ry(t,r){for(;_t!==null;){var a=_t;switch(a.tag){case 0:case 11:case 15:Ii(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:ca(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,_t=s;else e:for(a=t;_t!==null;){s=_t;var h=s.sibling,g=s.return;if(Zg(s),s===a){_t=null;break e}if(h!==null){h.return=g,_t=h;break e}_t=g}}}var PS={getCacheForType:function(t){var r=Tt(mt),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a},cacheSignal:function(){return Tt(mt).controller.signal}},KS=typeof WeakMap=="function"?WeakMap:Map,Fe=0,et=null,De=null,je=0,Qe=0,ln=null,Vi=!1,ml=!1,If=!1,gi=0,ut=0,Yi=0,Nr=0,Vf=0,an=0,gl=0,Ta=null,Gt=null,Yf=!1,As=0,ly=0,Ms=1/0,zs=null,Xi=null,kt=0,$i=null,yl=null,yi=0,Xf=0,$f=null,ay=null,Aa=0,Ff=null;function on(){return(Fe&2)!==0&&je!==0?je&-je:M.T!==null?Jf():jo()}function oy(){if(an===0)if((je&536870912)===0||Be){var t=qr;qr<<=1,(qr&3932160)===0&&(qr=262144),an=t}else an=536870912;return t=nn.current,t!==null&&(t.flags|=32),an}function Zt(t,r,a){(t===et&&(Qe===2||Qe===9)||t.cancelPendingCommit!==null)&&(xl(t,0),Fi(t,je,an,!1)),sr(t,a),((Fe&2)===0||t!==et)&&(t===et&&((Fe&2)===0&&(Nr|=a),ut===4&&Fi(t,je,an,!1)),In(t))}function sy(t,r,a){if((Fe&6)!==0)throw Error(l(327));var s=!a&&(r&127)===0&&(r&t.expiredLanes)===0||or(t,r),h=s?e2(t,r):Zf(t,r,!0),g=s;do{if(h===0){ml&&!s&&Fi(t,r,0,!1);break}else{if(a=t.current.alternate,g&&!JS(a)){h=Zf(t,r,!1),g=!1;continue}if(h===2){if(g=r,t.errorRecoveryDisabledLanes&g)var v=0;else v=t.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var N=t;h=Ta;var q=N.current.memoizedState.isDehydrated;if(q&&(xl(N,v).flags|=256),v=Zf(N,v,!1),v!==2){if(If&&!q){N.errorRecoveryDisabledLanes|=g,Nr|=g,h=4;break e}g=Gt,Gt=h,g!==null&&(Gt===null?Gt=g:Gt.push.apply(Gt,g))}h=v}if(g=!1,h!==2)continue}}if(h===1){xl(t,0),Fi(t,r,0,!0);break}e:{switch(s=t,g=h,g){case 0:case 1:throw Error(l(345));case 4:if((r&4194048)!==r)break;case 6:Fi(s,r,an,!Vi);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((r&62914560)===r&&(h=As+300-St(),10<h)){if(Fi(s,r,an,!Vi),Vr(s,0,!0)!==0)break e;yi=r,s.timeoutHandle=Uy(uy.bind(null,s,a,Gt,zs,Yf,r,an,Nr,gl,Vi,g,"Throttled",-0,0),h);break e}uy(s,a,Gt,zs,Yf,r,an,Nr,gl,Vi,g,null,-0,0)}}break}while(!0);In(t)}function uy(t,r,a,s,h,g,v,N,q,J,le,oe,ee,ie){if(t.timeoutHandle=-1,oe=r.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ni},ty(r,g,oe);var me=(g&62914560)===g?As-St():(g&4194048)===g?ly-St():0;if(me=L2(oe,me),me!==null){yi=g,t.cancelPendingCommit=me(yy.bind(null,t,r,g,a,s,h,v,N,q,le,oe,null,ee,ie)),Fi(t,g,v,!J);return}}yy(t,r,g,a,s,h,v,N,q)}function JS(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var h=a[s],g=h.getSnapshot;h=h.value;try{if(!en(g(),h))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Fi(t,r,a,s){r&=~Vf,r&=~Nr,t.suspendedLanes|=r,t.pingedLanes&=~r,s&&(t.warmLanes|=r),s=t.expirationTimes;for(var h=r;0<h;){var g=31-Ze(h),v=1<<g;s[g]=-1,h&=~v}a!==0&&Do(t,a,r)}function Ds(){return(Fe&6)===0?(Ma(0),!1):!0}function Gf(){if(De!==null){if(Qe===0)var t=De.return;else t=De,ai=xr=null,uf(t),sl=null,da=0,t=De;for(;t!==null;)qg(t.alternate,t),t=t.return;De=null}}function xl(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,x2(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),yi=0,Gf(),et=t,De=a=ri(t.current,null),je=r,Qe=0,ln=null,Vi=!1,ml=or(t,r),If=!1,gl=an=Vf=Nr=Yi=ut=0,Gt=Ta=null,Yf=!1,(r&8)!==0&&(r|=r&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=r;0<s;){var h=31-Ze(s),g=1<<h;r|=t[h],s&=~g}return gi=r,Wo(),a}function cy(t,r){Ne=null,M.H=va,r===ol||r===os?(r=Cm(),Qe=3):r===Pc?(r=Cm(),Qe=4):Qe=r===_f?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ln=r,De===null&&(ut=1,ws(t,pn(r,t.current)))}function fy(){var t=nn.current;return t===null?!0:(je&4194048)===je?xn===null:(je&62914560)===je||(je&536870912)!==0?t===xn:!1}function dy(){var t=M.H;return M.H=va,t===null?va:t}function hy(){var t=M.A;return M.A=PS,t}function Os(){ut=4,Vi||(je&4194048)!==je&&nn.current!==null||(ml=!0),(Yi&134217727)===0&&(Nr&134217727)===0||et===null||Fi(et,je,an,!1)}function Zf(t,r,a){var s=Fe;Fe|=2;var h=dy(),g=hy();(et!==t||je!==r)&&(zs=null,xl(t,r)),r=!1;var v=ut;e:do try{if(Qe!==0&&De!==null){var N=De,q=ln;switch(Qe){case 8:Gf(),v=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(r=!0);var J=Qe;if(Qe=0,ln=null,bl(t,N,q,J),a&&ml){v=0;break e}break;default:J=Qe,Qe=0,ln=null,bl(t,N,q,J)}}WS(),v=ut;break}catch(le){cy(t,le)}while(!0);return r&&t.shellSuspendCounter++,ai=xr=null,Fe=s,M.H=h,M.A=g,De===null&&(et=null,je=0,Wo()),v}function WS(){for(;De!==null;)py(De)}function e2(t,r){var a=Fe;Fe|=2;var s=dy(),h=hy();et!==t||je!==r?(zs=null,Ms=St()+500,xl(t,r)):ml=or(t,r);e:do try{if(Qe!==0&&De!==null){r=De;var g=ln;t:switch(Qe){case 1:Qe=0,ln=null,bl(t,r,g,1);break;case 2:case 9:if(km(g)){Qe=0,ln=null,my(r);break}r=function(){Qe!==2&&Qe!==9||et!==t||(Qe=7),In(t)},g.then(r,r);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:km(g)?(Qe=0,ln=null,my(r)):(Qe=0,ln=null,bl(t,r,g,7));break;case 5:var v=null;switch(De.tag){case 26:v=De.memoizedState;case 5:case 27:var N=De;if(v?e0(v):N.stateNode.complete){Qe=0,ln=null;var q=N.sibling;if(q!==null)De=q;else{var J=N.return;J!==null?(De=J,Rs(J)):De=null}break t}}Qe=0,ln=null,bl(t,r,g,5);break;case 6:Qe=0,ln=null,bl(t,r,g,6);break;case 8:Gf(),ut=6;break e;default:throw Error(l(462))}}t2();break}catch(le){cy(t,le)}while(!0);return ai=xr=null,M.H=s,M.A=h,Fe=a,De!==null?0:(et=null,je=0,Wo(),ut)}function t2(){for(;De!==null&&!Pn();)py(De)}function py(t){var r=Hg(t.alternate,t,gi);t.memoizedProps=t.pendingProps,r===null?Rs(t):De=r}function my(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=Dg(a,r,r.pendingProps,r.type,void 0,je);break;case 11:r=Dg(a,r,r.pendingProps,r.type.render,r.ref,je);break;case 5:uf(r);default:qg(a,r),r=De=hm(r,gi),r=Hg(a,r,gi)}t.memoizedProps=t.pendingProps,r===null?Rs(t):De=r}function bl(t,r,a,s){ai=xr=null,uf(r),sl=null,da=0;var h=r.return;try{if(YS(t,h,r,a,je)){ut=1,ws(t,pn(a,t.current)),De=null;return}}catch(g){if(h!==null)throw De=h,g;ut=1,ws(t,pn(a,t.current)),De=null;return}r.flags&32768?(Be||s===1?t=!0:ml||(je&536870912)!==0?t=!1:(Vi=t=!0,(s===2||s===9||s===3||s===6)&&(s=nn.current,s!==null&&s.tag===13&&(s.flags|=16384))),gy(r,t)):Rs(r)}function Rs(t){var r=t;do{if((r.flags&32768)!==0){gy(r,Vi);return}t=r.return;var a=FS(r.alternate,r,gi);if(a!==null){De=a;return}if(r=r.sibling,r!==null){De=r;return}De=r=t}while(r!==null);ut===0&&(ut=5)}function gy(t,r){do{var a=GS(t.alternate,t);if(a!==null){a.flags&=32767,De=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){De=t;return}De=t=a}while(t!==null);ut=6,De=null}function yy(t,r,a,s,h,g,v,N,q){t.cancelPendingCommit=null;do js();while(kt!==0);if((Fe&6)!==0)throw Error(l(327));if(r!==null){if(r===t.current)throw Error(l(177));if(g=r.lanes|r.childLanes,g|=jc,fc(t,a,g,v,N,q),t===et&&(De=et=null,je=0),yl=r,$i=t,yi=a,Xf=g,$f=h,ay=s,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,l2(we,function(){return Sy(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||s){s=M.T,M.T=null,h=H.p,H.p=2,v=Fe,Fe|=4;try{ZS(t,r,a)}finally{Fe=v,H.p=h,M.T=s}}kt=1,xy(),by(),vy()}}function xy(){if(kt===1){kt=0;var t=$i,r=yl,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var s=H.p;H.p=2;var h=Fe;Fe|=4;try{Jg(r,t);var g=ad,v=rm(t.containerInfo),N=g.focusedElem,q=g.selectionRange;if(v!==N&&N&&N.ownerDocument&&im(N.ownerDocument.documentElement,N)){if(q!==null&&Mc(N)){var J=q.start,le=q.end;if(le===void 0&&(le=J),"selectionStart"in N)N.selectionStart=J,N.selectionEnd=Math.min(le,N.value.length);else{var oe=N.ownerDocument||document,ee=oe&&oe.defaultView||window;if(ee.getSelection){var ie=ee.getSelection(),me=N.textContent.length,Se=Math.min(q.start,me),We=q.end===void 0?Se:Math.min(q.end,me);!ie.extend&&Se>We&&(v=We,We=Se,Se=v);var Z=nm(N,Se),F=nm(N,We);if(Z&&F&&(ie.rangeCount!==1||ie.anchorNode!==Z.node||ie.anchorOffset!==Z.offset||ie.focusNode!==F.node||ie.focusOffset!==F.offset)){var K=oe.createRange();K.setStart(Z.node,Z.offset),ie.removeAllRanges(),Se>We?(ie.addRange(K),ie.extend(F.node,F.offset)):(K.setEnd(F.node,F.offset),ie.addRange(K))}}}}for(oe=[],ie=N;ie=ie.parentNode;)ie.nodeType===1&&oe.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<oe.length;N++){var ae=oe[N];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}Gs=!!ld,ad=ld=null}finally{Fe=h,H.p=s,M.T=a}}t.current=r,kt=2}}function by(){if(kt===2){kt=0;var t=$i,r=yl,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var s=H.p;H.p=2;var h=Fe;Fe|=4;try{Gg(t,r.alternate,r)}finally{Fe=h,H.p=s,M.T=a}}kt=3}}function vy(){if(kt===4||kt===3){kt=0,Kn();var t=$i,r=yl,a=yi,s=ay;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?kt=5:(kt=0,yl=$i=null,wy(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(Xi=null),Ql(a),r=r.stateNode,ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(Ct,r,void 0,(r.current.flags&128)===128)}catch{}if(s!==null){r=M.T,h=H.p,H.p=2,M.T=null;try{for(var g=t.onRecoverableError,v=0;v<s.length;v++){var N=s[v];g(N.value,{componentStack:N.stack})}}finally{M.T=r,H.p=h}}(yi&3)!==0&&js(),In(t),h=t.pendingLanes,(a&261930)!==0&&(h&42)!==0?t===Ff?Aa++:(Aa=0,Ff=t):Aa=0,Ma(0)}}function wy(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,ca(r)))}function js(){return xy(),by(),vy(),Sy()}function Sy(){if(kt!==5)return!1;var t=$i,r=Xf;Xf=0;var a=Ql(yi),s=M.T,h=H.p;try{H.p=32>a?32:a,M.T=null,a=$f,$f=null;var g=$i,v=yi;if(kt=0,yl=$i=null,yi=0,(Fe&6)!==0)throw Error(l(331));var N=Fe;if(Fe|=4,iy(g.current),ey(g,g.current,v,a),Fe=N,Ma(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Ct,g)}catch{}return!0}finally{H.p=h,M.T=s,wy(t,r)}}function Ey(t,r,a){r=pn(a,r),r=kf(t.stateNode,r,2),t=Hi(t,r,2),t!==null&&(sr(t,2),In(t))}function Pe(t,r,a){if(t.tag===3)Ey(t,t,a);else for(;r!==null;){if(r.tag===3){Ey(r,t,a);break}else if(r.tag===1){var s=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Xi===null||!Xi.has(s))){t=pn(a,t),a=kg(2),s=Hi(r,a,2),s!==null&&(_g(a,s,r,t),sr(s,2),In(s));break}}r=r.return}}function Qf(t,r,a){var s=t.pingCache;if(s===null){s=t.pingCache=new KS;var h=new Set;s.set(r,h)}else h=s.get(r),h===void 0&&(h=new Set,s.set(r,h));h.has(a)||(If=!0,h.add(a),t=n2.bind(null,t,r,a),r.then(t,t))}function n2(t,r,a){var s=t.pingCache;s!==null&&s.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,et===t&&(je&a)===a&&(ut===4||ut===3&&(je&62914560)===je&&300>St()-As?(Fe&2)===0&&xl(t,0):Vf|=a,gl===je&&(gl=0)),In(t)}function ky(t,r){r===0&&(r=zo()),t=mr(t,r),t!==null&&(sr(t,r),In(t))}function i2(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),ky(t,a)}function r2(t,r){var a=0;switch(t.tag){case 31:case 13:var s=t.stateNode,h=t.memoizedState;h!==null&&(a=h.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(r),ky(t,a)}function l2(t,r){return qt(t,r)}var Ls=null,vl=null,Pf=!1,Bs=!1,Kf=!1,Gi=0;function In(t){t!==vl&&t.next===null&&(vl===null?Ls=vl=t:vl=vl.next=t),Bs=!0,Pf||(Pf=!0,o2())}function Ma(t,r){if(!Kf&&Bs){Kf=!0;do for(var a=!1,s=Ls;s!==null;){if(t!==0){var h=s.pendingLanes;if(h===0)var g=0;else{var v=s.suspendedLanes,N=s.pingedLanes;g=(1<<31-Ze(42|t)+1)-1,g&=h&~(v&~N),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,Ty(s,g))}else g=je,g=Vr(s,s===et?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||or(s,g)||(a=!0,Ty(s,g));s=s.next}while(a);Kf=!1}}function a2(){_y()}function _y(){Bs=Pf=!1;var t=0;Gi!==0&&y2()&&(t=Gi);for(var r=St(),a=null,s=Ls;s!==null;){var h=s.next,g=Cy(s,r);g===0?(s.next=null,a===null?Ls=h:a.next=h,h===null&&(vl=a)):(a=s,(t!==0||(g&3)!==0)&&(Bs=!0)),s=h}kt!==0&&kt!==5||Ma(t),Gi!==0&&(Gi=0)}function Cy(t,r){for(var a=t.suspendedLanes,s=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var v=31-Ze(g),N=1<<v,q=h[v];q===-1?((N&a)===0||(N&s)!==0)&&(h[v]=cc(N,r)):q<=r&&(t.expiredLanes|=N),g&=~N}if(r=et,a=je,a=Vr(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,a===0||t===r&&(Qe===2||Qe===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&En(s),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||or(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(s!==null&&En(s),Ql(a)){case 2:case 8:a=he;break;case 32:a=we;break;case 268435456:a=Ue;break;default:a=we}return s=Ny.bind(null,t),a=qt(a,s),t.callbackPriority=r,t.callbackNode=a,r}return s!==null&&s!==null&&En(s),t.callbackPriority=2,t.callbackNode=null,2}function Ny(t,r){if(kt!==0&&kt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(js()&&t.callbackNode!==a)return null;var s=je;return s=Vr(t,t===et?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(sy(t,s,r),Cy(t,St()),t.callbackNode!=null&&t.callbackNode===a?Ny.bind(null,t):null)}function Ty(t,r){if(js())return null;sy(t,r,!0)}function o2(){b2(function(){(Fe&6)!==0?qt(re,a2):_y()})}function Jf(){if(Gi===0){var t=ll;t===0&&(t=Ur,Ur<<=1,(Ur&261888)===0&&(Ur=256)),Gi=t}return Gi}function Ay(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:$o(""+t)}function My(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function s2(t,r,a,s,h){if(r==="submit"&&a&&a.stateNode===h){var g=Ay((h[Ot]||null).action),v=s.submitter;v&&(r=(r=v[Ot]||null)?Ay(r.formAction):v.getAttribute("formAction"),r!==null&&(g=r,v=null));var N=new Qo("action","action",null,s,h);t.push({event:N,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Gi!==0){var q=v?My(h,v):new FormData(h);xf(a,{pending:!0,data:q,method:h.method,action:g},null,q)}}else typeof g=="function"&&(N.preventDefault(),q=v?My(h,v):new FormData(h),xf(a,{pending:!0,data:q,method:h.method,action:g},g,q))},currentTarget:h}]})}}for(var Wf=0;Wf<Rc.length;Wf++){var ed=Rc[Wf],u2=ed.toLowerCase(),c2=ed[0].toUpperCase()+ed.slice(1);Cn(u2,"on"+c2)}Cn(om,"onAnimationEnd"),Cn(sm,"onAnimationIteration"),Cn(um,"onAnimationStart"),Cn("dblclick","onDoubleClick"),Cn("focusin","onFocus"),Cn("focusout","onBlur"),Cn(CS,"onTransitionRun"),Cn(NS,"onTransitionStart"),Cn(TS,"onTransitionCancel"),Cn(cm,"onTransitionEnd"),Mi("onMouseEnter",["mouseout","mouseover"]),Mi("onMouseLeave",["mouseout","mouseover"]),Mi("onPointerEnter",["pointerout","pointerover"]),Mi("onPointerLeave",["pointerout","pointerover"]),ei("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ei("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ei("onBeforeInput",["compositionend","keypress","textInput","paste"]),ei("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ei("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ei("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var za="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(" "),f2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(za));function zy(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var s=t[a],h=s.event;s=s.listeners;e:{var g=void 0;if(r)for(var v=s.length-1;0<=v;v--){var N=s[v],q=N.instance,J=N.currentTarget;if(N=N.listener,q!==g&&h.isPropagationStopped())break e;g=N,h.currentTarget=J;try{g(h)}catch(le){Jo(le)}h.currentTarget=null,g=q}else for(v=0;v<s.length;v++){if(N=s[v],q=N.instance,J=N.currentTarget,N=N.listener,q!==g&&h.isPropagationStopped())break e;g=N,h.currentTarget=J;try{g(h)}catch(le){Jo(le)}h.currentTarget=null,g=q}}}}function Oe(t,r){var a=r[Yr];a===void 0&&(a=r[Yr]=new Set);var s=t+"__bubble";a.has(s)||(Dy(r,t,2,!1),a.add(s))}function td(t,r,a){var s=0;r&&(s|=4),Dy(a,t,s,r)}var Hs="_reactListening"+Math.random().toString(36).slice(2);function nd(t){if(!t[Hs]){t[Hs]=!0,Uo.forEach(function(a){a!=="selectionchange"&&(f2.has(a)||td(a,!1,t),td(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Hs]||(r[Hs]=!0,td("selectionchange",!1,r))}}function Dy(t,r,a,s){switch(o0(r)){case 2:var h=U2;break;case 8:h=q2;break;default:h=yd}a=h.bind(null,r,a,t),h=void 0,!wc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),s?h!==void 0?t.addEventListener(r,a,{capture:!0,passive:h}):t.addEventListener(r,a,!0):h!==void 0?t.addEventListener(r,a,{passive:h}):t.addEventListener(r,a,!1)}function id(t,r,a,s,h){var g=s;if((r&1)===0&&(r&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var N=s.stateNode.containerInfo;if(N===h)break;if(v===4)for(v=s.return;v!==null;){var q=v.tag;if((q===3||q===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;N!==null;){if(v=Ci(N),v===null)return;if(q=v.tag,q===5||q===6||q===26||q===27){s=g=v;continue e}N=N.parentNode}}s=s.return}Bp(function(){var J=g,le=bc(a),oe=[];e:{var ee=fm.get(t);if(ee!==void 0){var ie=Qo,me=t;switch(t){case"keypress":if(Go(a)===0)break e;case"keydown":case"keyup":ie=rS;break;case"focusin":me="focus",ie=_c;break;case"focusout":me="blur",ie=_c;break;case"beforeblur":case"afterblur":ie=_c;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=qp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=Fw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=oS;break;case om:case sm:case um:ie=Qw;break;case cm:ie=uS;break;case"scroll":case"scrollend":ie=Xw;break;case"wheel":ie=fS;break;case"copy":case"cut":case"paste":ie=Kw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=Vp;break;case"toggle":case"beforetoggle":ie=hS}var Se=(r&4)!==0,We=!Se&&(t==="scroll"||t==="scrollend"),Z=Se?ee!==null?ee+"Capture":null:ee;Se=[];for(var F=J,K;F!==null;){var ae=F;if(K=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||K===null||Z===null||(ae=Wl(F,Z),ae!=null&&Se.push(Da(F,ae,K))),We)break;F=F.return}0<Se.length&&(ee=new ie(ee,me,null,a,le),oe.push({event:ee,listeners:Se}))}}if((r&7)===0){e:{if(ee=t==="mouseover"||t==="pointerover",ie=t==="mouseout"||t==="pointerout",ee&&a!==xc&&(me=a.relatedTarget||a.fromElement)&&(Ci(me)||me[Wn]))break e;if((ie||ee)&&(ee=le.window===le?le:(ee=le.ownerDocument)?ee.defaultView||ee.parentWindow:window,ie?(me=a.relatedTarget||a.toElement,ie=J,me=me?Ci(me):null,me!==null&&(We=u(me),Se=me.tag,me!==We||Se!==5&&Se!==27&&Se!==6)&&(me=null)):(ie=null,me=J),ie!==me)){if(Se=qp,ae="onMouseLeave",Z="onMouseEnter",F="mouse",(t==="pointerout"||t==="pointerover")&&(Se=Vp,ae="onPointerLeave",Z="onPointerEnter",F="pointer"),We=ie==null?ee:Ti(ie),K=me==null?ee:Ti(me),ee=new Se(ae,F+"leave",ie,a,le),ee.target=We,ee.relatedTarget=K,ae=null,Ci(le)===J&&(Se=new Se(Z,F+"enter",me,a,le),Se.target=K,Se.relatedTarget=We,ae=Se),We=ae,ie&&me)t:{for(Se=d2,Z=ie,F=me,K=0,ae=Z;ae;ae=Se(ae))K++;ae=0;for(var xe=F;xe;xe=Se(xe))ae++;for(;0<K-ae;)Z=Se(Z),K--;for(;0<ae-K;)F=Se(F),ae--;for(;K--;){if(Z===F||F!==null&&Z===F.alternate){Se=Z;break t}Z=Se(Z),F=Se(F)}Se=null}else Se=null;ie!==null&&Oy(oe,ee,ie,Se,!1),me!==null&&We!==null&&Oy(oe,We,me,Se,!0)}}e:{if(ee=J?Ti(J):window,ie=ee.nodeName&&ee.nodeName.toLowerCase(),ie==="select"||ie==="input"&&ee.type==="file")var Ye=Pp;else if(Zp(ee))if(Kp)Ye=ES;else{Ye=wS;var ge=vS}else ie=ee.nodeName,!ie||ie.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?J&&yc(J.elementType)&&(Ye=Pp):Ye=SS;if(Ye&&(Ye=Ye(t,J))){Qp(oe,Ye,a,le);break e}ge&&ge(t,ee,J),t==="focusout"&&J&&ee.type==="number"&&J.memoizedProps.value!=null&&Jl(ee,"number",ee.value)}switch(ge=J?Ti(J):window,t){case"focusin":(Zp(ge)||ge.contentEditable==="true")&&(Kr=ge,zc=J,oa=null);break;case"focusout":oa=zc=Kr=null;break;case"mousedown":Dc=!0;break;case"contextmenu":case"mouseup":case"dragend":Dc=!1,lm(oe,a,le);break;case"selectionchange":if(_S)break;case"keydown":case"keyup":lm(oe,a,le)}var Te;if(Nc)e:{switch(t){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Pr?Fp(t,a)&&(Le="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Le="onCompositionStart");Le&&(Yp&&a.locale!=="ko"&&(Pr||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Pr&&(Te=Hp()):(zi=le,Sc="value"in zi?zi.value:zi.textContent,Pr=!0)),ge=Us(J,Le),0<ge.length&&(Le=new Ip(Le,t,null,a,le),oe.push({event:Le,listeners:ge}),Te?Le.data=Te:(Te=Gp(a),Te!==null&&(Le.data=Te)))),(Te=mS?gS(t,a):yS(t,a))&&(Le=Us(J,"onBeforeInput"),0<Le.length&&(ge=new Ip("onBeforeInput","beforeinput",null,a,le),oe.push({event:ge,listeners:Le}),ge.data=Te)),s2(oe,t,J,a,le)}zy(oe,r)})}function Da(t,r,a){return{instance:t,listener:r,currentTarget:a}}function Us(t,r){for(var a=r+"Capture",s=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Wl(t,a),h!=null&&s.unshift(Da(t,h,g)),h=Wl(t,r),h!=null&&s.push(Da(t,h,g))),t.tag===3)return s;t=t.return}return[]}function d2(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Oy(t,r,a,s,h){for(var g=r._reactName,v=[];a!==null&&a!==s;){var N=a,q=N.alternate,J=N.stateNode;if(N=N.tag,q!==null&&q===s)break;N!==5&&N!==26&&N!==27||J===null||(q=J,h?(J=Wl(a,g),J!=null&&v.unshift(Da(a,J,q))):h||(J=Wl(a,g),J!=null&&v.push(Da(a,J,q)))),a=a.return}v.length!==0&&t.push({event:r,listeners:v})}var h2=/\r\n?/g,p2=/\u0000|\uFFFD/g;function Ry(t){return(typeof t=="string"?t:""+t).replace(h2,`
9
+ `).replace(p2,"")}function jy(t,r){return r=Ry(r),Ry(t)===r}function Je(t,r,a,s,h,g){switch(a){case"children":typeof s=="string"?r==="body"||r==="textarea"&&s===""||Gr(t,s):(typeof s=="number"||typeof s=="bigint")&&r!=="body"&&Gr(t,""+s);break;case"className":$r(t,"class",s);break;case"tabIndex":$r(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":$r(t,a,s);break;case"style":jp(t,s,g);break;case"data":if(r!=="object"){$r(t,"data",s);break}case"src":case"href":if(s===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=$o(""+s),t.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(a,"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 g=="function"&&(a==="formAction"?(r!=="input"&&Je(t,r,"name",h.name,h,null),Je(t,r,"formEncType",h.formEncType,h,null),Je(t,r,"formMethod",h.formMethod,h,null),Je(t,r,"formTarget",h.formTarget,h,null)):(Je(t,r,"encType",h.encType,h,null),Je(t,r,"method",h.method,h,null),Je(t,r,"target",h.target,h,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=$o(""+s),t.setAttribute(a,s);break;case"onClick":s!=null&&(t.onclick=ni);break;case"onScroll":s!=null&&Oe("scroll",t);break;case"onScrollEnd":s!=null&&Oe("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(h.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}a=$o(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""+s):t.removeAttribute(a);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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":s===!0?t.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,s):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(a,s):t.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(a):t.setAttribute(a,s);break;case"popover":Oe("beforetoggle",t),Oe("toggle",t),Xr(t,"popover",s);break;case"xlinkActuate":_n(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":_n(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":_n(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":_n(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":_n(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":_n(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":_n(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":_n(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":_n(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Xr(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Vw.get(a)||a,Xr(t,a,s))}}function rd(t,r,a,s,h,g){switch(a){case"style":jp(t,s,g);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(h.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof s=="string"?Gr(t,s):(typeof s=="number"||typeof s=="bigint")&&Gr(t,""+s);break;case"onScroll":s!=null&&Oe("scroll",t);break;case"onScrollEnd":s!=null&&Oe("scrollend",t);break;case"onClick":s!=null&&(t.onclick=ni);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qo.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),r=a.slice(2,h?a.length-7:void 0),g=t[Ot]||null,g=g!=null?g[a]:null,typeof g=="function"&&t.removeEventListener(r,g,h),typeof s=="function")){typeof g!="function"&&g!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,s,h);break e}a in t?t[a]=s:s===!0?t.setAttribute(a,""):Xr(t,a,s)}}}function Mt(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",t),Oe("load",t);var s=!1,h=!1,g;for(g in a)if(a.hasOwnProperty(g)){var v=a[g];if(v!=null)switch(g){case"src":s=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Je(t,r,g,v,a,null)}}h&&Je(t,r,"srcSet",a.srcSet,a,null),s&&Je(t,r,"src",a.src,a,null);return;case"input":Oe("invalid",t);var N=g=v=h=null,q=null,J=null;for(s in a)if(a.hasOwnProperty(s)){var le=a[s];if(le!=null)switch(s){case"name":h=le;break;case"type":v=le;break;case"checked":q=le;break;case"defaultChecked":J=le;break;case"value":g=le;break;case"defaultValue":N=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(l(137,r));break;default:Je(t,r,s,le,a,null)}}Xo(t,g,N,q,J,v,h,!1);return;case"select":Oe("invalid",t),s=v=g=null;for(h in a)if(a.hasOwnProperty(h)&&(N=a[h],N!=null))switch(h){case"value":g=N;break;case"defaultValue":v=N;break;case"multiple":s=N;default:Je(t,r,h,N,a,null)}r=g,a=v,t.multiple=!!s,r!=null?ti(t,!!s,r,!1):a!=null&&ti(t,!!s,a,!0);return;case"textarea":Oe("invalid",t),g=h=s=null;for(v in a)if(a.hasOwnProperty(v)&&(N=a[v],N!=null))switch(v){case"value":s=N;break;case"defaultValue":h=N;break;case"children":g=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(l(91));break;default:Je(t,r,v,N,a,null)}Op(t,s,h,g);return;case"option":for(q in a)a.hasOwnProperty(q)&&(s=a[q],s!=null)&&(q==="selected"?t.selected=s&&typeof s!="function"&&typeof s!="symbol":Je(t,r,q,s,a,null));return;case"dialog":Oe("beforetoggle",t),Oe("toggle",t),Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":Oe("load",t);break;case"video":case"audio":for(s=0;s<za.length;s++)Oe(za[s],t);break;case"image":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"embed":case"source":case"link":Oe("error",t),Oe("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in a)if(a.hasOwnProperty(J)&&(s=a[J],s!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Je(t,r,J,s,a,null)}return;default:if(yc(r)){for(le in a)a.hasOwnProperty(le)&&(s=a[le],s!==void 0&&rd(t,r,le,s,a,void 0));return}}for(N in a)a.hasOwnProperty(N)&&(s=a[N],s!=null&&Je(t,r,N,s,a,null))}function m2(t,r,a,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,v=null,N=null,q=null,J=null,le=null;for(ie in a){var oe=a[ie];if(a.hasOwnProperty(ie)&&oe!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":q=oe;default:s.hasOwnProperty(ie)||Je(t,r,ie,null,s,oe)}}for(var ee in s){var ie=s[ee];if(oe=a[ee],s.hasOwnProperty(ee)&&(ie!=null||oe!=null))switch(ee){case"type":g=ie;break;case"name":h=ie;break;case"checked":J=ie;break;case"defaultChecked":le=ie;break;case"value":v=ie;break;case"defaultValue":N=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(l(137,r));break;default:ie!==oe&&Je(t,r,ee,ie,s,oe)}}fr(t,v,N,q,J,le,g,h);return;case"select":ie=v=N=ee=null;for(g in a)if(q=a[g],a.hasOwnProperty(g)&&q!=null)switch(g){case"value":break;case"multiple":ie=q;default:s.hasOwnProperty(g)||Je(t,r,g,null,s,q)}for(h in s)if(g=s[h],q=a[h],s.hasOwnProperty(h)&&(g!=null||q!=null))switch(h){case"value":ee=g;break;case"defaultValue":N=g;break;case"multiple":v=g;default:g!==q&&Je(t,r,h,g,s,q)}r=N,a=v,s=ie,ee!=null?ti(t,!!a,ee,!1):!!s!=!!a&&(r!=null?ti(t,!!a,r,!0):ti(t,!!a,a?[]:"",!1));return;case"textarea":ie=ee=null;for(N in a)if(h=a[N],a.hasOwnProperty(N)&&h!=null&&!s.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Je(t,r,N,null,s,h)}for(v in s)if(h=s[v],g=a[v],s.hasOwnProperty(v)&&(h!=null||g!=null))switch(v){case"value":ee=h;break;case"defaultValue":ie=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(l(91));break;default:h!==g&&Je(t,r,v,h,s,g)}Dp(t,ee,ie);return;case"option":for(var me in a)ee=a[me],a.hasOwnProperty(me)&&ee!=null&&!s.hasOwnProperty(me)&&(me==="selected"?t.selected=!1:Je(t,r,me,null,s,ee));for(q in s)ee=s[q],ie=a[q],s.hasOwnProperty(q)&&ee!==ie&&(ee!=null||ie!=null)&&(q==="selected"?t.selected=ee&&typeof ee!="function"&&typeof ee!="symbol":Je(t,r,q,ee,s,ie));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 Se in a)ee=a[Se],a.hasOwnProperty(Se)&&ee!=null&&!s.hasOwnProperty(Se)&&Je(t,r,Se,null,s,ee);for(J in s)if(ee=s[J],ie=a[J],s.hasOwnProperty(J)&&ee!==ie&&(ee!=null||ie!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(l(137,r));break;default:Je(t,r,J,ee,s,ie)}return;default:if(yc(r)){for(var We in a)ee=a[We],a.hasOwnProperty(We)&&ee!==void 0&&!s.hasOwnProperty(We)&&rd(t,r,We,void 0,s,ee);for(le in s)ee=s[le],ie=a[le],!s.hasOwnProperty(le)||ee===ie||ee===void 0&&ie===void 0||rd(t,r,le,ee,s,ie);return}}for(var Z in a)ee=a[Z],a.hasOwnProperty(Z)&&ee!=null&&!s.hasOwnProperty(Z)&&Je(t,r,Z,null,s,ee);for(oe in s)ee=s[oe],ie=a[oe],!s.hasOwnProperty(oe)||ee===ie||ee==null&&ie==null||Je(t,r,oe,ee,s,ie)}function Ly(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function g2(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var h=a[s],g=h.transferSize,v=h.initiatorType,N=h.duration;if(g&&N&&Ly(v)){for(v=0,N=h.responseEnd,s+=1;s<a.length;s++){var q=a[s],J=q.startTime;if(J>N)break;var le=q.transferSize,oe=q.initiatorType;le&&Ly(oe)&&(q=q.responseEnd,v+=le*(q<N?1:(N-J)/(q-J)))}if(--s,r+=8*(g+v)/(h.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var ld=null,ad=null;function qs(t){return t.nodeType===9?t:t.ownerDocument}function By(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hy(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function od(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var sd=null;function y2(){var t=window.event;return t&&t.type==="popstate"?t===sd?!1:(sd=t,!0):(sd=null,!1)}var Uy=typeof setTimeout=="function"?setTimeout:void 0,x2=typeof clearTimeout=="function"?clearTimeout:void 0,qy=typeof Promise=="function"?Promise:void 0,b2=typeof queueMicrotask=="function"?queueMicrotask:typeof qy<"u"?function(t){return qy.resolve(null).then(t).catch(v2)}:Uy;function v2(t){setTimeout(function(){throw t})}function Zi(t){return t==="head"}function Iy(t,r){var a=r,s=0;do{var h=a.nextSibling;if(t.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(s===0){t.removeChild(h),kl(r);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")Oa(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Oa(a);for(var g=a.firstChild;g;){var v=g.nextSibling,N=g.nodeName;g[ur]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=v}}else a==="body"&&Oa(t.ownerDocument.body);a=h}while(a);kl(r)}function Vy(t,r){var a=t;t=0;do{var s=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=s}while(a)}function ud(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":ud(a),Pl(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function w2(t,r,a,s){for(;t.nodeType===1;){var h=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[ur])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=bn(t.nextSibling),t===null)break}return null}function S2(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=bn(t.nextSibling),t===null))return null;return t}function Yy(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=bn(t.nextSibling),t===null))return null;return t}function cd(t){return t.data==="$?"||t.data==="$~"}function fd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function E2(t,r){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||a.readyState!=="loading")r();else{var s=function(){r(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function bn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var dd=null;function Xy(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(r===0)return bn(t.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}t=t.nextSibling}return null}function $y(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return t;r--}else a!=="/$"&&a!=="/&"||r++}t=t.previousSibling}return null}function Fy(t,r,a){switch(r=qs(a),t){case"html":if(t=r.documentElement,!t)throw Error(l(452));return t;case"head":if(t=r.head,!t)throw Error(l(453));return t;case"body":if(t=r.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Oa(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Pl(t)}var vn=new Map,Gy=new Set;function Is(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var xi=H.d;H.d={f:k2,r:_2,D:C2,C:N2,L:T2,m:A2,X:z2,S:M2,M:D2};function k2(){var t=xi.f(),r=Ds();return t||r}function _2(t){var r=Ni(t);r!==null&&r.tag===5&&r.type==="form"?cg(r):xi.r(t)}var wl=typeof document>"u"?null:document;function Zy(t,r,a){var s=wl;if(s&&typeof r=="string"&&r){var h=Vt(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),Gy.has(h)||(Gy.add(h),t={rel:t,crossOrigin:a,href:r},s.querySelector(h)===null&&(r=s.createElement("link"),Mt(r,"link",t),pt(r),s.head.appendChild(r)))}}function C2(t){xi.D(t),Zy("dns-prefetch",t,null)}function N2(t,r){xi.C(t,r),Zy("preconnect",t,r)}function T2(t,r,a){xi.L(t,r,a);var s=wl;if(s&&t&&r){var h='link[rel="preload"][as="'+Vt(r)+'"]';r==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Vt(a.imageSizes)+'"]')):h+='[href="'+Vt(t)+'"]';var g=h;switch(r){case"style":g=Sl(t);break;case"script":g=El(t)}vn.has(g)||(t=m({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),vn.set(g,t),s.querySelector(h)!==null||r==="style"&&s.querySelector(Ra(g))||r==="script"&&s.querySelector(ja(g))||(r=s.createElement("link"),Mt(r,"link",t),pt(r),s.head.appendChild(r)))}}function A2(t,r){xi.m(t,r);var a=wl;if(a&&t){var s=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Vt(s)+'"][href="'+Vt(t)+'"]',g=h;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=El(t)}if(!vn.has(g)&&(t=m({rel:"modulepreload",href:t},r),vn.set(g,t),a.querySelector(h)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ja(g)))return}s=a.createElement("link"),Mt(s,"link",t),pt(s),a.head.appendChild(s)}}}function M2(t,r,a){xi.S(t,r,a);var s=wl;if(s&&t){var h=Ai(s).hoistableStyles,g=Sl(t);r=r||"default";var v=h.get(g);if(!v){var N={loading:0,preload:null};if(v=s.querySelector(Ra(g)))N.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},a),(a=vn.get(g))&&hd(t,a);var q=v=s.createElement("link");pt(q),Mt(q,"link",t),q._p=new Promise(function(J,le){q.onload=J,q.onerror=le}),q.addEventListener("load",function(){N.loading|=1}),q.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Vs(v,r,s)}v={type:"stylesheet",instance:v,count:1,state:N},h.set(g,v)}}}function z2(t,r){xi.X(t,r);var a=wl;if(a&&t){var s=Ai(a).hoistableScripts,h=El(t),g=s.get(h);g||(g=a.querySelector(ja(h)),g||(t=m({src:t,async:!0},r),(r=vn.get(h))&&pd(t,r),g=a.createElement("script"),pt(g),Mt(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(h,g))}}function D2(t,r){xi.M(t,r);var a=wl;if(a&&t){var s=Ai(a).hoistableScripts,h=El(t),g=s.get(h);g||(g=a.querySelector(ja(h)),g||(t=m({src:t,async:!0,type:"module"},r),(r=vn.get(h))&&pd(t,r),g=a.createElement("script"),pt(g),Mt(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(h,g))}}function Qy(t,r,a,s){var h=(h=ce.current)?Is(h):null;if(!h)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=Sl(a.href),a=Ai(h).hoistableStyles,s=a.get(r),s||(s={type:"style",instance:null,count:0,state:null},a.set(r,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Sl(a.href);var g=Ai(h).hoistableStyles,v=g.get(t);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,v),(g=h.querySelector(Ra(t)))&&!g._p&&(v.instance=g,v.state.loading=5),vn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},vn.set(t,a),g||O2(h,t,a,v.state))),r&&s===null)throw Error(l(528,""));return v}if(r&&s!==null)throw Error(l(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=El(a),a=Ai(h).hoistableScripts,s=a.get(r),s||(s={type:"script",instance:null,count:0,state:null},a.set(r,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Sl(t){return'href="'+Vt(t)+'"'}function Ra(t){return'link[rel="stylesheet"]['+t+"]"}function Py(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function O2(t,r,a,s){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?s.loading=1:(r=t.createElement("link"),s.preload=r,r.addEventListener("load",function(){return s.loading|=1}),r.addEventListener("error",function(){return s.loading|=2}),Mt(r,"link",a),pt(r),t.head.appendChild(r))}function El(t){return'[src="'+Vt(t)+'"]'}function ja(t){return"script[async]"+t}function Ky(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var s=t.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(s)return r.instance=s,pt(s),s;var h=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),pt(s),Mt(s,"style",h),Vs(s,a.precedence,t),r.instance=s;case"stylesheet":h=Sl(a.href);var g=t.querySelector(Ra(h));if(g)return r.state.loading|=4,r.instance=g,pt(g),g;s=Py(a),(h=vn.get(h))&&hd(s,h),g=(t.ownerDocument||t).createElement("link"),pt(g);var v=g;return v._p=new Promise(function(N,q){v.onload=N,v.onerror=q}),Mt(g,"link",s),r.state.loading|=4,Vs(g,a.precedence,t),r.instance=g;case"script":return g=El(a.src),(h=t.querySelector(ja(g)))?(r.instance=h,pt(h),h):(s=a,(h=vn.get(g))&&(s=m({},a),pd(s,h)),t=t.ownerDocument||t,h=t.createElement("script"),pt(h),Mt(h,"link",s),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(l(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(s=r.instance,r.state.loading|=4,Vs(s,a.precedence,t));return r.instance}function Vs(t,r,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=s.length?s[s.length-1]:null,g=h,v=0;v<s.length;v++){var N=s[v];if(N.dataset.precedence===r)g=N;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function hd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function pd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var Ys=null;function Jy(t,r,a){if(Ys===null){var s=new Map,h=Ys=new Map;h.set(a,s)}else h=Ys,s=h.get(a),s||(s=new Map,h.set(a,s));if(s.has(t))return s;for(s.set(t,null),a=a.getElementsByTagName(t),h=0;h<a.length;h++){var g=a[h];if(!(g[ur]||g[Et]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var v=g.getAttribute(r)||"";v=t+v;var N=s.get(v);N?N.push(g):s.set(v,[g])}}return s}function Wy(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function R2(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(t=r.disabled,typeof r.precedence=="string"&&t==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function e0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function j2(t,r,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=Sl(s.href),g=r.querySelector(Ra(h));if(g){r=g._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Xs.bind(t),r.then(t,t)),a.state.loading|=4,a.instance=g,pt(g);return}g=r.ownerDocument||r,s=Py(s),(h=vn.get(h))&&hd(s,h),g=g.createElement("link"),pt(g);var v=g;v._p=new Promise(function(N,q){v.onload=N,v.onerror=q}),Mt(g,"link",s),a.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=Xs.bind(t),r.addEventListener("load",a),r.addEventListener("error",a))}}var md=0;function L2(t,r){return t.stylesheets&&t.count===0&&Fs(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var s=setTimeout(function(){if(t.stylesheets&&Fs(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+r);0<t.imgBytes&&md===0&&(md=62500*g2());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Fs(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>md?50:800)+r);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(h)}}:null}function Xs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var $s=null;function Fs(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,$s=new Map,r.forEach(B2,t),$s=null,Xs.call(t))}function B2(t,r){if(!(r.state.loading&4)){var a=$s.get(t);if(a)var s=a.get(null);else{a=new Map,$s.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var v=h[g];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),s=v)}s&&a.set(null,s)}h=r.instance,v=h.getAttribute("data-precedence"),g=a.get(v)||s,g===s&&a.set(null,h),a.set(v,h),this.count++,s=Xs.bind(this),h.addEventListener("load",s),h.addEventListener("error",s),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var La={$$typeof:E,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function H2(t,r,a,s,h,g,v,N,q){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Gl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gl(0),this.hiddenUpdates=Gl(null),this.identifierPrefix=s,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function t0(t,r,a,s,h,g,v,N,q,J,le,oe){return t=new H2(t,r,a,v,q,J,le,oe,N),r=1,g===!0&&(r|=24),g=tn(3,null,null,r),t.current=g,g.stateNode=t,r=Gc(),r.refCount++,t.pooledCache=r,r.refCount++,g.memoizedState={element:s,isDehydrated:a,cache:r},Kc(g),t}function n0(t){return t?(t=el,t):el}function i0(t,r,a,s,h,g){h=n0(h),s.context===null?s.context=h:s.pendingContext=h,s=Bi(r),s.payload={element:a},g=g===void 0?null:g,g!==null&&(s.callback=g),a=Hi(t,s,r),a!==null&&(Zt(a,t,r),pa(a,t,r))}function r0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function gd(t,r){r0(t,r),(t=t.alternate)&&r0(t,r)}function l0(t){if(t.tag===13||t.tag===31){var r=mr(t,67108864);r!==null&&Zt(r,t,67108864),gd(t,67108864)}}function a0(t){if(t.tag===13||t.tag===31){var r=on();r=Zl(r);var a=mr(t,r);a!==null&&Zt(a,t,r),gd(t,r)}}var Gs=!0;function U2(t,r,a,s){var h=M.T;M.T=null;var g=H.p;try{H.p=2,yd(t,r,a,s)}finally{H.p=g,M.T=h}}function q2(t,r,a,s){var h=M.T;M.T=null;var g=H.p;try{H.p=8,yd(t,r,a,s)}finally{H.p=g,M.T=h}}function yd(t,r,a,s){if(Gs){var h=xd(s);if(h===null)id(t,r,s,Zs,a),s0(t,s);else if(V2(h,t,r,a,s))s.stopPropagation();else if(s0(t,s),r&4&&-1<I2.indexOf(t)){for(;h!==null;){var g=Ni(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var v=Jn(g.pendingLanes);if(v!==0){var N=g;for(N.pendingLanes|=2,N.entangledLanes|=2;v;){var q=1<<31-Ze(v);N.entanglements[1]|=q,v&=~q}In(g),(Fe&6)===0&&(Ms=St()+500,Ma(0))}}break;case 31:case 13:N=mr(g,2),N!==null&&Zt(N,g,2),Ds(),gd(g,2)}if(g=xd(s),g===null&&id(t,r,s,Zs,a),g===h)break;h=g}h!==null&&s.stopPropagation()}else id(t,r,s,null,a)}}function xd(t){return t=bc(t),bd(t)}var Zs=null;function bd(t){if(Zs=null,t=Ci(t),t!==null){var r=u(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=c(r),t!==null)return t;t=null}else if(a===31){if(t=f(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return Zs=t,null}function o0(t){switch(t){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(_i()){case re:return 2;case he:return 8;case we:case Me:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var vd=!1,Qi=null,Pi=null,Ki=null,Ba=new Map,Ha=new Map,Ji=[],I2="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 s0(t,r){switch(t){case"focusin":case"focusout":Qi=null;break;case"dragenter":case"dragleave":Pi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":Ba.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ha.delete(r.pointerId)}}function Ua(t,r,a,s,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:a,eventSystemFlags:s,nativeEvent:g,targetContainers:[h]},r!==null&&(r=Ni(r),r!==null&&l0(r)),t):(t.eventSystemFlags|=s,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function V2(t,r,a,s,h){switch(r){case"focusin":return Qi=Ua(Qi,t,r,a,s,h),!0;case"dragenter":return Pi=Ua(Pi,t,r,a,s,h),!0;case"mouseover":return Ki=Ua(Ki,t,r,a,s,h),!0;case"pointerover":var g=h.pointerId;return Ba.set(g,Ua(Ba.get(g)||null,t,r,a,s,h)),!0;case"gotpointercapture":return g=h.pointerId,Ha.set(g,Ua(Ha.get(g)||null,t,r,a,s,h)),!0}return!1}function u0(t){var r=Ci(t.target);if(r!==null){var a=u(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){t.blockedOn=r,Lo(t.priority,function(){a0(a)});return}}else if(r===31){if(r=f(a),r!==null){t.blockedOn=r,Lo(t.priority,function(){a0(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Qs(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=xd(t.nativeEvent);if(a===null){a=t.nativeEvent;var s=new a.constructor(a.type,a);xc=s,a.target.dispatchEvent(s),xc=null}else return r=Ni(a),r!==null&&l0(r),t.blockedOn=a,!1;r.shift()}return!0}function c0(t,r,a){Qs(t)&&a.delete(r)}function Y2(){vd=!1,Qi!==null&&Qs(Qi)&&(Qi=null),Pi!==null&&Qs(Pi)&&(Pi=null),Ki!==null&&Qs(Ki)&&(Ki=null),Ba.forEach(c0),Ha.forEach(c0)}function Ps(t,r){t.blockedOn===r&&(t.blockedOn=null,vd||(vd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Y2)))}var Ks=null;function f0(t){Ks!==t&&(Ks=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ks===t&&(Ks=null);for(var r=0;r<t.length;r+=3){var a=t[r],s=t[r+1],h=t[r+2];if(typeof s!="function"){if(bd(s||a)===null)continue;break}var g=Ni(a);g!==null&&(t.splice(r,3),r-=3,xf(g,{pending:!0,data:h,method:a.method,action:s},s,h))}}))}function kl(t){function r(q){return Ps(q,t)}Qi!==null&&Ps(Qi,t),Pi!==null&&Ps(Pi,t),Ki!==null&&Ps(Ki,t),Ba.forEach(r),Ha.forEach(r);for(var a=0;a<Ji.length;a++){var s=Ji[a];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Ji.length&&(a=Ji[0],a.blockedOn===null);)u0(a),a.blockedOn===null&&Ji.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var h=a[s],g=a[s+1],v=h[Ot]||null;if(typeof g=="function")v||f0(a);else if(v){var N=null;if(g&&g.hasAttribute("formAction")){if(h=g,v=g[Ot]||null)N=v.formAction;else if(bd(h)!==null)continue}else N=v.action;typeof N=="function"?a[s+1]=N:(a.splice(s,3),s-=3),f0(a)}}}function d0(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function wd(t){this._internalRoot=t}Js.prototype.render=wd.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(l(409));var a=r.current,s=on();i0(a,s,t,r,null,null)},Js.prototype.unmount=wd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;i0(t.current,2,null,t,null,null),Ds(),r[Wn]=null}};function Js(t){this._internalRoot=t}Js.prototype.unstable_scheduleHydration=function(t){if(t){var r=jo();t={blockedOn:null,target:t,priority:r};for(var a=0;a<Ji.length&&r!==0&&r<Ji[a].priority;a++);Ji.splice(a,0,t),a===0&&u0(t)}};var h0=n.version;if(h0!=="19.2.3")throw Error(l(527,h0,"19.2.3"));H.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=d(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var X2={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ws=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ws.isDisabled&&Ws.supportsFiber)try{Ct=Ws.inject(X2),ft=Ws}catch{}}return Ia.createRoot=function(t,r){if(!o(t))throw Error(l(299));var a=!1,s="",h=vg,g=wg,v=Sg;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=t0(t,1,!1,null,null,a,s,null,h,g,v,d0),t[Wn]=r.current,nd(t),new wd(r)},Ia.hydrateRoot=function(t,r,a){if(!o(t))throw Error(l(299));var s=!1,h="",g=vg,v=wg,N=Sg,q=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError),a.formState!==void 0&&(q=a.formState)),r=t0(t,1,!0,r,a??null,s,h,q,g,v,N,d0),r.context=n0(null),a=r.current,s=on(),s=Zl(s),h=Bi(s),h.callback=null,Hi(a,h,s),a=s,r.current.lanes=a,sr(r,a),In(r),t[Wn]=r.current,nd(t),new Js(r)},Ia.version="19.2.3",Ia}var E0;function W2(){if(E0)return kd.exports;E0=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(n){console.error(n)}}return e(),kd.exports=J2(),kd.exports}var eE=W2();function wt(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let i=0,l;i<e.length;i++)(l=wt(e[i]))!==""&&(n+=(n&&" ")+l);else for(let i in e)e[i]&&(n+=(n&&" ")+i);return n}var tE={value:()=>{}};function Vu(){for(var e=0,n=arguments.length,i={},l;e<n;++e){if(!(l=arguments[e]+"")||l in i||/[\s.]/.test(l))throw new Error("illegal type: "+l);i[l]=[]}return new mu(i)}function mu(e){this._=e}function nE(e,n){return e.trim().split(/^|\s+/).map(function(i){var l="",o=i.indexOf(".");if(o>=0&&(l=i.slice(o+1),i=i.slice(0,o)),i&&!n.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:l}})}mu.prototype=Vu.prototype={constructor:mu,on:function(e,n){var i=this._,l=nE(e+"",i),o,u=-1,c=l.length;if(arguments.length<2){for(;++u<c;)if((o=(e=l[u]).type)&&(o=iE(i[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++u<c;)if(o=(e=l[u]).type)i[o]=k0(i[o],e.name,n);else if(n==null)for(o in i)i[o]=k0(i[o],e.name,null);return this},copy:function(){var e={},n=this._;for(var i in n)e[i]=n[i].slice();return new mu(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var i=new Array(o),l=0,o,u;l<o;++l)i[l]=arguments[l+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(u=this._[e],l=0,o=u.length;l<o;++l)u[l].value.apply(n,i)},apply:function(e,n,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var l=this._[e],o=0,u=l.length;o<u;++o)l[o].value.apply(n,i)}};function iE(e,n){for(var i=0,l=e.length,o;i<l;++i)if((o=e[i]).name===n)return o.value}function k0(e,n,i){for(var l=0,o=e.length;l<o;++l)if(e[l].name===n){e[l]=tE,e=e.slice(0,l).concat(e.slice(l+1));break}return i!=null&&e.push({name:n,value:i}),e}var oh="http://www.w3.org/1999/xhtml";const _0={svg:"http://www.w3.org/2000/svg",xhtml:oh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yu(e){var n=e+="",i=n.indexOf(":");return i>=0&&(n=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),_0.hasOwnProperty(n)?{space:_0[n],local:e}:e}function rE(e){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===oh&&n.documentElement.namespaceURI===oh?n.createElement(e):n.createElementNS(i,e)}}function lE(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function A1(e){var n=Yu(e);return(n.local?lE:rE)(n)}function aE(){}function qh(e){return e==null?aE:function(){return this.querySelector(e)}}function oE(e){typeof e!="function"&&(e=qh(e));for(var n=this._groups,i=n.length,l=new Array(i),o=0;o<i;++o)for(var u=n[o],c=u.length,f=l[o]=new Array(c),p,d,y=0;y<c;++y)(p=u[y])&&(d=e.call(p,p.__data__,y,u))&&("__data__"in p&&(d.__data__=p.__data__),f[y]=d);return new dn(l,this._parents)}function sE(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function uE(){return[]}function M1(e){return e==null?uE:function(){return this.querySelectorAll(e)}}function cE(e){return function(){return sE(e.apply(this,arguments))}}function fE(e){typeof e=="function"?e=cE(e):e=M1(e);for(var n=this._groups,i=n.length,l=[],o=[],u=0;u<i;++u)for(var c=n[u],f=c.length,p,d=0;d<f;++d)(p=c[d])&&(l.push(e.call(p,p.__data__,d,c)),o.push(p));return new dn(l,o)}function z1(e){return function(){return this.matches(e)}}function D1(e){return function(n){return n.matches(e)}}var dE=Array.prototype.find;function hE(e){return function(){return dE.call(this.children,e)}}function pE(){return this.firstElementChild}function mE(e){return this.select(e==null?pE:hE(typeof e=="function"?e:D1(e)))}var gE=Array.prototype.filter;function yE(){return Array.from(this.children)}function xE(e){return function(){return gE.call(this.children,e)}}function bE(e){return this.selectAll(e==null?yE:xE(typeof e=="function"?e:D1(e)))}function vE(e){typeof e!="function"&&(e=z1(e));for(var n=this._groups,i=n.length,l=new Array(i),o=0;o<i;++o)for(var u=n[o],c=u.length,f=l[o]=[],p,d=0;d<c;++d)(p=u[d])&&e.call(p,p.__data__,d,u)&&f.push(p);return new dn(l,this._parents)}function O1(e){return new Array(e.length)}function wE(){return new dn(this._enter||this._groups.map(O1),this._parents)}function _u(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}_u.prototype={constructor:_u,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function SE(e){return function(){return e}}function EE(e,n,i,l,o,u){for(var c=0,f,p=n.length,d=u.length;c<d;++c)(f=n[c])?(f.__data__=u[c],l[c]=f):i[c]=new _u(e,u[c]);for(;c<p;++c)(f=n[c])&&(o[c]=f)}function kE(e,n,i,l,o,u,c){var f,p,d=new Map,y=n.length,m=u.length,x=new Array(y),b;for(f=0;f<y;++f)(p=n[f])&&(x[f]=b=c.call(p,p.__data__,f,n)+"",d.has(b)?o[f]=p:d.set(b,p));for(f=0;f<m;++f)b=c.call(e,u[f],f,u)+"",(p=d.get(b))?(l[f]=p,p.__data__=u[f],d.delete(b)):i[f]=new _u(e,u[f]);for(f=0;f<y;++f)(p=n[f])&&d.get(x[f])===p&&(o[f]=p)}function _E(e){return e.__data__}function CE(e,n){if(!arguments.length)return Array.from(this,_E);var i=n?kE:EE,l=this._parents,o=this._groups;typeof e!="function"&&(e=SE(e));for(var u=o.length,c=new Array(u),f=new Array(u),p=new Array(u),d=0;d<u;++d){var y=l[d],m=o[d],x=m.length,b=NE(e.call(y,y&&y.__data__,d,l)),w=b.length,_=f[d]=new Array(w),C=c[d]=new Array(w),k=p[d]=new Array(x);i(y,m,_,C,k,b,n);for(var j=0,E=0,D,U;j<w;++j)if(D=_[j]){for(j>=E&&(E=j+1);!(U=C[E])&&++E<w;);D._next=U||null}}return c=new dn(c,l),c._enter=f,c._exit=p,c}function NE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function TE(){return new dn(this._exit||this._groups.map(O1),this._parents)}function AE(e,n,i){var l=this.enter(),o=this,u=this.exit();return typeof e=="function"?(l=e(l),l&&(l=l.selection())):l=l.append(e+""),n!=null&&(o=n(o),o&&(o=o.selection())),i==null?u.remove():i(u),l&&o?l.merge(o).order():o}function ME(e){for(var n=e.selection?e.selection():e,i=this._groups,l=n._groups,o=i.length,u=l.length,c=Math.min(o,u),f=new Array(o),p=0;p<c;++p)for(var d=i[p],y=l[p],m=d.length,x=f[p]=new Array(m),b,w=0;w<m;++w)(b=d[w]||y[w])&&(x[w]=b);for(;p<o;++p)f[p]=i[p];return new dn(f,this._parents)}function zE(){for(var e=this._groups,n=-1,i=e.length;++n<i;)for(var l=e[n],o=l.length-1,u=l[o],c;--o>=0;)(c=l[o])&&(u&&c.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(c,u),u=c);return this}function DE(e){e||(e=OE);function n(m,x){return m&&x?e(m.__data__,x.__data__):!m-!x}for(var i=this._groups,l=i.length,o=new Array(l),u=0;u<l;++u){for(var c=i[u],f=c.length,p=o[u]=new Array(f),d,y=0;y<f;++y)(d=c[y])&&(p[y]=d);p.sort(n)}return new dn(o,this._parents).order()}function OE(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function RE(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function jE(){return Array.from(this)}function LE(){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var l=e[n],o=0,u=l.length;o<u;++o){var c=l[o];if(c)return c}return null}function BE(){let e=0;for(const n of this)++e;return e}function HE(){return!this.node()}function UE(e){for(var n=this._groups,i=0,l=n.length;i<l;++i)for(var o=n[i],u=0,c=o.length,f;u<c;++u)(f=o[u])&&e.call(f,f.__data__,u,o);return this}function qE(e){return function(){this.removeAttribute(e)}}function IE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VE(e,n){return function(){this.setAttribute(e,n)}}function YE(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function XE(e,n){return function(){var i=n.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function $E(e,n){return function(){var i=n.apply(this,arguments);i==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function FE(e,n){var i=Yu(e);if(arguments.length<2){var l=this.node();return i.local?l.getAttributeNS(i.space,i.local):l.getAttribute(i)}return this.each((n==null?i.local?IE:qE:typeof n=="function"?i.local?$E:XE:i.local?YE:VE)(i,n))}function R1(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function GE(e){return function(){this.style.removeProperty(e)}}function ZE(e,n,i){return function(){this.style.setProperty(e,n,i)}}function QE(e,n,i){return function(){var l=n.apply(this,arguments);l==null?this.style.removeProperty(e):this.style.setProperty(e,l,i)}}function PE(e,n,i){return arguments.length>1?this.each((n==null?GE:typeof n=="function"?QE:ZE)(e,n,i??"")):Rl(this.node(),e)}function Rl(e,n){return e.style.getPropertyValue(n)||R1(e).getComputedStyle(e,null).getPropertyValue(n)}function KE(e){return function(){delete this[e]}}function JE(e,n){return function(){this[e]=n}}function WE(e,n){return function(){var i=n.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function ek(e,n){return arguments.length>1?this.each((n==null?KE:typeof n=="function"?WE:JE)(e,n)):this.node()[e]}function j1(e){return e.trim().split(/^|\s+/)}function Ih(e){return e.classList||new L1(e)}function L1(e){this._node=e,this._names=j1(e.getAttribute("class")||"")}L1.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function B1(e,n){for(var i=Ih(e),l=-1,o=n.length;++l<o;)i.add(n[l])}function H1(e,n){for(var i=Ih(e),l=-1,o=n.length;++l<o;)i.remove(n[l])}function tk(e){return function(){B1(this,e)}}function nk(e){return function(){H1(this,e)}}function ik(e,n){return function(){(n.apply(this,arguments)?B1:H1)(this,e)}}function rk(e,n){var i=j1(e+"");if(arguments.length<2){for(var l=Ih(this.node()),o=-1,u=i.length;++o<u;)if(!l.contains(i[o]))return!1;return!0}return this.each((typeof n=="function"?ik:n?tk:nk)(i,n))}function lk(){this.textContent=""}function ak(e){return function(){this.textContent=e}}function ok(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function sk(e){return arguments.length?this.each(e==null?lk:(typeof e=="function"?ok:ak)(e)):this.node().textContent}function uk(){this.innerHTML=""}function ck(e){return function(){this.innerHTML=e}}function fk(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function dk(e){return arguments.length?this.each(e==null?uk:(typeof e=="function"?fk:ck)(e)):this.node().innerHTML}function hk(){this.nextSibling&&this.parentNode.appendChild(this)}function pk(){return this.each(hk)}function mk(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gk(){return this.each(mk)}function yk(e){var n=typeof e=="function"?e:A1(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function xk(){return null}function bk(e,n){var i=typeof e=="function"?e:A1(e),l=n==null?xk:typeof n=="function"?n:qh(n);return this.select(function(){return this.insertBefore(i.apply(this,arguments),l.apply(this,arguments)||null)})}function vk(){var e=this.parentNode;e&&e.removeChild(this)}function wk(){return this.each(vk)}function Sk(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Ek(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function kk(e){return this.select(e?Ek:Sk)}function _k(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ck(e){return function(n){e.call(this,n,this.__data__)}}function Nk(e){return e.trim().split(/^|\s+/).map(function(n){var i="",l=n.indexOf(".");return l>=0&&(i=n.slice(l+1),n=n.slice(0,l)),{type:n,name:i}})}function Tk(e){return function(){var n=this.__on;if(n){for(var i=0,l=-1,o=n.length,u;i<o;++i)u=n[i],(!e.type||u.type===e.type)&&u.name===e.name?this.removeEventListener(u.type,u.listener,u.options):n[++l]=u;++l?n.length=l:delete this.__on}}}function Ak(e,n,i){return function(){var l=this.__on,o,u=Ck(n);if(l){for(var c=0,f=l.length;c<f;++c)if((o=l[c]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=u,o.options=i),o.value=n;return}}this.addEventListener(e.type,u,i),o={type:e.type,name:e.name,value:n,listener:u,options:i},l?l.push(o):this.__on=[o]}}function Mk(e,n,i){var l=Nk(e+""),o,u=l.length,c;if(arguments.length<2){var f=this.node().__on;if(f){for(var p=0,d=f.length,y;p<d;++p)for(o=0,y=f[p];o<u;++o)if((c=l[o]).type===y.type&&c.name===y.name)return y.value}return}for(f=n?Ak:Tk,o=0;o<u;++o)this.each(f(l[o],n,i));return this}function U1(e,n,i){var l=R1(e),o=l.CustomEvent;typeof o=="function"?o=new o(n,i):(o=l.document.createEvent("Event"),i?(o.initEvent(n,i.bubbles,i.cancelable),o.detail=i.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}function zk(e,n){return function(){return U1(this,e,n)}}function Dk(e,n){return function(){return U1(this,e,n.apply(this,arguments))}}function Ok(e,n){return this.each((typeof n=="function"?Dk:zk)(e,n))}function*Rk(){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var l=e[n],o=0,u=l.length,c;o<u;++o)(c=l[o])&&(yield c)}var q1=[null];function dn(e,n){this._groups=e,this._parents=n}function vo(){return new dn([[document.documentElement]],q1)}function jk(){return this}dn.prototype=vo.prototype={constructor:dn,select:oE,selectAll:fE,selectChild:mE,selectChildren:bE,filter:vE,data:CE,enter:wE,exit:TE,join:AE,merge:ME,selection:jk,order:zE,sort:DE,call:RE,nodes:jE,node:LE,size:BE,empty:HE,each:UE,attr:FE,style:PE,property:ek,classed:rk,text:sk,html:dk,raise:pk,lower:gk,append:yk,insert:bk,remove:wk,clone:kk,datum:_k,on:Mk,dispatch:Ok,[Symbol.iterator]:Rk};function cn(e){return typeof e=="string"?new dn([[document.querySelector(e)]],[document.documentElement]):new dn([[e]],q1)}function Lk(e){let n;for(;n=e.sourceEvent;)e=n;return e}function An(e,n){if(e=Lk(e),n===void 0&&(n=e.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var l=i.createSVGPoint();return l.x=e.clientX,l.y=e.clientY,l=l.matrixTransform(n.getScreenCTM().inverse()),[l.x,l.y]}if(n.getBoundingClientRect){var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}const Bk={passive:!1},lo={capture:!0,passive:!1};function Td(e){e.stopImmediatePropagation()}function zl(e){e.preventDefault(),e.stopImmediatePropagation()}function I1(e){var n=e.document.documentElement,i=cn(e).on("dragstart.drag",zl,lo);"onselectstart"in n?i.on("selectstart.drag",zl,lo):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function V1(e,n){var i=e.document.documentElement,l=cn(e).on("dragstart.drag",null);n&&(l.on("click.drag",zl,lo),setTimeout(function(){l.on("click.drag",null)},0)),"onselectstart"in i?l.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const eu=e=>()=>e;function sh(e,{sourceEvent:n,subject:i,target:l,identifier:o,active:u,x:c,y:f,dx:p,dy:d,dispatch:y}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:y}})}sh.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Hk(e){return!e.ctrlKey&&!e.button}function Uk(){return this.parentNode}function qk(e,n){return n??{x:e.x,y:e.y}}function Ik(){return navigator.maxTouchPoints||"ontouchstart"in this}function Y1(){var e=Hk,n=Uk,i=qk,l=Ik,o={},u=Vu("start","drag","end"),c=0,f,p,d,y,m=0;function x(D){D.on("mousedown.drag",b).filter(l).on("touchstart.drag",C).on("touchmove.drag",k,Bk).on("touchend.drag touchcancel.drag",j).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(D,U){if(!(y||!e.call(this,D,U))){var z=E(this,n.call(this,D,U),D,U,"mouse");z&&(cn(D.view).on("mousemove.drag",w,lo).on("mouseup.drag",_,lo),I1(D.view),Td(D),d=!1,f=D.clientX,p=D.clientY,z("start",D))}}function w(D){if(zl(D),!d){var U=D.clientX-f,z=D.clientY-p;d=U*U+z*z>m}o.mouse("drag",D)}function _(D){cn(D.view).on("mousemove.drag mouseup.drag",null),V1(D.view,d),zl(D),o.mouse("end",D)}function C(D,U){if(e.call(this,D,U)){var z=D.changedTouches,L=n.call(this,D,U),G=z.length,Q,I;for(Q=0;Q<G;++Q)(I=E(this,L,D,U,z[Q].identifier,z[Q]))&&(Td(D),I("start",D,z[Q]))}}function k(D){var U=D.changedTouches,z=U.length,L,G;for(L=0;L<z;++L)(G=o[U[L].identifier])&&(zl(D),G("drag",D,U[L]))}function j(D){var U=D.changedTouches,z=U.length,L,G;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),L=0;L<z;++L)(G=o[U[L].identifier])&&(Td(D),G("end",D,U[L]))}function E(D,U,z,L,G,Q){var I=u.copy(),Y=An(Q||z,U),X,te,R;if((R=i.call(D,new sh("beforestart",{sourceEvent:z,target:x,identifier:G,active:c,x:Y[0],y:Y[1],dx:0,dy:0,dispatch:I}),L))!=null)return X=R.x-Y[0]||0,te=R.y-Y[1]||0,function B(M,H,$){var P=Y,A;switch(M){case"start":o[G]=B,A=c++;break;case"end":delete o[G],--c;case"drag":Y=An($||H,U),A=c;break}I.call(M,D,new sh(M,{sourceEvent:H,subject:R,target:x,identifier:G,active:A,x:Y[0]+X,y:Y[1]+te,dx:Y[0]-P[0],dy:Y[1]-P[1],dispatch:I}),L)}}return x.filter=function(D){return arguments.length?(e=typeof D=="function"?D:eu(!!D),x):e},x.container=function(D){return arguments.length?(n=typeof D=="function"?D:eu(D),x):n},x.subject=function(D){return arguments.length?(i=typeof D=="function"?D:eu(D),x):i},x.touchable=function(D){return arguments.length?(l=typeof D=="function"?D:eu(!!D),x):l},x.on=function(){var D=u.on.apply(u,arguments);return D===u?x:D},x.clickDistance=function(D){return arguments.length?(m=(D=+D)*D,x):Math.sqrt(m)},x}function Vh(e,n,i){e.prototype=n.prototype=i,i.constructor=e}function X1(e,n){var i=Object.create(e.prototype);for(var l in n)i[l]=n[l];return i}function wo(){}var ao=.7,Cu=1/ao,Dl="\\s*([+-]?\\d+)\\s*",oo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vk=/^#([0-9a-f]{3,8})$/,Yk=new RegExp(`^rgb\\(${Dl},${Dl},${Dl}\\)$`),Xk=new RegExp(`^rgb\\(${Xn},${Xn},${Xn}\\)$`),$k=new RegExp(`^rgba\\(${Dl},${Dl},${Dl},${oo}\\)$`),Fk=new RegExp(`^rgba\\(${Xn},${Xn},${Xn},${oo}\\)$`),Gk=new RegExp(`^hsl\\(${oo},${Xn},${Xn}\\)$`),Zk=new RegExp(`^hsla\\(${oo},${Xn},${Xn},${oo}\\)$`),C0={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};Vh(wo,Or,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:N0,formatHex:N0,formatHex8:Qk,formatHsl:Pk,formatRgb:T0,toString:T0});function N0(){return this.rgb().formatHex()}function Qk(){return this.rgb().formatHex8()}function Pk(){return $1(this).formatHsl()}function T0(){return this.rgb().formatRgb()}function Or(e){var n,i;return e=(e+"").trim().toLowerCase(),(n=Vk.exec(e))?(i=n[1].length,n=parseInt(n[1],16),i===6?A0(n):i===3?new Pt(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):i===8?tu(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):i===4?tu(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Yk.exec(e))?new Pt(n[1],n[2],n[3],1):(n=Xk.exec(e))?new Pt(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=$k.exec(e))?tu(n[1],n[2],n[3],n[4]):(n=Fk.exec(e))?tu(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Gk.exec(e))?D0(n[1],n[2]/100,n[3]/100,1):(n=Zk.exec(e))?D0(n[1],n[2]/100,n[3]/100,n[4]):C0.hasOwnProperty(e)?A0(C0[e]):e==="transparent"?new Pt(NaN,NaN,NaN,0):null}function A0(e){return new Pt(e>>16&255,e>>8&255,e&255,1)}function tu(e,n,i,l){return l<=0&&(e=n=i=NaN),new Pt(e,n,i,l)}function Kk(e){return e instanceof wo||(e=Or(e)),e?(e=e.rgb(),new Pt(e.r,e.g,e.b,e.opacity)):new Pt}function uh(e,n,i,l){return arguments.length===1?Kk(e):new Pt(e,n,i,l??1)}function Pt(e,n,i,l){this.r=+e,this.g=+n,this.b=+i,this.opacity=+l}Vh(Pt,uh,X1(wo,{brighter(e){return e=e==null?Cu:Math.pow(Cu,e),new Pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ao:Math.pow(ao,e),new Pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pt(zr(this.r),zr(this.g),zr(this.b),Nu(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:M0,formatHex:M0,formatHex8:Jk,formatRgb:z0,toString:z0}));function M0(){return`#${Mr(this.r)}${Mr(this.g)}${Mr(this.b)}`}function Jk(){return`#${Mr(this.r)}${Mr(this.g)}${Mr(this.b)}${Mr((isNaN(this.opacity)?1:this.opacity)*255)}`}function z0(){const e=Nu(this.opacity);return`${e===1?"rgb(":"rgba("}${zr(this.r)}, ${zr(this.g)}, ${zr(this.b)}${e===1?")":`, ${e})`}`}function Nu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mr(e){return e=zr(e),(e<16?"0":"")+e.toString(16)}function D0(e,n,i,l){return l<=0?e=n=i=NaN:i<=0||i>=1?e=n=NaN:n<=0&&(e=NaN),new zn(e,n,i,l)}function $1(e){if(e instanceof zn)return new zn(e.h,e.s,e.l,e.opacity);if(e instanceof wo||(e=Or(e)),!e)return new zn;if(e instanceof zn)return e;e=e.rgb();var n=e.r/255,i=e.g/255,l=e.b/255,o=Math.min(n,i,l),u=Math.max(n,i,l),c=NaN,f=u-o,p=(u+o)/2;return f?(n===u?c=(i-l)/f+(i<l)*6:i===u?c=(l-n)/f+2:c=(n-i)/f+4,f/=p<.5?u+o:2-u-o,c*=60):f=p>0&&p<1?0:c,new zn(c,f,p,e.opacity)}function Wk(e,n,i,l){return arguments.length===1?$1(e):new zn(e,n,i,l??1)}function zn(e,n,i,l){this.h=+e,this.s=+n,this.l=+i,this.opacity=+l}Vh(zn,Wk,X1(wo,{brighter(e){return e=e==null?Cu:Math.pow(Cu,e),new zn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ao:Math.pow(ao,e),new zn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,l=i+(i<.5?i:1-i)*n,o=2*i-l;return new Pt(Ad(e>=240?e-240:e+120,o,l),Ad(e,o,l),Ad(e<120?e+240:e-120,o,l),this.opacity)},clamp(){return new zn(O0(this.h),nu(this.s),nu(this.l),Nu(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=Nu(this.opacity);return`${e===1?"hsl(":"hsla("}${O0(this.h)}, ${nu(this.s)*100}%, ${nu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function O0(e){return e=(e||0)%360,e<0?e+360:e}function nu(e){return Math.max(0,Math.min(1,e||0))}function Ad(e,n,i){return(e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n)*255}const Yh=e=>()=>e;function e_(e,n){return function(i){return e+i*n}}function t_(e,n,i){return e=Math.pow(e,i),n=Math.pow(n,i)-e,i=1/i,function(l){return Math.pow(e+l*n,i)}}function n_(e){return(e=+e)==1?F1:function(n,i){return i-n?t_(n,i,e):Yh(isNaN(n)?i:n)}}function F1(e,n){var i=n-e;return i?e_(e,i):Yh(isNaN(e)?n:e)}const Tu=(function e(n){var i=n_(n);function l(o,u){var c=i((o=uh(o)).r,(u=uh(u)).r),f=i(o.g,u.g),p=i(o.b,u.b),d=F1(o.opacity,u.opacity);return function(y){return o.r=c(y),o.g=f(y),o.b=p(y),o.opacity=d(y),o+""}}return l.gamma=e,l})(1);function i_(e,n){n||(n=[]);var i=e?Math.min(n.length,e.length):0,l=n.slice(),o;return function(u){for(o=0;o<i;++o)l[o]=e[o]*(1-u)+n[o]*u;return l}}function r_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function l_(e,n){var i=n?n.length:0,l=e?Math.min(i,e.length):0,o=new Array(l),u=new Array(i),c;for(c=0;c<l;++c)o[c]=eo(e[c],n[c]);for(;c<i;++c)u[c]=n[c];return function(f){for(c=0;c<l;++c)u[c]=o[c](f);return u}}function a_(e,n){var i=new Date;return e=+e,n=+n,function(l){return i.setTime(e*(1-l)+n*l),i}}function Yn(e,n){return e=+e,n=+n,function(i){return e*(1-i)+n*i}}function o_(e,n){var i={},l={},o;(e===null||typeof e!="object")&&(e={}),(n===null||typeof n!="object")&&(n={});for(o in n)o in e?i[o]=eo(e[o],n[o]):l[o]=n[o];return function(u){for(o in i)l[o]=i[o](u);return l}}var ch=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Md=new RegExp(ch.source,"g");function s_(e){return function(){return e}}function u_(e){return function(n){return e(n)+""}}function G1(e,n){var i=ch.lastIndex=Md.lastIndex=0,l,o,u,c=-1,f=[],p=[];for(e=e+"",n=n+"";(l=ch.exec(e))&&(o=Md.exec(n));)(u=o.index)>i&&(u=n.slice(i,u),f[c]?f[c]+=u:f[++c]=u),(l=l[0])===(o=o[0])?f[c]?f[c]+=o:f[++c]=o:(f[++c]=null,p.push({i:c,x:Yn(l,o)})),i=Md.lastIndex;return i<n.length&&(u=n.slice(i),f[c]?f[c]+=u:f[++c]=u),f.length<2?p[0]?u_(p[0].x):s_(n):(n=p.length,function(d){for(var y=0,m;y<n;++y)f[(m=p[y]).i]=m.x(d);return f.join("")})}function eo(e,n){var i=typeof n,l;return n==null||i==="boolean"?Yh(n):(i==="number"?Yn:i==="string"?(l=Or(n))?(n=l,Tu):G1:n instanceof Or?Tu:n instanceof Date?a_:r_(n)?i_:Array.isArray(n)?l_:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?o_:Yn)(e,n)}var R0=180/Math.PI,fh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Z1(e,n,i,l,o,u){var c,f,p;return(c=Math.sqrt(e*e+n*n))&&(e/=c,n/=c),(p=e*i+n*l)&&(i-=e*p,l-=n*p),(f=Math.sqrt(i*i+l*l))&&(i/=f,l/=f,p/=f),e*l<n*i&&(e=-e,n=-n,p=-p,c=-c),{translateX:o,translateY:u,rotate:Math.atan2(n,e)*R0,skewX:Math.atan(p)*R0,scaleX:c,scaleY:f}}var iu;function c_(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?fh:Z1(n.a,n.b,n.c,n.d,n.e,n.f)}function f_(e){return e==null||(iu||(iu=document.createElementNS("http://www.w3.org/2000/svg","g")),iu.setAttribute("transform",e),!(e=iu.transform.baseVal.consolidate()))?fh:(e=e.matrix,Z1(e.a,e.b,e.c,e.d,e.e,e.f))}function Q1(e,n,i,l){function o(d){return d.length?d.pop()+" ":""}function u(d,y,m,x,b,w){if(d!==m||y!==x){var _=b.push("translate(",null,n,null,i);w.push({i:_-4,x:Yn(d,m)},{i:_-2,x:Yn(y,x)})}else(m||x)&&b.push("translate("+m+n+x+i)}function c(d,y,m,x){d!==y?(d-y>180?y+=360:y-d>180&&(d+=360),x.push({i:m.push(o(m)+"rotate(",null,l)-2,x:Yn(d,y)})):y&&m.push(o(m)+"rotate("+y+l)}function f(d,y,m,x){d!==y?x.push({i:m.push(o(m)+"skewX(",null,l)-2,x:Yn(d,y)}):y&&m.push(o(m)+"skewX("+y+l)}function p(d,y,m,x,b,w){if(d!==m||y!==x){var _=b.push(o(b)+"scale(",null,",",null,")");w.push({i:_-4,x:Yn(d,m)},{i:_-2,x:Yn(y,x)})}else(m!==1||x!==1)&&b.push(o(b)+"scale("+m+","+x+")")}return function(d,y){var m=[],x=[];return d=e(d),y=e(y),u(d.translateX,d.translateY,y.translateX,y.translateY,m,x),c(d.rotate,y.rotate,m,x),f(d.skewX,y.skewX,m,x),p(d.scaleX,d.scaleY,y.scaleX,y.scaleY,m,x),d=y=null,function(b){for(var w=-1,_=x.length,C;++w<_;)m[(C=x[w]).i]=C.x(b);return m.join("")}}}var d_=Q1(c_,"px, ","px)","deg)"),h_=Q1(f_,", ",")",")"),p_=1e-12;function j0(e){return((e=Math.exp(e))+1/e)/2}function m_(e){return((e=Math.exp(e))-1/e)/2}function g_(e){return((e=Math.exp(2*e))-1)/(e+1)}const gu=(function e(n,i,l){function o(u,c){var f=u[0],p=u[1],d=u[2],y=c[0],m=c[1],x=c[2],b=y-f,w=m-p,_=b*b+w*w,C,k;if(_<p_)k=Math.log(x/d)/n,C=function(L){return[f+L*b,p+L*w,d*Math.exp(n*L*k)]};else{var j=Math.sqrt(_),E=(x*x-d*d+l*_)/(2*d*i*j),D=(x*x-d*d-l*_)/(2*x*i*j),U=Math.log(Math.sqrt(E*E+1)-E),z=Math.log(Math.sqrt(D*D+1)-D);k=(z-U)/n,C=function(L){var G=L*k,Q=j0(U),I=d/(i*j)*(Q*g_(n*G+U)-m_(U));return[f+I*b,p+I*w,d*Q/j0(n*G+U)]}}return C.duration=k*1e3*n/Math.SQRT2,C}return o.rho=function(u){var c=Math.max(.001,+u),f=c*c,p=f*f;return e(c,f,p)},o})(Math.SQRT2,2,4);var jl=0,Ka=0,Va=0,P1=1e3,Au,Ja,Mu=0,Rr=0,Xu=0,so=typeof performance=="object"&&performance.now?performance:Date,K1=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Xh(){return Rr||(K1(y_),Rr=so.now()+Xu)}function y_(){Rr=0}function zu(){this._call=this._time=this._next=null}zu.prototype=J1.prototype={constructor:zu,restart:function(e,n,i){if(typeof e!="function")throw new TypeError("callback is not a function");i=(i==null?Xh():+i)+(n==null?0:+n),!this._next&&Ja!==this&&(Ja?Ja._next=this:Au=this,Ja=this),this._call=e,this._time=i,dh()},stop:function(){this._call&&(this._call=null,this._time=1/0,dh())}};function J1(e,n,i){var l=new zu;return l.restart(e,n,i),l}function x_(){Xh(),++jl;for(var e=Au,n;e;)(n=Rr-e._time)>=0&&e._call.call(void 0,n),e=e._next;--jl}function L0(){Rr=(Mu=so.now())+Xu,jl=Ka=0;try{x_()}finally{jl=0,v_(),Rr=0}}function b_(){var e=so.now(),n=e-Mu;n>P1&&(Xu-=n,Mu=e)}function v_(){for(var e,n=Au,i,l=1/0;n;)n._call?(l>n._time&&(l=n._time),e=n,n=n._next):(i=n._next,n._next=null,n=e?e._next=i:Au=i);Ja=e,dh(l)}function dh(e){if(!jl){Ka&&(Ka=clearTimeout(Ka));var n=e-Rr;n>24?(e<1/0&&(Ka=setTimeout(L0,e-so.now()-Xu)),Va&&(Va=clearInterval(Va))):(Va||(Mu=so.now(),Va=setInterval(b_,P1)),jl=1,K1(L0))}}function B0(e,n,i){var l=new zu;return n=n==null?0:+n,l.restart(o=>{l.stop(),e(o+n)},n,i),l}var w_=Vu("start","end","cancel","interrupt"),S_=[],W1=0,H0=1,hh=2,yu=3,U0=4,ph=5,xu=6;function $u(e,n,i,l,o,u){var c=e.__transition;if(!c)e.__transition={};else if(i in c)return;E_(e,i,{name:n,index:l,group:o,on:w_,tween:S_,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:W1})}function $h(e,n){var i=jn(e,n);if(i.state>W1)throw new Error("too late; already scheduled");return i}function Zn(e,n){var i=jn(e,n);if(i.state>yu)throw new Error("too late; already running");return i}function jn(e,n){var i=e.__transition;if(!i||!(i=i[n]))throw new Error("transition not found");return i}function E_(e,n,i){var l=e.__transition,o;l[n]=i,i.timer=J1(u,0,i.time);function u(d){i.state=H0,i.timer.restart(c,i.delay,i.time),i.delay<=d&&c(d-i.delay)}function c(d){var y,m,x,b;if(i.state!==H0)return p();for(y in l)if(b=l[y],b.name===i.name){if(b.state===yu)return B0(c);b.state===U0?(b.state=xu,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete l[y]):+y<n&&(b.state=xu,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete l[y])}if(B0(function(){i.state===yu&&(i.state=U0,i.timer.restart(f,i.delay,i.time),f(d))}),i.state=hh,i.on.call("start",e,e.__data__,i.index,i.group),i.state===hh){for(i.state=yu,o=new Array(x=i.tween.length),y=0,m=-1;y<x;++y)(b=i.tween[y].value.call(e,e.__data__,i.index,i.group))&&(o[++m]=b);o.length=m+1}}function f(d){for(var y=d<i.duration?i.ease.call(null,d/i.duration):(i.timer.restart(p),i.state=ph,1),m=-1,x=o.length;++m<x;)o[m].call(e,y);i.state===ph&&(i.on.call("end",e,e.__data__,i.index,i.group),p())}function p(){i.state=xu,i.timer.stop(),delete l[n];for(var d in l)return;delete e.__transition}}function bu(e,n){var i=e.__transition,l,o,u=!0,c;if(i){n=n==null?null:n+"";for(c in i){if((l=i[c]).name!==n){u=!1;continue}o=l.state>hh&&l.state<ph,l.state=xu,l.timer.stop(),l.on.call(o?"interrupt":"cancel",e,e.__data__,l.index,l.group),delete i[c]}u&&delete e.__transition}}function k_(e){return this.each(function(){bu(this,e)})}function __(e,n){var i,l;return function(){var o=Zn(this,e),u=o.tween;if(u!==i){l=i=u;for(var c=0,f=l.length;c<f;++c)if(l[c].name===n){l=l.slice(),l.splice(c,1);break}}o.tween=l}}function C_(e,n,i){var l,o;if(typeof i!="function")throw new Error;return function(){var u=Zn(this,e),c=u.tween;if(c!==l){o=(l=c).slice();for(var f={name:n,value:i},p=0,d=o.length;p<d;++p)if(o[p].name===n){o[p]=f;break}p===d&&o.push(f)}u.tween=o}}function N_(e,n){var i=this._id;if(e+="",arguments.length<2){for(var l=jn(this.node(),i).tween,o=0,u=l.length,c;o<u;++o)if((c=l[o]).name===e)return c.value;return null}return this.each((n==null?__:C_)(i,e,n))}function Fh(e,n,i){var l=e._id;return e.each(function(){var o=Zn(this,l);(o.value||(o.value={}))[n]=i.apply(this,arguments)}),function(o){return jn(o,l).value[n]}}function eb(e,n){var i;return(typeof n=="number"?Yn:n instanceof Or?Tu:(i=Or(n))?(n=i,Tu):G1)(e,n)}function T_(e){return function(){this.removeAttribute(e)}}function A_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function M_(e,n,i){var l,o=i+"",u;return function(){var c=this.getAttribute(e);return c===o?null:c===l?u:u=n(l=c,i)}}function z_(e,n,i){var l,o=i+"",u;return function(){var c=this.getAttributeNS(e.space,e.local);return c===o?null:c===l?u:u=n(l=c,i)}}function D_(e,n,i){var l,o,u;return function(){var c,f=i(this),p;return f==null?void this.removeAttribute(e):(c=this.getAttribute(e),p=f+"",c===p?null:c===l&&p===o?u:(o=p,u=n(l=c,f)))}}function O_(e,n,i){var l,o,u;return function(){var c,f=i(this),p;return f==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),p=f+"",c===p?null:c===l&&p===o?u:(o=p,u=n(l=c,f)))}}function R_(e,n){var i=Yu(e),l=i==="transform"?h_:eb;return this.attrTween(e,typeof n=="function"?(i.local?O_:D_)(i,l,Fh(this,"attr."+e,n)):n==null?(i.local?A_:T_)(i):(i.local?z_:M_)(i,l,n))}function j_(e,n){return function(i){this.setAttribute(e,n.call(this,i))}}function L_(e,n){return function(i){this.setAttributeNS(e.space,e.local,n.call(this,i))}}function B_(e,n){var i,l;function o(){var u=n.apply(this,arguments);return u!==l&&(i=(l=u)&&L_(e,u)),i}return o._value=n,o}function H_(e,n){var i,l;function o(){var u=n.apply(this,arguments);return u!==l&&(i=(l=u)&&j_(e,u)),i}return o._value=n,o}function U_(e,n){var i="attr."+e;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!="function")throw new Error;var l=Yu(e);return this.tween(i,(l.local?B_:H_)(l,n))}function q_(e,n){return function(){$h(this,e).delay=+n.apply(this,arguments)}}function I_(e,n){return n=+n,function(){$h(this,e).delay=n}}function V_(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?q_:I_)(n,e)):jn(this.node(),n).delay}function Y_(e,n){return function(){Zn(this,e).duration=+n.apply(this,arguments)}}function X_(e,n){return n=+n,function(){Zn(this,e).duration=n}}function $_(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Y_:X_)(n,e)):jn(this.node(),n).duration}function F_(e,n){if(typeof n!="function")throw new Error;return function(){Zn(this,e).ease=n}}function G_(e){var n=this._id;return arguments.length?this.each(F_(n,e)):jn(this.node(),n).ease}function Z_(e,n){return function(){var i=n.apply(this,arguments);if(typeof i!="function")throw new Error;Zn(this,e).ease=i}}function Q_(e){if(typeof e!="function")throw new Error;return this.each(Z_(this._id,e))}function P_(e){typeof e!="function"&&(e=z1(e));for(var n=this._groups,i=n.length,l=new Array(i),o=0;o<i;++o)for(var u=n[o],c=u.length,f=l[o]=[],p,d=0;d<c;++d)(p=u[d])&&e.call(p,p.__data__,d,u)&&f.push(p);return new Si(l,this._parents,this._name,this._id)}function K_(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,i=e._groups,l=n.length,o=i.length,u=Math.min(l,o),c=new Array(l),f=0;f<u;++f)for(var p=n[f],d=i[f],y=p.length,m=c[f]=new Array(y),x,b=0;b<y;++b)(x=p[b]||d[b])&&(m[b]=x);for(;f<l;++f)c[f]=n[f];return new Si(c,this._parents,this._name,this._id)}function J_(e){return(e+"").trim().split(/^|\s+/).every(function(n){var i=n.indexOf(".");return i>=0&&(n=n.slice(0,i)),!n||n==="start"})}function W_(e,n,i){var l,o,u=J_(n)?$h:Zn;return function(){var c=u(this,e),f=c.on;f!==l&&(o=(l=f).copy()).on(n,i),c.on=o}}function eC(e,n){var i=this._id;return arguments.length<2?jn(this.node(),i).on.on(e):this.each(W_(i,e,n))}function tC(e){return function(){var n=this.parentNode;for(var i in this.__transition)if(+i!==e)return;n&&n.removeChild(this)}}function nC(){return this.on("end.remove",tC(this._id))}function iC(e){var n=this._name,i=this._id;typeof e!="function"&&(e=qh(e));for(var l=this._groups,o=l.length,u=new Array(o),c=0;c<o;++c)for(var f=l[c],p=f.length,d=u[c]=new Array(p),y,m,x=0;x<p;++x)(y=f[x])&&(m=e.call(y,y.__data__,x,f))&&("__data__"in y&&(m.__data__=y.__data__),d[x]=m,$u(d[x],n,i,x,d,jn(y,i)));return new Si(u,this._parents,n,i)}function rC(e){var n=this._name,i=this._id;typeof e!="function"&&(e=M1(e));for(var l=this._groups,o=l.length,u=[],c=[],f=0;f<o;++f)for(var p=l[f],d=p.length,y,m=0;m<d;++m)if(y=p[m]){for(var x=e.call(y,y.__data__,m,p),b,w=jn(y,i),_=0,C=x.length;_<C;++_)(b=x[_])&&$u(b,n,i,_,x,w);u.push(x),c.push(y)}return new Si(u,c,n,i)}var lC=vo.prototype.constructor;function aC(){return new lC(this._groups,this._parents)}function oC(e,n){var i,l,o;return function(){var u=Rl(this,e),c=(this.style.removeProperty(e),Rl(this,e));return u===c?null:u===i&&c===l?o:o=n(i=u,l=c)}}function tb(e){return function(){this.style.removeProperty(e)}}function sC(e,n,i){var l,o=i+"",u;return function(){var c=Rl(this,e);return c===o?null:c===l?u:u=n(l=c,i)}}function uC(e,n,i){var l,o,u;return function(){var c=Rl(this,e),f=i(this),p=f+"";return f==null&&(p=f=(this.style.removeProperty(e),Rl(this,e))),c===p?null:c===l&&p===o?u:(o=p,u=n(l=c,f))}}function cC(e,n){var i,l,o,u="style."+n,c="end."+u,f;return function(){var p=Zn(this,e),d=p.on,y=p.value[u]==null?f||(f=tb(n)):void 0;(d!==i||o!==y)&&(l=(i=d).copy()).on(c,o=y),p.on=l}}function fC(e,n,i){var l=(e+="")=="transform"?d_:eb;return n==null?this.styleTween(e,oC(e,l)).on("end.style."+e,tb(e)):typeof n=="function"?this.styleTween(e,uC(e,l,Fh(this,"style."+e,n))).each(cC(this._id,e)):this.styleTween(e,sC(e,l,n),i).on("end.style."+e,null)}function dC(e,n,i){return function(l){this.style.setProperty(e,n.call(this,l),i)}}function hC(e,n,i){var l,o;function u(){var c=n.apply(this,arguments);return c!==o&&(l=(o=c)&&dC(e,c,i)),l}return u._value=n,u}function pC(e,n,i){var l="style."+(e+="");if(arguments.length<2)return(l=this.tween(l))&&l._value;if(n==null)return this.tween(l,null);if(typeof n!="function")throw new Error;return this.tween(l,hC(e,n,i??""))}function mC(e){return function(){this.textContent=e}}function gC(e){return function(){var n=e(this);this.textContent=n??""}}function yC(e){return this.tween("text",typeof e=="function"?gC(Fh(this,"text",e)):mC(e==null?"":e+""))}function xC(e){return function(n){this.textContent=e.call(this,n)}}function bC(e){var n,i;function l(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&xC(o)),n}return l._value=e,l}function vC(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,bC(e))}function wC(){for(var e=this._name,n=this._id,i=nb(),l=this._groups,o=l.length,u=0;u<o;++u)for(var c=l[u],f=c.length,p,d=0;d<f;++d)if(p=c[d]){var y=jn(p,n);$u(p,e,i,d,c,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new Si(l,this._parents,e,i)}function SC(){var e,n,i=this,l=i._id,o=i.size();return new Promise(function(u,c){var f={value:c},p={value:function(){--o===0&&u()}};i.each(function(){var d=Zn(this,l),y=d.on;y!==e&&(n=(e=y).copy(),n._.cancel.push(f),n._.interrupt.push(f),n._.end.push(p)),d.on=n}),o===0&&u()})}var EC=0;function Si(e,n,i,l){this._groups=e,this._parents=n,this._name=i,this._id=l}function nb(){return++EC}var bi=vo.prototype;Si.prototype={constructor:Si,select:iC,selectAll:rC,selectChild:bi.selectChild,selectChildren:bi.selectChildren,filter:P_,merge:K_,selection:aC,transition:wC,call:bi.call,nodes:bi.nodes,node:bi.node,size:bi.size,empty:bi.empty,each:bi.each,on:eC,attr:R_,attrTween:U_,style:fC,styleTween:pC,text:yC,textTween:vC,remove:nC,tween:N_,delay:V_,duration:$_,ease:G_,easeVarying:Q_,end:SC,[Symbol.iterator]:bi[Symbol.iterator]};function kC(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var _C={time:null,delay:0,duration:250,ease:kC};function CC(e,n){for(var i;!(i=e.__transition)||!(i=i[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return i}function NC(e){var n,i;e instanceof Si?(n=e._id,e=e._name):(n=nb(),(i=_C).time=Xh(),e=e==null?null:e+"");for(var l=this._groups,o=l.length,u=0;u<o;++u)for(var c=l[u],f=c.length,p,d=0;d<f;++d)(p=c[d])&&$u(p,e,n,d,c,i||CC(p,n));return new Si(l,this._parents,e,n)}vo.prototype.interrupt=k_;vo.prototype.transition=NC;const ru=e=>()=>e;function TC(e,{sourceEvent:n,target:i,transform:l,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:l,enumerable:!0,configurable:!0},_:{value:o}})}function vi(e,n,i){this.k=e,this.x=n,this.y=i}vi.prototype={constructor:vi,scale:function(e){return e===1?this:new vi(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new vi(this.k,this.x+this.k*e,this.y+this.k*n)},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+")"}};var Fu=new vi(1,0,0);ib.prototype=vi.prototype;function ib(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Fu;return e.__zoom}function zd(e){e.stopImmediatePropagation()}function Ya(e){e.preventDefault(),e.stopImmediatePropagation()}function AC(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function MC(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function q0(){return this.__zoom||Fu}function zC(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function DC(){return navigator.maxTouchPoints||"ontouchstart"in this}function OC(e,n,i){var l=e.invertX(n[0][0])-i[0][0],o=e.invertX(n[1][0])-i[1][0],u=e.invertY(n[0][1])-i[0][1],c=e.invertY(n[1][1])-i[1][1];return e.translate(o>l?(l+o)/2:Math.min(0,l)||Math.max(0,o),c>u?(u+c)/2:Math.min(0,u)||Math.max(0,c))}function rb(){var e=AC,n=MC,i=OC,l=zC,o=DC,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,p=gu,d=Vu("start","zoom","end"),y,m,x,b=500,w=150,_=0,C=10;function k(R){R.property("__zoom",q0).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",Q).on("dblclick.zoom",I).filter(o).on("touchstart.zoom",Y).on("touchmove.zoom",X).on("touchend.zoom touchcancel.zoom",te).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(R,B,M,H){var $=R.selection?R.selection():R;$.property("__zoom",q0),R!==$?U(R,B,M,H):$.interrupt().each(function(){z(this,arguments).event(H).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},k.scaleBy=function(R,B,M,H){k.scaleTo(R,function(){var $=this.__zoom.k,P=typeof B=="function"?B.apply(this,arguments):B;return $*P},M,H)},k.scaleTo=function(R,B,M,H){k.transform(R,function(){var $=n.apply(this,arguments),P=this.__zoom,A=M==null?D($):typeof M=="function"?M.apply(this,arguments):M,O=P.invert(A),V=typeof B=="function"?B.apply(this,arguments):B;return i(E(j(P,V),A,O),$,c)},M,H)},k.translateBy=function(R,B,M,H){k.transform(R,function(){return i(this.__zoom.translate(typeof B=="function"?B.apply(this,arguments):B,typeof M=="function"?M.apply(this,arguments):M),n.apply(this,arguments),c)},null,H)},k.translateTo=function(R,B,M,H,$){k.transform(R,function(){var P=n.apply(this,arguments),A=this.__zoom,O=H==null?D(P):typeof H=="function"?H.apply(this,arguments):H;return i(Fu.translate(O[0],O[1]).scale(A.k).translate(typeof B=="function"?-B.apply(this,arguments):-B,typeof M=="function"?-M.apply(this,arguments):-M),P,c)},H,$)};function j(R,B){return B=Math.max(u[0],Math.min(u[1],B)),B===R.k?R:new vi(B,R.x,R.y)}function E(R,B,M){var H=B[0]-M[0]*R.k,$=B[1]-M[1]*R.k;return H===R.x&&$===R.y?R:new vi(R.k,H,$)}function D(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function U(R,B,M,H){R.on("start.zoom",function(){z(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(H).end()}).tween("zoom",function(){var $=this,P=arguments,A=z($,P).event(H),O=n.apply($,P),V=M==null?D(O):typeof M=="function"?M.apply($,P):M,T=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),ne=$.__zoom,ue=typeof B=="function"?B.apply($,P):B,ce=p(ne.invert(V).concat(T/ne.k),ue.invert(V).concat(T/ue.k));return function(de){if(de===1)de=ue;else{var se=ce(de),pe=T/se[2];de=new vi(pe,V[0]-se[0]*pe,V[1]-se[1]*pe)}A.zoom(null,de)}})}function z(R,B,M){return!M&&R.__zooming||new L(R,B)}function L(R,B){this.that=R,this.args=B,this.active=0,this.sourceEvent=null,this.extent=n.apply(R,B),this.taps=0}L.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,B){return this.mouse&&R!=="mouse"&&(this.mouse[1]=B.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=B.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=B.invert(this.touch1[0])),this.that.__zoom=B,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var B=cn(this.that).datum();d.call(R,this.that,new TC(R,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:d}),B)}};function G(R,...B){if(!e.apply(this,arguments))return;var M=z(this,B).event(R),H=this.__zoom,$=Math.max(u[0],Math.min(u[1],H.k*Math.pow(2,l.apply(this,arguments)))),P=An(R);if(M.wheel)(M.mouse[0][0]!==P[0]||M.mouse[0][1]!==P[1])&&(M.mouse[1]=H.invert(M.mouse[0]=P)),clearTimeout(M.wheel);else{if(H.k===$)return;M.mouse=[P,H.invert(P)],bu(this),M.start()}Ya(R),M.wheel=setTimeout(A,w),M.zoom("mouse",i(E(j(H,$),M.mouse[0],M.mouse[1]),M.extent,c));function A(){M.wheel=null,M.end()}}function Q(R,...B){if(x||!e.apply(this,arguments))return;var M=R.currentTarget,H=z(this,B,!0).event(R),$=cn(R.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",T,!0),P=An(R,M),A=R.clientX,O=R.clientY;I1(R.view),zd(R),H.mouse=[P,this.__zoom.invert(P)],bu(this),H.start();function V(ne){if(Ya(ne),!H.moved){var ue=ne.clientX-A,ce=ne.clientY-O;H.moved=ue*ue+ce*ce>_}H.event(ne).zoom("mouse",i(E(H.that.__zoom,H.mouse[0]=An(ne,M),H.mouse[1]),H.extent,c))}function T(ne){$.on("mousemove.zoom mouseup.zoom",null),V1(ne.view,H.moved),Ya(ne),H.event(ne).end()}}function I(R,...B){if(e.apply(this,arguments)){var M=this.__zoom,H=An(R.changedTouches?R.changedTouches[0]:R,this),$=M.invert(H),P=M.k*(R.shiftKey?.5:2),A=i(E(j(M,P),H,$),n.apply(this,B),c);Ya(R),f>0?cn(this).transition().duration(f).call(U,A,H,R):cn(this).call(k.transform,A,H,R)}}function Y(R,...B){if(e.apply(this,arguments)){var M=R.touches,H=M.length,$=z(this,B,R.changedTouches.length===H).event(R),P,A,O,V;for(zd(R),A=0;A<H;++A)O=M[A],V=An(O,this),V=[V,this.__zoom.invert(V),O.identifier],$.touch0?!$.touch1&&$.touch0[2]!==V[2]&&($.touch1=V,$.taps=0):($.touch0=V,P=!0,$.taps=1+!!y);y&&(y=clearTimeout(y)),P&&($.taps<2&&(m=V[0],y=setTimeout(function(){y=null},b)),bu(this),$.start())}}function X(R,...B){if(this.__zooming){var M=z(this,B).event(R),H=R.changedTouches,$=H.length,P,A,O,V;for(Ya(R),P=0;P<$;++P)A=H[P],O=An(A,this),M.touch0&&M.touch0[2]===A.identifier?M.touch0[0]=O:M.touch1&&M.touch1[2]===A.identifier&&(M.touch1[0]=O);if(A=M.that.__zoom,M.touch1){var T=M.touch0[0],ne=M.touch0[1],ue=M.touch1[0],ce=M.touch1[1],de=(de=ue[0]-T[0])*de+(de=ue[1]-T[1])*de,se=(se=ce[0]-ne[0])*se+(se=ce[1]-ne[1])*se;A=j(A,Math.sqrt(de/se)),O=[(T[0]+ue[0])/2,(T[1]+ue[1])/2],V=[(ne[0]+ce[0])/2,(ne[1]+ce[1])/2]}else if(M.touch0)O=M.touch0[0],V=M.touch0[1];else return;M.zoom("touch",i(E(A,O,V),M.extent,c))}}function te(R,...B){if(this.__zooming){var M=z(this,B).event(R),H=R.changedTouches,$=H.length,P,A;for(zd(R),x&&clearTimeout(x),x=setTimeout(function(){x=null},b),P=0;P<$;++P)A=H[P],M.touch0&&M.touch0[2]===A.identifier?delete M.touch0:M.touch1&&M.touch1[2]===A.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(A=An(A,this),Math.hypot(m[0]-A[0],m[1]-A[1])<C)){var O=cn(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return k.wheelDelta=function(R){return arguments.length?(l=typeof R=="function"?R:ru(+R),k):l},k.filter=function(R){return arguments.length?(e=typeof R=="function"?R:ru(!!R),k):e},k.touchable=function(R){return arguments.length?(o=typeof R=="function"?R:ru(!!R),k):o},k.extent=function(R){return arguments.length?(n=typeof R=="function"?R:ru([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),k):n},k.scaleExtent=function(R){return arguments.length?(u[0]=+R[0],u[1]=+R[1],k):[u[0],u[1]]},k.translateExtent=function(R){return arguments.length?(c[0][0]=+R[0][0],c[1][0]=+R[1][0],c[0][1]=+R[0][1],c[1][1]=+R[1][1],k):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},k.constrain=function(R){return arguments.length?(i=R,k):i},k.duration=function(R){return arguments.length?(f=+R,k):f},k.interpolate=function(R){return arguments.length?(p=R,k):p},k.on=function(){var R=d.on.apply(d,arguments);return R===d?k:R},k.clickDistance=function(R){return arguments.length?(_=(R=+R)*R,k):Math.sqrt(_)},k.tapDistance=function(R){return arguments.length?(C=+R,k):C},k}const Fn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:i,targetHandle:l})=>`Couldn't create edge for ${e} handle id: "${e==="source"?i:l}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},uo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],lb=["Enter"," ","Escape"],ab={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:i})=>`Moved selected node ${e}. New position, x: ${n}, y: ${i}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ll;(function(e){e.Strict="strict",e.Loose="loose"})(Ll||(Ll={}));var Dr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Dr||(Dr={}));var co;(function(e){e.Partial="partial",e.Full="full"})(co||(co={}));const ob={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ir;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ir||(ir={}));var Du;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Du||(Du={}));var ye;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ye||(ye={}));const I0={[ye.Left]:ye.Right,[ye.Right]:ye.Left,[ye.Top]:ye.Bottom,[ye.Bottom]:ye.Top};function sb(e){return e===null?null:e?"valid":"invalid"}const ub=e=>"id"in e&&"source"in e&&"target"in e,RC=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Gh=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),So=(e,n=[0,0])=>{const{width:i,height:l}=Ei(e),o=e.origin??n,u=i*o[0],c=l*o[1];return{x:e.position.x-u,y:e.position.y-c}},jC=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const i=e.reduce((l,o)=>{const u=typeof o=="string";let c=!n.nodeLookup&&!u?o:void 0;n.nodeLookup&&(c=u?n.nodeLookup.get(o):Gh(o)?o:n.nodeLookup.get(o.id));const f=c?Ou(c,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Gu(l,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Zu(i)},Eo=(e,n={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},l=!1;return e.forEach(o=>{(n.filter===void 0||n.filter(o))&&(i=Gu(i,Ou(o)),l=!0)}),l?Zu(i):{x:0,y:0,width:0,height:0}},Zh=(e,n,[i,l,o]=[0,0,1],u=!1,c=!1)=>{const f={..._o(n,[i,l,o]),width:n.width/o,height:n.height/o},p=[];for(const d of e.values()){const{measured:y,selectable:m=!0,hidden:x=!1}=d;if(c&&!m||x)continue;const b=y.width??d.width??d.initialWidth??null,w=y.height??d.height??d.initialHeight??null,_=fo(f,Hl(d)),C=(b??0)*(w??0),k=u&&_>0;(!d.internals.handleBounds||k||_>=C||d.dragging)&&p.push(d)}return p},LC=(e,n)=>{const i=new Set;return e.forEach(l=>{i.add(l.id)}),n.filter(l=>i.has(l.source)||i.has(l.target))};function BC(e,n){const i=new Map,l=n?.nodes?new Set(n.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&(n?.includeHiddenNodes||!o.hidden)&&(!l||l.has(o.id))&&i.set(o.id,o)}),i}async function HC({nodes:e,width:n,height:i,panZoom:l,minZoom:o,maxZoom:u},c){if(e.size===0)return Promise.resolve(!0);const f=BC(e,c),p=Eo(f),d=Qh(p,n,i,c?.minZoom??o,c?.maxZoom??u,c?.padding??.1);return await l.setViewport(d,{duration:c?.duration,ease:c?.ease,interpolate:c?.interpolate}),Promise.resolve(!0)}function cb({nodeId:e,nextPosition:n,nodeLookup:i,nodeOrigin:l=[0,0],nodeExtent:o,onError:u}){const c=i.get(e),f=c.parentId?i.get(c.parentId):void 0,{x:p,y:d}=f?f.internals.positionAbsolute:{x:0,y:0},y=c.origin??l;let m=c.extent||o;if(c.extent==="parent"&&!c.expandParent)if(!f)u?.("005",Fn.error005());else{const b=f.measured.width,w=f.measured.height;b&&w&&(m=[[p,d],[p+b,d+w]])}else f&&Ul(c.extent)&&(m=[[c.extent[0][0]+p,c.extent[0][1]+d],[c.extent[1][0]+p,c.extent[1][1]+d]]);const x=Ul(m)?jr(n,m,c.measured):n;return(c.measured.width===void 0||c.measured.height===void 0)&&u?.("015",Fn.error015()),{position:{x:x.x-p+(c.measured.width??0)*y[0],y:x.y-d+(c.measured.height??0)*y[1]},positionAbsolute:x}}async function UC({nodesToRemove:e=[],edgesToRemove:n=[],nodes:i,edges:l,onBeforeDelete:o}){const u=new Set(e.map(x=>x.id)),c=[];for(const x of i){if(x.deletable===!1)continue;const b=u.has(x.id),w=!b&&x.parentId&&c.find(_=>_.id===x.parentId);(b||w)&&c.push(x)}const f=new Set(n.map(x=>x.id)),p=l.filter(x=>x.deletable!==!1),y=LC(c,p);for(const x of p)f.has(x.id)&&!y.find(w=>w.id===x.id)&&y.push(x);if(!o)return{edges:y,nodes:c};const m=await o({nodes:c,edges:y});return typeof m=="boolean"?m?{edges:y,nodes:c}:{edges:[],nodes:[]}:m}const Bl=(e,n=0,i=1)=>Math.min(Math.max(e,n),i),jr=(e={x:0,y:0},n,i)=>({x:Bl(e.x,n[0][0],n[1][0]-(i?.width??0)),y:Bl(e.y,n[0][1],n[1][1]-(i?.height??0))});function fb(e,n,i){const{width:l,height:o}=Ei(i),{x:u,y:c}=i.internals.positionAbsolute;return jr(e,[[u,c],[u+l,c+o]],n)}const V0=(e,n,i)=>e<n?Bl(Math.abs(e-n),1,n)/n:e>i?-Bl(Math.abs(e-i),1,n)/n:0,db=(e,n,i=15,l=40)=>{const o=V0(e.x,l,n.width-l)*i,u=V0(e.y,l,n.height-l)*i;return[o,u]},Gu=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),mh=({x:e,y:n,width:i,height:l})=>({x:e,y:n,x2:e+i,y2:n+l}),Zu=({x:e,y:n,x2:i,y2:l})=>({x:e,y:n,width:i-e,height:l-n}),Hl=(e,n=[0,0])=>{const{x:i,y:l}=Gh(e)?e.internals.positionAbsolute:So(e,n);return{x:i,y:l,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Ou=(e,n=[0,0])=>{const{x:i,y:l}=Gh(e)?e.internals.positionAbsolute:So(e,n);return{x:i,y:l,x2:i+(e.measured?.width??e.width??e.initialWidth??0),y2:l+(e.measured?.height??e.height??e.initialHeight??0)}},hb=(e,n)=>Zu(Gu(mh(e),mh(n))),fo=(e,n)=>{const i=Math.max(0,Math.min(e.x+e.width,n.x+n.width)-Math.max(e.x,n.x)),l=Math.max(0,Math.min(e.y+e.height,n.y+n.height)-Math.max(e.y,n.y));return Math.ceil(i*l)},Y0=e=>Dn(e.width)&&Dn(e.height)&&Dn(e.x)&&Dn(e.y),Dn=e=>!isNaN(e)&&isFinite(e),qC=(e,n)=>{},ko=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),_o=({x:e,y:n},[i,l,o],u=!1,c=[1,1])=>{const f={x:(e-i)/o,y:(n-l)/o};return u?ko(f,c):f},Ru=({x:e,y:n},[i,l,o])=>({x:e*o+i,y:n*o+l});function _l(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const i=parseFloat(e);if(!Number.isNaN(i))return Math.floor(i)}if(typeof e=="string"&&e.endsWith("%")){const i=parseFloat(e);if(!Number.isNaN(i))return Math.floor(n*i*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function IC(e,n,i){if(typeof e=="string"||typeof e=="number"){const l=_l(e,i),o=_l(e,n);return{top:l,right:o,bottom:l,left:o,x:o*2,y:l*2}}if(typeof e=="object"){const l=_l(e.top??e.y??0,i),o=_l(e.bottom??e.y??0,i),u=_l(e.left??e.x??0,n),c=_l(e.right??e.x??0,n);return{top:l,right:c,bottom:o,left:u,x:u+c,y:l+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function VC(e,n,i,l,o,u){const{x:c,y:f}=Ru(e,[n,i,l]),{x:p,y:d}=Ru({x:e.x+e.width,y:e.y+e.height},[n,i,l]),y=o-p,m=u-d;return{left:Math.floor(c),top:Math.floor(f),right:Math.floor(y),bottom:Math.floor(m)}}const Qh=(e,n,i,l,o,u)=>{const c=IC(u,n,i),f=(n-c.x)/e.width,p=(i-c.y)/e.height,d=Math.min(f,p),y=Bl(d,l,o),m=e.x+e.width/2,x=e.y+e.height/2,b=n/2-m*y,w=i/2-x*y,_=VC(e,b,w,y,n,i),C={left:Math.min(_.left-c.left,0),top:Math.min(_.top-c.top,0),right:Math.min(_.right-c.right,0),bottom:Math.min(_.bottom-c.bottom,0)};return{x:b-C.left+C.right,y:w-C.top+C.bottom,zoom:y}},ho=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Ul(e){return e!=null&&e!=="parent"}function Ei(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function pb(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function mb(e,n={width:0,height:0},i,l,o){const u={...e},c=l.get(i);if(c){const f=c.origin||o;u.x+=c.internals.positionAbsolute.x-(n.width??0)*f[0],u.y+=c.internals.positionAbsolute.y-(n.height??0)*f[1]}return u}function X0(e,n){if(e.size!==n.size)return!1;for(const i of e)if(!n.has(i))return!1;return!0}function YC(){let e,n;return{promise:new Promise((l,o)=>{e=l,n=o}),resolve:e,reject:n}}function XC(e){return{...ab,...e||{}}}function to(e,{snapGrid:n=[0,0],snapToGrid:i=!1,transform:l,containerBounds:o}){const{x:u,y:c}=On(e),f=_o({x:u-(o?.left??0),y:c-(o?.top??0)},l),{x:p,y:d}=i?ko(f,n):f;return{xSnapped:p,ySnapped:d,...f}}const Ph=e=>({width:e.offsetWidth,height:e.offsetHeight}),gb=e=>e?.getRootNode?.()||window?.document,$C=["INPUT","SELECT","TEXTAREA"];function yb(e){const n=e.composedPath?.()?.[0]||e.target;return n?.nodeType!==1?!1:$C.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const xb=e=>"clientX"in e,On=(e,n)=>{const i=xb(e),l=i?e.clientX:e.touches?.[0].clientX,o=i?e.clientY:e.touches?.[0].clientY;return{x:l-(n?.left??0),y:o-(n?.top??0)}},$0=(e,n,i,l,o)=>{const u=n.querySelectorAll(`.${e}`);return!u||!u.length?null:Array.from(u).map(c=>{const f=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:e,nodeId:o,position:c.getAttribute("data-handlepos"),x:(f.left-i.left)/l,y:(f.top-i.top)/l,...Ph(c)}})};function bb({sourceX:e,sourceY:n,targetX:i,targetY:l,sourceControlX:o,sourceControlY:u,targetControlX:c,targetControlY:f}){const p=e*.125+o*.375+c*.375+i*.125,d=n*.125+u*.375+f*.375+l*.125,y=Math.abs(p-e),m=Math.abs(d-n);return[p,d,y,m]}function lu(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function F0({pos:e,x1:n,y1:i,x2:l,y2:o,c:u}){switch(e){case ye.Left:return[n-lu(n-l,u),i];case ye.Right:return[n+lu(l-n,u),i];case ye.Top:return[n,i-lu(i-o,u)];case ye.Bottom:return[n,i+lu(o-i,u)]}}function vb({sourceX:e,sourceY:n,sourcePosition:i=ye.Bottom,targetX:l,targetY:o,targetPosition:u=ye.Top,curvature:c=.25}){const[f,p]=F0({pos:i,x1:e,y1:n,x2:l,y2:o,c}),[d,y]=F0({pos:u,x1:l,y1:o,x2:e,y2:n,c}),[m,x,b,w]=bb({sourceX:e,sourceY:n,targetX:l,targetY:o,sourceControlX:f,sourceControlY:p,targetControlX:d,targetControlY:y});return[`M${e},${n} C${f},${p} ${d},${y} ${l},${o}`,m,x,b,w]}function wb({sourceX:e,sourceY:n,targetX:i,targetY:l}){const o=Math.abs(i-e)/2,u=i<e?i+o:i-o,c=Math.abs(l-n)/2,f=l<n?l+c:l-c;return[u,f,o,c]}function FC({sourceNode:e,targetNode:n,selected:i=!1,zIndex:l=0,elevateOnSelect:o=!1,zIndexMode:u="basic"}){if(u==="manual")return l;const c=o&&i?l+1e3:l,f=Math.max(e.parentId||o&&e.selected?e.internals.z:0,n.parentId||o&&n.selected?n.internals.z:0);return c+f}function GC({sourceNode:e,targetNode:n,width:i,height:l,transform:o}){const u=Gu(Ou(e),Ou(n));u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c={x:-o[0]/o[2],y:-o[1]/o[2],width:i/o[2],height:l/o[2]};return fo(c,Zu(u))>0}const ZC=({source:e,sourceHandle:n,target:i,targetHandle:l})=>`xy-edge__${e}${n||""}-${i}${l||""}`,QC=(e,n)=>n.some(i=>i.source===e.source&&i.target===e.target&&(i.sourceHandle===e.sourceHandle||!i.sourceHandle&&!e.sourceHandle)&&(i.targetHandle===e.targetHandle||!i.targetHandle&&!e.targetHandle)),Sb=(e,n,i={})=>{if(!e.source||!e.target)return n;const l=i.getEdgeId||ZC;let o;return ub(e)?o={...e}:o={...e,id:l(e)},QC(o,n)?n:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,n.concat(o))};function Eb({sourceX:e,sourceY:n,targetX:i,targetY:l}){const[o,u,c,f]=wb({sourceX:e,sourceY:n,targetX:i,targetY:l});return[`M ${e},${n}L ${i},${l}`,o,u,c,f]}const G0={[ye.Left]:{x:-1,y:0},[ye.Right]:{x:1,y:0},[ye.Top]:{x:0,y:-1},[ye.Bottom]:{x:0,y:1}},PC=({source:e,sourcePosition:n=ye.Bottom,target:i})=>n===ye.Left||n===ye.Right?e.x<i.x?{x:1,y:0}:{x:-1,y:0}:e.y<i.y?{x:0,y:1}:{x:0,y:-1},Z0=(e,n)=>Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function KC({source:e,sourcePosition:n=ye.Bottom,target:i,targetPosition:l=ye.Top,center:o,offset:u,stepPosition:c}){const f=G0[n],p=G0[l],d={x:e.x+f.x*u,y:e.y+f.y*u},y={x:i.x+p.x*u,y:i.y+p.y*u},m=PC({source:d,sourcePosition:n,target:y}),x=m.x!==0?"x":"y",b=m[x];let w=[],_,C;const k={x:0,y:0},j={x:0,y:0},[,,E,D]=wb({sourceX:e.x,sourceY:e.y,targetX:i.x,targetY:i.y});if(f[x]*p[x]===-1){x==="x"?(_=o.x??d.x+(y.x-d.x)*c,C=o.y??(d.y+y.y)/2):(_=o.x??(d.x+y.x)/2,C=o.y??d.y+(y.y-d.y)*c);const z=[{x:_,y:d.y},{x:_,y:y.y}],L=[{x:d.x,y:C},{x:y.x,y:C}];f[x]===b?w=x==="x"?z:L:w=x==="x"?L:z}else{const z=[{x:d.x,y:y.y}],L=[{x:y.x,y:d.y}];if(x==="x"?w=f.x===b?L:z:w=f.y===b?z:L,n===l){const X=Math.abs(e[x]-i[x]);if(X<=u){const te=Math.min(u-1,u-X);f[x]===b?k[x]=(d[x]>e[x]?-1:1)*te:j[x]=(y[x]>i[x]?-1:1)*te}}if(n!==l){const X=x==="x"?"y":"x",te=f[x]===p[X],R=d[X]>y[X],B=d[X]<y[X];(f[x]===1&&(!te&&R||te&&B)||f[x]!==1&&(!te&&B||te&&R))&&(w=x==="x"?z:L)}const G={x:d.x+k.x,y:d.y+k.y},Q={x:y.x+j.x,y:y.y+j.y},I=Math.max(Math.abs(G.x-w[0].x),Math.abs(Q.x-w[0].x)),Y=Math.max(Math.abs(G.y-w[0].y),Math.abs(Q.y-w[0].y));I>=Y?(_=(G.x+Q.x)/2,C=w[0].y):(_=w[0].x,C=(G.y+Q.y)/2)}return[[e,{x:d.x+k.x,y:d.y+k.y},...w,{x:y.x+j.x,y:y.y+j.y},i],_,C,E,D]}function JC(e,n,i,l){const o=Math.min(Z0(e,n)/2,Z0(n,i)/2,l),{x:u,y:c}=n;if(e.x===u&&u===i.x||e.y===c&&c===i.y)return`L${u} ${c}`;if(e.y===c){const d=e.x<i.x?-1:1,y=e.y<i.y?1:-1;return`L ${u+o*d},${c}Q ${u},${c} ${u},${c+o*y}`}const f=e.x<i.x?1:-1,p=e.y<i.y?-1:1;return`L ${u},${c+o*p}Q ${u},${c} ${u+o*f},${c}`}function gh({sourceX:e,sourceY:n,sourcePosition:i=ye.Bottom,targetX:l,targetY:o,targetPosition:u=ye.Top,borderRadius:c=5,centerX:f,centerY:p,offset:d=20,stepPosition:y=.5}){const[m,x,b,w,_]=KC({source:{x:e,y:n},sourcePosition:i,target:{x:l,y:o},targetPosition:u,center:{x:f,y:p},offset:d,stepPosition:y});return[m.reduce((k,j,E)=>{let D="";return E>0&&E<m.length-1?D=JC(m[E-1],j,m[E+1],c):D=`${E===0?"M":"L"}${j.x} ${j.y}`,k+=D,k},""),x,b,w,_]}function Q0(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function WC(e){const{sourceNode:n,targetNode:i}=e;if(!Q0(n)||!Q0(i))return null;const l=n.internals.handleBounds||P0(n.handles),o=i.internals.handleBounds||P0(i.handles),u=K0(l?.source??[],e.sourceHandle),c=K0(e.connectionMode===Ll.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!u||!c)return e.onError?.("008",Fn.error008(u?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const f=u?.position||ye.Bottom,p=c?.position||ye.Top,d=Lr(n,u,f),y=Lr(i,c,p);return{sourceX:d.x,sourceY:d.y,targetX:y.x,targetY:y.y,sourcePosition:f,targetPosition:p}}function P0(e){if(!e)return null;const n=[],i=[];for(const l of e)l.width=l.width??1,l.height=l.height??1,l.type==="source"?n.push(l):l.type==="target"&&i.push(l);return{source:n,target:i}}function Lr(e,n,i=ye.Left,l=!1){const o=(n?.x??0)+e.internals.positionAbsolute.x,u=(n?.y??0)+e.internals.positionAbsolute.y,{width:c,height:f}=n??Ei(e);if(l)return{x:o+c/2,y:u+f/2};switch(n?.position??i){case ye.Top:return{x:o+c/2,y:u};case ye.Right:return{x:o+c,y:u+f/2};case ye.Bottom:return{x:o+c/2,y:u+f};case ye.Left:return{x:o,y:u+f/2}}}function K0(e,n){return e&&(n?e.find(i=>i.id===n):e[0])||null}function yh(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(l=>`${l}=${e[l]}`).join("&")}`:""}function eN(e,{id:n,defaultColor:i,defaultMarkerStart:l,defaultMarkerEnd:o}){const u=new Set;return e.reduce((c,f)=>([f.markerStart||l,f.markerEnd||o].forEach(p=>{if(p&&typeof p=="object"){const d=yh(p,n);u.has(d)||(c.push({id:d,color:p.color||i,...p}),u.add(d))}}),c),[]).sort((c,f)=>c.id.localeCompare(f.id))}const kb=1e3,tN=10,Kh={nodeOrigin:[0,0],nodeExtent:uo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},nN={...Kh,checkEquality:!0};function Jh(e,n){const i={...e};for(const l in n)n[l]!==void 0&&(i[l]=n[l]);return i}function iN(e,n,i){const l=Jh(Kh,i);for(const o of e.values())if(o.parentId)ep(o,e,n,l);else{const u=So(o,l.nodeOrigin),c=Ul(o.extent)?o.extent:l.nodeExtent,f=jr(u,c,Ei(o));o.internals.positionAbsolute=f}}function rN(e,n){if(!e.handles)return e.measured?n?.internals.handleBounds:void 0;const i=[],l=[];for(const o of e.handles){const u={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?i.push(u):o.type==="target"&&l.push(u)}return{source:i,target:l}}function Wh(e){return e==="manual"}function xh(e,n,i,l={}){const o=Jh(nN,l),u={i:0},c=new Map(n),f=o?.elevateNodesOnSelect&&!Wh(o.zIndexMode)?kb:0;let p=e.length>0;n.clear(),i.clear();for(const d of e){let y=c.get(d.id);if(o.checkEquality&&d===y?.internals.userNode)n.set(d.id,y);else{const m=So(d,o.nodeOrigin),x=Ul(d.extent)?d.extent:o.nodeExtent,b=jr(m,x,Ei(d));y={...o.defaults,...d,measured:{width:d.measured?.width,height:d.measured?.height},internals:{positionAbsolute:b,handleBounds:rN(d,y),z:_b(d,f,o.zIndexMode),userNode:d}},n.set(d.id,y)}(y.measured===void 0||y.measured.width===void 0||y.measured.height===void 0)&&!y.hidden&&(p=!1),d.parentId&&ep(y,n,i,l,u)}return p}function lN(e,n){if(!e.parentId)return;const i=n.get(e.parentId);i?i.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function ep(e,n,i,l,o){const{elevateNodesOnSelect:u,nodeOrigin:c,nodeExtent:f,zIndexMode:p}=Jh(Kh,l),d=e.parentId,y=n.get(d);if(!y){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}lN(e,i),o&&!y.parentId&&y.internals.rootParentIndex===void 0&&p==="auto"&&(y.internals.rootParentIndex=++o.i,y.internals.z=y.internals.z+o.i*tN),o&&y.internals.rootParentIndex!==void 0&&(o.i=y.internals.rootParentIndex);const m=u&&!Wh(p)?kb:0,{x,y:b,z:w}=aN(e,y,c,f,m,p),{positionAbsolute:_}=e.internals,C=x!==_.x||b!==_.y;(C||w!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:C?{x,y:b}:_,z:w}})}function _b(e,n,i){const l=Dn(e.zIndex)?e.zIndex:0;return Wh(i)?l:l+(e.selected?n:0)}function aN(e,n,i,l,o,u){const{x:c,y:f}=n.internals.positionAbsolute,p=Ei(e),d=So(e,i),y=Ul(e.extent)?jr(d,e.extent,p):d;let m=jr({x:c+y.x,y:f+y.y},l,p);e.extent==="parent"&&(m=fb(m,p,n));const x=_b(e,o,u),b=n.internals.z??0;return{x:m.x,y:m.y,z:b>=x?b+1:x}}function tp(e,n,i,l=[0,0]){const o=[],u=new Map;for(const c of e){const f=n.get(c.parentId);if(!f)continue;const p=u.get(c.parentId)?.expandedRect??Hl(f),d=hb(p,c.rect);u.set(c.parentId,{expandedRect:d,parent:f})}return u.size>0&&u.forEach(({expandedRect:c,parent:f},p)=>{const d=f.internals.positionAbsolute,y=Ei(f),m=f.origin??l,x=c.x<d.x?Math.round(Math.abs(d.x-c.x)):0,b=c.y<d.y?Math.round(Math.abs(d.y-c.y)):0,w=Math.max(y.width,Math.round(c.width)),_=Math.max(y.height,Math.round(c.height)),C=(w-y.width)*m[0],k=(_-y.height)*m[1];(x>0||b>0||C||k)&&(o.push({id:p,type:"position",position:{x:f.position.x-x+C,y:f.position.y-b+k}}),i.get(p)?.forEach(j=>{e.some(E=>E.id===j.id)||o.push({id:j.id,type:"position",position:{x:j.position.x+x,y:j.position.y+b}})})),(y.width<c.width||y.height<c.height||x||b)&&o.push({id:p,type:"dimensions",setAttributes:!0,dimensions:{width:w+(x?m[0]*x-C:0),height:_+(b?m[1]*b-k:0)}})}),o}function oN(e,n,i,l,o,u,c){const f=l?.querySelector(".xyflow__viewport");let p=!1;if(!f)return{changes:[],updatedInternals:p};const d=[],y=window.getComputedStyle(f),{m22:m}=new window.DOMMatrixReadOnly(y.transform),x=[];for(const b of e.values()){const w=n.get(b.id);if(!w)continue;if(w.hidden){n.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),p=!0;continue}const _=Ph(b.nodeElement),C=w.measured.width!==_.width||w.measured.height!==_.height;if(!!(_.width&&_.height&&(C||!w.internals.handleBounds||b.force))){const j=b.nodeElement.getBoundingClientRect(),E=Ul(w.extent)?w.extent:u;let{positionAbsolute:D}=w.internals;w.parentId&&w.extent==="parent"?D=fb(D,_,n.get(w.parentId)):E&&(D=jr(D,E,_));const U={...w,measured:_,internals:{...w.internals,positionAbsolute:D,handleBounds:{source:$0("source",b.nodeElement,j,m,w.id),target:$0("target",b.nodeElement,j,m,w.id)}}};n.set(w.id,U),w.parentId&&ep(U,n,i,{nodeOrigin:o,zIndexMode:c}),p=!0,C&&(d.push({id:w.id,type:"dimensions",dimensions:_}),w.expandParent&&w.parentId&&x.push({id:w.id,parentId:w.parentId,rect:Hl(U,o)}))}}if(x.length>0){const b=tp(x,n,i,o);d.push(...b)}return{changes:d,updatedInternals:p}}async function sN({delta:e,panZoom:n,transform:i,translateExtent:l,width:o,height:u}){if(!n||!e.x&&!e.y)return Promise.resolve(!1);const c=await n.setViewportConstrained({x:i[0]+e.x,y:i[1]+e.y,zoom:i[2]},[[0,0],[o,u]],l),f=!!c&&(c.x!==i[0]||c.y!==i[1]||c.k!==i[2]);return Promise.resolve(f)}function J0(e,n,i,l,o,u){let c=o;const f=l.get(c)||new Map;l.set(c,f.set(i,n)),c=`${o}-${e}`;const p=l.get(c)||new Map;if(l.set(c,p.set(i,n)),u){c=`${o}-${e}-${u}`;const d=l.get(c)||new Map;l.set(c,d.set(i,n))}}function Cb(e,n,i){e.clear(),n.clear();for(const l of i){const{source:o,target:u,sourceHandle:c=null,targetHandle:f=null}=l,p={edgeId:l.id,source:o,target:u,sourceHandle:c,targetHandle:f},d=`${o}-${c}--${u}-${f}`,y=`${u}-${f}--${o}-${c}`;J0("source",p,y,e,o,c),J0("target",p,d,e,u,f),n.set(l.id,l)}}function Nb(e,n){if(!e.parentId)return!1;const i=n.get(e.parentId);return i?i.selected?!0:Nb(i,n):!1}function W0(e,n,i){let l=e;do{if(l?.matches?.(n))return!0;if(l===i)return!1;l=l?.parentElement}while(l);return!1}function uN(e,n,i,l){const o=new Map;for(const[u,c]of e)if((c.selected||c.id===l)&&(!c.parentId||!Nb(c,e))&&(c.draggable||n&&typeof c.draggable>"u")){const f=e.get(u);f&&o.set(u,{id:u,position:f.position||{x:0,y:0},distance:{x:i.x-f.internals.positionAbsolute.x,y:i.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return o}function Dd({nodeId:e,dragItems:n,nodeLookup:i,dragging:l=!0}){const o=[];for(const[c,f]of n){const p=i.get(c)?.internals.userNode;p&&o.push({...p,position:f.position,dragging:l})}if(!e)return[o[0],o];const u=i.get(e)?.internals.userNode;return[u?{...u,position:n.get(e)?.position||u.position,dragging:l}:o[0],o]}function cN({dragItems:e,snapGrid:n,x:i,y:l}){const o=e.values().next().value;if(!o)return null;const u={x:i-o.distance.x,y:l-o.distance.y},c=ko(u,n);return{x:c.x-u.x,y:c.y-u.y}}function fN({onNodeMouseDown:e,getStoreItems:n,onDragStart:i,onDrag:l,onDragStop:o}){let u={x:null,y:null},c=0,f=new Map,p=!1,d={x:0,y:0},y=null,m=!1,x=null,b=!1,w=!1,_=null;function C({noDragClassName:j,handleSelector:E,domNode:D,isSelectable:U,nodeId:z,nodeClickDistance:L=0}){x=cn(D);function G({x:X,y:te}){const{nodeLookup:R,nodeExtent:B,snapGrid:M,snapToGrid:H,nodeOrigin:$,onNodeDrag:P,onSelectionDrag:A,onError:O,updateNodePositions:V}=n();u={x:X,y:te};let T=!1;const ne=f.size>1,ue=ne&&B?mh(Eo(f)):null,ce=ne&&H?cN({dragItems:f,snapGrid:M,x:X,y:te}):null;for(const[de,se]of f){if(!R.has(de))continue;let pe={x:X-se.distance.x,y:te-se.distance.y};H&&(pe=ce?{x:Math.round(pe.x+ce.x),y:Math.round(pe.y+ce.y)}:ko(pe,M));let Ee=null;if(ne&&B&&!se.extent&&ue){const{positionAbsolute:ke}=se.internals,ze=ke.x-ue.x+B[0][0],$e=ke.x+se.measured.width-ue.x2+B[1][0],Ve=ke.y-ue.y+B[0][1],ct=ke.y+se.measured.height-ue.y2+B[1][1];Ee=[[ze,Ve],[$e,ct]]}const{position:_e,positionAbsolute:be}=cb({nodeId:de,nextPosition:pe,nodeLookup:R,nodeExtent:Ee||B,nodeOrigin:$,onError:O});T=T||se.position.x!==_e.x||se.position.y!==_e.y,se.position=_e,se.internals.positionAbsolute=be}if(w=w||T,!!T&&(V(f,!0),_&&(l||P||!z&&A))){const[de,se]=Dd({nodeId:z,dragItems:f,nodeLookup:R});l?.(_,f,de,se),P?.(_,de,se),z||A?.(_,se)}}async function Q(){if(!y)return;const{transform:X,panBy:te,autoPanSpeed:R,autoPanOnNodeDrag:B}=n();if(!B){p=!1,cancelAnimationFrame(c);return}const[M,H]=db(d,y,R);(M!==0||H!==0)&&(u.x=(u.x??0)-M/X[2],u.y=(u.y??0)-H/X[2],await te({x:M,y:H})&&G(u)),c=requestAnimationFrame(Q)}function I(X){const{nodeLookup:te,multiSelectionActive:R,nodesDraggable:B,transform:M,snapGrid:H,snapToGrid:$,selectNodesOnDrag:P,onNodeDragStart:A,onSelectionDragStart:O,unselectNodesAndEdges:V}=n();m=!0,(!P||!U)&&!R&&z&&(te.get(z)?.selected||V()),U&&P&&z&&e?.(z);const T=to(X.sourceEvent,{transform:M,snapGrid:H,snapToGrid:$,containerBounds:y});if(u=T,f=uN(te,B,T,z),f.size>0&&(i||A||!z&&O)){const[ne,ue]=Dd({nodeId:z,dragItems:f,nodeLookup:te});i?.(X.sourceEvent,f,ne,ue),A?.(X.sourceEvent,ne,ue),z||O?.(X.sourceEvent,ue)}}const Y=Y1().clickDistance(L).on("start",X=>{const{domNode:te,nodeDragThreshold:R,transform:B,snapGrid:M,snapToGrid:H}=n();y=te?.getBoundingClientRect()||null,b=!1,w=!1,_=X.sourceEvent,R===0&&I(X),u=to(X.sourceEvent,{transform:B,snapGrid:M,snapToGrid:H,containerBounds:y}),d=On(X.sourceEvent,y)}).on("drag",X=>{const{autoPanOnNodeDrag:te,transform:R,snapGrid:B,snapToGrid:M,nodeDragThreshold:H,nodeLookup:$}=n(),P=to(X.sourceEvent,{transform:R,snapGrid:B,snapToGrid:M,containerBounds:y});if(_=X.sourceEvent,(X.sourceEvent.type==="touchmove"&&X.sourceEvent.touches.length>1||z&&!$.has(z))&&(b=!0),!b){if(!p&&te&&m&&(p=!0,Q()),!m){const A=On(X.sourceEvent,y),O=A.x-d.x,V=A.y-d.y;Math.sqrt(O*O+V*V)>H&&I(X)}(u.x!==P.xSnapped||u.y!==P.ySnapped)&&f&&m&&(d=On(X.sourceEvent,y),G(P))}}).on("end",X=>{if(!(!m||b)&&(p=!1,m=!1,cancelAnimationFrame(c),f.size>0)){const{nodeLookup:te,updateNodePositions:R,onNodeDragStop:B,onSelectionDragStop:M}=n();if(w&&(R(f,!1),w=!1),o||B||!z&&M){const[H,$]=Dd({nodeId:z,dragItems:f,nodeLookup:te,dragging:!1});o?.(X.sourceEvent,f,H,$),B?.(X.sourceEvent,H,$),z||M?.(X.sourceEvent,$)}}}).filter(X=>{const te=X.target;return!X.button&&(!j||!W0(te,`.${j}`,D))&&(!E||W0(te,E,D))});x.call(Y)}function k(){x?.on(".drag",null)}return{update:C,destroy:k}}function dN(e,n,i){const l=[],o={x:e.x-i,y:e.y-i,width:i*2,height:i*2};for(const u of n.values())fo(o,Hl(u))>0&&l.push(u);return l}const hN=250;function pN(e,n,i,l){let o=[],u=1/0;const c=dN(e,i,n+hN);for(const f of c){const p=[...f.internals.handleBounds?.source??[],...f.internals.handleBounds?.target??[]];for(const d of p){if(l.nodeId===d.nodeId&&l.type===d.type&&l.id===d.id)continue;const{x:y,y:m}=Lr(f,d,d.position,!0),x=Math.sqrt(Math.pow(y-e.x,2)+Math.pow(m-e.y,2));x>n||(x<u?(o=[{...d,x:y,y:m}],u=x):x===u&&o.push({...d,x:y,y:m}))}}if(!o.length)return null;if(o.length>1){const f=l.type==="source"?"target":"source";return o.find(p=>p.type===f)??o[0]}return o[0]}function Tb(e,n,i,l,o,u=!1){const c=l.get(e);if(!c)return null;const f=o==="strict"?c.internals.handleBounds?.[n]:[...c.internals.handleBounds?.source??[],...c.internals.handleBounds?.target??[]],p=(i?f?.find(d=>d.id===i):f?.[0])??null;return p&&u?{...p,...Lr(c,p,p.position,!0)}:p}function Ab(e,n){return e||(n?.classList.contains("target")?"target":n?.classList.contains("source")?"source":null)}function mN(e,n){let i=null;return n?i=!0:e&&!n&&(i=!1),i}const Mb=()=>!0;function gN(e,{connectionMode:n,connectionRadius:i,handleId:l,nodeId:o,edgeUpdaterType:u,isTarget:c,domNode:f,nodeLookup:p,lib:d,autoPanOnConnect:y,flowId:m,panBy:x,cancelConnection:b,onConnectStart:w,onConnect:_,onConnectEnd:C,isValidConnection:k=Mb,onReconnectEnd:j,updateConnection:E,getTransform:D,getFromHandle:U,autoPanSpeed:z,dragThreshold:L=1,handleDomNode:G}){const Q=gb(e.target);let I=0,Y;const{x:X,y:te}=On(e),R=Ab(u,G),B=f?.getBoundingClientRect();let M=!1;if(!B||!R)return;const H=Tb(o,R,l,p,n);if(!H)return;let $=On(e,B),P=!1,A=null,O=!1,V=null;function T(){if(!y||!B)return;const[_e,be]=db($,B,z);x({x:_e,y:be}),I=requestAnimationFrame(T)}const ne={...H,nodeId:o,type:R,position:H.position},ue=p.get(o);let de={inProgress:!0,isValid:null,from:Lr(ue,ne,ye.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:ue,to:$,toHandle:null,toPosition:I0[ne.position],toNode:null,pointer:$};function se(){M=!0,E(de),w?.(e,{nodeId:o,handleId:l,handleType:R})}L===0&&se();function pe(_e){if(!M){const{x:ct,y:Jt}=On(_e),zt=ct-X,qt=Jt-te;if(!(zt*zt+qt*qt>L*L))return;se()}if(!U()||!ne){Ee(_e);return}const be=D();$=On(_e,B),Y=pN(_o($,be,!1,[1,1]),i,p,ne),P||(T(),P=!0);const ke=zb(_e,{handle:Y,connectionMode:n,fromNodeId:o,fromHandleId:l,fromType:c?"target":"source",isValidConnection:k,doc:Q,lib:d,flowId:m,nodeLookup:p});V=ke.handleDomNode,A=ke.connection,O=mN(!!Y,ke.isValid);const ze=p.get(o),$e=ze?Lr(ze,ne,ye.Left,!0):de.from,Ve={...de,from:$e,isValid:O,to:ke.toHandle&&O?Ru({x:ke.toHandle.x,y:ke.toHandle.y},be):$,toHandle:ke.toHandle,toPosition:O&&ke.toHandle?ke.toHandle.position:I0[ne.position],toNode:ke.toHandle?p.get(ke.toHandle.nodeId):null,pointer:$};E(Ve),de=Ve}function Ee(_e){if(!("touches"in _e&&_e.touches.length>0)){if(M){(Y||V)&&A&&O&&_?.(A);const{inProgress:be,...ke}=de,ze={...ke,toPosition:de.toHandle?de.toPosition:null};C?.(_e,ze),u&&j?.(_e,ze)}b(),cancelAnimationFrame(I),P=!1,O=!1,A=null,V=null,Q.removeEventListener("mousemove",pe),Q.removeEventListener("mouseup",Ee),Q.removeEventListener("touchmove",pe),Q.removeEventListener("touchend",Ee)}}Q.addEventListener("mousemove",pe),Q.addEventListener("mouseup",Ee),Q.addEventListener("touchmove",pe),Q.addEventListener("touchend",Ee)}function zb(e,{handle:n,connectionMode:i,fromNodeId:l,fromHandleId:o,fromType:u,doc:c,lib:f,flowId:p,isValidConnection:d=Mb,nodeLookup:y}){const m=u==="target",x=n?c.querySelector(`.${f}-flow__handle[data-id="${p}-${n?.nodeId}-${n?.id}-${n?.type}"]`):null,{x:b,y:w}=On(e),_=c.elementFromPoint(b,w),C=_?.classList.contains(`${f}-flow__handle`)?_:x,k={handleDomNode:C,isValid:!1,connection:null,toHandle:null};if(C){const j=Ab(void 0,C),E=C.getAttribute("data-nodeid"),D=C.getAttribute("data-handleid"),U=C.classList.contains("connectable"),z=C.classList.contains("connectableend");if(!E||!j)return k;const L={source:m?E:l,sourceHandle:m?D:o,target:m?l:E,targetHandle:m?o:D};k.connection=L;const Q=U&&z&&(i===Ll.Strict?m&&j==="source"||!m&&j==="target":E!==l||D!==o);k.isValid=Q&&d(L),k.toHandle=Tb(E,j,D,y,i,!0)}return k}const bh={onPointerDown:gN,isValid:zb};function yN({domNode:e,panZoom:n,getTransform:i,getViewScale:l}){const o=cn(e);function u({translateExtent:f,width:p,height:d,zoomStep:y=1,pannable:m=!0,zoomable:x=!0,inversePan:b=!1}){const w=E=>{if(E.sourceEvent.type!=="wheel"||!n)return;const D=i(),U=E.sourceEvent.ctrlKey&&ho()?10:1,z=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*y,L=D[2]*Math.pow(2,z*U);n.scaleTo(L)};let _=[0,0];const C=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(_=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},k=E=>{const D=i();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!n)return;const U=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],z=[U[0]-_[0],U[1]-_[1]];_=U;const L=l()*Math.max(D[2],Math.log(D[2]))*(b?-1:1),G={x:D[0]-z[0]*L,y:D[1]-z[1]*L},Q=[[0,0],[p,d]];n.setViewportConstrained({x:G.x,y:G.y,zoom:D[2]},Q,f)},j=rb().on("start",C).on("zoom",m?k:null).on("zoom.wheel",x?w:null);o.call(j,{})}function c(){o.on("zoom",null)}return{update:u,destroy:c,pointer:An}}const Qu=e=>({x:e.x,y:e.y,zoom:e.k}),Od=({x:e,y:n,zoom:i})=>Fu.translate(e,n).scale(i),Al=(e,n)=>e.target.closest(`.${n}`),Db=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),xN=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Rd=(e,n=0,i=xN,l=()=>{})=>{const o=typeof n=="number"&&n>0;return o||l(),o?e.transition().duration(n).ease(i).on("end",l):e},Ob=e=>{const n=e.ctrlKey&&ho()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function bN({zoomPanValues:e,noWheelClassName:n,d3Selection:i,d3Zoom:l,panOnScrollMode:o,panOnScrollSpeed:u,zoomOnPinch:c,onPanZoomStart:f,onPanZoom:p,onPanZoomEnd:d}){return y=>{if(Al(y,n))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const m=i.property("__zoom").k||1;if(y.ctrlKey&&c){const C=An(y),k=Ob(y),j=m*Math.pow(2,k);l.scaleTo(i,j,C,y);return}const x=y.deltaMode===1?20:1;let b=o===Dr.Vertical?0:y.deltaX*x,w=o===Dr.Horizontal?0:y.deltaY*x;!ho()&&y.shiftKey&&o!==Dr.Vertical&&(b=y.deltaY*x,w=0),l.translateBy(i,-(b/m)*u,-(w/m)*u,{internal:!0});const _=Qu(i.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(p?.(y,_),e.panScrollTimeout=setTimeout(()=>{d?.(y,_),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,f?.(y,_))}}function vN({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:i}){return function(l,o){const u=l.type==="wheel",c=!n&&u&&!l.ctrlKey,f=Al(l,e);if(l.ctrlKey&&u&&f&&l.preventDefault(),c||f)return null;l.preventDefault(),i.call(this,l,o)}}function wN({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:i}){return l=>{if(l.sourceEvent?.internal)return;const o=Qu(l.transform);e.mouseButton=l.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,l.sourceEvent?.type==="mousedown"&&n(!0),i&&i?.(l.sourceEvent,o)}}function SN({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:i,onTransformChange:l,onPanZoom:o}){return u=>{e.usedRightMouseButton=!!(i&&Db(n,e.mouseButton??0)),u.sourceEvent?.sync||l([u.transform.x,u.transform.y,u.transform.k]),o&&!u.sourceEvent?.internal&&o?.(u.sourceEvent,Qu(u.transform))}}function EN({zoomPanValues:e,panOnDrag:n,panOnScroll:i,onDraggingChange:l,onPanZoomEnd:o,onPaneContextMenu:u}){return c=>{if(!c.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,u&&Db(n,e.mouseButton??0)&&!e.usedRightMouseButton&&c.sourceEvent&&u(c.sourceEvent),e.usedRightMouseButton=!1,l(!1),o)){const f=Qu(c.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(c.sourceEvent,f)},i?150:0)}}}function kN({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:i,panOnDrag:l,panOnScroll:o,zoomOnDoubleClick:u,userSelectionActive:c,noWheelClassName:f,noPanClassName:p,lib:d,connectionInProgress:y}){return m=>{const x=e||n,b=i&&m.ctrlKey,w=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(Al(m,`${d}-flow__node`)||Al(m,`${d}-flow__edge`)))return!0;if(!l&&!x&&!o&&!u&&!i||c||y&&!w||Al(m,f)&&w||Al(m,p)&&(!w||o&&w&&!e)||!i&&m.ctrlKey&&w)return!1;if(!i&&m.type==="touchstart"&&m.touches?.length>1)return m.preventDefault(),!1;if(!x&&!o&&!b&&w||!l&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(l)&&!l.includes(m.button)&&m.type==="mousedown")return!1;const _=Array.isArray(l)&&l.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||w)&&_}}function _N({domNode:e,minZoom:n,maxZoom:i,translateExtent:l,viewport:o,onPanZoom:u,onPanZoomStart:c,onPanZoomEnd:f,onDraggingChange:p}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=e.getBoundingClientRect(),m=rb().scaleExtent([n,i]).translateExtent(l),x=cn(e).call(m);j({x:o.x,y:o.y,zoom:Bl(o.zoom,n,i)},[[0,0],[y.width,y.height]],l);const b=x.on("wheel.zoom"),w=x.on("dblclick.zoom");m.wheelDelta(Ob);function _(Y,X){return x?new Promise(te=>{m?.interpolate(X?.interpolate==="linear"?eo:gu).transform(Rd(x,X?.duration,X?.ease,()=>te(!0)),Y)}):Promise.resolve(!1)}function C({noWheelClassName:Y,noPanClassName:X,onPaneContextMenu:te,userSelectionActive:R,panOnScroll:B,panOnDrag:M,panOnScrollMode:H,panOnScrollSpeed:$,preventScrolling:P,zoomOnPinch:A,zoomOnScroll:O,zoomOnDoubleClick:V,zoomActivationKeyPressed:T,lib:ne,onTransformChange:ue,connectionInProgress:ce,paneClickDistance:de,selectionOnDrag:se}){R&&!d.isZoomingOrPanning&&k();const pe=B&&!T&&!R;m.clickDistance(se?1/0:!Dn(de)||de<0?0:de);const Ee=pe?bN({zoomPanValues:d,noWheelClassName:Y,d3Selection:x,d3Zoom:m,panOnScrollMode:H,panOnScrollSpeed:$,zoomOnPinch:A,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:f}):vN({noWheelClassName:Y,preventScrolling:P,d3ZoomHandler:b});if(x.on("wheel.zoom",Ee,{passive:!1}),!R){const be=wN({zoomPanValues:d,onDraggingChange:p,onPanZoomStart:c});m.on("start",be);const ke=SN({zoomPanValues:d,panOnDrag:M,onPaneContextMenu:!!te,onPanZoom:u,onTransformChange:ue});m.on("zoom",ke);const ze=EN({zoomPanValues:d,panOnDrag:M,panOnScroll:B,onPaneContextMenu:te,onPanZoomEnd:f,onDraggingChange:p});m.on("end",ze)}const _e=kN({zoomActivationKeyPressed:T,panOnDrag:M,zoomOnScroll:O,panOnScroll:B,zoomOnDoubleClick:V,zoomOnPinch:A,userSelectionActive:R,noPanClassName:X,noWheelClassName:Y,lib:ne,connectionInProgress:ce});m.filter(_e),V?x.on("dblclick.zoom",w):x.on("dblclick.zoom",null)}function k(){m.on("zoom",null)}async function j(Y,X,te){const R=Od(Y),B=m?.constrain()(R,X,te);return B&&await _(B),new Promise(M=>M(B))}async function E(Y,X){const te=Od(Y);return await _(te,X),new Promise(R=>R(te))}function D(Y){if(x){const X=Od(Y),te=x.property("__zoom");(te.k!==Y.zoom||te.x!==Y.x||te.y!==Y.y)&&m?.transform(x,X,null,{sync:!0})}}function U(){const Y=x?ib(x.node()):{x:0,y:0,k:1};return{x:Y.x,y:Y.y,zoom:Y.k}}function z(Y,X){return x?new Promise(te=>{m?.interpolate(X?.interpolate==="linear"?eo:gu).scaleTo(Rd(x,X?.duration,X?.ease,()=>te(!0)),Y)}):Promise.resolve(!1)}function L(Y,X){return x?new Promise(te=>{m?.interpolate(X?.interpolate==="linear"?eo:gu).scaleBy(Rd(x,X?.duration,X?.ease,()=>te(!0)),Y)}):Promise.resolve(!1)}function G(Y){m?.scaleExtent(Y)}function Q(Y){m?.translateExtent(Y)}function I(Y){const X=!Dn(Y)||Y<0?0:Y;m?.clickDistance(X)}return{update:C,destroy:k,setViewport:E,setViewportConstrained:j,getViewport:U,scaleTo:z,scaleBy:L,setScaleExtent:G,setTranslateExtent:Q,syncViewport:D,setClickDistance:I}}var ql;(function(e){e.Line="line",e.Handle="handle"})(ql||(ql={}));function CN({width:e,prevWidth:n,height:i,prevHeight:l,affectsX:o,affectsY:u}){const c=e-n,f=i-l,p=[c>0?1:c<0?-1:0,f>0?1:f<0?-1:0];return c&&o&&(p[0]=p[0]*-1),f&&u&&(p[1]=p[1]*-1),p}function ex(e){const n=e.includes("right")||e.includes("left"),i=e.includes("bottom")||e.includes("top"),l=e.includes("left"),o=e.includes("top");return{isHorizontal:n,isVertical:i,affectsX:l,affectsY:o}}function er(e,n){return Math.max(0,n-e)}function tr(e,n){return Math.max(0,e-n)}function au(e,n,i){return Math.max(0,n-e,e-i)}function tx(e,n){return e?!n:n}function NN(e,n,i,l,o,u,c,f){let{affectsX:p,affectsY:d}=n;const{isHorizontal:y,isVertical:m}=n,x=y&&m,{xSnapped:b,ySnapped:w}=i,{minWidth:_,maxWidth:C,minHeight:k,maxHeight:j}=l,{x:E,y:D,width:U,height:z,aspectRatio:L}=e;let G=Math.floor(y?b-e.pointerX:0),Q=Math.floor(m?w-e.pointerY:0);const I=U+(p?-G:G),Y=z+(d?-Q:Q),X=-u[0]*U,te=-u[1]*z;let R=au(I,_,C),B=au(Y,k,j);if(c){let $=0,P=0;p&&G<0?$=er(E+G+X,c[0][0]):!p&&G>0&&($=tr(E+I+X,c[1][0])),d&&Q<0?P=er(D+Q+te,c[0][1]):!d&&Q>0&&(P=tr(D+Y+te,c[1][1])),R=Math.max(R,$),B=Math.max(B,P)}if(f){let $=0,P=0;p&&G>0?$=tr(E+G,f[0][0]):!p&&G<0&&($=er(E+I,f[1][0])),d&&Q>0?P=tr(D+Q,f[0][1]):!d&&Q<0&&(P=er(D+Y,f[1][1])),R=Math.max(R,$),B=Math.max(B,P)}if(o){if(y){const $=au(I/L,k,j)*L;if(R=Math.max(R,$),c){let P=0;!p&&!d||p&&!d&&x?P=tr(D+te+I/L,c[1][1])*L:P=er(D+te+(p?G:-G)/L,c[0][1])*L,R=Math.max(R,P)}if(f){let P=0;!p&&!d||p&&!d&&x?P=er(D+I/L,f[1][1])*L:P=tr(D+(p?G:-G)/L,f[0][1])*L,R=Math.max(R,P)}}if(m){const $=au(Y*L,_,C)/L;if(B=Math.max(B,$),c){let P=0;!p&&!d||d&&!p&&x?P=tr(E+Y*L+X,c[1][0])/L:P=er(E+(d?Q:-Q)*L+X,c[0][0])/L,B=Math.max(B,P)}if(f){let P=0;!p&&!d||d&&!p&&x?P=er(E+Y*L,f[1][0])/L:P=tr(E+(d?Q:-Q)*L,f[0][0])/L,B=Math.max(B,P)}}}Q=Q+(Q<0?B:-B),G=G+(G<0?R:-R),o&&(x?I>Y*L?Q=(tx(p,d)?-G:G)/L:G=(tx(p,d)?-Q:Q)*L:y?(Q=G/L,d=p):(G=Q*L,p=d));const M=p?E+G:E,H=d?D+Q:D;return{width:U+(p?-G:G),height:z+(d?-Q:Q),x:u[0]*G*(p?-1:1)+M,y:u[1]*Q*(d?-1:1)+H}}const Rb={width:0,height:0,x:0,y:0},TN={...Rb,pointerX:0,pointerY:0,aspectRatio:1};function AN(e){return[[0,0],[e.measured.width,e.measured.height]]}function MN(e,n,i){const l=n.position.x+e.position.x,o=n.position.y+e.position.y,u=e.measured.width??0,c=e.measured.height??0,f=i[0]*u,p=i[1]*c;return[[l-f,o-p],[l+u-f,o+c-p]]}function zN({domNode:e,nodeId:n,getStoreItems:i,onChange:l,onEnd:o}){const u=cn(e);let c={controlDirection:ex("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:d,boundaries:y,keepAspectRatio:m,resizeDirection:x,onResizeStart:b,onResize:w,onResizeEnd:_,shouldResize:C}){let k={...Rb},j={...TN};c={boundaries:y,resizeDirection:x,keepAspectRatio:m,controlDirection:ex(d)};let E,D=null,U=[],z,L,G,Q=!1;const I=Y1().on("start",Y=>{const{nodeLookup:X,transform:te,snapGrid:R,snapToGrid:B,nodeOrigin:M,paneDomNode:H}=i();if(E=X.get(n),!E)return;D=H?.getBoundingClientRect()??null;const{xSnapped:$,ySnapped:P}=to(Y.sourceEvent,{transform:te,snapGrid:R,snapToGrid:B,containerBounds:D});k={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},j={...k,pointerX:$,pointerY:P,aspectRatio:k.width/k.height},z=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(z=X.get(E.parentId),L=z&&E.extent==="parent"?AN(z):void 0),U=[],G=void 0;for(const[A,O]of X)if(O.parentId===n&&(U.push({id:A,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const V=MN(O,E,O.origin??M);G?G=[[Math.min(V[0][0],G[0][0]),Math.min(V[0][1],G[0][1])],[Math.max(V[1][0],G[1][0]),Math.max(V[1][1],G[1][1])]]:G=V}b?.(Y,{...k})}).on("drag",Y=>{const{transform:X,snapGrid:te,snapToGrid:R,nodeOrigin:B}=i(),M=to(Y.sourceEvent,{transform:X,snapGrid:te,snapToGrid:R,containerBounds:D}),H=[];if(!E)return;const{x:$,y:P,width:A,height:O}=k,V={},T=E.origin??B,{width:ne,height:ue,x:ce,y:de}=NN(j,c.controlDirection,M,c.boundaries,c.keepAspectRatio,T,L,G),se=ne!==A,pe=ue!==O,Ee=ce!==$&&se,_e=de!==P&&pe;if(!Ee&&!_e&&!se&&!pe)return;if((Ee||_e||T[0]===1||T[1]===1)&&(V.x=Ee?ce:k.x,V.y=_e?de:k.y,k.x=V.x,k.y=V.y,U.length>0)){const $e=ce-$,Ve=de-P;for(const ct of U)ct.position={x:ct.position.x-$e+T[0]*(ne-A),y:ct.position.y-Ve+T[1]*(ue-O)},H.push(ct)}if((se||pe)&&(V.width=se&&(!c.resizeDirection||c.resizeDirection==="horizontal")?ne:k.width,V.height=pe&&(!c.resizeDirection||c.resizeDirection==="vertical")?ue:k.height,k.width=V.width,k.height=V.height),z&&E.expandParent){const $e=T[0]*(V.width??0);V.x&&V.x<$e&&(k.x=$e,j.x=j.x-(V.x-$e));const Ve=T[1]*(V.height??0);V.y&&V.y<Ve&&(k.y=Ve,j.y=j.y-(V.y-Ve))}const be=CN({width:k.width,prevWidth:A,height:k.height,prevHeight:O,affectsX:c.controlDirection.affectsX,affectsY:c.controlDirection.affectsY}),ke={...k,direction:be};C?.(Y,ke)!==!1&&(Q=!0,w?.(Y,ke),l(V,H))}).on("end",Y=>{Q&&(_?.(Y,{...k}),o?.({...k}),Q=!1)});u.call(I)}function p(){u.on(".drag",null)}return{update:f,destroy:p}}var jd={exports:{}},Ld={},Bd={exports:{}},Hd={};var nx;function DN(){if(nx)return Hd;nx=1;var e=bo();function n(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var i=typeof Object.is=="function"?Object.is:n,l=e.useState,o=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function f(m,x){var b=x(),w=l({inst:{value:b,getSnapshot:x}}),_=w[0].inst,C=w[1];return u(function(){_.value=b,_.getSnapshot=x,p(_)&&C({inst:_})},[m,b,x]),o(function(){return p(_)&&C({inst:_}),m(function(){p(_)&&C({inst:_})})},[m]),c(b),b}function p(m){var x=m.getSnapshot;m=m.value;try{var b=x();return!i(m,b)}catch{return!0}}function d(m,x){return x()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:f;return Hd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Hd}var ix;function ON(){return ix||(ix=1,Bd.exports=DN()),Bd.exports}var rx;function RN(){if(rx)return Ld;rx=1;var e=bo(),n=ON();function i(d,y){return d===y&&(d!==0||1/d===1/y)||d!==d&&y!==y}var l=typeof Object.is=="function"?Object.is:i,o=n.useSyncExternalStore,u=e.useRef,c=e.useEffect,f=e.useMemo,p=e.useDebugValue;return Ld.useSyncExternalStoreWithSelector=function(d,y,m,x,b){var w=u(null);if(w.current===null){var _={hasValue:!1,value:null};w.current=_}else _=w.current;w=f(function(){function k(z){if(!j){if(j=!0,E=z,z=x(z),b!==void 0&&_.hasValue){var L=_.value;if(b(L,z))return D=L}return D=z}if(L=D,l(E,z))return L;var G=x(z);return b!==void 0&&b(L,G)?(E=z,L):(E=z,D=G)}var j=!1,E,D,U=m===void 0?null:m;return[function(){return k(y())},U===null?void 0:function(){return k(U())}]},[y,m,x,b]);var C=o(d,w[0],w[1]);return c(function(){_.hasValue=!0,_.value=C},[C]),p(C),C},Ld}var lx;function jN(){return lx||(lx=1,jd.exports=RN()),jd.exports}var LN=jN();const BN=Iu(LN),HN={},ax=e=>{let n;const i=new Set,l=(y,m)=>{const x=typeof y=="function"?y(n):y;if(!Object.is(x,n)){const b=n;n=m??(typeof x!="object"||x===null)?x:Object.assign({},n,x),i.forEach(w=>w(n,b))}},o=()=>n,p={setState:l,getState:o,getInitialState:()=>d,subscribe:y=>(i.add(y),()=>i.delete(y)),destroy:()=>{(HN?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),i.clear()}},d=n=e(l,o,p);return p},UN=e=>e?ax(e):ax,{useDebugValue:qN}=Pa,{useSyncExternalStoreWithSelector:IN}=BN,VN=e=>e;function jb(e,n=VN,i){const l=IN(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,i);return qN(l),l}const ox=(e,n)=>{const i=UN(e),l=(o,u=n)=>jb(i,o,u);return Object.assign(l,i),l},YN=(e,n)=>e?ox(e,n):ox;function at(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[l,o]of e)if(!Object.is(o,n.get(l)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const l of e)if(!n.has(l))return!1;return!0}const i=Object.keys(e);if(i.length!==Object.keys(n).length)return!1;for(const l of i)if(!Object.prototype.hasOwnProperty.call(n,l)||!Object.is(e[l],n[l]))return!1;return!0}T1();const Pu=W.createContext(null),XN=Pu.Provider,Lb=Fn.error001();function Ie(e,n){const i=W.useContext(Pu);if(i===null)throw new Error(Lb);return jb(i,e,n)}function ot(){const e=W.useContext(Pu);if(e===null)throw new Error(Lb);return W.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const sx={display:"none"},$N={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Bb="react-flow__node-desc",Hb="react-flow__edge-desc",FN="react-flow__aria-live",GN=e=>e.ariaLiveMessage,ZN=e=>e.ariaLabelConfig;function QN({rfId:e}){const n=Ie(GN);return S.jsx("div",{id:`${FN}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:$N,children:n})}function PN({rfId:e,disableKeyboardA11y:n}){const i=Ie(ZN);return S.jsxs(S.Fragment,{children:[S.jsx("div",{id:`${Bb}-${e}`,style:sx,children:n?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),S.jsx("div",{id:`${Hb}-${e}`,style:sx,children:i["edge.a11yDescription.default"]}),!n&&S.jsx(QN,{rfId:e})]})}const Ku=W.forwardRef(({position:e="top-left",children:n,className:i,style:l,...o},u)=>{const c=`${e}`.split("-");return S.jsx("div",{className:wt(["react-flow__panel",i,...c]),style:l,ref:u,...o,children:n})});Ku.displayName="Panel";function KN({proOptions:e,position:n="bottom-right"}){return e?.hideAttribution?null:S.jsx(Ku,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:S.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const JN=e=>{const n=[],i=[];for(const[,l]of e.nodeLookup)l.selected&&n.push(l.internals.userNode);for(const[,l]of e.edgeLookup)l.selected&&i.push(l);return{selectedNodes:n,selectedEdges:i}},ou=e=>e.id;function WN(e,n){return at(e.selectedNodes.map(ou),n.selectedNodes.map(ou))&&at(e.selectedEdges.map(ou),n.selectedEdges.map(ou))}function eT({onSelectionChange:e}){const n=ot(),{selectedNodes:i,selectedEdges:l}=Ie(JN,WN);return W.useEffect(()=>{const o={nodes:i,edges:l};e?.(o),n.getState().onSelectionChangeHandlers.forEach(u=>u(o))},[i,l,e]),null}const tT=e=>!!e.onSelectionChangeHandlers;function nT({onSelectionChange:e}){const n=Ie(tT);return e||n?S.jsx(eT,{onSelectionChange:e}):null}const Ub=[0,0],iT={x:0,y:0,zoom:1},rT=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ux=[...rT,"rfId"],lT=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),cx={translateExtent:uo,nodeOrigin:Ub,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function aT(e){const{setNodes:n,setEdges:i,setMinZoom:l,setMaxZoom:o,setTranslateExtent:u,setNodeExtent:c,reset:f,setDefaultNodesAndEdges:p}=Ie(lT,at),d=ot();W.useEffect(()=>(p(e.defaultNodes,e.defaultEdges),()=>{y.current=cx,f()}),[]);const y=W.useRef(cx);return W.useEffect(()=>{for(const m of ux){const x=e[m],b=y.current[m];x!==b&&(typeof e[m]>"u"||(m==="nodes"?n(x):m==="edges"?i(x):m==="minZoom"?l(x):m==="maxZoom"?o(x):m==="translateExtent"?u(x):m==="nodeExtent"?c(x):m==="ariaLabelConfig"?d.setState({ariaLabelConfig:XC(x)}):m==="fitView"?d.setState({fitViewQueued:x}):m==="fitViewOptions"?d.setState({fitViewOptions:x}):d.setState({[m]:x})))}y.current=e},ux.map(m=>e[m])),null}function fx(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function oT(e){const[n,i]=W.useState(e==="system"?null:e);return W.useEffect(()=>{if(e!=="system"){i(e);return}const l=fx(),o=()=>i(l?.matches?"dark":"light");return o(),l?.addEventListener("change",o),()=>{l?.removeEventListener("change",o)}},[e]),n!==null?n:fx()?.matches?"dark":"light"}const dx=typeof document<"u"?document:null;function po(e=null,n={target:dx,actInsideInputWithModifier:!0}){const[i,l]=W.useState(!1),o=W.useRef(!1),u=W.useRef(new Set([])),[c,f]=W.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
10
+ `).replace(`
11
+
12
+ `,`
13
+ +`).split(`
14
+ `)),y=d.reduce((m,x)=>m.concat(...x),[]);return[d,y]}return[[],[]]},[e]);return W.useEffect(()=>{const p=n?.target??dx,d=n?.actInsideInputWithModifier??!0;if(e!==null){const y=b=>{if(o.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!o.current||o.current&&!d)&&yb(b))return!1;const _=px(b.code,f);if(u.current.add(b[_]),hx(c,u.current,!1)){const C=b.composedPath?.()?.[0]||b.target,k=C?.nodeName==="BUTTON"||C?.nodeName==="A";n.preventDefault!==!1&&(o.current||!k)&&b.preventDefault(),l(!0)}},m=b=>{const w=px(b.code,f);hx(c,u.current,!0)?(l(!1),u.current.clear()):u.current.delete(b[w]),b.key==="Meta"&&u.current.clear(),o.current=!1},x=()=>{u.current.clear(),l(!1)};return p?.addEventListener("keydown",y),p?.addEventListener("keyup",m),window.addEventListener("blur",x),window.addEventListener("contextmenu",x),()=>{p?.removeEventListener("keydown",y),p?.removeEventListener("keyup",m),window.removeEventListener("blur",x),window.removeEventListener("contextmenu",x)}}},[e,l]),i}function hx(e,n,i){return e.filter(l=>i||l.length===n.size).some(l=>l.every(o=>n.has(o)))}function px(e,n){return n.includes(e)?"code":"key"}const sT=()=>{const e=ot();return W.useMemo(()=>({zoomIn:n=>{const{panZoom:i}=e.getState();return i?i.scaleBy(1.2,{duration:n?.duration}):Promise.resolve(!1)},zoomOut:n=>{const{panZoom:i}=e.getState();return i?i.scaleBy(1/1.2,{duration:n?.duration}):Promise.resolve(!1)},zoomTo:(n,i)=>{const{panZoom:l}=e.getState();return l?l.scaleTo(n,{duration:i?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(n,i)=>{const{transform:[l,o,u],panZoom:c}=e.getState();return c?(await c.setViewport({x:n.x??l,y:n.y??o,zoom:n.zoom??u},i),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[n,i,l]=e.getState().transform;return{x:n,y:i,zoom:l}},setCenter:async(n,i,l)=>e.getState().setCenter(n,i,l),fitBounds:async(n,i)=>{const{width:l,height:o,minZoom:u,maxZoom:c,panZoom:f}=e.getState(),p=Qh(n,l,o,u,c,i?.padding??.1);return f?(await f.setViewport(p,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(n,i={})=>{const{transform:l,snapGrid:o,snapToGrid:u,domNode:c}=e.getState();if(!c)return n;const{x:f,y:p}=c.getBoundingClientRect(),d={x:n.x-f,y:n.y-p},y=i.snapGrid??o,m=i.snapToGrid??u;return _o(d,l,m,y)},flowToScreenPosition:n=>{const{transform:i,domNode:l}=e.getState();if(!l)return n;const{x:o,y:u}=l.getBoundingClientRect(),c=Ru(n,i);return{x:c.x+o,y:c.y+u}}}),[])};function qb(e,n){const i=[],l=new Map,o=[];for(const u of e)if(u.type==="add"){o.push(u);continue}else if(u.type==="remove"||u.type==="replace")l.set(u.id,[u]);else{const c=l.get(u.id);c?c.push(u):l.set(u.id,[u])}for(const u of n){const c=l.get(u.id);if(!c){i.push(u);continue}if(c[0].type==="remove")continue;if(c[0].type==="replace"){i.push({...c[0].item});continue}const f={...u};for(const p of c)uT(p,f);i.push(f)}return o.length&&o.forEach(u=>{u.index!==void 0?i.splice(u.index,0,{...u.item}):i.push({...u.item})}),i}function uT(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function Ib(e,n){return qb(e,n)}function Vb(e,n){return qb(e,n)}function Ar(e,n){return{id:e,type:"select",selected:n}}function Ml(e,n=new Set,i=!1){const l=[];for(const[o,u]of e){const c=n.has(o);!(u.selected===void 0&&!c)&&u.selected!==c&&(i&&(u.selected=c),l.push(Ar(u.id,c)))}return l}function mx({items:e=[],lookup:n}){const i=[],l=new Map(e.map(o=>[o.id,o]));for(const[o,u]of e.entries()){const c=n.get(u.id),f=c?.internals?.userNode??c;f!==void 0&&f!==u&&i.push({id:u.id,item:u,type:"replace"}),f===void 0&&i.push({item:u,type:"add",index:o})}for(const[o]of n)l.get(o)===void 0&&i.push({id:o,type:"remove"});return i}function gx(e){return{id:e.id,type:"remove"}}const yx=e=>RC(e),cT=e=>ub(e);function Yb(e){return W.forwardRef(e)}const fT=typeof window<"u"?W.useLayoutEffect:W.useEffect;function xx(e){const[n,i]=W.useState(BigInt(0)),[l]=W.useState(()=>dT(()=>i(o=>o+BigInt(1))));return fT(()=>{const o=l.get();o.length&&(e(o),l.reset())},[n]),l}function dT(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:i=>{n.push(i),e()}}}const Xb=W.createContext(null);function hT({children:e}){const n=ot(),i=W.useCallback(f=>{const{nodes:p=[],setNodes:d,hasDefaultNodes:y,onNodesChange:m,nodeLookup:x,fitViewQueued:b,onNodesChangeMiddlewareMap:w}=n.getState();let _=p;for(const k of f)_=typeof k=="function"?k(_):k;let C=mx({items:_,lookup:x});for(const k of w.values())C=k(C);y&&d(_),C.length>0?m?.(C):b&&window.requestAnimationFrame(()=>{const{fitViewQueued:k,nodes:j,setNodes:E}=n.getState();k&&E(j)})},[]),l=xx(i),o=W.useCallback(f=>{const{edges:p=[],setEdges:d,hasDefaultEdges:y,onEdgesChange:m,edgeLookup:x}=n.getState();let b=p;for(const w of f)b=typeof w=="function"?w(b):w;y?d(b):m&&m(mx({items:b,lookup:x}))},[]),u=xx(o),c=W.useMemo(()=>({nodeQueue:l,edgeQueue:u}),[]);return S.jsx(Xb.Provider,{value:c,children:e})}function pT(){const e=W.useContext(Xb);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const mT=e=>!!e.panZoom;function np(){const e=sT(),n=ot(),i=pT(),l=Ie(mT),o=W.useMemo(()=>{const u=m=>n.getState().nodeLookup.get(m),c=m=>{i.nodeQueue.push(m)},f=m=>{i.edgeQueue.push(m)},p=m=>{const{nodeLookup:x,nodeOrigin:b}=n.getState(),w=yx(m)?m:x.get(m.id),_=w.parentId?mb(w.position,w.measured,w.parentId,x,b):w.position,C={...w,position:_,width:w.measured?.width??w.width,height:w.measured?.height??w.height};return Hl(C)},d=(m,x,b={replace:!1})=>{c(w=>w.map(_=>{if(_.id===m){const C=typeof x=="function"?x(_):x;return b.replace&&yx(C)?C:{..._,...C}}return _}))},y=(m,x,b={replace:!1})=>{f(w=>w.map(_=>{if(_.id===m){const C=typeof x=="function"?x(_):x;return b.replace&&cT(C)?C:{..._,...C}}return _}))};return{getNodes:()=>n.getState().nodes.map(m=>({...m})),getNode:m=>u(m)?.internals.userNode,getInternalNode:u,getEdges:()=>{const{edges:m=[]}=n.getState();return m.map(x=>({...x}))},getEdge:m=>n.getState().edgeLookup.get(m),setNodes:c,setEdges:f,addNodes:m=>{const x=Array.isArray(m)?m:[m];i.nodeQueue.push(b=>[...b,...x])},addEdges:m=>{const x=Array.isArray(m)?m:[m];i.edgeQueue.push(b=>[...b,...x])},toObject:()=>{const{nodes:m=[],edges:x=[],transform:b}=n.getState(),[w,_,C]=b;return{nodes:m.map(k=>({...k})),edges:x.map(k=>({...k})),viewport:{x:w,y:_,zoom:C}}},deleteElements:async({nodes:m=[],edges:x=[]})=>{const{nodes:b,edges:w,onNodesDelete:_,onEdgesDelete:C,triggerNodeChanges:k,triggerEdgeChanges:j,onDelete:E,onBeforeDelete:D}=n.getState(),{nodes:U,edges:z}=await UC({nodesToRemove:m,edgesToRemove:x,nodes:b,edges:w,onBeforeDelete:D}),L=z.length>0,G=U.length>0;if(L){const Q=z.map(gx);C?.(z),j(Q)}if(G){const Q=U.map(gx);_?.(U),k(Q)}return(G||L)&&E?.({nodes:U,edges:z}),{deletedNodes:U,deletedEdges:z}},getIntersectingNodes:(m,x=!0,b)=>{const w=Y0(m),_=w?m:p(m),C=b!==void 0;return _?(b||n.getState().nodes).filter(k=>{const j=n.getState().nodeLookup.get(k.id);if(j&&!w&&(k.id===m.id||!j.internals.positionAbsolute))return!1;const E=Hl(C?k:j),D=fo(E,_);return x&&D>0||D>=E.width*E.height||D>=_.width*_.height}):[]},isNodeIntersecting:(m,x,b=!0)=>{const _=Y0(m)?m:p(m);if(!_)return!1;const C=fo(_,x);return b&&C>0||C>=x.width*x.height||C>=_.width*_.height},updateNode:d,updateNodeData:(m,x,b={replace:!1})=>{d(m,w=>{const _=typeof x=="function"?x(w):x;return b.replace?{...w,data:_}:{...w,data:{...w.data,..._}}},b)},updateEdge:y,updateEdgeData:(m,x,b={replace:!1})=>{y(m,w=>{const _=typeof x=="function"?x(w):x;return b.replace?{...w,data:_}:{...w,data:{...w.data,..._}}},b)},getNodesBounds:m=>{const{nodeLookup:x,nodeOrigin:b}=n.getState();return jC(m,{nodeLookup:x,nodeOrigin:b})},getHandleConnections:({type:m,id:x,nodeId:b})=>Array.from(n.getState().connectionLookup.get(`${b}-${m}${x?`-${x}`:""}`)?.values()??[]),getNodeConnections:({type:m,handleId:x,nodeId:b})=>Array.from(n.getState().connectionLookup.get(`${b}${m?x?`-${m}-${x}`:`-${m}`:""}`)?.values()??[]),fitView:async m=>{const x=n.getState().fitViewResolver??YC();return n.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:x}),i.nodeQueue.push(b=>[...b]),x.promise}}},[]);return W.useMemo(()=>({...o,...e,viewportInitialized:l}),[l])}const bx=e=>e.selected,gT=typeof window<"u"?window:void 0;function yT({deleteKeyCode:e,multiSelectionKeyCode:n}){const i=ot(),{deleteElements:l}=np(),o=po(e,{actInsideInputWithModifier:!1}),u=po(n,{target:gT});W.useEffect(()=>{if(o){const{edges:c,nodes:f}=i.getState();l({nodes:f.filter(bx),edges:c.filter(bx)}),i.setState({nodesSelectionActive:!1})}},[o]),W.useEffect(()=>{i.setState({multiSelectionActive:u})},[u])}function xT(e){const n=ot();W.useEffect(()=>{const i=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;const l=Ph(e.current);(l.height===0||l.width===0)&&n.getState().onError?.("004",Fn.error004()),n.setState({width:l.width||500,height:l.height||500})};if(e.current){i(),window.addEventListener("resize",i);const l=new ResizeObserver(()=>i());return l.observe(e.current),()=>{window.removeEventListener("resize",i),l&&e.current&&l.unobserve(e.current)}}},[])}const Ju={position:"absolute",width:"100%",height:"100%",top:0,left:0},bT=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function vT({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:i=!0,panOnScroll:l=!1,panOnScrollSpeed:o=.5,panOnScrollMode:u=Dr.Free,zoomOnDoubleClick:c=!0,panOnDrag:f=!0,defaultViewport:p,translateExtent:d,minZoom:y,maxZoom:m,zoomActivationKeyCode:x,preventScrolling:b=!0,children:w,noWheelClassName:_,noPanClassName:C,onViewportChange:k,isControlledViewport:j,paneClickDistance:E,selectionOnDrag:D}){const U=ot(),z=W.useRef(null),{userSelectionActive:L,lib:G,connectionInProgress:Q}=Ie(bT,at),I=po(x),Y=W.useRef();xT(z);const X=W.useCallback(te=>{k?.({x:te[0],y:te[1],zoom:te[2]}),j||U.setState({transform:te})},[k,j]);return W.useEffect(()=>{if(z.current){Y.current=_N({domNode:z.current,minZoom:y,maxZoom:m,translateExtent:d,viewport:p,onDraggingChange:M=>U.setState({paneDragging:M}),onPanZoomStart:(M,H)=>{const{onViewportChangeStart:$,onMoveStart:P}=U.getState();P?.(M,H),$?.(H)},onPanZoom:(M,H)=>{const{onViewportChange:$,onMove:P}=U.getState();P?.(M,H),$?.(H)},onPanZoomEnd:(M,H)=>{const{onViewportChangeEnd:$,onMoveEnd:P}=U.getState();P?.(M,H),$?.(H)}});const{x:te,y:R,zoom:B}=Y.current.getViewport();return U.setState({panZoom:Y.current,transform:[te,R,B],domNode:z.current.closest(".react-flow")}),()=>{Y.current?.destroy()}}},[]),W.useEffect(()=>{Y.current?.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:i,panOnScroll:l,panOnScrollSpeed:o,panOnScrollMode:u,zoomOnDoubleClick:c,panOnDrag:f,zoomActivationKeyPressed:I,preventScrolling:b,noPanClassName:C,userSelectionActive:L,noWheelClassName:_,lib:G,onTransformChange:X,connectionInProgress:Q,selectionOnDrag:D,paneClickDistance:E})},[e,n,i,l,o,u,c,f,I,b,C,L,_,G,X,Q,D,E]),S.jsx("div",{className:"react-flow__renderer",ref:z,style:Ju,children:w})}const wT=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function ST(){const{userSelectionActive:e,userSelectionRect:n}=Ie(wT,at);return e&&n?S.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const Ud=(e,n)=>i=>{i.target===n.current&&e?.(i)},ET=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function kT({isSelecting:e,selectionKeyPressed:n,selectionMode:i=co.Full,panOnDrag:l,paneClickDistance:o,selectionOnDrag:u,onSelectionStart:c,onSelectionEnd:f,onPaneClick:p,onPaneContextMenu:d,onPaneScroll:y,onPaneMouseEnter:m,onPaneMouseMove:x,onPaneMouseLeave:b,children:w}){const _=ot(),{userSelectionActive:C,elementsSelectable:k,dragging:j,connectionInProgress:E}=Ie(ET,at),D=k&&(e||C),U=W.useRef(null),z=W.useRef(),L=W.useRef(new Set),G=W.useRef(new Set),Q=W.useRef(!1),I=$=>{if(Q.current||E){Q.current=!1;return}p?.($),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},Y=$=>{if(Array.isArray(l)&&l?.includes(2)){$.preventDefault();return}d?.($)},X=y?$=>y($):void 0,te=$=>{Q.current&&($.stopPropagation(),Q.current=!1)},R=$=>{const{domNode:P}=_.getState();if(z.current=P?.getBoundingClientRect(),!z.current)return;const A=$.target===U.current;if(!A&&!!$.target.closest(".nokey")||!e||!(u&&A||n)||$.button!==0||!$.isPrimary)return;$.target?.setPointerCapture?.($.pointerId),Q.current=!1;const{x:T,y:ne}=On($.nativeEvent,z.current);_.setState({userSelectionRect:{width:0,height:0,startX:T,startY:ne,x:T,y:ne}}),A||($.stopPropagation(),$.preventDefault())},B=$=>{const{userSelectionRect:P,transform:A,nodeLookup:O,edgeLookup:V,connectionLookup:T,triggerNodeChanges:ne,triggerEdgeChanges:ue,defaultEdgeOptions:ce,resetSelectedElements:de}=_.getState();if(!z.current||!P)return;const{x:se,y:pe}=On($.nativeEvent,z.current),{startX:Ee,startY:_e}=P;if(!Q.current){const Ve=n?0:o;if(Math.hypot(se-Ee,pe-_e)<=Ve)return;de(),c?.($)}Q.current=!0;const be={startX:Ee,startY:_e,x:se<Ee?se:Ee,y:pe<_e?pe:_e,width:Math.abs(se-Ee),height:Math.abs(pe-_e)},ke=L.current,ze=G.current;L.current=new Set(Zh(O,be,A,i===co.Partial,!0).map(Ve=>Ve.id)),G.current=new Set;const $e=ce?.selectable??!0;for(const Ve of L.current){const ct=T.get(Ve);if(ct)for(const{edgeId:Jt}of ct.values()){const zt=V.get(Jt);zt&&(zt.selectable??$e)&&G.current.add(Jt)}}if(!X0(ke,L.current)){const Ve=Ml(O,L.current,!0);ne(Ve)}if(!X0(ze,G.current)){const Ve=Ml(V,G.current);ue(Ve)}_.setState({userSelectionRect:be,userSelectionActive:!0,nodesSelectionActive:!1})},M=$=>{$.button===0&&($.target?.releasePointerCapture?.($.pointerId),!C&&$.target===U.current&&_.getState().userSelectionRect&&I?.($),_.setState({userSelectionActive:!1,userSelectionRect:null}),Q.current&&(f?.($),_.setState({nodesSelectionActive:L.current.size>0})))},H=l===!0||Array.isArray(l)&&l.includes(0);return S.jsxs("div",{className:wt(["react-flow__pane",{draggable:H,dragging:j,selection:e}]),onClick:D?void 0:Ud(I,U),onContextMenu:Ud(Y,U),onWheel:Ud(X,U),onPointerEnter:D?void 0:m,onPointerMove:D?B:x,onPointerUp:D?M:void 0,onPointerDownCapture:D?R:void 0,onClickCapture:D?te:void 0,onPointerLeave:b,ref:U,style:Ju,children:[w,S.jsx(ST,{})]})}function vh({id:e,store:n,unselect:i=!1,nodeRef:l}){const{addSelectedNodes:o,unselectNodesAndEdges:u,multiSelectionActive:c,nodeLookup:f,onError:p}=n.getState(),d=f.get(e);if(!d){p?.("012",Fn.error012(e));return}n.setState({nodesSelectionActive:!1}),d.selected?(i||d.selected&&c)&&(u({nodes:[d],edges:[]}),requestAnimationFrame(()=>l?.current?.blur())):o([e])}function $b({nodeRef:e,disabled:n=!1,noDragClassName:i,handleSelector:l,nodeId:o,isSelectable:u,nodeClickDistance:c}){const f=ot(),[p,d]=W.useState(!1),y=W.useRef();return W.useEffect(()=>{y.current=fN({getStoreItems:()=>f.getState(),onNodeMouseDown:m=>{vh({id:m,store:f,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),W.useEffect(()=>{if(n)y.current?.destroy();else if(e.current)return y.current?.update({noDragClassName:i,handleSelector:l,domNode:e.current,isSelectable:u,nodeId:o,nodeClickDistance:c}),()=>{y.current?.destroy()}},[i,l,n,u,e,o]),p}const _T=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function Fb(){const e=ot();return W.useCallback(i=>{const{nodeExtent:l,snapToGrid:o,snapGrid:u,nodesDraggable:c,onError:f,updateNodePositions:p,nodeLookup:d,nodeOrigin:y}=e.getState(),m=new Map,x=_T(c),b=o?u[0]:5,w=o?u[1]:5,_=i.direction.x*b*i.factor,C=i.direction.y*w*i.factor;for(const[,k]of d){if(!x(k))continue;let j={x:k.internals.positionAbsolute.x+_,y:k.internals.positionAbsolute.y+C};o&&(j=ko(j,u));const{position:E,positionAbsolute:D}=cb({nodeId:k.id,nextPosition:j,nodeLookup:d,nodeExtent:l,nodeOrigin:y,onError:f});k.position=E,k.internals.positionAbsolute=D,m.set(k.id,k)}p(m)},[])}const ip=W.createContext(null),CT=ip.Provider;ip.Consumer;const Gb=()=>W.useContext(ip),NT=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),TT=(e,n,i)=>l=>{const{connectionClickStartHandle:o,connectionMode:u,connection:c}=l,{fromHandle:f,toHandle:p,isValid:d}=c,y=p?.nodeId===e&&p?.id===n&&p?.type===i;return{connectingFrom:f?.nodeId===e&&f?.id===n&&f?.type===i,connectingTo:y,clickConnecting:o?.nodeId===e&&o?.id===n&&o?.type===i,isPossibleEndHandle:u===Ll.Strict?f?.type!==i:e!==f?.nodeId||n!==f?.id,connectionInProcess:!!f,clickConnectionInProcess:!!o,valid:y&&d}};function AT({type:e="source",position:n=ye.Top,isValidConnection:i,isConnectable:l=!0,isConnectableStart:o=!0,isConnectableEnd:u=!0,id:c,onConnect:f,children:p,className:d,onMouseDown:y,onTouchStart:m,...x},b){const w=c||null,_=e==="target",C=ot(),k=Gb(),{connectOnClick:j,noPanClassName:E,rfId:D}=Ie(NT,at),{connectingFrom:U,connectingTo:z,clickConnecting:L,isPossibleEndHandle:G,connectionInProcess:Q,clickConnectionInProcess:I,valid:Y}=Ie(TT(k,w,e),at);k||C.getState().onError?.("010",Fn.error010());const X=B=>{const{defaultEdgeOptions:M,onConnect:H,hasDefaultEdges:$}=C.getState(),P={...M,...B};if($){const{edges:A,setEdges:O}=C.getState();O(Sb(P,A))}H?.(P),f?.(P)},te=B=>{if(!k)return;const M=xb(B.nativeEvent);if(o&&(M&&B.button===0||!M)){const H=C.getState();bh.onPointerDown(B.nativeEvent,{handleDomNode:B.currentTarget,autoPanOnConnect:H.autoPanOnConnect,connectionMode:H.connectionMode,connectionRadius:H.connectionRadius,domNode:H.domNode,nodeLookup:H.nodeLookup,lib:H.lib,isTarget:_,handleId:w,nodeId:k,flowId:H.rfId,panBy:H.panBy,cancelConnection:H.cancelConnection,onConnectStart:H.onConnectStart,onConnectEnd:H.onConnectEnd,updateConnection:H.updateConnection,onConnect:X,isValidConnection:i||H.isValidConnection,getTransform:()=>C.getState().transform,getFromHandle:()=>C.getState().connection.fromHandle,autoPanSpeed:H.autoPanSpeed,dragThreshold:H.connectionDragThreshold})}M?y?.(B):m?.(B)},R=B=>{const{onClickConnectStart:M,onClickConnectEnd:H,connectionClickStartHandle:$,connectionMode:P,isValidConnection:A,lib:O,rfId:V,nodeLookup:T,connection:ne}=C.getState();if(!k||!$&&!o)return;if(!$){M?.(B.nativeEvent,{nodeId:k,handleId:w,handleType:e}),C.setState({connectionClickStartHandle:{nodeId:k,type:e,id:w}});return}const ue=gb(B.target),ce=i||A,{connection:de,isValid:se}=bh.isValid(B.nativeEvent,{handle:{nodeId:k,id:w,type:e},connectionMode:P,fromNodeId:$.nodeId,fromHandleId:$.id||null,fromType:$.type,isValidConnection:ce,flowId:V,doc:ue,lib:O,nodeLookup:T});se&&de&&X(de);const pe=structuredClone(ne);delete pe.inProgress,pe.toPosition=pe.toHandle?pe.toHandle.position:null,H?.(B,pe),C.setState({connectionClickStartHandle:null})};return S.jsx("div",{"data-handleid":w,"data-nodeid":k,"data-handlepos":n,"data-id":`${D}-${k}-${w}-${e}`,className:wt(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",E,d,{source:!_,target:_,connectable:l,connectablestart:o,connectableend:u,clickconnecting:L,connectingfrom:U,connectingto:z,valid:Y,connectionindicator:l&&(!Q||G)&&(Q||I?u:o)}]),onMouseDown:te,onTouchStart:te,onClick:j?R:void 0,ref:b,...x,children:p})}const Il=W.memo(Yb(AT));function MT({data:e,isConnectable:n,sourcePosition:i=ye.Bottom}){return S.jsxs(S.Fragment,{children:[e?.label,S.jsx(Il,{type:"source",position:i,isConnectable:n})]})}function zT({data:e,isConnectable:n,targetPosition:i=ye.Top,sourcePosition:l=ye.Bottom}){return S.jsxs(S.Fragment,{children:[S.jsx(Il,{type:"target",position:i,isConnectable:n}),e?.label,S.jsx(Il,{type:"source",position:l,isConnectable:n})]})}function DT(){return null}function OT({data:e,isConnectable:n,targetPosition:i=ye.Top}){return S.jsxs(S.Fragment,{children:[S.jsx(Il,{type:"target",position:i,isConnectable:n}),e?.label]})}const ju={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},vx={input:MT,default:zT,output:OT,group:DT};function RT(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const jT=e=>{const{width:n,height:i,x:l,y:o}=Eo(e.nodeLookup,{filter:u=>!!u.selected});return{width:Dn(n)?n:null,height:Dn(i)?i:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${l}px,${o}px)`}};function LT({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:i}){const l=ot(),{width:o,height:u,transformString:c,userSelectionActive:f}=Ie(jT,at),p=Fb(),d=W.useRef(null);if(W.useEffect(()=>{i||d.current?.focus({preventScroll:!0})},[i]),$b({nodeRef:d}),f||!o||!u)return null;const y=e?x=>{const b=l.getState().nodes.filter(w=>w.selected);e(x,b)}:void 0,m=x=>{Object.prototype.hasOwnProperty.call(ju,x.key)&&(x.preventDefault(),p({direction:ju[x.key],factor:x.shiftKey?4:1}))};return S.jsx("div",{className:wt(["react-flow__nodesselection","react-flow__container",n]),style:{transform:c},children:S.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:y,tabIndex:i?void 0:-1,onKeyDown:i?void 0:m,style:{width:o,height:u}})})}const wx=typeof window<"u"?window:void 0,BT=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Zb({children:e,onPaneClick:n,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:o,onPaneContextMenu:u,onPaneScroll:c,paneClickDistance:f,deleteKeyCode:p,selectionKeyCode:d,selectionOnDrag:y,selectionMode:m,onSelectionStart:x,onSelectionEnd:b,multiSelectionKeyCode:w,panActivationKeyCode:_,zoomActivationKeyCode:C,elementsSelectable:k,zoomOnScroll:j,zoomOnPinch:E,panOnScroll:D,panOnScrollSpeed:U,panOnScrollMode:z,zoomOnDoubleClick:L,panOnDrag:G,defaultViewport:Q,translateExtent:I,minZoom:Y,maxZoom:X,preventScrolling:te,onSelectionContextMenu:R,noWheelClassName:B,noPanClassName:M,disableKeyboardA11y:H,onViewportChange:$,isControlledViewport:P}){const{nodesSelectionActive:A,userSelectionActive:O}=Ie(BT,at),V=po(d,{target:wx}),T=po(_,{target:wx}),ne=T||G,ue=T||D,ce=y&&ne!==!0,de=V||O||ce;return yT({deleteKeyCode:p,multiSelectionKeyCode:w}),S.jsx(vT,{onPaneContextMenu:u,elementsSelectable:k,zoomOnScroll:j,zoomOnPinch:E,panOnScroll:ue,panOnScrollSpeed:U,panOnScrollMode:z,zoomOnDoubleClick:L,panOnDrag:!V&&ne,defaultViewport:Q,translateExtent:I,minZoom:Y,maxZoom:X,zoomActivationKeyCode:C,preventScrolling:te,noWheelClassName:B,noPanClassName:M,onViewportChange:$,isControlledViewport:P,paneClickDistance:f,selectionOnDrag:ce,children:S.jsxs(kT,{onSelectionStart:x,onSelectionEnd:b,onPaneClick:n,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:o,onPaneContextMenu:u,onPaneScroll:c,panOnDrag:ne,isSelecting:!!de,selectionMode:m,selectionKeyPressed:V,paneClickDistance:f,selectionOnDrag:ce,children:[e,A&&S.jsx(LT,{onSelectionContextMenu:R,noPanClassName:M,disableKeyboardA11y:H})]})})}Zb.displayName="FlowRenderer";const HT=W.memo(Zb),UT=e=>n=>e?Zh(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(i=>i.id):Array.from(n.nodeLookup.keys());function qT(e){return Ie(W.useCallback(UT(e),[e]),at)}const IT=e=>e.updateNodeInternals;function VT(){const e=Ie(IT),[n]=W.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const l=new Map;i.forEach(o=>{const u=o.target.getAttribute("data-id");l.set(u,{id:u,nodeElement:o.target,force:!0})}),e(l)}));return W.useEffect(()=>()=>{n?.disconnect()},[n]),n}function YT({node:e,nodeType:n,hasDimensions:i,resizeObserver:l}){const o=ot(),u=W.useRef(null),c=W.useRef(null),f=W.useRef(e.sourcePosition),p=W.useRef(e.targetPosition),d=W.useRef(n),y=i&&!!e.internals.handleBounds;return W.useEffect(()=>{u.current&&!e.hidden&&(!y||c.current!==u.current)&&(c.current&&l?.unobserve(c.current),l?.observe(u.current),c.current=u.current)},[y,e.hidden]),W.useEffect(()=>()=>{c.current&&(l?.unobserve(c.current),c.current=null)},[]),W.useEffect(()=>{if(u.current){const m=d.current!==n,x=f.current!==e.sourcePosition,b=p.current!==e.targetPosition;(m||x||b)&&(d.current=n,f.current=e.sourcePosition,p.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:u.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),u}function XT({id:e,onClick:n,onMouseEnter:i,onMouseMove:l,onMouseLeave:o,onContextMenu:u,onDoubleClick:c,nodesDraggable:f,elementsSelectable:p,nodesConnectable:d,nodesFocusable:y,resizeObserver:m,noDragClassName:x,noPanClassName:b,disableKeyboardA11y:w,rfId:_,nodeTypes:C,nodeClickDistance:k,onError:j}){const{node:E,internals:D,isParent:U}=Ie(se=>{const pe=se.nodeLookup.get(e),Ee=se.parentLookup.has(e);return{node:pe,internals:pe.internals,isParent:Ee}},at);let z=E.type||"default",L=C?.[z]||vx[z];L===void 0&&(j?.("003",Fn.error003(z)),z="default",L=C?.default||vx.default);const G=!!(E.draggable||f&&typeof E.draggable>"u"),Q=!!(E.selectable||p&&typeof E.selectable>"u"),I=!!(E.connectable||d&&typeof E.connectable>"u"),Y=!!(E.focusable||y&&typeof E.focusable>"u"),X=ot(),te=pb(E),R=YT({node:E,nodeType:z,hasDimensions:te,resizeObserver:m}),B=$b({nodeRef:R,disabled:E.hidden||!G,noDragClassName:x,handleSelector:E.dragHandle,nodeId:e,isSelectable:Q,nodeClickDistance:k}),M=Fb();if(E.hidden)return null;const H=Ei(E),$=RT(E),P=Q||G||n||i||l||o,A=i?se=>i(se,{...D.userNode}):void 0,O=l?se=>l(se,{...D.userNode}):void 0,V=o?se=>o(se,{...D.userNode}):void 0,T=u?se=>u(se,{...D.userNode}):void 0,ne=c?se=>c(se,{...D.userNode}):void 0,ue=se=>{const{selectNodesOnDrag:pe,nodeDragThreshold:Ee}=X.getState();Q&&(!pe||!G||Ee>0)&&vh({id:e,store:X,nodeRef:R}),n&&n(se,{...D.userNode})},ce=se=>{if(!(yb(se.nativeEvent)||w)){if(lb.includes(se.key)&&Q){const pe=se.key==="Escape";vh({id:e,store:X,unselect:pe,nodeRef:R})}else if(G&&E.selected&&Object.prototype.hasOwnProperty.call(ju,se.key)){se.preventDefault();const{ariaLabelConfig:pe}=X.getState();X.setState({ariaLiveMessage:pe["node.a11yDescription.ariaLiveMessage"]({direction:se.key.replace("Arrow","").toLowerCase(),x:~~D.positionAbsolute.x,y:~~D.positionAbsolute.y})}),M({direction:ju[se.key],factor:se.shiftKey?4:1})}}},de=()=>{if(w||!R.current?.matches(":focus-visible"))return;const{transform:se,width:pe,height:Ee,autoPanOnNodeFocus:_e,setCenter:be}=X.getState();if(!_e)return;Zh(new Map([[e,E]]),{x:0,y:0,width:pe,height:Ee},se,!0).length>0||be(E.position.x+H.width/2,E.position.y+H.height/2,{zoom:se[2]})};return S.jsx("div",{className:wt(["react-flow__node",`react-flow__node-${z}`,{[b]:G},E.className,{selected:E.selected,selectable:Q,parent:U,draggable:G,dragging:B}]),ref:R,style:{zIndex:D.z,transform:`translate(${D.positionAbsolute.x}px,${D.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:te?"visible":"hidden",...E.style,...$},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:A,onMouseMove:O,onMouseLeave:V,onContextMenu:T,onClick:ue,onDoubleClick:ne,onKeyDown:Y?ce:void 0,tabIndex:Y?0:void 0,onFocus:Y?de:void 0,role:E.ariaRole??(Y?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${Bb}-${_}`,"aria-label":E.ariaLabel,...E.domAttributes,children:S.jsx(CT,{value:e,children:S.jsx(L,{id:e,data:E.data,type:z,positionAbsoluteX:D.positionAbsolute.x,positionAbsoluteY:D.positionAbsolute.y,selected:E.selected??!1,selectable:Q,draggable:G,deletable:E.deletable??!0,isConnectable:I,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:B,dragHandle:E.dragHandle,zIndex:D.z,parentId:E.parentId,...H})})})}var $T=W.memo(XT);const FT=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Qb(e){const{nodesDraggable:n,nodesConnectable:i,nodesFocusable:l,elementsSelectable:o,onError:u}=Ie(FT,at),c=qT(e.onlyRenderVisibleElements),f=VT();return S.jsx("div",{className:"react-flow__nodes",style:Ju,children:c.map(p=>S.jsx($T,{id:p,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:f,nodesDraggable:n,nodesConnectable:i,nodesFocusable:l,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:u},p))})}Qb.displayName="NodeRenderer";const GT=W.memo(Qb);function ZT(e){return Ie(W.useCallback(i=>{if(!e)return i.edges.map(o=>o.id);const l=[];if(i.width&&i.height)for(const o of i.edges){const u=i.nodeLookup.get(o.source),c=i.nodeLookup.get(o.target);u&&c&&GC({sourceNode:u,targetNode:c,width:i.width,height:i.height,transform:i.transform})&&l.push(o.id)}return l},[e]),at)}const QT=({color:e="none",strokeWidth:n=1})=>{const i={strokeWidth:n,...e&&{stroke:e}};return S.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},PT=({color:e="none",strokeWidth:n=1})=>{const i={strokeWidth:n,...e&&{stroke:e,fill:e}};return S.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Sx={[Du.Arrow]:QT,[Du.ArrowClosed]:PT};function KT(e){const n=ot();return W.useMemo(()=>Object.prototype.hasOwnProperty.call(Sx,e)?Sx[e]:(n.getState().onError?.("009",Fn.error009(e)),null),[e])}const JT=({id:e,type:n,color:i,width:l=12.5,height:o=12.5,markerUnits:u="strokeWidth",strokeWidth:c,orient:f="auto-start-reverse"})=>{const p=KT(n);return p?S.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${l}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:f,refX:"0",refY:"0",children:S.jsx(p,{color:i,strokeWidth:c})}):null},Pb=({defaultColor:e,rfId:n})=>{const i=Ie(u=>u.edges),l=Ie(u=>u.defaultEdgeOptions),o=W.useMemo(()=>eN(i,{id:n,defaultColor:e,defaultMarkerStart:l?.markerStart,defaultMarkerEnd:l?.markerEnd}),[i,l,n,e]);return o.length?S.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:S.jsx("defs",{children:o.map(u=>S.jsx(JT,{id:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,strokeWidth:u.strokeWidth,orient:u.orient},u.id))})}):null};Pb.displayName="MarkerDefinitions";var WT=W.memo(Pb);function Kb({x:e,y:n,label:i,labelStyle:l,labelShowBg:o=!0,labelBgStyle:u,labelBgPadding:c=[2,4],labelBgBorderRadius:f=2,children:p,className:d,...y}){const[m,x]=W.useState({x:1,y:0,width:0,height:0}),b=wt(["react-flow__edge-textwrapper",d]),w=W.useRef(null);return W.useEffect(()=>{if(w.current){const _=w.current.getBBox();x({x:_.x,y:_.y,width:_.width,height:_.height})}},[i]),i?S.jsxs("g",{transform:`translate(${e-m.width/2} ${n-m.height/2})`,className:b,visibility:m.width?"visible":"hidden",...y,children:[o&&S.jsx("rect",{width:m.width+2*c[0],x:-c[0],y:-c[1],height:m.height+2*c[1],className:"react-flow__edge-textbg",style:u,rx:f,ry:f}),S.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:w,style:l,children:i}),p]}):null}Kb.displayName="EdgeText";const eA=W.memo(Kb);function Wu({path:e,labelX:n,labelY:i,label:l,labelStyle:o,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:p,interactionWidth:d=20,...y}){return S.jsxs(S.Fragment,{children:[S.jsx("path",{...y,d:e,fill:"none",className:wt(["react-flow__edge-path",y.className])}),d?S.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,l&&Dn(n)&&Dn(i)?S.jsx(eA,{x:n,y:i,label:l,labelStyle:o,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:p}):null]})}function Ex({pos:e,x1:n,y1:i,x2:l,y2:o}){return e===ye.Left||e===ye.Right?[.5*(n+l),i]:[n,.5*(i+o)]}function Jb({sourceX:e,sourceY:n,sourcePosition:i=ye.Bottom,targetX:l,targetY:o,targetPosition:u=ye.Top}){const[c,f]=Ex({pos:i,x1:e,y1:n,x2:l,y2:o}),[p,d]=Ex({pos:u,x1:l,y1:o,x2:e,y2:n}),[y,m,x,b]=bb({sourceX:e,sourceY:n,targetX:l,targetY:o,sourceControlX:c,sourceControlY:f,targetControlX:p,targetControlY:d});return[`M${e},${n} C${c},${f} ${p},${d} ${l},${o}`,y,m,x,b]}function Wb(e){return W.memo(({id:n,sourceX:i,sourceY:l,targetX:o,targetY:u,sourcePosition:c,targetPosition:f,label:p,labelStyle:d,labelShowBg:y,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:b,style:w,markerEnd:_,markerStart:C,interactionWidth:k})=>{const[j,E,D]=Jb({sourceX:i,sourceY:l,sourcePosition:c,targetX:o,targetY:u,targetPosition:f}),U=e.isInternal?void 0:n;return S.jsx(Wu,{id:U,path:j,labelX:E,labelY:D,label:p,labelStyle:d,labelShowBg:y,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:b,style:w,markerEnd:_,markerStart:C,interactionWidth:k})})}const tA=Wb({isInternal:!1}),ev=Wb({isInternal:!0});tA.displayName="SimpleBezierEdge";ev.displayName="SimpleBezierEdgeInternal";function tv(e){return W.memo(({id:n,sourceX:i,sourceY:l,targetX:o,targetY:u,label:c,labelStyle:f,labelShowBg:p,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:m,style:x,sourcePosition:b=ye.Bottom,targetPosition:w=ye.Top,markerEnd:_,markerStart:C,pathOptions:k,interactionWidth:j})=>{const[E,D,U]=gh({sourceX:i,sourceY:l,sourcePosition:b,targetX:o,targetY:u,targetPosition:w,borderRadius:k?.borderRadius,offset:k?.offset,stepPosition:k?.stepPosition}),z=e.isInternal?void 0:n;return S.jsx(Wu,{id:z,path:E,labelX:D,labelY:U,label:c,labelStyle:f,labelShowBg:p,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:m,style:x,markerEnd:_,markerStart:C,interactionWidth:j})})}const nv=tv({isInternal:!1}),iv=tv({isInternal:!0});nv.displayName="SmoothStepEdge";iv.displayName="SmoothStepEdgeInternal";function rv(e){return W.memo(({id:n,...i})=>{const l=e.isInternal?void 0:n;return S.jsx(nv,{...i,id:l,pathOptions:W.useMemo(()=>({borderRadius:0,offset:i.pathOptions?.offset}),[i.pathOptions?.offset])})})}const nA=rv({isInternal:!1}),lv=rv({isInternal:!0});nA.displayName="StepEdge";lv.displayName="StepEdgeInternal";function av(e){return W.memo(({id:n,sourceX:i,sourceY:l,targetX:o,targetY:u,label:c,labelStyle:f,labelShowBg:p,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:m,style:x,markerEnd:b,markerStart:w,interactionWidth:_})=>{const[C,k,j]=Eb({sourceX:i,sourceY:l,targetX:o,targetY:u}),E=e.isInternal?void 0:n;return S.jsx(Wu,{id:E,path:C,labelX:k,labelY:j,label:c,labelStyle:f,labelShowBg:p,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:m,style:x,markerEnd:b,markerStart:w,interactionWidth:_})})}const iA=av({isInternal:!1}),ov=av({isInternal:!0});iA.displayName="StraightEdge";ov.displayName="StraightEdgeInternal";function sv(e){return W.memo(({id:n,sourceX:i,sourceY:l,targetX:o,targetY:u,sourcePosition:c=ye.Bottom,targetPosition:f=ye.Top,label:p,labelStyle:d,labelShowBg:y,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:b,style:w,markerEnd:_,markerStart:C,pathOptions:k,interactionWidth:j})=>{const[E,D,U]=vb({sourceX:i,sourceY:l,sourcePosition:c,targetX:o,targetY:u,targetPosition:f,curvature:k?.curvature}),z=e.isInternal?void 0:n;return S.jsx(Wu,{id:z,path:E,labelX:D,labelY:U,label:p,labelStyle:d,labelShowBg:y,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:b,style:w,markerEnd:_,markerStart:C,interactionWidth:j})})}const rA=sv({isInternal:!1}),uv=sv({isInternal:!0});rA.displayName="BezierEdge";uv.displayName="BezierEdgeInternal";const kx={default:uv,straight:ov,step:lv,smoothstep:iv,simplebezier:ev},_x={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},lA=(e,n,i)=>i===ye.Left?e-n:i===ye.Right?e+n:e,aA=(e,n,i)=>i===ye.Top?e-n:i===ye.Bottom?e+n:e,Cx="react-flow__edgeupdater";function Nx({position:e,centerX:n,centerY:i,radius:l=10,onMouseDown:o,onMouseEnter:u,onMouseOut:c,type:f}){return S.jsx("circle",{onMouseDown:o,onMouseEnter:u,onMouseOut:c,className:wt([Cx,`${Cx}-${f}`]),cx:lA(n,l,e),cy:aA(i,l,e),r:l,stroke:"transparent",fill:"transparent"})}function oA({isReconnectable:e,reconnectRadius:n,edge:i,sourceX:l,sourceY:o,targetX:u,targetY:c,sourcePosition:f,targetPosition:p,onReconnect:d,onReconnectStart:y,onReconnectEnd:m,setReconnecting:x,setUpdateHover:b}){const w=ot(),_=(D,U)=>{if(D.button!==0)return;const{autoPanOnConnect:z,domNode:L,isValidConnection:G,connectionMode:Q,connectionRadius:I,lib:Y,onConnectStart:X,onConnectEnd:te,cancelConnection:R,nodeLookup:B,rfId:M,panBy:H,updateConnection:$}=w.getState(),P=U.type==="target",A=(T,ne)=>{x(!1),m?.(T,i,U.type,ne)},O=T=>d?.(i,T),V=(T,ne)=>{x(!0),y?.(D,i,U.type),X?.(T,ne)};bh.onPointerDown(D.nativeEvent,{autoPanOnConnect:z,connectionMode:Q,connectionRadius:I,domNode:L,handleId:U.id,nodeId:U.nodeId,nodeLookup:B,isTarget:P,edgeUpdaterType:U.type,lib:Y,flowId:M,cancelConnection:R,panBy:H,isValidConnection:G,onConnect:O,onConnectStart:V,onConnectEnd:te,onReconnectEnd:A,updateConnection:$,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:D.currentTarget})},C=D=>_(D,{nodeId:i.target,id:i.targetHandle??null,type:"target"}),k=D=>_(D,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),j=()=>b(!0),E=()=>b(!1);return S.jsxs(S.Fragment,{children:[(e===!0||e==="source")&&S.jsx(Nx,{position:f,centerX:l,centerY:o,radius:n,onMouseDown:C,onMouseEnter:j,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&S.jsx(Nx,{position:p,centerX:u,centerY:c,radius:n,onMouseDown:k,onMouseEnter:j,onMouseOut:E,type:"target"})]})}function sA({id:e,edgesFocusable:n,edgesReconnectable:i,elementsSelectable:l,onClick:o,onDoubleClick:u,onContextMenu:c,onMouseEnter:f,onMouseMove:p,onMouseLeave:d,reconnectRadius:y,onReconnect:m,onReconnectStart:x,onReconnectEnd:b,rfId:w,edgeTypes:_,noPanClassName:C,onError:k,disableKeyboardA11y:j}){let E=Ie(be=>be.edgeLookup.get(e));const D=Ie(be=>be.defaultEdgeOptions);E=D?{...D,...E}:E;let U=E.type||"default",z=_?.[U]||kx[U];z===void 0&&(k?.("011",Fn.error011(U)),U="default",z=_?.default||kx.default);const L=!!(E.focusable||n&&typeof E.focusable>"u"),G=typeof m<"u"&&(E.reconnectable||i&&typeof E.reconnectable>"u"),Q=!!(E.selectable||l&&typeof E.selectable>"u"),I=W.useRef(null),[Y,X]=W.useState(!1),[te,R]=W.useState(!1),B=ot(),{zIndex:M,sourceX:H,sourceY:$,targetX:P,targetY:A,sourcePosition:O,targetPosition:V}=Ie(W.useCallback(be=>{const ke=be.nodeLookup.get(E.source),ze=be.nodeLookup.get(E.target);if(!ke||!ze)return{zIndex:E.zIndex,..._x};const $e=WC({id:e,sourceNode:ke,targetNode:ze,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:be.connectionMode,onError:k});return{zIndex:FC({selected:E.selected,zIndex:E.zIndex,sourceNode:ke,targetNode:ze,elevateOnSelect:be.elevateEdgesOnSelect,zIndexMode:be.zIndexMode}),...$e||_x}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),at),T=W.useMemo(()=>E.markerStart?`url('#${yh(E.markerStart,w)}')`:void 0,[E.markerStart,w]),ne=W.useMemo(()=>E.markerEnd?`url('#${yh(E.markerEnd,w)}')`:void 0,[E.markerEnd,w]);if(E.hidden||H===null||$===null||P===null||A===null)return null;const ue=be=>{const{addSelectedEdges:ke,unselectNodesAndEdges:ze,multiSelectionActive:$e}=B.getState();Q&&(B.setState({nodesSelectionActive:!1}),E.selected&&$e?(ze({nodes:[],edges:[E]}),I.current?.blur()):ke([e])),o&&o(be,E)},ce=u?be=>{u(be,{...E})}:void 0,de=c?be=>{c(be,{...E})}:void 0,se=f?be=>{f(be,{...E})}:void 0,pe=p?be=>{p(be,{...E})}:void 0,Ee=d?be=>{d(be,{...E})}:void 0,_e=be=>{if(!j&&lb.includes(be.key)&&Q){const{unselectNodesAndEdges:ke,addSelectedEdges:ze}=B.getState();be.key==="Escape"?(I.current?.blur(),ke({edges:[E]})):ze([e])}};return S.jsx("svg",{style:{zIndex:M},children:S.jsxs("g",{className:wt(["react-flow__edge",`react-flow__edge-${U}`,E.className,C,{selected:E.selected,animated:E.animated,inactive:!Q&&!o,updating:Y,selectable:Q}]),onClick:ue,onDoubleClick:ce,onContextMenu:de,onMouseEnter:se,onMouseMove:pe,onMouseLeave:Ee,onKeyDown:L?_e:void 0,tabIndex:L?0:void 0,role:E.ariaRole??(L?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":L?`${Hb}-${w}`:void 0,ref:I,...E.domAttributes,children:[!te&&S.jsx(z,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:Q,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:H,sourceY:$,targetX:P,targetY:A,sourcePosition:O,targetPosition:V,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:T,markerEnd:ne,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),G&&S.jsx(oA,{edge:E,isReconnectable:G,reconnectRadius:y,onReconnect:m,onReconnectStart:x,onReconnectEnd:b,sourceX:H,sourceY:$,targetX:P,targetY:A,sourcePosition:O,targetPosition:V,setUpdateHover:X,setReconnecting:R})]})})}var uA=W.memo(sA);const cA=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function cv({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:i,edgeTypes:l,noPanClassName:o,onReconnect:u,onEdgeContextMenu:c,onEdgeMouseEnter:f,onEdgeMouseMove:p,onEdgeMouseLeave:d,onEdgeClick:y,reconnectRadius:m,onEdgeDoubleClick:x,onReconnectStart:b,onReconnectEnd:w,disableKeyboardA11y:_}){const{edgesFocusable:C,edgesReconnectable:k,elementsSelectable:j,onError:E}=Ie(cA,at),D=ZT(n);return S.jsxs("div",{className:"react-flow__edges",children:[S.jsx(WT,{defaultColor:e,rfId:i}),D.map(U=>S.jsx(uA,{id:U,edgesFocusable:C,edgesReconnectable:k,elementsSelectable:j,noPanClassName:o,onReconnect:u,onContextMenu:c,onMouseEnter:f,onMouseMove:p,onMouseLeave:d,onClick:y,reconnectRadius:m,onDoubleClick:x,onReconnectStart:b,onReconnectEnd:w,rfId:i,onError:E,edgeTypes:l,disableKeyboardA11y:_},U))]})}cv.displayName="EdgeRenderer";const fA=W.memo(cv),dA=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function hA({children:e}){const n=Ie(dA);return S.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function pA(e){const n=np(),i=W.useRef(!1);W.useEffect(()=>{!i.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),i.current=!0)},[e,n.viewportInitialized])}const mA=e=>e.panZoom?.syncViewport;function gA(e){const n=Ie(mA),i=ot();return W.useEffect(()=>{e&&(n?.(e),i.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function yA(e){return e.connection.inProgress?{...e.connection,to:_o(e.connection.to,e.transform)}:{...e.connection}}function xA(e){return yA}function bA(e){const n=xA();return Ie(n,at)}const vA=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function wA({containerStyle:e,style:n,type:i,component:l}){const{nodesConnectable:o,width:u,height:c,isValid:f,inProgress:p}=Ie(vA,at);return!(u&&o&&p)?null:S.jsx("svg",{style:e,width:u,height:c,className:"react-flow__connectionline react-flow__container",children:S.jsx("g",{className:wt(["react-flow__connection",sb(f)]),children:S.jsx(fv,{style:n,type:i,CustomComponent:l,isValid:f})})})}const fv=({style:e,type:n=ir.Bezier,CustomComponent:i,isValid:l})=>{const{inProgress:o,from:u,fromNode:c,fromHandle:f,fromPosition:p,to:d,toNode:y,toHandle:m,toPosition:x,pointer:b}=bA();if(!o)return;if(i)return S.jsx(i,{connectionLineType:n,connectionLineStyle:e,fromNode:c,fromHandle:f,fromX:u.x,fromY:u.y,toX:d.x,toY:d.y,fromPosition:p,toPosition:x,connectionStatus:sb(l),toNode:y,toHandle:m,pointer:b});let w="";const _={sourceX:u.x,sourceY:u.y,sourcePosition:p,targetX:d.x,targetY:d.y,targetPosition:x};switch(n){case ir.Bezier:[w]=vb(_);break;case ir.SimpleBezier:[w]=Jb(_);break;case ir.Step:[w]=gh({..._,borderRadius:0});break;case ir.SmoothStep:[w]=gh(_);break;default:[w]=Eb(_)}return S.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};fv.displayName="ConnectionLine";const SA={};function Tx(e=SA){W.useRef(e),ot(),W.useEffect(()=>{},[e])}function EA(){ot(),W.useRef(!1),W.useEffect(()=>{},[])}function dv({nodeTypes:e,edgeTypes:n,onInit:i,onNodeClick:l,onEdgeClick:o,onNodeDoubleClick:u,onEdgeDoubleClick:c,onNodeMouseEnter:f,onNodeMouseMove:p,onNodeMouseLeave:d,onNodeContextMenu:y,onSelectionContextMenu:m,onSelectionStart:x,onSelectionEnd:b,connectionLineType:w,connectionLineStyle:_,connectionLineComponent:C,connectionLineContainerStyle:k,selectionKeyCode:j,selectionOnDrag:E,selectionMode:D,multiSelectionKeyCode:U,panActivationKeyCode:z,zoomActivationKeyCode:L,deleteKeyCode:G,onlyRenderVisibleElements:Q,elementsSelectable:I,defaultViewport:Y,translateExtent:X,minZoom:te,maxZoom:R,preventScrolling:B,defaultMarkerColor:M,zoomOnScroll:H,zoomOnPinch:$,panOnScroll:P,panOnScrollSpeed:A,panOnScrollMode:O,zoomOnDoubleClick:V,panOnDrag:T,onPaneClick:ne,onPaneMouseEnter:ue,onPaneMouseMove:ce,onPaneMouseLeave:de,onPaneScroll:se,onPaneContextMenu:pe,paneClickDistance:Ee,nodeClickDistance:_e,onEdgeContextMenu:be,onEdgeMouseEnter:ke,onEdgeMouseMove:ze,onEdgeMouseLeave:$e,reconnectRadius:Ve,onReconnect:ct,onReconnectStart:Jt,onReconnectEnd:zt,noDragClassName:qt,noWheelClassName:En,noPanClassName:Pn,disableKeyboardA11y:Kn,nodeExtent:St,rfId:_i,viewport:re,onViewportChange:he}){return Tx(e),Tx(n),EA(),pA(i),gA(re),S.jsx(HT,{onPaneClick:ne,onPaneMouseEnter:ue,onPaneMouseMove:ce,onPaneMouseLeave:de,onPaneContextMenu:pe,onPaneScroll:se,paneClickDistance:Ee,deleteKeyCode:G,selectionKeyCode:j,selectionOnDrag:E,selectionMode:D,onSelectionStart:x,onSelectionEnd:b,multiSelectionKeyCode:U,panActivationKeyCode:z,zoomActivationKeyCode:L,elementsSelectable:I,zoomOnScroll:H,zoomOnPinch:$,zoomOnDoubleClick:V,panOnScroll:P,panOnScrollSpeed:A,panOnScrollMode:O,panOnDrag:T,defaultViewport:Y,translateExtent:X,minZoom:te,maxZoom:R,onSelectionContextMenu:m,preventScrolling:B,noDragClassName:qt,noWheelClassName:En,noPanClassName:Pn,disableKeyboardA11y:Kn,onViewportChange:he,isControlledViewport:!!re,children:S.jsxs(hA,{children:[S.jsx(fA,{edgeTypes:n,onEdgeClick:o,onEdgeDoubleClick:c,onReconnect:ct,onReconnectStart:Jt,onReconnectEnd:zt,onlyRenderVisibleElements:Q,onEdgeContextMenu:be,onEdgeMouseEnter:ke,onEdgeMouseMove:ze,onEdgeMouseLeave:$e,reconnectRadius:Ve,defaultMarkerColor:M,noPanClassName:Pn,disableKeyboardA11y:Kn,rfId:_i}),S.jsx(wA,{style:_,type:w,component:C,containerStyle:k}),S.jsx("div",{className:"react-flow__edgelabel-renderer"}),S.jsx(GT,{nodeTypes:e,onNodeClick:l,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:p,onNodeMouseLeave:d,onNodeContextMenu:y,nodeClickDistance:_e,onlyRenderVisibleElements:Q,noPanClassName:Pn,noDragClassName:qt,disableKeyboardA11y:Kn,nodeExtent:St,rfId:_i}),S.jsx("div",{className:"react-flow__viewport-portal"})]})})}dv.displayName="GraphView";const kA=W.memo(dv),Ax=({nodes:e,edges:n,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:c,fitViewOptions:f,minZoom:p=.5,maxZoom:d=2,nodeOrigin:y,nodeExtent:m,zIndexMode:x="basic"}={})=>{const b=new Map,w=new Map,_=new Map,C=new Map,k=l??n??[],j=i??e??[],E=y??[0,0],D=m??uo;Cb(_,C,k);const U=xh(j,b,w,{nodeOrigin:E,nodeExtent:D,zIndexMode:x});let z=[0,0,1];if(c&&o&&u){const L=Eo(b,{filter:Y=>!!((Y.width||Y.initialWidth)&&(Y.height||Y.initialHeight))}),{x:G,y:Q,zoom:I}=Qh(L,o,u,p,d,f?.padding??.1);z=[G,Q,I]}return{rfId:"1",width:o??0,height:u??0,transform:z,nodes:j,nodesInitialized:U,nodeLookup:b,parentLookup:w,edges:k,edgeLookup:C,connectionLookup:_,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:l!==void 0,panZoom:null,minZoom:p,maxZoom:d,translateExtent:uo,nodeExtent:D,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ll.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:c??!1,fitViewOptions:f,fitViewResolver:null,connection:{...ob},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:qC,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:ab,zIndexMode:x,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},_A=({nodes:e,edges:n,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:c,fitViewOptions:f,minZoom:p,maxZoom:d,nodeOrigin:y,nodeExtent:m,zIndexMode:x})=>YN((b,w)=>{async function _(){const{nodeLookup:C,panZoom:k,fitViewOptions:j,fitViewResolver:E,width:D,height:U,minZoom:z,maxZoom:L}=w();k&&(await HC({nodes:C,width:D,height:U,panZoom:k,minZoom:z,maxZoom:L},j),E?.resolve(!0),b({fitViewResolver:null}))}return{...Ax({nodes:e,edges:n,width:o,height:u,fitView:c,fitViewOptions:f,minZoom:p,maxZoom:d,nodeOrigin:y,nodeExtent:m,defaultNodes:i,defaultEdges:l,zIndexMode:x}),setNodes:C=>{const{nodeLookup:k,parentLookup:j,nodeOrigin:E,elevateNodesOnSelect:D,fitViewQueued:U,zIndexMode:z}=w(),L=xh(C,k,j,{nodeOrigin:E,nodeExtent:m,elevateNodesOnSelect:D,checkEquality:!0,zIndexMode:z});U&&L?(_(),b({nodes:C,nodesInitialized:L,fitViewQueued:!1,fitViewOptions:void 0})):b({nodes:C,nodesInitialized:L})},setEdges:C=>{const{connectionLookup:k,edgeLookup:j}=w();Cb(k,j,C),b({edges:C})},setDefaultNodesAndEdges:(C,k)=>{if(C){const{setNodes:j}=w();j(C),b({hasDefaultNodes:!0})}if(k){const{setEdges:j}=w();j(k),b({hasDefaultEdges:!0})}},updateNodeInternals:C=>{const{triggerNodeChanges:k,nodeLookup:j,parentLookup:E,domNode:D,nodeOrigin:U,nodeExtent:z,debug:L,fitViewQueued:G,zIndexMode:Q}=w(),{changes:I,updatedInternals:Y}=oN(C,j,E,D,U,z,Q);Y&&(iN(j,E,{nodeOrigin:U,nodeExtent:z,zIndexMode:Q}),G?(_(),b({fitViewQueued:!1,fitViewOptions:void 0})):b({}),I?.length>0&&(L&&console.log("React Flow: trigger node changes",I),k?.(I)))},updateNodePositions:(C,k=!1)=>{const j=[];let E=[];const{nodeLookup:D,triggerNodeChanges:U,connection:z,updateConnection:L,onNodesChangeMiddlewareMap:G}=w();for(const[Q,I]of C){const Y=D.get(Q),X=!!(Y?.expandParent&&Y?.parentId&&I?.position),te={id:Q,type:"position",position:X?{x:Math.max(0,I.position.x),y:Math.max(0,I.position.y)}:I.position,dragging:k};if(Y&&z.inProgress&&z.fromNode.id===Y.id){const R=Lr(Y,z.fromHandle,ye.Left,!0);L({...z,from:R})}X&&Y.parentId&&j.push({id:Q,parentId:Y.parentId,rect:{...I.internals.positionAbsolute,width:I.measured.width??0,height:I.measured.height??0}}),E.push(te)}if(j.length>0){const{parentLookup:Q,nodeOrigin:I}=w(),Y=tp(j,D,Q,I);E.push(...Y)}for(const Q of G.values())E=Q(E);U(E)},triggerNodeChanges:C=>{const{onNodesChange:k,setNodes:j,nodes:E,hasDefaultNodes:D,debug:U}=w();if(C?.length){if(D){const z=Ib(C,E);j(z)}U&&console.log("React Flow: trigger node changes",C),k?.(C)}},triggerEdgeChanges:C=>{const{onEdgesChange:k,setEdges:j,edges:E,hasDefaultEdges:D,debug:U}=w();if(C?.length){if(D){const z=Vb(C,E);j(z)}U&&console.log("React Flow: trigger edge changes",C),k?.(C)}},addSelectedNodes:C=>{const{multiSelectionActive:k,edgeLookup:j,nodeLookup:E,triggerNodeChanges:D,triggerEdgeChanges:U}=w();if(k){const z=C.map(L=>Ar(L,!0));D(z);return}D(Ml(E,new Set([...C]),!0)),U(Ml(j))},addSelectedEdges:C=>{const{multiSelectionActive:k,edgeLookup:j,nodeLookup:E,triggerNodeChanges:D,triggerEdgeChanges:U}=w();if(k){const z=C.map(L=>Ar(L,!0));U(z);return}U(Ml(j,new Set([...C]))),D(Ml(E,new Set,!0))},unselectNodesAndEdges:({nodes:C,edges:k}={})=>{const{edges:j,nodes:E,nodeLookup:D,triggerNodeChanges:U,triggerEdgeChanges:z}=w(),L=C||E,G=k||j,Q=L.map(Y=>{const X=D.get(Y.id);return X&&(X.selected=!1),Ar(Y.id,!1)}),I=G.map(Y=>Ar(Y.id,!1));U(Q),z(I)},setMinZoom:C=>{const{panZoom:k,maxZoom:j}=w();k?.setScaleExtent([C,j]),b({minZoom:C})},setMaxZoom:C=>{const{panZoom:k,minZoom:j}=w();k?.setScaleExtent([j,C]),b({maxZoom:C})},setTranslateExtent:C=>{w().panZoom?.setTranslateExtent(C),b({translateExtent:C})},resetSelectedElements:()=>{const{edges:C,nodes:k,triggerNodeChanges:j,triggerEdgeChanges:E,elementsSelectable:D}=w();if(!D)return;const U=k.reduce((L,G)=>G.selected?[...L,Ar(G.id,!1)]:L,[]),z=C.reduce((L,G)=>G.selected?[...L,Ar(G.id,!1)]:L,[]);j(U),E(z)},setNodeExtent:C=>{const{nodes:k,nodeLookup:j,parentLookup:E,nodeOrigin:D,elevateNodesOnSelect:U,nodeExtent:z,zIndexMode:L}=w();C[0][0]===z[0][0]&&C[0][1]===z[0][1]&&C[1][0]===z[1][0]&&C[1][1]===z[1][1]||(xh(k,j,E,{nodeOrigin:D,nodeExtent:C,elevateNodesOnSelect:U,checkEquality:!1,zIndexMode:L}),b({nodeExtent:C}))},panBy:C=>{const{transform:k,width:j,height:E,panZoom:D,translateExtent:U}=w();return sN({delta:C,panZoom:D,transform:k,translateExtent:U,width:j,height:E})},setCenter:async(C,k,j)=>{const{width:E,height:D,maxZoom:U,panZoom:z}=w();if(!z)return Promise.resolve(!1);const L=typeof j?.zoom<"u"?j.zoom:U;return await z.setViewport({x:E/2-C*L,y:D/2-k*L,zoom:L},{duration:j?.duration,ease:j?.ease,interpolate:j?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{b({connection:{...ob}})},updateConnection:C=>{b({connection:C})},reset:()=>b({...Ax()})}},Object.is);function hv({initialNodes:e,initialEdges:n,defaultNodes:i,defaultEdges:l,initialWidth:o,initialHeight:u,initialMinZoom:c,initialMaxZoom:f,initialFitViewOptions:p,fitView:d,nodeOrigin:y,nodeExtent:m,zIndexMode:x,children:b}){const[w]=W.useState(()=>_A({nodes:e,edges:n,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:d,minZoom:c,maxZoom:f,fitViewOptions:p,nodeOrigin:y,nodeExtent:m,zIndexMode:x}));return S.jsx(XN,{value:w,children:S.jsx(hT,{children:b})})}function CA({children:e,nodes:n,edges:i,defaultNodes:l,defaultEdges:o,width:u,height:c,fitView:f,fitViewOptions:p,minZoom:d,maxZoom:y,nodeOrigin:m,nodeExtent:x,zIndexMode:b}){return W.useContext(Pu)?S.jsx(S.Fragment,{children:e}):S.jsx(hv,{initialNodes:n,initialEdges:i,defaultNodes:l,defaultEdges:o,initialWidth:u,initialHeight:c,fitView:f,initialFitViewOptions:p,initialMinZoom:d,initialMaxZoom:y,nodeOrigin:m,nodeExtent:x,zIndexMode:b,children:e})}const NA={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function TA({nodes:e,edges:n,defaultNodes:i,defaultEdges:l,className:o,nodeTypes:u,edgeTypes:c,onNodeClick:f,onEdgeClick:p,onInit:d,onMove:y,onMoveStart:m,onMoveEnd:x,onConnect:b,onConnectStart:w,onConnectEnd:_,onClickConnectStart:C,onClickConnectEnd:k,onNodeMouseEnter:j,onNodeMouseMove:E,onNodeMouseLeave:D,onNodeContextMenu:U,onNodeDoubleClick:z,onNodeDragStart:L,onNodeDrag:G,onNodeDragStop:Q,onNodesDelete:I,onEdgesDelete:Y,onDelete:X,onSelectionChange:te,onSelectionDragStart:R,onSelectionDrag:B,onSelectionDragStop:M,onSelectionContextMenu:H,onSelectionStart:$,onSelectionEnd:P,onBeforeDelete:A,connectionMode:O,connectionLineType:V=ir.Bezier,connectionLineStyle:T,connectionLineComponent:ne,connectionLineContainerStyle:ue,deleteKeyCode:ce="Backspace",selectionKeyCode:de="Shift",selectionOnDrag:se=!1,selectionMode:pe=co.Full,panActivationKeyCode:Ee="Space",multiSelectionKeyCode:_e=ho()?"Meta":"Control",zoomActivationKeyCode:be=ho()?"Meta":"Control",snapToGrid:ke,snapGrid:ze,onlyRenderVisibleElements:$e=!1,selectNodesOnDrag:Ve,nodesDraggable:ct,autoPanOnNodeFocus:Jt,nodesConnectable:zt,nodesFocusable:qt,nodeOrigin:En=Ub,edgesFocusable:Pn,edgesReconnectable:Kn,elementsSelectable:St=!0,defaultViewport:_i=iT,minZoom:re=.5,maxZoom:he=2,translateExtent:we=uo,preventScrolling:Me=!0,nodeExtent:Ue,defaultMarkerColor:Bt="#b1b1b7",zoomOnScroll:kn=!0,zoomOnPinch:Ct=!0,panOnScroll:ft=!1,panOnScrollSpeed:Dt=.5,panOnScrollMode:Ze=Dr.Free,zoomOnDoubleClick:Ln=!0,panOnDrag:Wt=!0,onPaneClick:uc,onPaneMouseEnter:Ur,onPaneMouseMove:qr,onPaneMouseLeave:Ir,onPaneScroll:Jn,onPaneContextMenu:Vr,paneClickDistance:or=1,nodeClickDistance:cc=0,children:zo,onReconnect:Gl,onReconnectStart:sr,onReconnectEnd:fc,onEdgeContextMenu:Do,onEdgeDoubleClick:Oo,onEdgeMouseEnter:Ro,onEdgeMouseMove:Zl,onEdgeMouseLeave:Ql,reconnectRadius:jo=10,onNodesChange:Lo,onEdgesChange:Bn,noDragClassName:Et="nodrag",noWheelClassName:Ot="nowheel",noPanClassName:Wn="nopan",fitView:Yr,fitViewOptions:Bo,connectOnClick:dc,attributionPosition:Ho,proOptions:ur,defaultEdgeOptions:Pl,elevateNodesOnSelect:Ci=!0,elevateEdgesOnSelect:Ni=!1,disableKeyboardA11y:Ti=!1,autoPanOnConnect:Ai,autoPanOnNodeDrag:pt,autoPanSpeed:Uo,connectionRadius:qo,isValidConnection:ei,onError:Mi,style:hc,id:Kl,nodeDragThreshold:Io,connectionDragThreshold:pc,viewport:Xr,onViewportChange:$r,width:_n,height:It,colorMode:Vo="light",debug:mc,onScroll:Fr,ariaLabelConfig:Yo,zIndexMode:cr="basic",...gc},Vt){const fr=Kl||"1",Xo=oT(Vo),Jl=W.useCallback(ti=>{ti.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Fr?.(ti)},[Fr]);return S.jsx("div",{"data-testid":"rf__wrapper",...gc,onScroll:Jl,style:{...hc,...NA},ref:Vt,className:wt(["react-flow",o,Xo]),id:Kl,role:"application",children:S.jsxs(CA,{nodes:e,edges:n,width:_n,height:It,fitView:Yr,fitViewOptions:Bo,minZoom:re,maxZoom:he,nodeOrigin:En,nodeExtent:Ue,zIndexMode:cr,children:[S.jsx(kA,{onInit:d,onNodeClick:f,onEdgeClick:p,onNodeMouseEnter:j,onNodeMouseMove:E,onNodeMouseLeave:D,onNodeContextMenu:U,onNodeDoubleClick:z,nodeTypes:u,edgeTypes:c,connectionLineType:V,connectionLineStyle:T,connectionLineComponent:ne,connectionLineContainerStyle:ue,selectionKeyCode:de,selectionOnDrag:se,selectionMode:pe,deleteKeyCode:ce,multiSelectionKeyCode:_e,panActivationKeyCode:Ee,zoomActivationKeyCode:be,onlyRenderVisibleElements:$e,defaultViewport:_i,translateExtent:we,minZoom:re,maxZoom:he,preventScrolling:Me,zoomOnScroll:kn,zoomOnPinch:Ct,zoomOnDoubleClick:Ln,panOnScroll:ft,panOnScrollSpeed:Dt,panOnScrollMode:Ze,panOnDrag:Wt,onPaneClick:uc,onPaneMouseEnter:Ur,onPaneMouseMove:qr,onPaneMouseLeave:Ir,onPaneScroll:Jn,onPaneContextMenu:Vr,paneClickDistance:or,nodeClickDistance:cc,onSelectionContextMenu:H,onSelectionStart:$,onSelectionEnd:P,onReconnect:Gl,onReconnectStart:sr,onReconnectEnd:fc,onEdgeContextMenu:Do,onEdgeDoubleClick:Oo,onEdgeMouseEnter:Ro,onEdgeMouseMove:Zl,onEdgeMouseLeave:Ql,reconnectRadius:jo,defaultMarkerColor:Bt,noDragClassName:Et,noWheelClassName:Ot,noPanClassName:Wn,rfId:fr,disableKeyboardA11y:Ti,nodeExtent:Ue,viewport:Xr,onViewportChange:$r}),S.jsx(aT,{nodes:e,edges:n,defaultNodes:i,defaultEdges:l,onConnect:b,onConnectStart:w,onConnectEnd:_,onClickConnectStart:C,onClickConnectEnd:k,nodesDraggable:ct,autoPanOnNodeFocus:Jt,nodesConnectable:zt,nodesFocusable:qt,edgesFocusable:Pn,edgesReconnectable:Kn,elementsSelectable:St,elevateNodesOnSelect:Ci,elevateEdgesOnSelect:Ni,minZoom:re,maxZoom:he,nodeExtent:Ue,onNodesChange:Lo,onEdgesChange:Bn,snapToGrid:ke,snapGrid:ze,connectionMode:O,translateExtent:we,connectOnClick:dc,defaultEdgeOptions:Pl,fitView:Yr,fitViewOptions:Bo,onNodesDelete:I,onEdgesDelete:Y,onDelete:X,onNodeDragStart:L,onNodeDrag:G,onNodeDragStop:Q,onSelectionDrag:B,onSelectionDragStart:R,onSelectionDragStop:M,onMove:y,onMoveStart:m,onMoveEnd:x,noPanClassName:Wn,nodeOrigin:En,rfId:fr,autoPanOnConnect:Ai,autoPanOnNodeDrag:pt,autoPanSpeed:Uo,onError:Mi,connectionRadius:qo,isValidConnection:ei,selectNodesOnDrag:Ve,nodeDragThreshold:Io,connectionDragThreshold:pc,onBeforeDelete:A,debug:mc,ariaLabelConfig:Yo,zIndexMode:cr}),S.jsx(nT,{onSelectionChange:te}),zo,S.jsx(KN,{proOptions:ur,position:Ho}),S.jsx(PN,{rfId:fr,disableKeyboardA11y:Ti})]})})}var AA=Yb(TA);function MA({dimensions:e,lineWidth:n,variant:i,className:l}){return S.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:wt(["react-flow__background-pattern",i,l])})}function zA({radius:e,className:n}){return S.jsx("circle",{cx:e,cy:e,r:e,className:wt(["react-flow__background-pattern","dots",n])})}var wi;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(wi||(wi={}));const DA={[wi.Dots]:1,[wi.Lines]:1,[wi.Cross]:6},OA=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function pv({id:e,variant:n=wi.Dots,gap:i=20,size:l,lineWidth:o=1,offset:u=0,color:c,bgColor:f,style:p,className:d,patternClassName:y}){const m=W.useRef(null),{transform:x,patternId:b}=Ie(OA,at),w=l||DA[n],_=n===wi.Dots,C=n===wi.Cross,k=Array.isArray(i)?i:[i,i],j=[k[0]*x[2]||1,k[1]*x[2]||1],E=w*x[2],D=Array.isArray(u)?u:[u,u],U=C?[E,E]:j,z=[D[0]*x[2]||1+U[0]/2,D[1]*x[2]||1+U[1]/2],L=`${b}${e||""}`;return S.jsxs("svg",{className:wt(["react-flow__background",d]),style:{...p,...Ju,"--xy-background-color-props":f,"--xy-background-pattern-color-props":c},ref:m,"data-testid":"rf__background",children:[S.jsx("pattern",{id:L,x:x[0]%j[0],y:x[1]%j[1],width:j[0],height:j[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:_?S.jsx(zA,{radius:E/2,className:y}):S.jsx(MA,{dimensions:U,lineWidth:o,variant:n,className:y})}),S.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${L})`})]})}pv.displayName="Background";const RA=W.memo(pv);function jA(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:S.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function LA(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:S.jsx("path",{d:"M0 0h32v4.2H0z"})})}function BA(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:S.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function HA(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:S.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function UA(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:S.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function su({children:e,className:n,...i}){return S.jsx("button",{type:"button",className:wt(["react-flow__controls-button",n]),...i,children:e})}const qA=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function mv({style:e,showZoom:n=!0,showFitView:i=!0,showInteractive:l=!0,fitViewOptions:o,onZoomIn:u,onZoomOut:c,onFitView:f,onInteractiveChange:p,className:d,children:y,position:m="bottom-left",orientation:x="vertical","aria-label":b}){const w=ot(),{isInteractive:_,minZoomReached:C,maxZoomReached:k,ariaLabelConfig:j}=Ie(qA,at),{zoomIn:E,zoomOut:D,fitView:U}=np(),z=()=>{E(),u?.()},L=()=>{D(),c?.()},G=()=>{U(o),f?.()},Q=()=>{w.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),p?.(!_)},I=x==="horizontal"?"horizontal":"vertical";return S.jsxs(Ku,{className:wt(["react-flow__controls",I,d]),position:m,style:e,"data-testid":"rf__controls","aria-label":b??j["controls.ariaLabel"],children:[n&&S.jsxs(S.Fragment,{children:[S.jsx(su,{onClick:z,className:"react-flow__controls-zoomin",title:j["controls.zoomIn.ariaLabel"],"aria-label":j["controls.zoomIn.ariaLabel"],disabled:k,children:S.jsx(jA,{})}),S.jsx(su,{onClick:L,className:"react-flow__controls-zoomout",title:j["controls.zoomOut.ariaLabel"],"aria-label":j["controls.zoomOut.ariaLabel"],disabled:C,children:S.jsx(LA,{})})]}),i&&S.jsx(su,{className:"react-flow__controls-fitview",onClick:G,title:j["controls.fitView.ariaLabel"],"aria-label":j["controls.fitView.ariaLabel"],children:S.jsx(BA,{})}),l&&S.jsx(su,{className:"react-flow__controls-interactive",onClick:Q,title:j["controls.interactive.ariaLabel"],"aria-label":j["controls.interactive.ariaLabel"],children:_?S.jsx(UA,{}):S.jsx(HA,{})}),y]})}mv.displayName="Controls";const IA=W.memo(mv);function VA({id:e,x:n,y:i,width:l,height:o,style:u,color:c,strokeColor:f,strokeWidth:p,className:d,borderRadius:y,shapeRendering:m,selected:x,onClick:b}){const{background:w,backgroundColor:_}=u||{},C=c||w||_;return S.jsx("rect",{className:wt(["react-flow__minimap-node",{selected:x},d]),x:n,y:i,rx:y,ry:y,width:l,height:o,style:{fill:C,stroke:f,strokeWidth:p},shapeRendering:m,onClick:b?k=>b(k,e):void 0})}const YA=W.memo(VA),XA=e=>e.nodes.map(n=>n.id),qd=e=>e instanceof Function?e:()=>e;function $A({nodeStrokeColor:e,nodeColor:n,nodeClassName:i="",nodeBorderRadius:l=5,nodeStrokeWidth:o,nodeComponent:u=YA,onClick:c}){const f=Ie(XA,at),p=qd(n),d=qd(e),y=qd(i),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return S.jsx(S.Fragment,{children:f.map(x=>S.jsx(GA,{id:x,nodeColorFunc:p,nodeStrokeColorFunc:d,nodeClassNameFunc:y,nodeBorderRadius:l,nodeStrokeWidth:o,NodeComponent:u,onClick:c,shapeRendering:m},x))})}function FA({id:e,nodeColorFunc:n,nodeStrokeColorFunc:i,nodeClassNameFunc:l,nodeBorderRadius:o,nodeStrokeWidth:u,shapeRendering:c,NodeComponent:f,onClick:p}){const{node:d,x:y,y:m,width:x,height:b}=Ie(w=>{const{internals:_}=w.nodeLookup.get(e),C=_.userNode,{x:k,y:j}=_.positionAbsolute,{width:E,height:D}=Ei(C);return{node:C,x:k,y:j,width:E,height:D}},at);return!d||d.hidden||!pb(d)?null:S.jsx(f,{x:y,y:m,width:x,height:b,style:d.style,selected:!!d.selected,className:l(d),color:n(d),borderRadius:o,strokeColor:i(d),strokeWidth:u,shapeRendering:c,onClick:p,id:d.id})}const GA=W.memo(FA);var ZA=W.memo($A);const QA=200,PA=150,KA=e=>!e.hidden,JA=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?hb(Eo(e.nodeLookup,{filter:KA}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},WA="react-flow__minimap-desc";function gv({style:e,className:n,nodeStrokeColor:i,nodeColor:l,nodeClassName:o="",nodeBorderRadius:u=5,nodeStrokeWidth:c,nodeComponent:f,bgColor:p,maskColor:d,maskStrokeColor:y,maskStrokeWidth:m,position:x="bottom-right",onClick:b,onNodeClick:w,pannable:_=!1,zoomable:C=!1,ariaLabel:k,inversePan:j,zoomStep:E=1,offsetScale:D=5}){const U=ot(),z=W.useRef(null),{boundingRect:L,viewBB:G,rfId:Q,panZoom:I,translateExtent:Y,flowWidth:X,flowHeight:te,ariaLabelConfig:R}=Ie(JA,at),B=e?.width??QA,M=e?.height??PA,H=L.width/B,$=L.height/M,P=Math.max(H,$),A=P*B,O=P*M,V=D*P,T=L.x-(A-L.width)/2-V,ne=L.y-(O-L.height)/2-V,ue=A+V*2,ce=O+V*2,de=`${WA}-${Q}`,se=W.useRef(0),pe=W.useRef();se.current=P,W.useEffect(()=>{if(z.current&&I)return pe.current=yN({domNode:z.current,panZoom:I,getTransform:()=>U.getState().transform,getViewScale:()=>se.current}),()=>{pe.current?.destroy()}},[I]),W.useEffect(()=>{pe.current?.update({translateExtent:Y,width:X,height:te,inversePan:j,pannable:_,zoomStep:E,zoomable:C})},[_,C,j,E,Y,X,te]);const Ee=b?ke=>{const[ze,$e]=pe.current?.pointer(ke)||[0,0];b(ke,{x:ze,y:$e})}:void 0,_e=w?W.useCallback((ke,ze)=>{const $e=U.getState().nodeLookup.get(ze).internals.userNode;w(ke,$e)},[]):void 0,be=k??R["minimap.ariaLabel"];return S.jsx(Ku,{position:x,style:{...e,"--xy-minimap-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof y=="string"?y:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*P:void 0,"--xy-minimap-node-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-node-stroke-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-width-props":typeof c=="number"?c:void 0},className:wt(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:S.jsxs("svg",{width:B,height:M,viewBox:`${T} ${ne} ${ue} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":de,ref:z,onClick:Ee,children:[be&&S.jsx("title",{id:de,children:be}),S.jsx(ZA,{onClick:_e,nodeColor:l,nodeStrokeColor:i,nodeBorderRadius:u,nodeClassName:o,nodeStrokeWidth:c,nodeComponent:f}),S.jsx("path",{className:"react-flow__minimap-mask",d:`M${T-V},${ne-V}h${ue+V*2}v${ce+V*2}h${-ue-V*2}z
15
+ M${G.x},${G.y}h${G.width}v${G.height}h${-G.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}gv.displayName="MiniMap";const e3=W.memo(gv),t3=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,n3={[ql.Line]:"right",[ql.Handle]:"bottom-right"};function i3({nodeId:e,position:n,variant:i=ql.Handle,className:l,style:o=void 0,children:u,color:c,minWidth:f=10,minHeight:p=10,maxWidth:d=Number.MAX_VALUE,maxHeight:y=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:x,autoScale:b=!0,shouldResize:w,onResizeStart:_,onResize:C,onResizeEnd:k}){const j=Gb(),E=typeof e=="string"?e:j,D=ot(),U=W.useRef(null),z=i===ql.Handle,L=Ie(W.useCallback(t3(z&&b),[z,b]),at),G=W.useRef(null),Q=n??n3[i];W.useEffect(()=>{if(!(!U.current||!E))return G.current||(G.current=zN({domNode:U.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:Y,transform:X,snapGrid:te,snapToGrid:R,nodeOrigin:B,domNode:M}=D.getState();return{nodeLookup:Y,transform:X,snapGrid:te,snapToGrid:R,nodeOrigin:B,paneDomNode:M}},onChange:(Y,X)=>{const{triggerNodeChanges:te,nodeLookup:R,parentLookup:B,nodeOrigin:M}=D.getState(),H=[],$={x:Y.x,y:Y.y},P=R.get(E);if(P&&P.expandParent&&P.parentId){const A=P.origin??M,O=Y.width??P.measured.width??0,V=Y.height??P.measured.height??0,T={id:P.id,parentId:P.parentId,rect:{width:O,height:V,...mb({x:Y.x??P.position.x,y:Y.y??P.position.y},{width:O,height:V},P.parentId,R,A)}},ne=tp([T],R,B,M);H.push(...ne),$.x=Y.x?Math.max(A[0]*O,Y.x):void 0,$.y=Y.y?Math.max(A[1]*V,Y.y):void 0}if($.x!==void 0&&$.y!==void 0){const A={id:E,type:"position",position:{...$}};H.push(A)}if(Y.width!==void 0&&Y.height!==void 0){const O={id:E,type:"dimensions",resizing:!0,setAttributes:x?x==="horizontal"?"width":"height":!0,dimensions:{width:Y.width,height:Y.height}};H.push(O)}for(const A of X){const O={...A,type:"position"};H.push(O)}te(H)},onEnd:({width:Y,height:X})=>{const te={id:E,type:"dimensions",resizing:!1,dimensions:{width:Y,height:X}};D.getState().triggerNodeChanges([te])}})),G.current.update({controlPosition:Q,boundaries:{minWidth:f,minHeight:p,maxWidth:d,maxHeight:y},keepAspectRatio:m,resizeDirection:x,onResizeStart:_,onResize:C,onResizeEnd:k,shouldResize:w}),()=>{G.current?.destroy()}},[Q,f,p,d,y,m,_,C,k,w]);const I=Q.split("-");return S.jsx("div",{className:wt(["react-flow__resize-control","nodrag",...I,i,l]),ref:U,style:{...o,scale:L,...c&&{[z?"backgroundColor":"borderColor"]:c}},children:u})}W.memo(i3);const yv=(...e)=>e.filter((n,i,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===i).join(" ").trim();const r3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const l3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,l)=>l?l.toUpperCase():i.toLowerCase());const Mx=e=>{const n=l3(e);return n.charAt(0).toUpperCase()+n.slice(1)};var a3={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const o3=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};const s3=W.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:u,iconNode:c,...f},p)=>W.createElement("svg",{ref:p,...a3,width:n,height:n,stroke:e,strokeWidth:l?Number(i)*24/Number(n):i,className:yv("lucide",o),...!u&&!o3(f)&&{"aria-hidden":"true"},...f},[...c.map(([d,y])=>W.createElement(d,y)),...Array.isArray(u)?u:[u]]));const Ge=(e,n)=>{const i=W.forwardRef(({className:l,...o},u)=>W.createElement(s3,{ref:u,iconNode:n,className:yv(`lucide-${r3(Mx(e))}`,`lucide-${e}`,l),...o}));return i.displayName=Mx(e),i};const u3=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],c3=Ge("arrow-left",u3);const f3=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],d3=Ge("bot",f3);const h3=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],ec=Ge("chart-column",h3);const p3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],m3=Ge("check",p3);const g3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],wh=Ge("circle-alert",g3);const y3=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],x3=Ge("circle-check-big",y3);const b3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],v3=Ge("circle-check",b3);const w3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],S3=Ge("circle-x",w3);const E3=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Lu=Ge("download",E3);const k3=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_3=Ge("eye",k3);const C3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],mo=Ge("file-text",C3);const N3=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],zx=Ge("folder-open",N3);const T3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],A3=Ge("globe",T3);const M3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],z3=Ge("image",M3);const D3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],O3=Ge("info",D3);const R3=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],j3=Ge("link-2",R3);const L3=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],xv=Ge("loader-circle",L3);const B3=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],rp=Ge("message-square",B3);const H3=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],bv=Ge("play",H3);const U3=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],lp=Ge("plug",U3);const q3=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],I3=Ge("save",q3);const V3=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Y3=Ge("send",V3);const X3=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],$3=Ge("settings-2",X3);const F3=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],vv=Ge("settings",F3);const G3=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Co=Ge("sparkles",G3);const Z3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Q3=Ge("square",Z3);const P3=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],K3=Ge("terminal",P3);const J3=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],wv=Ge("trash-2",J3);const W3=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],e4=Ge("triangle-alert",W3);const t4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],n4=Ge("x",t4);const i4=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],tc=Ge("zap",i4),Dx=e=>{let n;const i=new Set,l=(d,y)=>{const m=typeof d=="function"?d(n):d;if(!Object.is(m,n)){const x=n;n=y??(typeof m!="object"||m===null)?m:Object.assign({},n,m),i.forEach(b=>b(n,x))}},o=()=>n,f={setState:l,getState:o,getInitialState:()=>p,subscribe:d=>(i.add(d),()=>i.delete(d))},p=n=e(l,o,f);return f},r4=(e=>e?Dx(e):Dx),l4=e=>e;function a4(e,n=l4){const i=Pa.useSyncExternalStore(e.subscribe,Pa.useCallback(()=>n(e.getState()),[e,n]),Pa.useCallback(()=>n(e.getInitialState()),[e,n]));return Pa.useDebugValue(i),i}const Ox=e=>{const n=r4(e),i=l=>a4(n,l);return Object.assign(i,n),i},ap=(e=>e?Ox(e):Ox);function o4(e,n){let i;try{i=e()}catch{return}return{getItem:o=>{var u;const c=p=>p===null?null:JSON.parse(p,void 0),f=(u=i.getItem(o))!=null?u:null;return f instanceof Promise?f.then(c):c(f)},setItem:(o,u)=>i.setItem(o,JSON.stringify(u,void 0)),removeItem:o=>i.removeItem(o)}}const Sh=e=>n=>{try{const i=e(n);return i instanceof Promise?i:{then(l){return Sh(l)(i)},catch(l){return this}}}catch(i){return{then(l){return this},catch(l){return Sh(l)(i)}}}},s4=(e,n)=>(i,l,o)=>{let u={storage:o4(()=>localStorage),partialize:C=>C,version:0,merge:(C,k)=>({...k,...C}),...n},c=!1,f=0;const p=new Set,d=new Set;let y=u.storage;if(!y)return e((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),i(...C)},l,o);const m=()=>{const C=u.partialize({...l()});return y.setItem(u.name,{state:C,version:u.version})},x=o.setState;o.setState=(C,k)=>(x(C,k),m());const b=e((...C)=>(i(...C),m()),l,o);o.getInitialState=()=>b;let w;const _=()=>{var C,k;if(!y)return;const j=++f;c=!1,p.forEach(D=>{var U;return D((U=l())!=null?U:b)});const E=((k=u.onRehydrateStorage)==null?void 0:k.call(u,(C=l())!=null?C:b))||void 0;return Sh(y.getItem.bind(y))(u.name).then(D=>{if(D)if(typeof D.version=="number"&&D.version!==u.version){if(u.migrate){const U=u.migrate(D.state,D.version);return U instanceof Promise?U.then(z=>[!0,z]):[!0,U]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,D.state];return[!1,void 0]}).then(D=>{var U;if(j!==f)return;const[z,L]=D;if(w=u.merge(L,(U=l())!=null?U:b),i(w,!0),z)return m()}).then(()=>{j===f&&(E?.(w,void 0),w=l(),c=!0,d.forEach(D=>D(w)))}).catch(D=>{j===f&&E?.(void 0,D)})};return o.persist={setOptions:C=>{u={...u,...C},C.storage&&(y=C.storage)},clearStorage:()=>{y?.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>_(),hasHydrated:()=>c,onHydrate:C=>(p.add(C),()=>{p.delete(C)}),onFinishHydration:C=>(d.add(C),()=>{d.delete(C)})},u.skipHydration||_(),w||b},u4=s4,c4="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let go=(e=21)=>{let n="",i=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)n+=c4[i[e]&63];return n};const lr=ap()(u4(e=>({nodes:[],edges:[],selectedNodeId:null,workflowId:go(),workflowName:"Untitled Workflow",isDraft:!0,addNode:n=>e(i=>({nodes:[...i.nodes,n]})),updateNode:(n,i)=>e(l=>({nodes:l.nodes.map(o=>o.id===n?{...o,data:{...o.data,...i}}:o)})),updateNodeStatus:(n,i,l)=>e(o=>({nodes:o.nodes.map(u=>u.id===n?{...u,data:{...u.data,status:i,progress:l??u.data.progress}}:u)})),removeNode:n=>e(i=>({nodes:i.nodes.filter(l=>l.id!==n),edges:i.edges.filter(l=>l.source!==n&&l.target!==n),selectedNodeId:i.selectedNodeId===n?null:i.selectedNodeId})),setSelectedNode:n=>e({selectedNodeId:n}),addEdge:n=>e(i=>({edges:[...i.edges,n]})),removeEdge:n=>e(i=>({edges:i.edges.filter(l=>l.id!==n)})),setWorkflowName:n=>e({workflowName:n}),loadWorkflow:n=>e({nodes:n.nodes,edges:n.edges,workflowName:n.name||"Imported Workflow",selectedNodeId:null}),clearWorkflow:()=>e({nodes:[],edges:[],selectedNodeId:null}),newWorkflow:()=>e({nodes:[],edges:[],selectedNodeId:null,workflowId:go(),workflowName:"Untitled Workflow",isDraft:!0}),setNodes:n=>e({nodes:n}),setEdges:n=>e({edges:n})}),{name:"workflow-storage",partialize:e=>({nodes:e.nodes,edges:e.edges,workflowId:e.workflowId,workflowName:e.workflowName})})),f4=e=>e.nodes.find(n=>n.id===e.selectedNodeId),Gn=Object.create(null);Gn.open="0";Gn.close="1";Gn.ping="2";Gn.pong="3";Gn.message="4";Gn.upgrade="5";Gn.noop="6";const vu=Object.create(null);Object.keys(Gn).forEach(e=>{vu[Gn[e]]=e});const Eh={type:"error",data:"parser error"},Sv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ev=typeof ArrayBuffer=="function",kv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,op=({type:e,data:n},i,l)=>Sv&&n instanceof Blob?i?l(n):Rx(n,l):Ev&&(n instanceof ArrayBuffer||kv(n))?i?l(n):Rx(new Blob([n]),l):l(Gn[e]+(n||"")),Rx=(e,n)=>{const i=new FileReader;return i.onload=function(){const l=i.result.split(",")[1];n("b"+(l||""))},i.readAsDataURL(e)};function jx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Id;function d4(e,n){if(Sv&&e.data instanceof Blob)return e.data.arrayBuffer().then(jx).then(n);if(Ev&&(e.data instanceof ArrayBuffer||kv(e.data)))return n(jx(e.data));op(e,!1,i=>{Id||(Id=new TextEncoder),n(Id.encode(i))})}const Lx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Lx.length;e++)Wa[Lx.charCodeAt(e)]=e;const h4=e=>{let n=e.length*.75,i=e.length,l,o=0,u,c,f,p;e[e.length-1]==="="&&(n--,e[e.length-2]==="="&&n--);const d=new ArrayBuffer(n),y=new Uint8Array(d);for(l=0;l<i;l+=4)u=Wa[e.charCodeAt(l)],c=Wa[e.charCodeAt(l+1)],f=Wa[e.charCodeAt(l+2)],p=Wa[e.charCodeAt(l+3)],y[o++]=u<<2|c>>4,y[o++]=(c&15)<<4|f>>2,y[o++]=(f&3)<<6|p&63;return d},p4=typeof ArrayBuffer=="function",sp=(e,n)=>{if(typeof e!="string")return{type:"message",data:_v(e,n)};const i=e.charAt(0);return i==="b"?{type:"message",data:m4(e.substring(1),n)}:vu[i]?e.length>1?{type:vu[i],data:e.substring(1)}:{type:vu[i]}:Eh},m4=(e,n)=>{if(p4){const i=h4(e);return _v(i,n)}else return{base64:!0,data:e}},_v=(e,n)=>n==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Cv="",g4=(e,n)=>{const i=e.length,l=new Array(i);let o=0;e.forEach((u,c)=>{op(u,!1,f=>{l[c]=f,++o===i&&n(l.join(Cv))})})},y4=(e,n)=>{const i=e.split(Cv),l=[];for(let o=0;o<i.length;o++){const u=sp(i[o],n);if(l.push(u),u.type==="error")break}return l};function x4(){return new TransformStream({transform(e,n){d4(e,i=>{const l=i.length;let o;if(l<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,l);else if(l<65536){o=new Uint8Array(3);const u=new DataView(o.buffer);u.setUint8(0,126),u.setUint16(1,l)}else{o=new Uint8Array(9);const u=new DataView(o.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(l))}e.data&&typeof e.data!="string"&&(o[0]|=128),n.enqueue(o),n.enqueue(i)})}})}let Vd;function uu(e){return e.reduce((n,i)=>n+i.length,0)}function cu(e,n){if(e[0].length===n)return e.shift();const i=new Uint8Array(n);let l=0;for(let o=0;o<n;o++)i[o]=e[0][l++],l===e[0].length&&(e.shift(),l=0);return e.length&&l<e[0].length&&(e[0]=e[0].slice(l)),i}function b4(e,n){Vd||(Vd=new TextDecoder);const i=[];let l=0,o=-1,u=!1;return new TransformStream({transform(c,f){for(i.push(c);;){if(l===0){if(uu(i)<1)break;const p=cu(i,1);u=(p[0]&128)===128,o=p[0]&127,o<126?l=3:o===126?l=1:l=2}else if(l===1){if(uu(i)<2)break;const p=cu(i,2);o=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),l=3}else if(l===2){if(uu(i)<8)break;const p=cu(i,8),d=new DataView(p.buffer,p.byteOffset,p.length),y=d.getUint32(0);if(y>Math.pow(2,21)-1){f.enqueue(Eh);break}o=y*Math.pow(2,32)+d.getUint32(4),l=3}else{if(uu(i)<o)break;const p=cu(i,o);f.enqueue(sp(u?p:Vd.decode(p),n)),l=0}if(o===0||o>e){f.enqueue(Eh);break}}}})}const Nv=4;function vt(e){if(e)return v4(e)}function v4(e){for(var n in vt.prototype)e[n]=vt.prototype[n];return e}vt.prototype.on=vt.prototype.addEventListener=function(e,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(n),this};vt.prototype.once=function(e,n){function i(){this.off(e,i),n.apply(this,arguments)}return i.fn=n,this.on(e,i),this};vt.prototype.off=vt.prototype.removeListener=vt.prototype.removeAllListeners=vt.prototype.removeEventListener=function(e,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+e];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var l,o=0;o<i.length;o++)if(l=i[o],l===n||l.fn===n){i.splice(o,1);break}return i.length===0&&delete this._callbacks["$"+e],this};vt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),i=this._callbacks["$"+e],l=1;l<arguments.length;l++)n[l-1]=arguments[l];if(i){i=i.slice(0);for(var l=0,o=i.length;l<o;++l)i[l].apply(this,n)}return this};vt.prototype.emitReserved=vt.prototype.emit;vt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};vt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const nc=typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,i)=>i(n,0),wn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),w4="arraybuffer";function Tv(e,...n){return n.reduce((i,l)=>(e.hasOwnProperty(l)&&(i[l]=e[l]),i),{})}const S4=wn.setTimeout,E4=wn.clearTimeout;function ic(e,n){n.useNativeTimers?(e.setTimeoutFn=S4.bind(wn),e.clearTimeoutFn=E4.bind(wn)):(e.setTimeoutFn=wn.setTimeout.bind(wn),e.clearTimeoutFn=wn.clearTimeout.bind(wn))}const k4=1.33;function _4(e){return typeof e=="string"?C4(e):Math.ceil((e.byteLength||e.size)*k4)}function C4(e){let n=0,i=0;for(let l=0,o=e.length;l<o;l++)n=e.charCodeAt(l),n<128?i+=1:n<2048?i+=2:n<55296||n>=57344?i+=3:(l++,i+=4);return i}function Av(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function N4(e){let n="";for(let i in e)e.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return n}function T4(e){let n={},i=e.split("&");for(let l=0,o=i.length;l<o;l++){let u=i[l].split("=");n[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return n}class A4 extends Error{constructor(n,i,l){super(n),this.description=i,this.context=l,this.type="TransportError"}}class up extends vt{constructor(n){super(),this.writable=!1,ic(this,n),this.opts=n,this.query=n.query,this.socket=n.socket,this.supportsBinary=!n.forceBase64}onError(n,i,l){return super.emitReserved("error",new A4(n,i,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(n){this.readyState==="open"&&this.write(n)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(n){const i=sp(n,this.socket.binaryType);this.onPacket(i)}onPacket(n){super.emitReserved("packet",n)}onClose(n){this.readyState="closed",super.emitReserved("close",n)}pause(n){}createUri(n,i={}){return n+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const n=this.opts.hostname;return n.indexOf(":")===-1?n:"["+n+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(n){const i=N4(n);return i.length?"?"+i:""}}class M4 extends up{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(n){this.readyState="pausing";const i=()=>{this.readyState="paused",n()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||i()})),this.writable||(l++,this.once("drain",function(){--l||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(n){const i=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};y4(n,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const n=()=>{this.write([{type:"close"}])};this.readyState==="open"?n():this.once("open",n)}write(n){this.writable=!1,g4(n,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const n=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=Av()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(n,i)}}let Mv=!1;try{Mv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const z4=Mv;function D4(){}class O4 extends M4{constructor(n){if(super(n),typeof location<"u"){const i=location.protocol==="https:";let l=location.port;l||(l=i?"443":"80"),this.xd=typeof location<"u"&&n.hostname!==location.hostname||l!==n.port}}doWrite(n,i){const l=this.request({method:"POST",data:n});l.on("success",i),l.on("error",(o,u)=>{this.onError("xhr post error",o,u)})}doPoll(){const n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(i,l)=>{this.onError("xhr poll error",i,l)}),this.pollXhr=n}}class $n extends vt{constructor(n,i,l){super(),this.createRequest=n,ic(this,l),this._opts=l,this._method=l.method||"GET",this._uri=i,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var n;const i=Tv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(i);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&l.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(n=this._opts.cookieJar)===null||n===void 0||n.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var o;l.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=$n.requestsCount++,$n.requests[this._index]=this)}_onError(n){this.emitReserved("error",n,this._xhr),this._cleanup(!0)}_cleanup(n){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=D4,n)try{this._xhr.abort()}catch{}typeof document<"u"&&delete $n.requests[this._index],this._xhr=null}}_onLoad(){const n=this._xhr.responseText;n!==null&&(this.emitReserved("data",n),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}$n.requestsCount=0;$n.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Bx);else if(typeof addEventListener=="function"){const e="onpagehide"in wn?"pagehide":"unload";addEventListener(e,Bx,!1)}}function Bx(){for(let e in $n.requests)$n.requests.hasOwnProperty(e)&&$n.requests[e].abort()}const R4=(function(){const e=zv({xdomain:!1});return e&&e.responseType!==null})();class j4 extends O4{constructor(n){super(n);const i=n&&n.forceBase64;this.supportsBinary=R4&&!i}request(n={}){return Object.assign(n,{xd:this.xd},this.opts),new $n(zv,this.uri(),n)}}function zv(e){const n=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!n||z4))return new XMLHttpRequest}catch{}if(!n)try{return new wn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Dv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class L4 extends up{get name(){return"websocket"}doOpen(){const n=this.uri(),i=this.opts.protocols,l=Dv?{}:Tv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(n,i,l)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=n=>this.onClose({description:"websocket connection closed",context:n}),this.ws.onmessage=n=>this.onData(n.data),this.ws.onerror=n=>this.onError("websocket error",n)}write(n){this.writable=!1;for(let i=0;i<n.length;i++){const l=n[i],o=i===n.length-1;op(l,this.supportsBinary,u=>{try{this.doWrite(l,u)}catch{}o&&nc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const n=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=Av()),this.supportsBinary||(i.b64=1),this.createUri(n,i)}}const Yd=wn.WebSocket||wn.MozWebSocket;class B4 extends L4{createSocket(n,i,l){return Dv?new Yd(n,i,l):i?new Yd(n,i):new Yd(n)}doWrite(n,i){this.ws.send(i)}}class H4 extends up{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(n){return this.emitReserved("error",n)}this._transport.closed.then(()=>{this.onClose()}).catch(n=>{this.onError("webtransport error",n)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(n=>{const i=b4(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=n.readable.pipeThrough(i).getReader(),o=x4();o.readable.pipeTo(n.writable),this._writer=o.writable.getWriter();const u=()=>{l.read().then(({done:f,value:p})=>{f||(this.onPacket(p),u())}).catch(f=>{})};u();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this._writer.write(c).then(()=>this.onOpen())})})}write(n){this.writable=!1;for(let i=0;i<n.length;i++){const l=n[i],o=i===n.length-1;this._writer.write(l).then(()=>{o&&nc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var n;(n=this._transport)===null||n===void 0||n.close()}}const U4={websocket:B4,webtransport:H4,polling:j4},q4=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,I4=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function kh(e){if(e.length>8e3)throw"URI too long";const n=e,i=e.indexOf("["),l=e.indexOf("]");i!=-1&&l!=-1&&(e=e.substring(0,i)+e.substring(i,l).replace(/:/g,";")+e.substring(l,e.length));let o=q4.exec(e||""),u={},c=14;for(;c--;)u[I4[c]]=o[c]||"";return i!=-1&&l!=-1&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=V4(u,u.path),u.queryKey=Y4(u,u.query),u}function V4(e,n){const i=/\/{2,9}/g,l=n.replace(i,"/").split("/");return(n.slice(0,1)=="/"||n.length===0)&&l.splice(0,1),n.slice(-1)=="/"&&l.splice(l.length-1,1),l}function Y4(e,n){const i={};return n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,o,u){o&&(i[o]=u)}),i}const _h=typeof addEventListener=="function"&&typeof removeEventListener=="function",wu=[];_h&&addEventListener("offline",()=>{wu.forEach(e=>e())},!1);class rr extends vt{constructor(n,i){if(super(),this.binaryType=w4,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,n&&typeof n=="object"&&(i=n,n=null),n){const l=kh(n);i.hostname=l.host,i.secure=l.protocol==="https"||l.protocol==="wss",i.port=l.port,l.query&&(i.query=l.query)}else i.host&&(i.hostname=kh(i.host).host);ic(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(l=>{const o=l.prototype.name;this.transports.push(o),this._transportsByName[o]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=T4(this.opts.query)),_h&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},wu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(n){const i=Object.assign({},this.opts.query);i.EIO=Nv,i.transport=n,this.id&&(i.sid=this.id);const l=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[n]);return new this._transportsByName[n](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const n=this.opts.rememberUpgrade&&rr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(n);i.open(),this.setTransport(i)}setTransport(n){this.transport&&this.transport.removeAllListeners(),this.transport=n,n.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",rr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",n),this.emitReserved("heartbeat"),n.type){case"open":this.onHandshake(JSON.parse(n.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=n.data,this._onError(i);break;case"message":this.emitReserved("data",n.data),this.emitReserved("message",n.data);break}}onHandshake(n){this.emitReserved("handshake",n),this.id=n.sid,this.transport.query.sid=n.sid,this._pingInterval=n.pingInterval,this._pingTimeout=n.pingTimeout,this._maxPayload=n.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const n=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+n,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},n),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const n=this._getWritablePackets();this.transport.send(n),this._prevBufferLen=n.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let l=0;l<this.writeBuffer.length;l++){const o=this.writeBuffer[l].data;if(o&&(i+=_4(o)),l>0&&i>this._maxPayload)return this.writeBuffer.slice(0,l);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const n=Date.now()>this._pingTimeoutTime;return n&&(this._pingTimeoutTime=0,nc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),n}write(n,i,l){return this._sendPacket("message",n,i,l),this}send(n,i,l){return this._sendPacket("message",n,i,l),this}_sendPacket(n,i,l,o){if(typeof i=="function"&&(o=i,i=void 0),typeof l=="function"&&(o=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const u={type:n,data:i,options:l};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),o&&this.once("flush",o),this.flush()}close(){const n=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),n()},l=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():n()}):this.upgrading?l():n()),this}_onError(n){if(rr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",n),this._onClose("transport error",n)}_onClose(n,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),_h&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=wu.indexOf(this._offlineEventListener);l!==-1&&wu.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",n,i),this.writeBuffer=[],this._prevBufferLen=0}}}rr.protocol=Nv;class X4 extends rr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let n=0;n<this._upgrades.length;n++)this._probe(this._upgrades[n])}_probe(n){let i=this.createTransport(n),l=!1;rr.priorWebsocketSuccess=!1;const o=()=>{l||(i.send([{type:"ping",data:"probe"}]),i.once("packet",m=>{if(!l)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;rr.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(y(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=i.name,this.emitReserved("upgradeError",x)}}))};function u(){l||(l=!0,y(),i.close(),i=null)}const c=m=>{const x=new Error("probe error: "+m);x.transport=i.name,u(),this.emitReserved("upgradeError",x)};function f(){c("transport closed")}function p(){c("socket closed")}function d(m){i&&m.name!==i.name&&u()}const y=()=>{i.removeListener("open",o),i.removeListener("error",c),i.removeListener("close",f),this.off("close",p),this.off("upgrading",d)};i.once("open",o),i.once("error",c),i.once("close",f),this.once("close",p),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&n!=="webtransport"?this.setTimeoutFn(()=>{l||i.open()},200):i.open()}onHandshake(n){this._upgrades=this._filterUpgrades(n.upgrades),super.onHandshake(n)}_filterUpgrades(n){const i=[];for(let l=0;l<n.length;l++)~this.transports.indexOf(n[l])&&i.push(n[l]);return i}}let $4=class extends X4{constructor(n,i={}){const l=typeof n=="object"?n:i;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(o=>U4[o]).filter(o=>!!o)),super(n,l)}};function F4(e,n="",i){let l=e;i=i||typeof location<"u"&&location,e==null&&(e=i.protocol+"//"+i.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=i.protocol+e:e=i.host+e),/^(https?|wss?):\/\//.test(e)||(typeof i<"u"?e=i.protocol+"//"+e:e="https://"+e),l=kh(e)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const u=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+u+":"+l.port+n,l.href=l.protocol+"://"+u+(i&&i.port===l.port?"":":"+l.port),l}const G4=typeof ArrayBuffer=="function",Z4=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Ov=Object.prototype.toString,Q4=typeof Blob=="function"||typeof Blob<"u"&&Ov.call(Blob)==="[object BlobConstructor]",P4=typeof File=="function"||typeof File<"u"&&Ov.call(File)==="[object FileConstructor]";function cp(e){return G4&&(e instanceof ArrayBuffer||Z4(e))||Q4&&e instanceof Blob||P4&&e instanceof File}function Su(e,n){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let i=0,l=e.length;i<l;i++)if(Su(e[i]))return!0;return!1}if(cp(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Su(e.toJSON(),!0);for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&Su(e[i]))return!0;return!1}function K4(e){const n=[],i=e.data,l=e;return l.data=Ch(i,n),l.attachments=n.length,{packet:l,buffers:n}}function Ch(e,n){if(!e)return e;if(cp(e)){const i={_placeholder:!0,num:n.length};return n.push(e),i}else if(Array.isArray(e)){const i=new Array(e.length);for(let l=0;l<e.length;l++)i[l]=Ch(e[l],n);return i}else if(typeof e=="object"&&!(e instanceof Date)){const i={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(i[l]=Ch(e[l],n));return i}return e}function J4(e,n){return e.data=Nh(e.data,n),delete e.attachments,e}function Nh(e,n){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<n.length)return n[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i]=Nh(e[i],n);else if(typeof e=="object")for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(e[i]=Nh(e[i],n));return e}const W4=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var He;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(He||(He={}));class eM{constructor(n){this.replacer=n}encode(n){return(n.type===He.EVENT||n.type===He.ACK)&&Su(n)?this.encodeAsBinary({type:n.type===He.EVENT?He.BINARY_EVENT:He.BINARY_ACK,nsp:n.nsp,data:n.data,id:n.id}):[this.encodeAsString(n)]}encodeAsString(n){let i=""+n.type;return(n.type===He.BINARY_EVENT||n.type===He.BINARY_ACK)&&(i+=n.attachments+"-"),n.nsp&&n.nsp!=="/"&&(i+=n.nsp+","),n.id!=null&&(i+=n.id),n.data!=null&&(i+=JSON.stringify(n.data,this.replacer)),i}encodeAsBinary(n){const i=K4(n),l=this.encodeAsString(i.packet),o=i.buffers;return o.unshift(l),o}}class fp extends vt{constructor(n){super(),this.reviver=n}add(n){let i;if(typeof n=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(n);const l=i.type===He.BINARY_EVENT;l||i.type===He.BINARY_ACK?(i.type=l?He.EVENT:He.ACK,this.reconstructor=new tM(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(cp(n)||n.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(n),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+n)}decodeString(n){let i=0;const l={type:Number(n.charAt(0))};if(He[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===He.BINARY_EVENT||l.type===He.BINARY_ACK){const u=i+1;for(;n.charAt(++i)!=="-"&&i!=n.length;);const c=n.substring(u,i);if(c!=Number(c)||n.charAt(i)!=="-")throw new Error("Illegal attachments");l.attachments=Number(c)}if(n.charAt(i+1)==="/"){const u=i+1;for(;++i&&!(n.charAt(i)===","||i===n.length););l.nsp=n.substring(u,i)}else l.nsp="/";const o=n.charAt(i+1);if(o!==""&&Number(o)==o){const u=i+1;for(;++i;){const c=n.charAt(i);if(c==null||Number(c)!=c){--i;break}if(i===n.length)break}l.id=Number(n.substring(u,i+1))}if(n.charAt(++i)){const u=this.tryParse(n.substr(i));if(fp.isPayloadValid(l.type,u))l.data=u;else throw new Error("invalid payload")}return l}tryParse(n){try{return JSON.parse(n,this.reviver)}catch{return!1}}static isPayloadValid(n,i){switch(n){case He.CONNECT:return Hx(i);case He.DISCONNECT:return i===void 0;case He.CONNECT_ERROR:return typeof i=="string"||Hx(i);case He.EVENT:case He.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&W4.indexOf(i[0])===-1);case He.ACK:case He.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class tM{constructor(n){this.packet=n,this.buffers=[],this.reconPack=n}takeBinaryData(n){if(this.buffers.push(n),this.buffers.length===this.reconPack.attachments){const i=J4(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Hx(e){return Object.prototype.toString.call(e)==="[object Object]"}const nM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fp,Encoder:eM,get PacketType(){return He}},Symbol.toStringTag,{value:"Module"}));function Mn(e,n,i){return e.on(n,i),function(){e.off(n,i)}}const iM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Rv extends vt{constructor(n,i,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=n,this.nsp=i,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const n=this.io;this.subs=[Mn(n,"open",this.onopen.bind(this)),Mn(n,"packet",this.onpacket.bind(this)),Mn(n,"error",this.onerror.bind(this)),Mn(n,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...n){return n.unshift("message"),this.emit.apply(this,n),this}emit(n,...i){var l,o,u;if(iM.hasOwnProperty(n))throw new Error('"'+n.toString()+'" is a reserved event name');if(i.unshift(n),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const c={type:He.EVENT,data:i};if(c.options={},c.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const y=this.ids++,m=i.pop();this._registerAckCallback(y,m),c.id=y}const f=(o=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||o===void 0?void 0:o.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!f||(p?(this.notifyOutgoingListeners(c),this.packet(c)):this.sendBuffer.push(c)),this.flags={},this}_registerAckCallback(n,i){var l;const o=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(o===void 0){this.acks[n]=i;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[n];for(let f=0;f<this.sendBuffer.length;f++)this.sendBuffer[f].id===n&&this.sendBuffer.splice(f,1);i.call(this,new Error("operation has timed out"))},o),c=(...f)=>{this.io.clearTimeoutFn(u),i.apply(this,f)};c.withError=!0,this.acks[n]=c}emitWithAck(n,...i){return new Promise((l,o)=>{const u=(c,f)=>c?o(c):l(f);u.withError=!0,i.push(u),this.emit(n,...i)})}_addToQueue(n){let i;typeof n[n.length-1]=="function"&&(i=n.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:n,flags:Object.assign({fromQueue:!0},this.flags)};n.push((o,...u)=>(this._queue[0],o!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(o)):(this._queue.shift(),i&&i(null,...u)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(n=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!n||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(n){n.nsp=this.nsp,this.io._packet(n)}onopen(){typeof this.auth=="function"?this.auth(n=>{this._sendConnectPacket(n)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(n){this.packet({type:He.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},n):n})}onerror(n){this.connected||this.emitReserved("connect_error",n)}onclose(n,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",n,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(n=>{if(!this.sendBuffer.some(l=>String(l.id)===n)){const l=this.acks[n];delete this.acks[n],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(n){if(n.nsp===this.nsp)switch(n.type){case He.CONNECT:n.data&&n.data.sid?this.onconnect(n.data.sid,n.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case He.EVENT:case He.BINARY_EVENT:this.onevent(n);break;case He.ACK:case He.BINARY_ACK:this.onack(n);break;case He.DISCONNECT:this.ondisconnect();break;case He.CONNECT_ERROR:this.destroy();const l=new Error(n.data.message);l.data=n.data.data,this.emitReserved("connect_error",l);break}}onevent(n){const i=n.data||[];n.id!=null&&i.push(this.ack(n.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(n){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const l of i)l.apply(this,n)}super.emit.apply(this,n),this._pid&&n.length&&typeof n[n.length-1]=="string"&&(this._lastOffset=n[n.length-1])}ack(n){const i=this;let l=!1;return function(...o){l||(l=!0,i.packet({type:He.ACK,id:n,data:o}))}}onack(n){const i=this.acks[n.id];typeof i=="function"&&(delete this.acks[n.id],i.withError&&n.data.unshift(null),i.apply(this,n.data))}onconnect(n,i){this.id=n,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(n=>this.emitEvent(n)),this.receiveBuffer=[],this.sendBuffer.forEach(n=>{this.notifyOutgoingListeners(n),this.packet(n)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(n=>n()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:He.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(n){return this.flags.compress=n,this}get volatile(){return this.flags.volatile=!0,this}timeout(n){return this.flags.timeout=n,this}onAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(n),this}prependAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(n),this}offAny(n){if(!this._anyListeners)return this;if(n){const i=this._anyListeners;for(let l=0;l<i.length;l++)if(n===i[l])return i.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(n),this}prependAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(n),this}offAnyOutgoing(n){if(!this._anyOutgoingListeners)return this;if(n){const i=this._anyOutgoingListeners;for(let l=0;l<i.length;l++)if(n===i[l])return i.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(n){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const l of i)l.apply(this,n.data)}}}function Yl(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Yl.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),i=Math.floor(n*this.jitter*e);e=(Math.floor(n*10)&1)==0?e-i:e+i}return Math.min(e,this.max)|0};Yl.prototype.reset=function(){this.attempts=0};Yl.prototype.setMin=function(e){this.ms=e};Yl.prototype.setMax=function(e){this.max=e};Yl.prototype.setJitter=function(e){this.jitter=e};class Th extends vt{constructor(n,i){var l;super(),this.nsps={},this.subs=[],n&&typeof n=="object"&&(i=n,n=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,ic(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((l=i.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Yl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=n;const o=i.parser||nM;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(n){return arguments.length?(this._reconnection=!!n,n||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(n){return n===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=n,this)}reconnectionDelay(n){var i;return n===void 0?this._reconnectionDelay:(this._reconnectionDelay=n,(i=this.backoff)===null||i===void 0||i.setMin(n),this)}randomizationFactor(n){var i;return n===void 0?this._randomizationFactor:(this._randomizationFactor=n,(i=this.backoff)===null||i===void 0||i.setJitter(n),this)}reconnectionDelayMax(n){var i;return n===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=n,(i=this.backoff)===null||i===void 0||i.setMax(n),this)}timeout(n){return arguments.length?(this._timeout=n,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(n){if(~this._readyState.indexOf("open"))return this;this.engine=new $4(this.uri,this.opts);const i=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const o=Mn(i,"open",function(){l.onopen(),n&&n()}),u=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),n?n(f):this.maybeReconnectOnOpen()},c=Mn(i,"error",u);if(this._timeout!==!1){const f=this._timeout,p=this.setTimeoutFn(()=>{o(),u(new Error("timeout")),i.close()},f);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(o),this.subs.push(c),this}connect(n){return this.open(n)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const n=this.engine;this.subs.push(Mn(n,"ping",this.onping.bind(this)),Mn(n,"data",this.ondata.bind(this)),Mn(n,"error",this.onerror.bind(this)),Mn(n,"close",this.onclose.bind(this)),Mn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(n){try{this.decoder.add(n)}catch(i){this.onclose("parse error",i)}}ondecoded(n){nc(()=>{this.emitReserved("packet",n)},this.setTimeoutFn)}onerror(n){this.emitReserved("error",n)}socket(n,i){let l=this.nsps[n];return l?this._autoConnect&&!l.active&&l.connect():(l=new Rv(this,n,i),this.nsps[n]=l),l}_destroy(n){const i=Object.keys(this.nsps);for(const l of i)if(this.nsps[l].active)return;this._close()}_packet(n){const i=this.encoder.encode(n);for(let l=0;l<i.length;l++)this.engine.write(i[l],n.options)}cleanup(){this.subs.forEach(n=>n()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(n,i){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",n,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const n=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{n.skipReconnect||(this.emitReserved("reconnect_attempt",n.backoff.attempts),!n.skipReconnect&&n.open(o=>{o?(n._reconnecting=!1,n.reconnect(),this.emitReserved("reconnect_error",o)):n.onreconnect()}))},i);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const n=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",n)}}const Xa={};function Eu(e,n){typeof e=="object"&&(n=e,e=void 0),n=n||{};const i=F4(e,n.path||"/socket.io"),l=i.source,o=i.id,u=i.path,c=Xa[o]&&u in Xa[o].nsps,f=n.forceNew||n["force new connection"]||n.multiplex===!1||c;let p;return f?p=new Th(l,n):(Xa[o]||(Xa[o]=new Th(l,n)),p=Xa[o]),i.query&&!n.query&&(n.query=i.queryKey),p.socket(i.path,n)}Object.assign(Eu,{Manager:Th,Socket:Rv,io:Eu,connect:Eu});const rM="http://localhost:3001";class lM{socket=null;handlers={};connect(n){this.socket?.connected||(this.handlers=n,this.socket=Eu(rM),this.socket.on("connect",()=>{console.log("Connected to server")}),this.socket.on("disconnect",()=>{console.log("Disconnected from server")}),this.socket.on("node:update",i=>{this.handlers.onNodeUpdate?.(i)}),this.socket.on("console:log",i=>{this.handlers.onConsoleLog?.(i)}),this.socket.on("workflow:started",i=>{this.handlers.onWorkflowStarted?.(i)}),this.socket.on("workflow:completed",i=>{this.handlers.onWorkflowCompleted?.(i)}),this.socket.on("workflow:error",i=>{this.handlers.onWorkflowError?.(i)}),this.socket.on("workflow:cancelled",()=>{this.handlers.onWorkflowCancelled?.()}))}disconnect(){this.socket&&(this.socket.disconnect(),this.socket=null)}executeWorkflow(n){if(!this.socket?.connected){console.error("Socket not connected");return}this.socket.emit("execute:workflow",n)}cancelExecution(){this.socket?.connected&&this.socket.emit("execute:cancel")}isConnected(){return this.socket?.connected??!1}}const $a=new lM,dp=ap((e,n)=>({isRunning:!1,currentNodeId:null,completedNodes:new Set,failedNodes:new Set,results:new Map,startTime:null,endTime:null,logs:[],startExecution:()=>{e({isRunning:!0,currentNodeId:null,completedNodes:new Set,failedNodes:new Set,results:new Map,startTime:Date.now(),endTime:null}),n().addLog("info","Workflow execution started")},stopExecution:()=>{e({isRunning:!1,currentNodeId:null,endTime:Date.now()}),n().addLog("info","Workflow execution stopped")},setCurrentNode:i=>{e({currentNodeId:i}),i&&n().addLog("info","Processing node",i)},markNodeCompleted:(i,l)=>{e(o=>{const u=new Set(o.completedNodes);u.add(i);const c=new Map(o.results);return l!==void 0&&c.set(i,l),{completedNodes:u,results:c}}),n().addLog("success","Node completed",i)},markNodeFailed:(i,l)=>{e(o=>{const u=new Set(o.failedNodes);return u.add(i),{failedNodes:u}}),n().addLog("error",l||"Node failed",i)},resetExecution:()=>{e({isRunning:!1,currentNodeId:null,completedNodes:new Set,failedNodes:new Set,results:new Map,startTime:null,endTime:null})},addLog:(i,l,o,u)=>{const c={id:go(),timestamp:Date.now(),level:i,message:l,nodeId:o,details:u};e(f=>({logs:[...f.logs,c]}))},clearLogs:()=>e({logs:[]})}));function aM(){const{nodes:e,edges:n,workflowId:i,workflowName:l,updateNodeStatus:o}=lr(),{isRunning:u,startExecution:c,stopExecution:f,setCurrentNode:p,markNodeCompleted:d,markNodeFailed:y,addLog:m}=dp();W.useEffect(()=>{const w={onNodeUpdate:_=>{o(_.nodeId,_.status,_.progress),_.status==="running"?p(_.nodeId):_.status==="completed"?d(_.nodeId,_.result):_.status==="error"&&y(_.nodeId,_.error)},onConsoleLog:_=>{m({info:"info",warn:"warning",error:"error",debug:"debug"}[_.type]||"info",_.message,_.nodeId)},onWorkflowStarted:()=>{c()},onWorkflowCompleted:()=>{f(),m("success","Workflow completed successfully")},onWorkflowError:_=>{f(),m("error",`Workflow failed: ${_.error}`)},onWorkflowCancelled:()=>{f(),m("warning","Workflow execution cancelled")}};return $a.connect(w),()=>{$a.disconnect()}},[o,p,d,y,c,f,m]);const x=W.useCallback(()=>{if(e.length===0){m("warning","No nodes to execute");return}const w=oM(e,n);$a.executeWorkflow({workflowId:i,workflowName:l,nodes:w,edges:n})},[e,n,i,l,m]),b=W.useCallback(()=>{$a.cancelExecution()},[]);return{isRunning:u,execute:x,cancel:b,isConnected:$a.isConnected()}}function oM(e,n){const i=new Map(e.map(f=>[f.id,f])),l=new Map,o=new Map;e.forEach(f=>{l.set(f.id,0),o.set(f.id,[])}),n.forEach(f=>{o.get(f.source)?.push(f.target),l.set(f.target,(l.get(f.target)||0)+1)});const u=[];l.forEach((f,p)=>{f===0&&u.push(p)});const c=[];for(;u.length>0;){const f=u.shift(),p=i.get(f);p&&c.push(p),o.get(f)?.forEach(d=>{const y=(l.get(d)||0)-1;l.set(d,y),y===0&&u.push(d)})}return c}function sM(e,n,i,l="local"){const o=l==="global"?"~/.claude":".claude",u=uM(n,o),c=cM(n,o),f=fM(e,n,i,o),p=dM(n);return{skills:u,commands:f,agents:c,mcpSettings:p}}function uM(e,n){return e.filter(l=>l.type==="skill").filter(l=>l.data.skillType==="custom").map(l=>{const o=l.data,u=Xl(o.skillId||o.label),c=`${n}/skills/${u}/SKILL.md`,f=hM(o);return{name:u,path:c,content:f}})}function cM(e,n){return e.filter(l=>l.type==="subagent").map(l=>{const o=l.data,u=Xl(o.label),c=`${n}/agents/${u}.md`,f=pM(o);return{name:u,path:c,content:f}})}function fM(e,n,i,l){if(n.length===0)return[];const o=Xl(e),u=`${l}/commands/${o}.md`,c=mM(e,n,i);return[{name:o,path:u,content:c}]}function dM(e){const n=e.filter(l=>l.type==="mcp");if(n.length===0)return null;const i={};return n.forEach(l=>{const o=l.data;i[o.serverName]={type:o.serverType,command:o.serverConfig.command,args:o.serverConfig.args,url:o.serverConfig.url,env:o.serverConfig.env}}),{mcpServers:i}}function hM(e){const n=Xl(e.skillId||e.label),i=e.description||e.label,l=["---",`name: ${n}`,`description: ${i}`,"---","",`# ${e.label}`,""];return e.mdContent?l.push(e.mdContent):l.push(`Execute the ${e.label} skill.`),l.join(`
16
+ `)}function pM(e){const n=Xl(e.label),i=e.description||e.label,l=e.tools.length>0?e.tools.join(", "):"Read, Write, Edit",o=e.model||"sonnet",u=["---",`name: ${n}`,`description: ${i}`,`tools: ${l}`,`model: ${o}`,"---",""];return e.systemPrompt?u.push(e.systemPrompt):e.mdContent?u.push(e.mdContent):(u.push(`# ${e.label}`),u.push(""),u.push(`This agent performs the ${e.role} role.`)),u.join(`
17
+ `)}function mM(e,n,i){const l=n.filter(y=>y.type==="input"),o=n.filter(y=>y.type==="output"),u=l.map(y=>`<${Xl(y.data.label)}>`).join(" "),f=["---",`description: ${`Workflow: ${e}`}`];u&&f.push(`argument-hint: ${u}`),f.push("---"),f.push(""),f.push(`# ${e}`),f.push(""),l.length>0&&(f.push("## Inputs"),f.push(""),l.forEach(y=>{const m=y.data;f.push(`- **${m.label}**: ${m.description||m.placeholder||"User input"}`)}),f.push("")),f.push("## Workflow Steps"),f.push("");const p=gM(n,i);let d=1;return p.forEach(y=>{if(y.type!=="input"){if(f.push(`${d}. **${y.data.label}**`),y.data.description&&f.push(` ${y.data.description}`),y.type==="subagent"){const m=y.data;m.systemPrompt&&f.push(` - Prompt: ${m.systemPrompt.substring(0,100)}${m.systemPrompt.length>100?"...":""}`),m.tools.length>0&&f.push(` - Tools: ${m.tools.join(", ")}`)}if(y.type==="skill"){const m=y.data;m.skillId&&f.push(` - Invoke skill: ${m.skillId}`)}if(y.type==="mcp"){const m=y.data;f.push(` - MCP Server: ${m.serverName}`)}f.push(""),d++}}),o.length>0&&(f.push("## Outputs"),f.push(""),o.forEach(y=>{const m=y.data;f.push(`- **${m.label}**: ${m.outputType} format`)})),f.join(`
18
+ `)}function Xl(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function gM(e,n){const i=new Map(e.map(f=>[f.id,f])),l=new Map,o=new Map;e.forEach(f=>{l.set(f.id,0),o.set(f.id,[])}),n.forEach(f=>{o.get(f.source)?.push(f.target),l.set(f.target,(l.get(f.target)||0)+1)});const u=[];l.forEach((f,p)=>{f===0&&u.push(p)});const c=[];for(;u.length>0;){const f=u.shift(),p=i.get(f);p&&c.push(p),o.get(f)?.forEach(d=>{const y=(l.get(d)||0)-1;l.set(d,y),y===0&&u.push(d)})}return c}function jv(e){var n,i,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(i=jv(e[n]))&&(l&&(l+=" "),l+=i)}else for(i in e)e[i]&&(l&&(l+=" "),l+=i);return l}function un(){for(var e,n,i=0,l="",o=arguments.length;i<o;i++)(e=arguments[i])&&(n=jv(e))&&(l&&(l+=" "),l+=n);return l}const Lv="http://localhost:3001/api";async function yM(e,n){const i=await fetch(`${Lv}/save/workflow`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e,options:n})});if(!i.ok){const l=await i.json().catch(()=>({}));throw new Error(l.message||"Failed to save workflow")}return i.json()}async function xM(){const e=await fetch(`${Lv}/project-path`);if(!e.ok)throw new Error("Failed to get project path");return(await e.json()).path}async function bM(e,n){const i=[];return n.includeSkills&&e.skills.forEach(l=>{i.push({path:l.path,content:l.content,type:"skill"})}),n.includeCommands&&e.commands.forEach(l=>{i.push({path:l.path,content:l.content,type:"command"})}),n.includeAgents&&e.agents.forEach(l=>{i.push({path:l.path,content:l.content,type:"agent"})}),n.includeMcpSettings&&e.mcpSettings&&i.push({path:n.location==="global"?"~/.claude/settings.local.json":".claude/settings.local.json",content:JSON.stringify(e.mcpSettings,null,2),type:"mcp"}),{files:i}}function vM({isOpen:e,onClose:n,config:i}){const[l,o]=W.useState("local"),[u,c]=W.useState(!0),[f,p]=W.useState(!0),[d,y]=W.useState(!0),[m,x]=W.useState(!0),[b,w]=W.useState(""),[_,C]=W.useState([]),[k,j]=W.useState(null),[E,D]=W.useState(!1),[U,z]=W.useState(null),[L,G]=W.useState(null);W.useEffect(()=>{e&&xM().then(w).catch(()=>w("."))},[e]),W.useEffect(()=>{if(!e)return;bM(i,{location:l,includeSkills:u,includeCommands:f,includeAgents:d,includeMcpSettings:m}).then(({files:te})=>{C(te),te.length>0&&!k&&j(te[0])})},[e,i,l,u,f,d,m]);const Q=async()=>{D(!0),G(null),z(null);const X={location:l,includeSkills:u,includeCommands:f,includeAgents:d,includeMcpSettings:m};try{const te=await yM(i,X);z(te),te.success&&setTimeout(()=>n(),2e3)}catch(te){G(te instanceof Error?te.message:"Failed to save")}finally{D(!1)}},I=X=>{switch(X){case"skill":return S.jsx(mo,{className:"w-4 h-4 text-node-skill"});case"agent":return S.jsx(d3,{className:"w-4 h-4 text-node-generate"});case"command":return S.jsx(K3,{className:"w-4 h-4 text-accent"});case"mcp":return S.jsx(vv,{className:"w-4 h-4 text-node-mcp"});default:return S.jsx(mo,{className:"w-4 h-4 text-gray-400"})}},Y=i.skills.length>0||i.commands.length>0||i.agents.length>0||i.mcpSettings;return e?S.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:S.jsxs("div",{className:"bg-surface border border-border rounded-xl shadow-2xl w-[900px] max-h-[80vh] flex flex-col",children:[S.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx(Lu,{className:"w-5 h-5 text-accent"}),S.jsx("h2",{className:"text-lg font-semibold text-white",children:"Export to Claude Code"})]}),S.jsx("button",{onClick:n,className:"p-2 hover:bg-surface-hover rounded-lg transition-colors",children:S.jsx(n4,{className:"w-5 h-5 text-gray-400"})})]}),S.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[S.jsxs("div",{className:"w-64 border-r border-border p-4 space-y-6 overflow-y-auto",children:[S.jsxs("div",{children:[S.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Save Location"}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("button",{onClick:()=>o("local"),className:un("w-full flex items-center gap-3 px-3 py-2 rounded-lg border transition-colors text-left",l==="local"?"border-accent bg-accent/10 text-white":"border-border hover:border-gray-500 text-gray-400"),children:[S.jsx(zx,{className:"w-4 h-4"}),S.jsxs("div",{children:[S.jsx("div",{className:"text-sm font-medium",children:"Local"}),S.jsx("div",{className:"text-xs text-gray-500",children:".claude/"})]})]}),S.jsxs("button",{onClick:()=>o("global"),className:un("w-full flex items-center gap-3 px-3 py-2 rounded-lg border transition-colors text-left",l==="global"?"border-accent bg-accent/10 text-white":"border-border hover:border-gray-500 text-gray-400"),children:[S.jsx(zx,{className:"w-4 h-4"}),S.jsxs("div",{children:[S.jsx("div",{className:"text-sm font-medium",children:"Global"}),S.jsx("div",{className:"text-xs text-gray-500",children:"~/.claude/"})]})]})]})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Include Files"}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[S.jsx("input",{type:"checkbox",checked:u,onChange:X=>c(X.target.checked),disabled:i.skills.length===0,className:"w-4 h-4 rounded border-border bg-surface text-accent focus:ring-accent"}),S.jsxs("span",{className:un("text-sm",i.skills.length===0?"text-gray-600":"text-gray-300"),children:["Skills (",i.skills.length,")"]})]}),S.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[S.jsx("input",{type:"checkbox",checked:f,onChange:X=>p(X.target.checked),disabled:i.commands.length===0,className:"w-4 h-4 rounded border-border bg-surface text-accent focus:ring-accent"}),S.jsxs("span",{className:un("text-sm",i.commands.length===0?"text-gray-600":"text-gray-300"),children:["Commands (",i.commands.length,")"]})]}),S.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[S.jsx("input",{type:"checkbox",checked:d,onChange:X=>y(X.target.checked),disabled:i.agents.length===0,className:"w-4 h-4 rounded border-border bg-surface text-accent focus:ring-accent"}),S.jsxs("span",{className:un("text-sm",i.agents.length===0?"text-gray-600":"text-gray-300"),children:["Agents (",i.agents.length,")"]})]}),S.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[S.jsx("input",{type:"checkbox",checked:m,onChange:X=>x(X.target.checked),disabled:!i.mcpSettings,className:"w-4 h-4 rounded border-border bg-surface text-accent focus:ring-accent"}),S.jsx("span",{className:un("text-sm",i.mcpSettings?"text-gray-300":"text-gray-600"),children:"MCP Settings"})]})]})]}),S.jsxs("div",{className:"pt-4 border-t border-border",children:[S.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Project Path"}),S.jsx("div",{className:"text-xs text-gray-400 font-mono truncate",title:b,children:b||"Loading..."})]})]}),S.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[S.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border overflow-x-auto",children:[_.map((X,te)=>S.jsxs("button",{onClick:()=>j(X),className:un("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm whitespace-nowrap transition-colors",k===X?"bg-surface-hover text-white":"text-gray-400 hover:text-white hover:bg-surface-hover/50"),children:[I(X.type),S.jsx("span",{children:X.path.split("/").pop()})]},te)),_.length===0&&S.jsx("span",{className:"text-sm text-gray-500",children:"No files to export"})]}),S.jsx("div",{className:"flex-1 overflow-auto p-4",children:k?S.jsxs("div",{className:"space-y-2",children:[S.jsx("div",{className:"text-xs text-gray-500 font-mono",children:k.path}),S.jsx("pre",{className:"text-sm text-gray-300 font-mono bg-canvas p-4 rounded-lg overflow-auto max-h-[400px]",children:k.content})]}):S.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"Select a file to preview"})})]})]}),S.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-border",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[U&&U.success&&S.jsxs("div",{className:"flex items-center gap-2 text-status-completed text-sm",children:[S.jsx(m3,{className:"w-4 h-4"}),S.jsx("span",{children:"Saved successfully!"})]}),U&&!U.success&&S.jsxs("div",{className:"flex items-center gap-2 text-status-error text-sm",children:[S.jsx(wh,{className:"w-4 h-4"}),S.jsx("span",{children:"Some files failed to save"})]}),L&&S.jsxs("div",{className:"flex items-center gap-2 text-status-error text-sm",children:[S.jsx(wh,{className:"w-4 h-4"}),S.jsx("span",{children:L})]})]}),S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("button",{onClick:n,className:"px-4 py-2 text-sm font-medium text-gray-400 hover:text-white transition-colors",children:"Cancel"}),S.jsxs("button",{onClick:Q,disabled:E||_.length===0||!Y,className:un("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",E||_.length===0||!Y?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-accent hover:bg-accent-hover text-white"),children:[S.jsx(Lu,{className:"w-4 h-4"}),E?"Saving...":"Export"]})]})]})]})}):null}function wM(){const{workflowName:e,setWorkflowName:n,isDraft:i,nodes:l,edges:o}=lr(),{isRunning:u,execute:c,cancel:f}=aM(),[p,d]=W.useState(!1),[y,m]=W.useState(null),x=()=>{const _=sM(e,l,o,"local");m(_),d(!0)},b=()=>{d(!1),m(null)},w=()=>{u?f():c()};return S.jsxs("header",{className:"flex items-center justify-between px-4 py-3 bg-surface border-b border-border",children:[S.jsxs("div",{className:"flex items-center gap-4",children:[S.jsx("button",{className:"p-2 hover:bg-surface-hover rounded-lg transition-colors",children:S.jsx(c3,{className:"w-5 h-5 text-gray-400"})}),S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("input",{type:"text",value:e,onChange:_=>n(_.target.value),className:"bg-transparent border-none text-lg font-semibold text-white focus:outline-none focus:ring-2 focus:ring-accent rounded px-2 py-1"}),i&&S.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-yellow-500/20 text-yellow-400 rounded",children:"Draft"})]})]}),S.jsx("div",{className:"text-sm font-medium text-gray-400",children:"Visual Workflow Builder"}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-sm text-gray-500",children:"Saved"}),S.jsxs("button",{onClick:w,className:`
19
+ flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors
20
+ ${u?"bg-red-500 hover:bg-red-600 text-white":"bg-accent hover:bg-accent-hover text-white"}
21
+ `,children:[u?S.jsx(Q3,{className:"w-4 h-4"}):S.jsx(bv,{className:"w-4 h-4"}),u?"Stop":"Run"]}),S.jsxs("button",{onClick:x,className:"flex items-center gap-2 px-3 py-2 bg-surface-hover hover:bg-border rounded-lg transition-colors",children:[S.jsx(Lu,{className:"w-4 h-4 text-gray-400"}),S.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Export"})]}),S.jsx("button",{className:"p-2 hover:bg-surface-hover rounded-lg transition-colors",children:S.jsx(I3,{className:"w-5 h-5 text-gray-400"})}),S.jsx("button",{className:"p-2 hover:bg-surface-hover rounded-lg transition-colors",children:S.jsx(vv,{className:"w-5 h-5 text-gray-400"})})]}),y&&S.jsx(vM,{isOpen:p,onClose:b,config:y})]})}const SM=[{type:"input",label:"User Input",icon:S.jsx(rp,{className:"w-4 h-4"}),color:"text-yellow-400",hoverColor:"hover:bg-yellow-500/10"},{type:"subagent",label:"Sub Agent",icon:S.jsx(Co,{className:"w-4 h-4"}),color:"text-purple-400",hoverColor:"hover:bg-purple-500/10"},{type:"skill",label:"Skill",icon:S.jsx(tc,{className:"w-4 h-4"}),color:"text-cyan-400",hoverColor:"hover:bg-cyan-500/10"},{type:"mcp",label:"MCP",icon:S.jsx(lp,{className:"w-4 h-4"}),color:"text-pink-400",hoverColor:"hover:bg-pink-500/10"},{type:"output",label:"Output",icon:S.jsx(ec,{className:"w-4 h-4"}),color:"text-emerald-400",hoverColor:"hover:bg-emerald-500/10"}];function EM(e){const n=go(),i={x:100+Math.random()*200,y:100+Math.random()*200};switch(e){case"input":return{id:n,type:"input",position:i,data:{label:"User Input",description:"Enter your input here...",inputType:"text",status:"idle",placeholder:"Enter your prompt..."}};case"subagent":return{id:n,type:"subagent",position:i,data:{label:"Sub Agent",description:"Conduct in-depth research...",role:"researcher",tools:["WebSearch","WebFetch","Read"],status:"idle",usedInputs:[]}};case"skill":return{id:n,type:"skill",position:i,data:{label:"Skill",description:"Apply a specialized skill...",skillType:"official",status:"idle",usedInputs:[]}};case"mcp":return{id:n,type:"mcp",position:i,data:{label:"MCP Server",description:"Connect to external service...",serverType:"stdio",serverName:"",serverConfig:{},status:"idle",usedInputs:[]}};case"output":return{id:n,type:"output",position:i,data:{label:"Output",description:"Select to edit in editor",outputType:"auto",status:"idle",usedInputs:[]}}}}function kM(){const e=lr(i=>i.addNode),n=i=>{const l=EM(i);e(l)};return S.jsx("div",{className:"flex items-center justify-center gap-2 py-3 bg-canvas border-b border-border",children:SM.map(i=>S.jsxs("button",{onClick:()=>n(i.type),className:`
22
+ flex items-center gap-2 px-4 py-2 rounded-lg
23
+ bg-surface border border-border
24
+ ${i.hoverColor}
25
+ transition-all duration-200
26
+ hover:border-gray-500
27
+ `,children:[S.jsx("span",{className:i.color,children:i.icon}),S.jsx("span",{className:"text-sm font-medium text-gray-300",children:i.label})]},i.type))})}function _M({status:e}){switch(e){case"running":return S.jsx(xv,{className:"w-4 h-4 animate-spin text-blue-400"});case"completed":return S.jsx(v3,{className:"w-4 h-4 text-green-400"});case"error":return S.jsx(wh,{className:"w-4 h-4 text-red-400"});default:return S.jsx(bv,{className:"w-4 h-4"})}}function CM({data:e,selected:n,children:i,headerIcon:l,headerColor:o="bg-gray-700",showSourceHandle:u=!0,showTargetHandle:c=!0}){const f=()=>{switch(e.status){case"running":return"border-indigo-500 animate-pulse-border";case"completed":return"border-green-500";case"error":return"border-red-500";default:return""}};return S.jsxs("div",{className:un("workflow-node",n&&"ring-2 ring-accent ring-offset-2 ring-offset-canvas",f()),children:[S.jsxs("div",{className:un("node-header flex items-center justify-between",o),children:[S.jsxs("div",{className:"flex items-center gap-2",children:[l,S.jsx("span",{className:"font-semibold text-sm text-white",children:e.label})]}),S.jsx("div",{className:"flex items-center gap-1",children:S.jsx(_M,{status:e.status})})]}),S.jsxs("div",{className:"node-content",children:[e.description&&S.jsx("p",{className:"text-sm text-gray-400 mb-3",children:e.description}),i,e.usedInputs&&e.usedInputs.length>0&&S.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-700/50",children:[S.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Used in this step"}),S.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.usedInputs.map(p=>S.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs bg-gray-700/50 border border-gray-600 text-gray-300",children:[S.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400"}),p]},p))})]})]}),c&&S.jsx(Il,{type:"target",position:ye.Left,className:"!bg-gray-500 !border-2 !border-white"}),u&&S.jsx(Il,{type:"source",position:ye.Right,className:"!bg-gray-500 !border-2 !border-white"})]})}const No=W.memo(CM);function NM({data:e,selected:n}){return S.jsx(No,{data:e,selected:n,headerIcon:S.jsx(rp,{className:"w-4 h-4 text-amber-200"}),headerColor:"bg-amber-600",showTargetHandle:!1,showSourceHandle:!0,children:S.jsxs("div",{className:"text-gray-300",children:[e.inputType==="text"&&S.jsx("div",{className:"text-sm text-gray-400",children:e.value||e.placeholder||"Enter your input..."}),e.inputType==="file"&&S.jsx("div",{className:"text-sm text-gray-400",children:"Drop files here or click to upload"}),e.inputType==="select"&&e.options&&S.jsx("select",{className:"w-full px-2 py-1 text-sm bg-gray-700 border border-gray-600 rounded text-gray-300",children:e.options.map(i=>S.jsx("option",{value:i,children:i},i))})]})})}const TM=W.memo(NM);function AM({data:e,selected:n}){return S.jsx(No,{data:e,selected:n,headerIcon:S.jsx(Co,{className:"w-4 h-4 text-indigo-200"}),headerColor:"bg-indigo-600",showTargetHandle:!0,showSourceHandle:!0,children:S.jsxs("div",{className:"space-y-2",children:[e.tools&&e.tools.length>0&&S.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.tools.slice(0,3).map(i=>S.jsx("span",{className:"px-2 py-0.5 text-xs bg-purple-900/50 text-purple-300 rounded",children:i},i)),e.tools.length>3&&S.jsxs("span",{className:"px-2 py-0.5 text-xs bg-purple-900/50 text-purple-300 rounded",children:["+",e.tools.length-3]})]}),e.model&&S.jsxs("div",{className:"text-xs text-gray-500",children:["Model: ",e.model]})]})})}const MM=W.memo(AM);function zM({data:e,selected:n}){return S.jsx(No,{data:e,selected:n,headerIcon:S.jsx(tc,{className:"w-4 h-4 text-cyan-200"}),headerColor:"bg-cyan-600",showTargetHandle:!0,showSourceHandle:!0,children:S.jsxs("div",{className:"space-y-2",children:[e.skillType==="official"&&e.skillId&&S.jsx("span",{className:"inline-block px-2 py-0.5 text-xs bg-cyan-900/50 text-cyan-300 rounded",children:e.skillId}),e.skillCategory&&S.jsxs("div",{className:"text-xs text-gray-500",children:["Category: ",e.skillCategory]})]})})}const DM=W.memo(zM);function OM({data:e,selected:n}){return S.jsx(No,{data:e,selected:n,headerIcon:S.jsx(lp,{className:"w-4 h-4 text-pink-200"}),headerColor:"bg-pink-600",showTargetHandle:!0,showSourceHandle:!0,children:S.jsxs("div",{className:"space-y-2",children:[e.serverName&&S.jsx("span",{className:"inline-block px-2 py-0.5 text-xs bg-pink-900/50 text-pink-300 rounded",children:e.serverName}),S.jsxs("div",{className:"text-xs text-gray-500",children:["Type: ",e.serverType]})]})})}const RM=W.memo(OM);function jM(e){switch(e){case"markdown":case"document":return S.jsx(mo,{className:"w-4 h-4 text-emerald-200"});case"image":return S.jsx(z3,{className:"w-4 h-4 text-emerald-200"});case"webpage":return S.jsx(A3,{className:"w-4 h-4 text-emerald-200"});case"link":return S.jsx(j3,{className:"w-4 h-4 text-emerald-200"});default:return S.jsx(ec,{className:"w-4 h-4 text-emerald-200"})}}function LM({data:e,selected:n}){return S.jsx(No,{data:e,selected:n,headerIcon:jM(e.outputType),headerColor:"bg-emerald-600",showTargetHandle:!0,showSourceHandle:!1,children:S.jsxs("div",{className:"space-y-2",children:[e.layoutType&&S.jsx("span",{className:"inline-block px-2 py-0.5 text-xs bg-emerald-900/50 text-emerald-300 rounded",children:e.layoutType}),e.result&&S.jsxs("div",{className:"text-xs text-gray-400 truncate max-w-[200px]",children:[e.result.substring(0,50),"..."]})]})})}const BM=W.memo(LM),hp=ap(e=>({activeTab:"preview",isCollapsed:!1,width:400,setActiveTab:n=>e({activeTab:n}),toggleCollapsed:()=>e(n=>({isCollapsed:!n.isCollapsed})),setWidth:n=>e({width:Math.max(300,Math.min(600,n))}),openStepPanel:()=>e({activeTab:"step",isCollapsed:!1})}));function HM(e,n){const{source:i,target:l}=e;if(i===l)return!1;const o=n.find(c=>c.id===i),u=n.find(c=>c.id===l);return!o||!u?!1:o.type==="output"?(console.warn("Output nodes cannot have outgoing connections"),!1):u.type==="input"?(console.warn("Input nodes cannot have incoming connections"),!1):!0}const UM={input:TM,subagent:MM,skill:DM,mcp:RM,output:BM};function qM(){const{nodes:e,edges:n,setNodes:i,setEdges:l,addEdge:o,setSelectedNode:u}=lr(),c=hp(x=>x.openStepPanel),f=W.useCallback(x=>{i(Ib(x,e))},[e,i]),p=W.useCallback(x=>{l(Vb(x,n))},[n,l]),d=W.useCallback(x=>{HM(x,e)&&(l(Sb({...x,animated:!0},n)),o({id:`e-${x.source}-${x.target}`,source:x.source,target:x.target,animated:!0}))},[e,n,l,o]),y=W.useCallback((x,b)=>{u(b.id),c()},[u,c]),m=W.useCallback(()=>{u(null)},[u]);return S.jsxs(AA,{nodes:e,edges:n,onNodesChange:f,onEdgesChange:p,onConnect:d,onNodeClick:y,onPaneClick:m,nodeTypes:UM,fitView:!0,fitViewOptions:{padding:.2},defaultEdgeOptions:{animated:!0,style:{strokeDasharray:"5 5"}},connectionLineStyle:{strokeDasharray:"5 5"},snapToGrid:!0,snapGrid:[15,15],connectionRadius:40,connectOnClick:!0,children:[S.jsx(RA,{variant:wi.Dots,gap:20,size:1,color:"#333333"}),S.jsx(IA,{}),S.jsx(e3,{nodeColor:x=>{switch(x.type){case"input":return"#fef3c7";case"subagent":return"#4f46e5";case"skill":return"#06b6d4";case"mcp":return"#ec4899";case"output":return"#10b981";default:return"#6b7280"}},maskColor:"rgba(0, 0, 0, 0.8)"})]})}function IM(e,n){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const VM=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YM=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XM={};function Ux(e,n){return(XM.jsx?YM:VM).test(e)}const $M=/[ \t\n\f\r]/g;function FM(e){return typeof e=="object"?e.type==="text"?qx(e.value):!1:qx(e)}function qx(e){return e.replace($M,"")===""}class To{constructor(n,i,l){this.normal=i,this.property=n,l&&(this.space=l)}}To.prototype.normal={};To.prototype.property={};To.prototype.space=void 0;function Bv(e,n){const i={},l={};for(const o of e)Object.assign(i,o.property),Object.assign(l,o.normal);return new To(i,l,n)}function Ah(e){return e.toLowerCase()}class Kt{constructor(n,i){this.attribute=i,this.property=n}}Kt.prototype.attribute="";Kt.prototype.booleanish=!1;Kt.prototype.boolean=!1;Kt.prototype.commaOrSpaceSeparated=!1;Kt.prototype.commaSeparated=!1;Kt.prototype.defined=!1;Kt.prototype.mustUseProperty=!1;Kt.prototype.number=!1;Kt.prototype.overloadedBoolean=!1;Kt.prototype.property="";Kt.prototype.spaceSeparated=!1;Kt.prototype.space=void 0;let GM=0;const Ae=Hr(),bt=Hr(),Mh=Hr(),fe=Hr(),nt=Hr(),Ol=Hr(),sn=Hr();function Hr(){return 2**++GM}const zh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:bt,commaOrSpaceSeparated:sn,commaSeparated:Ol,number:fe,overloadedBoolean:Mh,spaceSeparated:nt},Symbol.toStringTag,{value:"Module"})),Xd=Object.keys(zh);class pp extends Kt{constructor(n,i,l,o){let u=-1;if(super(n,i),Ix(this,"space",o),typeof l=="number")for(;++u<Xd.length;){const c=Xd[u];Ix(this,Xd[u],(l&zh[c])===zh[c])}}}pp.prototype.defined=!0;function Ix(e,n,i){i&&(e[n]=i)}function $l(e){const n={},i={};for(const[l,o]of Object.entries(e.properties)){const u=new pp(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),n[l]=u,i[Ah(l)]=l,i[Ah(u.attribute)]=l}return new To(n,i,e.space)}const Hv=$l({properties:{ariaActiveDescendant:null,ariaAtomic:bt,ariaAutoComplete:null,ariaBusy:bt,ariaChecked:bt,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:nt,ariaCurrent:null,ariaDescribedBy:nt,ariaDetails:null,ariaDisabled:bt,ariaDropEffect:nt,ariaErrorMessage:null,ariaExpanded:bt,ariaFlowTo:nt,ariaGrabbed:bt,ariaHasPopup:null,ariaHidden:bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nt,ariaLevel:fe,ariaLive:null,ariaModal:bt,ariaMultiLine:bt,ariaMultiSelectable:bt,ariaOrientation:null,ariaOwns:nt,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:bt,ariaReadOnly:bt,ariaRelevant:null,ariaRequired:bt,ariaRoleDescription:nt,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:bt,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Uv(e,n){return n in e?e[n]:n}function qv(e,n){return Uv(e,n.toLowerCase())}const ZM=$l({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ol,acceptCharset:nt,accessKey:nt,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:nt,autoFocus:Ae,autoPlay:Ae,blocking:nt,capture:null,charSet:null,checked:Ae,cite:null,className:nt,cols:fe,colSpan:null,content:null,contentEditable:bt,controls:Ae,controlsList:nt,coords:fe|Ol,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:Mh,draggable:bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:nt,height:fe,hidden:Mh,high:fe,href:null,hrefLang:null,htmlFor:nt,httpEquiv:nt,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:nt,itemRef:nt,itemScope:Ae,itemType:nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ae,optimum:fe,pattern:null,ping:nt,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:nt,required:Ae,reversed:Ae,rows:fe,rowSpan:fe,sandbox:nt,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:bt,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nt,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:bt,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:qv}),QM=$l({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:sn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:nt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ol,g2:Ol,glyphName:Ol,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sn,rev:sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sn,requiredFeatures:sn,requiredFonts:sn,requiredFormats:sn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Uv}),Iv=$l({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Vv=$l({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:qv}),Yv=$l({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),PM={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},KM=/[A-Z]/g,Vx=/-[a-z]/g,JM=/^data[-\w.:]+$/i;function WM(e,n){const i=Ah(n);let l=n,o=Kt;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&JM.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(Vx,tz);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!Vx.test(u)){let c=u.replace(KM,ez);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=pp}return new o(l,n)}function ez(e){return"-"+e.toLowerCase()}function tz(e){return e.charAt(1).toUpperCase()}const nz=Bv([Hv,ZM,Iv,Vv,Yv],"html"),mp=Bv([Hv,QM,Iv,Vv,Yv],"svg");function iz(e){return e.join(" ").trim()}var Cl={},$d,Yx;function rz(){if(Yx)return $d;Yx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
28
+ `,d="/",y="*",m="",x="comment",b="declaration";function w(C,k){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];k=k||{};var j=1,E=1;function D(R){var B=R.match(n);B&&(j+=B.length);var M=R.lastIndexOf(p);E=~M?R.length-M:E+R.length}function U(){var R={line:j,column:E};return function(B){return B.position=new z(R),Q(),B}}function z(R){this.start=R,this.end={line:j,column:E},this.source=k.source}z.prototype.content=C;function L(R){var B=new Error(k.source+":"+j+":"+E+": "+R);if(B.reason=R,B.filename=k.source,B.line=j,B.column=E,B.source=C,!k.silent)throw B}function G(R){var B=R.exec(C);if(B){var M=B[0];return D(M),C=C.slice(M.length),B}}function Q(){G(i)}function I(R){var B;for(R=R||[];B=Y();)B!==!1&&R.push(B);return R}function Y(){var R=U();if(!(d!=C.charAt(0)||y!=C.charAt(1))){for(var B=2;m!=C.charAt(B)&&(y!=C.charAt(B)||d!=C.charAt(B+1));)++B;if(B+=2,m===C.charAt(B-1))return L("End of comment missing");var M=C.slice(2,B-2);return E+=2,D(M),C=C.slice(B),E+=2,R({type:x,comment:M})}}function X(){var R=U(),B=G(l);if(B){if(Y(),!G(o))return L("property missing ':'");var M=G(u),H=R({type:b,property:_(B[0].replace(e,m)),value:M?_(M[0].replace(e,m)):m});return G(c),H}}function te(){var R=[];I(R);for(var B;B=X();)B!==!1&&(R.push(B),I(R));return R}return Q(),te()}function _(C){return C?C.replace(f,m):m}return $d=w,$d}var Xx;function lz(){if(Xx)return Cl;Xx=1;var e=Cl&&Cl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.default=i;const n=e(rz());function i(l,o){let u=null;if(!l||typeof l!="string")return u;const c=(0,n.default)(l),f=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:d,value:y}=p;f?o(d,y,p):y&&(u=u||{},u[d]=y)}),u}return Cl}var Fa={},$x;function az(){if($x)return Fa;$x=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(d){return!d||i.test(d)||e.test(d)},c=function(d,y){return y.toUpperCase()},f=function(d,y){return"".concat(y,"-")},p=function(d,y){return y===void 0&&(y={}),u(d)?d:(d=d.toLowerCase(),y.reactCompat?d=d.replace(o,f):d=d.replace(l,f),d.replace(n,c))};return Fa.camelCase=p,Fa}var Ga,Fx;function oz(){if(Fx)return Ga;Fx=1;var e=Ga&&Ga.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(lz()),i=az();function l(o,u){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(f,p){f&&p&&(c[(0,i.camelCase)(f,u)]=p)}),c}return l.default=l,Ga=l,Ga}var sz=oz();const uz=Iu(sz),Xv=$v("end"),gp=$v("start");function $v(e){return n;function n(i){const l=i&&i.position&&i.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function cz(e){const n=gp(e),i=Xv(e);if(n&&i)return{start:n,end:i}}function no(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Gx(e.position):"start"in e||"end"in e?Gx(e):"line"in e||"column"in e?Dh(e):""}function Dh(e){return Zx(e&&e.line)+":"+Zx(e&&e.column)}function Gx(e){return Dh(e&&e.start)+"-"+Dh(e&&e.end)}function Zx(e){return e&&typeof e=="number"?e:1}class Lt extends Error{constructor(n,i,l){super(),typeof i=="string"&&(l=i,i=void 0);let o="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof n=="string"?o=n:!u.cause&&n&&(c=!0,o=n.message,u.cause=n),!u.ruleId&&!u.source&&typeof l=="string"){const p=l.indexOf(":");p===-1?u.ruleId=l:(u.source=l.slice(0,p),u.ruleId=l.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=no(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Lt.prototype.file="";Lt.prototype.name="";Lt.prototype.reason="";Lt.prototype.message="";Lt.prototype.stack="";Lt.prototype.column=void 0;Lt.prototype.line=void 0;Lt.prototype.ancestors=void 0;Lt.prototype.cause=void 0;Lt.prototype.fatal=void 0;Lt.prototype.place=void 0;Lt.prototype.ruleId=void 0;Lt.prototype.source=void 0;const yp={}.hasOwnProperty,fz=new Map,dz=/[A-Z]/g,hz=new Set(["table","tbody","thead","tfoot","tr"]),pz=new Set(["td","th"]),Fv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function mz(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=Ez(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=Sz(i,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?mp:nz,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},u=Gv(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function Gv(e,n,i){if(n.type==="element")return gz(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return yz(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return bz(e,n,i);if(n.type==="mdxjsEsm")return xz(e,n);if(n.type==="root")return vz(e,n,i);if(n.type==="text")return wz(e,n)}function gz(e,n,i){const l=e.schema;let o=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=mp,e.schema=o),e.ancestors.push(n);const u=Qv(e,n.tagName,!1),c=kz(e,n);let f=bp(e,n);return hz.has(n.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!FM(p):!0})),Zv(e,c,u,n),xp(c,f),e.ancestors.pop(),e.schema=l,e.create(n,u,c,i)}function yz(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}yo(e,n.position)}function xz(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);yo(e,n.position)}function bz(e,n,i){const l=e.schema;let o=l;n.name==="svg"&&l.space==="html"&&(o=mp,e.schema=o),e.ancestors.push(n);const u=n.name===null?e.Fragment:Qv(e,n.name,!0),c=_z(e,n),f=bp(e,n);return Zv(e,c,u,n),xp(c,f),e.ancestors.pop(),e.schema=l,e.create(n,u,c,i)}function vz(e,n,i){const l={};return xp(l,bp(e,n)),e.create(n,e.Fragment,l,i)}function wz(e,n){return n.value}function Zv(e,n,i,l){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=l)}function xp(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function Sz(e,n,i){return l;function l(o,u,c,f){const d=Array.isArray(c.children)?i:n;return f?d(u,c,f):d(u,c)}}function Ez(e,n){return i;function i(l,o,u,c){const f=Array.isArray(u.children),p=gp(l);return n(o,u,c,f,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function kz(e,n){const i={};let l,o;for(o in n.properties)if(o!=="children"&&yp.call(n.properties,o)){const u=Cz(e,o,n.properties[o]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&pz.has(n.tagName)?l=f:i[c]=f}}if(l){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return i}function _z(e,n){const i={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const u=l.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else yo(e,n.position);else{const o=l.name;let u;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else yo(e,n.position);else u=l.value===null?!0:l.value;i[o]=u}return i}function bp(e,n){const i=[];let l=-1;const o=e.passKeys?new Map:fz;for(;++l<n.children.length;){const u=n.children[l];let c;if(e.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const d=o.get(p)||0;c=p+"-"+d,o.set(p,d+1)}}const f=Gv(e,u,c);f!==void 0&&i.push(f)}return i}function Cz(e,n,i){const l=WM(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=l.commaSeparated?IM(i):iz(i)),l.property==="style"){let o=typeof i=="object"?i:Nz(e,String(i));return e.stylePropertyNameCase==="css"&&(o=Tz(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?PM[l.property]||l.property:l.attribute,i]}}function Nz(e,n){try{return uz(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const l=i,o=new Lt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Fv+"#cannot-parse-style-attribute",o}}function Qv(e,n,i){let l;if(!i)l={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let u=-1,c;for(;++u<o.length;){const f=Ux(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}l=c}else l=Ux(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const o=l.value;return yp.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);yo(e)}function yo(e,n){const i=new Lt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Fv+"#cannot-handle-mdx-estrees-without-createevaluater",i}function Tz(e){const n={};let i;for(i in e)yp.call(e,i)&&(n[Az(i)]=e[i]);return n}function Az(e){let n=e.replace(dz,Mz);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Mz(e){return"-"+e.toLowerCase()}const Fd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},zz={};function vp(e,n){const i=zz,l=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Pv(e,l,o)}function Pv(e,n,i){if(Dz(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qx(e.children,n,i)}return Array.isArray(e)?Qx(e,n,i):""}function Qx(e,n,i){const l=[];let o=-1;for(;++o<e.length;)l[o]=Pv(e[o],n,i);return l.join("")}function Dz(e){return!!(e&&typeof e=="object")}const Px=document.createElement("i");function wp(e){const n="&"+e+";";Px.innerHTML=n;const i=Px.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function fn(e,n,i,l){const o=e.length;let u=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,i=i>0?i:0,l.length<1e4)c=Array.from(l),c.unshift(n,i),e.splice(...c);else for(i&&e.splice(n,i);u<l.length;)c=l.slice(u,u+1e4),c.unshift(n,0),e.splice(...c),u+=1e4,n+=1e4}function Sn(e,n){return e.length>0?(fn(e,e.length,0,n),e):n}const Kx={}.hasOwnProperty;function Kv(e){const n={};let i=-1;for(;++i<e.length;)Oz(n,e[i]);return n}function Oz(e,n){let i;for(i in n){const o=(Kx.call(e,i)?e[i]:void 0)||(e[i]={}),u=n[i];let c;if(u)for(c in u){Kx.call(o,c)||(o[c]=[]);const f=u[c];Rz(o[c],Array.isArray(f)?f:f?[f]:[])}}}function Rz(e,n){let i=-1;const l=[];for(;++i<n.length;)(n[i].add==="after"?e:l).push(n[i]);fn(e,0,0,l)}function Jv(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Rn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=ar(/[A-Za-z]/),jt=ar(/[\dA-Za-z]/),jz=ar(/[#-'*+\--9=?A-Z^-~]/);function Bu(e){return e!==null&&(e<32||e===127)}const Oh=ar(/\d/),Lz=ar(/[\dA-Fa-f]/),Bz=ar(/[!-/:-@[-`{-~]/);function ve(e){return e!==null&&e<-2}function tt(e){return e!==null&&(e<0||e===32)}function Re(e){return e===-2||e===-1||e===32}const rc=ar(new RegExp("\\p{P}|\\p{S}","u")),Br=ar(/\s/);function ar(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Fl(e){const n=[];let i=-1,l=0,o=0;for(;++i<e.length;){const u=e.charCodeAt(i);let c="";if(u===37&&jt(e.charCodeAt(i+1))&&jt(e.charCodeAt(i+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(i+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),o=1):c="�"}else c=String.fromCharCode(u);c&&(n.push(e.slice(l,i),encodeURIComponent(c)),l=i+o+1,c=""),o&&(i+=o,o=0)}return n.join("")+e.slice(l)}function qe(e,n,i,l){const o=l?l-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return Re(p)?(e.enter(i),f(p)):n(p)}function f(p){return Re(p)&&u++<o?(e.consume(p),f):(e.exit(i),n(p))}}const Hz={tokenize:Uz};function Uz(e){const n=e.attempt(this.parser.constructs.contentInitial,l,o);let i;return n;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),qe(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const p=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return ve(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const qz={tokenize:Iz},Jx={tokenize:Vz};function Iz(e){const n=this,i=[];let l=0,o,u,c;return f;function f(E){if(l<i.length){const D=i[l];return n.containerState=D[1],e.attempt(D[0].continuation,p,d)(E)}return d(E)}function p(E){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&j();const D=n.events.length;let U=D,z;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){z=n.events[U][1].end;break}k(l);let L=D;for(;L<n.events.length;)n.events[L][1].end={...z},L++;return fn(n.events,U+1,0,n.events.slice(D)),n.events.length=L,d(E)}return f(E)}function d(E){if(l===i.length){if(!o)return x(E);if(o.currentConstruct&&o.currentConstruct.concrete)return w(E);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Jx,y,m)(E)}function y(E){return o&&j(),k(l),x(E)}function m(E){return n.parser.lazy[n.now().line]=l!==i.length,c=n.now().offset,w(E)}function x(E){return n.containerState={},e.attempt(Jx,b,w)(E)}function b(E){return l++,i.push([n.currentConstruct,n.containerState]),x(E)}function w(E){if(E===null){o&&j(),k(0),e.consume(E);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),_(E)}function _(E){if(E===null){C(e.exit("chunkFlow"),!0),k(0),e.consume(E);return}return ve(E)?(e.consume(E),C(e.exit("chunkFlow")),l=0,n.interrupt=void 0,f):(e.consume(E),_)}function C(E,D){const U=n.sliceStream(E);if(D&&U.push(null),E.previous=u,u&&(u.next=E),u=E,o.defineSkip(E.start),o.write(U),n.parser.lazy[E.start.line]){let z=o.events.length;for(;z--;)if(o.events[z][1].start.offset<c&&(!o.events[z][1].end||o.events[z][1].end.offset>c))return;const L=n.events.length;let G=L,Q,I;for(;G--;)if(n.events[G][0]==="exit"&&n.events[G][1].type==="chunkFlow"){if(Q){I=n.events[G][1].end;break}Q=!0}for(k(l),z=L;z<n.events.length;)n.events[z][1].end={...I},z++;fn(n.events,G+1,0,n.events.slice(L)),n.events.length=z}}function k(E){let D=i.length;for(;D-- >E;){const U=i[D];n.containerState=U[1],U[0].exit.call(n,e)}i.length=E}function j(){o.write([null]),u=void 0,o=void 0,n.containerState._closeFlow=void 0}}function Vz(e,n,i){return qe(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vl(e){if(e===null||tt(e)||Br(e))return 1;if(rc(e))return 2}function lc(e,n,i){const l=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!l.includes(u)&&(n=u(n,i),l.push(u))}return n}const Rh={name:"attention",resolveAll:Yz,tokenize:Xz};function Yz(e,n){let i=-1,l,o,u,c,f,p,d,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(l=i;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[l][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;p=e[l][1].end.offset-e[l][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const m={...e[l][1].end},x={...e[i][1].start};Wx(m,-p),Wx(x,p),c={type:p>1?"strongSequence":"emphasisSequence",start:m,end:{...e[l][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:x},u={type:p>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[i][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[l][1].end={...c.start},e[i][1].start={...f.end},d=[],e[l][1].end.offset-e[l][1].start.offset&&(d=Sn(d,[["enter",e[l][1],n],["exit",e[l][1],n]])),d=Sn(d,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",u,n]]),d=Sn(d,lc(n.parser.constructs.insideSpan.null,e.slice(l+1,i),n)),d=Sn(d,[["exit",u,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,d=Sn(d,[["enter",e[i][1],n],["exit",e[i][1],n]])):y=0,fn(e,l-1,i-l+3,d),i=l+d.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function Xz(e,n){const i=this.parser.constructs.attentionMarkers.null,l=this.previous,o=Vl(l);let u;return c;function c(p){return u=p,e.enter("attentionSequence"),f(p)}function f(p){if(p===u)return e.consume(p),f;const d=e.exit("attentionSequence"),y=Vl(p),m=!y||y===2&&o||i.includes(p),x=!o||o===2&&y||i.includes(l);return d._open=!!(u===42?m:m&&(o||!x)),d._close=!!(u===42?x:x&&(y||!m)),n(p)}}function Wx(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const $z={name:"autolink",tokenize:Fz};function Fz(e,n,i){let l=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return Ut(b)?(e.consume(b),c):b===64?i(b):d(b)}function c(b){return b===43||b===45||b===46||jt(b)?(l=1,f(b)):d(b)}function f(b){return b===58?(e.consume(b),l=0,p):(b===43||b===45||b===46||jt(b))&&l++<32?(e.consume(b),f):(l=0,d(b))}function p(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||Bu(b)?i(b):(e.consume(b),p)}function d(b){return b===64?(e.consume(b),y):jz(b)?(e.consume(b),d):i(b)}function y(b){return jt(b)?m(b):i(b)}function m(b){return b===46?(e.consume(b),l=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):x(b)}function x(b){if((b===45||jt(b))&&l++<63){const w=b===45?x:m;return e.consume(b),w}return i(b)}}const Ao={partial:!0,tokenize:Gz};function Gz(e,n,i){return l;function l(u){return Re(u)?qe(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||ve(u)?n(u):i(u)}}const Wv={continuation:{tokenize:Qz},exit:Pz,name:"blockQuote",tokenize:Zz};function Zz(e,n,i){const l=this;return o;function o(c){if(c===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return i(c)}function u(c){return Re(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function Qz(e,n,i){const l=this;return o;function o(c){return Re(c)?qe(e,u,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(Wv,n,i)(c)}}function Pz(e){e.exit("blockQuote")}const ew={name:"characterEscape",tokenize:Kz};function Kz(e,n,i){return l;function l(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return Bz(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(u)}}const tw={name:"characterReference",tokenize:Jz};function Jz(e,n,i){const l=this;let o=0,u,c;return f;function f(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),p}function p(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),u=31,c=jt,y(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=Lz,y):(e.enter("characterReferenceValue"),u=7,c=Oh,y(m))}function y(m){if(m===59&&o){const x=e.exit("characterReferenceValue");return c===jt&&!wp(l.sliceSerialize(x))?i(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(m)&&o++<u?(e.consume(m),y):i(m)}}const e1={partial:!0,tokenize:e5},t1={concrete:!0,name:"codeFenced",tokenize:Wz};function Wz(e,n,i){const l=this,o={partial:!0,tokenize:U};let u=0,c=0,f;return p;function p(z){return d(z)}function d(z){const L=l.events[l.events.length-1];return u=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,f=z,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(z)}function y(z){return z===f?(c++,e.consume(z),y):c<3?i(z):(e.exit("codeFencedFenceSequence"),Re(z)?qe(e,m,"whitespace")(z):m(z))}function m(z){return z===null||ve(z)?(e.exit("codeFencedFence"),l.interrupt?n(z):e.check(e1,_,D)(z)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(z))}function x(z){return z===null||ve(z)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(z)):Re(z)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qe(e,b,"whitespace")(z)):z===96&&z===f?i(z):(e.consume(z),x)}function b(z){return z===null||ve(z)?m(z):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(z))}function w(z){return z===null||ve(z)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(z)):z===96&&z===f?i(z):(e.consume(z),w)}function _(z){return e.attempt(o,D,C)(z)}function C(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),k}function k(z){return u>0&&Re(z)?qe(e,j,"linePrefix",u+1)(z):j(z)}function j(z){return z===null||ve(z)?e.check(e1,_,D)(z):(e.enter("codeFlowValue"),E(z))}function E(z){return z===null||ve(z)?(e.exit("codeFlowValue"),j(z)):(e.consume(z),E)}function D(z){return e.exit("codeFenced"),n(z)}function U(z,L,G){let Q=0;return I;function I(B){return z.enter("lineEnding"),z.consume(B),z.exit("lineEnding"),Y}function Y(B){return z.enter("codeFencedFence"),Re(B)?qe(z,X,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):X(B)}function X(B){return B===f?(z.enter("codeFencedFenceSequence"),te(B)):G(B)}function te(B){return B===f?(Q++,z.consume(B),te):Q>=c?(z.exit("codeFencedFenceSequence"),Re(B)?qe(z,R,"whitespace")(B):R(B)):G(B)}function R(B){return B===null||ve(B)?(z.exit("codeFencedFence"),L(B)):G(B)}}}function e5(e,n,i){const l=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return l.parser.lazy[l.now().line]?i(c):n(c)}}const Gd={name:"codeIndented",tokenize:n5},t5={partial:!0,tokenize:i5};function n5(e,n,i){const l=this;return o;function o(d){return e.enter("codeIndented"),qe(e,u,"linePrefix",5)(d)}function u(d){const y=l.events[l.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(d):i(d)}function c(d){return d===null?p(d):ve(d)?e.attempt(t5,c,p)(d):(e.enter("codeFlowValue"),f(d))}function f(d){return d===null||ve(d)?(e.exit("codeFlowValue"),c(d)):(e.consume(d),f)}function p(d){return e.exit("codeIndented"),n(d)}}function i5(e,n,i){const l=this;return o;function o(c){return l.parser.lazy[l.now().line]?i(c):ve(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):qe(e,u,"linePrefix",5)(c)}function u(c){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):ve(c)?o(c):i(c)}}const r5={name:"codeText",previous:a5,resolve:l5,tokenize:o5};function l5(e){let n=e.length-4,i=3,l,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=i;++l<n;)if(e[l][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(l=i-1,n++;++l<=n;)o===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(o=l):(l===n||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),n-=l-o-2,l=o+2),o=void 0);return e}function a5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function o5(e,n,i){let l=0,o,u;return c;function c(m){return e.enter("codeText"),e.enter("codeTextSequence"),f(m)}function f(m){return m===96?(e.consume(m),l++,f):(e.exit("codeTextSequence"),p(m))}function p(m){return m===null?i(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),p):m===96?(u=e.enter("codeTextSequence"),o=0,y(m)):ve(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),p):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||ve(m)?(e.exit("codeTextData"),p(m)):(e.consume(m),d)}function y(m){return m===96?(e.consume(m),o++,y):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(m)):(u.type="codeTextData",d(m))}}class s5{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const l=i??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,i,l){const o=i||0;this.setCursor(Math.trunc(n));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&Za(this.left,l),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Za(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Za(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);Za(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Za(this.left,i.reverse())}}}function Za(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function nw(e){const n={};let i=-1,l,o,u,c,f,p,d;const y=new s5(e);for(;++i<y.length;){for(;i in n;)i=n[i];if(l=y.get(i),i&&l[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(p=l[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,u5(y,i)),i=n[i],d=!0);else if(l[1]._container){for(u=i,o=void 0;u--;)if(c=y.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(l[1].end={...y.get(o)[1].start},f=y.slice(o,i),f.unshift(l),y.splice(o,i-o+1,f))}}return fn(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!d}function u5(e,n){const i=e.get(n)[1],l=e.get(n)[2];let o=n-1;const u=[];let c=i._tokenizer;c||(c=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,p=[],d={};let y,m,x=-1,b=i,w=0,_=0;const C=[_];for(;b;){for(;e.get(++o)[1]!==b;);u.push(o),b._tokenizer||(y=l.sliceStream(b),b.next||y.push(null),m&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),m=b,b=b.next}for(b=i;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(_=x+1,C.push(_),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):C.pop(),x=C.length;x--;){const k=f.slice(C[x],C[x+1]),j=u.pop();p.push([j,j+k.length-1]),e.splice(j,2,k)}for(p.reverse(),x=-1;++x<p.length;)d[w+p[x][0]]=w+p[x][1],w+=p[x][1]-p[x][0]-1;return d}const c5={resolve:d5,tokenize:h5},f5={partial:!0,tokenize:p5};function d5(e){return nw(e),e}function h5(e,n){let i;return l;function l(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):ve(f)?e.check(f5,c,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function p5(e,n,i){const l=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),qe(e,u,"linePrefix")}function u(c){if(c===null||ve(c))return i(c);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(l.parser.constructs.flow,i,n)(c)}}function iw(e,n,i,l,o,u,c,f,p){const d=p||Number.POSITIVE_INFINITY;let y=0;return m;function m(k){return k===60?(e.enter(l),e.enter(o),e.enter(u),e.consume(k),e.exit(u),x):k===null||k===32||k===41||Bu(k)?i(k):(e.enter(l),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),_(k))}function x(k){return k===62?(e.enter(u),e.consume(k),e.exit(u),e.exit(o),e.exit(l),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===62?(e.exit("chunkString"),e.exit(f),x(k)):k===null||k===60||ve(k)?i(k):(e.consume(k),k===92?w:b)}function w(k){return k===60||k===62||k===92?(e.consume(k),b):b(k)}function _(k){return!y&&(k===null||k===41||tt(k))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(l),n(k)):y<d&&k===40?(e.consume(k),y++,_):k===41?(e.consume(k),y--,_):k===null||k===32||k===40||Bu(k)?i(k):(e.consume(k),k===92?C:_)}function C(k){return k===40||k===41||k===92?(e.consume(k),_):_(k)}}function rw(e,n,i,l,o,u){const c=this;let f=0,p;return d;function d(b){return e.enter(l),e.enter(o),e.consume(b),e.exit(o),e.enter(u),y}function y(b){return f>999||b===null||b===91||b===93&&!p||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(e.exit(u),e.enter(o),e.consume(b),e.exit(o),e.exit(l),n):ve(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||b===91||b===93||ve(b)||f++>999?(e.exit("chunkString"),y(b)):(e.consume(b),p||(p=!Re(b)),b===92?x:m)}function x(b){return b===91||b===92||b===93?(e.consume(b),f++,m):m(b)}}function lw(e,n,i,l,o,u){let c;return f;function f(x){return x===34||x===39||x===40?(e.enter(l),e.enter(o),e.consume(x),e.exit(o),c=x===40?41:x,p):i(x)}function p(x){return x===c?(e.enter(o),e.consume(x),e.exit(o),e.exit(l),n):(e.enter(u),d(x))}function d(x){return x===c?(e.exit(u),p(c)):x===null?i(x):ve(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),qe(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===c||x===null||ve(x)?(e.exit("chunkString"),d(x)):(e.consume(x),x===92?m:y)}function m(x){return x===c||x===92?(e.consume(x),y):y(x)}}function io(e,n){let i;return l;function l(o){return ve(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,l):Re(o)?qe(e,l,i?"linePrefix":"lineSuffix")(o):n(o)}}const m5={name:"definition",tokenize:y5},g5={partial:!0,tokenize:x5};function y5(e,n,i){const l=this;let o;return u;function u(b){return e.enter("definition"),c(b)}function c(b){return rw.call(l,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=Rn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):i(b)}function p(b){return tt(b)?io(e,d)(b):d(b)}function d(b){return iw(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(g5,m,m)(b)}function m(b){return Re(b)?qe(e,x,"whitespace")(b):x(b)}function x(b){return b===null||ve(b)?(e.exit("definition"),l.parser.defined.push(o),n(b)):i(b)}}function x5(e,n,i){return l;function l(f){return tt(f)?io(e,o)(f):i(f)}function o(f){return lw(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Re(f)?qe(e,c,"whitespace")(f):c(f)}function c(f){return f===null||ve(f)?n(f):i(f)}}const b5={name:"hardBreakEscape",tokenize:v5};function v5(e,n,i){return l;function l(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return ve(u)?(e.exit("hardBreakEscape"),n(u)):i(u)}}const w5={name:"headingAtx",resolve:S5,tokenize:E5};function S5(e,n){let i=e.length-2,l=3,o,u;return e[l][1].type==="whitespace"&&(l+=2),i-2>l&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(l===i-1||i-4>l&&e[i-2][1].type==="whitespace")&&(i-=l+1===i?2:4),i>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},u={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},fn(e,l,i-l+1,[["enter",o,n],["enter",u,n],["exit",u,n],["exit",o,n]])),e}function E5(e,n,i){let l=0;return o;function o(y){return e.enter("atxHeading"),u(y)}function u(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&l++<6?(e.consume(y),c):y===null||tt(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),p(y)):y===null||ve(y)?(e.exit("atxHeading"),n(y)):Re(y)?qe(e,f,"whitespace")(y):(e.enter("atxHeadingText"),d(y))}function p(y){return y===35?(e.consume(y),p):(e.exit("atxHeadingSequence"),f(y))}function d(y){return y===null||y===35||tt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),d)}}const k5=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],n1=["pre","script","style","textarea"],_5={concrete:!0,name:"htmlFlow",resolveTo:T5,tokenize:A5},C5={partial:!0,tokenize:z5},N5={partial:!0,tokenize:M5};function T5(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function A5(e,n,i){const l=this;let o,u,c,f,p;return d;function d(T){return y(T)}function y(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),m}function m(T){return T===33?(e.consume(T),x):T===47?(e.consume(T),u=!0,_):T===63?(e.consume(T),o=3,l.interrupt?n:A):Ut(T)?(e.consume(T),c=String.fromCharCode(T),C):i(T)}function x(T){return T===45?(e.consume(T),o=2,b):T===91?(e.consume(T),o=5,f=0,w):Ut(T)?(e.consume(T),o=4,l.interrupt?n:A):i(T)}function b(T){return T===45?(e.consume(T),l.interrupt?n:A):i(T)}function w(T){const ne="CDATA[";return T===ne.charCodeAt(f++)?(e.consume(T),f===ne.length?l.interrupt?n:X:w):i(T)}function _(T){return Ut(T)?(e.consume(T),c=String.fromCharCode(T),C):i(T)}function C(T){if(T===null||T===47||T===62||tt(T)){const ne=T===47,ue=c.toLowerCase();return!ne&&!u&&n1.includes(ue)?(o=1,l.interrupt?n(T):X(T)):k5.includes(c.toLowerCase())?(o=6,ne?(e.consume(T),k):l.interrupt?n(T):X(T)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?i(T):u?j(T):E(T))}return T===45||jt(T)?(e.consume(T),c+=String.fromCharCode(T),C):i(T)}function k(T){return T===62?(e.consume(T),l.interrupt?n:X):i(T)}function j(T){return Re(T)?(e.consume(T),j):I(T)}function E(T){return T===47?(e.consume(T),I):T===58||T===95||Ut(T)?(e.consume(T),D):Re(T)?(e.consume(T),E):I(T)}function D(T){return T===45||T===46||T===58||T===95||jt(T)?(e.consume(T),D):U(T)}function U(T){return T===61?(e.consume(T),z):Re(T)?(e.consume(T),U):E(T)}function z(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(e.consume(T),p=T,L):Re(T)?(e.consume(T),z):G(T)}function L(T){return T===p?(e.consume(T),p=null,Q):T===null||ve(T)?i(T):(e.consume(T),L)}function G(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||tt(T)?U(T):(e.consume(T),G)}function Q(T){return T===47||T===62||Re(T)?E(T):i(T)}function I(T){return T===62?(e.consume(T),Y):i(T)}function Y(T){return T===null||ve(T)?X(T):Re(T)?(e.consume(T),Y):i(T)}function X(T){return T===45&&o===2?(e.consume(T),M):T===60&&o===1?(e.consume(T),H):T===62&&o===4?(e.consume(T),O):T===63&&o===3?(e.consume(T),A):T===93&&o===5?(e.consume(T),P):ve(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(C5,V,te)(T)):T===null||ve(T)?(e.exit("htmlFlowData"),te(T)):(e.consume(T),X)}function te(T){return e.check(N5,R,V)(T)}function R(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),B}function B(T){return T===null||ve(T)?te(T):(e.enter("htmlFlowData"),X(T))}function M(T){return T===45?(e.consume(T),A):X(T)}function H(T){return T===47?(e.consume(T),c="",$):X(T)}function $(T){if(T===62){const ne=c.toLowerCase();return n1.includes(ne)?(e.consume(T),O):X(T)}return Ut(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),$):X(T)}function P(T){return T===93?(e.consume(T),A):X(T)}function A(T){return T===62?(e.consume(T),O):T===45&&o===2?(e.consume(T),A):X(T)}function O(T){return T===null||ve(T)?(e.exit("htmlFlowData"),V(T)):(e.consume(T),O)}function V(T){return e.exit("htmlFlow"),n(T)}}function M5(e,n,i){const l=this;return o;function o(c){return ve(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):i(c)}function u(c){return l.parser.lazy[l.now().line]?i(c):n(c)}}function z5(e,n,i){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ao,n,i)}}const D5={name:"htmlText",tokenize:O5};function O5(e,n,i){const l=this;let o,u,c;return f;function f(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),p}function p(A){return A===33?(e.consume(A),d):A===47?(e.consume(A),U):A===63?(e.consume(A),E):Ut(A)?(e.consume(A),G):i(A)}function d(A){return A===45?(e.consume(A),y):A===91?(e.consume(A),u=0,w):Ut(A)?(e.consume(A),j):i(A)}function y(A){return A===45?(e.consume(A),b):i(A)}function m(A){return A===null?i(A):A===45?(e.consume(A),x):ve(A)?(c=m,H(A)):(e.consume(A),m)}function x(A){return A===45?(e.consume(A),b):m(A)}function b(A){return A===62?M(A):A===45?x(A):m(A)}function w(A){const O="CDATA[";return A===O.charCodeAt(u++)?(e.consume(A),u===O.length?_:w):i(A)}function _(A){return A===null?i(A):A===93?(e.consume(A),C):ve(A)?(c=_,H(A)):(e.consume(A),_)}function C(A){return A===93?(e.consume(A),k):_(A)}function k(A){return A===62?M(A):A===93?(e.consume(A),k):_(A)}function j(A){return A===null||A===62?M(A):ve(A)?(c=j,H(A)):(e.consume(A),j)}function E(A){return A===null?i(A):A===63?(e.consume(A),D):ve(A)?(c=E,H(A)):(e.consume(A),E)}function D(A){return A===62?M(A):E(A)}function U(A){return Ut(A)?(e.consume(A),z):i(A)}function z(A){return A===45||jt(A)?(e.consume(A),z):L(A)}function L(A){return ve(A)?(c=L,H(A)):Re(A)?(e.consume(A),L):M(A)}function G(A){return A===45||jt(A)?(e.consume(A),G):A===47||A===62||tt(A)?Q(A):i(A)}function Q(A){return A===47?(e.consume(A),M):A===58||A===95||Ut(A)?(e.consume(A),I):ve(A)?(c=Q,H(A)):Re(A)?(e.consume(A),Q):M(A)}function I(A){return A===45||A===46||A===58||A===95||jt(A)?(e.consume(A),I):Y(A)}function Y(A){return A===61?(e.consume(A),X):ve(A)?(c=Y,H(A)):Re(A)?(e.consume(A),Y):Q(A)}function X(A){return A===null||A===60||A===61||A===62||A===96?i(A):A===34||A===39?(e.consume(A),o=A,te):ve(A)?(c=X,H(A)):Re(A)?(e.consume(A),X):(e.consume(A),R)}function te(A){return A===o?(e.consume(A),o=void 0,B):A===null?i(A):ve(A)?(c=te,H(A)):(e.consume(A),te)}function R(A){return A===null||A===34||A===39||A===60||A===61||A===96?i(A):A===47||A===62||tt(A)?Q(A):(e.consume(A),R)}function B(A){return A===47||A===62||tt(A)?Q(A):i(A)}function M(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),n):i(A)}function H(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),$}function $(A){return Re(A)?qe(e,P,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):P(A)}function P(A){return e.enter("htmlTextData"),c(A)}}const Sp={name:"labelEnd",resolveAll:B5,resolveTo:H5,tokenize:U5},R5={tokenize:q5},j5={tokenize:I5},L5={tokenize:V5};function B5(e){let n=-1;const i=[];for(;++n<e.length;){const l=e[n][1];if(i.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",n+=o}}return e.length!==i.length&&fn(e,0,e.length,i),e}function H5(e,n){let i=e.length,l=0,o,u,c,f;for(;i--;)if(o=e[i][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=i,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(c=i);const p={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[u+l+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",p,n],["enter",d,n]],f=Sn(f,e.slice(u+1,u+l+3)),f=Sn(f,[["enter",y,n]]),f=Sn(f,lc(n.parser.constructs.insideSpan.null,e.slice(u+l+4,c-3),n)),f=Sn(f,[["exit",y,n],e[c-2],e[c-1],["exit",d,n]]),f=Sn(f,e.slice(c+1)),f=Sn(f,[["exit",p,n]]),fn(e,u,e.length,f),e}function U5(e,n,i){const l=this;let o=l.events.length,u,c;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){u=l.events[o][1];break}return f;function f(x){return u?u._inactive?m(x):(c=l.parser.defined.includes(Rn(l.sliceSerialize({start:u.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),p):i(x)}function p(x){return x===40?e.attempt(R5,y,c?y:m)(x):x===91?e.attempt(j5,y,c?d:m)(x):c?y(x):m(x)}function d(x){return e.attempt(L5,y,m)(x)}function y(x){return n(x)}function m(x){return u._balanced=!0,i(x)}}function q5(e,n,i){return l;function l(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return tt(m)?io(e,u)(m):u(m)}function u(m){return m===41?y(m):iw(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function c(m){return tt(m)?io(e,p)(m):y(m)}function f(m){return i(m)}function p(m){return m===34||m===39||m===40?lw(e,d,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):y(m)}function d(m){return tt(m)?io(e,y)(m):y(m)}function y(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),n):i(m)}}function I5(e,n,i){const l=this;return o;function o(f){return rw.call(l,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return l.parser.defined.includes(Rn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(f):i(f)}function c(f){return i(f)}}function V5(e,n,i){return l;function l(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),n):i(u)}}const Y5={name:"labelStartImage",resolveAll:Sp.resolveAll,tokenize:X5};function X5(e,n,i){const l=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(f):n(f)}}const $5={name:"labelStartLink",resolveAll:Sp.resolveAll,tokenize:F5};function F5(e,n,i){const l=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(c):n(c)}}const Zd={name:"lineEnding",tokenize:G5};function G5(e,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),qe(e,n,"linePrefix")}}const ku={name:"thematicBreak",tokenize:Z5};function Z5(e,n,i){let l=0,o;return u;function u(d){return e.enter("thematicBreak"),c(d)}function c(d){return o=d,f(d)}function f(d){return d===o?(e.enter("thematicBreakSequence"),p(d)):l>=3&&(d===null||ve(d))?(e.exit("thematicBreak"),n(d)):i(d)}function p(d){return d===o?(e.consume(d),l++,p):(e.exit("thematicBreakSequence"),Re(d)?qe(e,f,"whitespace")(d):f(d))}}const Qt={continuation:{tokenize:J5},exit:eD,name:"list",tokenize:K5},Q5={partial:!0,tokenize:tD},P5={partial:!0,tokenize:W5};function K5(e,n,i){const l=this,o=l.events[l.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(b){const w=l.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!l.containerState.marker||b===l.containerState.marker:Oh(b)){if(l.containerState.type||(l.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ku,i,d)(b):d(b);if(!l.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return i(b)}function p(b){return Oh(b)&&++c<10?(e.consume(b),p):(!l.interrupt||c<2)&&(l.containerState.marker?b===l.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),d(b)):i(b)}function d(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||b,e.check(Ao,l.interrupt?i:y,e.attempt(Q5,x,m))}function y(b){return l.containerState.initialBlankLine=!0,u++,x(b)}function m(b){return Re(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):i(b)}function x(b){return l.containerState.size=u+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function J5(e,n,i){const l=this;return l.containerState._closeFlow=void 0,e.check(Ao,o,u);function o(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,qe(e,n,"listItemIndent",l.containerState.size+1)(f)}function u(f){return l.containerState.furtherBlankLines||!Re(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(P5,n,c)(f))}function c(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,qe(e,e.attempt(Qt,n,i),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function W5(e,n,i){const l=this;return qe(e,o,"listItemIndent",l.containerState.size+1);function o(u){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?n(u):i(u)}}function eD(e){e.exit(this.containerState.type)}function tD(e,n,i){const l=this;return qe(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=l.events[l.events.length-1];return!Re(u)&&c&&c[1].type==="listItemPrefixWhitespace"?n(u):i(u)}}const i1={name:"setextUnderline",resolveTo:nD,tokenize:iD};function nD(e,n){let i=e.length,l,o,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){l=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",c,n]),e.splice(u+1,0,["exit",e[l][1],n]),e[l][1].end={...e[u][1].end}):e[l][1]=c,e.push(["exit",c,n]),e}function iD(e,n,i){const l=this;let o;return u;function u(d){let y=l.events.length,m;for(;y--;)if(l.events[y][1].type!=="lineEnding"&&l.events[y][1].type!=="linePrefix"&&l.events[y][1].type!=="content"){m=l.events[y][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||m)?(e.enter("setextHeadingLine"),o=d,c(d)):i(d)}function c(d){return e.enter("setextHeadingLineSequence"),f(d)}function f(d){return d===o?(e.consume(d),f):(e.exit("setextHeadingLineSequence"),Re(d)?qe(e,p,"lineSuffix")(d):p(d))}function p(d){return d===null||ve(d)?(e.exit("setextHeadingLine"),n(d)):i(d)}}const rD={tokenize:lD};function lD(e){const n=this,i=e.attempt(Ao,l,e.attempt(this.parser.constructs.flowInitial,o,qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(c5,o)),"linePrefix")));return i;function l(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const aD={resolveAll:ow()},oD=aw("string"),sD=aw("text");function aw(e){return{resolveAll:ow(e==="text"?uD:void 0),tokenize:n};function n(i){const l=this,o=this.parser.constructs[e],u=i.attempt(o,c,f);return c;function c(y){return d(y)?u(y):f(y)}function f(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),p}function p(y){return d(y)?(i.exit("data"),u(y)):(i.consume(y),p)}function d(y){if(y===null)return!0;const m=o[y];let x=-1;if(m)for(;++x<m.length;){const b=m[x];if(!b.previous||b.previous.call(l,l.previous))return!0}return!1}}}function ow(e){return n;function n(i,l){let o=-1,u;for(;++o<=i.length;)u===void 0?i[o]&&i[o][1].type==="data"&&(u=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==u+2&&(i[u][1].end=i[o-1][1].end,i.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(i,l):i}}function uD(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const l=e[i-1][1],o=n.sliceStream(l);let u=o.length,c=-1,f=0,p;for(;u--;){const d=o[u];if(typeof d=="string"){for(c=d.length;d.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(d===-2)p=!0,f++;else if(d!==-1){u++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(f=0),f){const d={type:i===e.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:l.start._bufferIndex+c,_index:l.start._index+u,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...d.start},l.start.offset===l.end.offset?Object.assign(l,d):(e.splice(i,0,["enter",d,n],["exit",d,n]),i+=2)}i++}return e}const cD={42:Qt,43:Qt,45:Qt,48:Qt,49:Qt,50:Qt,51:Qt,52:Qt,53:Qt,54:Qt,55:Qt,56:Qt,57:Qt,62:Wv},fD={91:m5},dD={[-2]:Gd,[-1]:Gd,32:Gd},hD={35:w5,42:ku,45:[i1,ku],60:_5,61:i1,95:ku,96:t1,126:t1},pD={38:tw,92:ew},mD={[-5]:Zd,[-4]:Zd,[-3]:Zd,33:Y5,38:tw,42:Rh,60:[$z,D5],91:$5,92:[b5,ew],93:Sp,95:Rh,96:r5},gD={null:[Rh,aD]},yD={null:[42,95]},xD={null:[]},bD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yD,contentInitial:fD,disable:xD,document:cD,flow:hD,flowInitial:dD,insideSpan:gD,string:pD,text:mD},Symbol.toStringTag,{value:"Module"}));function vD(e,n,i){let l={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},u=[];let c=[],f=[];const p={attempt:L(U),check:L(z),consume:j,enter:E,exit:D,interrupt:L(z,{interrupt:!0})},d={code:null,containerState:{},defineSkip:_,events:[],now:w,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:m};let y=n.tokenize.call(d,p);return n.resolveAll&&u.push(n),d;function m(Y){return c=Sn(c,Y),C(),c[c.length-1]!==null?[]:(G(n,0),d.events=lc(u,d.events,d),d.events)}function x(Y,X){return SD(b(Y),X)}function b(Y){return wD(c,Y)}function w(){const{_bufferIndex:Y,_index:X,line:te,column:R,offset:B}=l;return{_bufferIndex:Y,_index:X,line:te,column:R,offset:B}}function _(Y){o[Y.line]=Y.column,I()}function C(){let Y;for(;l._index<c.length;){const X=c[l._index];if(typeof X=="string")for(Y=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===Y&&l._bufferIndex<X.length;)k(X.charCodeAt(l._bufferIndex));else k(X)}}function k(Y){y=y(Y)}function j(Y){ve(Y)?(l.line++,l.column=1,l.offset+=Y===-3?2:1,I()):Y!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),d.previous=Y}function E(Y,X){const te=X||{};return te.type=Y,te.start=w(),d.events.push(["enter",te,d]),f.push(te),te}function D(Y){const X=f.pop();return X.end=w(),d.events.push(["exit",X,d]),X}function U(Y,X){G(Y,X.from)}function z(Y,X){X.restore()}function L(Y,X){return te;function te(R,B,M){let H,$,P,A;return Array.isArray(R)?V(R):"tokenize"in R?V([R]):O(R);function O(ce){return de;function de(se){const pe=se!==null&&ce[se],Ee=se!==null&&ce.null,_e=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return V(_e)(se)}}function V(ce){return H=ce,$=0,ce.length===0?M:T(ce[$])}function T(ce){return de;function de(se){return A=Q(),P=ce,ce.partial||(d.currentConstruct=ce),ce.name&&d.parser.constructs.disable.null.includes(ce.name)?ue():ce.tokenize.call(X?Object.assign(Object.create(d),X):d,p,ne,ue)(se)}}function ne(ce){return Y(P,A),B}function ue(ce){return A.restore(),++$<H.length?T(H[$]):M}}}function G(Y,X){Y.resolveAll&&!u.includes(Y)&&u.push(Y),Y.resolve&&fn(d.events,X,d.events.length-X,Y.resolve(d.events.slice(X),d)),Y.resolveTo&&(d.events=Y.resolveTo(d.events,d))}function Q(){const Y=w(),X=d.previous,te=d.currentConstruct,R=d.events.length,B=Array.from(f);return{from:R,restore:M};function M(){l=Y,d.previous=X,d.currentConstruct=te,d.events.length=R,f=B,I()}}function I(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function wD(e,n){const i=n.start._index,l=n.start._bufferIndex,o=n.end._index,u=n.end._bufferIndex;let c;if(i===o)c=[e[i].slice(l,u)];else{if(c=e.slice(i,o),l>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(l):c.shift()}u>0&&c.push(e[o].slice(0,u))}return c}function SD(e,n){let i=-1;const l=[];let o;for(;++i<e.length;){const u=e[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
29
+ `;break}case-3:{c=`\r
30
+ `;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,l.push(c)}return l.join("")}function ED(e){const l={constructs:Kv([bD,...(e||{}).extensions||[]]),content:o(Hz),defined:[],document:o(qz),flow:o(rD),lazy:{},string:o(oD),text:o(sD)};return l;function o(u){return c;function c(f){return vD(l,u,f)}}}function kD(e){for(;!nw(e););return e}const r1=/[\0\t\n\r]/g;function _D(){let e=1,n="",i=!0,l;return o;function o(u,c,f){const p=[];let d,y,m,x,b;for(u=n+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),m=0,n="",i&&(u.charCodeAt(0)===65279&&m++,i=void 0);m<u.length;){if(r1.lastIndex=m,d=r1.exec(u),x=d&&d.index!==void 0?d.index:u.length,b=u.charCodeAt(x),!d){n=u.slice(m);break}if(b===10&&m===x&&l)p.push(-3),l=void 0;else switch(l&&(p.push(-5),l=void 0),m<x&&(p.push(u.slice(m,x)),e+=x-m),b){case 0:{p.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,p.push(-2);e++<y;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:l=!0,e=1}m=x+1}return f&&(l&&p.push(-5),n&&p.push(n),p.push(null)),p}}const CD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ND(e){return e.replace(CD,TD)}function TD(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return Jv(i.slice(u?2:1),u?16:10)}return wp(i)||e}const sw={}.hasOwnProperty;function AD(e,n,i){return typeof n!="string"&&(i=n,n=void 0),MD(i)(kD(ED(i).document().write(_D()(e,n,!0))))}function MD(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(zt),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:u($e),blockQuote:u(Ee),characterEscape:Q,characterReference:Q,codeFenced:u(_e),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(_e,c),codeText:u(be,c),codeTextData:Q,data:Q,codeFlowValue:Q,definition:u(ke),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(ze),hardBreakEscape:u(Ve),hardBreakTrailing:u(Ve),htmlFlow:u(ct,c),htmlFlowData:Q,htmlText:u(ct,c),htmlTextData:Q,image:u(Jt),label:c,link:u(zt),listItem:u(En),listItemValue:x,listOrdered:u(qt,m),listUnordered:u(qt),paragraph:u(Pn),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u($e),strong:u(Kn),thematicBreak:u(_i)},exit:{atxHeading:p(),atxHeadingSequence:U,autolink:p(),autolinkEmail:pe,autolinkProtocol:se,blockQuote:p(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:ce,characterReference:de,codeFenced:p(C),codeFencedFence:_,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:I,codeIndented:p(k),codeText:p(B),codeTextData:I,data:I,definition:p(),definitionDestinationString:D,definitionLabelString:j,definitionTitleString:E,emphasis:p(),hardBreakEscape:p(X),hardBreakTrailing:p(X),htmlFlow:p(te),htmlFlowData:I,htmlText:p(R),htmlTextData:I,image:p(H),label:P,labelText:$,lineEnding:Y,link:p(M),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ne,resourceDestinationString:A,resourceTitleString:O,resource:V,setextHeading:p(G),setextHeadingLineSequence:L,setextHeadingText:z,strong:p(),thematicBreak:p()}};uw(n,(e||{}).mdastExtensions||[]);const i={};return l;function l(re){let he={type:"root",children:[]};const we={stack:[he],tokenStack:[],config:n,enter:f,exit:d,buffer:c,resume:y,data:i},Me=[];let Ue=-1;for(;++Ue<re.length;)if(re[Ue][1].type==="listOrdered"||re[Ue][1].type==="listUnordered")if(re[Ue][0]==="enter")Me.push(Ue);else{const Bt=Me.pop();Ue=o(re,Bt,Ue)}for(Ue=-1;++Ue<re.length;){const Bt=n[re[Ue][0]];sw.call(Bt,re[Ue][1].type)&&Bt[re[Ue][1].type].call(Object.assign({sliceSerialize:re[Ue][2].sliceSerialize},we),re[Ue][1])}if(we.tokenStack.length>0){const Bt=we.tokenStack[we.tokenStack.length-1];(Bt[1]||l1).call(we,void 0,Bt[0])}for(he.position={start:nr(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:nr(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},Ue=-1;++Ue<n.transforms.length;)he=n.transforms[Ue](he)||he;return he}function o(re,he,we){let Me=he-1,Ue=-1,Bt=!1,kn,Ct,ft,Dt;for(;++Me<=we;){const Ze=re[Me];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Ue++:Ue--,Dt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(kn&&!Dt&&!Ue&&!ft&&(ft=Me),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Ue&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Ue===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(kn){let Ln=Me;for(Ct=void 0;Ln--;){const Wt=re[Ln];if(Wt[1].type==="lineEnding"||Wt[1].type==="lineEndingBlank"){if(Wt[0]==="exit")continue;Ct&&(re[Ct][1].type="lineEndingBlank",Bt=!0),Wt[1].type="lineEnding",Ct=Ln}else if(!(Wt[1].type==="linePrefix"||Wt[1].type==="blockQuotePrefix"||Wt[1].type==="blockQuotePrefixWhitespace"||Wt[1].type==="blockQuoteMarker"||Wt[1].type==="listItemIndent"))break}ft&&(!Ct||ft<Ct)&&(kn._spread=!0),kn.end=Object.assign({},Ct?re[Ct][1].start:Ze[1].end),re.splice(Ct||Me,0,["exit",kn,Ze[2]]),Me++,we++}if(Ze[1].type==="listItemPrefix"){const Ln={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};kn=Ln,re.splice(Me,0,["enter",Ln,Ze[2]]),Me++,we++,ft=void 0,Dt=!0}}}return re[he][1]._spread=Bt,we}function u(re,he){return we;function we(Me){f.call(this,re(Me),Me),he&&he.call(this,Me)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(re,he,we){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([he,we||void 0]),re.position={start:nr(he.start),end:void 0}}function p(re){return he;function he(we){re&&re.call(this,we),d.call(this,we)}}function d(re,he){const we=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==re.type&&(he?he.call(this,re,Me[0]):(Me[1]||l1).call(this,re,Me[0]));else throw new Error("Cannot close `"+re.type+"` ("+no({start:re.start,end:re.end})+"): it’s not open");we.position.end=nr(re.end)}function y(){return vp(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function x(re){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function b(){const re=this.resume(),he=this.stack[this.stack.length-1];he.lang=re}function w(){const re=this.resume(),he=this.stack[this.stack.length-1];he.meta=re}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const re=this.resume(),he=this.stack[this.stack.length-1];he.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const re=this.resume(),he=this.stack[this.stack.length-1];he.value=re.replace(/(\r?\n|\r)$/g,"")}function j(re){const he=this.resume(),we=this.stack[this.stack.length-1];we.label=he,we.identifier=Rn(this.sliceSerialize(re)).toLowerCase()}function E(){const re=this.resume(),he=this.stack[this.stack.length-1];he.title=re}function D(){const re=this.resume(),he=this.stack[this.stack.length-1];he.url=re}function U(re){const he=this.stack[this.stack.length-1];if(!he.depth){const we=this.sliceSerialize(re).length;he.depth=we}}function z(){this.data.setextHeadingSlurpLineEnding=!0}function L(re){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(re){const we=this.stack[this.stack.length-1].children;let Me=we[we.length-1];(!Me||Me.type!=="text")&&(Me=St(),Me.position={start:nr(re.start),end:void 0},we.push(Me)),this.stack.push(Me)}function I(re){const he=this.stack.pop();he.value+=this.sliceSerialize(re),he.position.end=nr(re.end)}function Y(re){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=he.children[he.children.length-1];we.position.end=nr(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(he.type)&&(Q.call(this,re),I.call(this,re))}function X(){this.data.atHardBreak=!0}function te(){const re=this.resume(),he=this.stack[this.stack.length-1];he.value=re}function R(){const re=this.resume(),he=this.stack[this.stack.length-1];he.value=re}function B(){const re=this.resume(),he=this.stack[this.stack.length-1];he.value=re}function M(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=he,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function H(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=he,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function $(re){const he=this.sliceSerialize(re),we=this.stack[this.stack.length-2];we.label=ND(he),we.identifier=Rn(he).toLowerCase()}function P(){const re=this.stack[this.stack.length-1],he=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Me=re.children;we.children=Me}else we.alt=he}function A(){const re=this.resume(),he=this.stack[this.stack.length-1];he.url=re}function O(){const re=this.resume(),he=this.stack[this.stack.length-1];he.title=re}function V(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ne(re){const he=this.resume(),we=this.stack[this.stack.length-1];we.label=he,we.identifier=Rn(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function ue(re){this.data.characterReferenceType=re.type}function ce(re){const he=this.sliceSerialize(re),we=this.data.characterReferenceType;let Me;we?(Me=Jv(he,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=wp(he);const Ue=this.stack[this.stack.length-1];Ue.value+=Me}function de(re){const he=this.stack.pop();he.position.end=nr(re.end)}function se(re){I.call(this,re);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(re)}function pe(re){I.call(this,re);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(re)}function Ee(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function be(){return{type:"inlineCode",value:""}}function ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ze(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function ct(){return{type:"html",value:""}}function Jt(){return{type:"image",title:null,url:"",alt:null}}function zt(){return{type:"link",title:null,url:"",children:[]}}function qt(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function En(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function Pn(){return{type:"paragraph",children:[]}}function Kn(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function _i(){return{type:"thematicBreak"}}}function nr(e){return{line:e.line,column:e.column,offset:e.offset}}function uw(e,n){let i=-1;for(;++i<n.length;){const l=n[i];Array.isArray(l)?uw(e,l):zD(e,l)}}function zD(e,n){let i;for(i in n)if(sw.call(n,i))switch(i){case"canContainEols":{const l=n[i];l&&e[i].push(...l);break}case"transforms":{const l=n[i];l&&e[i].push(...l);break}case"enter":case"exit":{const l=n[i];l&&Object.assign(e[i],l);break}}}function l1(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+no({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+no({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+no({start:n.start,end:n.end})+") is still open")}function DD(e){const n=this;n.parser=i;function i(l){return AD(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function OD(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function RD(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
31
+ `}]}function jD(e,n){const i=n.value?n.value+`
32
+ `:"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:l,children:[{type:"text",value:i}]};return n.meta&&(u.data={meta:n.meta}),e.patch(n,u),u=e.applyData(n,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(n,u),u}function LD(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function BD(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function HD(e,n){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=Fl(l.toLowerCase()),u=e.footnoteOrder.indexOf(l);let c,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(l,f);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,p);const d={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(n,d),e.applyData(n,d)}function UD(e,n){const i={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function qD(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function cw(e,n){const i=n.referenceType;let l="]";if(i==="collapsed"?l+="[]":i==="full"&&(l+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=l:o.push({type:"text",value:l}),o}function ID(e,n){const i=String(n.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return cw(e,n);const o={src:Fl(l.url||""),alt:n.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,u),e.applyData(n,u)}function VD(e,n){const i={src:Fl(n.url)};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),n.title!==null&&n.title!==void 0&&(i.title=n.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function YD(e,n){const i={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,i);const l={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(n,l),e.applyData(n,l)}function XD(e,n){const i=String(n.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return cw(e,n);const o={href:Fl(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const u={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,u),e.applyData(n,u)}function $D(e,n){const i={href:Fl(n.url)};n.title!==null&&n.title!==void 0&&(i.title=n.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function FD(e,n,i){const l=e.all(n),o=i?GD(i):fw(n),u={},c=[];if(typeof n.checked=="boolean"){const y=l[0];let m;y&&y.type==="element"&&y.tagName==="p"?m=y:(m={type:"element",tagName:"p",properties:{},children:[]},l.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const y=l[f];(o||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
33
+ `}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const p=l[l.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
34
+ `});const d={type:"element",tagName:"li",properties:u,children:c};return e.patch(n,d),e.applyData(n,d)}function GD(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let l=-1;for(;!n&&++l<i.length;)n=fw(i[l])}return n}function fw(e){const n=e.spread;return n??e.children.length>1}function ZD(e,n){const i={},l=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++o<l.length;){const c=l[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(l,!0)};return e.patch(n,u),e.applyData(n,u)}function QD(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function PD(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function KD(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function JD(e,n){const i=e.all(n),l=i.shift(),o=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=gp(n.children[1]),p=Xv(n.children[n.children.length-1]);f&&p&&(c.position={start:f,end:p}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,u),e.applyData(n,u)}function WD(e,n,i){const l=i?i.children:void 0,u=(l?l.indexOf(n):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:n.children.length;let p=-1;const d=[];for(;++p<f;){const m=n.children[p],x={},b=c?c[p]:void 0;b&&(x.align=b);let w={type:"element",tagName:u,properties:x,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),d.push(w)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(n,y),e.applyData(n,y)}function eO(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const a1=9,o1=32;function tO(e){const n=String(e),i=/\r?\n|\r/g;let l=i.exec(n),o=0;const u=[];for(;l;)u.push(s1(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=i.exec(n);return u.push(s1(n.slice(o),o>0,!1)),u.join("")}function s1(e,n,i){let l=0,o=e.length;if(n){let u=e.codePointAt(l);for(;u===a1||u===o1;)l++,u=e.codePointAt(l)}if(i){let u=e.codePointAt(o-1);for(;u===a1||u===o1;)o--,u=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function nO(e,n){const i={type:"text",value:tO(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function iO(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const rO={blockquote:OD,break:RD,code:jD,delete:LD,emphasis:BD,footnoteReference:HD,heading:UD,html:qD,imageReference:ID,image:VD,inlineCode:YD,linkReference:XD,link:$D,listItem:FD,list:ZD,paragraph:QD,root:PD,strong:KD,table:JD,tableCell:eO,tableRow:WD,text:nO,thematicBreak:iO,toml:fu,yaml:fu,definition:fu,footnoteDefinition:fu};function fu(){}const dw=-1,ac=0,ro=1,Hu=2,Ep=3,kp=4,_p=5,Cp=6,hw=7,pw=8,u1=typeof self=="object"?self:globalThis,lO=(e,n)=>{const i=(o,u)=>(e.set(u,o),o),l=o=>{if(e.has(o))return e.get(o);const[u,c]=n[o];switch(u){case ac:case dw:return i(c,o);case ro:{const f=i([],o);for(const p of c)f.push(l(p));return f}case Hu:{const f=i({},o);for(const[p,d]of c)f[l(p)]=l(d);return f}case Ep:return i(new Date(c),o);case kp:{const{source:f,flags:p}=c;return i(new RegExp(f,p),o)}case _p:{const f=i(new Map,o);for(const[p,d]of c)f.set(l(p),l(d));return f}case Cp:{const f=i(new Set,o);for(const p of c)f.add(l(p));return f}case hw:{const{name:f,message:p}=c;return i(new u1[f](p),o)}case pw:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new u1[u](c),o)};return l},c1=e=>lO(new Map,e)(0),Nl="",{toString:aO}={},{keys:oO}=Object,Qa=e=>{const n=typeof e;if(n!=="object"||!e)return[ac,n];const i=aO.call(e).slice(8,-1);switch(i){case"Array":return[ro,Nl];case"Object":return[Hu,Nl];case"Date":return[Ep,Nl];case"RegExp":return[kp,Nl];case"Map":return[_p,Nl];case"Set":return[Cp,Nl];case"DataView":return[ro,i]}return i.includes("Array")?[ro,i]:i.includes("Error")?[hw,i]:[Hu,i]},du=([e,n])=>e===ac&&(n==="function"||n==="symbol"),sO=(e,n,i,l)=>{const o=(c,f)=>{const p=l.push(c)-1;return i.set(f,p),p},u=c=>{if(i.has(c))return i.get(c);let[f,p]=Qa(c);switch(f){case ac:{let y=c;switch(p){case"bigint":f=pw,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return o([dw],c)}return o([f,y],c)}case ro:{if(p){let x=c;return p==="DataView"?x=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(x=new Uint8Array(c)),o([p,[...x]],c)}const y=[],m=o([f,y],c);for(const x of c)y.push(u(x));return m}case Hu:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(n&&"toJSON"in c)return u(c.toJSON());const y=[],m=o([f,y],c);for(const x of oO(c))(e||!du(Qa(c[x])))&&y.push([u(x),u(c[x])]);return m}case Ep:return o([f,c.toISOString()],c);case kp:{const{source:y,flags:m}=c;return o([f,{source:y,flags:m}],c)}case _p:{const y=[],m=o([f,y],c);for(const[x,b]of c)(e||!(du(Qa(x))||du(Qa(b))))&&y.push([u(x),u(b)]);return m}case Cp:{const y=[],m=o([f,y],c);for(const x of c)(e||!du(Qa(x)))&&y.push(u(x));return m}}const{message:d}=c;return o([f,{name:p,message:d}],c)};return u},f1=(e,{json:n,lossy:i}={})=>{const l=[];return sO(!(n||i),!!n,new Map,l)(e),l},Uu=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?c1(f1(e,n)):structuredClone(e):(e,n)=>c1(f1(e,n));function uO(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function cO(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function fO(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||uO,l=e.options.footnoteBackLabel||cO,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[p]);if(!d)continue;const y=e.all(d),m=String(d.identifier).toUpperCase(),x=Fl(m.toLowerCase());let b=0;const w=[],_=e.footnoteCounts.get(m);for(;_!==void 0&&++b<=_;){w.length>0&&w.push({type:"text",value:" "});let j=typeof i=="string"?i:i(p,b);typeof j=="string"&&(j={type:"text",value:j}),w.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(p,b),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const C=y[y.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const j=C.children[C.children.length-1];j&&j.type==="text"?j.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...w)}else y.push(...w);const k={type:"element",tagName:"li",properties:{id:n+"fn-"+x},children:e.wrap(y,!0)};e.patch(d,k),f.push(k)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Uu(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
35
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
36
+ `}]}}const oc=(function(e){if(e==null)return mO;if(typeof e=="function")return sc(e);if(typeof e=="object")return Array.isArray(e)?dO(e):hO(e);if(typeof e=="string")return pO(e);throw new Error("Expected function, string, or object as test")});function dO(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=oc(e[i]);return sc(l);function l(...o){let u=-1;for(;++u<n.length;)if(n[u].apply(this,o))return!0;return!1}}function hO(e){const n=e;return sc(i);function i(l){const o=l;let u;for(u in e)if(o[u]!==n[u])return!1;return!0}}function pO(e){return sc(n);function n(i){return i&&i.type===e}}function sc(e){return n;function n(i,l,o){return!!(gO(i)&&e.call(this,i,typeof l=="number"?l:void 0,o||void 0))}}function mO(){return!0}function gO(e){return e!==null&&typeof e=="object"&&"type"in e}const mw=[],yO=!0,jh=!1,xO="skip";function gw(e,n,i,l){let o;typeof n=="function"&&typeof i!="function"?(l=i,i=n):o=n;const u=oc(o),c=l?-1:1;f(e,void 0,[])();function f(p,d,y){const m=p&&typeof p=="object"?p:{};if(typeof m.type=="string"){const b=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=mw,w,_,C;if((!n||u(p,d,y[y.length-1]||void 0))&&(b=bO(i(p,y)),b[0]===jh))return b;if("children"in p&&p.children){const k=p;if(k.children&&b[0]!==xO)for(_=(l?k.children.length:-1)+c,C=y.concat(k);_>-1&&_<k.children.length;){const j=k.children[_];if(w=f(j,_,C)(),w[0]===jh)return w;_=typeof w[1]=="number"?w[1]:_+c}}return b}}}function bO(e){return Array.isArray(e)?e:typeof e=="number"?[yO,e]:e==null?mw:[e]}function Np(e,n,i,l){let o,u,c;typeof n=="function"&&typeof i!="function"?(u=void 0,c=n,o=i):(u=n,c=i,o=l),gw(e,u,f,o);function f(p,d){const y=d[d.length-1],m=y?y.children.indexOf(p):void 0;return c(p,m,y)}}const Lh={}.hasOwnProperty,vO={};function wO(e,n){const i=n||vO,l=new Map,o=new Map,u=new Map,c={...rO,...i.handlers},f={all:d,applyData:EO,definitionById:l,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:i,patch:SO,wrap:_O};return Np(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const m=y.type==="definition"?l:o,x=String(y.identifier).toUpperCase();m.has(x)||m.set(x,y)}}),f;function p(y,m){const x=y.type,b=f.handlers[x];if(Lh.call(f.handlers,x)&&b)return b(f,y,m);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in y){const{children:_,...C}=y,k=Uu(C);return k.children=f.all(y),k}return Uu(y)}return(f.options.unknownHandler||kO)(f,y,m)}function d(y){const m=[];if("children"in y){const x=y.children;let b=-1;for(;++b<x.length;){const w=f.one(x[b],y);if(w){if(b&&x[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=d1(w.value)),!Array.isArray(w)&&w.type==="element")){const _=w.children[0];_&&_.type==="text"&&(_.value=d1(_.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function SO(e,n){e.position&&(n.position=cz(e))}function EO(e,n){let i=n;if(e&&e.data){const l=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof l=="string")if(i.type==="element")i.tagName=l;else{const c="children"in i?i.children:[i];i={type:"element",tagName:l,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,Uu(u)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function kO(e,n){const i=n.data||{},l="value"in n&&!(Lh.call(i,"hProperties")||Lh.call(i,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function _O(e,n){const i=[];let l=-1;for(n&&i.push({type:"text",value:`
37
+ `});++l<e.length;)l&&i.push({type:"text",value:`
38
+ `}),i.push(e[l]);return n&&e.length>0&&i.push({type:"text",value:`
39
+ `}),i}function d1(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function h1(e,n){const i=wO(e,n),l=i.one(e,void 0),o=fO(i),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
40
+ `},o),u}function CO(e,n){return e&&"run"in e?async function(i,l){const o=h1(i,{file:l,...n});await e.run(o,l)}:function(i,l){return h1(i,{file:l,...e||n})}}function p1(e){if(e)throw e}var Qd,m1;function NO(){if(m1)return Qd;m1=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},u=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var y=e.call(d,"constructor"),m=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!y&&!m)return!1;var x;for(x in d);return typeof x>"u"||e.call(d,x)},c=function(d,y){i&&y.name==="__proto__"?i(d,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):d[y.name]=y.newValue},f=function(d,y){if(y==="__proto__")if(e.call(d,y)){if(l)return l(d,y).value}else return;return d[y]};return Qd=function p(){var d,y,m,x,b,w,_=arguments[0],C=1,k=arguments.length,j=!1;for(typeof _=="boolean"&&(j=_,_=arguments[1]||{},C=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});C<k;++C)if(d=arguments[C],d!=null)for(y in d)m=f(_,y),x=f(d,y),_!==x&&(j&&x&&(u(x)||(b=o(x)))?(b?(b=!1,w=m&&o(m)?m:[]):w=m&&u(m)?m:{},c(_,{name:y,newValue:p(j,w,x)})):typeof x<"u"&&c(_,{name:y,newValue:x}));return _},Qd}var TO=NO();const Pd=Iu(TO);function Bh(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function AO(){const e=[],n={run:i,use:l};return n;function i(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(p,...d){const y=e[++u];let m=-1;if(p){c(p);return}for(;++m<o.length;)(d[m]===null||d[m]===void 0)&&(d[m]=o[m]);o=d,y?MO(y,f)(...d):c(null,...d)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function MO(e,n){let i;return l;function l(...c){const f=e.length>c.length;let p;f&&c.push(o);try{p=e.apply(this,c)}catch(d){const y=d;if(f&&i)throw y;return o(y)}f||(p&&p.then&&typeof p.then=="function"?p.then(u,o):p instanceof Error?o(p):u(p))}function o(c,...f){i||(i=!0,n(c,...f))}function u(c){o(null,c)}}const Vn={basename:zO,dirname:DO,extname:OO,join:RO,sep:"/"};function zO(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Mo(e);let i=0,l=-1,o=e.length,u;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else l<0&&(u=!0,l=o+1);return l<0?"":e.slice(i,l)}if(n===e)return"";let c=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else c<0&&(u=!0,c=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(l=o):(f=-1,l=c));return i===l?l=c:l<0&&(l=e.length),e.slice(i,l)}function DO(e){if(Mo(e),e.length===0)return".";let n=-1,i=e.length,l;for(;--i;)if(e.codePointAt(i)===47){if(l){n=i;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function OO(e){Mo(e);let n=e.length,i=-1,l=0,o=-1,u=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){l=n+1;break}continue}i<0&&(c=!0,i=n+1),f===46?o<0?o=n:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||i<0||u===0||u===1&&o===i-1&&o===l+1?"":e.slice(o,i)}function RO(...e){let n=-1,i;for(;++n<e.length;)Mo(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":jO(i)}function jO(e){Mo(e);const n=e.codePointAt(0)===47;let i=LO(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function LO(e,n){let i="",l=0,o=-1,u=0,c=-1,f,p;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(i.length<2||l!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",l=0):(i=i.slice(0,p),l=i.length-1-i.lastIndexOf("/")),o=c,u=0;continue}}else if(i.length>0){i="",l=0,o=c,u=0;continue}}n&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),l=c-o-1;o=c,u=0}else f===46&&u>-1?u++:u=-1}return i}function Mo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const BO={cwd:HO};function HO(){return"/"}function Hh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function UO(e){if(typeof e=="string")e=new URL(e);else if(!Hh(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return qO(e)}function qO(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const l=n.codePointAt(i+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const Kd=["history","path","basename","stem","extname","dirname"];class yw{constructor(n){let i;n?Hh(n)?i={path:n}:typeof n=="string"||IO(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":BO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Kd.length;){const u=Kd[l];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let o;for(o in i)Kd.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Vn.basename(this.path):void 0}set basename(n){Wd(n,"basename"),Jd(n,"basename"),this.path=Vn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Vn.dirname(this.path):void 0}set dirname(n){g1(this.basename,"dirname"),this.path=Vn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Vn.extname(this.path):void 0}set extname(n){if(Jd(n,"extname"),g1(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Hh(n)&&(n=UO(n)),Wd(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Vn.basename(this.path,this.extname):void 0}set stem(n){Wd(n,"stem"),Jd(n,"stem"),this.path=Vn.join(this.dirname||"",n+(this.extname||""))}fail(n,i,l){const o=this.message(n,i,l);throw o.fatal=!0,o}info(n,i,l){const o=this.message(n,i,l);return o.fatal=void 0,o}message(n,i,l){const o=new Lt(n,i,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Jd(e,n){if(e&&e.includes(Vn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Vn.sep+"`")}function Wd(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function g1(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function IO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const VO=(function(e){const l=this.constructor.prototype,o=l[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,l),u}),YO={}.hasOwnProperty;class Tp extends VO{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=AO()}copy(){const n=new Tp;let i=-1;for(;++i<this.attachers.length;){const l=this.attachers[i];n.use(...l)}return n.data(Pd(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(nh("data",this.frozen),this.namespace[n]=i,this):YO.call(this.namespace,n)&&this.namespace[n]||void 0:n?(nh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=i.call(n,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=hu(n),l=this.parser||this.Parser;return eh("parse",l),l(String(i),i)}process(n,i){const l=this;return this.freeze(),eh("process",this.parser||this.Parser),th("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const f=hu(n),p=l.parse(f);l.run(p,f,function(y,m,x){if(y||!m||!x)return d(y);const b=m,w=l.stringify(b,x);FO(w)?x.value=w:x.result=w,d(y,x)});function d(y,m){y||!m?c(y):u?u(m):i(void 0,m)}}}processSync(n){let i=!1,l;return this.freeze(),eh("processSync",this.parser||this.Parser),th("processSync",this.compiler||this.Compiler),this.process(n,o),x1("processSync","process",i),l;function o(u,c){i=!0,p1(u),l=c}}run(n,i,l){y1(n),this.freeze();const o=this.transformers;return!l&&typeof i=="function"&&(l=i,i=void 0),l?u(void 0,l):new Promise(u);function u(c,f){const p=hu(i);o.run(n,p,d);function d(y,m,x){const b=m||n;y?f(y):c?c(b):l(void 0,b,x)}}}runSync(n,i){let l=!1,o;return this.run(n,i,u),x1("runSync","run",l),o;function u(c,f){p1(c),o=f,l=!0}}stringify(n,i){this.freeze();const l=hu(i),o=this.compiler||this.Compiler;return th("stringify",o),y1(n),o(n,l)}use(n,...i){const l=this.attachers,o=this.namespace;if(nh("use",this.frozen),n!=null)if(typeof n=="function")p(n,i);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function u(d){if(typeof d=="function")p(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[y,...m]=d;p(y,m)}else c(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function c(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(d.plugins),d.settings&&(o.settings=Pd(!0,o.settings,d.settings))}function f(d){let y=-1;if(d!=null)if(Array.isArray(d))for(;++y<d.length;){const m=d[y];u(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function p(d,y){let m=-1,x=-1;for(;++m<l.length;)if(l[m][0]===d){x=m;break}if(x===-1)l.push([d,...y]);else if(y.length>0){let[b,...w]=y;const _=l[x][1];Bh(_)&&Bh(b)&&(b=Pd(!0,_,b)),l[x]=[d,b,...w]}}}}const XO=new Tp().freeze();function eh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function th(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function nh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function y1(e){if(!Bh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function x1(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function hu(e){return $O(e)?e:new yw(e)}function $O(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function FO(e){return typeof e=="string"||GO(e)}function GO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ZO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",b1=[],v1={allowDangerousHtml:!0},QO=/^(https?|ircs?|mailto|xmpp)$/i,PO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function KO(e){const n=JO(e),i=WO(e);return eR(n.runSync(n.parse(i),i),e)}function JO(e){const n=e.rehypePlugins||b1,i=e.remarkPlugins||b1,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...v1}:v1;return XO().use(DD).use(i).use(CO,l).use(n)}function WO(e){const n=e.children||"",i=new yw;return typeof n=="string"&&(i.value=n),i}function eR(e,n){const i=n.allowedElements,l=n.allowElement,o=n.components,u=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,p=n.urlTransform||tR;for(const y of PO)Object.hasOwn(n,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+ZO+y.id,void 0);return Np(e,d),mz(e,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function d(y,m,x){if(y.type==="raw"&&x&&typeof m=="number")return c?x.children.splice(m,1):x.children[m]={type:"text",value:y.value},m;if(y.type==="element"){let b;for(b in Fd)if(Object.hasOwn(Fd,b)&&Object.hasOwn(y.properties,b)){const w=y.properties[b],_=Fd[b];(_===null||_.includes(y.tagName))&&(y.properties[b]=p(String(w||""),b,y))}}if(y.type==="element"){let b=i?!i.includes(y.tagName):u?u.includes(y.tagName):!1;if(!b&&l&&typeof m=="number"&&(b=!l(y,m,x)),b&&x&&typeof m=="number")return f&&y.children?x.children.splice(m,1,...y.children):x.children.splice(m,1),m}}}function tR(e){const n=e.indexOf(":"),i=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||i!==-1&&n>i||l!==-1&&n>l||QO.test(e.slice(0,n))?e:""}function w1(e,n){const i=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,o=i.indexOf(n);for(;o!==-1;)l++,o=i.indexOf(n,o+n.length);return l}function nR(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function iR(e,n,i){const o=oc((i||{}).ignore||[]),u=rR(n);let c=-1;for(;++c<u.length;)gw(e,"text",f);function f(d,y){let m=-1,x;for(;++m<y.length;){const b=y[m],w=x?x.children:void 0;if(o(b,w?w.indexOf(b):void 0,x))return;x=b}if(x)return p(d,y)}function p(d,y){const m=y[y.length-1],x=u[c][0],b=u[c][1];let w=0;const C=m.children.indexOf(d);let k=!1,j=[];x.lastIndex=0;let E=x.exec(d.value);for(;E;){const D=E.index,U={index:E.index,input:E.input,stack:[...y,d]};let z=b(...E,U);if(typeof z=="string"&&(z=z.length>0?{type:"text",value:z}:void 0),z===!1?x.lastIndex=D+1:(w!==D&&j.push({type:"text",value:d.value.slice(w,D)}),Array.isArray(z)?j.push(...z):z&&j.push(z),w=D+E[0].length,k=!0),!x.global)break;E=x.exec(d.value)}return k?(w<d.value.length&&j.push({type:"text",value:d.value.slice(w)}),m.children.splice(C,1,...j)):j=[d],C+j.length}}function rR(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<i.length;){const o=i[l];n.push([lR(o[0]),aR(o[1])])}return n}function lR(e){return typeof e=="string"?new RegExp(nR(e),"g"):e}function aR(e){return typeof e=="function"?e:function(){return e}}const ih="phrasing",rh=["autolink","link","image","label"];function oR(){return{transforms:[pR],enter:{literalAutolink:uR,literalAutolinkEmail:lh,literalAutolinkHttp:lh,literalAutolinkWww:lh},exit:{literalAutolink:hR,literalAutolinkEmail:dR,literalAutolinkHttp:cR,literalAutolinkWww:fR}}}function sR(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ih,notInConstruct:rh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ih,notInConstruct:rh},{character:":",before:"[ps]",after:"\\/",inConstruct:ih,notInConstruct:rh}]}}function uR(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lh(e){this.config.enter.autolinkProtocol.call(this,e)}function cR(e){this.config.exit.autolinkProtocol.call(this,e)}function fR(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function dR(e){this.config.exit.autolinkEmail.call(this,e)}function hR(e){this.exit(e)}function pR(e){iR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,mR],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),gR]],{ignore:["link","linkReference"]})}function mR(e,n,i,l,o){let u="";if(!xw(o)||(/^w/i.test(n)&&(i=n+i,n="",u="http://"),!yR(i)))return!1;const c=xR(i+l);if(!c[0])return!1;const f={type:"link",title:null,url:u+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function gR(e,n,i,l){return!xw(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+i,children:[{type:"text",value:n+"@"+i}]}}function yR(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function xR(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let i=n[0],l=i.indexOf(")");const o=w1(e,"(");let u=w1(e,")");for(;l!==-1&&o>u;)e+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),u++;return[e,i]}function xw(e,n){const i=e.input.charCodeAt(e.index-1);return(e.index===0||Br(i)||rc(i))&&(!n||i!==47)}bw.peek=NR;function bR(){this.buffer()}function vR(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wR(){this.buffer()}function SR(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ER(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Rn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function kR(e){this.exit(e)}function _R(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Rn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function CR(e){this.exit(e)}function NR(){return"["}function bw(e,n,i,l){const o=i.createTracker(l);let u=o.move("[^");const c=i.enter("footnoteReference"),f=i.enter("reference");return u+=o.move(i.safe(i.associationId(e),{after:"]",before:u})),f(),c(),u+=o.move("]"),u}function TR(){return{enter:{gfmFootnoteCallString:bR,gfmFootnoteCall:vR,gfmFootnoteDefinitionLabelString:wR,gfmFootnoteDefinition:SR},exit:{gfmFootnoteCallString:ER,gfmFootnoteCall:kR,gfmFootnoteDefinitionLabelString:_R,gfmFootnoteDefinition:CR}}}function AR(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:i,footnoteReference:bw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(l,o,u,c){const f=u.createTracker(c);let p=f.move("[^");const d=u.enter("footnoteDefinition"),y=u.enter("label");return p+=f.move(u.safe(u.associationId(l),{before:p,after:"]"})),y(),p+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),p+=f.move((n?`
41
+ `:" ")+u.indentLines(u.containerFlow(l,f.current()),n?vw:MR))),d(),p}}function MR(e,n,i){return n===0?e:vw(e,n,i)}function vw(e,n,i){return(i?"":" ")+e}const zR=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ww.peek=LR;function DR(){return{canContainEols:["delete"],enter:{strikethrough:RR},exit:{strikethrough:jR}}}function OR(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zR}],handlers:{delete:ww}}}function RR(e){this.enter({type:"delete",children:[]},e)}function jR(e){this.exit(e)}function ww(e,n,i,l){const o=i.createTracker(l),u=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function LR(){return"~"}function BR(e){return e.length}function HR(e,n){const i=n||{},l=(i.align||[]).concat(),o=i.stringLength||BR,u=[],c=[],f=[],p=[];let d=0,y=-1;for(;++y<e.length;){const _=[],C=[];let k=-1;for(e[y].length>d&&(d=e[y].length);++k<e[y].length;){const j=UR(e[y][k]);if(i.alignDelimiters!==!1){const E=o(j);C[k]=E,(p[k]===void 0||E>p[k])&&(p[k]=E)}_.push(j)}c[y]=_,f[y]=C}let m=-1;if(typeof l=="object"&&"length"in l)for(;++m<d;)u[m]=S1(l[m]);else{const _=S1(l);for(;++m<d;)u[m]=_}m=-1;const x=[],b=[];for(;++m<d;){const _=u[m];let C="",k="";_===99?(C=":",k=":"):_===108?C=":":_===114&&(k=":");let j=i.alignDelimiters===!1?1:Math.max(1,p[m]-C.length-k.length);const E=C+"-".repeat(j)+k;i.alignDelimiters!==!1&&(j=C.length+j+k.length,j>p[m]&&(p[m]=j),b[m]=j),x[m]=E}c.splice(1,0,x),f.splice(1,0,b),y=-1;const w=[];for(;++y<c.length;){const _=c[y],C=f[y];m=-1;const k=[];for(;++m<d;){const j=_[m]||"";let E="",D="";if(i.alignDelimiters!==!1){const U=p[m]-(C[m]||0),z=u[m];z===114?E=" ".repeat(U):z===99?U%2?(E=" ".repeat(U/2+.5),D=" ".repeat(U/2-.5)):(E=" ".repeat(U/2),D=E):D=" ".repeat(U)}i.delimiterStart!==!1&&!m&&k.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&j==="")&&(i.delimiterStart!==!1||m)&&k.push(" "),i.alignDelimiters!==!1&&k.push(E),k.push(j),i.alignDelimiters!==!1&&k.push(D),i.padding!==!1&&k.push(" "),(i.delimiterEnd!==!1||m!==d-1)&&k.push("|")}w.push(i.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return w.join(`
42
+ `)}function UR(e){return e==null?"":String(e)}function S1(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function qR(e,n,i,l){const o=i.enter("blockquote"),u=i.createTracker(l);u.move("> "),u.shift(2);const c=i.indentLines(i.containerFlow(e,u.current()),IR);return o(),c}function IR(e,n,i){return">"+(i?"":" ")+e}function VR(e,n){return E1(e,n.inConstruct,!0)&&!E1(e,n.notInConstruct,!1)}function E1(e,n,i){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return i;let l=-1;for(;++l<n.length;)if(e.includes(n[l]))return!0;return!1}function k1(e,n,i,l){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
43
+ `&&VR(i.stack,i.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
44
+ `}function YR(e,n){const i=String(e);let l=i.indexOf(n),o=l,u=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++u>c&&(c=u):u=1,o=l+n.length,l=i.indexOf(n,o);return c}function XR(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function $R(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function FR(e,n,i,l){const o=$R(i),u=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(XR(e,i)){const m=i.enter("codeIndented"),x=i.indentLines(u,GR);return m(),x}const f=i.createTracker(l),p=o.repeat(Math.max(YR(u,o)+1,3)),d=i.enter("codeFenced");let y=f.move(p);if(e.lang){const m=i.enter(`codeFencedLang${c}`);y+=f.move(i.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),m()}if(e.lang&&e.meta){const m=i.enter(`codeFencedMeta${c}`);y+=f.move(" "),y+=f.move(i.safe(e.meta,{before:y,after:`
45
+ `,encode:["`"],...f.current()})),m()}return y+=f.move(`
46
+ `),u&&(y+=f.move(u+`
47
+ `)),y+=f.move(p),d(),y}function GR(e,n,i){return(i?"":" ")+e}function Ap(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function ZR(e,n,i,l){const o=Ap(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("definition");let f=i.enter("label");const p=i.createTracker(l);let d=p.move("[");return d+=p.move(i.safe(i.associationId(e),{before:d,after:"]",...p.current()})),d+=p.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(i.safe(e.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(f=i.enter("destinationRaw"),d+=p.move(i.safe(e.url,{before:d,after:e.title?" ":`
48
+ `,...p.current()}))),f(),e.title&&(f=i.enter(`title${u}`),d+=p.move(" "+o),d+=p.move(i.safe(e.title,{before:d,after:o,...p.current()})),d+=p.move(o),f()),c(),d}function QR(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function xo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qu(e,n,i){const l=Vl(e),o=Vl(n);return l===void 0?o===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Sw.peek=PR;function Sw(e,n,i,l){const o=QR(i),u=i.enter("emphasis"),c=i.createTracker(l),f=c.move(o);let p=c.move(i.containerPhrasing(e,{after:o,before:f,...c.current()}));const d=p.charCodeAt(0),y=qu(l.before.charCodeAt(l.before.length-1),d,o);y.inside&&(p=xo(d)+p.slice(1));const m=p.charCodeAt(p.length-1),x=qu(l.after.charCodeAt(0),m,o);x.inside&&(p=p.slice(0,-1)+xo(m));const b=c.move(o);return u(),i.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+p+b}function PR(e,n,i){return i.options.emphasis||"*"}function KR(e,n){let i=!1;return Np(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return i=!0,jh}),!!((!e.depth||e.depth<3)&&vp(e)&&(n.options.setext||i))}function JR(e,n,i,l){const o=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(l);if(KR(e,i)){const y=i.enter("headingSetext"),m=i.enter("phrasing"),x=i.containerPhrasing(e,{...u.current(),before:`
49
+ `,after:`
50
+ `});return m(),y(),x+`
51
+ `+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
52
+ `))+1))}const c="#".repeat(o),f=i.enter("headingAtx"),p=i.enter("phrasing");u.move(c+" ");let d=i.containerPhrasing(e,{before:"# ",after:`
53
+ `,...u.current()});return/^[\t ]/.test(d)&&(d=xo(d.charCodeAt(0))+d.slice(1)),d=d?c+" "+d:c,i.options.closeAtx&&(d+=" "+c),p(),f(),d}Ew.peek=WR;function Ew(e){return e.value||""}function WR(){return"<"}kw.peek=e6;function kw(e,n,i,l){const o=Ap(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let f=i.enter("label");const p=i.createTracker(l);let d=p.move("![");return d+=p.move(i.safe(e.alt,{before:d,after:"]",...p.current()})),d+=p.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(i.safe(e.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(f=i.enter("destinationRaw"),d+=p.move(i.safe(e.url,{before:d,after:e.title?" ":")",...p.current()}))),f(),e.title&&(f=i.enter(`title${u}`),d+=p.move(" "+o),d+=p.move(i.safe(e.title,{before:d,after:o,...p.current()})),d+=p.move(o),f()),d+=p.move(")"),c(),d}function e6(){return"!"}_w.peek=t6;function _w(e,n,i,l){const o=e.referenceType,u=i.enter("imageReference");let c=i.enter("label");const f=i.createTracker(l);let p=f.move("![");const d=i.safe(e.alt,{before:p,after:"]",...f.current()});p+=f.move(d+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const m=i.safe(i.associationId(e),{before:p,after:"]",...f.current()});return c(),i.stack=y,u(),o==="full"||!d||d!==m?p+=f.move(m+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function t6(){return"!"}Cw.peek=n6;function Cw(e,n,i){let l=e.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++u<i.unsafe.length;){const c=i.unsafe[u],f=i.compilePattern(c);let p;if(c.atBreak)for(;p=f.exec(l);){let d=p.index;l.charCodeAt(d)===10&&l.charCodeAt(d-1)===13&&d--,l=l.slice(0,d)+" "+l.slice(p.index+1)}}return o+l+o}function n6(){return"`"}function Nw(e,n){const i=vp(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Tw.peek=i6;function Tw(e,n,i,l){const o=Ap(i),u=o==='"'?"Quote":"Apostrophe",c=i.createTracker(l);let f,p;if(Nw(e,i)){const y=i.stack;i.stack=[],f=i.enter("autolink");let m=c.move("<");return m+=c.move(i.containerPhrasing(e,{before:m,after:">",...c.current()})),m+=c.move(">"),f(),i.stack=y,m}f=i.enter("link"),p=i.enter("label");let d=c.move("[");return d+=c.move(i.containerPhrasing(e,{before:d,after:"](",...c.current()})),d+=c.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=i.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(i.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(p=i.enter("destinationRaw"),d+=c.move(i.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),p(),e.title&&(p=i.enter(`title${u}`),d+=c.move(" "+o),d+=c.move(i.safe(e.title,{before:d,after:o,...c.current()})),d+=c.move(o),p()),d+=c.move(")"),f(),d}function i6(e,n,i){return Nw(e,i)?"<":"["}Aw.peek=r6;function Aw(e,n,i,l){const o=e.referenceType,u=i.enter("linkReference");let c=i.enter("label");const f=i.createTracker(l);let p=f.move("[");const d=i.containerPhrasing(e,{before:p,after:"]",...f.current()});p+=f.move(d+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const m=i.safe(i.associationId(e),{before:p,after:"]",...f.current()});return c(),i.stack=y,u(),o==="full"||!d||d!==m?p+=f.move(m+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function r6(){return"["}function Mp(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function l6(e){const n=Mp(e),i=e.options.bulletOther;if(!i)return n==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+i+"`) to be different");return i}function a6(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Mw(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function o6(e,n,i,l){const o=i.enter("list"),u=i.bulletCurrent;let c=e.ordered?a6(i):Mp(i);const f=e.ordered?c==="."?")":".":l6(i);let p=n&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),Mw(i)===c&&y){let m=-1;for(;++m<e.children.length;){const x=e.children[m];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=f),i.bulletCurrent=c;const d=i.containerFlow(e,l);return i.bulletLastUsed=c,i.bulletCurrent=u,o(),d}function s6(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function u6(e,n,i,l){const o=s6(i);let u=i.bulletCurrent||Mp(i);n&&n.type==="list"&&n.ordered&&(u=(typeof n.start=="number"&&n.start>-1?n.start:1)+(i.options.incrementListMarker===!1?0:n.children.indexOf(e))+u);let c=u.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=i.createTracker(l);f.move(u+" ".repeat(c-u.length)),f.shift(c);const p=i.enter("listItem"),d=i.indentLines(i.containerFlow(e,f.current()),y);return p(),d;function y(m,x,b){return x?(b?"":" ".repeat(c))+m:(b?u:u+" ".repeat(c-u.length))+m}}function c6(e,n,i,l){const o=i.enter("paragraph"),u=i.enter("phrasing"),c=i.containerPhrasing(e,l);return u(),o(),c}const f6=oc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function d6(e,n,i,l){return(e.children.some(function(c){return f6(c)})?i.containerPhrasing:i.containerFlow).call(i,e,l)}function h6(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}zw.peek=p6;function zw(e,n,i,l){const o=h6(i),u=i.enter("strong"),c=i.createTracker(l),f=c.move(o+o);let p=c.move(i.containerPhrasing(e,{after:o,before:f,...c.current()}));const d=p.charCodeAt(0),y=qu(l.before.charCodeAt(l.before.length-1),d,o);y.inside&&(p=xo(d)+p.slice(1));const m=p.charCodeAt(p.length-1),x=qu(l.after.charCodeAt(0),m,o);x.inside&&(p=p.slice(0,-1)+xo(m));const b=c.move(o+o);return u(),i.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+p+b}function p6(e,n,i){return i.options.strong||"*"}function m6(e,n,i,l){return i.safe(e.value,l)}function g6(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function y6(e,n,i){const l=(Mw(i)+(i.options.ruleSpaces?" ":"")).repeat(g6(i));return i.options.ruleSpaces?l.slice(0,-1):l}const Dw={blockquote:qR,break:k1,code:FR,definition:ZR,emphasis:Sw,hardBreak:k1,heading:JR,html:Ew,image:kw,imageReference:_w,inlineCode:Cw,link:Tw,linkReference:Aw,list:o6,listItem:u6,paragraph:c6,root:d6,strong:zw,text:m6,thematicBreak:y6};function x6(){return{enter:{table:b6,tableData:_1,tableHeader:_1,tableRow:w6},exit:{codeText:S6,table:v6,tableData:ah,tableHeader:ah,tableRow:ah}}}function b6(e){const n=e._align;this.enter({type:"table",align:n.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function v6(e){this.exit(e),this.data.inTable=void 0}function w6(e){this.enter({type:"tableRow",children:[]},e)}function ah(e){this.exit(e)}function _1(e){this.enter({type:"tableCell",children:[]},e)}function S6(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,E6));const i=this.stack[this.stack.length-1];i.type,i.value=n,this.exit(e)}function E6(e,n){return n==="|"?n:e}function k6(e){const n=e||{},i=n.tableCellPadding,l=n.tablePipeAlign,o=n.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
54
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:p,tableRow:f}};function c(b,w,_,C){return d(y(b,_,C),b.align)}function f(b,w,_,C){const k=m(b,_,C),j=d([k]);return j.slice(0,j.indexOf(`
55
+ `))}function p(b,w,_,C){const k=_.enter("tableCell"),j=_.enter("phrasing"),E=_.containerPhrasing(b,{...C,before:u,after:u});return j(),k(),E}function d(b,w){return HR(b,{align:w,alignDelimiters:l,padding:i,stringLength:o})}function y(b,w,_){const C=b.children;let k=-1;const j=[],E=w.enter("table");for(;++k<C.length;)j[k]=m(C[k],w,_);return E(),j}function m(b,w,_){const C=b.children;let k=-1;const j=[],E=w.enter("tableRow");for(;++k<C.length;)j[k]=p(C[k],b,w,_);return E(),j}function x(b,w,_){let C=Dw.inlineCode(b,w,_);return _.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function _6(){return{exit:{taskListCheckValueChecked:C1,taskListCheckValueUnchecked:C1,paragraph:N6}}}function C6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:T6}}}function C1(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function N6(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const l=i.children[0];if(l&&l.type==="text"){const o=n.children;let u=-1,c;for(;++u<o.length;){const f=o[u];if(f.type==="paragraph"){c=f;break}}c===i&&(l.value=l.value.slice(1),l.value.length===0?i.children.shift():i.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,i.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function T6(e,n,i,l){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=i.createTracker(l);u&&f.move(c);let p=Dw.listItem(e,n,i,{...l,...f.current()});return u&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),p;function d(y){return y+c}}function A6(){return[oR(),TR(),DR(),x6(),_6()]}function M6(e){return{extensions:[sR(),AR(e),OR(),k6(e),C6()]}}const z6={tokenize:B6,partial:!0},Ow={tokenize:H6,partial:!0},Rw={tokenize:U6,partial:!0},jw={tokenize:q6,partial:!0},D6={tokenize:I6,partial:!0},Lw={name:"wwwAutolink",tokenize:j6,previous:Hw},Bw={name:"protocolAutolink",tokenize:L6,previous:Uw},ki={name:"emailAutolink",tokenize:R6,previous:qw},Qn={};function O6(){return{text:Qn}}let Tr=48;for(;Tr<123;)Qn[Tr]=ki,Tr++,Tr===58?Tr=65:Tr===91&&(Tr=97);Qn[43]=ki;Qn[45]=ki;Qn[46]=ki;Qn[95]=ki;Qn[72]=[ki,Bw];Qn[104]=[ki,Bw];Qn[87]=[ki,Lw];Qn[119]=[ki,Lw];function R6(e,n,i){const l=this;let o,u;return c;function c(m){return!Uh(m)||!qw.call(l,l.previous)||zp(l.events)?i(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(m))}function f(m){return Uh(m)?(e.consume(m),f):m===64?(e.consume(m),p):i(m)}function p(m){return m===46?e.check(D6,y,d)(m):m===45||m===95||jt(m)?(u=!0,e.consume(m),p):y(m)}function d(m){return e.consume(m),o=!0,p}function y(m){return u&&o&&Ut(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(m)):i(m)}}function j6(e,n,i){const l=this;return o;function o(c){return c!==87&&c!==119||!Hw.call(l,l.previous)||zp(l.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(z6,e.attempt(Ow,e.attempt(Rw,u),i),i)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function L6(e,n,i){const l=this;let o="",u=!1;return c;function c(m){return(m===72||m===104)&&Uw.call(l,l.previous)&&!zp(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),f):i(m)}function f(m){if(Ut(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),f;if(m===58){const x=o.toLowerCase();if(x==="http"||x==="https")return e.consume(m),p}return i(m)}function p(m){return m===47?(e.consume(m),u?d:(u=!0,p)):i(m)}function d(m){return m===null||Bu(m)||tt(m)||Br(m)||rc(m)?i(m):e.attempt(Ow,e.attempt(Rw,y),i)(m)}function y(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(m)}}function B6(e,n,i){let l=0;return o;function o(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),o):c===46&&l===3?(e.consume(c),u):i(c)}function u(c){return c===null?i(c):n(c)}}function H6(e,n,i){let l,o,u;return c;function c(d){return d===46||d===95?e.check(jw,p,f)(d):d===null||tt(d)||Br(d)||d!==45&&rc(d)?p(d):(u=!0,e.consume(d),c)}function f(d){return d===95?l=!0:(o=l,l=void 0),e.consume(d),c}function p(d){return o||l||!u?i(d):n(d)}}function U6(e,n){let i=0,l=0;return o;function o(c){return c===40?(i++,e.consume(c),o):c===41&&l<i?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(jw,n,u)(c):c===null||tt(c)||Br(c)?n(c):(e.consume(c),o)}function u(c){return c===41&&l++,e.consume(c),o}}function q6(e,n,i){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),u):f===93?(e.consume(f),o):f===60||f===null||tt(f)||Br(f)?n(f):i(f)}function o(f){return f===null||f===40||f===91||tt(f)||Br(f)?n(f):l(f)}function u(f){return Ut(f)?c(f):i(f)}function c(f){return f===59?(e.consume(f),l):Ut(f)?(e.consume(f),c):i(f)}}function I6(e,n,i){return l;function l(u){return e.consume(u),o}function o(u){return jt(u)?i(u):n(u)}}function Hw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||tt(e)}function Uw(e){return!Ut(e)}function qw(e){return!(e===47||Uh(e))}function Uh(e){return e===43||e===45||e===46||e===95||jt(e)}function zp(e){let n=e.length,i=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){i=!0;break}if(l._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const V6={tokenize:P6,partial:!0};function Y6(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:G6,continuation:{tokenize:Z6},exit:Q6}},text:{91:{name:"gfmFootnoteCall",tokenize:F6},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:X6,resolveTo:$6}}}}function X6(e,n,i){const l=this;let o=l.events.length;const u=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;o--;){const p=l.events[o][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return f;function f(p){if(!c||!c._balanced)return i(p);const d=Rn(l.sliceSerialize({start:c.end,end:l.now()}));return d.codePointAt(0)!==94||!u.includes(d.slice(1))?i(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),n(p))}}function $6(e,n){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[i+1],e[i+2],["enter",l,n],e[i+3],e[i+4],["enter",o,n],["exit",o,n],["enter",u,n],["enter",c,n],["exit",c,n],["exit",u,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(i,e.length-i+1,...f),e}function F6(e,n,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u=0,c;return f;function f(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),p}function p(m){return m!==94?i(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(u>999||m===93&&!c||m===null||m===91||tt(m))return i(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes(Rn(l.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):i(m)}return tt(m)||(c=!0),u++,e.consume(m),m===92?y:d}function y(m){return m===91||m===92||m===93?(e.consume(m),u++,d):d(m)}}function G6(e,n,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u,c=0,f;return p;function p(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(w)}function y(w){if(c>999||w===93&&!f||w===null||w===91||tt(w))return i(w);if(w===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return u=Rn(l.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return tt(w)||(f=!0),c++,e.consume(w),w===92?m:y}function m(w){return w===91||w===92||w===93?(e.consume(w),c++,y):y(w)}function x(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(u)||o.push(u),qe(e,b,"gfmFootnoteDefinitionWhitespace")):i(w)}function b(w){return n(w)}}function Z6(e,n,i){return e.check(Ao,n,e.attempt(V6,n,i))}function Q6(e){e.exit("gfmFootnoteDefinition")}function P6(e,n,i){const l=this;return qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(u):i(u)}}function K6(e){let i=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:u,resolveAll:o};return i==null&&(i=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(c,f){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let d=p;for(;d--;)if(c[d][0]==="exit"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[d][1].end.offset-c[d][1].start.offset){c[p][1].type="strikethroughSequence",c[d][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[d][1].start),end:Object.assign({},c[p][1].end)},m={type:"strikethroughText",start:Object.assign({},c[d][1].end),end:Object.assign({},c[p][1].start)},x=[["enter",y,f],["enter",c[d][1],f],["exit",c[d][1],f],["enter",m,f]],b=f.parser.constructs.insideSpan.null;b&&fn(x,x.length,0,lc(b,c.slice(d+1,p),f)),fn(x,x.length,0,[["exit",m,f],["enter",c[p][1],f],["exit",c[p][1],f],["exit",y,f]]),fn(c,d-1,p-d+3,x),p=d+x.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function u(c,f,p){const d=this.previous,y=this.events;let m=0;return x;function x(w){return d===126&&y[y.length-1][1].type!=="characterEscape"?p(w):(c.enter("strikethroughSequenceTemporary"),b(w))}function b(w){const _=Vl(d);if(w===126)return m>1?p(w):(c.consume(w),m++,b);if(m<2&&!i)return p(w);const C=c.exit("strikethroughSequenceTemporary"),k=Vl(w);return C._open=!k||k===2&&!!_,C._close=!_||_===2&&!!k,f(w)}}}class J6{constructor(){this.map=[]}add(n,i,l){W6(this,n,i,l)}consume(n){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const l=[];for(;i>0;)i-=1,l.push(n.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),n.length=this.map[i][0];l.push(n.slice()),n.length=0;let o=l.pop();for(;o;){for(const u of o)n.push(u);o=l.pop()}this.map.length=0}}function W6(e,n,i,l){let o=0;if(!(i===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=i,e.map[o][2].push(...l);return}o+=1}e.map.push([n,i,l])}}function ej(e,n){let i=!1;const l=[];for(;n<e.length;){const o=e[n];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const u=l.length-1;l[u]=l[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);n+=1}return l}function tj(){return{flow:{null:{name:"table",tokenize:nj,resolveAll:ij}}}}function nj(e,n,i){const l=this;let o=0,u=0,c;return f;function f(I){let Y=l.events.length-1;for(;Y>-1;){const R=l.events[Y][1].type;if(R==="lineEnding"||R==="linePrefix")Y--;else break}const X=Y>-1?l.events[Y][1].type:null,te=X==="tableHead"||X==="tableRow"?z:p;return te===z&&l.parser.lazy[l.now().line]?i(I):te(I)}function p(I){return e.enter("tableHead"),e.enter("tableRow"),d(I)}function d(I){return I===124||(c=!0,u+=1),y(I)}function y(I){return I===null?i(I):ve(I)?u>1?(u=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),b):i(I):Re(I)?qe(e,y,"whitespace")(I):(u+=1,c&&(c=!1,o+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),m(I)))}function m(I){return I===null||I===124||tt(I)?(e.exit("data"),y(I)):(e.consume(I),I===92?x:m)}function x(I){return I===92||I===124?(e.consume(I),m):m(I)}function b(I){return l.interrupt=!1,l.parser.lazy[l.now().line]?i(I):(e.enter("tableDelimiterRow"),c=!1,Re(I)?qe(e,w,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):w(I))}function w(I){return I===45||I===58?C(I):I===124?(c=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),_):U(I)}function _(I){return Re(I)?qe(e,C,"whitespace")(I):C(I)}function C(I){return I===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),k):I===45?(u+=1,k(I)):I===null||ve(I)?D(I):U(I)}function k(I){return I===45?(e.enter("tableDelimiterFiller"),j(I)):U(I)}function j(I){return I===45?(e.consume(I),j):I===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(I))}function E(I){return Re(I)?qe(e,D,"whitespace")(I):D(I)}function D(I){return I===124?w(I):I===null||ve(I)?!c||o!==u?U(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(I)):U(I)}function U(I){return i(I)}function z(I){return e.enter("tableRow"),L(I)}function L(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),L):I===null||ve(I)?(e.exit("tableRow"),n(I)):Re(I)?qe(e,L,"whitespace")(I):(e.enter("data"),G(I))}function G(I){return I===null||I===124||tt(I)?(e.exit("data"),L(I)):(e.consume(I),I===92?Q:G)}function Q(I){return I===92||I===124?(e.consume(I),G):G(I)}}function ij(e,n){let i=-1,l=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,p=0,d,y,m;const x=new J6;for(;++i<e.length;){const b=e[i],w=b[1];b[0]==="enter"?w.type==="tableHead"?(f=!1,p!==0&&(N1(x,n,p,d,y),y=void 0,p=0),d={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(i,0,[["enter",d,n]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=!0,m=void 0,u=[0,0,0,0],c=[0,i+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(i,0,[["enter",y,n]])),o=w.type==="tableDelimiterRow"?2:y?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],m=pu(x,n,u,o,void 0,m),u=[0,0,0,0]),c[2]=i)):w.type==="tableCellDivider"&&(l?l=!1:(u[1]!==0&&(c[0]=c[1],m=pu(x,n,u,o,void 0,m)),u=c,c=[u[1],i,0,0])):w.type==="tableHead"?(f=!0,p=i):w.type==="tableRow"||w.type==="tableDelimiterRow"?(p=i,u[1]!==0?(c[0]=c[1],m=pu(x,n,u,o,i,m)):c[1]!==0&&(m=pu(x,n,c,o,i,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=i)}for(p!==0&&N1(x,n,p,d,y),x.consume(n.events),i=-1;++i<n.events.length;){const b=n.events[i];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=ej(n.events,i))}return e}function pu(e,n,i,l,o,u){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},Tl(n.events,i[0])),e.add(i[0],0,[["exit",u,n]]));const p=Tl(n.events,i[1]);if(u={type:c,start:Object.assign({},p),end:Object.assign({},p)},e.add(i[1],0,[["enter",u,n]]),i[2]!==0){const d=Tl(n.events,i[2]),y=Tl(n.events,i[3]),m={type:f,start:Object.assign({},d),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",m,n]]),l!==2){const x=n.events[i[2]],b=n.events[i[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",i[3]>i[2]+1){const w=i[2]+1,_=i[3]-i[2]-1;e.add(w,_,[])}}e.add(i[3]+1,0,[["exit",m,n]])}return o!==void 0&&(u.end=Object.assign({},Tl(n.events,o)),e.add(o,0,[["exit",u,n]]),u=void 0),u}function N1(e,n,i,l,o){const u=[],c=Tl(n.events,i);o&&(o.end=Object.assign({},c),u.push(["exit",o,n])),l.end=Object.assign({},c),u.push(["exit",l,n]),e.add(i+1,0,u)}function Tl(e,n){const i=e[n],l=i[0]==="enter"?"start":"end";return i[1][l]}const rj={name:"tasklistCheck",tokenize:aj};function lj(){return{text:{91:rj}}}function aj(e,n,i){const l=this;return o;function o(p){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?i(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),u)}function u(p){return tt(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),c):i(p)}function c(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(p)}function f(p){return ve(p)?n(p):Re(p)?e.check({tokenize:oj},n,i)(p):i(p)}}function oj(e,n,i){return qe(e,l,"whitespace");function l(o){return o===null?i(o):n(o)}}function sj(e){return Kv([O6(),Y6(),K6(e),tj(),lj()])}const uj={};function cj(e){const n=this,i=e||uj,l=n.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),u=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(sj(i)),u.push(A6()),c.push(M6(i))}function fj(){const{isRunning:e,results:n}=dp(),{nodes:i}=lr(),l=i.filter(u=>u.type==="output"),o=l.length>0?n.get(l[0].id):null;return S.jsxs("div",{className:"flex flex-col h-full",children:[S.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(_3,{className:"w-5 h-5 text-gray-400"}),S.jsx("h3",{className:"text-lg font-semibold text-white",children:"Preview"})]}),e&&S.jsx("span",{className:"text-sm text-blue-400 animate-pulse",children:"Running..."})]}),e&&S.jsx("div",{className:"p-4 border-b border-border",children:S.jsx("div",{className:"space-y-3",children:i.map(u=>S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${u.data.status==="completed"?"bg-green-500":u.data.status==="running"?"bg-blue-500 animate-pulse":u.data.status==="error"?"bg-red-500":"bg-gray-500"}`}),S.jsx("span",{className:"text-sm text-gray-300",children:u.data.label}),u.data.status==="running"&&u.data.progress!==void 0&&S.jsxs("span",{className:"text-xs text-gray-500",children:[u.data.progress,"%"]})]},u.id))})}),S.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o?S.jsx("div",{className:"markdown-content",children:S.jsx(KO,{remarkPlugins:[cj],children:typeof o=="string"?o:JSON.stringify(o,null,2)})}):S.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500",children:[S.jsx(mo,{className:"w-12 h-12 mb-4 opacity-50"}),S.jsx("p",{className:"text-sm",children:"Run the workflow to see results"})]})}),o&&S.jsxs("div",{className:"flex items-center gap-2 p-4 border-t border-border",children:[S.jsxs("button",{className:"flex items-center gap-2 px-3 py-2 bg-surface-hover rounded-lg text-sm hover:bg-border transition-colors",children:[S.jsx(Lu,{className:"w-4 h-4"}),"Download .md"]}),S.jsxs("button",{className:"flex items-center gap-2 px-3 py-2 bg-surface-hover rounded-lg text-sm hover:bg-border transition-colors",children:[S.jsx(mo,{className:"w-4 h-4"}),"Export .docx"]})]})]})}function dj({level:e}){switch(e){case"success":return S.jsx(x3,{className:"w-4 h-4 text-green-400"});case"error":return S.jsx(S3,{className:"w-4 h-4 text-red-400"});case"warning":return S.jsx(e4,{className:"w-4 h-4 text-yellow-400"});default:return S.jsx(O3,{className:"w-4 h-4 text-blue-400"})}}function hj(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function pj(){const{logs:e,clearLogs:n}=dp();return S.jsxs("div",{className:"flex flex-col h-full",children:[S.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[S.jsx("h3",{className:"text-lg font-semibold text-white",children:"Console"}),S.jsx("button",{onClick:n,className:"p-2 text-gray-400 hover:text-white hover:bg-surface-hover rounded-lg transition-colors",children:S.jsx(wv,{className:"w-4 h-4"})})]}),S.jsx("div",{className:"flex-1 overflow-y-auto p-4 font-mono text-sm",children:e.length===0?S.jsx("div",{className:"text-gray-500 text-center py-8",children:"No logs yet. Run the workflow to see output."}):S.jsx("div",{className:"space-y-2",children:e.map(i=>S.jsxs("div",{className:un("flex items-start gap-2 p-2 rounded",i.level==="error"&&"bg-red-500/10",i.level==="warning"&&"bg-yellow-500/10",i.level==="success"&&"bg-green-500/10"),children:[S.jsxs("span",{className:"text-gray-500 shrink-0",children:["[",hj(i.timestamp),"]"]}),S.jsx(dj,{level:i.level}),S.jsxs("div",{className:"flex-1",children:[S.jsx("span",{className:un(i.level==="error"&&"text-red-400",i.level==="warning"&&"text-yellow-400",i.level==="success"&&"text-green-400",i.level==="info"&&"text-gray-300"),children:i.message}),i.nodeId&&S.jsxs("span",{className:"ml-2 text-gray-500",children:["(Node: ",i.nodeId,")"]}),i.details&&S.jsx("pre",{className:"mt-1 p-2 bg-surface rounded text-xs text-gray-400 overflow-x-auto",children:typeof i.details=="string"?i.details:JSON.stringify(i.details,null,2)})]})]},i.id))})})]})}const mj=["Read","Write","Edit","Bash","Glob","Grep","WebSearch","WebFetch","Task","TodoWrite"],gj=[{id:"sonnet",name:"Claude 4 Sonnet",description:"Fast, cost-efficient"},{id:"opus",name:"Claude 4.5 Opus",description:"Best for complex tasks"},{id:"haiku",name:"Claude 3.5 Haiku",description:"Fastest, for simple tasks"}];function yj(e){switch(e){case"input":return S.jsx(rp,{className:"w-5 h-5 text-yellow-400"});case"subagent":return S.jsx(Co,{className:"w-5 h-5 text-purple-400"});case"skill":return S.jsx(tc,{className:"w-5 h-5 text-cyan-400"});case"mcp":return S.jsx(lp,{className:"w-5 h-5 text-pink-400"});case"output":return S.jsx(ec,{className:"w-5 h-5 text-emerald-400"});default:return null}}function xj(e){switch(e){case"input":return"User Input";case"subagent":return"Sub Agent";case"skill":return"Skill";case"mcp":return"MCP Server";case"output":return"Output";default:return"Node"}}function bj({node:e}){const{updateNode:n,removeNode:i}=lr();if(!e)return S.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500 p-8",children:[S.jsx($3,{className:"w-12 h-12 mb-4 opacity-50"}),S.jsx("p",{className:"text-center",children:"Select a node to configure its settings"})]});const l=()=>{i(e.id)},o=c=>{n(e.id,{label:c})},u=c=>{n(e.id,{description:c})};return S.jsxs("div",{className:"flex flex-col h-full",children:[S.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border bg-surface-hover/50",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"p-2 rounded-lg bg-surface",children:yj(e.type)}),S.jsxs("div",{children:[S.jsx("h3",{className:"text-base font-semibold text-white",children:e.data.label}),S.jsx("p",{className:"text-xs text-gray-500",children:xj(e.type)})]})]}),S.jsx("button",{onClick:l,className:"p-2 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded-lg transition-colors",title:"Delete node",children:S.jsx(wv,{className:"w-4 h-4"})})]}),S.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-5",children:[S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Name"}),S.jsx("input",{type:"text",value:e.data.label,onChange:c=>o(c.target.value),className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent transition-all"})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:e.type==="subagent"?"Prompt":"Description"}),S.jsx("textarea",{value:e.data.description||"",onChange:c=>u(c.target.value),rows:4,placeholder:e.type==="subagent"?"Enter instructions for this agent...":"Describe what this step does...",className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent transition-all resize-none"})]}),e.type==="input"&&S.jsx(vj,{data:e.data,onUpdate:c=>n(e.id,c)}),e.type==="subagent"&&S.jsx(wj,{data:e.data,onUpdate:c=>n(e.id,c)}),e.type==="skill"&&S.jsx(Sj,{data:e.data,onUpdate:c=>n(e.id,c)}),e.type==="mcp"&&S.jsx(Ej,{data:e.data,onUpdate:c=>n(e.id,c)}),e.type==="output"&&S.jsx(kj,{onUpdate:c=>n(e.id,c)})]})]})}function vj({data:e,onUpdate:n}){return S.jsxs(S.Fragment,{children:[S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Input Type"}),S.jsx("div",{className:"grid grid-cols-3 gap-2",children:["text","file","select"].map(i=>S.jsx("button",{onClick:()=>n({inputType:i}),className:`px-3 py-2 text-sm rounded-lg border transition-colors ${e.inputType===i?"bg-accent/20 border-accent text-white":"bg-surface border-border text-gray-400 hover:border-gray-500"}`,children:i.charAt(0).toUpperCase()+i.slice(1)},i))})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Default Value"}),S.jsx("textarea",{value:e.value||"",onChange:i=>n({value:i.target.value}),rows:3,placeholder:"Enter default value...",className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent resize-none"})]})]})}function wj({data:e,onUpdate:n}){return S.jsxs(S.Fragment,{children:[S.jsxs("div",{children:[S.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Model"}),S.jsx("div",{className:"space-y-2",children:gj.map(i=>S.jsxs("button",{onClick:()=>n({model:i.id}),className:`w-full flex items-center gap-3 p-3 rounded-lg border transition-colors ${e.model===i.id?"bg-accent/20 border-accent":"bg-surface-hover border-border hover:border-gray-500"}`,children:[S.jsx(Co,{className:"w-5 h-5 text-purple-400"}),S.jsxs("div",{className:"text-left",children:[S.jsx("div",{className:"font-medium text-white",children:i.name}),S.jsx("div",{className:"text-xs text-gray-500",children:i.description})]})]},i.id))})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Allowed Tools"}),S.jsx("div",{className:"grid grid-cols-2 gap-2",children:mj.map(i=>S.jsxs("label",{className:"flex items-center gap-2 p-2 bg-surface-hover rounded-lg cursor-pointer hover:bg-border transition-colors",children:[S.jsx("input",{type:"checkbox",checked:e.tools?.includes(i)??!1,onChange:l=>{const o=l.target.checked?[...e.tools||[],i]:(e.tools||[]).filter(u=>u!==i);n({tools:o})},className:"rounded border-gray-600 bg-surface text-accent focus:ring-accent"}),S.jsx("span",{className:"text-sm text-gray-300",children:i})]},i))})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"System Prompt"}),S.jsx("textarea",{value:e.systemPrompt||"",onChange:i=>n({systemPrompt:i.target.value}),rows:4,placeholder:"Enter custom instructions for this agent...",className:"w-full px-3 py-2 bg-surface-hover border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent resize-none"})]})]})}function Sj({data:e,onUpdate:n}){const i=[{id:"ppt-generator",name:"PPT Generator",description:"Create PowerPoint presentations"},{id:"image-gen-nanobanana",name:"Image Generator",description:"Generate images with AI"},{id:"pdf",name:"PDF Processor",description:"Process and create PDF documents"},{id:"xlsx",name:"Excel Processor",description:"Work with spreadsheets"},{id:"docx",name:"Word Processor",description:"Create and edit documents"}];return S.jsxs(S.Fragment,{children:[S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Skill Type"}),S.jsx("div",{className:"grid grid-cols-2 gap-2 mb-4",children:["official","custom"].map(l=>S.jsx("button",{onClick:()=>n({skillType:l}),className:`px-3 py-2 text-sm rounded-lg border transition-colors ${e.skillType===l?"bg-accent/20 border-accent text-white":"bg-surface border-border text-gray-400 hover:border-gray-500"}`,children:l.charAt(0).toUpperCase()+l.slice(1)},l))})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Select Skill"}),S.jsx("div",{className:"space-y-2",children:i.map(l=>S.jsxs("button",{onClick:()=>n({skillId:l.id}),className:`w-full flex items-center gap-3 p-3 rounded-lg border transition-colors text-left ${e.skillId===l.id?"bg-accent/20 border-accent":"bg-surface border-border hover:border-gray-500"}`,children:[S.jsx(tc,{className:"w-5 h-5 text-cyan-400"}),S.jsxs("div",{children:[S.jsx("div",{className:"font-medium text-white",children:l.name}),S.jsx("div",{className:"text-xs text-gray-500",children:l.description})]})]},l.id))})]})]})}function Ej({data:e,onUpdate:n}){return S.jsxs(S.Fragment,{children:[S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Server Type"}),S.jsx("div",{className:"grid grid-cols-2 gap-2",children:["stdio","sse"].map(i=>S.jsx("button",{onClick:()=>n({serverType:i}),className:`px-3 py-2 text-sm rounded-lg border transition-colors ${e.serverType===i?"bg-accent/20 border-accent text-white":"bg-surface border-border text-gray-400 hover:border-gray-500"}`,children:i.toUpperCase()},i))})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Server Name"}),S.jsx("input",{type:"text",value:e.serverName||"",onChange:i=>n({serverName:i.target.value}),placeholder:"e.g., my-mcp-server",className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent"})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Server Command (for stdio)"}),S.jsx("input",{type:"text",value:e.serverConfig?.command||"",onChange:i=>n({serverConfig:{...e.serverConfig,command:i.target.value}}),placeholder:"e.g., npx @anthropic/mcp-server",className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent"})]})]})}function kj({onUpdate:e}){const n=[{id:"auto",name:"Auto Format",description:"Automatically format output"},{id:"markdown",name:"Markdown",description:"Plain markdown text"},{id:"document",name:"Document",description:"Formatted document output"}];return S.jsxs("div",{children:[S.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Output Format"}),S.jsx("div",{className:"space-y-2",children:n.map(i=>S.jsxs("button",{onClick:()=>e({layoutType:i.id}),className:"w-full flex items-center gap-3 p-3 rounded-lg border bg-surface-hover border-border hover:border-gray-500 transition-colors text-left",children:[S.jsx(ec,{className:"w-5 h-5 text-emerald-400"}),S.jsxs("div",{children:[S.jsx("div",{className:"font-medium text-white",children:i.name}),S.jsx("div",{className:"text-xs text-gray-500",children:i.description})]})]},i.id))})]})}const _j=[{id:"preview",label:"Preview"},{id:"console",label:"Console"},{id:"step",label:"Step"},{id:"theme",label:"Theme"}];function Cj(){const{activeTab:e,setActiveTab:n}=hp(),i=lr(f4);return S.jsxs("div",{className:"flex flex-col h-full",children:[S.jsx("div",{className:"flex items-center gap-1 p-2 border-b border-border",children:_j.map(l=>S.jsx("button",{onClick:()=>n(l.id),className:un("px-4 py-2 text-sm font-medium rounded-lg transition-colors",e===l.id?"bg-surface-hover text-white":"text-gray-400 hover:text-white hover:bg-surface-hover/50"),children:l.label},l.id))}),S.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e==="preview"&&S.jsx(fj,{}),e==="console"&&S.jsx(pj,{}),e==="step"&&S.jsx(bj,{node:i}),e==="theme"&&S.jsx("div",{className:"p-4 text-gray-500",children:"Theme customization coming soon..."})]})]})}const Nj=[{keywords:["research","find","search","look up","investigate"],steps:[{type:"input",label:"Research Topic",description:"Enter the topic to research"},{type:"subagent",label:"Research Agent",description:"Conduct comprehensive research on the topic",config:{role:"researcher",tools:["WebSearch","WebFetch","Read"]}},{type:"output",label:"Research Results",description:"Compiled research findings",config:{outputType:"markdown"}}]},{keywords:["write","create","generate","draft","compose"],steps:[{type:"input",label:"Content Brief",description:"Describe what content you want to create"},{type:"subagent",label:"Content Writer",description:"Create high-quality content based on the brief",config:{role:"writer",tools:["Read","Write"]}},{type:"output",label:"Written Content",description:"Final written output",config:{outputType:"markdown"}}]},{keywords:["analyze","review","evaluate","assess","examine"],steps:[{type:"input",label:"Analysis Input",description:"Data or content to analyze"},{type:"subagent",label:"Analysis Agent",description:"Perform detailed analysis",config:{role:"analyst",tools:["Read","Grep","Glob"]}},{type:"output",label:"Analysis Report",description:"Structured analysis findings",config:{outputType:"markdown"}}]},{keywords:["code","develop","implement","build","program"],steps:[{type:"input",label:"Requirements",description:"Describe what you want to build"},{type:"subagent",label:"Developer Agent",description:"Write code based on requirements",config:{role:"coder",tools:["Read","Write","Edit","Bash","Glob","Grep"]}},{type:"output",label:"Generated Code",description:"Implementation output",config:{outputType:"auto"}}]},{keywords:["html","webpage","website","page","landing"],steps:[{type:"input",label:"Page Requirements",description:"Describe the webpage you want"},{type:"subagent",label:"Web Developer",description:"Create HTML/CSS for the webpage",config:{role:"coder",tools:["Write"]}},{type:"skill",label:"Image Generator",description:"Generate images for the page",config:{skillType:"official",skillId:"image-gen"}},{type:"output",label:"Complete Webpage",description:"HTML page with images",config:{outputType:"auto"}}]},{keywords:["image","picture","illustration","graphic","visual"],steps:[{type:"input",label:"Image Description",description:"Describe the image you want"},{type:"skill",label:"Image Generator",description:"Generate image based on description",config:{skillType:"official",skillId:"image-gen-nanobanana"}},{type:"output",label:"Generated Image",description:"Final image output",config:{outputType:"auto"}}]},{keywords:["ppt","presentation","slides","powerpoint"],steps:[{type:"input",label:"Presentation Topic",description:"Topic and outline for presentation"},{type:"subagent",label:"Content Planner",description:"Plan presentation structure and content",config:{role:"writer",tools:["Read"]}},{type:"skill",label:"PPT Generator",description:"Create PowerPoint presentation",config:{skillType:"official",skillId:"ppt-generator"}},{type:"output",label:"Presentation",description:"Final PowerPoint file",config:{outputType:"auto"}}]}],Tj=[{type:"input",label:"User Input",description:"Enter your input"},{type:"subagent",label:"AI Assistant",description:"Process the input and generate response",config:{role:"custom",tools:["Read","Write"]}},{type:"output",label:"Output",description:"Final output",config:{outputType:"auto"}}];function Aj(e){const n=e.toLowerCase();for(const i of Nj)if(i.keywords.some(l=>n.includes(l)))return i.steps;return Tj}function Mj(e,n,i,l){const o=go(),p={x:100+n*300,y:200},d={label:e.label,description:e.description,status:"idle",usedInputs:n>0?l:[]};switch(e.type){case"input":return{id:o,type:"input",position:p,data:{...d,inputType:"text",placeholder:e.description}};case"subagent":return{id:o,type:"subagent",position:p,data:{...d,role:e.config?.role||"custom",tools:e.config?.tools||["Read"],model:"sonnet"}};case"skill":return{id:o,type:"skill",position:p,data:{...d,skillType:e.config?.skillType||"official",skillId:e.config?.skillId||void 0}};case"mcp":return{id:o,type:"mcp",position:p,data:{...d,serverType:"stdio",serverName:e.config?.serverName||"",serverConfig:{}}};case"output":return{id:o,type:"output",position:p,data:{...d,outputType:e.config?.outputType||"auto"}}}}function zj(e){const n=Aj(e),i=[],l=[];let o=[];return n.forEach((u,c)=>{const f=Mj(u,c,n.length,[...o]);i.push(f),c>0&&i[c-1]&&l.push({id:`e-${i[c-1].id}-${f.id}`,source:i[c-1].id,target:f.id,animated:!0}),o.push(f.id)}),{nodes:i,edges:l}}function Dj(e,n){return{nodes:e.nodes.map(l=>{if(l.type==="input")return{...l,data:{...l.data,value:n}};if(l.type==="subagent"){const o=l.data;return{...l,data:{...o,systemPrompt:`Based on the user's request: "${n}"
56
+
57
+ ${o.description}`}}}return l}),edges:e.edges}}function Oj(e){const n=zj(e);return Dj(n,e)}function Rj(){const[e,n]=W.useState(""),[i,l]=W.useState(!1),{loadWorkflow:o,workflowName:u}=lr(),c=async()=>{if(!(!e.trim()||i)){l(!0);try{await new Promise(d=>setTimeout(d,500));const p=Oj(e);o({nodes:p.nodes,edges:p.edges,name:u==="Untitled Workflow"?e.slice(0,30):u}),n("")}catch(p){console.error("Failed to generate workflow:",p)}finally{l(!1)}}},f=p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),c())};return S.jsxs("div",{className:"bg-surface border border-border rounded-2xl px-5 py-3 shadow-2xl flex items-center gap-3",children:[S.jsx(Co,{className:"w-5 h-5 text-accent flex-shrink-0"}),S.jsx("input",{type:"text",value:e,onChange:p=>n(p.target.value),onKeyDown:f,placeholder:"Describe your workflow... (e.g., 'Create an HTML page with images')",className:"flex-1 bg-transparent border-none outline-none text-white placeholder-gray-500 text-sm",disabled:i}),S.jsx("button",{onClick:c,disabled:!e.trim()||i,className:`p-2 rounded-full transition-all duration-200 ${e.trim()&&!i?"bg-accent text-white hover:bg-accent-hover hover:scale-105":"bg-surface-hover text-gray-500"}`,title:"Generate Workflow",children:i?S.jsx(xv,{className:"w-5 h-5 animate-spin"}):S.jsx(Y3,{className:"w-5 h-5"})}),S.jsx("div",{className:"absolute -bottom-6 left-1/2 -translate-x-1/2 text-xs text-gray-600",children:"AI will generate a workflow based on your description"})]})}function jj(){const{isCollapsed:e,width:n}=hp();return S.jsx(hv,{children:S.jsxs("div",{className:"flex flex-col h-screen bg-canvas",children:[S.jsx(wM,{}),S.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[S.jsxs("div",{className:"flex-1 flex flex-col",children:[S.jsx(kM,{}),S.jsxs("div",{className:"flex-1 relative",children:[S.jsx(qM,{}),S.jsx("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 w-full max-w-2xl px-4",children:S.jsx(Rj,{})})]})]}),!e&&S.jsx("div",{className:"border-l border-border bg-surface",style:{width:`${n}px`},children:S.jsx(Cj,{})})]})]})})}eE.createRoot(document.getElementById("root")).render(S.jsx(W.StrictMode,{children:S.jsx(jj,{})}));