@exaudeus/workrail 3.7.4 → 3.8.1

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,28 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))a(u);new MutationObserver(u=>{for(const s of u)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(u){const s={};return u.integrity&&(s.integrity=u.integrity),u.referrerPolicy&&(s.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?s.credentials="include":u.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(u){if(u.ep)return;u.ep=!0;const s=r(u);fetch(u.href,s)}})();function ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gf={exports:{}},Aa={};var wy;function Sw(){if(wy)return Aa;wy=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(a,u,s){var c=null;if(s!==void 0&&(c=""+s),u.key!==void 0&&(c=""+u.key),"key"in u){s={};for(var d in u)d!=="key"&&(s[d]=u[d])}else s=u;return u=s.ref,{$$typeof:t,type:a,key:c,ref:u!==void 0?u:null,props:s}}return Aa.Fragment=i,Aa.jsx=r,Aa.jsxs=r,Aa}var Ey;function ww(){return Ey||(Ey=1,Gf.exports=Sw()),Gf.exports}var z=ww(),Zf={exports:{}},Nt={};var _y;function Ew(){if(_y)return Nt;_y=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function x(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,M={};function E(O,V,N){this.props=O,this.context=V,this.refs=M,this.updater=N||S}E.prototype.isReactComponent={},E.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")},E.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function H(){}H.prototype=E.prototype;function w(O,V,N){this.props=O,this.context=V,this.refs=M,this.updater=N||S}var k=w.prototype=new H;k.constructor=w,C(k,E.prototype),k.isPureReactComponent=!0;var I=Array.isArray;function D(){}var j={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function Z(O,V,N){var et=N.ref;return{$$typeof:t,type:O,key:V,ref:et!==void 0?et:null,props:N}}function lt(O,V){return Z(O.type,V,O.props)}function Q(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function G(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(N){return V[N]})}var nt=/\/+/g;function R(O,V){return typeof O=="object"&&O!==null&&O.key!=null?G(""+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(D,D):(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 A(O,V,N,et,st){var ct=typeof O;(ct==="undefined"||ct==="boolean")&&(O=null);var dt=!1;if(O===null)dt=!0;else switch(ct){case"bigint":case"string":case"number":dt=!0;break;case"object":switch(O.$$typeof){case t:case i:dt=!0;break;case g:return dt=O._init,A(dt(O._payload),V,N,et,st)}}if(dt)return st=st(O),dt=et===""?"."+R(O,0):et,I(st)?(N="",dt!=null&&(N=dt.replace(nt,"$&/")+"/"),A(st,V,N,"",function(wt){return wt})):st!=null&&(Q(st)&&(st=lt(st,N+(st.key==null||O&&O.key===st.key?"":(""+st.key).replace(nt,"$&/")+"/")+dt)),V.push(st)),1;dt=0;var ut=et===""?".":et+":";if(I(O))for(var pt=0;pt<O.length;pt++)et=O[pt],ct=ut+R(et,pt),dt+=A(et,V,N,ct,st);else if(pt=x(O),typeof pt=="function")for(O=pt.call(O),pt=0;!(et=O.next()).done;)et=et.value,ct=ut+R(et,pt++),dt+=A(et,V,N,ct,st);else if(ct==="object"){if(typeof O.then=="function")return A(B(O),V,N,et,st);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 dt}function L(O,V,N){if(O==null)return O;var et=[],st=0;return A(O,et,"","",function(ct){return V.call(N,ct,st++)}),et}function Y(O){if(O._status===-1){var V=O._result;V=V(),V.then(function(N){(O._status===0||O._status===-1)&&(O._status=1,O._result=N)},function(N){(O._status===0||O._status===-1)&&(O._status=2,O._result=N)}),O._status===-1&&(O._status=0,O._result=V)}if(O._status===1)return O._result.default;throw O._result}var K=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)},T={map:L,forEach:function(O,V,N){L(O,function(){V.apply(this,arguments)},N)},count:function(O){var V=0;return L(O,function(){V++}),V},toArray:function(O){return L(O,function(V){return V})||[]},only:function(O){if(!Q(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Nt.Activity=y,Nt.Children=T,Nt.Component=E,Nt.Fragment=r,Nt.Profiler=u,Nt.PureComponent=w,Nt.StrictMode=a,Nt.Suspense=m,Nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Nt.__COMPILER_RUNTIME={__proto__:null,c:function(O){return j.H.useMemoCache(O)}},Nt.cache=function(O){return function(){return O.apply(null,arguments)}},Nt.cacheSignal=function(){return null},Nt.cloneElement=function(O,V,N){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var et=C({},O.props),st=O.key;if(V!=null)for(ct in V.key!==void 0&&(st=""+V.key),V)!q.call(V,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&V.ref===void 0||(et[ct]=V[ct]);var ct=arguments.length-2;if(ct===1)et.children=N;else if(1<ct){for(var dt=Array(ct),ut=0;ut<ct;ut++)dt[ut]=arguments[ut+2];et.children=dt}return Z(O.type,st,et)},Nt.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},Nt.createElement=function(O,V,N){var et,st={},ct=null;if(V!=null)for(et in V.key!==void 0&&(ct=""+V.key),V)q.call(V,et)&&et!=="key"&&et!=="__self"&&et!=="__source"&&(st[et]=V[et]);var dt=arguments.length-2;if(dt===1)st.children=N;else if(1<dt){for(var ut=Array(dt),pt=0;pt<dt;pt++)ut[pt]=arguments[pt+2];st.children=ut}if(O&&O.defaultProps)for(et in dt=O.defaultProps,dt)st[et]===void 0&&(st[et]=dt[et]);return Z(O,ct,st)},Nt.createRef=function(){return{current:null}},Nt.forwardRef=function(O){return{$$typeof:d,render:O}},Nt.isValidElement=Q,Nt.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:Y}},Nt.memo=function(O,V){return{$$typeof:p,type:O,compare:V===void 0?null:V}},Nt.startTransition=function(O){var V=j.T,N={};j.T=N;try{var et=O(),st=j.S;st!==null&&st(N,et),typeof et=="object"&&et!==null&&typeof et.then=="function"&&et.then(D,K)}catch(ct){K(ct)}finally{V!==null&&N.types!==null&&(V.types=N.types),j.T=V}},Nt.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},Nt.use=function(O){return j.H.use(O)},Nt.useActionState=function(O,V,N){return j.H.useActionState(O,V,N)},Nt.useCallback=function(O,V){return j.H.useCallback(O,V)},Nt.useContext=function(O){return j.H.useContext(O)},Nt.useDebugValue=function(){},Nt.useDeferredValue=function(O,V){return j.H.useDeferredValue(O,V)},Nt.useEffect=function(O,V){return j.H.useEffect(O,V)},Nt.useEffectEvent=function(O){return j.H.useEffectEvent(O)},Nt.useId=function(){return j.H.useId()},Nt.useImperativeHandle=function(O,V,N){return j.H.useImperativeHandle(O,V,N)},Nt.useInsertionEffect=function(O,V){return j.H.useInsertionEffect(O,V)},Nt.useLayoutEffect=function(O,V){return j.H.useLayoutEffect(O,V)},Nt.useMemo=function(O,V){return j.H.useMemo(O,V)},Nt.useOptimistic=function(O,V){return j.H.useOptimistic(O,V)},Nt.useReducer=function(O,V,N){return j.H.useReducer(O,V,N)},Nt.useRef=function(O){return j.H.useRef(O)},Nt.useState=function(O){return j.H.useState(O)},Nt.useSyncExternalStore=function(O,V,N){return j.H.useSyncExternalStore(O,V,N)},Nt.useTransition=function(){return j.H.useTransition()},Nt.version="19.2.4",Nt}var Cy;function eo(){return Cy||(Cy=1,Zf.exports=Ew()),Zf.exports}var W=eo();const _w=ys(W);var Ff={exports:{}},Ma={},Kf={exports:{}},$f={};var Ny;function Cw(){return Ny||(Ny=1,(function(t){function i(A,L){var Y=A.length;A.push(L);t:for(;0<Y;){var K=Y-1>>>1,T=A[K];if(0<u(T,L))A[K]=L,A[Y]=T,Y=K;else break t}}function r(A){return A.length===0?null:A[0]}function a(A){if(A.length===0)return null;var L=A[0],Y=A.pop();if(Y!==L){A[0]=Y;t:for(var K=0,T=A.length,O=T>>>1;K<O;){var V=2*(K+1)-1,N=A[V],et=V+1,st=A[et];if(0>u(N,Y))et<T&&0>u(st,N)?(A[K]=st,A[et]=Y,K=et):(A[K]=N,A[V]=Y,K=V);else if(et<T&&0>u(st,Y))A[K]=st,A[et]=Y,K=et;else break t}}return L}function u(A,L){var Y=A.sortIndex-L.sortIndex;return Y!==0?Y:A.id-L.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var m=[],p=[],g=1,y=null,v=3,x=!1,S=!1,C=!1,M=!1,E=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function k(A){for(var L=r(p);L!==null;){if(L.callback===null)a(p);else if(L.startTime<=A)a(p),L.sortIndex=L.expirationTime,i(m,L);else break;L=r(p)}}function I(A){if(C=!1,k(A),!S)if(r(m)!==null)S=!0,D||(D=!0,G());else{var L=r(p);L!==null&&B(I,L.startTime-A)}}var D=!1,j=-1,q=5,Z=-1;function lt(){return M?!0:!(t.unstable_now()-Z<q)}function Q(){if(M=!1,D){var A=t.unstable_now();Z=A;var L=!0;try{t:{S=!1,C&&(C=!1,H(j),j=-1),x=!0;var Y=v;try{e:{for(k(A),y=r(m);y!==null&&!(y.expirationTime>A&&lt());){var K=y.callback;if(typeof K=="function"){y.callback=null,v=y.priorityLevel;var T=K(y.expirationTime<=A);if(A=t.unstable_now(),typeof T=="function"){y.callback=T,k(A),L=!0;break e}y===r(m)&&a(m),k(A)}else a(m);y=r(m)}if(y!==null)L=!0;else{var O=r(p);O!==null&&B(I,O.startTime-A),L=!1}}break t}finally{y=null,v=Y,x=!1}L=void 0}}finally{L?G():D=!1}}}var G;if(typeof w=="function")G=function(){w(Q)};else if(typeof MessageChannel<"u"){var nt=new MessageChannel,R=nt.port2;nt.port1.onmessage=Q,G=function(){R.postMessage(null)}}else G=function(){E(Q,0)};function B(A,L){j=E(function(){A(t.unstable_now())},L)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(A){A.callback=null},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(A){switch(v){case 1:case 2:case 3:var L=3;break;default:L=v}var Y=v;v=L;try{return A()}finally{v=Y}},t.unstable_requestPaint=function(){M=!0},t.unstable_runWithPriority=function(A,L){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var Y=v;v=A;try{return L()}finally{v=Y}},t.unstable_scheduleCallback=function(A,L,Y){var K=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?K+Y:K):Y=K,A){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=Y+T,A={id:g++,callback:L,priorityLevel:A,startTime:Y,expirationTime:T,sortIndex:-1},Y>K?(A.sortIndex=Y,i(p,A),r(m)===null&&A===r(p)&&(C?(H(j),j=-1):C=!0,B(I,Y-K))):(A.sortIndex=T,i(m,A),S||x||(S=!0,D||(D=!0,G()))),A},t.unstable_shouldYield=lt,t.unstable_wrapCallback=function(A){var L=v;return function(){var Y=v;v=L;try{return A.apply(this,arguments)}finally{v=Y}}}})($f)),$f}var Ty;function Nw(){return Ty||(Ty=1,Kf.exports=Cw()),Kf.exports}var Pf={exports:{}},Oe={};var Ay;function Tw(){if(Ay)return Oe;Ay=1;var t=eo();function i(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},u=Symbol.for("react.portal");function s(m,p,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:y==null?null:""+y,children:m,containerInfo:p,implementation:g}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Oe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Oe.createPortal=function(m,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return s(m,p,null,g)},Oe.flushSync=function(m){var p=c.T,g=a.p;try{if(c.T=null,a.p=2,m)return m()}finally{c.T=p,a.p=g,a.d.f()}},Oe.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(m,p))},Oe.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},Oe.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var g=p.as,y=d(g,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:x}):g==="script"&&a.d.X(m,{crossOrigin:y,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Oe.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=d(p.as,p.crossOrigin);a.d.M(m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(m)},Oe.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,y=d(g,p.crossOrigin);a.d.L(m,g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Oe.preloadModule=function(m,p){if(typeof m=="string")if(p){var g=d(p.as,p.crossOrigin);a.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(m)},Oe.requestFormReset=function(m){a.d.r(m)},Oe.unstable_batchedUpdates=function(m,p){return m(p)},Oe.useFormState=function(m,p,g){return c.H.useFormState(m,p,g)},Oe.useFormStatus=function(){return c.H.useHostTransitionStatus()},Oe.version="19.2.4",Oe}var My;function Lv(){if(My)return Pf.exports;My=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Pf.exports=Tw(),Pf.exports}var zy;function Aw(){if(zy)return Ma;zy=1;var t=Nw(),i=eo(),r=Lv();function a(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function d(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(s(e)!==e)throw Error(a(188))}function p(e){var n=e.alternate;if(!n){if(n=s(e),n===null)throw Error(a(188));return n!==e?null:e}for(var l=e,o=n;;){var f=l.return;if(f===null)break;var h=f.alternate;if(h===null){if(o=f.return,o!==null){l=o;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===l)return m(f),e;if(h===o)return m(f),n;h=h.sibling}throw Error(a(188))}if(l.return!==o.return)l=f,o=h;else{for(var b=!1,_=f.child;_;){if(_===l){b=!0,l=f,o=h;break}if(_===o){b=!0,o=f,l=h;break}_=_.sibling}if(!b){for(_=h.child;_;){if(_===l){b=!0,l=h,o=f;break}if(_===o){b=!0,o=h,l=f;break}_=_.sibling}if(!b)throw Error(a(189))}}if(l.alternate!==o)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:n}function g(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=g(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),lt=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var nt=Symbol.for("react.client.reference");function R(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===nt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case E:return"Profiler";case M:return"StrictMode";case I:return"Suspense";case D:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case w:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case k:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case j:return n=e.displayName||null,n!==null?n:R(e.type)||"Memo";case q:n=e._payload,e=e._init;try{return R(e(n))}catch{}}return null}var B=Array.isArray,A=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},K=[],T=-1;function O(e){return{current:e}}function V(e){0>T||(e.current=K[T],K[T]=null,T--)}function N(e,n){T++,K[T]=e.current,e.current=n}var et=O(null),st=O(null),ct=O(null),dt=O(null);function ut(e,n){switch(N(ct,n),N(st,e),N(et,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Xg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Xg(n),e=Gg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(et),N(et,e)}function pt(){V(et),V(st),V(ct)}function wt(e){e.memoizedState!==null&&N(dt,e);var n=et.current,l=Gg(n,e.type);n!==l&&(N(st,e),N(et,l))}function _t(e){st.current===e&&(V(et),V(st)),dt.current===e&&(V(dt),_a._currentValue=Y)}var vt,Et;function Ot(e){if(vt===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);vt=n&&n[1]||"",Et=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+vt+e+Et}var It=!1;function Ut(e,n){if(!e||It)return"";It=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(tt){var J=tt}Reflect.construct(e,[],ot)}else{try{ot.call()}catch(tt){J=tt}e.call(ot.prototype)}}else{try{throw Error()}catch(tt){J=tt}(ot=e())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(tt){if(tt&&J&&typeof tt.stack=="string")return[tt.stack,J.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=o.DetermineComponentFrameRoot(),b=h[0],_=h[1];if(b&&_){var U=b.split(`
4
+ `),P=_.split(`
5
+ `);for(f=o=0;o<U.length&&!U[o].includes("DetermineComponentFrameRoot");)o++;for(;f<P.length&&!P[f].includes("DetermineComponentFrameRoot");)f++;if(o===U.length||f===P.length)for(o=U.length-1,f=P.length-1;1<=o&&0<=f&&U[o]!==P[f];)f--;for(;1<=o&&0<=f;o--,f--)if(U[o]!==P[f]){if(o!==1||f!==1)do if(o--,f--,0>f||U[o]!==P[f]){var rt=`
6
+ `+U[o].replace(" at new "," at ");return e.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",e.displayName)),rt}while(1<=o&&0<=f);break}}}finally{It=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ot(l):""}function oe(e,n){switch(e.tag){case 26:case 27:case 5:return Ot(e.type);case 16:return Ot("Lazy");case 13:return e.child!==n&&n!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return Ut(e.type,!1);case 11:return Ut(e.type.render,!1);case 1:return Ut(e.type,!0);case 31:return Ot("Activity");default:return""}}function Ke(e){try{var n="",l=null;do n+=oe(e,l),l=e,e=e.return;while(e);return n}catch(o){return`
7
+ Error generating stack: `+o.message+`
8
+ `+o.stack}}var Ae=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,xn=t.unstable_cancelCallback,Yn=t.unstable_shouldYield,Qn=t.unstable_requestPaint,ve=t.unstable_now,gi=t.unstable_getCurrentPriorityLevel,it=t.unstable_ImmediatePriority,ht=t.unstable_UserBlockingPriority,bt=t.unstable_NormalPriority,zt=t.unstable_LowPriority,Lt=t.unstable_IdlePriority,ke=t.log,bn=t.unstable_setDisableYieldValue,we=null,ue=null;function Me(e){if(typeof ke=="function"&&bn(e),ue&&typeof ue.setStrictMode=="function")try{ue.setStrictMode(we,e)}catch{}}var Xt=Math.clz32?Math.clz32:ks,zn=Math.log,$e=Math.LN2;function ks(e){return e>>>=0,e===0?32:31-(zn(e)/$e|0)|0}var zr=256,Or=262144,Dr=4194304;function Xn(e){var n=e&42;if(n!==0)return n;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function kr(e,n,l){var o=e.pendingLanes;if(o===0)return 0;var f=0,h=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var _=o&134217727;return _!==0?(o=_&~h,o!==0?f=Xn(o):(b&=_,b!==0?f=Xn(b):l||(l=_&~e,l!==0&&(f=Xn(l))))):(_=o&~h,_!==0?f=Xn(_):b!==0?f=Xn(b):l||(l=o&~e,l!==0&&(f=Xn(l)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,l=n&-n,h>=l||h===32&&(l&4194048)!==0)?n:f}function Ji(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Rs(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fo(){var e=Dr;return Dr<<=1,(Dr&62914560)===0&&(Dr=4194304),e}function Hl(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function Wi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hs(e,n,l,o,f,h){var b=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var _=e.entanglements,U=e.expirationTimes,P=e.hiddenUpdates;for(l=b&~l;0<l;){var rt=31-Xt(l),ot=1<<rt;_[rt]=0,U[rt]=-1;var J=P[rt];if(J!==null)for(P[rt]=null,rt=0;rt<J.length;rt++){var tt=J[rt];tt!==null&&(tt.lane&=-536870913)}l&=~ot}o!==0&&ho(e,o,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(b&~n))}function ho(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Xt(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|l&261930}function po(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var o=31-Xt(l),f=1<<o;f&n|e[o]&n&&(e[o]|=n),l&=~f}}function mo(e,n){var l=n&-n;return l=(l&42)!==0?1:jl(l),(l&(e.suspendedLanes|n))!==0?0:l}function jl(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ll(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function go(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:my(e.type))}function yo(e,n){var l=L.p;try{return L.p=e,n()}finally{L.p=l}}var On=Math.random().toString(36).slice(2),xe="__reactFiber$"+On,ze="__reactProps$"+On,Gn="__reactContainer$"+On,Rr="__reactEvents$"+On,vo="__reactListeners$"+On,js="__reactHandles$"+On,xo="__reactResources$"+On,tr="__reactMarker$"+On;function Bl(e){delete e[xe],delete e[ze],delete e[Rr],delete e[vo],delete e[js]}function yi(e){var n=e[xe];if(n)return n;for(var l=e.parentNode;l;){if(n=l[Gn]||l[xe]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=Wg(e);e!==null;){if(l=e[xe])return l;e=Wg(e)}return n}e=l,l=e.parentNode}return null}function vi(e){if(e=e[xe]||e[Gn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function xi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(a(33))}function bi(e){var n=e[xo];return n||(n=e[xo]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function fe(e){e[tr]=!0}var bo=new Set,So={};function Zn(e,n){Si(e,n),Si(e+"Capture",n)}function Si(e,n){for(So[e]=n,e=0;e<n.length;e++)bo.add(n[e])}var Ls=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]*$"),Ul={},wo={};function Bs(e){return Ae.call(wo,e)?!0:Ae.call(Ul,e)?!1:Ls.test(e)?wo[e]=!0:(Ul[e]=!0,!1)}function Hr(e,n,l){if(Bs(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function jr(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function Sn(e,n,l,o){if(o===null)e.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+o)}}function je(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eo(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Us(e,n,l){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,h=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(b){l=""+b,h.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Lr(e){if(!e._valueTracker){var n=Eo(e)?"checked":"value";e._valueTracker=Us(e,n,""+e[n])}}function _o(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),o="";return e&&(o=Eo(e)?e.checked?"true":"false":e.value),e=o,e!==l?(n.setValue(e),!0):!1}function er(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var qs=/[\n"\\]/g;function Le(e){return e.replace(qs,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function nr(e,n,l,o,f,h,b,_){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+je(n)):e.value!==""+je(n)&&(e.value=""+je(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?ql(e,b,je(n)):l!=null?ql(e,b,je(l)):o!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+je(_):e.removeAttribute("name")}function Co(e,n,l,o,f,h,b,_){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||l!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Lr(e);return}l=l!=null?""+je(l):"",n=n!=null?""+je(n):l,_||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=_?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Lr(e)}function ql(e,n,l){n==="number"&&er(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Fn(e,n,l,o){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&o&&(e[l].defaultSelected=!0)}else{for(l=""+je(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function qh(e,n,l){if(n!=null&&(n=""+je(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+je(l):""}function Vh(e,n,l,o){if(n==null){if(o!=null){if(l!=null)throw Error(a(92));if(B(o)){if(1<o.length)throw Error(a(93));o=o[0]}l=o}l==null&&(l=""),n=l}l=je(n),e.defaultValue=l,o=e.textContent,o===l&&o!==""&&o!==null&&(e.value=o),Lr(e)}function Br(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var gb=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 Ih(e,n,l){var o=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,l):typeof l!="number"||l===0||gb.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function Yh(e,n,l){if(n!=null&&typeof n!="object")throw Error(a(62));if(e=e.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&l[f]!==o&&Ih(e,f,o)}else for(var h in n)n.hasOwnProperty(h)&&Ih(e,h,n[h])}function Vs(e){if(e.indexOf("-")===-1)return!1;switch(e){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 yb=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"]]),vb=/^[\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 No(e){return vb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kn(){}var Is=null;function Ys(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ur=null,qr=null;function Qh(e){var n=vi(e);if(n&&(e=n.stateNode)){var l=e[ze]||null;t:switch(e=n.stateNode,n.type){case"input":if(nr(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Le(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var o=l[n];if(o!==e&&o.form===e.form){var f=o[ze]||null;if(!f)throw Error(a(90));nr(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<l.length;n++)o=l[n],o.form===e.form&&_o(o)}break t;case"textarea":qh(e,l.value,l.defaultValue);break t;case"select":n=l.value,n!=null&&Fn(e,!!l.multiple,n,!1)}}}var Qs=!1;function Xh(e,n,l){if(Qs)return e(n,l);Qs=!0;try{var o=e(n);return o}finally{if(Qs=!1,(Ur!==null||qr!==null)&&(hu(),Ur&&(n=Ur,e=qr,qr=Ur=null,Qh(n),e)))for(n=0;n<e.length;n++)Qh(e[n])}}function Vl(e,n){var l=e.stateNode;if(l===null)return null;var o=l[ze]||null;if(o===null)return null;l=o[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break t;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,n,typeof l));return l}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xs=!1;if($n)try{var Il={};Object.defineProperty(Il,"passive",{get:function(){Xs=!0}}),window.addEventListener("test",Il,Il),window.removeEventListener("test",Il,Il)}catch{Xs=!1}var wi=null,Gs=null,To=null;function Gh(){if(To)return To;var e,n=Gs,l=n.length,o,f="value"in wi?wi.value:wi.textContent,h=f.length;for(e=0;e<l&&n[e]===f[e];e++);var b=l-e;for(o=1;o<=b&&n[l-o]===f[h-o];o++);return To=f.slice(e,1<o?1-o:void 0)}function Ao(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Mo(){return!0}function Zh(){return!1}function Be(e){function n(l,o,f,h,b){this._reactName=l,this._targetInst=f,this.type=o,this.nativeEvent=h,this.target=b,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(l=e[_],this[_]=l?l(h):h[_]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Mo:Zh,this.isPropagationStopped=Zh,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Mo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Mo)},persist:function(){},isPersistent:Mo}),n}var ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zo=Be(ir),Yl=y({},ir,{view:0,detail:0}),xb=Be(Yl),Zs,Fs,Ql,Oo=y({},Yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$s,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ql&&(Ql&&e.type==="mousemove"?(Zs=e.screenX-Ql.screenX,Fs=e.screenY-Ql.screenY):Fs=Zs=0,Ql=e),Zs)},movementY:function(e){return"movementY"in e?e.movementY:Fs}}),Fh=Be(Oo),bb=y({},Oo,{dataTransfer:0}),Sb=Be(bb),wb=y({},Yl,{relatedTarget:0}),Ks=Be(wb),Eb=y({},ir,{animationName:0,elapsedTime:0,pseudoElement:0}),_b=Be(Eb),Cb=y({},ir,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Nb=Be(Cb),Tb=y({},ir,{data:0}),Kh=Be(Tb),Ab={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mb={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"},zb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ob(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=zb[e])?!!n[e]:!1}function $s(){return Ob}var Db=y({},Yl,{key:function(e){if(e.key){var n=Ab[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$s,charCode:function(e){return e.type==="keypress"?Ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kb=Be(Db),Rb=y({},Oo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$h=Be(Rb),Hb=y({},Yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$s}),jb=Be(Hb),Lb=y({},ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bb=Be(Lb),Ub=y({},Oo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),qb=Be(Ub),Vb=y({},ir,{newState:0,oldState:0}),Ib=Be(Vb),Yb=[9,13,27,32],Ps=$n&&"CompositionEvent"in window,Xl=null;$n&&"documentMode"in document&&(Xl=document.documentMode);var Qb=$n&&"TextEvent"in window&&!Xl,Ph=$n&&(!Ps||Xl&&8<Xl&&11>=Xl),Jh=" ",Wh=!1;function tp(e,n){switch(e){case"keyup":return Yb.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ep(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vr=!1;function Xb(e,n){switch(e){case"compositionend":return ep(n);case"keypress":return n.which!==32?null:(Wh=!0,Jh);case"textInput":return e=n.data,e===Jh&&Wh?null:e;default:return null}}function Gb(e,n){if(Vr)return e==="compositionend"||!Ps&&tp(e,n)?(e=Gh(),To=Gs=wi=null,Vr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Ph&&n.locale!=="ko"?null:n.data;default:return null}}var Zb={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 np(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Zb[e.type]:n==="textarea"}function ip(e,n,l,o){Ur?qr?qr.push(o):qr=[o]:Ur=o,n=bu(n,"onChange"),0<n.length&&(l=new zo("onChange","change",null,l,o),e.push({event:l,listeners:n}))}var Gl=null,Zl=null;function Fb(e){Ug(e,0)}function Do(e){var n=xi(e);if(_o(n))return e}function rp(e,n){if(e==="change")return n}var lp=!1;if($n){var Js;if($n){var Ws="oninput"in document;if(!Ws){var ap=document.createElement("div");ap.setAttribute("oninput","return;"),Ws=typeof ap.oninput=="function"}Js=Ws}else Js=!1;lp=Js&&(!document.documentMode||9<document.documentMode)}function op(){Gl&&(Gl.detachEvent("onpropertychange",up),Zl=Gl=null)}function up(e){if(e.propertyName==="value"&&Do(Zl)){var n=[];ip(n,Zl,e,Ys(e)),Xh(Fb,n)}}function Kb(e,n,l){e==="focusin"?(op(),Gl=n,Zl=l,Gl.attachEvent("onpropertychange",up)):e==="focusout"&&op()}function $b(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Do(Zl)}function Pb(e,n){if(e==="click")return Do(n)}function Jb(e,n){if(e==="input"||e==="change")return Do(n)}function Wb(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pe=typeof Object.is=="function"?Object.is:Wb;function Fl(e,n){if(Pe(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),o=Object.keys(n);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var f=l[o];if(!Ae.call(n,f)||!Pe(e[f],n[f]))return!1}return!0}function sp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cp(e,n){var l=sp(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=n&&o>=n)return{node:l,offset:n-e};e=o}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=sp(l)}}function fp(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?fp(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function dp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=er(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=er(e.document)}return n}function tc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var tS=$n&&"documentMode"in document&&11>=document.documentMode,Ir=null,ec=null,Kl=null,nc=!1;function hp(e,n,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;nc||Ir==null||Ir!==er(o)||(o=Ir,"selectionStart"in o&&tc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Kl&&Fl(Kl,o)||(Kl=o,o=bu(ec,"onSelect"),0<o.length&&(n=new zo("onSelect","select",null,n,l),e.push({event:n,listeners:o}),n.target=Ir)))}function rr(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Yr={animationend:rr("Animation","AnimationEnd"),animationiteration:rr("Animation","AnimationIteration"),animationstart:rr("Animation","AnimationStart"),transitionrun:rr("Transition","TransitionRun"),transitionstart:rr("Transition","TransitionStart"),transitioncancel:rr("Transition","TransitionCancel"),transitionend:rr("Transition","TransitionEnd")},ic={},pp={};$n&&(pp=document.createElement("div").style,"AnimationEvent"in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),"TransitionEvent"in window||delete Yr.transitionend.transition);function lr(e){if(ic[e])return ic[e];if(!Yr[e])return e;var n=Yr[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in pp)return ic[e]=n[l];return e}var mp=lr("animationend"),gp=lr("animationiteration"),yp=lr("animationstart"),eS=lr("transitionrun"),nS=lr("transitionstart"),iS=lr("transitioncancel"),vp=lr("transitionend"),xp=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 wn(e,n){xp.set(e,n),Zn(n,[e])}var ko=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sn=[],Qr=0,lc=0;function Ro(){for(var e=Qr,n=lc=Qr=0;n<e;){var l=sn[n];sn[n++]=null;var o=sn[n];sn[n++]=null;var f=sn[n];sn[n++]=null;var h=sn[n];if(sn[n++]=null,o!==null&&f!==null){var b=o.pending;b===null?f.next=f:(f.next=b.next,b.next=f),o.pending=f}h!==0&&bp(l,f,h)}}function Ho(e,n,l,o){sn[Qr++]=e,sn[Qr++]=n,sn[Qr++]=l,sn[Qr++]=o,lc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function ac(e,n,l,o){return Ho(e,n,l,o),jo(e)}function ar(e,n){return Ho(e,null,null,n),jo(e)}function bp(e,n,l){e.lanes|=l;var o=e.alternate;o!==null&&(o.lanes|=l);for(var f=!1,h=e.return;h!==null;)h.childLanes|=l,o=h.alternate,o!==null&&(o.childLanes|=l),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&n!==null&&(f=31-Xt(l),e=h.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=l|536870912),h):null}function jo(e){if(50<ya)throw ya=0,gf=null,Error(a(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Xr={};function rS(e,n,l,o){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Je(e,n,l,o){return new rS(e,n,l,o)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pn(e,n){var l=e.alternate;return l===null?(l=Je(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Sp(e,n){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Lo(e,n,l,o,f,h){var b=0;if(o=e,typeof e=="function")oc(e)&&(b=1);else if(typeof e=="string")b=sw(e,l,et.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case Z:return e=Je(31,l,n,f),e.elementType=Z,e.lanes=h,e;case C:return or(l.children,f,h,n);case M:b=8,f|=24;break;case E:return e=Je(12,l,n,f|2),e.elementType=E,e.lanes=h,e;case I:return e=Je(13,l,n,f),e.elementType=I,e.lanes=h,e;case D:return e=Je(19,l,n,f),e.elementType=D,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w:b=10;break t;case H:b=9;break t;case k:b=11;break t;case j:b=14;break t;case q:b=16,o=null;break t}b=29,l=Error(a(130,e===null?"null":typeof e,"")),o=null}return n=Je(b,l,n,f),n.elementType=e,n.type=o,n.lanes=h,n}function or(e,n,l,o){return e=Je(7,e,o,n),e.lanes=l,e}function uc(e,n,l){return e=Je(6,e,null,n),e.lanes=l,e}function wp(e){var n=Je(18,null,null,0);return n.stateNode=e,n}function sc(e,n,l){return n=Je(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Ep=new WeakMap;function cn(e,n){if(typeof e=="object"&&e!==null){var l=Ep.get(e);return l!==void 0?l:(n={value:e,source:n,stack:Ke(n)},Ep.set(e,n),n)}return{value:e,source:n,stack:Ke(n)}}var Gr=[],Zr=0,Bo=null,$l=0,fn=[],dn=0,Ei=null,Dn=1,kn="";function Jn(e,n){Gr[Zr++]=$l,Gr[Zr++]=Bo,Bo=e,$l=n}function _p(e,n,l){fn[dn++]=Dn,fn[dn++]=kn,fn[dn++]=Ei,Ei=e;var o=Dn;e=kn;var f=32-Xt(o)-1;o&=~(1<<f),l+=1;var h=32-Xt(n)+f;if(30<h){var b=f-f%5;h=(o&(1<<b)-1).toString(32),o>>=b,f-=b,Dn=1<<32-Xt(n)+f|l<<f|o,kn=h+e}else Dn=1<<h|l<<f|o,kn=e}function cc(e){e.return!==null&&(Jn(e,1),_p(e,1,0))}function fc(e){for(;e===Bo;)Bo=Gr[--Zr],Gr[Zr]=null,$l=Gr[--Zr],Gr[Zr]=null;for(;e===Ei;)Ei=fn[--dn],fn[dn]=null,kn=fn[--dn],fn[dn]=null,Dn=fn[--dn],fn[dn]=null}function Cp(e,n){fn[dn++]=Dn,fn[dn++]=kn,fn[dn++]=Ei,Dn=n.id,kn=n.overflow,Ei=e}var Ee=null,te=null,jt=!1,_i=null,hn=!1,dc=Error(a(519));function Ci(e){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pl(cn(n,e)),dc}function Np(e){var n=e.stateNode,l=e.type,o=e.memoizedProps;switch(n[xe]=e,n[ze]=o,l){case"dialog":kt("cancel",n),kt("close",n);break;case"iframe":case"object":case"embed":kt("load",n);break;case"video":case"audio":for(l=0;l<xa.length;l++)kt(xa[l],n);break;case"source":kt("error",n);break;case"img":case"image":case"link":kt("error",n),kt("load",n);break;case"details":kt("toggle",n);break;case"input":kt("invalid",n),Co(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":kt("invalid",n);break;case"textarea":kt("invalid",n),Vh(n,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||o.suppressHydrationWarning===!0||Yg(n.textContent,l)?(o.popover!=null&&(kt("beforetoggle",n),kt("toggle",n)),o.onScroll!=null&&kt("scroll",n),o.onScrollEnd!=null&&kt("scrollend",n),o.onClick!=null&&(n.onclick=Kn),n=!0):n=!1,n||Ci(e,!0)}function Tp(e){for(Ee=e.return;Ee;)switch(Ee.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:Ee=Ee.return}}function Fr(e){if(e!==Ee)return!1;if(!jt)return Tp(e),jt=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Of(e.type,e.memoizedProps)),l=!l),l&&te&&Ci(e),Tp(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));te=Jg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));te=Jg(e)}else n===27?(n=te,Ui(e.type)?(e=jf,jf=null,te=e):te=n):te=Ee?mn(e.stateNode.nextSibling):null;return!0}function ur(){te=Ee=null,jt=!1}function hc(){var e=_i;return e!==null&&(Ie===null?Ie=e:Ie.push.apply(Ie,e),_i=null),e}function Pl(e){_i===null?_i=[e]:_i.push(e)}var pc=O(null),sr=null,Wn=null;function Ni(e,n,l){N(pc,n._currentValue),n._currentValue=l}function ti(e){e._currentValue=pc.current,V(pc)}function mc(e,n,l){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===l)break;e=e.return}}function gc(e,n,l,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var b=f.child;h=h.firstContext;t:for(;h!==null;){var _=h;h=f;for(var U=0;U<n.length;U++)if(_.context===n[U]){h.lanes|=l,_=h.alternate,_!==null&&(_.lanes|=l),mc(h.return,l,e),o||(b=null);break t}h=_.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(a(341));b.lanes|=l,h=b.alternate,h!==null&&(h.lanes|=l),mc(b,l,e),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===e){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function Kr(e,n,l,o){e=null;for(var f=n,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(a(387));if(b=b.memoizedProps,b!==null){var _=f.type;Pe(f.pendingProps.value,b.value)||(e!==null?e.push(_):e=[_])}}else if(f===dt.current){if(b=f.alternate,b===null)throw Error(a(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(_a):e=[_a])}f=f.return}e!==null&&gc(n,e,l,o),n.flags|=262144}function Uo(e){for(e=e.firstContext;e!==null;){if(!Pe(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function cr(e){sr=e,Wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _e(e){return Ap(sr,e)}function qo(e,n){return sr===null&&cr(e),Ap(e,n)}function Ap(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Wn===null){if(e===null)throw Error(a(308));Wn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Wn=Wn.next=n;return l}var lS=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},aS=t.unstable_scheduleCallback,oS=t.unstable_NormalPriority,de={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new lS,data:new Map,refCount:0}}function Jl(e){e.refCount--,e.refCount===0&&aS(oS,function(){e.controller.abort()})}var Wl=null,vc=0,$r=0,Pr=null;function uS(e,n){if(Wl===null){var l=Wl=[];vc=0,$r=wf(),Pr={status:"pending",value:void 0,then:function(o){l.push(o)}}}return vc++,n.then(Mp,Mp),n}function Mp(){if(--vc===0&&Wl!==null){Pr!==null&&(Pr.status="fulfilled");var e=Wl;Wl=null,$r=0,Pr=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function sS(e,n){var l=[],o={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<l.length;f++)(0,l[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),o}var zp=A.S;A.S=function(e,n){hg=ve(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&uS(e,n),zp!==null&&zp(e,n)};var fr=O(null);function xc(){var e=fr.current;return e!==null?e:Pt.pooledCache}function Vo(e,n){n===null?N(fr,fr.current):N(fr,n.pool)}function Op(){var e=xc();return e===null?null:{parent:de._currentValue,pool:e}}var Jr=Error(a(460)),bc=Error(a(474)),Io=Error(a(542)),Yo={then:function(){}};function Dp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function kp(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Kn,Kn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Hp(e),e;default:if(typeof n.status=="string")n.then(Kn,Kn);else{if(e=Pt,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Hp(e),e}throw hr=n,Jr}}function dr(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(hr=l,Jr):l}}var hr=null;function Rp(){if(hr===null)throw Error(a(459));var e=hr;return hr=null,e}function Hp(e){if(e===Jr||e===Io)throw Error(a(483))}var Wr=null,ta=0;function Qo(e){var n=ta;return ta+=1,Wr===null&&(Wr=[]),kp(Wr,e,n)}function ea(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Xo(e,n){throw n.$$typeof===v?Error(a(525)):(e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function jp(e){function n(F,X){if(e){var $=F.deletions;$===null?(F.deletions=[X],F.flags|=16):$.push(X)}}function l(F,X){if(!e)return null;for(;X!==null;)n(F,X),X=X.sibling;return null}function o(F){for(var X=new Map;F!==null;)F.key!==null?X.set(F.key,F):X.set(F.index,F),F=F.sibling;return X}function f(F,X){return F=Pn(F,X),F.index=0,F.sibling=null,F}function h(F,X,$){return F.index=$,e?($=F.alternate,$!==null?($=$.index,$<X?(F.flags|=67108866,X):$):(F.flags|=67108866,X)):(F.flags|=1048576,X)}function b(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function _(F,X,$,at){return X===null||X.tag!==6?(X=uc($,F.mode,at),X.return=F,X):(X=f(X,$),X.return=F,X)}function U(F,X,$,at){var yt=$.type;return yt===C?rt(F,X,$.props.children,at,$.key):X!==null&&(X.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===q&&dr(yt)===X.type)?(X=f(X,$.props),ea(X,$),X.return=F,X):(X=Lo($.type,$.key,$.props,null,F.mode,at),ea(X,$),X.return=F,X)}function P(F,X,$,at){return X===null||X.tag!==4||X.stateNode.containerInfo!==$.containerInfo||X.stateNode.implementation!==$.implementation?(X=sc($,F.mode,at),X.return=F,X):(X=f(X,$.children||[]),X.return=F,X)}function rt(F,X,$,at,yt){return X===null||X.tag!==7?(X=or($,F.mode,at,yt),X.return=F,X):(X=f(X,$),X.return=F,X)}function ot(F,X,$){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=uc(""+X,F.mode,$),X.return=F,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case x:return $=Lo(X.type,X.key,X.props,null,F.mode,$),ea($,X),$.return=F,$;case S:return X=sc(X,F.mode,$),X.return=F,X;case q:return X=dr(X),ot(F,X,$)}if(B(X)||G(X))return X=or(X,F.mode,$,null),X.return=F,X;if(typeof X.then=="function")return ot(F,Qo(X),$);if(X.$$typeof===w)return ot(F,qo(F,X),$);Xo(F,X)}return null}function J(F,X,$,at){var yt=X!==null?X.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return yt!==null?null:_(F,X,""+$,at);if(typeof $=="object"&&$!==null){switch($.$$typeof){case x:return $.key===yt?U(F,X,$,at):null;case S:return $.key===yt?P(F,X,$,at):null;case q:return $=dr($),J(F,X,$,at)}if(B($)||G($))return yt!==null?null:rt(F,X,$,at,null);if(typeof $.then=="function")return J(F,X,Qo($),at);if($.$$typeof===w)return J(F,X,qo(F,$),at);Xo(F,$)}return null}function tt(F,X,$,at,yt){if(typeof at=="string"&&at!==""||typeof at=="number"||typeof at=="bigint")return F=F.get($)||null,_(X,F,""+at,yt);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case x:return F=F.get(at.key===null?$:at.key)||null,U(X,F,at,yt);case S:return F=F.get(at.key===null?$:at.key)||null,P(X,F,at,yt);case q:return at=dr(at),tt(F,X,$,at,yt)}if(B(at)||G(at))return F=F.get($)||null,rt(X,F,at,yt,null);if(typeof at.then=="function")return tt(F,X,$,Qo(at),yt);if(at.$$typeof===w)return tt(F,X,$,qo(X,at),yt);Xo(X,at)}return null}function mt(F,X,$,at){for(var yt=null,qt=null,gt=X,At=X=0,Ht=null;gt!==null&&At<$.length;At++){gt.index>At?(Ht=gt,gt=null):Ht=gt.sibling;var Vt=J(F,gt,$[At],at);if(Vt===null){gt===null&&(gt=Ht);break}e&&gt&&Vt.alternate===null&&n(F,gt),X=h(Vt,X,At),qt===null?yt=Vt:qt.sibling=Vt,qt=Vt,gt=Ht}if(At===$.length)return l(F,gt),jt&&Jn(F,At),yt;if(gt===null){for(;At<$.length;At++)gt=ot(F,$[At],at),gt!==null&&(X=h(gt,X,At),qt===null?yt=gt:qt.sibling=gt,qt=gt);return jt&&Jn(F,At),yt}for(gt=o(gt);At<$.length;At++)Ht=tt(gt,F,At,$[At],at),Ht!==null&&(e&&Ht.alternate!==null&&gt.delete(Ht.key===null?At:Ht.key),X=h(Ht,X,At),qt===null?yt=Ht:qt.sibling=Ht,qt=Ht);return e&&gt.forEach(function(Qi){return n(F,Qi)}),jt&&Jn(F,At),yt}function St(F,X,$,at){if($==null)throw Error(a(151));for(var yt=null,qt=null,gt=X,At=X=0,Ht=null,Vt=$.next();gt!==null&&!Vt.done;At++,Vt=$.next()){gt.index>At?(Ht=gt,gt=null):Ht=gt.sibling;var Qi=J(F,gt,Vt.value,at);if(Qi===null){gt===null&&(gt=Ht);break}e&&gt&&Qi.alternate===null&&n(F,gt),X=h(Qi,X,At),qt===null?yt=Qi:qt.sibling=Qi,qt=Qi,gt=Ht}if(Vt.done)return l(F,gt),jt&&Jn(F,At),yt;if(gt===null){for(;!Vt.done;At++,Vt=$.next())Vt=ot(F,Vt.value,at),Vt!==null&&(X=h(Vt,X,At),qt===null?yt=Vt:qt.sibling=Vt,qt=Vt);return jt&&Jn(F,At),yt}for(gt=o(gt);!Vt.done;At++,Vt=$.next())Vt=tt(gt,F,At,Vt.value,at),Vt!==null&&(e&&Vt.alternate!==null&&gt.delete(Vt.key===null?At:Vt.key),X=h(Vt,X,At),qt===null?yt=Vt:qt.sibling=Vt,qt=Vt);return e&&gt.forEach(function(bw){return n(F,bw)}),jt&&Jn(F,At),yt}function $t(F,X,$,at){if(typeof $=="object"&&$!==null&&$.type===C&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case x:t:{for(var yt=$.key;X!==null;){if(X.key===yt){if(yt=$.type,yt===C){if(X.tag===7){l(F,X.sibling),at=f(X,$.props.children),at.return=F,F=at;break t}}else if(X.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===q&&dr(yt)===X.type){l(F,X.sibling),at=f(X,$.props),ea(at,$),at.return=F,F=at;break t}l(F,X);break}else n(F,X);X=X.sibling}$.type===C?(at=or($.props.children,F.mode,at,$.key),at.return=F,F=at):(at=Lo($.type,$.key,$.props,null,F.mode,at),ea(at,$),at.return=F,F=at)}return b(F);case S:t:{for(yt=$.key;X!==null;){if(X.key===yt)if(X.tag===4&&X.stateNode.containerInfo===$.containerInfo&&X.stateNode.implementation===$.implementation){l(F,X.sibling),at=f(X,$.children||[]),at.return=F,F=at;break t}else{l(F,X);break}else n(F,X);X=X.sibling}at=sc($,F.mode,at),at.return=F,F=at}return b(F);case q:return $=dr($),$t(F,X,$,at)}if(B($))return mt(F,X,$,at);if(G($)){if(yt=G($),typeof yt!="function")throw Error(a(150));return $=yt.call($),St(F,X,$,at)}if(typeof $.then=="function")return $t(F,X,Qo($),at);if($.$$typeof===w)return $t(F,X,qo(F,$),at);Xo(F,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,X!==null&&X.tag===6?(l(F,X.sibling),at=f(X,$),at.return=F,F=at):(l(F,X),at=uc($,F.mode,at),at.return=F,F=at),b(F)):l(F,X)}return function(F,X,$,at){try{ta=0;var yt=$t(F,X,$,at);return Wr=null,yt}catch(gt){if(gt===Jr||gt===Io)throw gt;var qt=Je(29,gt,null,F.mode);return qt.lanes=at,qt.return=F,qt}}}var pr=jp(!0),Lp=jp(!1),Ti=!1;function Sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wc(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ai(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mi(e,n,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Yt&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=jo(e),bp(e,null,l),n}return Ho(e,o,n,l),jo(e)}function na(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,po(e,l)}}function Ec(e,n){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var f=null,h=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};h===null?f=h=b:h=h.next=b,l=l.next}while(l!==null);h===null?f=h=n:h=h.next=n}else f=h=n;l={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var _c=!1;function ia(){if(_c){var e=Pr;if(e!==null)throw e}}function ra(e,n,l,o){_c=!1;var f=e.updateQueue;Ti=!1;var h=f.firstBaseUpdate,b=f.lastBaseUpdate,_=f.shared.pending;if(_!==null){f.shared.pending=null;var U=_,P=U.next;U.next=null,b===null?h=P:b.next=P,b=U;var rt=e.alternate;rt!==null&&(rt=rt.updateQueue,_=rt.lastBaseUpdate,_!==b&&(_===null?rt.firstBaseUpdate=P:_.next=P,rt.lastBaseUpdate=U))}if(h!==null){var ot=f.baseState;b=0,rt=P=U=null,_=h;do{var J=_.lane&-536870913,tt=J!==_.lane;if(tt?(Rt&J)===J:(o&J)===J){J!==0&&J===$r&&(_c=!0),rt!==null&&(rt=rt.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});t:{var mt=e,St=_;J=n;var $t=l;switch(St.tag){case 1:if(mt=St.payload,typeof mt=="function"){ot=mt.call($t,ot,J);break t}ot=mt;break t;case 3:mt.flags=mt.flags&-65537|128;case 0:if(mt=St.payload,J=typeof mt=="function"?mt.call($t,ot,J):mt,J==null)break t;ot=y({},ot,J);break t;case 2:Ti=!0}}J=_.callback,J!==null&&(e.flags|=64,tt&&(e.flags|=8192),tt=f.callbacks,tt===null?f.callbacks=[J]:tt.push(J))}else tt={lane:J,tag:_.tag,payload:_.payload,callback:_.callback,next:null},rt===null?(P=rt=tt,U=ot):rt=rt.next=tt,b|=J;if(_=_.next,_===null){if(_=f.shared.pending,_===null)break;tt=_,_=tt.next,tt.next=null,f.lastBaseUpdate=tt,f.shared.pending=null}}while(!0);rt===null&&(U=ot),f.baseState=U,f.firstBaseUpdate=P,f.lastBaseUpdate=rt,h===null&&(f.shared.lanes=0),Ri|=b,e.lanes=b,e.memoizedState=ot}}function Bp(e,n){if(typeof e!="function")throw Error(a(191,e));e.call(n)}function Up(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Bp(l[e],n)}var tl=O(null),Go=O(0);function qp(e,n){e=si,N(Go,e),N(tl,n),si=e|n.baseLanes}function Cc(){N(Go,si),N(tl,tl.current)}function Nc(){si=Go.current,V(tl),V(Go)}var We=O(null),pn=null;function zi(e){var n=e.alternate;N(se,se.current&1),N(We,e),pn===null&&(n===null||tl.current!==null||n.memoizedState!==null)&&(pn=e)}function Tc(e){N(se,se.current),N(We,e),pn===null&&(pn=e)}function Vp(e){e.tag===22?(N(se,se.current),N(We,e),pn===null&&(pn=e)):Oi()}function Oi(){N(se,se.current),N(We,We.current)}function tn(e){V(We),pn===e&&(pn=null),V(se)}var se=O(0);function Zo(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Rf(l)||Hf(l)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var ei=0,Tt=null,Ft=null,he=null,Fo=!1,el=!1,mr=!1,Ko=0,la=0,nl=null,cS=0;function le(){throw Error(a(321))}function Ac(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Pe(e[l],n[l]))return!1;return!0}function Mc(e,n,l,o,f,h){return ei=h,Tt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,A.H=e===null||e.memoizedState===null?_m:Qc,mr=!1,h=l(o,f),mr=!1,el&&(h=Yp(n,l,o,f)),Ip(e),h}function Ip(e){A.H=ua;var n=Ft!==null&&Ft.next!==null;if(ei=0,he=Ft=Tt=null,Fo=!1,la=0,nl=null,n)throw Error(a(300));e===null||pe||(e=e.dependencies,e!==null&&Uo(e)&&(pe=!0))}function Yp(e,n,l,o){Tt=e;var f=0;do{if(el&&(nl=null),la=0,el=!1,25<=f)throw Error(a(301));if(f+=1,he=Ft=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}A.H=Cm,h=n(l,o)}while(el);return h}function fS(){var e=A.H,n=e.useState()[0];return n=typeof n.then=="function"?aa(n):n,e=e.useState()[0],(Ft!==null?Ft.memoizedState:null)!==e&&(Tt.flags|=1024),n}function zc(){var e=Ko!==0;return Ko=0,e}function Oc(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function Dc(e){if(Fo){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Fo=!1}ei=0,he=Ft=Tt=null,el=!1,la=Ko=0,nl=null}function Re(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return he===null?Tt.memoizedState=he=e:he=he.next=e,he}function ce(){if(Ft===null){var e=Tt.alternate;e=e!==null?e.memoizedState:null}else e=Ft.next;var n=he===null?Tt.memoizedState:he.next;if(n!==null)he=n,Ft=e;else{if(e===null)throw Tt.alternate===null?Error(a(467)):Error(a(310));Ft=e,e={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},he===null?Tt.memoizedState=he=e:he=he.next=e}return he}function $o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function aa(e){var n=la;return la+=1,nl===null&&(nl=[]),e=kp(nl,e,n),n=Tt,(he===null?n.memoizedState:he.next)===null&&(n=n.alternate,A.H=n===null||n.memoizedState===null?_m:Qc),e}function Po(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return aa(e);if(e.$$typeof===w)return _e(e)}throw Error(a(438,String(e)))}function kc(e){var n=null,l=Tt.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var o=Tt.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=$o(),Tt.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),o=0;o<e;o++)l[o]=lt;return n.index++,l}function ni(e,n){return typeof n=="function"?n(e):n}function Jo(e){var n=ce();return Rc(n,Ft,e)}function Rc(e,n,l){var o=e.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=l;var f=e.baseQueue,h=o.pending;if(h!==null){if(f!==null){var b=f.next;f.next=h.next,h.next=b}n.baseQueue=f=h,o.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{n=f.next;var _=b=null,U=null,P=n,rt=!1;do{var ot=P.lane&-536870913;if(ot!==P.lane?(Rt&ot)===ot:(ei&ot)===ot){var J=P.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),ot===$r&&(rt=!0);else if((ei&J)===J){P=P.next,J===$r&&(rt=!0);continue}else ot={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},U===null?(_=U=ot,b=h):U=U.next=ot,Tt.lanes|=J,Ri|=J;ot=P.action,mr&&l(h,ot),h=P.hasEagerState?P.eagerState:l(h,ot)}else J={lane:ot,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},U===null?(_=U=J,b=h):U=U.next=J,Tt.lanes|=ot,Ri|=ot;P=P.next}while(P!==null&&P!==n);if(U===null?b=h:U.next=_,!Pe(h,e.memoizedState)&&(pe=!0,rt&&(l=Pr,l!==null)))throw l;e.memoizedState=h,e.baseState=b,e.baseQueue=U,o.lastRenderedState=h}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Hc(e){var n=ce(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var o=l.dispatch,f=l.pending,h=n.memoizedState;if(f!==null){l.pending=null;var b=f=f.next;do h=e(h,b.action),b=b.next;while(b!==f);Pe(h,n.memoizedState)||(pe=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),l.lastRenderedState=h}return[h,o]}function Qp(e,n,l){var o=Tt,f=ce(),h=jt;if(h){if(l===void 0)throw Error(a(407));l=l()}else l=n();var b=!Pe((Ft||f).memoizedState,l);if(b&&(f.memoizedState=l,pe=!0),f=f.queue,Bc(Zp.bind(null,o,f,e),[e]),f.getSnapshot!==n||b||he!==null&&he.memoizedState.tag&1){if(o.flags|=2048,il(9,{destroy:void 0},Gp.bind(null,o,f,l,n),null),Pt===null)throw Error(a(349));h||(ei&127)!==0||Xp(o,n,l)}return l}function Xp(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Tt.updateQueue,n===null?(n=$o(),Tt.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function Gp(e,n,l,o){n.value=l,n.getSnapshot=o,Fp(n)&&Kp(e)}function Zp(e,n,l){return l(function(){Fp(n)&&Kp(e)})}function Fp(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Pe(e,l)}catch{return!0}}function Kp(e){var n=ar(e,2);n!==null&&Ye(n,e,2)}function jc(e){var n=Re();if(typeof e=="function"){var l=e;if(e=l(),mr){Me(!0);try{l()}finally{Me(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:e},n}function $p(e,n,l,o){return e.baseState=l,Rc(e,Ft,typeof o=="function"?o:ni)}function dS(e,n,l,o,f){if(eu(e))throw Error(a(485));if(e=n.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){h.listeners.push(b)}};A.T!==null?l(!0):h.isTransition=!1,o(h),l=n.pending,l===null?(h.next=n.pending=h,Pp(n,h)):(h.next=l.next,n.pending=l.next=h)}}function Pp(e,n){var l=n.action,o=n.payload,f=e.state;if(n.isTransition){var h=A.T,b={};A.T=b;try{var _=l(f,o),U=A.S;U!==null&&U(b,_),Jp(e,n,_)}catch(P){Lc(e,n,P)}finally{h!==null&&b.types!==null&&(h.types=b.types),A.T=h}}else try{h=l(f,o),Jp(e,n,h)}catch(P){Lc(e,n,P)}}function Jp(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){Wp(e,n,o)},function(o){return Lc(e,n,o)}):Wp(e,n,l)}function Wp(e,n,l){n.status="fulfilled",n.value=l,tm(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,Pp(e,l)))}function Lc(e,n,l){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=l,tm(n),n=n.next;while(n!==o)}e.action=null}function tm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function em(e,n){return n}function nm(e,n){if(jt){var l=Pt.formState;if(l!==null){t:{var o=Tt;if(jt){if(te){e:{for(var f=te,h=hn;f.nodeType!==8;){if(!h){f=null;break e}if(f=mn(f.nextSibling),f===null){f=null;break e}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){te=mn(f.nextSibling),o=f.data==="F!";break t}}Ci(o)}o=!1}o&&(n=l[0])}}return l=Re(),l.memoizedState=l.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:em,lastRenderedState:n},l.queue=o,l=Sm.bind(null,Tt,o),o.dispatch=l,o=jc(!1),h=Yc.bind(null,Tt,!1,o.queue),o=Re(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,l=dS.bind(null,Tt,f,h,l),f.dispatch=l,o.memoizedState=e,[n,l,!1]}function im(e){var n=ce();return rm(n,Ft,e)}function rm(e,n,l){if(n=Rc(e,n,em)[0],e=Jo(ni)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=aa(n)}catch(b){throw b===Jr?Io:b}else o=n;n=ce();var f=n.queue,h=f.dispatch;return l!==n.memoizedState&&(Tt.flags|=2048,il(9,{destroy:void 0},hS.bind(null,f,l),null)),[o,h,e]}function hS(e,n){e.action=n}function lm(e){var n=ce(),l=Ft;if(l!==null)return rm(n,l,e);ce(),n=n.memoizedState,l=ce();var o=l.queue.dispatch;return l.memoizedState=e,[n,o,!1]}function il(e,n,l,o){return e={tag:e,create:l,deps:o,inst:n,next:null},n=Tt.updateQueue,n===null&&(n=$o(),Tt.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,n.lastEffect=e),e}function am(){return ce().memoizedState}function Wo(e,n,l,o){var f=Re();Tt.flags|=e,f.memoizedState=il(1|n,{destroy:void 0},l,o===void 0?null:o)}function tu(e,n,l,o){var f=ce();o=o===void 0?null:o;var h=f.memoizedState.inst;Ft!==null&&o!==null&&Ac(o,Ft.memoizedState.deps)?f.memoizedState=il(n,h,l,o):(Tt.flags|=e,f.memoizedState=il(1|n,h,l,o))}function om(e,n){Wo(8390656,8,e,n)}function Bc(e,n){tu(2048,8,e,n)}function pS(e){Tt.flags|=4;var n=Tt.updateQueue;if(n===null)n=$o(),Tt.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function um(e){var n=ce().memoizedState;return pS({ref:n,nextImpl:e}),function(){if((Yt&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function sm(e,n){return tu(4,2,e,n)}function cm(e,n){return tu(4,4,e,n)}function fm(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function dm(e,n,l){l=l!=null?l.concat([e]):null,tu(4,4,fm.bind(null,n,e),l)}function Uc(){}function hm(e,n){var l=ce();n=n===void 0?null:n;var o=l.memoizedState;return n!==null&&Ac(n,o[1])?o[0]:(l.memoizedState=[e,n],e)}function pm(e,n){var l=ce();n=n===void 0?null:n;var o=l.memoizedState;if(n!==null&&Ac(n,o[1]))return o[0];if(o=e(),mr){Me(!0);try{e()}finally{Me(!1)}}return l.memoizedState=[o,n],o}function qc(e,n,l){return l===void 0||(ei&1073741824)!==0&&(Rt&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=mg(),Tt.lanes|=e,Ri|=e,l)}function mm(e,n,l,o){return Pe(l,n)?l:tl.current!==null?(e=qc(e,l,o),Pe(e,n)||(pe=!0),e):(ei&42)===0||(ei&1073741824)!==0&&(Rt&261930)===0?(pe=!0,e.memoizedState=l):(e=mg(),Tt.lanes|=e,Ri|=e,n)}function gm(e,n,l,o,f){var h=L.p;L.p=h!==0&&8>h?h:8;var b=A.T,_={};A.T=_,Yc(e,!1,n,l);try{var U=f(),P=A.S;if(P!==null&&P(_,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var rt=sS(U,o);oa(e,n,rt,rn(e))}else oa(e,n,o,rn(e))}catch(ot){oa(e,n,{then:function(){},status:"rejected",reason:ot},rn())}finally{L.p=h,b!==null&&_.types!==null&&(b.types=_.types),A.T=b}}function mS(){}function Vc(e,n,l,o){if(e.tag!==5)throw Error(a(476));var f=ym(e).queue;gm(e,f,n,Y,l===null?mS:function(){return vm(e),l(o)})}function ym(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:Y},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function vm(e){var n=ym(e);n.next===null&&(n=e.alternate.memoizedState),oa(e,n.next.queue,{},rn())}function Ic(){return _e(_a)}function xm(){return ce().memoizedState}function bm(){return ce().memoizedState}function gS(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=rn();e=Ai(l);var o=Mi(n,e,l);o!==null&&(Ye(o,n,l),na(o,n,l)),n={cache:yc()},e.payload=n;return}n=n.return}}function yS(e,n,l){var o=rn();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},eu(e)?wm(n,l):(l=ac(e,n,l,o),l!==null&&(Ye(l,e,o),Em(l,n,o)))}function Sm(e,n,l){var o=rn();oa(e,n,l,o)}function oa(e,n,l,o){var f={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(eu(e))wm(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var b=n.lastRenderedState,_=h(b,l);if(f.hasEagerState=!0,f.eagerState=_,Pe(_,b))return Ho(e,n,f,0),Pt===null&&Ro(),!1}catch{}if(l=ac(e,n,f,o),l!==null)return Ye(l,e,o),Em(l,n,o),!0}return!1}function Yc(e,n,l,o){if(o={lane:2,revertLane:wf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},eu(e)){if(n)throw Error(a(479))}else n=ac(e,l,o,2),n!==null&&Ye(n,e,2)}function eu(e){var n=e.alternate;return e===Tt||n!==null&&n===Tt}function wm(e,n){el=Fo=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Em(e,n,l){if((l&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,po(e,l)}}var ua={readContext:_e,use:Po,useCallback:le,useContext:le,useEffect:le,useImperativeHandle:le,useLayoutEffect:le,useInsertionEffect:le,useMemo:le,useReducer:le,useRef:le,useState:le,useDebugValue:le,useDeferredValue:le,useTransition:le,useSyncExternalStore:le,useId:le,useHostTransitionStatus:le,useFormState:le,useActionState:le,useOptimistic:le,useMemoCache:le,useCacheRefresh:le};ua.useEffectEvent=le;var _m={readContext:_e,use:Po,useCallback:function(e,n){return Re().memoizedState=[e,n===void 0?null:n],e},useContext:_e,useEffect:om,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,Wo(4194308,4,fm.bind(null,n,e),l)},useLayoutEffect:function(e,n){return Wo(4194308,4,e,n)},useInsertionEffect:function(e,n){Wo(4,2,e,n)},useMemo:function(e,n){var l=Re();n=n===void 0?null:n;var o=e();if(mr){Me(!0);try{e()}finally{Me(!1)}}return l.memoizedState=[o,n],o},useReducer:function(e,n,l){var o=Re();if(l!==void 0){var f=l(n);if(mr){Me(!0);try{l(n)}finally{Me(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=yS.bind(null,Tt,e),[o.memoizedState,e]},useRef:function(e){var n=Re();return e={current:e},n.memoizedState=e},useState:function(e){e=jc(e);var n=e.queue,l=Sm.bind(null,Tt,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:Uc,useDeferredValue:function(e,n){var l=Re();return qc(l,e,n)},useTransition:function(){var e=jc(!1);return e=gm.bind(null,Tt,e.queue,!0,!1),Re().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var o=Tt,f=Re();if(jt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=n(),Pt===null)throw Error(a(349));(Rt&127)!==0||Xp(o,n,l)}f.memoizedState=l;var h={value:l,getSnapshot:n};return f.queue=h,om(Zp.bind(null,o,h,e),[e]),o.flags|=2048,il(9,{destroy:void 0},Gp.bind(null,o,h,l,n),null),l},useId:function(){var e=Re(),n=Pt.identifierPrefix;if(jt){var l=kn,o=Dn;l=(o&~(1<<32-Xt(o)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Ko++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=cS++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Ic,useFormState:nm,useActionState:nm,useOptimistic:function(e){var n=Re();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=Yc.bind(null,Tt,!0,l),l.dispatch=n,[e,n]},useMemoCache:kc,useCacheRefresh:function(){return Re().memoizedState=gS.bind(null,Tt)},useEffectEvent:function(e){var n=Re(),l={impl:e};return n.memoizedState=l,function(){if((Yt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Qc={readContext:_e,use:Po,useCallback:hm,useContext:_e,useEffect:Bc,useImperativeHandle:dm,useInsertionEffect:sm,useLayoutEffect:cm,useMemo:pm,useReducer:Jo,useRef:am,useState:function(){return Jo(ni)},useDebugValue:Uc,useDeferredValue:function(e,n){var l=ce();return mm(l,Ft.memoizedState,e,n)},useTransition:function(){var e=Jo(ni)[0],n=ce().memoizedState;return[typeof e=="boolean"?e:aa(e),n]},useSyncExternalStore:Qp,useId:xm,useHostTransitionStatus:Ic,useFormState:im,useActionState:im,useOptimistic:function(e,n){var l=ce();return $p(l,Ft,e,n)},useMemoCache:kc,useCacheRefresh:bm};Qc.useEffectEvent=um;var Cm={readContext:_e,use:Po,useCallback:hm,useContext:_e,useEffect:Bc,useImperativeHandle:dm,useInsertionEffect:sm,useLayoutEffect:cm,useMemo:pm,useReducer:Hc,useRef:am,useState:function(){return Hc(ni)},useDebugValue:Uc,useDeferredValue:function(e,n){var l=ce();return Ft===null?qc(l,e,n):mm(l,Ft.memoizedState,e,n)},useTransition:function(){var e=Hc(ni)[0],n=ce().memoizedState;return[typeof e=="boolean"?e:aa(e),n]},useSyncExternalStore:Qp,useId:xm,useHostTransitionStatus:Ic,useFormState:lm,useActionState:lm,useOptimistic:function(e,n){var l=ce();return Ft!==null?$p(l,Ft,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:kc,useCacheRefresh:bm};Cm.useEffectEvent=um;function Xc(e,n,l,o){n=e.memoizedState,l=l(o,n),l=l==null?n:y({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Gc={enqueueSetState:function(e,n,l){e=e._reactInternals;var o=rn(),f=Ai(o);f.payload=n,l!=null&&(f.callback=l),n=Mi(e,f,o),n!==null&&(Ye(n,e,o),na(n,e,o))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var o=rn(),f=Ai(o);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=Mi(e,f,o),n!==null&&(Ye(n,e,o),na(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=rn(),o=Ai(l);o.tag=2,n!=null&&(o.callback=n),n=Mi(e,o,l),n!==null&&(Ye(n,e,l),na(n,e,l))}};function Nm(e,n,l,o,f,h,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,h,b):n.prototype&&n.prototype.isPureReactComponent?!Fl(l,o)||!Fl(f,h):!0}function Tm(e,n,l,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,o),n.state!==e&&Gc.enqueueReplaceState(n,n.state,null)}function gr(e,n){var l=n;if("ref"in n){l={};for(var o in n)o!=="ref"&&(l[o]=n[o])}if(e=e.defaultProps){l===n&&(l=y({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function Am(e){ko(e)}function Mm(e){console.error(e)}function zm(e){ko(e)}function nu(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Om(e,n,l){try{var o=e.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Zc(e,n,l){return l=Ai(l),l.tag=3,l.payload={element:null},l.callback=function(){nu(e,n)},l}function Dm(e){return e=Ai(e),e.tag=3,e}function km(e,n,l,o){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var h=o.value;e.payload=function(){return f(h)},e.callback=function(){Om(n,l,o)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Om(n,l,o),typeof f!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var _=o.stack;this.componentDidCatch(o.value,{componentStack:_!==null?_:""})})}function vS(e,n,l,o,f){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=l.alternate,n!==null&&Kr(n,l,f,!0),l=We.current,l!==null){switch(l.tag){case 31:case 13:return pn===null?pu():l.alternate===null&&ae===0&&(ae=3),l.flags&=-257,l.flags|=65536,l.lanes=f,o===Yo?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([o]):n.add(o),xf(e,o,f)),!1;case 22:return l.flags|=65536,o===Yo?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([o]):l.add(o)),xf(e,o,f)),!1}throw Error(a(435,l.tag))}return xf(e,o,f),pu(),!1}if(jt)return n=We.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==dc&&(e=Error(a(422),{cause:o}),Pl(cn(e,l)))):(o!==dc&&(n=Error(a(423),{cause:o}),Pl(cn(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=cn(o,l),f=Zc(e.stateNode,o,f),Ec(e,f),ae!==4&&(ae=2)),!1;var h=Error(a(520),{cause:o});if(h=cn(h,l),ga===null?ga=[h]:ga.push(h),ae!==4&&(ae=2),n===null)return!0;o=cn(o,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=Zc(l.stateNode,o,e),Ec(l,e),!1;case 1:if(n=l.type,h=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Hi===null||!Hi.has(h))))return l.flags|=65536,f&=-f,l.lanes|=f,f=Dm(f),km(f,e,l,o),Ec(l,f),!1}l=l.return}while(l!==null);return!1}var Fc=Error(a(461)),pe=!1;function Ce(e,n,l,o){n.child=e===null?Lp(n,null,l,o):pr(n,e.child,l,o)}function Rm(e,n,l,o,f){l=l.render;var h=n.ref;if("ref"in o){var b={};for(var _ in o)_!=="ref"&&(b[_]=o[_])}else b=o;return cr(n),o=Mc(e,n,l,b,h,f),_=zc(),e!==null&&!pe?(Oc(e,n,f),ii(e,n,f)):(jt&&_&&cc(n),n.flags|=1,Ce(e,n,o,f),n.child)}function Hm(e,n,l,o,f){if(e===null){var h=l.type;return typeof h=="function"&&!oc(h)&&h.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=h,jm(e,n,h,o,f)):(e=Lo(l.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!nf(e,f)){var b=h.memoizedProps;if(l=l.compare,l=l!==null?l:Fl,l(b,o)&&e.ref===n.ref)return ii(e,n,f)}return n.flags|=1,e=Pn(h,o),e.ref=n.ref,e.return=n,n.child=e}function jm(e,n,l,o,f){if(e!==null){var h=e.memoizedProps;if(Fl(h,o)&&e.ref===n.ref)if(pe=!1,n.pendingProps=o=h,nf(e,f))(e.flags&131072)!==0&&(pe=!0);else return n.lanes=e.lanes,ii(e,n,f)}return Kc(e,n,l,o,f)}function Lm(e,n,l,o){var f=o.children,h=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|l:l,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~h}else o=0,n.child=null;return Bm(e,n,h,l,o)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vo(n,h!==null?h.cachePool:null),h!==null?qp(n,h):Cc(),Vp(n);else return o=n.lanes=536870912,Bm(e,n,h!==null?h.baseLanes|l:l,l,o)}else h!==null?(Vo(n,h.cachePool),qp(n,h),Oi(),n.memoizedState=null):(e!==null&&Vo(n,null),Cc(),Oi());return Ce(e,n,f,l),n.child}function sa(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Bm(e,n,l,o,f){var h=xc();return h=h===null?null:{parent:de._currentValue,pool:h},n.memoizedState={baseLanes:l,cachePool:h},e!==null&&Vo(n,null),Cc(),Vp(n),e!==null&&Kr(e,n,o,!0),n.childLanes=f,null}function iu(e,n){return n=lu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Um(e,n,l){return pr(n,e.child,null,l),e=iu(n,n.pendingProps),e.flags|=2,tn(n),n.memoizedState=null,e}function xS(e,n,l){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(jt){if(o.mode==="hidden")return e=iu(n,o),n.lanes=536870912,sa(null,e);if(Tc(n),(e=te)?(e=Pg(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ei!==null?{id:Dn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=wp(e),l.return=n,n.child=l,Ee=n,te=null)):e=null,e===null)throw Ci(n);return n.lanes=536870912,null}return iu(n,o)}var h=e.memoizedState;if(h!==null){var b=h.dehydrated;if(Tc(n),f)if(n.flags&256)n.flags&=-257,n=Um(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(a(558));else if(pe||Kr(e,n,l,!1),f=(l&e.childLanes)!==0,pe||f){if(o=Pt,o!==null&&(b=mo(o,l),b!==0&&b!==h.retryLane))throw h.retryLane=b,ar(e,b),Ye(o,e,b),Fc;pu(),n=Um(e,n,l)}else e=h.treeContext,te=mn(b.nextSibling),Ee=n,jt=!0,_i=null,hn=!1,e!==null&&Cp(n,e),n=iu(n,o),n.flags|=4096;return n}return e=Pn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function ru(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function Kc(e,n,l,o,f){return cr(n),l=Mc(e,n,l,o,void 0,f),o=zc(),e!==null&&!pe?(Oc(e,n,f),ii(e,n,f)):(jt&&o&&cc(n),n.flags|=1,Ce(e,n,l,f),n.child)}function qm(e,n,l,o,f,h){return cr(n),n.updateQueue=null,l=Yp(n,o,l,f),Ip(e),o=zc(),e!==null&&!pe?(Oc(e,n,h),ii(e,n,h)):(jt&&o&&cc(n),n.flags|=1,Ce(e,n,l,h),n.child)}function Vm(e,n,l,o,f){if(cr(n),n.stateNode===null){var h=Xr,b=l.contextType;typeof b=="object"&&b!==null&&(h=_e(b)),h=new l(o,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Gc,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=o,h.state=n.memoizedState,h.refs={},Sc(n),b=l.contextType,h.context=typeof b=="object"&&b!==null?_e(b):Xr,h.state=n.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(Xc(n,l,b,o),h.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(b=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),b!==h.state&&Gc.enqueueReplaceState(h,h.state,null),ra(n,o,h,f),ia(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){h=n.stateNode;var _=n.memoizedProps,U=gr(l,_);h.props=U;var P=h.context,rt=l.contextType;b=Xr,typeof rt=="object"&&rt!==null&&(b=_e(rt));var ot=l.getDerivedStateFromProps;rt=typeof ot=="function"||typeof h.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,rt||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(_||P!==b)&&Tm(n,h,o,b),Ti=!1;var J=n.memoizedState;h.state=J,ra(n,o,h,f),ia(),P=n.memoizedState,_||J!==P||Ti?(typeof ot=="function"&&(Xc(n,l,ot,o),P=n.memoizedState),(U=Ti||Nm(n,l,U,o,J,P,b))?(rt||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=P),h.props=o,h.state=P,h.context=b,o=U):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{h=n.stateNode,wc(e,n),b=n.memoizedProps,rt=gr(l,b),h.props=rt,ot=n.pendingProps,J=h.context,P=l.contextType,U=Xr,typeof P=="object"&&P!==null&&(U=_e(P)),_=l.getDerivedStateFromProps,(P=typeof _=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==ot||J!==U)&&Tm(n,h,o,U),Ti=!1,J=n.memoizedState,h.state=J,ra(n,o,h,f),ia();var tt=n.memoizedState;b!==ot||J!==tt||Ti||e!==null&&e.dependencies!==null&&Uo(e.dependencies)?(typeof _=="function"&&(Xc(n,l,_,o),tt=n.memoizedState),(rt=Ti||Nm(n,l,rt,o,J,tt,U)||e!==null&&e.dependencies!==null&&Uo(e.dependencies))?(P||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(o,tt,U),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(o,tt,U)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=tt),h.props=o,h.state=tt,h.context=U,o=rt):(typeof h.componentDidUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),o=!1)}return h=o,ru(e,n),o=(n.flags&128)!==0,h||o?(h=n.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&o?(n.child=pr(n,e.child,null,f),n.child=pr(n,null,l,f)):Ce(e,n,l,f),n.memoizedState=h.state,e=n.child):e=ii(e,n,f),e}function Im(e,n,l,o){return ur(),n.flags|=256,Ce(e,n,l,o),n.child}var $c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(e){return{baseLanes:e,cachePool:Op()}}function Jc(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=nn),e}function Ym(e,n,l){var o=n.pendingProps,f=!1,h=(n.flags&128)!==0,b;if((b=h)||(b=e!==null&&e.memoizedState===null?!1:(se.current&2)!==0),b&&(f=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(jt){if(f?zi(n):Oi(),(e=te)?(e=Pg(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ei!==null?{id:Dn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=wp(e),l.return=n,n.child=l,Ee=n,te=null)):e=null,e===null)throw Ci(n);return Hf(e)?n.lanes=32:n.lanes=536870912,null}var _=o.children;return o=o.fallback,f?(Oi(),f=n.mode,_=lu({mode:"hidden",children:_},f),o=or(o,f,l,null),_.return=n,o.return=n,_.sibling=o,n.child=_,o=n.child,o.memoizedState=Pc(l),o.childLanes=Jc(e,b,l),n.memoizedState=$c,sa(null,o)):(zi(n),Wc(n,_))}var U=e.memoizedState;if(U!==null&&(_=U.dehydrated,_!==null)){if(h)n.flags&256?(zi(n),n.flags&=-257,n=tf(e,n,l)):n.memoizedState!==null?(Oi(),n.child=e.child,n.flags|=128,n=null):(Oi(),_=o.fallback,f=n.mode,o=lu({mode:"visible",children:o.children},f),_=or(_,f,l,null),_.flags|=2,o.return=n,_.return=n,o.sibling=_,n.child=o,pr(n,e.child,null,l),o=n.child,o.memoizedState=Pc(l),o.childLanes=Jc(e,b,l),n.memoizedState=$c,n=sa(null,o));else if(zi(n),Hf(_)){if(b=_.nextSibling&&_.nextSibling.dataset,b)var P=b.dgst;b=P,o=Error(a(419)),o.stack="",o.digest=b,Pl({value:o,source:null,stack:null}),n=tf(e,n,l)}else if(pe||Kr(e,n,l,!1),b=(l&e.childLanes)!==0,pe||b){if(b=Pt,b!==null&&(o=mo(b,l),o!==0&&o!==U.retryLane))throw U.retryLane=o,ar(e,o),Ye(b,e,o),Fc;Rf(_)||pu(),n=tf(e,n,l)}else Rf(_)?(n.flags|=192,n.child=e.child,n=null):(e=U.treeContext,te=mn(_.nextSibling),Ee=n,jt=!0,_i=null,hn=!1,e!==null&&Cp(n,e),n=Wc(n,o.children),n.flags|=4096);return n}return f?(Oi(),_=o.fallback,f=n.mode,U=e.child,P=U.sibling,o=Pn(U,{mode:"hidden",children:o.children}),o.subtreeFlags=U.subtreeFlags&65011712,P!==null?_=Pn(P,_):(_=or(_,f,l,null),_.flags|=2),_.return=n,o.return=n,o.sibling=_,n.child=o,sa(null,o),o=n.child,_=e.child.memoizedState,_===null?_=Pc(l):(f=_.cachePool,f!==null?(U=de._currentValue,f=f.parent!==U?{parent:U,pool:U}:f):f=Op(),_={baseLanes:_.baseLanes|l,cachePool:f}),o.memoizedState=_,o.childLanes=Jc(e,b,l),n.memoizedState=$c,sa(e.child,o)):(zi(n),l=e.child,e=l.sibling,l=Pn(l,{mode:"visible",children:o.children}),l.return=n,l.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=l,n.memoizedState=null,l)}function Wc(e,n){return n=lu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function lu(e,n){return e=Je(22,e,null,n),e.lanes=0,e}function tf(e,n,l){return pr(n,e.child,null,l),e=Wc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Qm(e,n,l){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),mc(e.return,n,l)}function ef(e,n,l,o,f,h){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:f,treeForkCount:h}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=l,b.tailMode=f,b.treeForkCount=h)}function Xm(e,n,l){var o=n.pendingProps,f=o.revealOrder,h=o.tail;o=o.children;var b=se.current,_=(b&2)!==0;if(_?(b=b&1|2,n.flags|=128):b&=1,N(se,b),Ce(e,n,o,l),o=jt?$l:0,!_&&e!==null&&(e.flags&128)!==0)t:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qm(e,l,n);else if(e.tag===19)Qm(e,l,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break t;for(;e.sibling===null;){if(e.return===null||e.return===n)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&Zo(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),ef(n,!1,f,l,h,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Zo(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}ef(n,!0,l,null,h,o);break;case"together":ef(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function ii(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Ri|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Kr(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,l=Pn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Pn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function nf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Uo(e)))}function bS(e,n,l){switch(n.tag){case 3:ut(n,n.stateNode.containerInfo),Ni(n,de,e.memoizedState.cache),ur();break;case 27:case 5:wt(n);break;case 4:ut(n,n.stateNode.containerInfo);break;case 10:Ni(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Tc(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(zi(n),n.flags|=128,null):(l&n.child.childLanes)!==0?Ym(e,n,l):(zi(n),e=ii(e,n,l),e!==null?e.sibling:null);zi(n);break;case 19:var f=(e.flags&128)!==0;if(o=(l&n.childLanes)!==0,o||(Kr(e,n,l,!1),o=(l&n.childLanes)!==0),f){if(o)return Xm(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),N(se,se.current),o)break;return null;case 22:return n.lanes=0,Lm(e,n,l,n.pendingProps);case 24:Ni(n,de,e.memoizedState.cache)}return ii(e,n,l)}function Gm(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)pe=!0;else{if(!nf(e,l)&&(n.flags&128)===0)return pe=!1,bS(e,n,l);pe=(e.flags&131072)!==0}else pe=!1,jt&&(n.flags&1048576)!==0&&_p(n,$l,n.index);switch(n.lanes=0,n.tag){case 16:t:{var o=n.pendingProps;if(e=dr(n.elementType),n.type=e,typeof e=="function")oc(e)?(o=gr(e,o),n.tag=1,n=Vm(null,n,e,o,l)):(n.tag=0,n=Kc(null,n,e,o,l));else{if(e!=null){var f=e.$$typeof;if(f===k){n.tag=11,n=Rm(null,n,e,o,l);break t}else if(f===j){n.tag=14,n=Hm(null,n,e,o,l);break t}}throw n=R(e)||e,Error(a(306,n,""))}}return n;case 0:return Kc(e,n,n.type,n.pendingProps,l);case 1:return o=n.type,f=gr(o,n.pendingProps),Vm(e,n,o,f,l);case 3:t:{if(ut(n,n.stateNode.containerInfo),e===null)throw Error(a(387));o=n.pendingProps;var h=n.memoizedState;f=h.element,wc(e,n),ra(n,o,null,l);var b=n.memoizedState;if(o=b.cache,Ni(n,de,o),o!==h.cache&&gc(n,[de],l,!0),ia(),o=b.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=Im(e,n,o,l);break t}else if(o!==f){f=cn(Error(a(424)),n),Pl(f),n=Im(e,n,o,l);break t}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,te=mn(e.firstChild),Ee=n,jt=!0,_i=null,hn=!0,l=Lp(n,null,o,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ur(),o===f){n=ii(e,n,l);break t}Ce(e,n,o,l)}n=n.child}return n;case 26:return ru(e,n),e===null?(l=iy(n.type,null,n.pendingProps,null))?n.memoizedState=l:jt||(l=n.type,e=n.pendingProps,o=Su(ct.current).createElement(l),o[xe]=n,o[ze]=e,Ne(o,l,e),fe(o),n.stateNode=o):n.memoizedState=iy(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return wt(n),e===null&&jt&&(o=n.stateNode=ty(n.type,n.pendingProps,ct.current),Ee=n,hn=!0,f=te,Ui(n.type)?(jf=f,te=mn(o.firstChild)):te=f),Ce(e,n,n.pendingProps.children,l),ru(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&jt&&((f=o=te)&&(o=$S(o,n.type,n.pendingProps,hn),o!==null?(n.stateNode=o,Ee=n,te=mn(o.firstChild),hn=!1,f=!0):f=!1),f||Ci(n)),wt(n),f=n.type,h=n.pendingProps,b=e!==null?e.memoizedProps:null,o=h.children,Of(f,h)?o=null:b!==null&&Of(f,b)&&(n.flags|=32),n.memoizedState!==null&&(f=Mc(e,n,fS,null,null,l),_a._currentValue=f),ru(e,n),Ce(e,n,o,l),n.child;case 6:return e===null&&jt&&((e=l=te)&&(l=PS(l,n.pendingProps,hn),l!==null?(n.stateNode=l,Ee=n,te=null,e=!0):e=!1),e||Ci(n)),null;case 13:return Ym(e,n,l);case 4:return ut(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=pr(n,null,o,l):Ce(e,n,o,l),n.child;case 11:return Rm(e,n,n.type,n.pendingProps,l);case 7:return Ce(e,n,n.pendingProps,l),n.child;case 8:return Ce(e,n,n.pendingProps.children,l),n.child;case 12:return Ce(e,n,n.pendingProps.children,l),n.child;case 10:return o=n.pendingProps,Ni(n,n.type,o.value),Ce(e,n,o.children,l),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,cr(n),f=_e(f),o=o(f),n.flags|=1,Ce(e,n,o,l),n.child;case 14:return Hm(e,n,n.type,n.pendingProps,l);case 15:return jm(e,n,n.type,n.pendingProps,l);case 19:return Xm(e,n,l);case 31:return xS(e,n,l);case 22:return Lm(e,n,l,n.pendingProps);case 24:return cr(n),o=_e(de),e===null?(f=xc(),f===null&&(f=Pt,h=yc(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=l),f=h),n.memoizedState={parent:o,cache:f},Sc(n),Ni(n,de,f)):((e.lanes&l)!==0&&(wc(e,n),ra(n,null,null,l),ia()),f=e.memoizedState,h=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Ni(n,de,o)):(o=h.cache,Ni(n,de,o),o!==f.cache&&gc(n,[de],l,!0))),Ce(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function ri(e){e.flags|=4}function rf(e,n,l,o,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(xg())e.flags|=8192;else throw hr=Yo,bc}else e.flags&=-16777217}function Zm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!uy(n))if(xg())e.flags|=8192;else throw hr=Yo,bc}function au(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?fo():536870912,e.lanes|=n,ol|=n)}function ca(e,n){if(!jt)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ee(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,o=0;if(n)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=l,n}function SS(e,n,l){var o=n.pendingProps;switch(fc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ee(n),null;case 1:return ee(n),null;case 3:return l=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),ti(de),pt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Fr(n)?ri(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,hc())),ee(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(ri(n),h!==null?(ee(n),Zm(n,h)):(ee(n),rf(n,f,null,o,l))):h?h!==e.memoizedState?(ri(n),ee(n),Zm(n,h)):(ee(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&ri(n),ee(n),rf(n,f,e,o,l)),null;case 27:if(_t(n),l=ct.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ri(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return ee(n),null}e=et.current,Fr(n)?Np(n):(e=ty(f,o,l),n.stateNode=e,ri(n))}return ee(n),null;case 5:if(_t(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ri(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return ee(n),null}if(h=et.current,Fr(n))Np(n);else{var b=Su(ct.current);switch(h){case 1:h=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=b.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?h.multiple=!0:o.size&&(h.size=o.size);break;default:h=typeof o.is=="string"?b.createElement(f,{is:o.is}):b.createElement(f)}}h[xe]=n,h[ze]=o;t:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break t;for(;b.sibling===null;){if(b.return===null||b.return===n)break t;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=h;t:switch(Ne(h,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break t;case"img":o=!0;break t;default:o=!1}o&&ri(n)}}return ee(n),rf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&ri(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(a(166));if(e=ct.current,Fr(n)){if(e=n.stateNode,l=n.memoizedProps,o=null,f=Ee,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[xe]=n,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||Yg(e.nodeValue,l)),e||Ci(n,!0)}else e=Su(e).createTextNode(o),e[xe]=n,n.stateNode=e}return ee(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(o=Fr(n),l!==null){if(e===null){if(!o)throw Error(a(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[xe]=n}else ur(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ee(n),e=!1}else l=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(tn(n),n):(tn(n),null);if((n.flags&128)!==0)throw Error(a(558))}return ee(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Fr(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[xe]=n}else ur(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ee(n),f=!1}else f=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(tn(n),n):(tn(n),null)}return tn(n),(n.flags&128)!==0?(n.lanes=l,n):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==f&&(o.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),au(n,n.updateQueue),ee(n),null);case 4:return pt(),e===null&&Nf(n.stateNode.containerInfo),ee(n),null;case 10:return ti(n.type),ee(n),null;case 19:if(V(se),o=n.memoizedState,o===null)return ee(n),null;if(f=(n.flags&128)!==0,h=o.rendering,h===null)if(f)ca(o,!1);else{if(ae!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Zo(e),h!==null){for(n.flags|=128,ca(o,!1),e=h.updateQueue,n.updateQueue=e,au(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Sp(l,e),l=l.sibling;return N(se,se.current&1|2),jt&&Jn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&ve()>fu&&(n.flags|=128,f=!0,ca(o,!1),n.lanes=4194304)}else{if(!f)if(e=Zo(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,au(n,e),ca(o,!0),o.tail===null&&o.tailMode==="hidden"&&!h.alternate&&!jt)return ee(n),null}else 2*ve()-o.renderingStartTime>fu&&l!==536870912&&(n.flags|=128,f=!0,ca(o,!1),n.lanes=4194304);o.isBackwards?(h.sibling=n.child,n.child=h):(e=o.last,e!==null?e.sibling=h:n.child=h,o.last=h)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=ve(),e.sibling=null,l=se.current,N(se,f?l&1|2:l&1),jt&&Jn(n,o.treeForkCount),e):(ee(n),null);case 22:case 23:return tn(n),Nc(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(l&536870912)!==0&&(n.flags&128)===0&&(ee(n),n.subtreeFlags&6&&(n.flags|=8192)):ee(n),l=n.updateQueue,l!==null&&au(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==l&&(n.flags|=2048),e!==null&&V(fr),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ti(de),ee(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function wS(e,n){switch(fc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ti(de),pt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return _t(n),null;case 31:if(n.memoizedState!==null){if(tn(n),n.alternate===null)throw Error(a(340));ur()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(tn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));ur()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return V(se),null;case 4:return pt(),null;case 10:return ti(n.type),null;case 22:case 23:return tn(n),Nc(),e!==null&&V(fr),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ti(de),null;case 25:return null;default:return null}}function Fm(e,n){switch(fc(n),n.tag){case 3:ti(de),pt();break;case 26:case 27:case 5:_t(n);break;case 4:pt();break;case 31:n.memoizedState!==null&&tn(n);break;case 13:tn(n);break;case 19:V(se);break;case 10:ti(n.type);break;case 22:case 23:tn(n),Nc(),e!==null&&V(fr);break;case 24:ti(de)}}function fa(e,n){try{var l=n.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){o=void 0;var h=l.create,b=l.inst;o=h(),b.destroy=o}l=l.next}while(l!==f)}}catch(_){Zt(n,n.return,_)}}function Di(e,n,l){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var h=f.next;o=h;do{if((o.tag&e)===e){var b=o.inst,_=b.destroy;if(_!==void 0){b.destroy=void 0,f=n;var U=l,P=_;try{P()}catch(rt){Zt(f,U,rt)}}}o=o.next}while(o!==h)}}catch(rt){Zt(n,n.return,rt)}}function Km(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{Up(n,l)}catch(o){Zt(e,e.return,o)}}}function $m(e,n,l){l.props=gr(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){Zt(e,n,o)}}function da(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof l=="function"?e.refCleanup=l(o):l.current=o}}catch(f){Zt(e,n,f)}}function Rn(e,n){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(f){Zt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){Zt(e,n,f)}else l.current=null}function Pm(e){var n=e.type,l=e.memoizedProps,o=e.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break t;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(f){Zt(e,e.return,f)}}function lf(e,n,l){try{var o=e.stateNode;QS(o,e.type,l,n),o[ze]=n}catch(f){Zt(e,e.return,f)}}function Jm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ui(e.type)||e.tag===4}function af(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Jm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ui(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function of(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Kn));else if(o!==4&&(o===27&&Ui(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(of(e,n,l),e=e.sibling;e!==null;)of(e,n,l),e=e.sibling}function ou(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(o!==4&&(o===27&&Ui(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ou(e,n,l),e=e.sibling;e!==null;)ou(e,n,l),e=e.sibling}function Wm(e){var n=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Ne(n,o,l),n[xe]=e,n[ze]=l}catch(h){Zt(e,e.return,h)}}var li=!1,me=!1,uf=!1,tg=typeof WeakSet=="function"?WeakSet:Set,Se=null;function ES(e,n){if(e=e.containerInfo,Mf=Au,e=dp(e),tc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else t:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var f=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{l.nodeType,h.nodeType}catch{l=null;break t}var b=0,_=-1,U=-1,P=0,rt=0,ot=e,J=null;e:for(;;){for(var tt;ot!==l||f!==0&&ot.nodeType!==3||(_=b+f),ot!==h||o!==0&&ot.nodeType!==3||(U=b+o),ot.nodeType===3&&(b+=ot.nodeValue.length),(tt=ot.firstChild)!==null;)J=ot,ot=tt;for(;;){if(ot===e)break e;if(J===l&&++P===f&&(_=b),J===h&&++rt===o&&(U=b),(tt=ot.nextSibling)!==null)break;ot=J,J=ot.parentNode}ot=tt}l=_===-1||U===-1?null:{start:_,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(zf={focusedElem:e,selectionRange:l},Au=!1,Se=n;Se!==null;)if(n=Se,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Se=e;else for(;Se!==null;){switch(n=Se,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,l=n,f=h.memoizedProps,h=h.memoizedState,o=l.stateNode;try{var mt=gr(l.type,f);e=o.getSnapshotBeforeUpdate(mt,h),o.__reactInternalSnapshotBeforeUpdate=e}catch(St){Zt(l,l.return,St)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)kf(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":kf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=n.sibling,e!==null){e.return=n.return,Se=e;break}Se=n.return}}function eg(e,n,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:oi(e,l),o&4&&fa(5,l);break;case 1:if(oi(e,l),o&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(b){Zt(l,l.return,b)}else{var f=gr(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Zt(l,l.return,b)}}o&64&&Km(l),o&512&&da(l,l.return);break;case 3:if(oi(e,l),o&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{Up(e,n)}catch(b){Zt(l,l.return,b)}}break;case 27:n===null&&o&4&&Wm(l);case 26:case 5:oi(e,l),n===null&&o&4&&Pm(l),o&512&&da(l,l.return);break;case 12:oi(e,l);break;case 31:oi(e,l),o&4&&rg(e,l);break;case 13:oi(e,l),o&4&&lg(e,l),o&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=DS.bind(null,l),JS(e,l))));break;case 22:if(o=l.memoizedState!==null||li,!o){n=n!==null&&n.memoizedState!==null||me,f=li;var h=me;li=o,(me=n)&&!h?ui(e,l,(l.subtreeFlags&8772)!==0):oi(e,l),li=f,me=h}break;case 30:break;default:oi(e,l)}}function ng(e){var n=e.alternate;n!==null&&(e.alternate=null,ng(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Bl(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ne=null,Ue=!1;function ai(e,n,l){for(l=l.child;l!==null;)ig(e,n,l),l=l.sibling}function ig(e,n,l){if(ue&&typeof ue.onCommitFiberUnmount=="function")try{ue.onCommitFiberUnmount(we,l)}catch{}switch(l.tag){case 26:me||Rn(l,n),ai(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:me||Rn(l,n);var o=ne,f=Ue;Ui(l.type)&&(ne=l.stateNode,Ue=!1),ai(e,n,l),Sa(l.stateNode),ne=o,Ue=f;break;case 5:me||Rn(l,n);case 6:if(o=ne,f=Ue,ne=null,ai(e,n,l),ne=o,Ue=f,ne!==null)if(Ue)try{(ne.nodeType===9?ne.body:ne.nodeName==="HTML"?ne.ownerDocument.body:ne).removeChild(l.stateNode)}catch(h){Zt(l,n,h)}else try{ne.removeChild(l.stateNode)}catch(h){Zt(l,n,h)}break;case 18:ne!==null&&(Ue?(e=ne,Kg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ml(e)):Kg(ne,l.stateNode));break;case 4:o=ne,f=Ue,ne=l.stateNode.containerInfo,Ue=!0,ai(e,n,l),ne=o,Ue=f;break;case 0:case 11:case 14:case 15:Di(2,l,n),me||Di(4,l,n),ai(e,n,l);break;case 1:me||(Rn(l,n),o=l.stateNode,typeof o.componentWillUnmount=="function"&&$m(l,n,o)),ai(e,n,l);break;case 21:ai(e,n,l);break;case 22:me=(o=me)||l.memoizedState!==null,ai(e,n,l),me=o;break;default:ai(e,n,l)}}function rg(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ml(e)}catch(l){Zt(n,n.return,l)}}}function lg(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ml(e)}catch(l){Zt(n,n.return,l)}}function _S(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new tg),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new tg),n;default:throw Error(a(435,e.tag))}}function uu(e,n){var l=_S(e);n.forEach(function(o){if(!l.has(o)){l.add(o);var f=kS.bind(null,e,o);o.then(f,f)}})}function qe(e,n){var l=n.deletions;if(l!==null)for(var o=0;o<l.length;o++){var f=l[o],h=e,b=n,_=b;t:for(;_!==null;){switch(_.tag){case 27:if(Ui(_.type)){ne=_.stateNode,Ue=!1;break t}break;case 5:ne=_.stateNode,Ue=!1;break t;case 3:case 4:ne=_.stateNode.containerInfo,Ue=!0;break t}_=_.return}if(ne===null)throw Error(a(160));ig(h,b,f),ne=null,Ue=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)ag(n,e),n=n.sibling}var En=null;function ag(e,n){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qe(n,e),Ve(e),o&4&&(Di(3,e,e.return),fa(3,e),Di(5,e,e.return));break;case 1:qe(n,e),Ve(e),o&512&&(me||l===null||Rn(l,l.return)),o&64&&li&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var f=En;if(qe(n,e),Ve(e),o&512&&(me||l===null||Rn(l,l.return)),o&4){var h=l!==null?l.memoizedState:null;if(o=e.memoizedState,l===null)if(o===null)if(e.stateNode===null){t:{o=e.type,l=e.memoizedProps,f=f.ownerDocument||f;e:switch(o){case"title":h=f.getElementsByTagName("title")[0],(!h||h[tr]||h[xe]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(o),f.head.insertBefore(h,f.querySelector("head > title"))),Ne(h,o,l),h[xe]=e,fe(h),o=h;break t;case"link":var b=ay("link","href",f).get(o+(l.href||""));if(b){for(var _=0;_<b.length;_++)if(h=b[_],h.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&h.getAttribute("rel")===(l.rel==null?null:l.rel)&&h.getAttribute("title")===(l.title==null?null:l.title)&&h.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(_,1);break e}}h=f.createElement(o),Ne(h,o,l),f.head.appendChild(h);break;case"meta":if(b=ay("meta","content",f).get(o+(l.content||""))){for(_=0;_<b.length;_++)if(h=b[_],h.getAttribute("content")===(l.content==null?null:""+l.content)&&h.getAttribute("name")===(l.name==null?null:l.name)&&h.getAttribute("property")===(l.property==null?null:l.property)&&h.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&h.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(_,1);break e}}h=f.createElement(o),Ne(h,o,l),f.head.appendChild(h);break;default:throw Error(a(468,o))}h[xe]=e,fe(h),o=h}e.stateNode=o}else oy(f,e.type,e.stateNode);else e.stateNode=ly(f,o,e.memoizedProps);else h!==o?(h===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):h.count--,o===null?oy(f,e.type,e.stateNode):ly(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&lf(e,e.memoizedProps,l.memoizedProps)}break;case 27:qe(n,e),Ve(e),o&512&&(me||l===null||Rn(l,l.return)),l!==null&&o&4&&lf(e,e.memoizedProps,l.memoizedProps);break;case 5:if(qe(n,e),Ve(e),o&512&&(me||l===null||Rn(l,l.return)),e.flags&32){f=e.stateNode;try{Br(f,"")}catch(mt){Zt(e,e.return,mt)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,lf(e,f,l!==null?l.memoizedProps:f)),o&1024&&(uf=!0);break;case 6:if(qe(n,e),Ve(e),o&4){if(e.stateNode===null)throw Error(a(162));o=e.memoizedProps,l=e.stateNode;try{l.nodeValue=o}catch(mt){Zt(e,e.return,mt)}}break;case 3:if(_u=null,f=En,En=wu(n.containerInfo),qe(n,e),En=f,Ve(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{ml(n.containerInfo)}catch(mt){Zt(e,e.return,mt)}uf&&(uf=!1,og(e));break;case 4:o=En,En=wu(e.stateNode.containerInfo),qe(n,e),Ve(e),En=o;break;case 12:qe(n,e),Ve(e);break;case 31:qe(n,e),Ve(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,uu(e,o)));break;case 13:qe(n,e),Ve(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(cu=ve()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,uu(e,o)));break;case 22:f=e.memoizedState!==null;var U=l!==null&&l.memoizedState!==null,P=li,rt=me;if(li=P||f,me=rt||U,qe(n,e),me=rt,li=P,Ve(e),o&8192)t:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||U||li||me||yr(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){U=l=n;try{if(h=U.stateNode,f)b=h.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{_=U.stateNode;var ot=U.memoizedProps.style,J=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;_.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(mt){Zt(U,U.return,mt)}}}else if(n.tag===6){if(l===null){U=n;try{U.stateNode.nodeValue=f?"":U.memoizedProps}catch(mt){Zt(U,U.return,mt)}}}else if(n.tag===18){if(l===null){U=n;try{var tt=U.stateNode;f?$g(tt,!0):$g(U.stateNode,!1)}catch(mt){Zt(U,U.return,mt)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break t;for(;n.sibling===null;){if(n.return===null||n.return===e)break t;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,uu(e,l))));break;case 19:qe(n,e),Ve(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,uu(e,o)));break;case 30:break;case 21:break;default:qe(n,e),Ve(e)}}function Ve(e){var n=e.flags;if(n&2){try{for(var l,o=e.return;o!==null;){if(Jm(o)){l=o;break}o=o.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var f=l.stateNode,h=af(e);ou(e,h,f);break;case 5:var b=l.stateNode;l.flags&32&&(Br(b,""),l.flags&=-33);var _=af(e);ou(e,_,b);break;case 3:case 4:var U=l.stateNode.containerInfo,P=af(e);of(e,P,U);break;default:throw Error(a(161))}}catch(rt){Zt(e,e.return,rt)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function og(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;og(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function oi(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)eg(e,n.alternate,n),n=n.sibling}function yr(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Di(4,n,n.return),yr(n);break;case 1:Rn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&$m(n,n.return,l),yr(n);break;case 27:Sa(n.stateNode);case 26:case 5:Rn(n,n.return),yr(n);break;case 22:n.memoizedState===null&&yr(n);break;case 30:yr(n);break;default:yr(n)}e=e.sibling}}function ui(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,h=n,b=h.flags;switch(h.tag){case 0:case 11:case 15:ui(f,h,l),fa(4,h);break;case 1:if(ui(f,h,l),o=h,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(P){Zt(o,o.return,P)}if(o=h,f=o.updateQueue,f!==null){var _=o.stateNode;try{var U=f.shared.hiddenCallbacks;if(U!==null)for(f.shared.hiddenCallbacks=null,f=0;f<U.length;f++)Bp(U[f],_)}catch(P){Zt(o,o.return,P)}}l&&b&64&&Km(h),da(h,h.return);break;case 27:Wm(h);case 26:case 5:ui(f,h,l),l&&o===null&&b&4&&Pm(h),da(h,h.return);break;case 12:ui(f,h,l);break;case 31:ui(f,h,l),l&&b&4&&rg(f,h);break;case 13:ui(f,h,l),l&&b&4&&lg(f,h);break;case 22:h.memoizedState===null&&ui(f,h,l),da(h,h.return);break;case 30:break;default:ui(f,h,l)}n=n.sibling}}function sf(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Jl(l))}function cf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Jl(e))}function _n(e,n,l,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ug(e,n,l,o),n=n.sibling}function ug(e,n,l,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:_n(e,n,l,o),f&2048&&fa(9,n);break;case 1:_n(e,n,l,o);break;case 3:_n(e,n,l,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Jl(e)));break;case 12:if(f&2048){_n(e,n,l,o),e=n.stateNode;try{var h=n.memoizedProps,b=h.id,_=h.onPostCommit;typeof _=="function"&&_(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(U){Zt(n,n.return,U)}}else _n(e,n,l,o);break;case 31:_n(e,n,l,o);break;case 13:_n(e,n,l,o);break;case 23:break;case 22:h=n.stateNode,b=n.alternate,n.memoizedState!==null?h._visibility&2?_n(e,n,l,o):ha(e,n):h._visibility&2?_n(e,n,l,o):(h._visibility|=2,rl(e,n,l,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&sf(b,n);break;case 24:_n(e,n,l,o),f&2048&&cf(n.alternate,n);break;default:_n(e,n,l,o)}}function rl(e,n,l,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,b=n,_=l,U=o,P=b.flags;switch(b.tag){case 0:case 11:case 15:rl(h,b,_,U,f),fa(8,b);break;case 23:break;case 22:var rt=b.stateNode;b.memoizedState!==null?rt._visibility&2?rl(h,b,_,U,f):ha(h,b):(rt._visibility|=2,rl(h,b,_,U,f)),f&&P&2048&&sf(b.alternate,b);break;case 24:rl(h,b,_,U,f),f&&P&2048&&cf(b.alternate,b);break;default:rl(h,b,_,U,f)}n=n.sibling}}function ha(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,o=n,f=o.flags;switch(o.tag){case 22:ha(l,o),f&2048&&sf(o.alternate,o);break;case 24:ha(l,o),f&2048&&cf(o.alternate,o);break;default:ha(l,o)}n=n.sibling}}var pa=8192;function ll(e,n,l){if(e.subtreeFlags&pa)for(e=e.child;e!==null;)sg(e,n,l),e=e.sibling}function sg(e,n,l){switch(e.tag){case 26:ll(e,n,l),e.flags&pa&&e.memoizedState!==null&&cw(l,En,e.memoizedState,e.memoizedProps);break;case 5:ll(e,n,l);break;case 3:case 4:var o=En;En=wu(e.stateNode.containerInfo),ll(e,n,l),En=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=pa,pa=16777216,ll(e,n,l),pa=o):ll(e,n,l));break;default:ll(e,n,l)}}function cg(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function ma(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];Se=o,dg(o,e)}cg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fg(e),e=e.sibling}function fg(e){switch(e.tag){case 0:case 11:case 15:ma(e),e.flags&2048&&Di(9,e,e.return);break;case 3:ma(e);break;case 12:ma(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,su(e)):ma(e);break;default:ma(e)}}function su(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];Se=o,dg(o,e)}cg(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Di(8,n,n.return),su(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,su(n));break;default:su(n)}e=e.sibling}}function dg(e,n){for(;Se!==null;){var l=Se;switch(l.tag){case 0:case 11:case 15:Di(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Jl(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,Se=o;else t:for(l=e;Se!==null;){o=Se;var f=o.sibling,h=o.return;if(ng(o),o===l){Se=null;break t}if(f!==null){f.return=h,Se=f;break t}Se=h}}}var CS={getCacheForType:function(e){var n=_e(de),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return _e(de).controller.signal}},NS=typeof WeakMap=="function"?WeakMap:Map,Yt=0,Pt=null,Dt=null,Rt=0,Gt=0,en=null,ki=!1,al=!1,ff=!1,si=0,ae=0,Ri=0,vr=0,df=0,nn=0,ol=0,ga=null,Ie=null,hf=!1,cu=0,hg=0,fu=1/0,du=null,Hi=null,be=0,ji=null,ul=null,ci=0,pf=0,mf=null,pg=null,ya=0,gf=null;function rn(){return(Yt&2)!==0&&Rt!==0?Rt&-Rt:A.T!==null?wf():go()}function mg(){if(nn===0)if((Rt&536870912)===0||jt){var e=Or;Or<<=1,(Or&3932160)===0&&(Or=262144),nn=e}else nn=536870912;return e=We.current,e!==null&&(e.flags|=32),nn}function Ye(e,n,l){(e===Pt&&(Gt===2||Gt===9)||e.cancelPendingCommit!==null)&&(sl(e,0),Li(e,Rt,nn,!1)),Wi(e,l),((Yt&2)===0||e!==Pt)&&(e===Pt&&((Yt&2)===0&&(vr|=l),ae===4&&Li(e,Rt,nn,!1)),Hn(e))}function gg(e,n,l){if((Yt&6)!==0)throw Error(a(327));var o=!l&&(n&127)===0&&(n&e.expiredLanes)===0||Ji(e,n),f=o?MS(e,n):vf(e,n,!0),h=o;do{if(f===0){al&&!o&&Li(e,n,0,!1);break}else{if(l=e.current.alternate,h&&!TS(l)){f=vf(e,n,!1),h=!1;continue}if(f===2){if(h=n,e.errorRecoveryDisabledLanes&h)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;t:{var _=e;f=ga;var U=_.current.memoizedState.isDehydrated;if(U&&(sl(_,b).flags|=256),b=vf(_,b,!1),b!==2){if(ff&&!U){_.errorRecoveryDisabledLanes|=h,vr|=h,f=4;break t}h=Ie,Ie=f,h!==null&&(Ie===null?Ie=h:Ie.push.apply(Ie,h))}f=b}if(h=!1,f!==2)continue}}if(f===1){sl(e,0),Li(e,n,0,!0);break}t:{switch(o=e,h=f,h){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:Li(o,n,nn,!ki);break t;case 2:Ie=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(f=cu+300-ve(),10<f)){if(Li(o,n,nn,!ki),kr(o,0,!0)!==0)break t;ci=n,o.timeoutHandle=Zg(yg.bind(null,o,l,Ie,du,hf,n,nn,vr,ol,ki,h,"Throttled",-0,0),f);break t}yg(o,l,Ie,du,hf,n,nn,vr,ol,ki,h,null,-0,0)}}break}while(!0);Hn(e)}function yg(e,n,l,o,f,h,b,_,U,P,rt,ot,J,tt){if(e.timeoutHandle=-1,ot=n.subtreeFlags,ot&8192||(ot&16785408)===16785408){ot={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kn},sg(n,h,ot);var mt=(h&62914560)===h?cu-ve():(h&4194048)===h?hg-ve():0;if(mt=fw(ot,mt),mt!==null){ci=h,e.cancelPendingCommit=mt(Cg.bind(null,e,n,h,l,o,f,b,_,U,rt,ot,null,J,tt)),Li(e,h,b,!P);return}}Cg(e,n,h,l,o,f,b,_,U)}function TS(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var f=l[o],h=f.getSnapshot;f=f.value;try{if(!Pe(h(),f))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Li(e,n,l,o){n&=~df,n&=~vr,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var h=31-Xt(f),b=1<<h;o[h]=-1,f&=~b}l!==0&&ho(e,l,n)}function hu(){return(Yt&6)===0?(va(0),!1):!0}function yf(){if(Dt!==null){if(Gt===0)var e=Dt.return;else e=Dt,Wn=sr=null,Dc(e),Wr=null,ta=0,e=Dt;for(;e!==null;)Fm(e.alternate,e),e=e.return;Dt=null}}function sl(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,ZS(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ci=0,yf(),Pt=e,Dt=l=Pn(e.current,null),Rt=n,Gt=0,en=null,ki=!1,al=Ji(e,n),ff=!1,ol=nn=df=vr=Ri=ae=0,Ie=ga=null,hf=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-Xt(o),h=1<<f;n|=e[f],o&=~h}return si=n,Ro(),l}function vg(e,n){Tt=null,A.H=ua,n===Jr||n===Io?(n=Rp(),Gt=3):n===bc?(n=Rp(),Gt=4):Gt=n===Fc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,en=n,Dt===null&&(ae=1,nu(e,cn(n,e.current)))}function xg(){var e=We.current;return e===null?!0:(Rt&4194048)===Rt?pn===null:(Rt&62914560)===Rt||(Rt&536870912)!==0?e===pn:!1}function bg(){var e=A.H;return A.H=ua,e===null?ua:e}function Sg(){var e=A.A;return A.A=CS,e}function pu(){ae=4,ki||(Rt&4194048)!==Rt&&We.current!==null||(al=!0),(Ri&134217727)===0&&(vr&134217727)===0||Pt===null||Li(Pt,Rt,nn,!1)}function vf(e,n,l){var o=Yt;Yt|=2;var f=bg(),h=Sg();(Pt!==e||Rt!==n)&&(du=null,sl(e,n)),n=!1;var b=ae;t:do try{if(Gt!==0&&Dt!==null){var _=Dt,U=en;switch(Gt){case 8:yf(),b=6;break t;case 3:case 2:case 9:case 6:We.current===null&&(n=!0);var P=Gt;if(Gt=0,en=null,cl(e,_,U,P),l&&al){b=0;break t}break;default:P=Gt,Gt=0,en=null,cl(e,_,U,P)}}AS(),b=ae;break}catch(rt){vg(e,rt)}while(!0);return n&&e.shellSuspendCounter++,Wn=sr=null,Yt=o,A.H=f,A.A=h,Dt===null&&(Pt=null,Rt=0,Ro()),b}function AS(){for(;Dt!==null;)wg(Dt)}function MS(e,n){var l=Yt;Yt|=2;var o=bg(),f=Sg();Pt!==e||Rt!==n?(du=null,fu=ve()+500,sl(e,n)):al=Ji(e,n);t:do try{if(Gt!==0&&Dt!==null){n=Dt;var h=en;e:switch(Gt){case 1:Gt=0,en=null,cl(e,n,h,1);break;case 2:case 9:if(Dp(h)){Gt=0,en=null,Eg(n);break}n=function(){Gt!==2&&Gt!==9||Pt!==e||(Gt=7),Hn(e)},h.then(n,n);break t;case 3:Gt=7;break t;case 4:Gt=5;break t;case 7:Dp(h)?(Gt=0,en=null,Eg(n)):(Gt=0,en=null,cl(e,n,h,7));break;case 5:var b=null;switch(Dt.tag){case 26:b=Dt.memoizedState;case 5:case 27:var _=Dt;if(b?uy(b):_.stateNode.complete){Gt=0,en=null;var U=_.sibling;if(U!==null)Dt=U;else{var P=_.return;P!==null?(Dt=P,mu(P)):Dt=null}break e}}Gt=0,en=null,cl(e,n,h,5);break;case 6:Gt=0,en=null,cl(e,n,h,6);break;case 8:yf(),ae=6;break t;default:throw Error(a(462))}}zS();break}catch(rt){vg(e,rt)}while(!0);return Wn=sr=null,A.H=o,A.A=f,Yt=l,Dt!==null?0:(Pt=null,Rt=0,Ro(),ae)}function zS(){for(;Dt!==null&&!Yn();)wg(Dt)}function wg(e){var n=Gm(e.alternate,e,si);e.memoizedProps=e.pendingProps,n===null?mu(e):Dt=n}function Eg(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=qm(l,n,n.pendingProps,n.type,void 0,Rt);break;case 11:n=qm(l,n,n.pendingProps,n.type.render,n.ref,Rt);break;case 5:Dc(n);default:Fm(l,n),n=Dt=Sp(n,si),n=Gm(l,n,si)}e.memoizedProps=e.pendingProps,n===null?mu(e):Dt=n}function cl(e,n,l,o){Wn=sr=null,Dc(n),Wr=null,ta=0;var f=n.return;try{if(vS(e,f,n,l,Rt)){ae=1,nu(e,cn(l,e.current)),Dt=null;return}}catch(h){if(f!==null)throw Dt=f,h;ae=1,nu(e,cn(l,e.current)),Dt=null;return}n.flags&32768?(jt||o===1?e=!0:al||(Rt&536870912)!==0?e=!1:(ki=e=!0,(o===2||o===9||o===3||o===6)&&(o=We.current,o!==null&&o.tag===13&&(o.flags|=16384))),_g(n,e)):mu(n)}function mu(e){var n=e;do{if((n.flags&32768)!==0){_g(n,ki);return}e=n.return;var l=SS(n.alternate,n,si);if(l!==null){Dt=l;return}if(n=n.sibling,n!==null){Dt=n;return}Dt=n=e}while(n!==null);ae===0&&(ae=5)}function _g(e,n){do{var l=wS(e.alternate,e);if(l!==null){l.flags&=32767,Dt=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Dt=e;return}Dt=e=l}while(e!==null);ae=6,Dt=null}function Cg(e,n,l,o,f,h,b,_,U){e.cancelPendingCommit=null;do gu();while(be!==0);if((Yt&6)!==0)throw Error(a(327));if(n!==null){if(n===e.current)throw Error(a(177));if(h=n.lanes|n.childLanes,h|=lc,Hs(e,l,h,b,_,U),e===Pt&&(Dt=Pt=null,Rt=0),ul=n,ji=e,ci=l,pf=h,mf=f,pg=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,RS(bt,function(){return zg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=A.T,A.T=null,f=L.p,L.p=2,b=Yt,Yt|=4;try{ES(e,n,l)}finally{Yt=b,L.p=f,A.T=o}}be=1,Ng(),Tg(),Ag()}}function Ng(){if(be===1){be=0;var e=ji,n=ul,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=A.T,A.T=null;var o=L.p;L.p=2;var f=Yt;Yt|=4;try{ag(n,e);var h=zf,b=dp(e.containerInfo),_=h.focusedElem,U=h.selectionRange;if(b!==_&&_&&_.ownerDocument&&fp(_.ownerDocument.documentElement,_)){if(U!==null&&tc(_)){var P=U.start,rt=U.end;if(rt===void 0&&(rt=P),"selectionStart"in _)_.selectionStart=P,_.selectionEnd=Math.min(rt,_.value.length);else{var ot=_.ownerDocument||document,J=ot&&ot.defaultView||window;if(J.getSelection){var tt=J.getSelection(),mt=_.textContent.length,St=Math.min(U.start,mt),$t=U.end===void 0?St:Math.min(U.end,mt);!tt.extend&&St>$t&&(b=$t,$t=St,St=b);var F=cp(_,St),X=cp(_,$t);if(F&&X&&(tt.rangeCount!==1||tt.anchorNode!==F.node||tt.anchorOffset!==F.offset||tt.focusNode!==X.node||tt.focusOffset!==X.offset)){var $=ot.createRange();$.setStart(F.node,F.offset),tt.removeAllRanges(),St>$t?(tt.addRange($),tt.extend(X.node,X.offset)):($.setEnd(X.node,X.offset),tt.addRange($))}}}}for(ot=[],tt=_;tt=tt.parentNode;)tt.nodeType===1&&ot.push({element:tt,left:tt.scrollLeft,top:tt.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ot.length;_++){var at=ot[_];at.element.scrollLeft=at.left,at.element.scrollTop=at.top}}Au=!!Mf,zf=Mf=null}finally{Yt=f,L.p=o,A.T=l}}e.current=n,be=2}}function Tg(){if(be===2){be=0;var e=ji,n=ul,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=A.T,A.T=null;var o=L.p;L.p=2;var f=Yt;Yt|=4;try{eg(e,n.alternate,n)}finally{Yt=f,L.p=o,A.T=l}}be=3}}function Ag(){if(be===4||be===3){be=0,Qn();var e=ji,n=ul,l=ci,o=pg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?be=5:(be=0,ul=ji=null,Mg(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Hi=null),Ll(l),n=n.stateNode,ue&&typeof ue.onCommitFiberRoot=="function")try{ue.onCommitFiberRoot(we,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=A.T,f=L.p,L.p=2,A.T=null;try{for(var h=e.onRecoverableError,b=0;b<o.length;b++){var _=o[b];h(_.value,{componentStack:_.stack})}}finally{A.T=n,L.p=f}}(ci&3)!==0&&gu(),Hn(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===gf?ya++:(ya=0,gf=e):ya=0,va(0)}}function Mg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Jl(n)))}function gu(){return Ng(),Tg(),Ag(),zg()}function zg(){if(be!==5)return!1;var e=ji,n=pf;pf=0;var l=Ll(ci),o=A.T,f=L.p;try{L.p=32>l?32:l,A.T=null,l=mf,mf=null;var h=ji,b=ci;if(be=0,ul=ji=null,ci=0,(Yt&6)!==0)throw Error(a(331));var _=Yt;if(Yt|=4,fg(h.current),ug(h,h.current,b,l),Yt=_,va(0,!1),ue&&typeof ue.onPostCommitFiberRoot=="function")try{ue.onPostCommitFiberRoot(we,h)}catch{}return!0}finally{L.p=f,A.T=o,Mg(e,n)}}function Og(e,n,l){n=cn(l,n),n=Zc(e.stateNode,n,2),e=Mi(e,n,2),e!==null&&(Wi(e,2),Hn(e))}function Zt(e,n,l){if(e.tag===3)Og(e,e,l);else for(;n!==null;){if(n.tag===3){Og(n,e,l);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Hi===null||!Hi.has(o))){e=cn(l,e),l=Dm(2),o=Mi(n,l,2),o!==null&&(km(l,o,n,e),Wi(o,2),Hn(o));break}}n=n.return}}function xf(e,n,l){var o=e.pingCache;if(o===null){o=e.pingCache=new NS;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(l)||(ff=!0,f.add(l),e=OS.bind(null,e,n,l),n.then(e,e))}function OS(e,n,l){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Pt===e&&(Rt&l)===l&&(ae===4||ae===3&&(Rt&62914560)===Rt&&300>ve()-cu?(Yt&2)===0&&sl(e,0):df|=l,ol===Rt&&(ol=0)),Hn(e)}function Dg(e,n){n===0&&(n=fo()),e=ar(e,n),e!==null&&(Wi(e,n),Hn(e))}function DS(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),Dg(e,l)}function kS(e,n){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(n),Dg(e,l)}function RS(e,n){return He(e,n)}var yu=null,fl=null,bf=!1,vu=!1,Sf=!1,Bi=0;function Hn(e){e!==fl&&e.next===null&&(fl===null?yu=fl=e:fl=fl.next=e),vu=!0,bf||(bf=!0,jS())}function va(e,n){if(!Sf&&vu){Sf=!0;do for(var l=!1,o=yu;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var h=0;else{var b=o.suspendedLanes,_=o.pingedLanes;h=(1<<31-Xt(42|e)+1)-1,h&=f&~(b&~_),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(l=!0,jg(o,h))}else h=Rt,h=kr(o,o===Pt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||Ji(o,h)||(l=!0,jg(o,h));o=o.next}while(l);Sf=!1}}function HS(){kg()}function kg(){vu=bf=!1;var e=0;Bi!==0&&GS()&&(e=Bi);for(var n=ve(),l=null,o=yu;o!==null;){var f=o.next,h=Rg(o,n);h===0?(o.next=null,l===null?yu=f:l.next=f,f===null&&(fl=l)):(l=o,(e!==0||(h&3)!==0)&&(vu=!0)),o=f}be!==0&&be!==5||va(e),Bi!==0&&(Bi=0)}function Rg(e,n){for(var l=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var b=31-Xt(h),_=1<<b,U=f[b];U===-1?((_&l)===0||(_&o)!==0)&&(f[b]=Rs(_,n)):U<=n&&(e.expiredLanes|=_),h&=~_}if(n=Pt,l=Rt,l=kr(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,l===0||e===n&&(Gt===2||Gt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&xn(o),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ji(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(o!==null&&xn(o),Ll(l)){case 2:case 8:l=ht;break;case 32:l=bt;break;case 268435456:l=Lt;break;default:l=bt}return o=Hg.bind(null,e),l=He(l,o),e.callbackPriority=n,e.callbackNode=l,n}return o!==null&&o!==null&&xn(o),e.callbackPriority=2,e.callbackNode=null,2}function Hg(e,n){if(be!==0&&be!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(gu()&&e.callbackNode!==l)return null;var o=Rt;return o=kr(e,e===Pt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(gg(e,o,n),Rg(e,ve()),e.callbackNode!=null&&e.callbackNode===l?Hg.bind(null,e):null)}function jg(e,n){if(gu())return null;gg(e,n,!0)}function jS(){FS(function(){(Yt&6)!==0?He(it,HS):kg()})}function wf(){if(Bi===0){var e=$r;e===0&&(e=zr,zr<<=1,(zr&261888)===0&&(zr=256)),Bi=e}return Bi}function Lg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:No(""+e)}function Bg(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function LS(e,n,l,o,f){if(n==="submit"&&l&&l.stateNode===f){var h=Lg((f[ze]||null).action),b=o.submitter;b&&(n=(n=b[ze]||null)?Lg(n.formAction):b.getAttribute("formAction"),n!==null&&(h=n,b=null));var _=new zo("action","action",null,o,f);e.push({event:_,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Bi!==0){var U=b?Bg(f,b):new FormData(f);Vc(l,{pending:!0,data:U,method:f.method,action:h},null,U)}}else typeof h=="function"&&(_.preventDefault(),U=b?Bg(f,b):new FormData(f),Vc(l,{pending:!0,data:U,method:f.method,action:h},h,U))},currentTarget:f}]})}}for(var Ef=0;Ef<rc.length;Ef++){var _f=rc[Ef],BS=_f.toLowerCase(),US=_f[0].toUpperCase()+_f.slice(1);wn(BS,"on"+US)}wn(mp,"onAnimationEnd"),wn(gp,"onAnimationIteration"),wn(yp,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(eS,"onTransitionRun"),wn(nS,"onTransitionStart"),wn(iS,"onTransitionCancel"),wn(vp,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("onPointerLeave",["pointerout","pointerover"]),Zn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xa="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(" "),qS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xa));function Ug(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],f=o.event;o=o.listeners;t:{var h=void 0;if(n)for(var b=o.length-1;0<=b;b--){var _=o[b],U=_.instance,P=_.currentTarget;if(_=_.listener,U!==h&&f.isPropagationStopped())break t;h=_,f.currentTarget=P;try{h(f)}catch(rt){ko(rt)}f.currentTarget=null,h=U}else for(b=0;b<o.length;b++){if(_=o[b],U=_.instance,P=_.currentTarget,_=_.listener,U!==h&&f.isPropagationStopped())break t;h=_,f.currentTarget=P;try{h(f)}catch(rt){ko(rt)}f.currentTarget=null,h=U}}}}function kt(e,n){var l=n[Rr];l===void 0&&(l=n[Rr]=new Set);var o=e+"__bubble";l.has(o)||(qg(n,e,2,!1),l.add(o))}function Cf(e,n,l){var o=0;n&&(o|=4),qg(l,e,o,n)}var xu="_reactListening"+Math.random().toString(36).slice(2);function Nf(e){if(!e[xu]){e[xu]=!0,bo.forEach(function(l){l!=="selectionchange"&&(qS.has(l)||Cf(l,!1,e),Cf(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[xu]||(n[xu]=!0,Cf("selectionchange",!1,n))}}function qg(e,n,l,o){switch(my(n)){case 2:var f=pw;break;case 8:f=mw;break;default:f=Vf}l=f.bind(null,n,l,e),f=void 0,!Xs||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function Tf(e,n,l,o,f){var h=o;if((n&1)===0&&(n&2)===0&&o!==null)t:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var _=o.stateNode.containerInfo;if(_===f)break;if(b===4)for(b=o.return;b!==null;){var U=b.tag;if((U===3||U===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;_!==null;){if(b=yi(_),b===null)return;if(U=b.tag,U===5||U===6||U===26||U===27){o=h=b;continue t}_=_.parentNode}}o=o.return}Xh(function(){var P=h,rt=Ys(l),ot=[];t:{var J=xp.get(e);if(J!==void 0){var tt=zo,mt=e;switch(e){case"keypress":if(Ao(l)===0)break t;case"keydown":case"keyup":tt=kb;break;case"focusin":mt="focus",tt=Ks;break;case"focusout":mt="blur",tt=Ks;break;case"beforeblur":case"afterblur":tt=Ks;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":tt=Fh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":tt=Sb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":tt=jb;break;case mp:case gp:case yp:tt=_b;break;case vp:tt=Bb;break;case"scroll":case"scrollend":tt=xb;break;case"wheel":tt=qb;break;case"copy":case"cut":case"paste":tt=Nb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":tt=$h;break;case"toggle":case"beforetoggle":tt=Ib}var St=(n&4)!==0,$t=!St&&(e==="scroll"||e==="scrollend"),F=St?J!==null?J+"Capture":null:J;St=[];for(var X=P,$;X!==null;){var at=X;if($=at.stateNode,at=at.tag,at!==5&&at!==26&&at!==27||$===null||F===null||(at=Vl(X,F),at!=null&&St.push(ba(X,at,$))),$t)break;X=X.return}0<St.length&&(J=new tt(J,mt,null,l,rt),ot.push({event:J,listeners:St}))}}if((n&7)===0){t:{if(J=e==="mouseover"||e==="pointerover",tt=e==="mouseout"||e==="pointerout",J&&l!==Is&&(mt=l.relatedTarget||l.fromElement)&&(yi(mt)||mt[Gn]))break t;if((tt||J)&&(J=rt.window===rt?rt:(J=rt.ownerDocument)?J.defaultView||J.parentWindow:window,tt?(mt=l.relatedTarget||l.toElement,tt=P,mt=mt?yi(mt):null,mt!==null&&($t=s(mt),St=mt.tag,mt!==$t||St!==5&&St!==27&&St!==6)&&(mt=null)):(tt=null,mt=P),tt!==mt)){if(St=Fh,at="onMouseLeave",F="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(St=$h,at="onPointerLeave",F="onPointerEnter",X="pointer"),$t=tt==null?J:xi(tt),$=mt==null?J:xi(mt),J=new St(at,X+"leave",tt,l,rt),J.target=$t,J.relatedTarget=$,at=null,yi(rt)===P&&(St=new St(F,X+"enter",mt,l,rt),St.target=$,St.relatedTarget=$t,at=St),$t=at,tt&&mt)e:{for(St=VS,F=tt,X=mt,$=0,at=F;at;at=St(at))$++;at=0;for(var yt=X;yt;yt=St(yt))at++;for(;0<$-at;)F=St(F),$--;for(;0<at-$;)X=St(X),at--;for(;$--;){if(F===X||X!==null&&F===X.alternate){St=F;break e}F=St(F),X=St(X)}St=null}else St=null;tt!==null&&Vg(ot,J,tt,St,!1),mt!==null&&$t!==null&&Vg(ot,$t,mt,St,!0)}}t:{if(J=P?xi(P):window,tt=J.nodeName&&J.nodeName.toLowerCase(),tt==="select"||tt==="input"&&J.type==="file")var qt=rp;else if(np(J))if(lp)qt=Jb;else{qt=$b;var gt=Kb}else tt=J.nodeName,!tt||tt.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?P&&Vs(P.elementType)&&(qt=rp):qt=Pb;if(qt&&(qt=qt(e,P))){ip(ot,qt,l,rt);break t}gt&&gt(e,J,P),e==="focusout"&&P&&J.type==="number"&&P.memoizedProps.value!=null&&ql(J,"number",J.value)}switch(gt=P?xi(P):window,e){case"focusin":(np(gt)||gt.contentEditable==="true")&&(Ir=gt,ec=P,Kl=null);break;case"focusout":Kl=ec=Ir=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,hp(ot,l,rt);break;case"selectionchange":if(tS)break;case"keydown":case"keyup":hp(ot,l,rt)}var At;if(Ps)t:{switch(e){case"compositionstart":var Ht="onCompositionStart";break t;case"compositionend":Ht="onCompositionEnd";break t;case"compositionupdate":Ht="onCompositionUpdate";break t}Ht=void 0}else Vr?tp(e,l)&&(Ht="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ht="onCompositionStart");Ht&&(Ph&&l.locale!=="ko"&&(Vr||Ht!=="onCompositionStart"?Ht==="onCompositionEnd"&&Vr&&(At=Gh()):(wi=rt,Gs="value"in wi?wi.value:wi.textContent,Vr=!0)),gt=bu(P,Ht),0<gt.length&&(Ht=new Kh(Ht,e,null,l,rt),ot.push({event:Ht,listeners:gt}),At?Ht.data=At:(At=ep(l),At!==null&&(Ht.data=At)))),(At=Qb?Xb(e,l):Gb(e,l))&&(Ht=bu(P,"onBeforeInput"),0<Ht.length&&(gt=new Kh("onBeforeInput","beforeinput",null,l,rt),ot.push({event:gt,listeners:Ht}),gt.data=At)),LS(ot,e,P,l,rt)}Ug(ot,n)})}function ba(e,n,l){return{instance:e,listener:n,currentTarget:l}}function bu(e,n){for(var l=n+"Capture",o=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Vl(e,l),f!=null&&o.unshift(ba(e,f,h)),f=Vl(e,n),f!=null&&o.push(ba(e,f,h))),e.tag===3)return o;e=e.return}return[]}function VS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vg(e,n,l,o,f){for(var h=n._reactName,b=[];l!==null&&l!==o;){var _=l,U=_.alternate,P=_.stateNode;if(_=_.tag,U!==null&&U===o)break;_!==5&&_!==26&&_!==27||P===null||(U=P,f?(P=Vl(l,h),P!=null&&b.unshift(ba(l,P,U))):f||(P=Vl(l,h),P!=null&&b.push(ba(l,P,U)))),l=l.return}b.length!==0&&e.push({event:n,listeners:b})}var IS=/\r\n?/g,YS=/\u0000|\uFFFD/g;function Ig(e){return(typeof e=="string"?e:""+e).replace(IS,`
9
+ `).replace(YS,"")}function Yg(e,n){return n=Ig(n),Ig(e)===n}function Kt(e,n,l,o,f,h){switch(l){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Br(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Br(e,""+o);break;case"className":jr(e,"class",o);break;case"tabIndex":jr(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":jr(e,l,o);break;case"style":Yh(e,o,h);break;case"data":if(n!=="object"){jr(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=No(""+o),e.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(l,"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 h=="function"&&(l==="formAction"?(n!=="input"&&Kt(e,n,"name",f.name,f,null),Kt(e,n,"formEncType",f.formEncType,f,null),Kt(e,n,"formMethod",f.formMethod,f,null),Kt(e,n,"formTarget",f.formTarget,f,null)):(Kt(e,n,"encType",f.encType,f,null),Kt(e,n,"method",f.method,f,null),Kt(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=No(""+o),e.setAttribute(l,o);break;case"onClick":o!=null&&(e.onclick=Kn);break;case"onScroll":o!=null&&kt("scroll",e);break;case"onScrollEnd":o!=null&&kt("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}l=No(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""+o):e.removeAttribute(l);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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":o===!0?e.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,o):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(l,o):e.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(l):e.setAttribute(l,o);break;case"popover":kt("beforetoggle",e),kt("toggle",e),Hr(e,"popover",o);break;case"xlinkActuate":Sn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Sn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Sn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Sn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Sn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Sn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Hr(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=yb.get(l)||l,Hr(e,l,o))}}function Af(e,n,l,o,f,h){switch(l){case"style":Yh(e,o,h);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"children":typeof o=="string"?Br(e,o):(typeof o=="number"||typeof o=="bigint")&&Br(e,""+o);break;case"onScroll":o!=null&&kt("scroll",e);break;case"onScrollEnd":o!=null&&kt("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!So.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),n=l.slice(2,f?l.length-7:void 0),h=e[ze]||null,h=h!=null?h[l]:null,typeof h=="function"&&e.removeEventListener(n,h,f),typeof o=="function")){typeof h!="function"&&h!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,o,f);break t}l in e?e[l]=o:o===!0?e.setAttribute(l,""):Hr(e,l,o)}}}function Ne(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":kt("error",e),kt("load",e);var o=!1,f=!1,h;for(h in l)if(l.hasOwnProperty(h)){var b=l[h];if(b!=null)switch(h){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Kt(e,n,h,b,l,null)}}f&&Kt(e,n,"srcSet",l.srcSet,l,null),o&&Kt(e,n,"src",l.src,l,null);return;case"input":kt("invalid",e);var _=h=b=f=null,U=null,P=null;for(o in l)if(l.hasOwnProperty(o)){var rt=l[o];if(rt!=null)switch(o){case"name":f=rt;break;case"type":b=rt;break;case"checked":U=rt;break;case"defaultChecked":P=rt;break;case"value":h=rt;break;case"defaultValue":_=rt;break;case"children":case"dangerouslySetInnerHTML":if(rt!=null)throw Error(a(137,n));break;default:Kt(e,n,o,rt,l,null)}}Co(e,h,_,U,P,b,f,!1);return;case"select":kt("invalid",e),o=b=h=null;for(f in l)if(l.hasOwnProperty(f)&&(_=l[f],_!=null))switch(f){case"value":h=_;break;case"defaultValue":b=_;break;case"multiple":o=_;default:Kt(e,n,f,_,l,null)}n=h,l=b,e.multiple=!!o,n!=null?Fn(e,!!o,n,!1):l!=null&&Fn(e,!!o,l,!0);return;case"textarea":kt("invalid",e),h=f=o=null;for(b in l)if(l.hasOwnProperty(b)&&(_=l[b],_!=null))switch(b){case"value":o=_;break;case"defaultValue":f=_;break;case"children":h=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(a(91));break;default:Kt(e,n,b,_,l,null)}Vh(e,o,f,h);return;case"option":for(U in l)l.hasOwnProperty(U)&&(o=l[U],o!=null)&&(U==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Kt(e,n,U,o,l,null));return;case"dialog":kt("beforetoggle",e),kt("toggle",e),kt("cancel",e),kt("close",e);break;case"iframe":case"object":kt("load",e);break;case"video":case"audio":for(o=0;o<xa.length;o++)kt(xa[o],e);break;case"image":kt("error",e),kt("load",e);break;case"details":kt("toggle",e);break;case"embed":case"source":case"link":kt("error",e),kt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in l)if(l.hasOwnProperty(P)&&(o=l[P],o!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Kt(e,n,P,o,l,null)}return;default:if(Vs(n)){for(rt in l)l.hasOwnProperty(rt)&&(o=l[rt],o!==void 0&&Af(e,n,rt,o,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(o=l[_],o!=null&&Kt(e,n,_,o,l,null))}function QS(e,n,l,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,b=null,_=null,U=null,P=null,rt=null;for(tt in l){var ot=l[tt];if(l.hasOwnProperty(tt)&&ot!=null)switch(tt){case"checked":break;case"value":break;case"defaultValue":U=ot;default:o.hasOwnProperty(tt)||Kt(e,n,tt,null,o,ot)}}for(var J in o){var tt=o[J];if(ot=l[J],o.hasOwnProperty(J)&&(tt!=null||ot!=null))switch(J){case"type":h=tt;break;case"name":f=tt;break;case"checked":P=tt;break;case"defaultChecked":rt=tt;break;case"value":b=tt;break;case"defaultValue":_=tt;break;case"children":case"dangerouslySetInnerHTML":if(tt!=null)throw Error(a(137,n));break;default:tt!==ot&&Kt(e,n,J,tt,o,ot)}}nr(e,b,_,U,P,rt,h,f);return;case"select":tt=b=_=J=null;for(h in l)if(U=l[h],l.hasOwnProperty(h)&&U!=null)switch(h){case"value":break;case"multiple":tt=U;default:o.hasOwnProperty(h)||Kt(e,n,h,null,o,U)}for(f in o)if(h=o[f],U=l[f],o.hasOwnProperty(f)&&(h!=null||U!=null))switch(f){case"value":J=h;break;case"defaultValue":_=h;break;case"multiple":b=h;default:h!==U&&Kt(e,n,f,h,o,U)}n=_,l=b,o=tt,J!=null?Fn(e,!!l,J,!1):!!o!=!!l&&(n!=null?Fn(e,!!l,n,!0):Fn(e,!!l,l?[]:"",!1));return;case"textarea":tt=J=null;for(_ in l)if(f=l[_],l.hasOwnProperty(_)&&f!=null&&!o.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Kt(e,n,_,null,o,f)}for(b in o)if(f=o[b],h=l[b],o.hasOwnProperty(b)&&(f!=null||h!=null))switch(b){case"value":J=f;break;case"defaultValue":tt=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==h&&Kt(e,n,b,f,o,h)}qh(e,J,tt);return;case"option":for(var mt in l)J=l[mt],l.hasOwnProperty(mt)&&J!=null&&!o.hasOwnProperty(mt)&&(mt==="selected"?e.selected=!1:Kt(e,n,mt,null,o,J));for(U in o)J=o[U],tt=l[U],o.hasOwnProperty(U)&&J!==tt&&(J!=null||tt!=null)&&(U==="selected"?e.selected=J&&typeof J!="function"&&typeof J!="symbol":Kt(e,n,U,J,o,tt));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 St in l)J=l[St],l.hasOwnProperty(St)&&J!=null&&!o.hasOwnProperty(St)&&Kt(e,n,St,null,o,J);for(P in o)if(J=o[P],tt=l[P],o.hasOwnProperty(P)&&J!==tt&&(J!=null||tt!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(137,n));break;default:Kt(e,n,P,J,o,tt)}return;default:if(Vs(n)){for(var $t in l)J=l[$t],l.hasOwnProperty($t)&&J!==void 0&&!o.hasOwnProperty($t)&&Af(e,n,$t,void 0,o,J);for(rt in o)J=o[rt],tt=l[rt],!o.hasOwnProperty(rt)||J===tt||J===void 0&&tt===void 0||Af(e,n,rt,J,o,tt);return}}for(var F in l)J=l[F],l.hasOwnProperty(F)&&J!=null&&!o.hasOwnProperty(F)&&Kt(e,n,F,null,o,J);for(ot in o)J=o[ot],tt=l[ot],!o.hasOwnProperty(ot)||J===tt||J==null&&tt==null||Kt(e,n,ot,J,o,tt)}function Qg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function XS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var f=l[o],h=f.transferSize,b=f.initiatorType,_=f.duration;if(h&&_&&Qg(b)){for(b=0,_=f.responseEnd,o+=1;o<l.length;o++){var U=l[o],P=U.startTime;if(P>_)break;var rt=U.transferSize,ot=U.initiatorType;rt&&Qg(ot)&&(U=U.responseEnd,b+=rt*(U<_?1:(_-P)/(U-P)))}if(--o,n+=8*(h+b)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Mf=null,zf=null;function Su(e){return e.nodeType===9?e:e.ownerDocument}function Xg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Gg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Of(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Df=null;function GS(){var e=window.event;return e&&e.type==="popstate"?e===Df?!1:(Df=e,!0):(Df=null,!1)}var Zg=typeof setTimeout=="function"?setTimeout:void 0,ZS=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,FS=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(e){return Fg.resolve(null).then(e).catch(KS)}:Zg;function KS(e){setTimeout(function(){throw e})}function Ui(e){return e==="head"}function Kg(e,n){var l=n,o=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(o===0){e.removeChild(f),ml(n);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")Sa(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Sa(l);for(var h=l.firstChild;h;){var b=h.nextSibling,_=h.nodeName;h[tr]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&h.rel.toLowerCase()==="stylesheet"||l.removeChild(h),h=b}}else l==="body"&&Sa(e.ownerDocument.body);l=f}while(l);ml(n)}function $g(e,n){var l=e;e=0;do{var o=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=o}while(l)}function kf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":kf(l),Bl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function $S(e,n,l,o){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[tr])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function PS(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=mn(e.nextSibling),e===null))return null;return e}function Pg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=mn(e.nextSibling),e===null))return null;return e}function Rf(e){return e.data==="$?"||e.data==="$~"}function Hf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function JS(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var o=function(){n(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function mn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var jf=null;function Jg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return mn(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function Wg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function ty(e,n,l){switch(n=Su(l),e){case"html":if(e=n.documentElement,!e)throw Error(a(452));return e;case"head":if(e=n.head,!e)throw Error(a(453));return e;case"body":if(e=n.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Sa(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Bl(e)}var gn=new Map,ey=new Set;function wu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fi=L.d;L.d={f:WS,r:tw,D:ew,C:nw,L:iw,m:rw,X:aw,S:lw,M:ow};function WS(){var e=fi.f(),n=hu();return e||n}function tw(e){var n=vi(e);n!==null&&n.tag===5&&n.type==="form"?vm(n):fi.r(e)}var dl=typeof document>"u"?null:document;function ny(e,n,l){var o=dl;if(o&&typeof n=="string"&&n){var f=Le(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),ey.has(f)||(ey.add(f),e={rel:e,crossOrigin:l,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),Ne(n,"link",e),fe(n),o.head.appendChild(n)))}}function ew(e){fi.D(e),ny("dns-prefetch",e,null)}function nw(e,n){fi.C(e,n),ny("preconnect",e,n)}function iw(e,n,l){fi.L(e,n,l);var o=dl;if(o&&e&&n){var f='link[rel="preload"][as="'+Le(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+Le(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+Le(l.imageSizes)+'"]')):f+='[href="'+Le(e)+'"]';var h=f;switch(n){case"style":h=hl(e);break;case"script":h=pl(e)}gn.has(h)||(e=y({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),gn.set(h,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(wa(h))||n==="script"&&o.querySelector(Ea(h))||(n=o.createElement("link"),Ne(n,"link",e),fe(n),o.head.appendChild(n)))}}function rw(e,n){fi.m(e,n);var l=dl;if(l&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Le(o)+'"][href="'+Le(e)+'"]',h=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=pl(e)}if(!gn.has(h)&&(e=y({rel:"modulepreload",href:e},n),gn.set(h,e),l.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ea(h)))return}o=l.createElement("link"),Ne(o,"link",e),fe(o),l.head.appendChild(o)}}}function lw(e,n,l){fi.S(e,n,l);var o=dl;if(o&&e){var f=bi(o).hoistableStyles,h=hl(e);n=n||"default";var b=f.get(h);if(!b){var _={loading:0,preload:null};if(b=o.querySelector(wa(h)))_.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},l),(l=gn.get(h))&&Lf(e,l);var U=b=o.createElement("link");fe(U),Ne(U,"link",e),U._p=new Promise(function(P,rt){U.onload=P,U.onerror=rt}),U.addEventListener("load",function(){_.loading|=1}),U.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Eu(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:_},f.set(h,b)}}}function aw(e,n){fi.X(e,n);var l=dl;if(l&&e){var o=bi(l).hoistableScripts,f=pl(e),h=o.get(f);h||(h=l.querySelector(Ea(f)),h||(e=y({src:e,async:!0},n),(n=gn.get(f))&&Bf(e,n),h=l.createElement("script"),fe(h),Ne(h,"link",e),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(f,h))}}function ow(e,n){fi.M(e,n);var l=dl;if(l&&e){var o=bi(l).hoistableScripts,f=pl(e),h=o.get(f);h||(h=l.querySelector(Ea(f)),h||(e=y({src:e,async:!0,type:"module"},n),(n=gn.get(f))&&Bf(e,n),h=l.createElement("script"),fe(h),Ne(h,"link",e),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(f,h))}}function iy(e,n,l,o){var f=(f=ct.current)?wu(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=hl(l.href),l=bi(f).hoistableStyles,o=l.get(n),o||(o={type:"style",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=hl(l.href);var h=bi(f).hoistableStyles,b=h.get(e);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,b),(h=f.querySelector(wa(e)))&&!h._p&&(b.instance=h,b.state.loading=5),gn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gn.set(e,l),h||uw(f,e,l,b.state))),n&&o===null)throw Error(a(528,""));return b}if(n&&o!==null)throw Error(a(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=pl(l),l=bi(f).hoistableScripts,o=l.get(n),o||(o={type:"script",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function hl(e){return'href="'+Le(e)+'"'}function wa(e){return'link[rel="stylesheet"]['+e+"]"}function ry(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function uw(e,n,l,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Ne(n,"link",l),fe(n),e.head.appendChild(n))}function pl(e){return'[src="'+Le(e)+'"]'}function Ea(e){return"script[async]"+e}function ly(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Le(l.href)+'"]');if(o)return n.instance=o,fe(o),o;var f=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),fe(o),Ne(o,"style",f),Eu(o,l.precedence,e),n.instance=o;case"stylesheet":f=hl(l.href);var h=e.querySelector(wa(f));if(h)return n.state.loading|=4,n.instance=h,fe(h),h;o=ry(l),(f=gn.get(f))&&Lf(o,f),h=(e.ownerDocument||e).createElement("link"),fe(h);var b=h;return b._p=new Promise(function(_,U){b.onload=_,b.onerror=U}),Ne(h,"link",o),n.state.loading|=4,Eu(h,l.precedence,e),n.instance=h;case"script":return h=pl(l.src),(f=e.querySelector(Ea(h)))?(n.instance=f,fe(f),f):(o=l,(f=gn.get(h))&&(o=y({},l),Bf(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),fe(f),Ne(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Eu(o,l.precedence,e));return n.instance}function Eu(e,n,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,h=f,b=0;b<o.length;b++){var _=o[b];if(_.dataset.precedence===n)h=_;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function Lf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Bf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var _u=null;function ay(e,n,l){if(_u===null){var o=new Map,f=_u=new Map;f.set(l,o)}else f=_u,o=f.get(l),o||(o=new Map,f.set(l,o));if(o.has(e))return o;for(o.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var h=l[f];if(!(h[tr]||h[xe]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var b=h.getAttribute(n)||"";b=e+b;var _=o.get(b);_?_.push(h):o.set(b,[h])}}return o}function oy(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function sw(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function uy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function cw(e,n,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=hl(o.href),h=n.querySelector(wa(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Cu.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=h,fe(h);return}h=n.ownerDocument||n,o=ry(o),(f=gn.get(f))&&Lf(o,f),h=h.createElement("link"),fe(h);var b=h;b._p=new Promise(function(_,U){b.onload=_,b.onerror=U}),Ne(h,"link",o),l.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Cu.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var Uf=0;function fw(e,n){return e.stylesheets&&e.count===0&&Tu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var o=setTimeout(function(){if(e.stylesheets&&Tu(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&Uf===0&&(Uf=62500*XS());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tu(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>Uf?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Cu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Nu=null;function Tu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Nu=new Map,n.forEach(dw,e),Nu=null,Cu.call(e))}function dw(e,n){if(!(n.state.loading&4)){var l=Nu.get(e);if(l)var o=l.get(null);else{l=new Map,Nu.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var b=f[h];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),o=b)}o&&l.set(null,o)}f=n.instance,b=f.getAttribute("data-precedence"),h=l.get(b)||o,h===o&&l.set(null,f),l.set(b,f),this.count++,o=Cu.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var _a={$$typeof:w,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function hw(e,n,l,o,f,h,b,_,U){this.tag=1,this.containerInfo=e,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=Hl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hl(0),this.hiddenUpdates=Hl(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function sy(e,n,l,o,f,h,b,_,U,P,rt,ot){return e=new hw(e,n,l,b,U,P,rt,ot,_),n=1,h===!0&&(n|=24),h=Je(3,null,null,n),e.current=h,h.stateNode=e,n=yc(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:o,isDehydrated:l,cache:n},Sc(h),e}function cy(e){return e?(e=Xr,e):Xr}function fy(e,n,l,o,f,h){f=cy(f),o.context===null?o.context=f:o.pendingContext=f,o=Ai(n),o.payload={element:l},h=h===void 0?null:h,h!==null&&(o.callback=h),l=Mi(e,o,n),l!==null&&(Ye(l,e,n),na(l,e,n))}function dy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function qf(e,n){dy(e,n),(e=e.alternate)&&dy(e,n)}function hy(e){if(e.tag===13||e.tag===31){var n=ar(e,67108864);n!==null&&Ye(n,e,67108864),qf(e,67108864)}}function py(e){if(e.tag===13||e.tag===31){var n=rn();n=jl(n);var l=ar(e,n);l!==null&&Ye(l,e,n),qf(e,n)}}var Au=!0;function pw(e,n,l,o){var f=A.T;A.T=null;var h=L.p;try{L.p=2,Vf(e,n,l,o)}finally{L.p=h,A.T=f}}function mw(e,n,l,o){var f=A.T;A.T=null;var h=L.p;try{L.p=8,Vf(e,n,l,o)}finally{L.p=h,A.T=f}}function Vf(e,n,l,o){if(Au){var f=If(o);if(f===null)Tf(e,n,o,Mu,l),gy(e,o);else if(yw(f,e,n,l,o))o.stopPropagation();else if(gy(e,o),n&4&&-1<gw.indexOf(e)){for(;f!==null;){var h=vi(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var b=Xn(h.pendingLanes);if(b!==0){var _=h;for(_.pendingLanes|=2,_.entangledLanes|=2;b;){var U=1<<31-Xt(b);_.entanglements[1]|=U,b&=~U}Hn(h),(Yt&6)===0&&(fu=ve()+500,va(0))}}break;case 31:case 13:_=ar(h,2),_!==null&&Ye(_,h,2),hu(),qf(h,2)}if(h=If(o),h===null&&Tf(e,n,o,Mu,l),h===f)break;f=h}f!==null&&o.stopPropagation()}else Tf(e,n,o,null,l)}}function If(e){return e=Ys(e),Yf(e)}var Mu=null;function Yf(e){if(Mu=null,e=yi(e),e!==null){var n=s(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=c(n),e!==null)return e;e=null}else if(l===31){if(e=d(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Mu=e,null}function my(e){switch(e){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(gi()){case it:return 2;case ht:return 8;case bt:case zt:return 32;case Lt:return 268435456;default:return 32}default:return 32}}var Qf=!1,qi=null,Vi=null,Ii=null,Ca=new Map,Na=new Map,Yi=[],gw="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 gy(e,n){switch(e){case"focusin":case"focusout":qi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":Ca.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Na.delete(n.pointerId)}}function Ta(e,n,l,o,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:l,eventSystemFlags:o,nativeEvent:h,targetContainers:[f]},n!==null&&(n=vi(n),n!==null&&hy(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function yw(e,n,l,o,f){switch(n){case"focusin":return qi=Ta(qi,e,n,l,o,f),!0;case"dragenter":return Vi=Ta(Vi,e,n,l,o,f),!0;case"mouseover":return Ii=Ta(Ii,e,n,l,o,f),!0;case"pointerover":var h=f.pointerId;return Ca.set(h,Ta(Ca.get(h)||null,e,n,l,o,f)),!0;case"gotpointercapture":return h=f.pointerId,Na.set(h,Ta(Na.get(h)||null,e,n,l,o,f)),!0}return!1}function yy(e){var n=yi(e.target);if(n!==null){var l=s(n);if(l!==null){if(n=l.tag,n===13){if(n=c(l),n!==null){e.blockedOn=n,yo(e.priority,function(){py(l)});return}}else if(n===31){if(n=d(l),n!==null){e.blockedOn=n,yo(e.priority,function(){py(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=If(e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);Is=o,l.target.dispatchEvent(o),Is=null}else return n=vi(l),n!==null&&hy(n),e.blockedOn=l,!1;n.shift()}return!0}function vy(e,n,l){zu(e)&&l.delete(n)}function vw(){Qf=!1,qi!==null&&zu(qi)&&(qi=null),Vi!==null&&zu(Vi)&&(Vi=null),Ii!==null&&zu(Ii)&&(Ii=null),Ca.forEach(vy),Na.forEach(vy)}function Ou(e,n){e.blockedOn===n&&(e.blockedOn=null,Qf||(Qf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,vw)))}var Du=null;function xy(e){Du!==e&&(Du=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Du===e&&(Du=null);for(var n=0;n<e.length;n+=3){var l=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(Yf(o||l)===null)continue;break}var h=vi(l);h!==null&&(e.splice(n,3),n-=3,Vc(h,{pending:!0,data:f,method:l.method,action:o},o,f))}}))}function ml(e){function n(U){return Ou(U,e)}qi!==null&&Ou(qi,e),Vi!==null&&Ou(Vi,e),Ii!==null&&Ou(Ii,e),Ca.forEach(n),Na.forEach(n);for(var l=0;l<Yi.length;l++){var o=Yi[l];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Yi.length&&(l=Yi[0],l.blockedOn===null);)yy(l),l.blockedOn===null&&Yi.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var f=l[o],h=l[o+1],b=f[ze]||null;if(typeof h=="function")b||xy(l);else if(b){var _=null;if(h&&h.hasAttribute("formAction")){if(f=h,b=h[ze]||null)_=b.formAction;else if(Yf(f)!==null)continue}else _=b.action;typeof _=="function"?l[o+1]=_:(l.splice(o,3),o-=3),xy(l)}}}function by(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function Xf(e){this._internalRoot=e}ku.prototype.render=Xf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));var l=n.current,o=rn();fy(l,o,e,n,null,null)},ku.prototype.unmount=Xf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;fy(e.current,2,null,e,null,null),hu(),n[Gn]=null}};function ku(e){this._internalRoot=e}ku.prototype.unstable_scheduleHydration=function(e){if(e){var n=go();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Yi.length&&n!==0&&n<Yi[l].priority;l++);Yi.splice(l,0,e),l===0&&yy(e)}};var Sy=i.version;if(Sy!=="19.2.4")throw Error(a(527,Sy,"19.2.4"));L.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=p(n),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var xw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ru.isDisabled&&Ru.supportsFiber)try{we=Ru.inject(xw),ue=Ru}catch{}}return Ma.createRoot=function(e,n){if(!u(e))throw Error(a(299));var l=!1,o="",f=Am,h=Mm,b=zm;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=sy(e,1,!1,null,null,l,o,null,f,h,b,by),e[Gn]=n.current,Nf(e),new Xf(n)},Ma.hydrateRoot=function(e,n,l){if(!u(e))throw Error(a(299));var o=!1,f="",h=Am,b=Mm,_=zm,U=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(h=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError),l.formState!==void 0&&(U=l.formState)),n=sy(e,1,!0,n,l??null,o,f,U,h,b,_,by),n.context=cy(null),l=n.current,o=rn(),o=jl(o),f=Ai(o),f.callback=null,Mi(l,f,o),l=o,n.current.lanes=l,Wi(n,l),Hn(n),e[Gn]=n.current,Nf(e),new ku(n)},Ma.version="19.2.4",Ma}var Oy;function Mw(){if(Oy)return Ff.exports;Oy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Ff.exports=Aw(),Ff.exports}var zw=Mw(),no=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ow={setTimeout:(t,i)=>setTimeout(t,i),clearTimeout:t=>clearTimeout(t),setInterval:(t,i)=>setInterval(t,i),clearInterval:t=>clearInterval(t)},Dw=class{#t=Ow;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,i){return this.#t.setTimeout(t,i)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,i){return this.#t.setInterval(t,i)}clearInterval(t){this.#t.clearInterval(t)}},br=new Dw;function kw(t){setTimeout(t,0)}var _r=typeof window>"u"||"Deno"in globalThis;function Xe(){}function Rw(t,i){return typeof t=="function"?t(i):t}function Cd(t){return typeof t=="number"&&t>=0&&t!==1/0}function Bv(t,i){return Math.max(t+(i||0)-Date.now(),0)}function Ki(t,i){return typeof t=="function"?t(i):t}function yn(t,i){return typeof t=="function"?t(i):t}function Dy(t,i){const{type:r="all",exact:a,fetchStatus:u,predicate:s,queryKey:c,stale:d}=t;if(c){if(a){if(i.queryHash!==nh(c,i.options))return!1}else if(!Qa(i.queryKey,c))return!1}if(r!=="all"){const m=i.isActive();if(r==="active"&&!m||r==="inactive"&&m)return!1}return!(typeof d=="boolean"&&i.isStale()!==d||u&&u!==i.state.fetchStatus||s&&!s(i))}function ky(t,i){const{exact:r,status:a,predicate:u,mutationKey:s}=t;if(s){if(!i.options.mutationKey)return!1;if(r){if(Ya(i.options.mutationKey)!==Ya(s))return!1}else if(!Qa(i.options.mutationKey,s))return!1}return!(a&&i.state.status!==a||u&&!u(i))}function nh(t,i){return(i?.queryKeyHashFn||Ya)(t)}function Ya(t){return JSON.stringify(t,(i,r)=>Td(r)?Object.keys(r).sort().reduce((a,u)=>(a[u]=r[u],a),{}):r)}function Qa(t,i){return t===i?!0:typeof t!=typeof i?!1:t&&i&&typeof t=="object"&&typeof i=="object"?Object.keys(i).every(r=>Qa(t[r],i[r])):!1}var Hw=Object.prototype.hasOwnProperty;function Uv(t,i,r=0){if(t===i)return t;if(r>500)return i;const a=Ry(t)&&Ry(i);if(!a&&!(Td(t)&&Td(i)))return i;const s=(a?t:Object.keys(t)).length,c=a?i:Object.keys(i),d=c.length,m=a?new Array(d):{};let p=0;for(let g=0;g<d;g++){const y=a?g:c[g],v=t[y],x=i[y];if(v===x){m[y]=v,(a?g<s:Hw.call(t,y))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){m[y]=x;continue}const S=Uv(v,x,r+1);m[y]=S,S===v&&p++}return s===d&&p===s?t:m}function Nd(t,i){if(!i||Object.keys(t).length!==Object.keys(i).length)return!1;for(const r in t)if(t[r]!==i[r])return!1;return!0}function Ry(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Td(t){if(!Hy(t))return!1;const i=t.constructor;if(i===void 0)return!0;const r=i.prototype;return!(!Hy(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Hy(t){return Object.prototype.toString.call(t)==="[object Object]"}function jw(t){return new Promise(i=>{br.setTimeout(i,t)})}function Ad(t,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,i):r.structuralSharing!==!1?Uv(t,i):i}function Lw(t,i,r=0){const a=[...t,i];return r&&a.length>r?a.slice(1):a}function Bw(t,i,r=0){const a=[i,...t];return r&&a.length>r?a.slice(0,-1):a}var ih=Symbol();function qv(t,i){return!t.queryFn&&i?.initialPromise?()=>i.initialPromise:!t.queryFn||t.queryFn===ih?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Vv(t,i){return typeof t=="function"?t(...i):!!t}function Uw(t,i,r){let a=!1,u;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(u??=i(),a||(a=!0,u.aborted?r():u.addEventListener("abort",r,{once:!0})),u)}),t}var qw=class extends no{#t;#e;#n;constructor(){super(),this.#n=t=>{if(!_r&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},rh=new qw;function Md(){let t,i;const r=new Promise((u,s)=>{t=u,i=s});r.status="pending",r.catch(()=>{});function a(u){Object.assign(r,u),delete r.resolve,delete r.reject}return r.resolve=u=>{a({status:"fulfilled",value:u}),t(u)},r.reject=u=>{a({status:"rejected",reason:u}),i(u)},r}var Vw=kw;function Iw(){let t=[],i=0,r=d=>{d()},a=d=>{d()},u=Vw;const s=d=>{i?t.push(d):u(()=>{r(d)})},c=()=>{const d=t;t=[],d.length&&u(()=>{a(()=>{d.forEach(m=>{r(m)})})})};return{batch:d=>{let m;i++;try{m=d()}finally{i--,i||c()}return m},batchCalls:d=>(...m)=>{s(()=>{d(...m)})},schedule:s,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{u=d}}}var Te=Iw(),Yw=class extends no{#t=!0;#e;#n;constructor(){super(),this.#n=t=>{if(!_r&&window.addEventListener){const i=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#t}},ns=new Yw;function Qw(t){return Math.min(1e3*2**t,3e4)}function Iv(t){return(t??"online")==="online"?ns.isOnline():!0}var zd=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Yv(t){let i=!1,r=0,a;const u=Md(),s=()=>u.status!=="pending",c=C=>{if(!s()){const M=new zd(C);v(M),t.onCancel?.(M)}},d=()=>{i=!0},m=()=>{i=!1},p=()=>rh.isFocused()&&(t.networkMode==="always"||ns.isOnline())&&t.canRun(),g=()=>Iv(t.networkMode)&&t.canRun(),y=C=>{s()||(a?.(),u.resolve(C))},v=C=>{s()||(a?.(),u.reject(C))},x=()=>new Promise(C=>{a=M=>{(s()||p())&&C(M)},t.onPause?.()}).then(()=>{a=void 0,s()||t.onContinue?.()}),S=()=>{if(s())return;let C;const M=r===0?t.initialPromise:void 0;try{C=M??t.fn()}catch(E){C=Promise.reject(E)}Promise.resolve(C).then(y).catch(E=>{if(s())return;const H=t.retry??(_r?0:3),w=t.retryDelay??Qw,k=typeof w=="function"?w(r,E):w,I=H===!0||typeof H=="number"&&r<H||typeof H=="function"&&H(r,E);if(i||!I){v(E);return}r++,t.onFail?.(r,E),jw(k).then(()=>p()?void 0:x()).then(()=>{i?v(E):S()})})};return{promise:u,status:()=>u.status,cancel:c,continue:()=>(a?.(),u),cancelRetry:d,continueRetry:m,canStart:g,start:()=>(g()?S():x().then(S),u)}}var Qv=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cd(this.gcTime)&&(this.#t=br.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_r?1/0:300*1e3))}clearGcTimeout(){this.#t&&(br.clearTimeout(this.#t),this.#t=void 0)}},Xw=class extends Qv{#t;#e;#n;#r;#i;#o;#a;constructor(t){super(),this.#a=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#n=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Ly(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#o,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Ly(this.options);i.data!==void 0&&(this.setState(jy(i.data,i.dataUpdatedAt)),this.#t=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,i){const r=Ad(this.state.data,t,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),r}setState(t,i){this.#l({type:"setState",state:t,setStateOptions:i})}cancel(t){const i=this.#i?.promise;return this.#i?.cancel(t),i?i.then(Xe).catch(Xe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>yn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ih||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ki(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Bv(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(i=>i.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(i=>i.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(i=>i!==t),this.observers.length||(this.#i&&(this.#a?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,i){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(m=>m.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},u=()=>{const d=qv(this.options,i),p=(()=>{const g={client:this.#r,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#a=!1,this.options.persister?this.options.persister(d,p,this):d(p)},c=(()=>{const d={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:u};return a(d),d})();this.options.behavior?.onFetch(c,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#i=Yv({initialPromise:i?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof zd&&d.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},onFail:(d,m)=>{this.#l({type:"failed",failureCount:d,error:m})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#i.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof zd){if(d.silent)return this.#i.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(t){const i=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Xv(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...jy(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?a:void 0,a;case"error":const u=t.error;return{...r,error:u,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=i(this.state),Te.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Xv(t,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Iv(i.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function jy(t,i){return{data:t,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ly(t){const i=typeof t.initialData=="function"?t.initialData():t.initialData,r=i!==void 0,a=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Gw=class extends no{constructor(t,i){super(),this.options=i,this.#t=t,this.#l=null,this.#a=Md(),this.bindMethods(),this.setOptions(i)}#t;#e=void 0;#n=void 0;#r=void 0;#i;#o;#a;#l;#m;#d;#h;#s;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),By(this.#e,this.options)?this.#f():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Od(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Od(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#e.removeObserver(this)}setOptions(t){const i=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yn(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),i._defaulted&&!Nd(this.options,i)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const a=this.hasListeners();a&&Uy(this.#e,r,this.options,i)&&this.#f(),this.updateResult(),a&&(this.#e!==r||yn(this.options.enabled,this.#e)!==yn(i.enabled,this.#e)||Ki(this.options.staleTime,this.#e)!==Ki(i.staleTime,this.#e))&&this.#g();const u=this.#y();a&&(this.#e!==r||yn(this.options.enabled,this.#e)!==yn(i.enabled,this.#e)||u!==this.#u)&&this.#v(u)}getOptimisticResult(t){const i=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(i,t);return Fw(this,r)&&(this.#r=r,this.#o=this.options,this.#i=this.#e.state),r}getCurrentResult(){return this.#r}trackResult(t,i){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),i?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,i);return r.fetch().then(()=>this.createResult(r,i))}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(t){this.#w();let i=this.#e.fetch(this.options,t);return t?.throwOnError||(i=i.catch(Xe)),i}#g(){this.#b();const t=Ki(this.options.staleTime,this.#e);if(_r||this.#r.isStale||!Cd(t))return;const r=Bv(this.#r.dataUpdatedAt,t)+1;this.#s=br.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#S(),this.#u=t,!(_r||yn(this.options.enabled,this.#e)===!1||!Cd(this.#u)||this.#u===0)&&(this.#c=br.setInterval(()=>{(this.options.refetchIntervalInBackground||rh.isFocused())&&this.#f()},this.#u))}#x(){this.#g(),this.#v(this.#y())}#b(){this.#s&&(br.clearTimeout(this.#s),this.#s=void 0)}#S(){this.#c&&(br.clearInterval(this.#c),this.#c=void 0)}createResult(t,i){const r=this.#e,a=this.options,u=this.#r,s=this.#i,c=this.#o,m=t!==r?t.state:this.#n,{state:p}=t;let g={...p},y=!1,v;if(i._optimisticResults){const q=this.hasListeners(),Z=!q&&By(t,i),lt=q&&Uy(t,r,i,a);(Z||lt)&&(g={...g,...Xv(p.data,t.options)}),i._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:C}=g;v=g.data;let M=!1;if(i.placeholderData!==void 0&&v===void 0&&C==="pending"){let q;u?.isPlaceholderData&&i.placeholderData===c?.placeholderData?(q=u.data,M=!0):q=typeof i.placeholderData=="function"?i.placeholderData(this.#h?.state.data,this.#h):i.placeholderData,q!==void 0&&(C="success",v=Ad(u?.data,q,i),y=!0)}if(i.select&&v!==void 0&&!M)if(u&&v===s?.data&&i.select===this.#m)v=this.#d;else try{this.#m=i.select,v=i.select(v),v=Ad(u?.data,v,i),this.#d=v,this.#l=null}catch(q){this.#l=q}this.#l&&(x=this.#l,v=this.#d,S=Date.now(),C="error");const E=g.fetchStatus==="fetching",H=C==="pending",w=C==="error",k=H&&E,I=v!==void 0,j={status:C,fetchStatus:g.fetchStatus,isPending:H,isSuccess:C==="success",isError:w,isInitialLoading:k,isLoading:k,data:v,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>m.dataUpdateCount||g.errorUpdateCount>m.errorUpdateCount,isFetching:E,isRefetching:E&&!H,isLoadingError:w&&!I,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:w&&I,isStale:lh(t,i),refetch:this.refetch,promise:this.#a,isEnabled:yn(i.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const q=j.data!==void 0,Z=j.status==="error"&&!q,lt=nt=>{Z?nt.reject(j.error):q&&nt.resolve(j.data)},Q=()=>{const nt=this.#a=j.promise=Md();lt(nt)},G=this.#a;switch(G.status){case"pending":t.queryHash===r.queryHash&&lt(G);break;case"fulfilled":(Z||j.data!==G.value)&&Q();break;case"rejected":(!Z||j.error!==G.reason)&&Q();break}}return j}updateResult(){const t=this.#r,i=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#o=this.options,this.#i.data!==void 0&&(this.#h=this.#e),Nd(i,t))return;this.#r=i;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!this.#p.size)return!0;const s=new Set(u??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#r).some(c=>{const d=c;return this.#r[d]!==t[d]&&s.has(d)})};this.#E({listeners:r()})}#w(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const i=this.#e;this.#e=t,this.#n=t.state,this.hasListeners()&&(i?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#E(t){Te.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Zw(t,i){return yn(i.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&i.retryOnMount===!1)}function By(t,i){return Zw(t,i)||t.state.data!==void 0&&Od(t,i,i.refetchOnMount)}function Od(t,i,r){if(yn(i.enabled,t)!==!1&&Ki(i.staleTime,t)!=="static"){const a=typeof r=="function"?r(t):r;return a==="always"||a!==!1&&lh(t,i)}return!1}function Uy(t,i,r,a){return(t!==i||yn(a.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&lh(t,r)}function lh(t,i){return yn(i.enabled,t)!==!1&&t.isStaleByTime(Ki(i.staleTime,t))}function Fw(t,i){return!Nd(t.getCurrentResult(),i)}function qy(t){return{onFetch:(i,r)=>{const a=i.options,u=i.fetchOptions?.meta?.fetchMore?.direction,s=i.state.data?.pages||[],c=i.state.data?.pageParams||[];let d={pages:[],pageParams:[]},m=0;const p=async()=>{let g=!1;const y=S=>{Uw(S,()=>i.signal,()=>g=!0)},v=qv(i.options,i.fetchOptions),x=async(S,C,M)=>{if(g)return Promise.reject();if(C==null&&S.pages.length)return Promise.resolve(S);const H=(()=>{const D={client:i.client,queryKey:i.queryKey,pageParam:C,direction:M?"backward":"forward",meta:i.options.meta};return y(D),D})(),w=await v(H),{maxPages:k}=i.options,I=M?Bw:Lw;return{pages:I(S.pages,w,k),pageParams:I(S.pageParams,C,k)}};if(u&&s.length){const S=u==="backward",C=S?Kw:Vy,M={pages:s,pageParams:c},E=C(a,M);d=await x(M,E,S)}else{const S=t??s.length;do{const C=m===0?c[0]??a.initialPageParam:Vy(a,d);if(m>0&&C==null)break;d=await x(d,C),m++}while(m<S)}return d};i.options.persister?i.fetchFn=()=>i.options.persister?.(p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r):i.fetchFn=p}}}function Vy(t,{pages:i,pageParams:r}){const a=i.length-1;return i.length>0?t.getNextPageParam(i[a],i,r[a],r):void 0}function Kw(t,{pages:i,pageParams:r}){return i.length>0?t.getPreviousPageParam?.(i[0],i,r[0],r):void 0}var $w=class extends Qv{#t;#e;#n;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#e=[],this.state=t.state||Pw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(i=>i!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const i=()=>{this.#i({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Yv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(s,c)=>{this.#i({type:"failed",failureCount:s,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",u=!this.#r.canStart();try{if(a)i();else{this.#i({type:"pending",variables:t,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,r);const c=await this.options.onMutate?.(t,r);c!==this.state.context&&this.#i({type:"pending",context:c,variables:t,isPaused:u})}const s=await this.#r.start();return await this.#n.config.onSuccess?.(s,t,this.state.context,this,r),await this.options.onSuccess?.(s,t,this.state.context,r),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(s,null,t,this.state.context,r),this.#i({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,t,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(s,t,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,s,t,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#i(t){const i=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Te.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Pw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Jw=class extends no{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(t,i,r){const a=new $w({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(i),state:r});return this.add(a),a}add(t){this.#t.add(t);const i=Hu(t);if(typeof i=="string"){const r=this.#e.get(i);r?r.push(t):this.#e.set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const i=Hu(t);if(typeof i=="string"){const r=this.#e.get(i);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&this.#e.delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=Hu(t);if(typeof i=="string"){const a=this.#e.get(i)?.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){const i=Hu(t);return typeof i=="string"?this.#e.get(i)?.find(a=>a!==t&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Te.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const i={exact:!0,...t};return this.getAll().find(r=>ky(i,r))}findAll(t={}){return this.getAll().filter(i=>ky(t,i))}notify(t){Te.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return Te.batch(()=>Promise.all(t.map(i=>i.continue().catch(Xe))))}};function Hu(t){return t.options.scope?.id}var Ww=class extends no{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,i,r){const a=i.queryKey,u=i.queryHash??nh(a,i);let s=this.get(u);return s||(s=new Xw({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(i),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=this.#t.get(t.queryHash);i&&(t.destroy(),i===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Te.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const i={exact:!0,...t};return this.getAll().find(r=>Dy(i,r))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(r=>Dy(t,r)):i}notify(t){Te.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){Te.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Te.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},tE=class{#t;#e;#n;#r;#i;#o;#a;#l;constructor(t={}){this.#t=t.queryCache||new Ww,this.#e=t.mutationCache||new Jw,this.#n=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=rh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#l=ns.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const i=this.defaultQueryOptions({queryKey:t});return this.#t.get(i.queryHash)?.state.data}ensureQueryData(t){const i=this.defaultQueryOptions(t),r=this.#t.build(this,i),a=r.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Ki(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(a))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:i,state:r})=>{const a=r.data;return[i,a]})}setQueryData(t,i,r){const a=this.defaultQueryOptions({queryKey:t}),s=this.#t.get(a.queryHash)?.state.data,c=Rw(i,s);if(c!==void 0)return this.#t.build(this,a).setData(c,{...r,manual:!0})}setQueriesData(t,i,r){return Te.batch(()=>this.#t.findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,i,r)]))}getQueryState(t){const i=this.defaultQueryOptions({queryKey:t});return this.#t.get(i.queryHash)?.state}removeQueries(t){const i=this.#t;Te.batch(()=>{i.findAll(t).forEach(r=>{i.remove(r)})})}resetQueries(t,i){const r=this.#t;return Te.batch(()=>(r.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...t},i)))}cancelQueries(t,i={}){const r={revert:!0,...i},a=Te.batch(()=>this.#t.findAll(t).map(u=>u.cancel(r)));return Promise.all(a).then(Xe).catch(Xe)}invalidateQueries(t,i={}){return Te.batch(()=>(this.#t.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},i)))}refetchQueries(t,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},a=Te.batch(()=>this.#t.findAll(t).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let s=u.fetch(void 0,r);return r.throwOnError||(s=s.catch(Xe)),u.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(a).then(Xe)}fetchQuery(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const r=this.#t.build(this,i);return r.isStaleByTime(Ki(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Xe).catch(Xe)}fetchInfiniteQuery(t){return t.behavior=qy(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Xe).catch(Xe)}ensureInfiniteQueryData(t){return t.behavior=qy(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ns.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,i){this.#r.set(Ya(t),{queryKey:t,defaultOptions:i})}getQueryDefaults(t){const i=[...this.#r.values()],r={};return i.forEach(a=>{Qa(t,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(t,i){this.#i.set(Ya(t),{mutationKey:t,defaultOptions:i})}getMutationDefaults(t){const i=[...this.#i.values()],r={};return i.forEach(a=>{Qa(t,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const i={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return i.queryHash||(i.queryHash=nh(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===ih&&(i.enabled=!1),i}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},Gv=W.createContext(void 0),eE=t=>{const i=W.useContext(Gv);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},nE=({client:t,children:i})=>(W.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),z.jsx(Gv.Provider,{value:t,children:i})),Zv=W.createContext(!1),iE=()=>W.useContext(Zv);Zv.Provider;function rE(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var lE=W.createContext(rE()),aE=()=>W.useContext(lE),oE=(t,i,r)=>{const a=r?.state.error&&typeof t.throwOnError=="function"?Vv(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||a)&&(i.isReset()||(t.retryOnMount=!1))},uE=t=>{W.useEffect(()=>{t.clearReset()},[t])},sE=({result:t,errorResetBoundary:i,throwOnError:r,query:a,suspense:u})=>t.isError&&!i.isReset()&&!t.isFetching&&a&&(u&&t.data===void 0||Vv(r,[t.error,a])),cE=t=>{if(t.suspense){const r=u=>u==="static"?u:Math.max(u??1e3,1e3),a=t.staleTime;t.staleTime=typeof a=="function"?(...u)=>r(a(...u)):r(a),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},fE=(t,i)=>t.isLoading&&t.isFetching&&!i,dE=(t,i)=>t?.suspense&&i.isPending,Iy=(t,i,r)=>i.fetchOptimistic(t).catch(()=>{r.clearReset()});function hE(t,i,r){const a=iE(),u=aE(),s=eE(),c=s.defaultQueryOptions(t);s.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=s.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",cE(c),oE(c,u,d),uE(u);const m=!s.getQueryCache().get(c.queryHash),[p]=W.useState(()=>new i(s,c)),g=p.getOptimisticResult(c),y=!a&&t.subscribed!==!1;if(W.useSyncExternalStore(W.useCallback(v=>{const x=y?p.subscribe(Te.batchCalls(v)):Xe;return p.updateResult(),x},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),W.useEffect(()=>{p.setOptions(c)},[c,p]),dE(c,g))throw Iy(c,p,u);if(sE({result:g,errorResetBoundary:u,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!_r&&fE(g,a)&&(m?Iy(c,p,u):d?.promise)?.catch(Xe).finally(()=>{p.updateResult()}),c.notifyOnChangeProps?g:p.trackResult(g)}function ah(t,i){return hE(t,Gw)}async function oh(t){const i=await fetch(t);if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);const r=await i.json();if(!r.success||!r.data)throw new Error(r.error??"Unknown error");return r.data}function pE(){return ah({queryKey:["sessions"],queryFn:()=>oh("/api/v2/sessions")})}function mE(t){return ah({queryKey:["session",t],queryFn:()=>oh(`/api/v2/sessions/${t}`),enabled:!!t})}function gE(t,i){return ah({queryKey:["node",t,i],queryFn:()=>oh(`/api/v2/sessions/${t}/nodes/${i}`),enabled:!!i})}const yE={in_progress:{label:"In Progress",color:"var(--accent)"},complete:{label:"Complete",color:"var(--success)"},complete_with_gaps:{label:"Gaps",color:"var(--warning)"},blocked:{label:"Blocked",color:"var(--blocked)"}};function Fv({status:t}){const i=yE[t];return z.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",style:{backgroundColor:`${i.color}20`,color:i.color},children:i.label})}function Kv({health:t}){return t==="healthy"?null:z.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",style:{backgroundColor:"var(--error)20",color:"var(--error)"},children:"Corrupt"})}const vE=[{value:"recent",label:"Recent"},{value:"status",label:"Status"},{value:"workflow",label:"Workflow"},{value:"nodes",label:"Node count"}],xE=[{value:"none",label:"No grouping"},{value:"workflow",label:"Workflow"},{value:"status",label:"Status"},{value:"branch",label:"Branch"}],bE=[{value:"all",label:"All"},{value:"in_progress",label:"In Progress"},{value:"complete",label:"Complete"},{value:"complete_with_gaps",label:"Gaps"},{value:"blocked",label:"Blocked"}],Jf=25,Yy={in_progress:0,blocked:1,complete_with_gaps:2,complete:3};function SE(t,i,r){let a=[...t];if(r!=="all"&&(a=a.filter(u=>u.status===r)),i.trim()){const u=i.toLowerCase();a=a.filter(s=>(s.sessionTitle??"").toLowerCase().includes(u)||(s.workflowName??"").toLowerCase().includes(u)||(s.workflowId??"").toLowerCase().includes(u)||s.sessionId.toLowerCase().includes(u)||(s.gitBranch??"").toLowerCase().includes(u))}return a}function wE(t,i){const r=[...t];switch(i){case"recent":r.sort((a,u)=>u.lastModifiedMs-a.lastModifiedMs);break;case"status":r.sort((a,u)=>Yy[a.status]-Yy[u.status]||u.lastModifiedMs-a.lastModifiedMs);break;case"workflow":r.sort((a,u)=>(a.workflowName??a.workflowId??"").localeCompare(u.workflowName??u.workflowId??"")||u.lastModifiedMs-a.lastModifiedMs);break;case"nodes":r.sort((a,u)=>u.nodeCount-a.nodeCount||u.lastModifiedMs-a.lastModifiedMs);break}return r}function EE(t,i){if(i==="none")return[{label:"",sessions:t}];const r=new Map;for(const a of t){let u;switch(i){case"workflow":u=a.workflowName??a.workflowId??"Unknown workflow";break;case"status":u=a.status;break;case"branch":u=a.gitBranch??"No branch";break}const s=r.get(u)??[];s.push(a),r.set(u,s)}return Array.from(r.entries()).sort(([a],[u])=>a.localeCompare(u)).map(([a,u])=>({label:a,sessions:u}))}function _E(t){const i=Date.now()-t;if(i<0)return"just now";const r=Math.floor(i/1e3);if(r<60)return"just now";const a=Math.floor(r/60);if(a<60)return`${a}m ago`;const u=Math.floor(a/60);if(u<24)return`${u}h ago`;const s=Math.floor(u/24);return s<30?`${s}d ago`:`${Math.floor(s/30)}mo ago`}function CE({onSelectSession:t}){const{data:i,isLoading:r,error:a}=pE(),[u,s]=W.useState(""),[c,d]=W.useState("recent"),[m,p]=W.useState("none"),[g,y]=W.useState("all"),[v,x]=W.useState(0),S=W.useCallback(q=>{s(q),x(0)},[]),C=W.useCallback(q=>{d(q),x(0)},[]),M=W.useCallback(q=>{p(q),x(0)},[]),E=W.useCallback(q=>{y(q),x(0)},[]),H=W.useMemo(()=>{if(!i)return{groups:[],total:0,filtered:0};const q=SE(i.sessions,u,g),Z=wE(q,c);return{groups:EE(Z,m),total:i.sessions.length,filtered:q.length}},[i,u,g,c,m]),w=W.useMemo(()=>{if(!i)return{};const q={all:i.sessions.length};for(const Z of i.sessions)q[Z.status]=(q[Z.status]??0)+1;return q},[i]);if(r)return z.jsx("div",{className:"flex items-center justify-center py-20",children:z.jsx("div",{className:"text-[var(--text-secondary)] text-sm",children:"Loading sessions..."})});if(a)return z.jsxs("div",{className:"text-[var(--error)] bg-[var(--bg-card)] rounded-lg p-4",children:["Failed to load sessions: ",a.message]});if(!i||i.sessions.length===0)return z.jsxs("div",{className:"text-center py-16",children:[z.jsx("p",{className:"text-[var(--text-secondary)] text-lg",children:"No v2 sessions found"}),z.jsx("p",{className:"text-[var(--text-muted)] text-sm mt-2",children:"Sessions will appear here when workflows are executed with v2 tools enabled."})]});const k=m!=="none",I=v*Jf,D=I+Jf,j=Math.ceil(H.filtered/Jf);return z.jsxs("div",{className:"space-y-4",children:[z.jsx("div",{className:"flex items-center justify-between",children:z.jsxs("h2",{className:"text-lg font-medium text-[var(--text-primary)]",children:["Sessions",z.jsx("span",{className:"text-[var(--text-muted)] font-normal ml-2 text-sm",children:H.filtered===H.total?H.total:`${H.filtered} / ${H.total}`})]})}),z.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[z.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-[360px]",children:[z.jsx("input",{type:"text",value:u,onChange:q=>S(q.target.value),placeholder:"Search sessions...",className:"w-full bg-[var(--bg-secondary)] border border-[var(--border)] rounded-md px-3 py-1.5 text-sm text-[var(--text-primary)] placeholder-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)] transition-colors"}),u&&z.jsx("button",{onClick:()=>S(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-xs",children:"clear"})]}),z.jsx(Qy,{label:"Sort",value:c,options:vE,onChange:C}),z.jsx(Qy,{label:"Group",value:m,options:xE,onChange:M})]}),z.jsx("div",{className:"flex flex-wrap gap-1.5",children:bE.map(q=>{const Z=w[q.value]??0;if(q.value!=="all"&&Z===0)return null;const lt=g===q.value;return z.jsxs("button",{onClick:()=>E(q.value),className:`px-2.5 py-1 rounded-full text-xs font-medium transition-colors cursor-pointer ${lt?"bg-[var(--accent)] text-white":"bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-card)] hover:text-[var(--text-primary)]"}`,children:[q.label,z.jsx("span",{className:"ml-1 opacity-70",children:Z})]},q.value)})}),H.filtered===0?z.jsx("div",{className:"text-center py-12 text-[var(--text-muted)] text-sm",children:"No sessions match the current filters"}):k?z.jsx("div",{className:"space-y-6",children:H.groups.map(q=>z.jsx(NE,{label:q.label,sessions:q.sessions,onSelectSession:t},q.label))}):z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"space-y-2",children:H.groups[0]?.sessions.slice(I,D).map(q=>z.jsx($v,{session:q,onClick:()=>t(q.sessionId)},q.sessionId))}),j>1&&z.jsx(TE,{page:v,totalPages:j,onPageChange:x})]})]})}function Qy({label:t,value:i,options:r,onChange:a}){return z.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-[var(--text-muted)]",children:[t,z.jsx("select",{value:i,onChange:u=>a(u.target.value),className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-md px-2 py-1.5 text-xs text-[var(--text-primary)] focus:outline-none focus:border-[var(--accent)] cursor-pointer",children:r.map(u=>z.jsx("option",{value:u.value,children:u.label},u.value))})]})}function NE({label:t,sessions:i,onSelectSession:r}){const[a,u]=W.useState(!1);return z.jsxs("div",{children:[z.jsxs("button",{onClick:()=>u(!a),className:"flex items-center gap-2 mb-2 cursor-pointer group",children:[z.jsx("span",{className:"text-[var(--text-muted)] text-xs transition-transform duration-150",style:{transform:a?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),z.jsx("span",{className:"text-sm font-medium text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors",children:t}),z.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["(",i.length,")"]})]}),!a&&z.jsx("div",{className:"space-y-2 ml-4",children:i.map(s=>z.jsx($v,{session:s,onClick:()=>r(s.sessionId)},s.sessionId))})]})}function TE({page:t,totalPages:i,onPageChange:r}){return z.jsxs("div",{className:"flex items-center justify-center gap-2 pt-2",children:[z.jsx("button",{onClick:()=>r(t-1),disabled:t===0,className:"px-3 py-1.5 text-xs rounded-md bg-[var(--bg-secondary)] border border-[var(--border)] text-[var(--text-secondary)] disabled:opacity-30 disabled:cursor-not-allowed hover:bg-[var(--bg-card)] transition-colors cursor-pointer",children:"Prev"}),z.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[t+1," / ",i]}),z.jsx("button",{onClick:()=>r(t+1),disabled:t>=i-1,className:"px-3 py-1.5 text-xs rounded-md bg-[var(--bg-secondary)] border border-[var(--border)] text-[var(--text-secondary)] disabled:opacity-30 disabled:cursor-not-allowed hover:bg-[var(--bg-card)] transition-colors cursor-pointer",children:"Next"})]})}function $v({session:t,onClick:i}){const r=t.sessionTitle,a=t.workflowName??t.workflowId,u=_E(t.lastModifiedMs);return z.jsxs("button",{onClick:i,className:"w-full text-left bg-[var(--bg-card)] border border-[var(--border)] rounded-lg px-4 py-3 hover:border-[var(--accent)] transition-colors cursor-pointer group",children:[z.jsxs("div",{className:"flex items-start justify-between gap-3",children:[z.jsx("div",{className:"min-w-0 flex-1",children:z.jsx("div",{className:"text-sm font-medium text-[var(--text-primary)] line-clamp-1 group-hover:text-[var(--accent)] transition-colors",children:r??a??"Unnamed session"})}),z.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[z.jsx("span",{className:"text-[10px] text-[var(--text-muted)] tabular-nums",children:u}),z.jsx(Kv,{health:t.health}),z.jsx(Fv,{status:t.status})]})]}),z.jsxs("div",{className:"flex items-center gap-2 mt-1.5 flex-wrap",children:[r&&a&&z.jsx(ju,{children:a}),t.gitBranch&&z.jsx(ju,{icon:"branch",children:t.gitBranch}),z.jsxs(ju,{icon:"graph",children:[t.nodeCount,"N / ",t.edgeCount,"E"]}),t.tipCount>1&&z.jsxs(ju,{icon:"fork",children:[t.tipCount," tips"]}),t.hasUnresolvedGaps&&z.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] text-[var(--warning)]",children:"⚠ gaps"})]}),z.jsx("div",{className:"mt-1.5 font-mono text-[10px] text-[var(--text-muted)] opacity-60 group-hover:opacity-100 transition-opacity truncate",children:t.sessionId})]})}const AE={branch:z.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:z.jsx("path",{d:"M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.5 2.5 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Z"})}),graph:z.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:z.jsx("path",{d:"M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.5 2.5 0 0 1 2 11.5Z"})}),fork:z.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:z.jsx("path",{d:"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm2.122-.75a2.25 2.25 0 1 0-3.244 0A2.5 2.5 0 0 0 2 5v5.5A2.5 2.5 0 0 0 4.5 13h3.25a.75.75 0 0 0 0-1.5H4.5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v5.5a1 1 0 0 1-1 1H8.75Z"})})};function ju({children:t,icon:i}){return z.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded bg-[var(--bg-secondary)] text-[10px] text-[var(--text-muted)] max-w-[200px] truncate",children:[i&&AE[i],t]})}function ye(t){if(typeof t=="string"||typeof t=="number")return""+t;let i="";if(Array.isArray(t))for(let r=0,a;r<t.length;r++)(a=ye(t[r]))!==""&&(i+=(i&&" ")+a);else for(let r in t)t[r]&&(i+=(i&&" ")+r);return i}var ME={value:()=>{}};function vs(){for(var t=0,i=arguments.length,r={},a;t<i;++t){if(!(a=arguments[t]+"")||a in r||/[\s.]/.test(a))throw new Error("illegal type: "+a);r[a]=[]}return new $u(r)}function $u(t){this._=t}function zE(t,i){return t.trim().split(/^|\s+/).map(function(r){var a="",u=r.indexOf(".");if(u>=0&&(a=r.slice(u+1),r=r.slice(0,u)),r&&!i.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}$u.prototype=vs.prototype={constructor:$u,on:function(t,i){var r=this._,a=zE(t+"",r),u,s=-1,c=a.length;if(arguments.length<2){for(;++s<c;)if((u=(t=a[s]).type)&&(u=OE(r[u],t.name)))return u;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++s<c;)if(u=(t=a[s]).type)r[u]=Xy(r[u],t.name,i);else if(i==null)for(u in r)r[u]=Xy(r[u],t.name,null);return this},copy:function(){var t={},i=this._;for(var r in i)t[r]=i[r].slice();return new $u(t)},call:function(t,i){if((u=arguments.length-2)>0)for(var r=new Array(u),a=0,u,s;a<u;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],a=0,u=s.length;a<u;++a)s[a].value.apply(i,r)},apply:function(t,i,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var a=this._[t],u=0,s=a.length;u<s;++u)a[u].value.apply(i,r)}};function OE(t,i){for(var r=0,a=t.length,u;r<a;++r)if((u=t[r]).name===i)return u.value}function Xy(t,i,r){for(var a=0,u=t.length;a<u;++a)if(t[a].name===i){t[a]=ME,t=t.slice(0,a).concat(t.slice(a+1));break}return r!=null&&t.push({name:i,value:r}),t}var Dd="http://www.w3.org/1999/xhtml";const Gy={svg:"http://www.w3.org/2000/svg",xhtml:Dd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function xs(t){var i=t+="",r=i.indexOf(":");return r>=0&&(i=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Gy.hasOwnProperty(i)?{space:Gy[i],local:t}:t}function DE(t){return function(){var i=this.ownerDocument,r=this.namespaceURI;return r===Dd&&i.documentElement.namespaceURI===Dd?i.createElement(t):i.createElementNS(r,t)}}function kE(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Pv(t){var i=xs(t);return(i.local?kE:DE)(i)}function RE(){}function uh(t){return t==null?RE:function(){return this.querySelector(t)}}function HE(t){typeof t!="function"&&(t=uh(t));for(var i=this._groups,r=i.length,a=new Array(r),u=0;u<r;++u)for(var s=i[u],c=s.length,d=a[u]=new Array(c),m,p,g=0;g<c;++g)(m=s[g])&&(p=t.call(m,m.__data__,g,s))&&("__data__"in m&&(p.__data__=m.__data__),d[g]=p);return new un(a,this._parents)}function jE(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function LE(){return[]}function Jv(t){return t==null?LE:function(){return this.querySelectorAll(t)}}function BE(t){return function(){return jE(t.apply(this,arguments))}}function UE(t){typeof t=="function"?t=BE(t):t=Jv(t);for(var i=this._groups,r=i.length,a=[],u=[],s=0;s<r;++s)for(var c=i[s],d=c.length,m,p=0;p<d;++p)(m=c[p])&&(a.push(t.call(m,m.__data__,p,c)),u.push(m));return new un(a,u)}function Wv(t){return function(){return this.matches(t)}}function tx(t){return function(i){return i.matches(t)}}var qE=Array.prototype.find;function VE(t){return function(){return qE.call(this.children,t)}}function IE(){return this.firstElementChild}function YE(t){return this.select(t==null?IE:VE(typeof t=="function"?t:tx(t)))}var QE=Array.prototype.filter;function XE(){return Array.from(this.children)}function GE(t){return function(){return QE.call(this.children,t)}}function ZE(t){return this.selectAll(t==null?XE:GE(typeof t=="function"?t:tx(t)))}function FE(t){typeof t!="function"&&(t=Wv(t));for(var i=this._groups,r=i.length,a=new Array(r),u=0;u<r;++u)for(var s=i[u],c=s.length,d=a[u]=[],m,p=0;p<c;++p)(m=s[p])&&t.call(m,m.__data__,p,s)&&d.push(m);return new un(a,this._parents)}function ex(t){return new Array(t.length)}function KE(){return new un(this._enter||this._groups.map(ex),this._parents)}function is(t,i){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=i}is.prototype={constructor:is,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,i){return this._parent.insertBefore(t,i)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function $E(t){return function(){return t}}function PE(t,i,r,a,u,s){for(var c=0,d,m=i.length,p=s.length;c<p;++c)(d=i[c])?(d.__data__=s[c],a[c]=d):r[c]=new is(t,s[c]);for(;c<m;++c)(d=i[c])&&(u[c]=d)}function JE(t,i,r,a,u,s,c){var d,m,p=new Map,g=i.length,y=s.length,v=new Array(g),x;for(d=0;d<g;++d)(m=i[d])&&(v[d]=x=c.call(m,m.__data__,d,i)+"",p.has(x)?u[d]=m:p.set(x,m));for(d=0;d<y;++d)x=c.call(t,s[d],d,s)+"",(m=p.get(x))?(a[d]=m,m.__data__=s[d],p.delete(x)):r[d]=new is(t,s[d]);for(d=0;d<g;++d)(m=i[d])&&p.get(v[d])===m&&(u[d]=m)}function WE(t){return t.__data__}function t2(t,i){if(!arguments.length)return Array.from(this,WE);var r=i?JE:PE,a=this._parents,u=this._groups;typeof t!="function"&&(t=$E(t));for(var s=u.length,c=new Array(s),d=new Array(s),m=new Array(s),p=0;p<s;++p){var g=a[p],y=u[p],v=y.length,x=e2(t.call(g,g&&g.__data__,p,a)),S=x.length,C=d[p]=new Array(S),M=c[p]=new Array(S),E=m[p]=new Array(v);r(g,y,C,M,E,x,i);for(var H=0,w=0,k,I;H<S;++H)if(k=C[H]){for(H>=w&&(w=H+1);!(I=M[w])&&++w<S;);k._next=I||null}}return c=new un(c,a),c._enter=d,c._exit=m,c}function e2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function n2(){return new un(this._exit||this._groups.map(ex),this._parents)}function i2(t,i,r){var a=this.enter(),u=this,s=this.exit();return typeof t=="function"?(a=t(a),a&&(a=a.selection())):a=a.append(t+""),i!=null&&(u=i(u),u&&(u=u.selection())),r==null?s.remove():r(s),a&&u?a.merge(u).order():u}function r2(t){for(var i=t.selection?t.selection():t,r=this._groups,a=i._groups,u=r.length,s=a.length,c=Math.min(u,s),d=new Array(u),m=0;m<c;++m)for(var p=r[m],g=a[m],y=p.length,v=d[m]=new Array(y),x,S=0;S<y;++S)(x=p[S]||g[S])&&(v[S]=x);for(;m<u;++m)d[m]=r[m];return new un(d,this._parents)}function l2(){for(var t=this._groups,i=-1,r=t.length;++i<r;)for(var a=t[i],u=a.length-1,s=a[u],c;--u>=0;)(c=a[u])&&(s&&c.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(c,s),s=c);return this}function a2(t){t||(t=o2);function i(y,v){return y&&v?t(y.__data__,v.__data__):!y-!v}for(var r=this._groups,a=r.length,u=new Array(a),s=0;s<a;++s){for(var c=r[s],d=c.length,m=u[s]=new Array(d),p,g=0;g<d;++g)(p=c[g])&&(m[g]=p);m.sort(i)}return new un(u,this._parents).order()}function o2(t,i){return t<i?-1:t>i?1:t>=i?0:NaN}function u2(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function s2(){return Array.from(this)}function c2(){for(var t=this._groups,i=0,r=t.length;i<r;++i)for(var a=t[i],u=0,s=a.length;u<s;++u){var c=a[u];if(c)return c}return null}function f2(){let t=0;for(const i of this)++t;return t}function d2(){return!this.node()}function h2(t){for(var i=this._groups,r=0,a=i.length;r<a;++r)for(var u=i[r],s=0,c=u.length,d;s<c;++s)(d=u[s])&&t.call(d,d.__data__,s,u);return this}function p2(t){return function(){this.removeAttribute(t)}}function m2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function g2(t,i){return function(){this.setAttribute(t,i)}}function y2(t,i){return function(){this.setAttributeNS(t.space,t.local,i)}}function v2(t,i){return function(){var r=i.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function x2(t,i){return function(){var r=i.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function b2(t,i){var r=xs(t);if(arguments.length<2){var a=this.node();return r.local?a.getAttributeNS(r.space,r.local):a.getAttribute(r)}return this.each((i==null?r.local?m2:p2:typeof i=="function"?r.local?x2:v2:r.local?y2:g2)(r,i))}function nx(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function S2(t){return function(){this.style.removeProperty(t)}}function w2(t,i,r){return function(){this.style.setProperty(t,i,r)}}function E2(t,i,r){return function(){var a=i.apply(this,arguments);a==null?this.style.removeProperty(t):this.style.setProperty(t,a,r)}}function _2(t,i,r){return arguments.length>1?this.each((i==null?S2:typeof i=="function"?E2:w2)(t,i,r??"")):Cl(this.node(),t)}function Cl(t,i){return t.style.getPropertyValue(i)||nx(t).getComputedStyle(t,null).getPropertyValue(i)}function C2(t){return function(){delete this[t]}}function N2(t,i){return function(){this[t]=i}}function T2(t,i){return function(){var r=i.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function A2(t,i){return arguments.length>1?this.each((i==null?C2:typeof i=="function"?T2:N2)(t,i)):this.node()[t]}function ix(t){return t.trim().split(/^|\s+/)}function sh(t){return t.classList||new rx(t)}function rx(t){this._node=t,this._names=ix(t.getAttribute("class")||"")}rx.prototype={add:function(t){var i=this._names.indexOf(t);i<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var i=this._names.indexOf(t);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function lx(t,i){for(var r=sh(t),a=-1,u=i.length;++a<u;)r.add(i[a])}function ax(t,i){for(var r=sh(t),a=-1,u=i.length;++a<u;)r.remove(i[a])}function M2(t){return function(){lx(this,t)}}function z2(t){return function(){ax(this,t)}}function O2(t,i){return function(){(i.apply(this,arguments)?lx:ax)(this,t)}}function D2(t,i){var r=ix(t+"");if(arguments.length<2){for(var a=sh(this.node()),u=-1,s=r.length;++u<s;)if(!a.contains(r[u]))return!1;return!0}return this.each((typeof i=="function"?O2:i?M2:z2)(r,i))}function k2(){this.textContent=""}function R2(t){return function(){this.textContent=t}}function H2(t){return function(){var i=t.apply(this,arguments);this.textContent=i??""}}function j2(t){return arguments.length?this.each(t==null?k2:(typeof t=="function"?H2:R2)(t)):this.node().textContent}function L2(){this.innerHTML=""}function B2(t){return function(){this.innerHTML=t}}function U2(t){return function(){var i=t.apply(this,arguments);this.innerHTML=i??""}}function q2(t){return arguments.length?this.each(t==null?L2:(typeof t=="function"?U2:B2)(t)):this.node().innerHTML}function V2(){this.nextSibling&&this.parentNode.appendChild(this)}function I2(){return this.each(V2)}function Y2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Q2(){return this.each(Y2)}function X2(t){var i=typeof t=="function"?t:Pv(t);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function G2(){return null}function Z2(t,i){var r=typeof t=="function"?t:Pv(t),a=i==null?G2:typeof i=="function"?i:uh(i);return this.select(function(){return this.insertBefore(r.apply(this,arguments),a.apply(this,arguments)||null)})}function F2(){var t=this.parentNode;t&&t.removeChild(this)}function K2(){return this.each(F2)}function $2(){var t=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function P2(){var t=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function J2(t){return this.select(t?P2:$2)}function W2(t){return arguments.length?this.property("__data__",t):this.node().__data__}function t_(t){return function(i){t.call(this,i,this.__data__)}}function e_(t){return t.trim().split(/^|\s+/).map(function(i){var r="",a=i.indexOf(".");return a>=0&&(r=i.slice(a+1),i=i.slice(0,a)),{type:i,name:r}})}function n_(t){return function(){var i=this.__on;if(i){for(var r=0,a=-1,u=i.length,s;r<u;++r)s=i[r],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):i[++a]=s;++a?i.length=a:delete this.__on}}}function i_(t,i,r){return function(){var a=this.__on,u,s=t_(i);if(a){for(var c=0,d=a.length;c<d;++c)if((u=a[c]).type===t.type&&u.name===t.name){this.removeEventListener(u.type,u.listener,u.options),this.addEventListener(u.type,u.listener=s,u.options=r),u.value=i;return}}this.addEventListener(t.type,s,r),u={type:t.type,name:t.name,value:i,listener:s,options:r},a?a.push(u):this.__on=[u]}}function r_(t,i,r){var a=e_(t+""),u,s=a.length,c;if(arguments.length<2){var d=this.node().__on;if(d){for(var m=0,p=d.length,g;m<p;++m)for(u=0,g=d[m];u<s;++u)if((c=a[u]).type===g.type&&c.name===g.name)return g.value}return}for(d=i?i_:n_,u=0;u<s;++u)this.each(d(a[u],i,r));return this}function ox(t,i,r){var a=nx(t),u=a.CustomEvent;typeof u=="function"?u=new u(i,r):(u=a.document.createEvent("Event"),r?(u.initEvent(i,r.bubbles,r.cancelable),u.detail=r.detail):u.initEvent(i,!1,!1)),t.dispatchEvent(u)}function l_(t,i){return function(){return ox(this,t,i)}}function a_(t,i){return function(){return ox(this,t,i.apply(this,arguments))}}function o_(t,i){return this.each((typeof i=="function"?a_:l_)(t,i))}function*u_(){for(var t=this._groups,i=0,r=t.length;i<r;++i)for(var a=t[i],u=0,s=a.length,c;u<s;++u)(c=a[u])&&(yield c)}var ux=[null];function un(t,i){this._groups=t,this._parents=i}function io(){return new un([[document.documentElement]],ux)}function s_(){return this}un.prototype=io.prototype={constructor:un,select:HE,selectAll:UE,selectChild:YE,selectChildren:ZE,filter:FE,data:t2,enter:KE,exit:n2,join:i2,merge:r2,selection:s_,order:l2,sort:a2,call:u2,nodes:s2,node:c2,size:f2,empty:d2,each:h2,attr:b2,style:_2,property:A2,classed:D2,text:j2,html:q2,raise:I2,lower:Q2,append:X2,insert:Z2,remove:K2,clone:J2,datum:W2,on:r_,dispatch:o_,[Symbol.iterator]:u_};function an(t){return typeof t=="string"?new un([[document.querySelector(t)]],[document.documentElement]):new un([[t]],ux)}function c_(t){let i;for(;i=t.sourceEvent;)t=i;return t}function Cn(t,i){if(t=c_(t),i===void 0&&(i=t.currentTarget),i){var r=i.ownerSVGElement||i;if(r.createSVGPoint){var a=r.createSVGPoint();return a.x=t.clientX,a.y=t.clientY,a=a.matrixTransform(i.getScreenCTM().inverse()),[a.x,a.y]}if(i.getBoundingClientRect){var u=i.getBoundingClientRect();return[t.clientX-u.left-i.clientLeft,t.clientY-u.top-i.clientTop]}}return[t.pageX,t.pageY]}const f_={passive:!1},Xa={capture:!0,passive:!1};function Wf(t){t.stopImmediatePropagation()}function Sl(t){t.preventDefault(),t.stopImmediatePropagation()}function sx(t){var i=t.document.documentElement,r=an(t).on("dragstart.drag",Sl,Xa);"onselectstart"in i?r.on("selectstart.drag",Sl,Xa):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function cx(t,i){var r=t.document.documentElement,a=an(t).on("dragstart.drag",null);i&&(a.on("click.drag",Sl,Xa),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in r?a.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Lu=t=>()=>t;function kd(t,{sourceEvent:i,subject:r,target:a,identifier:u,active:s,x:c,y:d,dx:m,dy:p,dispatch:g}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:u,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:m,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:g}})}kd.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function d_(t){return!t.ctrlKey&&!t.button}function h_(){return this.parentNode}function p_(t,i){return i??{x:t.x,y:t.y}}function m_(){return navigator.maxTouchPoints||"ontouchstart"in this}function fx(){var t=d_,i=h_,r=p_,a=m_,u={},s=vs("start","drag","end"),c=0,d,m,p,g,y=0;function v(k){k.on("mousedown.drag",x).filter(a).on("touchstart.drag",M).on("touchmove.drag",E,f_).on("touchend.drag touchcancel.drag",H).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(k,I){if(!(g||!t.call(this,k,I))){var D=w(this,i.call(this,k,I),k,I,"mouse");D&&(an(k.view).on("mousemove.drag",S,Xa).on("mouseup.drag",C,Xa),sx(k.view),Wf(k),p=!1,d=k.clientX,m=k.clientY,D("start",k))}}function S(k){if(Sl(k),!p){var I=k.clientX-d,D=k.clientY-m;p=I*I+D*D>y}u.mouse("drag",k)}function C(k){an(k.view).on("mousemove.drag mouseup.drag",null),cx(k.view,p),Sl(k),u.mouse("end",k)}function M(k,I){if(t.call(this,k,I)){var D=k.changedTouches,j=i.call(this,k,I),q=D.length,Z,lt;for(Z=0;Z<q;++Z)(lt=w(this,j,k,I,D[Z].identifier,D[Z]))&&(Wf(k),lt("start",k,D[Z]))}}function E(k){var I=k.changedTouches,D=I.length,j,q;for(j=0;j<D;++j)(q=u[I[j].identifier])&&(Sl(k),q("drag",k,I[j]))}function H(k){var I=k.changedTouches,D=I.length,j,q;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),j=0;j<D;++j)(q=u[I[j].identifier])&&(Wf(k),q("end",k,I[j]))}function w(k,I,D,j,q,Z){var lt=s.copy(),Q=Cn(Z||D,I),G,nt,R;if((R=r.call(k,new kd("beforestart",{sourceEvent:D,target:v,identifier:q,active:c,x:Q[0],y:Q[1],dx:0,dy:0,dispatch:lt}),j))!=null)return G=R.x-Q[0]||0,nt=R.y-Q[1]||0,function B(A,L,Y){var K=Q,T;switch(A){case"start":u[q]=B,T=c++;break;case"end":delete u[q],--c;case"drag":Q=Cn(Y||L,I),T=c;break}lt.call(A,k,new kd(A,{sourceEvent:L,subject:R,target:v,identifier:q,active:T,x:Q[0]+G,y:Q[1]+nt,dx:Q[0]-K[0],dy:Q[1]-K[1],dispatch:lt}),j)}}return v.filter=function(k){return arguments.length?(t=typeof k=="function"?k:Lu(!!k),v):t},v.container=function(k){return arguments.length?(i=typeof k=="function"?k:Lu(k),v):i},v.subject=function(k){return arguments.length?(r=typeof k=="function"?k:Lu(k),v):r},v.touchable=function(k){return arguments.length?(a=typeof k=="function"?k:Lu(!!k),v):a},v.on=function(){var k=s.on.apply(s,arguments);return k===s?v:k},v.clickDistance=function(k){return arguments.length?(y=(k=+k)*k,v):Math.sqrt(y)},v}function ch(t,i,r){t.prototype=i.prototype=r,r.constructor=t}function dx(t,i){var r=Object.create(t.prototype);for(var a in i)r[a]=i[a];return r}function ro(){}var Ga=.7,rs=1/Ga,wl="\\s*([+-]?\\d+)\\s*",Za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",g_=/^#([0-9a-f]{3,8})$/,y_=new RegExp(`^rgb\\(${wl},${wl},${wl}\\)$`),v_=new RegExp(`^rgb\\(${Un},${Un},${Un}\\)$`),x_=new RegExp(`^rgba\\(${wl},${wl},${wl},${Za}\\)$`),b_=new RegExp(`^rgba\\(${Un},${Un},${Un},${Za}\\)$`),S_=new RegExp(`^hsl\\(${Za},${Un},${Un}\\)$`),w_=new RegExp(`^hsla\\(${Za},${Un},${Un},${Za}\\)$`),Zy={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};ch(ro,Cr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Fy,formatHex:Fy,formatHex8:E_,formatHsl:__,formatRgb:Ky,toString:Ky});function Fy(){return this.rgb().formatHex()}function E_(){return this.rgb().formatHex8()}function __(){return hx(this).formatHsl()}function Ky(){return this.rgb().formatRgb()}function Cr(t){var i,r;return t=(t+"").trim().toLowerCase(),(i=g_.exec(t))?(r=i[1].length,i=parseInt(i[1],16),r===6?$y(i):r===3?new Ge(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):r===8?Bu(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):r===4?Bu(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=y_.exec(t))?new Ge(i[1],i[2],i[3],1):(i=v_.exec(t))?new Ge(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=x_.exec(t))?Bu(i[1],i[2],i[3],i[4]):(i=b_.exec(t))?Bu(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=S_.exec(t))?Wy(i[1],i[2]/100,i[3]/100,1):(i=w_.exec(t))?Wy(i[1],i[2]/100,i[3]/100,i[4]):Zy.hasOwnProperty(t)?$y(Zy[t]):t==="transparent"?new Ge(NaN,NaN,NaN,0):null}function $y(t){return new Ge(t>>16&255,t>>8&255,t&255,1)}function Bu(t,i,r,a){return a<=0&&(t=i=r=NaN),new Ge(t,i,r,a)}function C_(t){return t instanceof ro||(t=Cr(t)),t?(t=t.rgb(),new Ge(t.r,t.g,t.b,t.opacity)):new Ge}function Rd(t,i,r,a){return arguments.length===1?C_(t):new Ge(t,i,r,a??1)}function Ge(t,i,r,a){this.r=+t,this.g=+i,this.b=+r,this.opacity=+a}ch(Ge,Rd,dx(ro,{brighter(t){return t=t==null?rs:Math.pow(rs,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ga:Math.pow(Ga,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ge(wr(this.r),wr(this.g),wr(this.b),ls(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:Py,formatHex:Py,formatHex8:N_,formatRgb:Jy,toString:Jy}));function Py(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function N_(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Jy(){const t=ls(this.opacity);return`${t===1?"rgb(":"rgba("}${wr(this.r)}, ${wr(this.g)}, ${wr(this.b)}${t===1?")":`, ${t})`}`}function ls(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function wr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Sr(t){return t=wr(t),(t<16?"0":"")+t.toString(16)}function Wy(t,i,r,a){return a<=0?t=i=r=NaN:r<=0||r>=1?t=i=NaN:i<=0&&(t=NaN),new Nn(t,i,r,a)}function hx(t){if(t instanceof Nn)return new Nn(t.h,t.s,t.l,t.opacity);if(t instanceof ro||(t=Cr(t)),!t)return new Nn;if(t instanceof Nn)return t;t=t.rgb();var i=t.r/255,r=t.g/255,a=t.b/255,u=Math.min(i,r,a),s=Math.max(i,r,a),c=NaN,d=s-u,m=(s+u)/2;return d?(i===s?c=(r-a)/d+(r<a)*6:r===s?c=(a-i)/d+2:c=(i-r)/d+4,d/=m<.5?s+u:2-s-u,c*=60):d=m>0&&m<1?0:c,new Nn(c,d,m,t.opacity)}function T_(t,i,r,a){return arguments.length===1?hx(t):new Nn(t,i,r,a??1)}function Nn(t,i,r,a){this.h=+t,this.s=+i,this.l=+r,this.opacity=+a}ch(Nn,T_,dx(ro,{brighter(t){return t=t==null?rs:Math.pow(rs,t),new Nn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ga:Math.pow(Ga,t),new Nn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,i=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,a=r+(r<.5?r:1-r)*i,u=2*r-a;return new Ge(td(t>=240?t-240:t+120,u,a),td(t,u,a),td(t<120?t+240:t-120,u,a),this.opacity)},clamp(){return new Nn(t0(this.h),Uu(this.s),Uu(this.l),ls(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 t=ls(this.opacity);return`${t===1?"hsl(":"hsla("}${t0(this.h)}, ${Uu(this.s)*100}%, ${Uu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function t0(t){return t=(t||0)%360,t<0?t+360:t}function Uu(t){return Math.max(0,Math.min(1,t||0))}function td(t,i,r){return(t<60?i+(r-i)*t/60:t<180?r:t<240?i+(r-i)*(240-t)/60:i)*255}const fh=t=>()=>t;function A_(t,i){return function(r){return t+r*i}}function M_(t,i,r){return t=Math.pow(t,r),i=Math.pow(i,r)-t,r=1/r,function(a){return Math.pow(t+a*i,r)}}function z_(t){return(t=+t)==1?px:function(i,r){return r-i?M_(i,r,t):fh(isNaN(i)?r:i)}}function px(t,i){var r=i-t;return r?A_(t,r):fh(isNaN(t)?i:t)}const as=(function t(i){var r=z_(i);function a(u,s){var c=r((u=Rd(u)).r,(s=Rd(s)).r),d=r(u.g,s.g),m=r(u.b,s.b),p=px(u.opacity,s.opacity);return function(g){return u.r=c(g),u.g=d(g),u.b=m(g),u.opacity=p(g),u+""}}return a.gamma=t,a})(1);function O_(t,i){i||(i=[]);var r=t?Math.min(i.length,t.length):0,a=i.slice(),u;return function(s){for(u=0;u<r;++u)a[u]=t[u]*(1-s)+i[u]*s;return a}}function D_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function k_(t,i){var r=i?i.length:0,a=t?Math.min(r,t.length):0,u=new Array(a),s=new Array(r),c;for(c=0;c<a;++c)u[c]=Ba(t[c],i[c]);for(;c<r;++c)s[c]=i[c];return function(d){for(c=0;c<a;++c)s[c]=u[c](d);return s}}function R_(t,i){var r=new Date;return t=+t,i=+i,function(a){return r.setTime(t*(1-a)+i*a),r}}function Ln(t,i){return t=+t,i=+i,function(r){return t*(1-r)+i*r}}function H_(t,i){var r={},a={},u;(t===null||typeof t!="object")&&(t={}),(i===null||typeof i!="object")&&(i={});for(u in i)u in t?r[u]=Ba(t[u],i[u]):a[u]=i[u];return function(s){for(u in r)a[u]=r[u](s);return a}}var Hd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ed=new RegExp(Hd.source,"g");function j_(t){return function(){return t}}function L_(t){return function(i){return t(i)+""}}function mx(t,i){var r=Hd.lastIndex=ed.lastIndex=0,a,u,s,c=-1,d=[],m=[];for(t=t+"",i=i+"";(a=Hd.exec(t))&&(u=ed.exec(i));)(s=u.index)>r&&(s=i.slice(r,s),d[c]?d[c]+=s:d[++c]=s),(a=a[0])===(u=u[0])?d[c]?d[c]+=u:d[++c]=u:(d[++c]=null,m.push({i:c,x:Ln(a,u)})),r=ed.lastIndex;return r<i.length&&(s=i.slice(r),d[c]?d[c]+=s:d[++c]=s),d.length<2?m[0]?L_(m[0].x):j_(i):(i=m.length,function(p){for(var g=0,y;g<i;++g)d[(y=m[g]).i]=y.x(p);return d.join("")})}function Ba(t,i){var r=typeof i,a;return i==null||r==="boolean"?fh(i):(r==="number"?Ln:r==="string"?(a=Cr(i))?(i=a,as):mx:i instanceof Cr?as:i instanceof Date?R_:D_(i)?O_:Array.isArray(i)?k_:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?H_:Ln)(t,i)}var e0=180/Math.PI,jd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gx(t,i,r,a,u,s){var c,d,m;return(c=Math.sqrt(t*t+i*i))&&(t/=c,i/=c),(m=t*r+i*a)&&(r-=t*m,a-=i*m),(d=Math.sqrt(r*r+a*a))&&(r/=d,a/=d,m/=d),t*a<i*r&&(t=-t,i=-i,m=-m,c=-c),{translateX:u,translateY:s,rotate:Math.atan2(i,t)*e0,skewX:Math.atan(m)*e0,scaleX:c,scaleY:d}}var qu;function B_(t){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?jd:gx(i.a,i.b,i.c,i.d,i.e,i.f)}function U_(t){return t==null||(qu||(qu=document.createElementNS("http://www.w3.org/2000/svg","g")),qu.setAttribute("transform",t),!(t=qu.transform.baseVal.consolidate()))?jd:(t=t.matrix,gx(t.a,t.b,t.c,t.d,t.e,t.f))}function yx(t,i,r,a){function u(p){return p.length?p.pop()+" ":""}function s(p,g,y,v,x,S){if(p!==y||g!==v){var C=x.push("translate(",null,i,null,r);S.push({i:C-4,x:Ln(p,y)},{i:C-2,x:Ln(g,v)})}else(y||v)&&x.push("translate("+y+i+v+r)}function c(p,g,y,v){p!==g?(p-g>180?g+=360:g-p>180&&(p+=360),v.push({i:y.push(u(y)+"rotate(",null,a)-2,x:Ln(p,g)})):g&&y.push(u(y)+"rotate("+g+a)}function d(p,g,y,v){p!==g?v.push({i:y.push(u(y)+"skewX(",null,a)-2,x:Ln(p,g)}):g&&y.push(u(y)+"skewX("+g+a)}function m(p,g,y,v,x,S){if(p!==y||g!==v){var C=x.push(u(x)+"scale(",null,",",null,")");S.push({i:C-4,x:Ln(p,y)},{i:C-2,x:Ln(g,v)})}else(y!==1||v!==1)&&x.push(u(x)+"scale("+y+","+v+")")}return function(p,g){var y=[],v=[];return p=t(p),g=t(g),s(p.translateX,p.translateY,g.translateX,g.translateY,y,v),c(p.rotate,g.rotate,y,v),d(p.skewX,g.skewX,y,v),m(p.scaleX,p.scaleY,g.scaleX,g.scaleY,y,v),p=g=null,function(x){for(var S=-1,C=v.length,M;++S<C;)y[(M=v[S]).i]=M.x(x);return y.join("")}}}var q_=yx(B_,"px, ","px)","deg)"),V_=yx(U_,", ",")",")"),I_=1e-12;function n0(t){return((t=Math.exp(t))+1/t)/2}function Y_(t){return((t=Math.exp(t))-1/t)/2}function Q_(t){return((t=Math.exp(2*t))-1)/(t+1)}const Pu=(function t(i,r,a){function u(s,c){var d=s[0],m=s[1],p=s[2],g=c[0],y=c[1],v=c[2],x=g-d,S=y-m,C=x*x+S*S,M,E;if(C<I_)E=Math.log(v/p)/i,M=function(j){return[d+j*x,m+j*S,p*Math.exp(i*j*E)]};else{var H=Math.sqrt(C),w=(v*v-p*p+a*C)/(2*p*r*H),k=(v*v-p*p-a*C)/(2*v*r*H),I=Math.log(Math.sqrt(w*w+1)-w),D=Math.log(Math.sqrt(k*k+1)-k);E=(D-I)/i,M=function(j){var q=j*E,Z=n0(I),lt=p/(r*H)*(Z*Q_(i*q+I)-Y_(I));return[d+lt*x,m+lt*S,p*Z/n0(i*q+I)]}}return M.duration=E*1e3*i/Math.SQRT2,M}return u.rho=function(s){var c=Math.max(.001,+s),d=c*c,m=d*d;return t(c,d,m)},u})(Math.SQRT2,2,4);var Nl=0,ja=0,za=0,vx=1e3,os,La,us=0,Nr=0,bs=0,Fa=typeof performance=="object"&&performance.now?performance:Date,xx=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function dh(){return Nr||(xx(X_),Nr=Fa.now()+bs)}function X_(){Nr=0}function ss(){this._call=this._time=this._next=null}ss.prototype=bx.prototype={constructor:ss,restart:function(t,i,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?dh():+r)+(i==null?0:+i),!this._next&&La!==this&&(La?La._next=this:os=this,La=this),this._call=t,this._time=r,Ld()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ld())}};function bx(t,i,r){var a=new ss;return a.restart(t,i,r),a}function G_(){dh(),++Nl;for(var t=os,i;t;)(i=Nr-t._time)>=0&&t._call.call(void 0,i),t=t._next;--Nl}function i0(){Nr=(us=Fa.now())+bs,Nl=ja=0;try{G_()}finally{Nl=0,F_(),Nr=0}}function Z_(){var t=Fa.now(),i=t-us;i>vx&&(bs-=i,us=t)}function F_(){for(var t,i=os,r,a=1/0;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(r=i._next,i._next=null,i=t?t._next=r:os=r);La=t,Ld(a)}function Ld(t){if(!Nl){ja&&(ja=clearTimeout(ja));var i=t-Nr;i>24?(t<1/0&&(ja=setTimeout(i0,t-Fa.now()-bs)),za&&(za=clearInterval(za))):(za||(us=Fa.now(),za=setInterval(Z_,vx)),Nl=1,xx(i0))}}function r0(t,i,r){var a=new ss;return i=i==null?0:+i,a.restart(u=>{a.stop(),t(u+i)},i,r),a}var K_=vs("start","end","cancel","interrupt"),$_=[],Sx=0,l0=1,Bd=2,Ju=3,a0=4,Ud=5,Wu=6;function Ss(t,i,r,a,u,s){var c=t.__transition;if(!c)t.__transition={};else if(r in c)return;P_(t,r,{name:i,index:a,group:u,on:K_,tween:$_,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Sx})}function hh(t,i){var r=Mn(t,i);if(r.state>Sx)throw new Error("too late; already scheduled");return r}function In(t,i){var r=Mn(t,i);if(r.state>Ju)throw new Error("too late; already running");return r}function Mn(t,i){var r=t.__transition;if(!r||!(r=r[i]))throw new Error("transition not found");return r}function P_(t,i,r){var a=t.__transition,u;a[i]=r,r.timer=bx(s,0,r.time);function s(p){r.state=l0,r.timer.restart(c,r.delay,r.time),r.delay<=p&&c(p-r.delay)}function c(p){var g,y,v,x;if(r.state!==l0)return m();for(g in a)if(x=a[g],x.name===r.name){if(x.state===Ju)return r0(c);x.state===a0?(x.state=Wu,x.timer.stop(),x.on.call("interrupt",t,t.__data__,x.index,x.group),delete a[g]):+g<i&&(x.state=Wu,x.timer.stop(),x.on.call("cancel",t,t.__data__,x.index,x.group),delete a[g])}if(r0(function(){r.state===Ju&&(r.state=a0,r.timer.restart(d,r.delay,r.time),d(p))}),r.state=Bd,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Bd){for(r.state=Ju,u=new Array(v=r.tween.length),g=0,y=-1;g<v;++g)(x=r.tween[g].value.call(t,t.__data__,r.index,r.group))&&(u[++y]=x);u.length=y+1}}function d(p){for(var g=p<r.duration?r.ease.call(null,p/r.duration):(r.timer.restart(m),r.state=Ud,1),y=-1,v=u.length;++y<v;)u[y].call(t,g);r.state===Ud&&(r.on.call("end",t,t.__data__,r.index,r.group),m())}function m(){r.state=Wu,r.timer.stop(),delete a[i];for(var p in a)return;delete t.__transition}}function ts(t,i){var r=t.__transition,a,u,s=!0,c;if(r){i=i==null?null:i+"";for(c in r){if((a=r[c]).name!==i){s=!1;continue}u=a.state>Bd&&a.state<Ud,a.state=Wu,a.timer.stop(),a.on.call(u?"interrupt":"cancel",t,t.__data__,a.index,a.group),delete r[c]}s&&delete t.__transition}}function J_(t){return this.each(function(){ts(this,t)})}function W_(t,i){var r,a;return function(){var u=In(this,t),s=u.tween;if(s!==r){a=r=s;for(var c=0,d=a.length;c<d;++c)if(a[c].name===i){a=a.slice(),a.splice(c,1);break}}u.tween=a}}function tC(t,i,r){var a,u;if(typeof r!="function")throw new Error;return function(){var s=In(this,t),c=s.tween;if(c!==a){u=(a=c).slice();for(var d={name:i,value:r},m=0,p=u.length;m<p;++m)if(u[m].name===i){u[m]=d;break}m===p&&u.push(d)}s.tween=u}}function eC(t,i){var r=this._id;if(t+="",arguments.length<2){for(var a=Mn(this.node(),r).tween,u=0,s=a.length,c;u<s;++u)if((c=a[u]).name===t)return c.value;return null}return this.each((i==null?W_:tC)(r,t,i))}function ph(t,i,r){var a=t._id;return t.each(function(){var u=In(this,a);(u.value||(u.value={}))[i]=r.apply(this,arguments)}),function(u){return Mn(u,a).value[i]}}function wx(t,i){var r;return(typeof i=="number"?Ln:i instanceof Cr?as:(r=Cr(i))?(i=r,as):mx)(t,i)}function nC(t){return function(){this.removeAttribute(t)}}function iC(t){return function(){this.removeAttributeNS(t.space,t.local)}}function rC(t,i,r){var a,u=r+"",s;return function(){var c=this.getAttribute(t);return c===u?null:c===a?s:s=i(a=c,r)}}function lC(t,i,r){var a,u=r+"",s;return function(){var c=this.getAttributeNS(t.space,t.local);return c===u?null:c===a?s:s=i(a=c,r)}}function aC(t,i,r){var a,u,s;return function(){var c,d=r(this),m;return d==null?void this.removeAttribute(t):(c=this.getAttribute(t),m=d+"",c===m?null:c===a&&m===u?s:(u=m,s=i(a=c,d)))}}function oC(t,i,r){var a,u,s;return function(){var c,d=r(this),m;return d==null?void this.removeAttributeNS(t.space,t.local):(c=this.getAttributeNS(t.space,t.local),m=d+"",c===m?null:c===a&&m===u?s:(u=m,s=i(a=c,d)))}}function uC(t,i){var r=xs(t),a=r==="transform"?V_:wx;return this.attrTween(t,typeof i=="function"?(r.local?oC:aC)(r,a,ph(this,"attr."+t,i)):i==null?(r.local?iC:nC)(r):(r.local?lC:rC)(r,a,i))}function sC(t,i){return function(r){this.setAttribute(t,i.call(this,r))}}function cC(t,i){return function(r){this.setAttributeNS(t.space,t.local,i.call(this,r))}}function fC(t,i){var r,a;function u(){var s=i.apply(this,arguments);return s!==a&&(r=(a=s)&&cC(t,s)),r}return u._value=i,u}function dC(t,i){var r,a;function u(){var s=i.apply(this,arguments);return s!==a&&(r=(a=s)&&sC(t,s)),r}return u._value=i,u}function hC(t,i){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(i==null)return this.tween(r,null);if(typeof i!="function")throw new Error;var a=xs(t);return this.tween(r,(a.local?fC:dC)(a,i))}function pC(t,i){return function(){hh(this,t).delay=+i.apply(this,arguments)}}function mC(t,i){return i=+i,function(){hh(this,t).delay=i}}function gC(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?pC:mC)(i,t)):Mn(this.node(),i).delay}function yC(t,i){return function(){In(this,t).duration=+i.apply(this,arguments)}}function vC(t,i){return i=+i,function(){In(this,t).duration=i}}function xC(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?yC:vC)(i,t)):Mn(this.node(),i).duration}function bC(t,i){if(typeof i!="function")throw new Error;return function(){In(this,t).ease=i}}function SC(t){var i=this._id;return arguments.length?this.each(bC(i,t)):Mn(this.node(),i).ease}function wC(t,i){return function(){var r=i.apply(this,arguments);if(typeof r!="function")throw new Error;In(this,t).ease=r}}function EC(t){if(typeof t!="function")throw new Error;return this.each(wC(this._id,t))}function _C(t){typeof t!="function"&&(t=Wv(t));for(var i=this._groups,r=i.length,a=new Array(r),u=0;u<r;++u)for(var s=i[u],c=s.length,d=a[u]=[],m,p=0;p<c;++p)(m=s[p])&&t.call(m,m.__data__,p,s)&&d.push(m);return new pi(a,this._parents,this._name,this._id)}function CC(t){if(t._id!==this._id)throw new Error;for(var i=this._groups,r=t._groups,a=i.length,u=r.length,s=Math.min(a,u),c=new Array(a),d=0;d<s;++d)for(var m=i[d],p=r[d],g=m.length,y=c[d]=new Array(g),v,x=0;x<g;++x)(v=m[x]||p[x])&&(y[x]=v);for(;d<a;++d)c[d]=i[d];return new pi(c,this._parents,this._name,this._id)}function NC(t){return(t+"").trim().split(/^|\s+/).every(function(i){var r=i.indexOf(".");return r>=0&&(i=i.slice(0,r)),!i||i==="start"})}function TC(t,i,r){var a,u,s=NC(i)?hh:In;return function(){var c=s(this,t),d=c.on;d!==a&&(u=(a=d).copy()).on(i,r),c.on=u}}function AC(t,i){var r=this._id;return arguments.length<2?Mn(this.node(),r).on.on(t):this.each(TC(r,t,i))}function MC(t){return function(){var i=this.parentNode;for(var r in this.__transition)if(+r!==t)return;i&&i.removeChild(this)}}function zC(){return this.on("end.remove",MC(this._id))}function OC(t){var i=this._name,r=this._id;typeof t!="function"&&(t=uh(t));for(var a=this._groups,u=a.length,s=new Array(u),c=0;c<u;++c)for(var d=a[c],m=d.length,p=s[c]=new Array(m),g,y,v=0;v<m;++v)(g=d[v])&&(y=t.call(g,g.__data__,v,d))&&("__data__"in g&&(y.__data__=g.__data__),p[v]=y,Ss(p[v],i,r,v,p,Mn(g,r)));return new pi(s,this._parents,i,r)}function DC(t){var i=this._name,r=this._id;typeof t!="function"&&(t=Jv(t));for(var a=this._groups,u=a.length,s=[],c=[],d=0;d<u;++d)for(var m=a[d],p=m.length,g,y=0;y<p;++y)if(g=m[y]){for(var v=t.call(g,g.__data__,y,m),x,S=Mn(g,r),C=0,M=v.length;C<M;++C)(x=v[C])&&Ss(x,i,r,C,v,S);s.push(v),c.push(g)}return new pi(s,c,i,r)}var kC=io.prototype.constructor;function RC(){return new kC(this._groups,this._parents)}function HC(t,i){var r,a,u;return function(){var s=Cl(this,t),c=(this.style.removeProperty(t),Cl(this,t));return s===c?null:s===r&&c===a?u:u=i(r=s,a=c)}}function Ex(t){return function(){this.style.removeProperty(t)}}function jC(t,i,r){var a,u=r+"",s;return function(){var c=Cl(this,t);return c===u?null:c===a?s:s=i(a=c,r)}}function LC(t,i,r){var a,u,s;return function(){var c=Cl(this,t),d=r(this),m=d+"";return d==null&&(m=d=(this.style.removeProperty(t),Cl(this,t))),c===m?null:c===a&&m===u?s:(u=m,s=i(a=c,d))}}function BC(t,i){var r,a,u,s="style."+i,c="end."+s,d;return function(){var m=In(this,t),p=m.on,g=m.value[s]==null?d||(d=Ex(i)):void 0;(p!==r||u!==g)&&(a=(r=p).copy()).on(c,u=g),m.on=a}}function UC(t,i,r){var a=(t+="")=="transform"?q_:wx;return i==null?this.styleTween(t,HC(t,a)).on("end.style."+t,Ex(t)):typeof i=="function"?this.styleTween(t,LC(t,a,ph(this,"style."+t,i))).each(BC(this._id,t)):this.styleTween(t,jC(t,a,i),r).on("end.style."+t,null)}function qC(t,i,r){return function(a){this.style.setProperty(t,i.call(this,a),r)}}function VC(t,i,r){var a,u;function s(){var c=i.apply(this,arguments);return c!==u&&(a=(u=c)&&qC(t,c,r)),a}return s._value=i,s}function IC(t,i,r){var a="style."+(t+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(i==null)return this.tween(a,null);if(typeof i!="function")throw new Error;return this.tween(a,VC(t,i,r??""))}function YC(t){return function(){this.textContent=t}}function QC(t){return function(){var i=t(this);this.textContent=i??""}}function XC(t){return this.tween("text",typeof t=="function"?QC(ph(this,"text",t)):YC(t==null?"":t+""))}function GC(t){return function(i){this.textContent=t.call(this,i)}}function ZC(t){var i,r;function a(){var u=t.apply(this,arguments);return u!==r&&(i=(r=u)&&GC(u)),i}return a._value=t,a}function FC(t){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,ZC(t))}function KC(){for(var t=this._name,i=this._id,r=_x(),a=this._groups,u=a.length,s=0;s<u;++s)for(var c=a[s],d=c.length,m,p=0;p<d;++p)if(m=c[p]){var g=Mn(m,i);Ss(m,t,r,p,c,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new pi(a,this._parents,t,r)}function $C(){var t,i,r=this,a=r._id,u=r.size();return new Promise(function(s,c){var d={value:c},m={value:function(){--u===0&&s()}};r.each(function(){var p=In(this,a),g=p.on;g!==t&&(i=(t=g).copy(),i._.cancel.push(d),i._.interrupt.push(d),i._.end.push(m)),p.on=i}),u===0&&s()})}var PC=0;function pi(t,i,r,a){this._groups=t,this._parents=i,this._name=r,this._id=a}function _x(){return++PC}var di=io.prototype;pi.prototype={constructor:pi,select:OC,selectAll:DC,selectChild:di.selectChild,selectChildren:di.selectChildren,filter:_C,merge:CC,selection:RC,transition:KC,call:di.call,nodes:di.nodes,node:di.node,size:di.size,empty:di.empty,each:di.each,on:AC,attr:uC,attrTween:hC,style:UC,styleTween:IC,text:XC,textTween:FC,remove:zC,tween:eC,delay:gC,duration:xC,ease:SC,easeVarying:EC,end:$C,[Symbol.iterator]:di[Symbol.iterator]};function JC(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var WC={time:null,delay:0,duration:250,ease:JC};function tN(t,i){for(var r;!(r=t.__transition)||!(r=r[i]);)if(!(t=t.parentNode))throw new Error(`transition ${i} not found`);return r}function eN(t){var i,r;t instanceof pi?(i=t._id,t=t._name):(i=_x(),(r=WC).time=dh(),t=t==null?null:t+"");for(var a=this._groups,u=a.length,s=0;s<u;++s)for(var c=a[s],d=c.length,m,p=0;p<d;++p)(m=c[p])&&Ss(m,t,i,p,c,r||tN(m,i));return new pi(a,this._parents,t,i)}io.prototype.interrupt=J_;io.prototype.transition=eN;const Vu=t=>()=>t;function nN(t,{sourceEvent:i,target:r,transform:a,dispatch:u}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:u}})}function hi(t,i,r){this.k=t,this.x=i,this.y=r}hi.prototype={constructor:hi,scale:function(t){return t===1?this:new hi(this.k*t,this.x,this.y)},translate:function(t,i){return t===0&i===0?this:new hi(this.k,this.x+this.k*t,this.y+this.k*i)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ws=new hi(1,0,0);Cx.prototype=hi.prototype;function Cx(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ws;return t.__zoom}function nd(t){t.stopImmediatePropagation()}function Oa(t){t.preventDefault(),t.stopImmediatePropagation()}function iN(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function rN(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function o0(){return this.__zoom||ws}function lN(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function aN(){return navigator.maxTouchPoints||"ontouchstart"in this}function oN(t,i,r){var a=t.invertX(i[0][0])-r[0][0],u=t.invertX(i[1][0])-r[1][0],s=t.invertY(i[0][1])-r[0][1],c=t.invertY(i[1][1])-r[1][1];return t.translate(u>a?(a+u)/2:Math.min(0,a)||Math.max(0,u),c>s?(s+c)/2:Math.min(0,s)||Math.max(0,c))}function Nx(){var t=iN,i=rN,r=oN,a=lN,u=aN,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,m=Pu,p=vs("start","zoom","end"),g,y,v,x=500,S=150,C=0,M=10;function E(R){R.property("__zoom",o0).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",Z).on("dblclick.zoom",lt).filter(u).on("touchstart.zoom",Q).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",nt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(R,B,A,L){var Y=R.selection?R.selection():R;Y.property("__zoom",o0),R!==Y?I(R,B,A,L):Y.interrupt().each(function(){D(this,arguments).event(L).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},E.scaleBy=function(R,B,A,L){E.scaleTo(R,function(){var Y=this.__zoom.k,K=typeof B=="function"?B.apply(this,arguments):B;return Y*K},A,L)},E.scaleTo=function(R,B,A,L){E.transform(R,function(){var Y=i.apply(this,arguments),K=this.__zoom,T=A==null?k(Y):typeof A=="function"?A.apply(this,arguments):A,O=K.invert(T),V=typeof B=="function"?B.apply(this,arguments):B;return r(w(H(K,V),T,O),Y,c)},A,L)},E.translateBy=function(R,B,A,L){E.transform(R,function(){return r(this.__zoom.translate(typeof B=="function"?B.apply(this,arguments):B,typeof A=="function"?A.apply(this,arguments):A),i.apply(this,arguments),c)},null,L)},E.translateTo=function(R,B,A,L,Y){E.transform(R,function(){var K=i.apply(this,arguments),T=this.__zoom,O=L==null?k(K):typeof L=="function"?L.apply(this,arguments):L;return r(ws.translate(O[0],O[1]).scale(T.k).translate(typeof B=="function"?-B.apply(this,arguments):-B,typeof A=="function"?-A.apply(this,arguments):-A),K,c)},L,Y)};function H(R,B){return B=Math.max(s[0],Math.min(s[1],B)),B===R.k?R:new hi(B,R.x,R.y)}function w(R,B,A){var L=B[0]-A[0]*R.k,Y=B[1]-A[1]*R.k;return L===R.x&&Y===R.y?R:new hi(R.k,L,Y)}function k(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function I(R,B,A,L){R.on("start.zoom",function(){D(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(L).end()}).tween("zoom",function(){var Y=this,K=arguments,T=D(Y,K).event(L),O=i.apply(Y,K),V=A==null?k(O):typeof A=="function"?A.apply(Y,K):A,N=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),et=Y.__zoom,st=typeof B=="function"?B.apply(Y,K):B,ct=m(et.invert(V).concat(N/et.k),st.invert(V).concat(N/st.k));return function(dt){if(dt===1)dt=st;else{var ut=ct(dt),pt=N/ut[2];dt=new hi(pt,V[0]-ut[0]*pt,V[1]-ut[1]*pt)}T.zoom(null,dt)}})}function D(R,B,A){return!A&&R.__zooming||new j(R,B)}function j(R,B){this.that=R,this.args=B,this.active=0,this.sourceEvent=null,this.extent=i.apply(R,B),this.taps=0}j.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=an(this.that).datum();p.call(R,this.that,new nN(R,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:p}),B)}};function q(R,...B){if(!t.apply(this,arguments))return;var A=D(this,B).event(R),L=this.__zoom,Y=Math.max(s[0],Math.min(s[1],L.k*Math.pow(2,a.apply(this,arguments)))),K=Cn(R);if(A.wheel)(A.mouse[0][0]!==K[0]||A.mouse[0][1]!==K[1])&&(A.mouse[1]=L.invert(A.mouse[0]=K)),clearTimeout(A.wheel);else{if(L.k===Y)return;A.mouse=[K,L.invert(K)],ts(this),A.start()}Oa(R),A.wheel=setTimeout(T,S),A.zoom("mouse",r(w(H(L,Y),A.mouse[0],A.mouse[1]),A.extent,c));function T(){A.wheel=null,A.end()}}function Z(R,...B){if(v||!t.apply(this,arguments))return;var A=R.currentTarget,L=D(this,B,!0).event(R),Y=an(R.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",N,!0),K=Cn(R,A),T=R.clientX,O=R.clientY;sx(R.view),nd(R),L.mouse=[K,this.__zoom.invert(K)],ts(this),L.start();function V(et){if(Oa(et),!L.moved){var st=et.clientX-T,ct=et.clientY-O;L.moved=st*st+ct*ct>C}L.event(et).zoom("mouse",r(w(L.that.__zoom,L.mouse[0]=Cn(et,A),L.mouse[1]),L.extent,c))}function N(et){Y.on("mousemove.zoom mouseup.zoom",null),cx(et.view,L.moved),Oa(et),L.event(et).end()}}function lt(R,...B){if(t.apply(this,arguments)){var A=this.__zoom,L=Cn(R.changedTouches?R.changedTouches[0]:R,this),Y=A.invert(L),K=A.k*(R.shiftKey?.5:2),T=r(w(H(A,K),L,Y),i.apply(this,B),c);Oa(R),d>0?an(this).transition().duration(d).call(I,T,L,R):an(this).call(E.transform,T,L,R)}}function Q(R,...B){if(t.apply(this,arguments)){var A=R.touches,L=A.length,Y=D(this,B,R.changedTouches.length===L).event(R),K,T,O,V;for(nd(R),T=0;T<L;++T)O=A[T],V=Cn(O,this),V=[V,this.__zoom.invert(V),O.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==V[2]&&(Y.touch1=V,Y.taps=0):(Y.touch0=V,K=!0,Y.taps=1+!!g);g&&(g=clearTimeout(g)),K&&(Y.taps<2&&(y=V[0],g=setTimeout(function(){g=null},x)),ts(this),Y.start())}}function G(R,...B){if(this.__zooming){var A=D(this,B).event(R),L=R.changedTouches,Y=L.length,K,T,O,V;for(Oa(R),K=0;K<Y;++K)T=L[K],O=Cn(T,this),A.touch0&&A.touch0[2]===T.identifier?A.touch0[0]=O:A.touch1&&A.touch1[2]===T.identifier&&(A.touch1[0]=O);if(T=A.that.__zoom,A.touch1){var N=A.touch0[0],et=A.touch0[1],st=A.touch1[0],ct=A.touch1[1],dt=(dt=st[0]-N[0])*dt+(dt=st[1]-N[1])*dt,ut=(ut=ct[0]-et[0])*ut+(ut=ct[1]-et[1])*ut;T=H(T,Math.sqrt(dt/ut)),O=[(N[0]+st[0])/2,(N[1]+st[1])/2],V=[(et[0]+ct[0])/2,(et[1]+ct[1])/2]}else if(A.touch0)O=A.touch0[0],V=A.touch0[1];else return;A.zoom("touch",r(w(T,O,V),A.extent,c))}}function nt(R,...B){if(this.__zooming){var A=D(this,B).event(R),L=R.changedTouches,Y=L.length,K,T;for(nd(R),v&&clearTimeout(v),v=setTimeout(function(){v=null},x),K=0;K<Y;++K)T=L[K],A.touch0&&A.touch0[2]===T.identifier?delete A.touch0:A.touch1&&A.touch1[2]===T.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(T=Cn(T,this),Math.hypot(y[0]-T[0],y[1]-T[1])<M)){var O=an(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return E.wheelDelta=function(R){return arguments.length?(a=typeof R=="function"?R:Vu(+R),E):a},E.filter=function(R){return arguments.length?(t=typeof R=="function"?R:Vu(!!R),E):t},E.touchable=function(R){return arguments.length?(u=typeof R=="function"?R:Vu(!!R),E):u},E.extent=function(R){return arguments.length?(i=typeof R=="function"?R:Vu([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),E):i},E.scaleExtent=function(R){return arguments.length?(s[0]=+R[0],s[1]=+R[1],E):[s[0],s[1]]},E.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],E):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},E.constrain=function(R){return arguments.length?(r=R,E):r},E.duration=function(R){return arguments.length?(d=+R,E):d},E.interpolate=function(R){return arguments.length?(m=R,E):m},E.on=function(){var R=p.on.apply(p,arguments);return R===p?E:R},E.clickDistance=function(R){return arguments.length?(C=(R=+R)*R,E):Math.sqrt(C)},E.tapDistance=function(R){return arguments.length?(M=+R,E):M},E}const qn={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:t=>`Node type "${t}" 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:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:i,sourceHandle:r,targetHandle:a})=>`Couldn't create edge for ${t} handle id: "${t==="source"?r:a}", edge id: ${i}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/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."},Ka=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Tx=["Enter"," ","Escape"],Ax={"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:t,x:i,y:r})=>`Moved selected node ${t}. New position, x: ${i}, y: ${r}`,"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 Tl;(function(t){t.Strict="strict",t.Loose="loose"})(Tl||(Tl={}));var Er;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(Er||(Er={}));var $a;(function(t){t.Partial="partial",t.Full="full"})($a||($a={}));const Mx={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Fi;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Fi||(Fi={}));var cs;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(cs||(cs={}));var xt;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(xt||(xt={}));const u0={[xt.Left]:xt.Right,[xt.Right]:xt.Left,[xt.Top]:xt.Bottom,[xt.Bottom]:xt.Top};function zx(t){return t===null?null:t?"valid":"invalid"}const Ox=t=>"id"in t&&"source"in t&&"target"in t,uN=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),mh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),lo=(t,i=[0,0])=>{const{width:r,height:a}=mi(t),u=t.origin??i,s=r*u[0],c=a*u[1];return{x:t.position.x-s,y:t.position.y-c}},sN=(t,i={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const r=t.reduce((a,u)=>{const s=typeof u=="string";let c=!i.nodeLookup&&!s?u:void 0;i.nodeLookup&&(c=s?i.nodeLookup.get(u):mh(u)?u:i.nodeLookup.get(u.id));const d=c?fs(c,i.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Es(a,d)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return _s(r)},ao=(t,i={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return t.forEach(u=>{(i.filter===void 0||i.filter(u))&&(r=Es(r,fs(u)),a=!0)}),a?_s(r):{x:0,y:0,width:0,height:0}},gh=(t,i,[r,a,u]=[0,0,1],s=!1,c=!1)=>{const d={...uo(i,[r,a,u]),width:i.width/u,height:i.height/u},m=[];for(const p of t.values()){const{measured:g,selectable:y=!0,hidden:v=!1}=p;if(c&&!y||v)continue;const x=g.width??p.width??p.initialWidth??null,S=g.height??p.height??p.initialHeight??null,C=Pa(d,Ml(p)),M=(x??0)*(S??0),E=s&&C>0;(!p.internals.handleBounds||E||C>=M||p.dragging)&&m.push(p)}return m},cN=(t,i)=>{const r=new Set;return t.forEach(a=>{r.add(a.id)}),i.filter(a=>r.has(a.source)||r.has(a.target))};function fN(t,i){const r=new Map,a=i?.nodes?new Set(i.nodes.map(u=>u.id)):null;return t.forEach(u=>{u.measured.width&&u.measured.height&&(i?.includeHiddenNodes||!u.hidden)&&(!a||a.has(u.id))&&r.set(u.id,u)}),r}async function dN({nodes:t,width:i,height:r,panZoom:a,minZoom:u,maxZoom:s},c){if(t.size===0)return Promise.resolve(!0);const d=fN(t,c),m=ao(d),p=yh(m,i,r,c?.minZoom??u,c?.maxZoom??s,c?.padding??.1);return await a.setViewport(p,{duration:c?.duration,ease:c?.ease,interpolate:c?.interpolate}),Promise.resolve(!0)}function Dx({nodeId:t,nextPosition:i,nodeLookup:r,nodeOrigin:a=[0,0],nodeExtent:u,onError:s}){const c=r.get(t),d=c.parentId?r.get(c.parentId):void 0,{x:m,y:p}=d?d.internals.positionAbsolute:{x:0,y:0},g=c.origin??a;let y=c.extent||u;if(c.extent==="parent"&&!c.expandParent)if(!d)s?.("005",qn.error005());else{const x=d.measured.width,S=d.measured.height;x&&S&&(y=[[m,p],[m+x,p+S]])}else d&&zl(c.extent)&&(y=[[c.extent[0][0]+m,c.extent[0][1]+p],[c.extent[1][0]+m,c.extent[1][1]+p]]);const v=zl(y)?Tr(i,y,c.measured):i;return(c.measured.width===void 0||c.measured.height===void 0)&&s?.("015",qn.error015()),{position:{x:v.x-m+(c.measured.width??0)*g[0],y:v.y-p+(c.measured.height??0)*g[1]},positionAbsolute:v}}async function hN({nodesToRemove:t=[],edgesToRemove:i=[],nodes:r,edges:a,onBeforeDelete:u}){const s=new Set(t.map(v=>v.id)),c=[];for(const v of r){if(v.deletable===!1)continue;const x=s.has(v.id),S=!x&&v.parentId&&c.find(C=>C.id===v.parentId);(x||S)&&c.push(v)}const d=new Set(i.map(v=>v.id)),m=a.filter(v=>v.deletable!==!1),g=cN(c,m);for(const v of m)d.has(v.id)&&!g.find(S=>S.id===v.id)&&g.push(v);if(!u)return{edges:g,nodes:c};const y=await u({nodes:c,edges:g});return typeof y=="boolean"?y?{edges:g,nodes:c}:{edges:[],nodes:[]}:y}const Al=(t,i=0,r=1)=>Math.min(Math.max(t,i),r),Tr=(t={x:0,y:0},i,r)=>({x:Al(t.x,i[0][0],i[1][0]-(r?.width??0)),y:Al(t.y,i[0][1],i[1][1]-(r?.height??0))});function kx(t,i,r){const{width:a,height:u}=mi(r),{x:s,y:c}=r.internals.positionAbsolute;return Tr(t,[[s,c],[s+a,c+u]],i)}const s0=(t,i,r)=>t<i?Al(Math.abs(t-i),1,i)/i:t>r?-Al(Math.abs(t-r),1,i)/i:0,Rx=(t,i,r=15,a=40)=>{const u=s0(t.x,a,i.width-a)*r,s=s0(t.y,a,i.height-a)*r;return[u,s]},Es=(t,i)=>({x:Math.min(t.x,i.x),y:Math.min(t.y,i.y),x2:Math.max(t.x2,i.x2),y2:Math.max(t.y2,i.y2)}),qd=({x:t,y:i,width:r,height:a})=>({x:t,y:i,x2:t+r,y2:i+a}),_s=({x:t,y:i,x2:r,y2:a})=>({x:t,y:i,width:r-t,height:a-i}),Ml=(t,i=[0,0])=>{const{x:r,y:a}=mh(t)?t.internals.positionAbsolute:lo(t,i);return{x:r,y:a,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},fs=(t,i=[0,0])=>{const{x:r,y:a}=mh(t)?t.internals.positionAbsolute:lo(t,i);return{x:r,y:a,x2:r+(t.measured?.width??t.width??t.initialWidth??0),y2:a+(t.measured?.height??t.height??t.initialHeight??0)}},Hx=(t,i)=>_s(Es(qd(t),qd(i))),Pa=(t,i)=>{const r=Math.max(0,Math.min(t.x+t.width,i.x+i.width)-Math.max(t.x,i.x)),a=Math.max(0,Math.min(t.y+t.height,i.y+i.height)-Math.max(t.y,i.y));return Math.ceil(r*a)},c0=t=>Tn(t.width)&&Tn(t.height)&&Tn(t.x)&&Tn(t.y),Tn=t=>!isNaN(t)&&isFinite(t),pN=(t,i)=>{},oo=(t,i=[1,1])=>({x:i[0]*Math.round(t.x/i[0]),y:i[1]*Math.round(t.y/i[1])}),uo=({x:t,y:i},[r,a,u],s=!1,c=[1,1])=>{const d={x:(t-r)/u,y:(i-a)/u};return s?oo(d,c):d},ds=({x:t,y:i},[r,a,u])=>({x:t*u+r,y:i*u+a});function gl(t,i){if(typeof t=="number")return Math.floor((i-i/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const r=parseFloat(t);if(!Number.isNaN(r))return Math.floor(r)}if(typeof t=="string"&&t.endsWith("%")){const r=parseFloat(t);if(!Number.isNaN(r))return Math.floor(i*r*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function mN(t,i,r){if(typeof t=="string"||typeof t=="number"){const a=gl(t,r),u=gl(t,i);return{top:a,right:u,bottom:a,left:u,x:u*2,y:a*2}}if(typeof t=="object"){const a=gl(t.top??t.y??0,r),u=gl(t.bottom??t.y??0,r),s=gl(t.left??t.x??0,i),c=gl(t.right??t.x??0,i);return{top:a,right:c,bottom:u,left:s,x:s+c,y:a+u}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function gN(t,i,r,a,u,s){const{x:c,y:d}=ds(t,[i,r,a]),{x:m,y:p}=ds({x:t.x+t.width,y:t.y+t.height},[i,r,a]),g=u-m,y=s-p;return{left:Math.floor(c),top:Math.floor(d),right:Math.floor(g),bottom:Math.floor(y)}}const yh=(t,i,r,a,u,s)=>{const c=mN(s,i,r),d=(i-c.x)/t.width,m=(r-c.y)/t.height,p=Math.min(d,m),g=Al(p,a,u),y=t.x+t.width/2,v=t.y+t.height/2,x=i/2-y*g,S=r/2-v*g,C=gN(t,x,S,g,i,r),M={left:Math.min(C.left-c.left,0),top:Math.min(C.top-c.top,0),right:Math.min(C.right-c.right,0),bottom:Math.min(C.bottom-c.bottom,0)};return{x:x-M.left+M.right,y:S-M.top+M.bottom,zoom:g}},Ja=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function zl(t){return t!=null&&t!=="parent"}function mi(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function jx(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function Lx(t,i={width:0,height:0},r,a,u){const s={...t},c=a.get(r);if(c){const d=c.origin||u;s.x+=c.internals.positionAbsolute.x-(i.width??0)*d[0],s.y+=c.internals.positionAbsolute.y-(i.height??0)*d[1]}return s}function f0(t,i){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}function yN(){let t,i;return{promise:new Promise((a,u)=>{t=a,i=u}),resolve:t,reject:i}}function vN(t){return{...Ax,...t||{}}}function Ua(t,{snapGrid:i=[0,0],snapToGrid:r=!1,transform:a,containerBounds:u}){const{x:s,y:c}=An(t),d=uo({x:s-(u?.left??0),y:c-(u?.top??0)},a),{x:m,y:p}=r?oo(d,i):d;return{xSnapped:m,ySnapped:p,...d}}const vh=t=>({width:t.offsetWidth,height:t.offsetHeight}),Bx=t=>t?.getRootNode?.()||window?.document,xN=["INPUT","SELECT","TEXTAREA"];function Ux(t){const i=t.composedPath?.()?.[0]||t.target;return i?.nodeType!==1?!1:xN.includes(i.nodeName)||i.hasAttribute("contenteditable")||!!i.closest(".nokey")}const qx=t=>"clientX"in t,An=(t,i)=>{const r=qx(t),a=r?t.clientX:t.touches?.[0].clientX,u=r?t.clientY:t.touches?.[0].clientY;return{x:a-(i?.left??0),y:u-(i?.top??0)}},d0=(t,i,r,a,u)=>{const s=i.querySelectorAll(`.${t}`);return!s||!s.length?null:Array.from(s).map(c=>{const d=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:t,nodeId:u,position:c.getAttribute("data-handlepos"),x:(d.left-r.left)/a,y:(d.top-r.top)/a,...vh(c)}})};function Vx({sourceX:t,sourceY:i,targetX:r,targetY:a,sourceControlX:u,sourceControlY:s,targetControlX:c,targetControlY:d}){const m=t*.125+u*.375+c*.375+r*.125,p=i*.125+s*.375+d*.375+a*.125,g=Math.abs(m-t),y=Math.abs(p-i);return[m,p,g,y]}function Iu(t,i){return t>=0?.5*t:i*25*Math.sqrt(-t)}function h0({pos:t,x1:i,y1:r,x2:a,y2:u,c:s}){switch(t){case xt.Left:return[i-Iu(i-a,s),r];case xt.Right:return[i+Iu(a-i,s),r];case xt.Top:return[i,r-Iu(r-u,s)];case xt.Bottom:return[i,r+Iu(u-r,s)]}}function Ix({sourceX:t,sourceY:i,sourcePosition:r=xt.Bottom,targetX:a,targetY:u,targetPosition:s=xt.Top,curvature:c=.25}){const[d,m]=h0({pos:r,x1:t,y1:i,x2:a,y2:u,c}),[p,g]=h0({pos:s,x1:a,y1:u,x2:t,y2:i,c}),[y,v,x,S]=Vx({sourceX:t,sourceY:i,targetX:a,targetY:u,sourceControlX:d,sourceControlY:m,targetControlX:p,targetControlY:g});return[`M${t},${i} C${d},${m} ${p},${g} ${a},${u}`,y,v,x,S]}function Yx({sourceX:t,sourceY:i,targetX:r,targetY:a}){const u=Math.abs(r-t)/2,s=r<t?r+u:r-u,c=Math.abs(a-i)/2,d=a<i?a+c:a-c;return[s,d,u,c]}function bN({sourceNode:t,targetNode:i,selected:r=!1,zIndex:a=0,elevateOnSelect:u=!1,zIndexMode:s="basic"}){if(s==="manual")return a;const c=u&&r?a+1e3:a,d=Math.max(t.parentId||u&&t.selected?t.internals.z:0,i.parentId||u&&i.selected?i.internals.z:0);return c+d}function SN({sourceNode:t,targetNode:i,width:r,height:a,transform:u}){const s=Es(fs(t),fs(i));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const c={x:-u[0]/u[2],y:-u[1]/u[2],width:r/u[2],height:a/u[2]};return Pa(c,_s(s))>0}const wN=({source:t,sourceHandle:i,target:r,targetHandle:a})=>`xy-edge__${t}${i||""}-${r}${a||""}`,EN=(t,i)=>i.some(r=>r.source===t.source&&r.target===t.target&&(r.sourceHandle===t.sourceHandle||!r.sourceHandle&&!t.sourceHandle)&&(r.targetHandle===t.targetHandle||!r.targetHandle&&!t.targetHandle)),_N=(t,i,r={})=>{if(!t.source||!t.target)return i;const a=r.getEdgeId||wN;let u;return Ox(t)?u={...t}:u={...t,id:a(t)},EN(u,i)?i:(u.sourceHandle===null&&delete u.sourceHandle,u.targetHandle===null&&delete u.targetHandle,i.concat(u))};function Qx({sourceX:t,sourceY:i,targetX:r,targetY:a}){const[u,s,c,d]=Yx({sourceX:t,sourceY:i,targetX:r,targetY:a});return[`M ${t},${i}L ${r},${a}`,u,s,c,d]}const p0={[xt.Left]:{x:-1,y:0},[xt.Right]:{x:1,y:0},[xt.Top]:{x:0,y:-1},[xt.Bottom]:{x:0,y:1}},CN=({source:t,sourcePosition:i=xt.Bottom,target:r})=>i===xt.Left||i===xt.Right?t.x<r.x?{x:1,y:0}:{x:-1,y:0}:t.y<r.y?{x:0,y:1}:{x:0,y:-1},m0=(t,i)=>Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));function NN({source:t,sourcePosition:i=xt.Bottom,target:r,targetPosition:a=xt.Top,center:u,offset:s,stepPosition:c}){const d=p0[i],m=p0[a],p={x:t.x+d.x*s,y:t.y+d.y*s},g={x:r.x+m.x*s,y:r.y+m.y*s},y=CN({source:p,sourcePosition:i,target:g}),v=y.x!==0?"x":"y",x=y[v];let S=[],C,M;const E={x:0,y:0},H={x:0,y:0},[,,w,k]=Yx({sourceX:t.x,sourceY:t.y,targetX:r.x,targetY:r.y});if(d[v]*m[v]===-1){v==="x"?(C=u.x??p.x+(g.x-p.x)*c,M=u.y??(p.y+g.y)/2):(C=u.x??(p.x+g.x)/2,M=u.y??p.y+(g.y-p.y)*c);const D=[{x:C,y:p.y},{x:C,y:g.y}],j=[{x:p.x,y:M},{x:g.x,y:M}];d[v]===x?S=v==="x"?D:j:S=v==="x"?j:D}else{const D=[{x:p.x,y:g.y}],j=[{x:g.x,y:p.y}];if(v==="x"?S=d.x===x?j:D:S=d.y===x?D:j,i===a){const G=Math.abs(t[v]-r[v]);if(G<=s){const nt=Math.min(s-1,s-G);d[v]===x?E[v]=(p[v]>t[v]?-1:1)*nt:H[v]=(g[v]>r[v]?-1:1)*nt}}if(i!==a){const G=v==="x"?"y":"x",nt=d[v]===m[G],R=p[G]>g[G],B=p[G]<g[G];(d[v]===1&&(!nt&&R||nt&&B)||d[v]!==1&&(!nt&&B||nt&&R))&&(S=v==="x"?D:j)}const q={x:p.x+E.x,y:p.y+E.y},Z={x:g.x+H.x,y:g.y+H.y},lt=Math.max(Math.abs(q.x-S[0].x),Math.abs(Z.x-S[0].x)),Q=Math.max(Math.abs(q.y-S[0].y),Math.abs(Z.y-S[0].y));lt>=Q?(C=(q.x+Z.x)/2,M=S[0].y):(C=S[0].x,M=(q.y+Z.y)/2)}return[[t,{x:p.x+E.x,y:p.y+E.y},...S,{x:g.x+H.x,y:g.y+H.y},r],C,M,w,k]}function TN(t,i,r,a){const u=Math.min(m0(t,i)/2,m0(i,r)/2,a),{x:s,y:c}=i;if(t.x===s&&s===r.x||t.y===c&&c===r.y)return`L${s} ${c}`;if(t.y===c){const p=t.x<r.x?-1:1,g=t.y<r.y?1:-1;return`L ${s+u*p},${c}Q ${s},${c} ${s},${c+u*g}`}const d=t.x<r.x?1:-1,m=t.y<r.y?-1:1;return`L ${s},${c+u*m}Q ${s},${c} ${s+u*d},${c}`}function Vd({sourceX:t,sourceY:i,sourcePosition:r=xt.Bottom,targetX:a,targetY:u,targetPosition:s=xt.Top,borderRadius:c=5,centerX:d,centerY:m,offset:p=20,stepPosition:g=.5}){const[y,v,x,S,C]=NN({source:{x:t,y:i},sourcePosition:r,target:{x:a,y:u},targetPosition:s,center:{x:d,y:m},offset:p,stepPosition:g});return[y.reduce((E,H,w)=>{let k="";return w>0&&w<y.length-1?k=TN(y[w-1],H,y[w+1],c):k=`${w===0?"M":"L"}${H.x} ${H.y}`,E+=k,E},""),v,x,S,C]}function g0(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function AN(t){const{sourceNode:i,targetNode:r}=t;if(!g0(i)||!g0(r))return null;const a=i.internals.handleBounds||y0(i.handles),u=r.internals.handleBounds||y0(r.handles),s=v0(a?.source??[],t.sourceHandle),c=v0(t.connectionMode===Tl.Strict?u?.target??[]:(u?.target??[]).concat(u?.source??[]),t.targetHandle);if(!s||!c)return t.onError?.("008",qn.error008(s?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const d=s?.position||xt.Bottom,m=c?.position||xt.Top,p=Ar(i,s,d),g=Ar(r,c,m);return{sourceX:p.x,sourceY:p.y,targetX:g.x,targetY:g.y,sourcePosition:d,targetPosition:m}}function y0(t){if(!t)return null;const i=[],r=[];for(const a of t)a.width=a.width??1,a.height=a.height??1,a.type==="source"?i.push(a):a.type==="target"&&r.push(a);return{source:i,target:r}}function Ar(t,i,r=xt.Left,a=!1){const u=(i?.x??0)+t.internals.positionAbsolute.x,s=(i?.y??0)+t.internals.positionAbsolute.y,{width:c,height:d}=i??mi(t);if(a)return{x:u+c/2,y:s+d/2};switch(i?.position??r){case xt.Top:return{x:u+c/2,y:s};case xt.Right:return{x:u+c,y:s+d/2};case xt.Bottom:return{x:u+c/2,y:s+d};case xt.Left:return{x:u,y:s+d/2}}}function v0(t,i){return t&&(i?t.find(r=>r.id===i):t[0])||null}function Id(t,i){return t?typeof t=="string"?t:`${i?`${i}__`:""}${Object.keys(t).sort().map(a=>`${a}=${t[a]}`).join("&")}`:""}function MN(t,{id:i,defaultColor:r,defaultMarkerStart:a,defaultMarkerEnd:u}){const s=new Set;return t.reduce((c,d)=>([d.markerStart||a,d.markerEnd||u].forEach(m=>{if(m&&typeof m=="object"){const p=Id(m,i);s.has(p)||(c.push({id:p,color:m.color||r,...m}),s.add(p))}}),c),[]).sort((c,d)=>c.id.localeCompare(d.id))}const Xx=1e3,zN=10,xh={nodeOrigin:[0,0],nodeExtent:Ka,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},ON={...xh,checkEquality:!0};function bh(t,i){const r={...t};for(const a in i)i[a]!==void 0&&(r[a]=i[a]);return r}function DN(t,i,r){const a=bh(xh,r);for(const u of t.values())if(u.parentId)wh(u,t,i,a);else{const s=lo(u,a.nodeOrigin),c=zl(u.extent)?u.extent:a.nodeExtent,d=Tr(s,c,mi(u));u.internals.positionAbsolute=d}}function kN(t,i){if(!t.handles)return t.measured?i?.internals.handleBounds:void 0;const r=[],a=[];for(const u of t.handles){const s={id:u.id,width:u.width??1,height:u.height??1,nodeId:t.id,x:u.x,y:u.y,position:u.position,type:u.type};u.type==="source"?r.push(s):u.type==="target"&&a.push(s)}return{source:r,target:a}}function Sh(t){return t==="manual"}function Yd(t,i,r,a={}){const u=bh(ON,a),s={i:0},c=new Map(i),d=u?.elevateNodesOnSelect&&!Sh(u.zIndexMode)?Xx:0;let m=t.length>0;i.clear(),r.clear();for(const p of t){let g=c.get(p.id);if(u.checkEquality&&p===g?.internals.userNode)i.set(p.id,g);else{const y=lo(p,u.nodeOrigin),v=zl(p.extent)?p.extent:u.nodeExtent,x=Tr(y,v,mi(p));g={...u.defaults,...p,measured:{width:p.measured?.width,height:p.measured?.height},internals:{positionAbsolute:x,handleBounds:kN(p,g),z:Gx(p,d,u.zIndexMode),userNode:p}},i.set(p.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(m=!1),p.parentId&&wh(g,i,r,a,s)}return m}function RN(t,i){if(!t.parentId)return;const r=i.get(t.parentId);r?r.set(t.id,t):i.set(t.parentId,new Map([[t.id,t]]))}function wh(t,i,r,a,u){const{elevateNodesOnSelect:s,nodeOrigin:c,nodeExtent:d,zIndexMode:m}=bh(xh,a),p=t.parentId,g=i.get(p);if(!g){console.warn(`Parent node ${p} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}RN(t,r),u&&!g.parentId&&g.internals.rootParentIndex===void 0&&m==="auto"&&(g.internals.rootParentIndex=++u.i,g.internals.z=g.internals.z+u.i*zN),u&&g.internals.rootParentIndex!==void 0&&(u.i=g.internals.rootParentIndex);const y=s&&!Sh(m)?Xx:0,{x:v,y:x,z:S}=HN(t,g,c,d,y,m),{positionAbsolute:C}=t.internals,M=v!==C.x||x!==C.y;(M||S!==t.internals.z)&&i.set(t.id,{...t,internals:{...t.internals,positionAbsolute:M?{x:v,y:x}:C,z:S}})}function Gx(t,i,r){const a=Tn(t.zIndex)?t.zIndex:0;return Sh(r)?a:a+(t.selected?i:0)}function HN(t,i,r,a,u,s){const{x:c,y:d}=i.internals.positionAbsolute,m=mi(t),p=lo(t,r),g=zl(t.extent)?Tr(p,t.extent,m):p;let y=Tr({x:c+g.x,y:d+g.y},a,m);t.extent==="parent"&&(y=kx(y,m,i));const v=Gx(t,u,s),x=i.internals.z??0;return{x:y.x,y:y.y,z:x>=v?x+1:v}}function Eh(t,i,r,a=[0,0]){const u=[],s=new Map;for(const c of t){const d=i.get(c.parentId);if(!d)continue;const m=s.get(c.parentId)?.expandedRect??Ml(d),p=Hx(m,c.rect);s.set(c.parentId,{expandedRect:p,parent:d})}return s.size>0&&s.forEach(({expandedRect:c,parent:d},m)=>{const p=d.internals.positionAbsolute,g=mi(d),y=d.origin??a,v=c.x<p.x?Math.round(Math.abs(p.x-c.x)):0,x=c.y<p.y?Math.round(Math.abs(p.y-c.y)):0,S=Math.max(g.width,Math.round(c.width)),C=Math.max(g.height,Math.round(c.height)),M=(S-g.width)*y[0],E=(C-g.height)*y[1];(v>0||x>0||M||E)&&(u.push({id:m,type:"position",position:{x:d.position.x-v+M,y:d.position.y-x+E}}),r.get(m)?.forEach(H=>{t.some(w=>w.id===H.id)||u.push({id:H.id,type:"position",position:{x:H.position.x+v,y:H.position.y+x}})})),(g.width<c.width||g.height<c.height||v||x)&&u.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:S+(v?y[0]*v-M:0),height:C+(x?y[1]*x-E:0)}})}),u}function jN(t,i,r,a,u,s,c){const d=a?.querySelector(".xyflow__viewport");let m=!1;if(!d)return{changes:[],updatedInternals:m};const p=[],g=window.getComputedStyle(d),{m22:y}=new window.DOMMatrixReadOnly(g.transform),v=[];for(const x of t.values()){const S=i.get(x.id);if(!S)continue;if(S.hidden){i.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),m=!0;continue}const C=vh(x.nodeElement),M=S.measured.width!==C.width||S.measured.height!==C.height;if(!!(C.width&&C.height&&(M||!S.internals.handleBounds||x.force))){const H=x.nodeElement.getBoundingClientRect(),w=zl(S.extent)?S.extent:s;let{positionAbsolute:k}=S.internals;S.parentId&&S.extent==="parent"?k=kx(k,C,i.get(S.parentId)):w&&(k=Tr(k,w,C));const I={...S,measured:C,internals:{...S.internals,positionAbsolute:k,handleBounds:{source:d0("source",x.nodeElement,H,y,S.id),target:d0("target",x.nodeElement,H,y,S.id)}}};i.set(S.id,I),S.parentId&&wh(I,i,r,{nodeOrigin:u,zIndexMode:c}),m=!0,M&&(p.push({id:S.id,type:"dimensions",dimensions:C}),S.expandParent&&S.parentId&&v.push({id:S.id,parentId:S.parentId,rect:Ml(I,u)}))}}if(v.length>0){const x=Eh(v,i,r,u);p.push(...x)}return{changes:p,updatedInternals:m}}async function LN({delta:t,panZoom:i,transform:r,translateExtent:a,width:u,height:s}){if(!i||!t.x&&!t.y)return Promise.resolve(!1);const c=await i.setViewportConstrained({x:r[0]+t.x,y:r[1]+t.y,zoom:r[2]},[[0,0],[u,s]],a),d=!!c&&(c.x!==r[0]||c.y!==r[1]||c.k!==r[2]);return Promise.resolve(d)}function x0(t,i,r,a,u,s){let c=u;const d=a.get(c)||new Map;a.set(c,d.set(r,i)),c=`${u}-${t}`;const m=a.get(c)||new Map;if(a.set(c,m.set(r,i)),s){c=`${u}-${t}-${s}`;const p=a.get(c)||new Map;a.set(c,p.set(r,i))}}function Zx(t,i,r){t.clear(),i.clear();for(const a of r){const{source:u,target:s,sourceHandle:c=null,targetHandle:d=null}=a,m={edgeId:a.id,source:u,target:s,sourceHandle:c,targetHandle:d},p=`${u}-${c}--${s}-${d}`,g=`${s}-${d}--${u}-${c}`;x0("source",m,g,t,u,c),x0("target",m,p,t,s,d),i.set(a.id,a)}}function Fx(t,i){if(!t.parentId)return!1;const r=i.get(t.parentId);return r?r.selected?!0:Fx(r,i):!1}function b0(t,i,r){let a=t;do{if(a?.matches?.(i))return!0;if(a===r)return!1;a=a?.parentElement}while(a);return!1}function BN(t,i,r,a){const u=new Map;for(const[s,c]of t)if((c.selected||c.id===a)&&(!c.parentId||!Fx(c,t))&&(c.draggable||i&&typeof c.draggable>"u")){const d=t.get(s);d&&u.set(s,{id:s,position:d.position||{x:0,y:0},distance:{x:r.x-d.internals.positionAbsolute.x,y:r.y-d.internals.positionAbsolute.y},extent:d.extent,parentId:d.parentId,origin:d.origin,expandParent:d.expandParent,internals:{positionAbsolute:d.internals.positionAbsolute||{x:0,y:0}},measured:{width:d.measured.width??0,height:d.measured.height??0}})}return u}function id({nodeId:t,dragItems:i,nodeLookup:r,dragging:a=!0}){const u=[];for(const[c,d]of i){const m=r.get(c)?.internals.userNode;m&&u.push({...m,position:d.position,dragging:a})}if(!t)return[u[0],u];const s=r.get(t)?.internals.userNode;return[s?{...s,position:i.get(t)?.position||s.position,dragging:a}:u[0],u]}function UN({dragItems:t,snapGrid:i,x:r,y:a}){const u=t.values().next().value;if(!u)return null;const s={x:r-u.distance.x,y:a-u.distance.y},c=oo(s,i);return{x:c.x-s.x,y:c.y-s.y}}function qN({onNodeMouseDown:t,getStoreItems:i,onDragStart:r,onDrag:a,onDragStop:u}){let s={x:null,y:null},c=0,d=new Map,m=!1,p={x:0,y:0},g=null,y=!1,v=null,x=!1,S=!1,C=null;function M({noDragClassName:H,handleSelector:w,domNode:k,isSelectable:I,nodeId:D,nodeClickDistance:j=0}){v=an(k);function q({x:G,y:nt}){const{nodeLookup:R,nodeExtent:B,snapGrid:A,snapToGrid:L,nodeOrigin:Y,onNodeDrag:K,onSelectionDrag:T,onError:O,updateNodePositions:V}=i();s={x:G,y:nt};let N=!1;const et=d.size>1,st=et&&B?qd(ao(d)):null,ct=et&&L?UN({dragItems:d,snapGrid:A,x:G,y:nt}):null;for(const[dt,ut]of d){if(!R.has(dt))continue;let pt={x:G-ut.distance.x,y:nt-ut.distance.y};L&&(pt=ct?{x:Math.round(pt.x+ct.x),y:Math.round(pt.y+ct.y)}:oo(pt,A));let wt=null;if(et&&B&&!ut.extent&&st){const{positionAbsolute:Et}=ut.internals,Ot=Et.x-st.x+B[0][0],It=Et.x+ut.measured.width-st.x2+B[1][0],Ut=Et.y-st.y+B[0][1],oe=Et.y+ut.measured.height-st.y2+B[1][1];wt=[[Ot,Ut],[It,oe]]}const{position:_t,positionAbsolute:vt}=Dx({nodeId:dt,nextPosition:pt,nodeLookup:R,nodeExtent:wt||B,nodeOrigin:Y,onError:O});N=N||ut.position.x!==_t.x||ut.position.y!==_t.y,ut.position=_t,ut.internals.positionAbsolute=vt}if(S=S||N,!!N&&(V(d,!0),C&&(a||K||!D&&T))){const[dt,ut]=id({nodeId:D,dragItems:d,nodeLookup:R});a?.(C,d,dt,ut),K?.(C,dt,ut),D||T?.(C,ut)}}async function Z(){if(!g)return;const{transform:G,panBy:nt,autoPanSpeed:R,autoPanOnNodeDrag:B}=i();if(!B){m=!1,cancelAnimationFrame(c);return}const[A,L]=Rx(p,g,R);(A!==0||L!==0)&&(s.x=(s.x??0)-A/G[2],s.y=(s.y??0)-L/G[2],await nt({x:A,y:L})&&q(s)),c=requestAnimationFrame(Z)}function lt(G){const{nodeLookup:nt,multiSelectionActive:R,nodesDraggable:B,transform:A,snapGrid:L,snapToGrid:Y,selectNodesOnDrag:K,onNodeDragStart:T,onSelectionDragStart:O,unselectNodesAndEdges:V}=i();y=!0,(!K||!I)&&!R&&D&&(nt.get(D)?.selected||V()),I&&K&&D&&t?.(D);const N=Ua(G.sourceEvent,{transform:A,snapGrid:L,snapToGrid:Y,containerBounds:g});if(s=N,d=BN(nt,B,N,D),d.size>0&&(r||T||!D&&O)){const[et,st]=id({nodeId:D,dragItems:d,nodeLookup:nt});r?.(G.sourceEvent,d,et,st),T?.(G.sourceEvent,et,st),D||O?.(G.sourceEvent,st)}}const Q=fx().clickDistance(j).on("start",G=>{const{domNode:nt,nodeDragThreshold:R,transform:B,snapGrid:A,snapToGrid:L}=i();g=nt?.getBoundingClientRect()||null,x=!1,S=!1,C=G.sourceEvent,R===0&&lt(G),s=Ua(G.sourceEvent,{transform:B,snapGrid:A,snapToGrid:L,containerBounds:g}),p=An(G.sourceEvent,g)}).on("drag",G=>{const{autoPanOnNodeDrag:nt,transform:R,snapGrid:B,snapToGrid:A,nodeDragThreshold:L,nodeLookup:Y}=i(),K=Ua(G.sourceEvent,{transform:R,snapGrid:B,snapToGrid:A,containerBounds:g});if(C=G.sourceEvent,(G.sourceEvent.type==="touchmove"&&G.sourceEvent.touches.length>1||D&&!Y.has(D))&&(x=!0),!x){if(!m&&nt&&y&&(m=!0,Z()),!y){const T=An(G.sourceEvent,g),O=T.x-p.x,V=T.y-p.y;Math.sqrt(O*O+V*V)>L&&lt(G)}(s.x!==K.xSnapped||s.y!==K.ySnapped)&&d&&y&&(p=An(G.sourceEvent,g),q(K))}}).on("end",G=>{if(!(!y||x)&&(m=!1,y=!1,cancelAnimationFrame(c),d.size>0)){const{nodeLookup:nt,updateNodePositions:R,onNodeDragStop:B,onSelectionDragStop:A}=i();if(S&&(R(d,!1),S=!1),u||B||!D&&A){const[L,Y]=id({nodeId:D,dragItems:d,nodeLookup:nt,dragging:!1});u?.(G.sourceEvent,d,L,Y),B?.(G.sourceEvent,L,Y),D||A?.(G.sourceEvent,Y)}}}).filter(G=>{const nt=G.target;return!G.button&&(!H||!b0(nt,`.${H}`,k))&&(!w||b0(nt,w,k))});v.call(Q)}function E(){v?.on(".drag",null)}return{update:M,destroy:E}}function VN(t,i,r){const a=[],u={x:t.x-r,y:t.y-r,width:r*2,height:r*2};for(const s of i.values())Pa(u,Ml(s))>0&&a.push(s);return a}const IN=250;function YN(t,i,r,a){let u=[],s=1/0;const c=VN(t,r,i+IN);for(const d of c){const m=[...d.internals.handleBounds?.source??[],...d.internals.handleBounds?.target??[]];for(const p of m){if(a.nodeId===p.nodeId&&a.type===p.type&&a.id===p.id)continue;const{x:g,y}=Ar(d,p,p.position,!0),v=Math.sqrt(Math.pow(g-t.x,2)+Math.pow(y-t.y,2));v>i||(v<s?(u=[{...p,x:g,y}],s=v):v===s&&u.push({...p,x:g,y}))}}if(!u.length)return null;if(u.length>1){const d=a.type==="source"?"target":"source";return u.find(m=>m.type===d)??u[0]}return u[0]}function Kx(t,i,r,a,u,s=!1){const c=a.get(t);if(!c)return null;const d=u==="strict"?c.internals.handleBounds?.[i]:[...c.internals.handleBounds?.source??[],...c.internals.handleBounds?.target??[]],m=(r?d?.find(p=>p.id===r):d?.[0])??null;return m&&s?{...m,...Ar(c,m,m.position,!0)}:m}function $x(t,i){return t||(i?.classList.contains("target")?"target":i?.classList.contains("source")?"source":null)}function QN(t,i){let r=null;return i?r=!0:t&&!i&&(r=!1),r}const Px=()=>!0;function XN(t,{connectionMode:i,connectionRadius:r,handleId:a,nodeId:u,edgeUpdaterType:s,isTarget:c,domNode:d,nodeLookup:m,lib:p,autoPanOnConnect:g,flowId:y,panBy:v,cancelConnection:x,onConnectStart:S,onConnect:C,onConnectEnd:M,isValidConnection:E=Px,onReconnectEnd:H,updateConnection:w,getTransform:k,getFromHandle:I,autoPanSpeed:D,dragThreshold:j=1,handleDomNode:q}){const Z=Bx(t.target);let lt=0,Q;const{x:G,y:nt}=An(t),R=$x(s,q),B=d?.getBoundingClientRect();let A=!1;if(!B||!R)return;const L=Kx(u,R,a,m,i);if(!L)return;let Y=An(t,B),K=!1,T=null,O=!1,V=null;function N(){if(!g||!B)return;const[_t,vt]=Rx(Y,B,D);v({x:_t,y:vt}),lt=requestAnimationFrame(N)}const et={...L,nodeId:u,type:R,position:L.position},st=m.get(u);let dt={inProgress:!0,isValid:null,from:Ar(st,et,xt.Left,!0),fromHandle:et,fromPosition:et.position,fromNode:st,to:Y,toHandle:null,toPosition:u0[et.position],toNode:null,pointer:Y};function ut(){A=!0,w(dt),S?.(t,{nodeId:u,handleId:a,handleType:R})}j===0&&ut();function pt(_t){if(!A){const{x:oe,y:Ke}=An(_t),Ae=oe-G,He=Ke-nt;if(!(Ae*Ae+He*He>j*j))return;ut()}if(!I()||!et){wt(_t);return}const vt=k();Y=An(_t,B),Q=YN(uo(Y,vt,!1,[1,1]),r,m,et),K||(N(),K=!0);const Et=Jx(_t,{handle:Q,connectionMode:i,fromNodeId:u,fromHandleId:a,fromType:c?"target":"source",isValidConnection:E,doc:Z,lib:p,flowId:y,nodeLookup:m});V=Et.handleDomNode,T=Et.connection,O=QN(!!Q,Et.isValid);const Ot=m.get(u),It=Ot?Ar(Ot,et,xt.Left,!0):dt.from,Ut={...dt,from:It,isValid:O,to:Et.toHandle&&O?ds({x:Et.toHandle.x,y:Et.toHandle.y},vt):Y,toHandle:Et.toHandle,toPosition:O&&Et.toHandle?Et.toHandle.position:u0[et.position],toNode:Et.toHandle?m.get(Et.toHandle.nodeId):null,pointer:Y};w(Ut),dt=Ut}function wt(_t){if(!("touches"in _t&&_t.touches.length>0)){if(A){(Q||V)&&T&&O&&C?.(T);const{inProgress:vt,...Et}=dt,Ot={...Et,toPosition:dt.toHandle?dt.toPosition:null};M?.(_t,Ot),s&&H?.(_t,Ot)}x(),cancelAnimationFrame(lt),K=!1,O=!1,T=null,V=null,Z.removeEventListener("mousemove",pt),Z.removeEventListener("mouseup",wt),Z.removeEventListener("touchmove",pt),Z.removeEventListener("touchend",wt)}}Z.addEventListener("mousemove",pt),Z.addEventListener("mouseup",wt),Z.addEventListener("touchmove",pt),Z.addEventListener("touchend",wt)}function Jx(t,{handle:i,connectionMode:r,fromNodeId:a,fromHandleId:u,fromType:s,doc:c,lib:d,flowId:m,isValidConnection:p=Px,nodeLookup:g}){const y=s==="target",v=i?c.querySelector(`.${d}-flow__handle[data-id="${m}-${i?.nodeId}-${i?.id}-${i?.type}"]`):null,{x,y:S}=An(t),C=c.elementFromPoint(x,S),M=C?.classList.contains(`${d}-flow__handle`)?C:v,E={handleDomNode:M,isValid:!1,connection:null,toHandle:null};if(M){const H=$x(void 0,M),w=M.getAttribute("data-nodeid"),k=M.getAttribute("data-handleid"),I=M.classList.contains("connectable"),D=M.classList.contains("connectableend");if(!w||!H)return E;const j={source:y?w:a,sourceHandle:y?k:u,target:y?a:w,targetHandle:y?u:k};E.connection=j;const Z=I&&D&&(r===Tl.Strict?y&&H==="source"||!y&&H==="target":w!==a||k!==u);E.isValid=Z&&p(j),E.toHandle=Kx(w,H,k,g,r,!0)}return E}const Qd={onPointerDown:XN,isValid:Jx};function GN({domNode:t,panZoom:i,getTransform:r,getViewScale:a}){const u=an(t);function s({translateExtent:d,width:m,height:p,zoomStep:g=1,pannable:y=!0,zoomable:v=!0,inversePan:x=!1}){const S=w=>{if(w.sourceEvent.type!=="wheel"||!i)return;const k=r(),I=w.sourceEvent.ctrlKey&&Ja()?10:1,D=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*g,j=k[2]*Math.pow(2,D*I);i.scaleTo(j)};let C=[0,0];const M=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(C=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},E=w=>{const k=r();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!i)return;const I=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],D=[I[0]-C[0],I[1]-C[1]];C=I;const j=a()*Math.max(k[2],Math.log(k[2]))*(x?-1:1),q={x:k[0]-D[0]*j,y:k[1]-D[1]*j},Z=[[0,0],[m,p]];i.setViewportConstrained({x:q.x,y:q.y,zoom:k[2]},Z,d)},H=Nx().on("start",M).on("zoom",y?E:null).on("zoom.wheel",v?S:null);u.call(H,{})}function c(){u.on("zoom",null)}return{update:s,destroy:c,pointer:Cn}}const Cs=t=>({x:t.x,y:t.y,zoom:t.k}),rd=({x:t,y:i,zoom:r})=>ws.translate(t,i).scale(r),xl=(t,i)=>t.target.closest(`.${i}`),Wx=(t,i)=>i===2&&Array.isArray(t)&&t.includes(2),ZN=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,ld=(t,i=0,r=ZN,a=()=>{})=>{const u=typeof i=="number"&&i>0;return u||a(),u?t.transition().duration(i).ease(r).on("end",a):t},t1=t=>{const i=t.ctrlKey&&Ja()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*i};function FN({zoomPanValues:t,noWheelClassName:i,d3Selection:r,d3Zoom:a,panOnScrollMode:u,panOnScrollSpeed:s,zoomOnPinch:c,onPanZoomStart:d,onPanZoom:m,onPanZoomEnd:p}){return g=>{if(xl(g,i))return g.ctrlKey&&g.preventDefault(),!1;g.preventDefault(),g.stopImmediatePropagation();const y=r.property("__zoom").k||1;if(g.ctrlKey&&c){const M=Cn(g),E=t1(g),H=y*Math.pow(2,E);a.scaleTo(r,H,M,g);return}const v=g.deltaMode===1?20:1;let x=u===Er.Vertical?0:g.deltaX*v,S=u===Er.Horizontal?0:g.deltaY*v;!Ja()&&g.shiftKey&&u!==Er.Vertical&&(x=g.deltaY*v,S=0),a.translateBy(r,-(x/y)*s,-(S/y)*s,{internal:!0});const C=Cs(r.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(m?.(g,C),t.panScrollTimeout=setTimeout(()=>{p?.(g,C),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,d?.(g,C))}}function KN({noWheelClassName:t,preventScrolling:i,d3ZoomHandler:r}){return function(a,u){const s=a.type==="wheel",c=!i&&s&&!a.ctrlKey,d=xl(a,t);if(a.ctrlKey&&s&&d&&a.preventDefault(),c||d)return null;a.preventDefault(),r.call(this,a,u)}}function $N({zoomPanValues:t,onDraggingChange:i,onPanZoomStart:r}){return a=>{if(a.sourceEvent?.internal)return;const u=Cs(a.transform);t.mouseButton=a.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=u,a.sourceEvent?.type==="mousedown"&&i(!0),r&&r?.(a.sourceEvent,u)}}function PN({zoomPanValues:t,panOnDrag:i,onPaneContextMenu:r,onTransformChange:a,onPanZoom:u}){return s=>{t.usedRightMouseButton=!!(r&&Wx(i,t.mouseButton??0)),s.sourceEvent?.sync||a([s.transform.x,s.transform.y,s.transform.k]),u&&!s.sourceEvent?.internal&&u?.(s.sourceEvent,Cs(s.transform))}}function JN({zoomPanValues:t,panOnDrag:i,panOnScroll:r,onDraggingChange:a,onPanZoomEnd:u,onPaneContextMenu:s}){return c=>{if(!c.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,s&&Wx(i,t.mouseButton??0)&&!t.usedRightMouseButton&&c.sourceEvent&&s(c.sourceEvent),t.usedRightMouseButton=!1,a(!1),u)){const d=Cs(c.transform);t.prevViewport=d,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{u?.(c.sourceEvent,d)},r?150:0)}}}function WN({zoomActivationKeyPressed:t,zoomOnScroll:i,zoomOnPinch:r,panOnDrag:a,panOnScroll:u,zoomOnDoubleClick:s,userSelectionActive:c,noWheelClassName:d,noPanClassName:m,lib:p,connectionInProgress:g}){return y=>{const v=t||i,x=r&&y.ctrlKey,S=y.type==="wheel";if(y.button===1&&y.type==="mousedown"&&(xl(y,`${p}-flow__node`)||xl(y,`${p}-flow__edge`)))return!0;if(!a&&!v&&!u&&!s&&!r||c||g&&!S||xl(y,d)&&S||xl(y,m)&&(!S||u&&S&&!t)||!r&&y.ctrlKey&&S)return!1;if(!r&&y.type==="touchstart"&&y.touches?.length>1)return y.preventDefault(),!1;if(!v&&!u&&!x&&S||!a&&(y.type==="mousedown"||y.type==="touchstart")||Array.isArray(a)&&!a.includes(y.button)&&y.type==="mousedown")return!1;const C=Array.isArray(a)&&a.includes(y.button)||!y.button||y.button<=1;return(!y.ctrlKey||S)&&C}}function tT({domNode:t,minZoom:i,maxZoom:r,translateExtent:a,viewport:u,onPanZoom:s,onPanZoomStart:c,onPanZoomEnd:d,onDraggingChange:m}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},g=t.getBoundingClientRect(),y=Nx().scaleExtent([i,r]).translateExtent(a),v=an(t).call(y);H({x:u.x,y:u.y,zoom:Al(u.zoom,i,r)},[[0,0],[g.width,g.height]],a);const x=v.on("wheel.zoom"),S=v.on("dblclick.zoom");y.wheelDelta(t1);function C(Q,G){return v?new Promise(nt=>{y?.interpolate(G?.interpolate==="linear"?Ba:Pu).transform(ld(v,G?.duration,G?.ease,()=>nt(!0)),Q)}):Promise.resolve(!1)}function M({noWheelClassName:Q,noPanClassName:G,onPaneContextMenu:nt,userSelectionActive:R,panOnScroll:B,panOnDrag:A,panOnScrollMode:L,panOnScrollSpeed:Y,preventScrolling:K,zoomOnPinch:T,zoomOnScroll:O,zoomOnDoubleClick:V,zoomActivationKeyPressed:N,lib:et,onTransformChange:st,connectionInProgress:ct,paneClickDistance:dt,selectionOnDrag:ut}){R&&!p.isZoomingOrPanning&&E();const pt=B&&!N&&!R;y.clickDistance(ut?1/0:!Tn(dt)||dt<0?0:dt);const wt=pt?FN({zoomPanValues:p,noWheelClassName:Q,d3Selection:v,d3Zoom:y,panOnScrollMode:L,panOnScrollSpeed:Y,zoomOnPinch:T,onPanZoomStart:c,onPanZoom:s,onPanZoomEnd:d}):KN({noWheelClassName:Q,preventScrolling:K,d3ZoomHandler:x});if(v.on("wheel.zoom",wt,{passive:!1}),!R){const vt=$N({zoomPanValues:p,onDraggingChange:m,onPanZoomStart:c});y.on("start",vt);const Et=PN({zoomPanValues:p,panOnDrag:A,onPaneContextMenu:!!nt,onPanZoom:s,onTransformChange:st});y.on("zoom",Et);const Ot=JN({zoomPanValues:p,panOnDrag:A,panOnScroll:B,onPaneContextMenu:nt,onPanZoomEnd:d,onDraggingChange:m});y.on("end",Ot)}const _t=WN({zoomActivationKeyPressed:N,panOnDrag:A,zoomOnScroll:O,panOnScroll:B,zoomOnDoubleClick:V,zoomOnPinch:T,userSelectionActive:R,noPanClassName:G,noWheelClassName:Q,lib:et,connectionInProgress:ct});y.filter(_t),V?v.on("dblclick.zoom",S):v.on("dblclick.zoom",null)}function E(){y.on("zoom",null)}async function H(Q,G,nt){const R=rd(Q),B=y?.constrain()(R,G,nt);return B&&await C(B),new Promise(A=>A(B))}async function w(Q,G){const nt=rd(Q);return await C(nt,G),new Promise(R=>R(nt))}function k(Q){if(v){const G=rd(Q),nt=v.property("__zoom");(nt.k!==Q.zoom||nt.x!==Q.x||nt.y!==Q.y)&&y?.transform(v,G,null,{sync:!0})}}function I(){const Q=v?Cx(v.node()):{x:0,y:0,k:1};return{x:Q.x,y:Q.y,zoom:Q.k}}function D(Q,G){return v?new Promise(nt=>{y?.interpolate(G?.interpolate==="linear"?Ba:Pu).scaleTo(ld(v,G?.duration,G?.ease,()=>nt(!0)),Q)}):Promise.resolve(!1)}function j(Q,G){return v?new Promise(nt=>{y?.interpolate(G?.interpolate==="linear"?Ba:Pu).scaleBy(ld(v,G?.duration,G?.ease,()=>nt(!0)),Q)}):Promise.resolve(!1)}function q(Q){y?.scaleExtent(Q)}function Z(Q){y?.translateExtent(Q)}function lt(Q){const G=!Tn(Q)||Q<0?0:Q;y?.clickDistance(G)}return{update:M,destroy:E,setViewport:w,setViewportConstrained:H,getViewport:I,scaleTo:D,scaleBy:j,setScaleExtent:q,setTranslateExtent:Z,syncViewport:k,setClickDistance:lt}}var Ol;(function(t){t.Line="line",t.Handle="handle"})(Ol||(Ol={}));function eT({width:t,prevWidth:i,height:r,prevHeight:a,affectsX:u,affectsY:s}){const c=t-i,d=r-a,m=[c>0?1:c<0?-1:0,d>0?1:d<0?-1:0];return c&&u&&(m[0]=m[0]*-1),d&&s&&(m[1]=m[1]*-1),m}function S0(t){const i=t.includes("right")||t.includes("left"),r=t.includes("bottom")||t.includes("top"),a=t.includes("left"),u=t.includes("top");return{isHorizontal:i,isVertical:r,affectsX:a,affectsY:u}}function Xi(t,i){return Math.max(0,i-t)}function Gi(t,i){return Math.max(0,t-i)}function Yu(t,i,r){return Math.max(0,i-t,t-r)}function w0(t,i){return t?!i:i}function nT(t,i,r,a,u,s,c,d){let{affectsX:m,affectsY:p}=i;const{isHorizontal:g,isVertical:y}=i,v=g&&y,{xSnapped:x,ySnapped:S}=r,{minWidth:C,maxWidth:M,minHeight:E,maxHeight:H}=a,{x:w,y:k,width:I,height:D,aspectRatio:j}=t;let q=Math.floor(g?x-t.pointerX:0),Z=Math.floor(y?S-t.pointerY:0);const lt=I+(m?-q:q),Q=D+(p?-Z:Z),G=-s[0]*I,nt=-s[1]*D;let R=Yu(lt,C,M),B=Yu(Q,E,H);if(c){let Y=0,K=0;m&&q<0?Y=Xi(w+q+G,c[0][0]):!m&&q>0&&(Y=Gi(w+lt+G,c[1][0])),p&&Z<0?K=Xi(k+Z+nt,c[0][1]):!p&&Z>0&&(K=Gi(k+Q+nt,c[1][1])),R=Math.max(R,Y),B=Math.max(B,K)}if(d){let Y=0,K=0;m&&q>0?Y=Gi(w+q,d[0][0]):!m&&q<0&&(Y=Xi(w+lt,d[1][0])),p&&Z>0?K=Gi(k+Z,d[0][1]):!p&&Z<0&&(K=Xi(k+Q,d[1][1])),R=Math.max(R,Y),B=Math.max(B,K)}if(u){if(g){const Y=Yu(lt/j,E,H)*j;if(R=Math.max(R,Y),c){let K=0;!m&&!p||m&&!p&&v?K=Gi(k+nt+lt/j,c[1][1])*j:K=Xi(k+nt+(m?q:-q)/j,c[0][1])*j,R=Math.max(R,K)}if(d){let K=0;!m&&!p||m&&!p&&v?K=Xi(k+lt/j,d[1][1])*j:K=Gi(k+(m?q:-q)/j,d[0][1])*j,R=Math.max(R,K)}}if(y){const Y=Yu(Q*j,C,M)/j;if(B=Math.max(B,Y),c){let K=0;!m&&!p||p&&!m&&v?K=Gi(w+Q*j+G,c[1][0])/j:K=Xi(w+(p?Z:-Z)*j+G,c[0][0])/j,B=Math.max(B,K)}if(d){let K=0;!m&&!p||p&&!m&&v?K=Xi(w+Q*j,d[1][0])/j:K=Gi(w+(p?Z:-Z)*j,d[0][0])/j,B=Math.max(B,K)}}}Z=Z+(Z<0?B:-B),q=q+(q<0?R:-R),u&&(v?lt>Q*j?Z=(w0(m,p)?-q:q)/j:q=(w0(m,p)?-Z:Z)*j:g?(Z=q/j,p=m):(q=Z*j,m=p));const A=m?w+q:w,L=p?k+Z:k;return{width:I+(m?-q:q),height:D+(p?-Z:Z),x:s[0]*q*(m?-1:1)+A,y:s[1]*Z*(p?-1:1)+L}}const e1={width:0,height:0,x:0,y:0},iT={...e1,pointerX:0,pointerY:0,aspectRatio:1};function rT(t){return[[0,0],[t.measured.width,t.measured.height]]}function lT(t,i,r){const a=i.position.x+t.position.x,u=i.position.y+t.position.y,s=t.measured.width??0,c=t.measured.height??0,d=r[0]*s,m=r[1]*c;return[[a-d,u-m],[a+s-d,u+c-m]]}function aT({domNode:t,nodeId:i,getStoreItems:r,onChange:a,onEnd:u}){const s=an(t);let c={controlDirection:S0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function d({controlPosition:p,boundaries:g,keepAspectRatio:y,resizeDirection:v,onResizeStart:x,onResize:S,onResizeEnd:C,shouldResize:M}){let E={...e1},H={...iT};c={boundaries:g,resizeDirection:v,keepAspectRatio:y,controlDirection:S0(p)};let w,k=null,I=[],D,j,q,Z=!1;const lt=fx().on("start",Q=>{const{nodeLookup:G,transform:nt,snapGrid:R,snapToGrid:B,nodeOrigin:A,paneDomNode:L}=r();if(w=G.get(i),!w)return;k=L?.getBoundingClientRect()??null;const{xSnapped:Y,ySnapped:K}=Ua(Q.sourceEvent,{transform:nt,snapGrid:R,snapToGrid:B,containerBounds:k});E={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},H={...E,pointerX:Y,pointerY:K,aspectRatio:E.width/E.height},D=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(D=G.get(w.parentId),j=D&&w.extent==="parent"?rT(D):void 0),I=[],q=void 0;for(const[T,O]of G)if(O.parentId===i&&(I.push({id:T,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const V=lT(O,w,O.origin??A);q?q=[[Math.min(V[0][0],q[0][0]),Math.min(V[0][1],q[0][1])],[Math.max(V[1][0],q[1][0]),Math.max(V[1][1],q[1][1])]]:q=V}x?.(Q,{...E})}).on("drag",Q=>{const{transform:G,snapGrid:nt,snapToGrid:R,nodeOrigin:B}=r(),A=Ua(Q.sourceEvent,{transform:G,snapGrid:nt,snapToGrid:R,containerBounds:k}),L=[];if(!w)return;const{x:Y,y:K,width:T,height:O}=E,V={},N=w.origin??B,{width:et,height:st,x:ct,y:dt}=nT(H,c.controlDirection,A,c.boundaries,c.keepAspectRatio,N,j,q),ut=et!==T,pt=st!==O,wt=ct!==Y&&ut,_t=dt!==K&&pt;if(!wt&&!_t&&!ut&&!pt)return;if((wt||_t||N[0]===1||N[1]===1)&&(V.x=wt?ct:E.x,V.y=_t?dt:E.y,E.x=V.x,E.y=V.y,I.length>0)){const It=ct-Y,Ut=dt-K;for(const oe of I)oe.position={x:oe.position.x-It+N[0]*(et-T),y:oe.position.y-Ut+N[1]*(st-O)},L.push(oe)}if((ut||pt)&&(V.width=ut&&(!c.resizeDirection||c.resizeDirection==="horizontal")?et:E.width,V.height=pt&&(!c.resizeDirection||c.resizeDirection==="vertical")?st:E.height,E.width=V.width,E.height=V.height),D&&w.expandParent){const It=N[0]*(V.width??0);V.x&&V.x<It&&(E.x=It,H.x=H.x-(V.x-It));const Ut=N[1]*(V.height??0);V.y&&V.y<Ut&&(E.y=Ut,H.y=H.y-(V.y-Ut))}const vt=eT({width:E.width,prevWidth:T,height:E.height,prevHeight:O,affectsX:c.controlDirection.affectsX,affectsY:c.controlDirection.affectsY}),Et={...E,direction:vt};M?.(Q,Et)!==!1&&(Z=!0,S?.(Q,Et),a(V,L))}).on("end",Q=>{Z&&(C?.(Q,{...E}),u?.({...E}),Z=!1)});s.call(lt)}function m(){s.on(".drag",null)}return{update:d,destroy:m}}var ad={exports:{}},od={},ud={exports:{}},sd={};var E0;function oT(){if(E0)return sd;E0=1;var t=eo();function i(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var r=typeof Object.is=="function"?Object.is:i,a=t.useState,u=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function d(y,v){var x=v(),S=a({inst:{value:x,getSnapshot:v}}),C=S[0].inst,M=S[1];return s(function(){C.value=x,C.getSnapshot=v,m(C)&&M({inst:C})},[y,x,v]),u(function(){return m(C)&&M({inst:C}),y(function(){m(C)&&M({inst:C})})},[y]),c(x),x}function m(y){var v=y.getSnapshot;y=y.value;try{var x=v();return!r(y,x)}catch{return!0}}function p(y,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:d;return sd.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,sd}var _0;function uT(){return _0||(_0=1,ud.exports=oT()),ud.exports}var C0;function sT(){if(C0)return od;C0=1;var t=eo(),i=uT();function r(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var a=typeof Object.is=="function"?Object.is:r,u=i.useSyncExternalStore,s=t.useRef,c=t.useEffect,d=t.useMemo,m=t.useDebugValue;return od.useSyncExternalStoreWithSelector=function(p,g,y,v,x){var S=s(null);if(S.current===null){var C={hasValue:!1,value:null};S.current=C}else C=S.current;S=d(function(){function E(D){if(!H){if(H=!0,w=D,D=v(D),x!==void 0&&C.hasValue){var j=C.value;if(x(j,D))return k=j}return k=D}if(j=k,a(w,D))return j;var q=v(D);return x!==void 0&&x(j,q)?(w=D,j):(w=D,k=q)}var H=!1,w,k,I=y===void 0?null:y;return[function(){return E(g())},I===null?void 0:function(){return E(I())}]},[g,y,v,x]);var M=u(p,S[0],S[1]);return c(function(){C.hasValue=!0,C.value=M},[M]),m(M),M},od}var N0;function cT(){return N0||(N0=1,ad.exports=sT()),ad.exports}var fT=cT();const dT=ys(fT),hT={},T0=t=>{let i;const r=new Set,a=(g,y)=>{const v=typeof g=="function"?g(i):g;if(!Object.is(v,i)){const x=i;i=y??(typeof v!="object"||v===null)?v:Object.assign({},i,v),r.forEach(S=>S(i,x))}},u=()=>i,m={setState:a,getState:u,getInitialState:()=>p,subscribe:g=>(r.add(g),()=>r.delete(g)),destroy:()=>{(hT?"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."),r.clear()}},p=i=t(a,u,m);return m},pT=t=>t?T0(t):T0,{useDebugValue:mT}=_w,{useSyncExternalStoreWithSelector:gT}=dT,yT=t=>t;function n1(t,i=yT,r){const a=gT(t.subscribe,t.getState,t.getServerState||t.getInitialState,i,r);return mT(a),a}const A0=(t,i)=>{const r=pT(t),a=(u,s=i)=>n1(r,u,s);return Object.assign(a,r),a},vT=(t,i)=>t?A0(t,i):A0;function ie(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[a,u]of t)if(!Object.is(u,i.get(a)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const a of t)if(!i.has(a))return!1;return!0}const r=Object.keys(t);if(r.length!==Object.keys(i).length)return!1;for(const a of r)if(!Object.prototype.hasOwnProperty.call(i,a)||!Object.is(t[a],i[a]))return!1;return!0}Lv();const Ns=W.createContext(null),xT=Ns.Provider,i1=qn.error001();function Bt(t,i){const r=W.useContext(Ns);if(r===null)throw new Error(i1);return n1(r,t,i)}function re(){const t=W.useContext(Ns);if(t===null)throw new Error(i1);return W.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const M0={display:"none"},bT={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},r1="react-flow__node-desc",l1="react-flow__edge-desc",ST="react-flow__aria-live",wT=t=>t.ariaLiveMessage,ET=t=>t.ariaLabelConfig;function _T({rfId:t}){const i=Bt(wT);return z.jsx("div",{id:`${ST}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:bT,children:i})}function CT({rfId:t,disableKeyboardA11y:i}){const r=Bt(ET);return z.jsxs(z.Fragment,{children:[z.jsx("div",{id:`${r1}-${t}`,style:M0,children:i?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),z.jsx("div",{id:`${l1}-${t}`,style:M0,children:r["edge.a11yDescription.default"]}),!i&&z.jsx(_T,{rfId:t})]})}const Ts=W.forwardRef(({position:t="top-left",children:i,className:r,style:a,...u},s)=>{const c=`${t}`.split("-");return z.jsx("div",{className:ye(["react-flow__panel",r,...c]),style:a,ref:s,...u,children:i})});Ts.displayName="Panel";function NT({proOptions:t,position:i="bottom-right"}){return t?.hideAttribution?null:z.jsx(Ts,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:z.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const TT=t=>{const i=[],r=[];for(const[,a]of t.nodeLookup)a.selected&&i.push(a.internals.userNode);for(const[,a]of t.edgeLookup)a.selected&&r.push(a);return{selectedNodes:i,selectedEdges:r}},Qu=t=>t.id;function AT(t,i){return ie(t.selectedNodes.map(Qu),i.selectedNodes.map(Qu))&&ie(t.selectedEdges.map(Qu),i.selectedEdges.map(Qu))}function MT({onSelectionChange:t}){const i=re(),{selectedNodes:r,selectedEdges:a}=Bt(TT,AT);return W.useEffect(()=>{const u={nodes:r,edges:a};t?.(u),i.getState().onSelectionChangeHandlers.forEach(s=>s(u))},[r,a,t]),null}const zT=t=>!!t.onSelectionChangeHandlers;function OT({onSelectionChange:t}){const i=Bt(zT);return t||i?z.jsx(MT,{onSelectionChange:t}):null}const a1=[0,0],DT={x:0,y:0,zoom:1},kT=["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"],z0=[...kT,"rfId"],RT=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),O0={translateExtent:Ka,nodeOrigin:a1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function HT(t){const{setNodes:i,setEdges:r,setMinZoom:a,setMaxZoom:u,setTranslateExtent:s,setNodeExtent:c,reset:d,setDefaultNodesAndEdges:m}=Bt(RT,ie),p=re();W.useEffect(()=>(m(t.defaultNodes,t.defaultEdges),()=>{g.current=O0,d()}),[]);const g=W.useRef(O0);return W.useEffect(()=>{for(const y of z0){const v=t[y],x=g.current[y];v!==x&&(typeof t[y]>"u"||(y==="nodes"?i(v):y==="edges"?r(v):y==="minZoom"?a(v):y==="maxZoom"?u(v):y==="translateExtent"?s(v):y==="nodeExtent"?c(v):y==="ariaLabelConfig"?p.setState({ariaLabelConfig:vN(v)}):y==="fitView"?p.setState({fitViewQueued:v}):y==="fitViewOptions"?p.setState({fitViewOptions:v}):p.setState({[y]:v})))}g.current=t},z0.map(y=>t[y])),null}function D0(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function jT(t){const[i,r]=W.useState(t==="system"?null:t);return W.useEffect(()=>{if(t!=="system"){r(t);return}const a=D0(),u=()=>r(a?.matches?"dark":"light");return u(),a?.addEventListener("change",u),()=>{a?.removeEventListener("change",u)}},[t]),i!==null?i:D0()?.matches?"dark":"light"}const k0=typeof document<"u"?document:null;function Wa(t=null,i={target:k0,actInsideInputWithModifier:!0}){const[r,a]=W.useState(!1),u=W.useRef(!1),s=W.useRef(new Set([])),[c,d]=W.useMemo(()=>{if(t!==null){const p=(Array.isArray(t)?t:[t]).filter(y=>typeof y=="string").map(y=>y.replace("+",`
10
+ `).replace(`
11
+
12
+ `,`
13
+ +`).split(`
14
+ `)),g=p.reduce((y,v)=>y.concat(...v),[]);return[p,g]}return[[],[]]},[t]);return W.useEffect(()=>{const m=i?.target??k0,p=i?.actInsideInputWithModifier??!0;if(t!==null){const g=x=>{if(u.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!u.current||u.current&&!p)&&Ux(x))return!1;const C=H0(x.code,d);if(s.current.add(x[C]),R0(c,s.current,!1)){const M=x.composedPath?.()?.[0]||x.target,E=M?.nodeName==="BUTTON"||M?.nodeName==="A";i.preventDefault!==!1&&(u.current||!E)&&x.preventDefault(),a(!0)}},y=x=>{const S=H0(x.code,d);R0(c,s.current,!0)?(a(!1),s.current.clear()):s.current.delete(x[S]),x.key==="Meta"&&s.current.clear(),u.current=!1},v=()=>{s.current.clear(),a(!1)};return m?.addEventListener("keydown",g),m?.addEventListener("keyup",y),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{m?.removeEventListener("keydown",g),m?.removeEventListener("keyup",y),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[t,a]),r}function R0(t,i,r){return t.filter(a=>r||a.length===i.size).some(a=>a.every(u=>i.has(u)))}function H0(t,i){return i.includes(t)?"code":"key"}const LT=()=>{const t=re();return W.useMemo(()=>({zoomIn:i=>{const{panZoom:r}=t.getState();return r?r.scaleBy(1.2,{duration:i?.duration}):Promise.resolve(!1)},zoomOut:i=>{const{panZoom:r}=t.getState();return r?r.scaleBy(1/1.2,{duration:i?.duration}):Promise.resolve(!1)},zoomTo:(i,r)=>{const{panZoom:a}=t.getState();return a?a.scaleTo(i,{duration:r?.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(i,r)=>{const{transform:[a,u,s],panZoom:c}=t.getState();return c?(await c.setViewport({x:i.x??a,y:i.y??u,zoom:i.zoom??s},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[i,r,a]=t.getState().transform;return{x:i,y:r,zoom:a}},setCenter:async(i,r,a)=>t.getState().setCenter(i,r,a),fitBounds:async(i,r)=>{const{width:a,height:u,minZoom:s,maxZoom:c,panZoom:d}=t.getState(),m=yh(i,a,u,s,c,r?.padding??.1);return d?(await d.setViewport(m,{duration:r?.duration,ease:r?.ease,interpolate:r?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(i,r={})=>{const{transform:a,snapGrid:u,snapToGrid:s,domNode:c}=t.getState();if(!c)return i;const{x:d,y:m}=c.getBoundingClientRect(),p={x:i.x-d,y:i.y-m},g=r.snapGrid??u,y=r.snapToGrid??s;return uo(p,a,y,g)},flowToScreenPosition:i=>{const{transform:r,domNode:a}=t.getState();if(!a)return i;const{x:u,y:s}=a.getBoundingClientRect(),c=ds(i,r);return{x:c.x+u,y:c.y+s}}}),[])};function o1(t,i){const r=[],a=new Map,u=[];for(const s of t)if(s.type==="add"){u.push(s);continue}else if(s.type==="remove"||s.type==="replace")a.set(s.id,[s]);else{const c=a.get(s.id);c?c.push(s):a.set(s.id,[s])}for(const s of i){const c=a.get(s.id);if(!c){r.push(s);continue}if(c[0].type==="remove")continue;if(c[0].type==="replace"){r.push({...c[0].item});continue}const d={...s};for(const m of c)BT(m,d);r.push(d)}return u.length&&u.forEach(s=>{s.index!==void 0?r.splice(s.index,0,{...s.item}):r.push({...s.item})}),r}function BT(t,i){switch(t.type){case"select":{i.selected=t.selected;break}case"position":{typeof t.position<"u"&&(i.position=t.position),typeof t.dragging<"u"&&(i.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(i.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(i.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(i.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(i.resizing=t.resizing);break}}}function UT(t,i){return o1(t,i)}function qT(t,i){return o1(t,i)}function xr(t,i){return{id:t,type:"select",selected:i}}function bl(t,i=new Set,r=!1){const a=[];for(const[u,s]of t){const c=i.has(u);!(s.selected===void 0&&!c)&&s.selected!==c&&(r&&(s.selected=c),a.push(xr(s.id,c)))}return a}function j0({items:t=[],lookup:i}){const r=[],a=new Map(t.map(u=>[u.id,u]));for(const[u,s]of t.entries()){const c=i.get(s.id),d=c?.internals?.userNode??c;d!==void 0&&d!==s&&r.push({id:s.id,item:s,type:"replace"}),d===void 0&&r.push({item:s,type:"add",index:u})}for(const[u]of i)a.get(u)===void 0&&r.push({id:u,type:"remove"});return r}function L0(t){return{id:t.id,type:"remove"}}const B0=t=>uN(t),VT=t=>Ox(t);function u1(t){return W.forwardRef(t)}const IT=typeof window<"u"?W.useLayoutEffect:W.useEffect;function U0(t){const[i,r]=W.useState(BigInt(0)),[a]=W.useState(()=>YT(()=>r(u=>u+BigInt(1))));return IT(()=>{const u=a.get();u.length&&(t(u),a.reset())},[i]),a}function YT(t){let i=[];return{get:()=>i,reset:()=>{i=[]},push:r=>{i.push(r),t()}}}const s1=W.createContext(null);function QT({children:t}){const i=re(),r=W.useCallback(d=>{const{nodes:m=[],setNodes:p,hasDefaultNodes:g,onNodesChange:y,nodeLookup:v,fitViewQueued:x,onNodesChangeMiddlewareMap:S}=i.getState();let C=m;for(const E of d)C=typeof E=="function"?E(C):E;let M=j0({items:C,lookup:v});for(const E of S.values())M=E(M);g&&p(C),M.length>0?y?.(M):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:H,setNodes:w}=i.getState();E&&w(H)})},[]),a=U0(r),u=W.useCallback(d=>{const{edges:m=[],setEdges:p,hasDefaultEdges:g,onEdgesChange:y,edgeLookup:v}=i.getState();let x=m;for(const S of d)x=typeof S=="function"?S(x):S;g?p(x):y&&y(j0({items:x,lookup:v}))},[]),s=U0(u),c=W.useMemo(()=>({nodeQueue:a,edgeQueue:s}),[]);return z.jsx(s1.Provider,{value:c,children:t})}function XT(){const t=W.useContext(s1);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const GT=t=>!!t.panZoom;function _h(){const t=LT(),i=re(),r=XT(),a=Bt(GT),u=W.useMemo(()=>{const s=y=>i.getState().nodeLookup.get(y),c=y=>{r.nodeQueue.push(y)},d=y=>{r.edgeQueue.push(y)},m=y=>{const{nodeLookup:v,nodeOrigin:x}=i.getState(),S=B0(y)?y:v.get(y.id),C=S.parentId?Lx(S.position,S.measured,S.parentId,v,x):S.position,M={...S,position:C,width:S.measured?.width??S.width,height:S.measured?.height??S.height};return Ml(M)},p=(y,v,x={replace:!1})=>{c(S=>S.map(C=>{if(C.id===y){const M=typeof v=="function"?v(C):v;return x.replace&&B0(M)?M:{...C,...M}}return C}))},g=(y,v,x={replace:!1})=>{d(S=>S.map(C=>{if(C.id===y){const M=typeof v=="function"?v(C):v;return x.replace&&VT(M)?M:{...C,...M}}return C}))};return{getNodes:()=>i.getState().nodes.map(y=>({...y})),getNode:y=>s(y)?.internals.userNode,getInternalNode:s,getEdges:()=>{const{edges:y=[]}=i.getState();return y.map(v=>({...v}))},getEdge:y=>i.getState().edgeLookup.get(y),setNodes:c,setEdges:d,addNodes:y=>{const v=Array.isArray(y)?y:[y];r.nodeQueue.push(x=>[...x,...v])},addEdges:y=>{const v=Array.isArray(y)?y:[y];r.edgeQueue.push(x=>[...x,...v])},toObject:()=>{const{nodes:y=[],edges:v=[],transform:x}=i.getState(),[S,C,M]=x;return{nodes:y.map(E=>({...E})),edges:v.map(E=>({...E})),viewport:{x:S,y:C,zoom:M}}},deleteElements:async({nodes:y=[],edges:v=[]})=>{const{nodes:x,edges:S,onNodesDelete:C,onEdgesDelete:M,triggerNodeChanges:E,triggerEdgeChanges:H,onDelete:w,onBeforeDelete:k}=i.getState(),{nodes:I,edges:D}=await hN({nodesToRemove:y,edgesToRemove:v,nodes:x,edges:S,onBeforeDelete:k}),j=D.length>0,q=I.length>0;if(j){const Z=D.map(L0);M?.(D),H(Z)}if(q){const Z=I.map(L0);C?.(I),E(Z)}return(q||j)&&w?.({nodes:I,edges:D}),{deletedNodes:I,deletedEdges:D}},getIntersectingNodes:(y,v=!0,x)=>{const S=c0(y),C=S?y:m(y),M=x!==void 0;return C?(x||i.getState().nodes).filter(E=>{const H=i.getState().nodeLookup.get(E.id);if(H&&!S&&(E.id===y.id||!H.internals.positionAbsolute))return!1;const w=Ml(M?E:H),k=Pa(w,C);return v&&k>0||k>=w.width*w.height||k>=C.width*C.height}):[]},isNodeIntersecting:(y,v,x=!0)=>{const C=c0(y)?y:m(y);if(!C)return!1;const M=Pa(C,v);return x&&M>0||M>=v.width*v.height||M>=C.width*C.height},updateNode:p,updateNodeData:(y,v,x={replace:!1})=>{p(y,S=>{const C=typeof v=="function"?v(S):v;return x.replace?{...S,data:C}:{...S,data:{...S.data,...C}}},x)},updateEdge:g,updateEdgeData:(y,v,x={replace:!1})=>{g(y,S=>{const C=typeof v=="function"?v(S):v;return x.replace?{...S,data:C}:{...S,data:{...S.data,...C}}},x)},getNodesBounds:y=>{const{nodeLookup:v,nodeOrigin:x}=i.getState();return sN(y,{nodeLookup:v,nodeOrigin:x})},getHandleConnections:({type:y,id:v,nodeId:x})=>Array.from(i.getState().connectionLookup.get(`${x}-${y}${v?`-${v}`:""}`)?.values()??[]),getNodeConnections:({type:y,handleId:v,nodeId:x})=>Array.from(i.getState().connectionLookup.get(`${x}${y?v?`-${y}-${v}`:`-${y}`:""}`)?.values()??[]),fitView:async y=>{const v=i.getState().fitViewResolver??yN();return i.setState({fitViewQueued:!0,fitViewOptions:y,fitViewResolver:v}),r.nodeQueue.push(x=>[...x]),v.promise}}},[]);return W.useMemo(()=>({...u,...t,viewportInitialized:a}),[a])}const q0=t=>t.selected,ZT=typeof window<"u"?window:void 0;function FT({deleteKeyCode:t,multiSelectionKeyCode:i}){const r=re(),{deleteElements:a}=_h(),u=Wa(t,{actInsideInputWithModifier:!1}),s=Wa(i,{target:ZT});W.useEffect(()=>{if(u){const{edges:c,nodes:d}=r.getState();a({nodes:d.filter(q0),edges:c.filter(q0)}),r.setState({nodesSelectionActive:!1})}},[u]),W.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function KT(t){const i=re();W.useEffect(()=>{const r=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const a=vh(t.current);(a.height===0||a.width===0)&&i.getState().onError?.("004",qn.error004()),i.setState({width:a.width||500,height:a.height||500})};if(t.current){r(),window.addEventListener("resize",r);const a=new ResizeObserver(()=>r());return a.observe(t.current),()=>{window.removeEventListener("resize",r),a&&t.current&&a.unobserve(t.current)}}},[])}const As={position:"absolute",width:"100%",height:"100%",top:0,left:0},$T=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function PT({onPaneContextMenu:t,zoomOnScroll:i=!0,zoomOnPinch:r=!0,panOnScroll:a=!1,panOnScrollSpeed:u=.5,panOnScrollMode:s=Er.Free,zoomOnDoubleClick:c=!0,panOnDrag:d=!0,defaultViewport:m,translateExtent:p,minZoom:g,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:x=!0,children:S,noWheelClassName:C,noPanClassName:M,onViewportChange:E,isControlledViewport:H,paneClickDistance:w,selectionOnDrag:k}){const I=re(),D=W.useRef(null),{userSelectionActive:j,lib:q,connectionInProgress:Z}=Bt($T,ie),lt=Wa(v),Q=W.useRef();KT(D);const G=W.useCallback(nt=>{E?.({x:nt[0],y:nt[1],zoom:nt[2]}),H||I.setState({transform:nt})},[E,H]);return W.useEffect(()=>{if(D.current){Q.current=tT({domNode:D.current,minZoom:g,maxZoom:y,translateExtent:p,viewport:m,onDraggingChange:A=>I.setState(L=>L.paneDragging===A?L:{paneDragging:A}),onPanZoomStart:(A,L)=>{const{onViewportChangeStart:Y,onMoveStart:K}=I.getState();K?.(A,L),Y?.(L)},onPanZoom:(A,L)=>{const{onViewportChange:Y,onMove:K}=I.getState();K?.(A,L),Y?.(L)},onPanZoomEnd:(A,L)=>{const{onViewportChangeEnd:Y,onMoveEnd:K}=I.getState();K?.(A,L),Y?.(L)}});const{x:nt,y:R,zoom:B}=Q.current.getViewport();return I.setState({panZoom:Q.current,transform:[nt,R,B],domNode:D.current.closest(".react-flow")}),()=>{Q.current?.destroy()}}},[]),W.useEffect(()=>{Q.current?.update({onPaneContextMenu:t,zoomOnScroll:i,zoomOnPinch:r,panOnScroll:a,panOnScrollSpeed:u,panOnScrollMode:s,zoomOnDoubleClick:c,panOnDrag:d,zoomActivationKeyPressed:lt,preventScrolling:x,noPanClassName:M,userSelectionActive:j,noWheelClassName:C,lib:q,onTransformChange:G,connectionInProgress:Z,selectionOnDrag:k,paneClickDistance:w})},[t,i,r,a,u,s,c,d,lt,x,M,j,C,q,G,Z,k,w]),z.jsx("div",{className:"react-flow__renderer",ref:D,style:As,children:S})}const JT=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function WT(){const{userSelectionActive:t,userSelectionRect:i}=Bt(JT,ie);return t&&i?z.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:i.width,height:i.height,transform:`translate(${i.x}px, ${i.y}px)`}}):null}const cd=(t,i)=>r=>{r.target===i.current&&t?.(r)},tA=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function eA({isSelecting:t,selectionKeyPressed:i,selectionMode:r=$a.Full,panOnDrag:a,paneClickDistance:u,selectionOnDrag:s,onSelectionStart:c,onSelectionEnd:d,onPaneClick:m,onPaneContextMenu:p,onPaneScroll:g,onPaneMouseEnter:y,onPaneMouseMove:v,onPaneMouseLeave:x,children:S}){const C=re(),{userSelectionActive:M,elementsSelectable:E,dragging:H,connectionInProgress:w}=Bt(tA,ie),k=E&&(t||M),I=W.useRef(null),D=W.useRef(),j=W.useRef(new Set),q=W.useRef(new Set),Z=W.useRef(!1),lt=Y=>{if(Z.current||w){Z.current=!1;return}m?.(Y),C.getState().resetSelectedElements(),C.setState({nodesSelectionActive:!1})},Q=Y=>{if(Array.isArray(a)&&a?.includes(2)){Y.preventDefault();return}p?.(Y)},G=g?Y=>g(Y):void 0,nt=Y=>{Z.current&&(Y.stopPropagation(),Z.current=!1)},R=Y=>{const{domNode:K}=C.getState();if(D.current=K?.getBoundingClientRect(),!D.current)return;const T=Y.target===I.current;if(!T&&!!Y.target.closest(".nokey")||!t||!(s&&T||i)||Y.button!==0||!Y.isPrimary)return;Y.target?.setPointerCapture?.(Y.pointerId),Z.current=!1;const{x:N,y:et}=An(Y.nativeEvent,D.current);C.setState({userSelectionRect:{width:0,height:0,startX:N,startY:et,x:N,y:et}}),T||(Y.stopPropagation(),Y.preventDefault())},B=Y=>{const{userSelectionRect:K,transform:T,nodeLookup:O,edgeLookup:V,connectionLookup:N,triggerNodeChanges:et,triggerEdgeChanges:st,defaultEdgeOptions:ct,resetSelectedElements:dt}=C.getState();if(!D.current||!K)return;const{x:ut,y:pt}=An(Y.nativeEvent,D.current),{startX:wt,startY:_t}=K;if(!Z.current){const Ut=i?0:u;if(Math.hypot(ut-wt,pt-_t)<=Ut)return;dt(),c?.(Y)}Z.current=!0;const vt={startX:wt,startY:_t,x:ut<wt?ut:wt,y:pt<_t?pt:_t,width:Math.abs(ut-wt),height:Math.abs(pt-_t)},Et=j.current,Ot=q.current;j.current=new Set(gh(O,vt,T,r===$a.Partial,!0).map(Ut=>Ut.id)),q.current=new Set;const It=ct?.selectable??!0;for(const Ut of j.current){const oe=N.get(Ut);if(oe)for(const{edgeId:Ke}of oe.values()){const Ae=V.get(Ke);Ae&&(Ae.selectable??It)&&q.current.add(Ke)}}if(!f0(Et,j.current)){const Ut=bl(O,j.current,!0);et(Ut)}if(!f0(Ot,q.current)){const Ut=bl(V,q.current);st(Ut)}C.setState({userSelectionRect:vt,userSelectionActive:!0,nodesSelectionActive:!1})},A=Y=>{Y.button===0&&(Y.target?.releasePointerCapture?.(Y.pointerId),!M&&Y.target===I.current&&C.getState().userSelectionRect&&lt?.(Y),C.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(d?.(Y),C.setState({nodesSelectionActive:j.current.size>0})))},L=a===!0||Array.isArray(a)&&a.includes(0);return z.jsxs("div",{className:ye(["react-flow__pane",{draggable:L,dragging:H,selection:t}]),onClick:k?void 0:cd(lt,I),onContextMenu:cd(Q,I),onWheel:cd(G,I),onPointerEnter:k?void 0:y,onPointerMove:k?B:v,onPointerUp:k?A:void 0,onPointerDownCapture:k?R:void 0,onClickCapture:k?nt:void 0,onPointerLeave:x,ref:I,style:As,children:[S,z.jsx(WT,{})]})}function Xd({id:t,store:i,unselect:r=!1,nodeRef:a}){const{addSelectedNodes:u,unselectNodesAndEdges:s,multiSelectionActive:c,nodeLookup:d,onError:m}=i.getState(),p=d.get(t);if(!p){m?.("012",qn.error012(t));return}i.setState({nodesSelectionActive:!1}),p.selected?(r||p.selected&&c)&&(s({nodes:[p],edges:[]}),requestAnimationFrame(()=>a?.current?.blur())):u([t])}function c1({nodeRef:t,disabled:i=!1,noDragClassName:r,handleSelector:a,nodeId:u,isSelectable:s,nodeClickDistance:c}){const d=re(),[m,p]=W.useState(!1),g=W.useRef();return W.useEffect(()=>{g.current=qN({getStoreItems:()=>d.getState(),onNodeMouseDown:y=>{Xd({id:y,store:d,nodeRef:t})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),W.useEffect(()=>{if(!(i||!t.current||!g.current))return g.current.update({noDragClassName:r,handleSelector:a,domNode:t.current,isSelectable:s,nodeId:u,nodeClickDistance:c}),()=>{g.current?.destroy()}},[r,a,i,s,t,u,c]),m}const nA=t=>i=>i.selected&&(i.draggable||t&&typeof i.draggable>"u");function f1(){const t=re();return W.useCallback(r=>{const{nodeExtent:a,snapToGrid:u,snapGrid:s,nodesDraggable:c,onError:d,updateNodePositions:m,nodeLookup:p,nodeOrigin:g}=t.getState(),y=new Map,v=nA(c),x=u?s[0]:5,S=u?s[1]:5,C=r.direction.x*x*r.factor,M=r.direction.y*S*r.factor;for(const[,E]of p){if(!v(E))continue;let H={x:E.internals.positionAbsolute.x+C,y:E.internals.positionAbsolute.y+M};u&&(H=oo(H,s));const{position:w,positionAbsolute:k}=Dx({nodeId:E.id,nextPosition:H,nodeLookup:p,nodeExtent:a,nodeOrigin:g,onError:d});E.position=w,E.internals.positionAbsolute=k,y.set(E.id,E)}m(y)},[])}const Ch=W.createContext(null),iA=Ch.Provider;Ch.Consumer;const d1=()=>W.useContext(Ch),rA=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),lA=(t,i,r)=>a=>{const{connectionClickStartHandle:u,connectionMode:s,connection:c}=a,{fromHandle:d,toHandle:m,isValid:p}=c,g=m?.nodeId===t&&m?.id===i&&m?.type===r;return{connectingFrom:d?.nodeId===t&&d?.id===i&&d?.type===r,connectingTo:g,clickConnecting:u?.nodeId===t&&u?.id===i&&u?.type===r,isPossibleEndHandle:s===Tl.Strict?d?.type!==r:t!==d?.nodeId||i!==d?.id,connectionInProcess:!!d,clickConnectionInProcess:!!u,valid:g&&p}};function aA({type:t="source",position:i=xt.Top,isValidConnection:r,isConnectable:a=!0,isConnectableStart:u=!0,isConnectableEnd:s=!0,id:c,onConnect:d,children:m,className:p,onMouseDown:g,onTouchStart:y,...v},x){const S=c||null,C=t==="target",M=re(),E=d1(),{connectOnClick:H,noPanClassName:w,rfId:k}=Bt(rA,ie),{connectingFrom:I,connectingTo:D,clickConnecting:j,isPossibleEndHandle:q,connectionInProcess:Z,clickConnectionInProcess:lt,valid:Q}=Bt(lA(E,S,t),ie);E||M.getState().onError?.("010",qn.error010());const G=B=>{const{defaultEdgeOptions:A,onConnect:L,hasDefaultEdges:Y}=M.getState(),K={...A,...B};if(Y){const{edges:T,setEdges:O}=M.getState();O(_N(K,T))}L?.(K),d?.(K)},nt=B=>{if(!E)return;const A=qx(B.nativeEvent);if(u&&(A&&B.button===0||!A)){const L=M.getState();Qd.onPointerDown(B.nativeEvent,{handleDomNode:B.currentTarget,autoPanOnConnect:L.autoPanOnConnect,connectionMode:L.connectionMode,connectionRadius:L.connectionRadius,domNode:L.domNode,nodeLookup:L.nodeLookup,lib:L.lib,isTarget:C,handleId:S,nodeId:E,flowId:L.rfId,panBy:L.panBy,cancelConnection:L.cancelConnection,onConnectStart:L.onConnectStart,onConnectEnd:(...Y)=>M.getState().onConnectEnd?.(...Y),updateConnection:L.updateConnection,onConnect:G,isValidConnection:r||((...Y)=>M.getState().isValidConnection?.(...Y)??!0),getTransform:()=>M.getState().transform,getFromHandle:()=>M.getState().connection.fromHandle,autoPanSpeed:L.autoPanSpeed,dragThreshold:L.connectionDragThreshold})}A?g?.(B):y?.(B)},R=B=>{const{onClickConnectStart:A,onClickConnectEnd:L,connectionClickStartHandle:Y,connectionMode:K,isValidConnection:T,lib:O,rfId:V,nodeLookup:N,connection:et}=M.getState();if(!E||!Y&&!u)return;if(!Y){A?.(B.nativeEvent,{nodeId:E,handleId:S,handleType:t}),M.setState({connectionClickStartHandle:{nodeId:E,type:t,id:S}});return}const st=Bx(B.target),ct=r||T,{connection:dt,isValid:ut}=Qd.isValid(B.nativeEvent,{handle:{nodeId:E,id:S,type:t},connectionMode:K,fromNodeId:Y.nodeId,fromHandleId:Y.id||null,fromType:Y.type,isValidConnection:ct,flowId:V,doc:st,lib:O,nodeLookup:N});ut&&dt&&G(dt);const pt=structuredClone(et);delete pt.inProgress,pt.toPosition=pt.toHandle?pt.toHandle.position:null,L?.(B,pt),M.setState({connectionClickStartHandle:null})};return z.jsx("div",{"data-handleid":S,"data-nodeid":E,"data-handlepos":i,"data-id":`${k}-${E}-${S}-${t}`,className:ye(["react-flow__handle",`react-flow__handle-${i}`,"nodrag",w,p,{source:!C,target:C,connectable:a,connectablestart:u,connectableend:s,clickconnecting:j,connectingfrom:I,connectingto:D,valid:Q,connectionindicator:a&&(!Z||q)&&(Z||lt?s:u)}]),onMouseDown:nt,onTouchStart:nt,onClick:H?R:void 0,ref:x,...v,children:m})}const hs=W.memo(u1(aA));function oA({data:t,isConnectable:i,sourcePosition:r=xt.Bottom}){return z.jsxs(z.Fragment,{children:[t?.label,z.jsx(hs,{type:"source",position:r,isConnectable:i})]})}function uA({data:t,isConnectable:i,targetPosition:r=xt.Top,sourcePosition:a=xt.Bottom}){return z.jsxs(z.Fragment,{children:[z.jsx(hs,{type:"target",position:r,isConnectable:i}),t?.label,z.jsx(hs,{type:"source",position:a,isConnectable:i})]})}function sA(){return null}function cA({data:t,isConnectable:i,targetPosition:r=xt.Top}){return z.jsxs(z.Fragment,{children:[z.jsx(hs,{type:"target",position:r,isConnectable:i}),t?.label]})}const ps={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},V0={input:oA,default:uA,output:cA,group:sA};function fA(t){return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??t.style?.width,height:t.height??t.initialHeight??t.style?.height}:{width:t.width??t.style?.width,height:t.height??t.style?.height}}const dA=t=>{const{width:i,height:r,x:a,y:u}=ao(t.nodeLookup,{filter:s=>!!s.selected});return{width:Tn(i)?i:null,height:Tn(r)?r:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${a}px,${u}px)`}};function hA({onSelectionContextMenu:t,noPanClassName:i,disableKeyboardA11y:r}){const a=re(),{width:u,height:s,transformString:c,userSelectionActive:d}=Bt(dA,ie),m=f1(),p=W.useRef(null);W.useEffect(()=>{r||p.current?.focus({preventScroll:!0})},[r]);const g=!d&&u!==null&&s!==null;if(c1({nodeRef:p,disabled:!g}),!g)return null;const y=t?x=>{const S=a.getState().nodes.filter(C=>C.selected);t(x,S)}:void 0,v=x=>{Object.prototype.hasOwnProperty.call(ps,x.key)&&(x.preventDefault(),m({direction:ps[x.key],factor:x.shiftKey?4:1}))};return z.jsx("div",{className:ye(["react-flow__nodesselection","react-flow__container",i]),style:{transform:c},children:z.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:y,tabIndex:r?void 0:-1,onKeyDown:r?void 0:v,style:{width:u,height:s}})})}const I0=typeof window<"u"?window:void 0,pA=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function h1({children:t,onPaneClick:i,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:u,onPaneContextMenu:s,onPaneScroll:c,paneClickDistance:d,deleteKeyCode:m,selectionKeyCode:p,selectionOnDrag:g,selectionMode:y,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:M,elementsSelectable:E,zoomOnScroll:H,zoomOnPinch:w,panOnScroll:k,panOnScrollSpeed:I,panOnScrollMode:D,zoomOnDoubleClick:j,panOnDrag:q,defaultViewport:Z,translateExtent:lt,minZoom:Q,maxZoom:G,preventScrolling:nt,onSelectionContextMenu:R,noWheelClassName:B,noPanClassName:A,disableKeyboardA11y:L,onViewportChange:Y,isControlledViewport:K}){const{nodesSelectionActive:T,userSelectionActive:O}=Bt(pA,ie),V=Wa(p,{target:I0}),N=Wa(C,{target:I0}),et=N||q,st=N||k,ct=g&&et!==!0,dt=V||O||ct;return FT({deleteKeyCode:m,multiSelectionKeyCode:S}),z.jsx(PT,{onPaneContextMenu:s,elementsSelectable:E,zoomOnScroll:H,zoomOnPinch:w,panOnScroll:st,panOnScrollSpeed:I,panOnScrollMode:D,zoomOnDoubleClick:j,panOnDrag:!V&&et,defaultViewport:Z,translateExtent:lt,minZoom:Q,maxZoom:G,zoomActivationKeyCode:M,preventScrolling:nt,noWheelClassName:B,noPanClassName:A,onViewportChange:Y,isControlledViewport:K,paneClickDistance:d,selectionOnDrag:ct,children:z.jsxs(eA,{onSelectionStart:v,onSelectionEnd:x,onPaneClick:i,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:u,onPaneContextMenu:s,onPaneScroll:c,panOnDrag:et,isSelecting:!!dt,selectionMode:y,selectionKeyPressed:V,paneClickDistance:d,selectionOnDrag:ct,children:[t,T&&z.jsx(hA,{onSelectionContextMenu:R,noPanClassName:A,disableKeyboardA11y:L})]})})}h1.displayName="FlowRenderer";const mA=W.memo(h1),gA=t=>i=>t?gh(i.nodeLookup,{x:0,y:0,width:i.width,height:i.height},i.transform,!0).map(r=>r.id):Array.from(i.nodeLookup.keys());function yA(t){return Bt(W.useCallback(gA(t),[t]),ie)}const vA=t=>t.updateNodeInternals;function xA(){const t=Bt(vA),[i]=W.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const a=new Map;r.forEach(u=>{const s=u.target.getAttribute("data-id");a.set(s,{id:s,nodeElement:u.target,force:!0})}),t(a)}));return W.useEffect(()=>()=>{i?.disconnect()},[i]),i}function bA({node:t,nodeType:i,hasDimensions:r,resizeObserver:a}){const u=re(),s=W.useRef(null),c=W.useRef(null),d=W.useRef(t.sourcePosition),m=W.useRef(t.targetPosition),p=W.useRef(i),g=r&&!!t.internals.handleBounds;return W.useEffect(()=>{s.current&&!t.hidden&&(!g||c.current!==s.current)&&(c.current&&a?.unobserve(c.current),a?.observe(s.current),c.current=s.current)},[g,t.hidden]),W.useEffect(()=>()=>{c.current&&(a?.unobserve(c.current),c.current=null)},[]),W.useEffect(()=>{if(s.current){const y=p.current!==i,v=d.current!==t.sourcePosition,x=m.current!==t.targetPosition;(y||v||x)&&(p.current=i,d.current=t.sourcePosition,m.current=t.targetPosition,u.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:s.current,force:!0}]])))}},[t.id,i,t.sourcePosition,t.targetPosition]),s}function SA({id:t,onClick:i,onMouseEnter:r,onMouseMove:a,onMouseLeave:u,onContextMenu:s,onDoubleClick:c,nodesDraggable:d,elementsSelectable:m,nodesConnectable:p,nodesFocusable:g,resizeObserver:y,noDragClassName:v,noPanClassName:x,disableKeyboardA11y:S,rfId:C,nodeTypes:M,nodeClickDistance:E,onError:H}){const{node:w,internals:k,isParent:I}=Bt(ut=>{const pt=ut.nodeLookup.get(t),wt=ut.parentLookup.has(t);return{node:pt,internals:pt.internals,isParent:wt}},ie);let D=w.type||"default",j=M?.[D]||V0[D];j===void 0&&(H?.("003",qn.error003(D)),D="default",j=M?.default||V0.default);const q=!!(w.draggable||d&&typeof w.draggable>"u"),Z=!!(w.selectable||m&&typeof w.selectable>"u"),lt=!!(w.connectable||p&&typeof w.connectable>"u"),Q=!!(w.focusable||g&&typeof w.focusable>"u"),G=re(),nt=jx(w),R=bA({node:w,nodeType:D,hasDimensions:nt,resizeObserver:y}),B=c1({nodeRef:R,disabled:w.hidden||!q,noDragClassName:v,handleSelector:w.dragHandle,nodeId:t,isSelectable:Z,nodeClickDistance:E}),A=f1();if(w.hidden)return null;const L=mi(w),Y=fA(w),K=Z||q||i||r||a||u,T=r?ut=>r(ut,{...k.userNode}):void 0,O=a?ut=>a(ut,{...k.userNode}):void 0,V=u?ut=>u(ut,{...k.userNode}):void 0,N=s?ut=>s(ut,{...k.userNode}):void 0,et=c?ut=>c(ut,{...k.userNode}):void 0,st=ut=>{const{selectNodesOnDrag:pt,nodeDragThreshold:wt}=G.getState();Z&&(!pt||!q||wt>0)&&Xd({id:t,store:G,nodeRef:R}),i&&i(ut,{...k.userNode})},ct=ut=>{if(!(Ux(ut.nativeEvent)||S)){if(Tx.includes(ut.key)&&Z){const pt=ut.key==="Escape";Xd({id:t,store:G,unselect:pt,nodeRef:R})}else if(q&&w.selected&&Object.prototype.hasOwnProperty.call(ps,ut.key)){ut.preventDefault();const{ariaLabelConfig:pt}=G.getState();G.setState({ariaLiveMessage:pt["node.a11yDescription.ariaLiveMessage"]({direction:ut.key.replace("Arrow","").toLowerCase(),x:~~k.positionAbsolute.x,y:~~k.positionAbsolute.y})}),A({direction:ps[ut.key],factor:ut.shiftKey?4:1})}}},dt=()=>{if(S||!R.current?.matches(":focus-visible"))return;const{transform:ut,width:pt,height:wt,autoPanOnNodeFocus:_t,setCenter:vt}=G.getState();if(!_t)return;gh(new Map([[t,w]]),{x:0,y:0,width:pt,height:wt},ut,!0).length>0||vt(w.position.x+L.width/2,w.position.y+L.height/2,{zoom:ut[2]})};return z.jsx("div",{className:ye(["react-flow__node",`react-flow__node-${D}`,{[x]:q},w.className,{selected:w.selected,selectable:Z,parent:I,draggable:q,dragging:B}]),ref:R,style:{zIndex:k.z,transform:`translate(${k.positionAbsolute.x}px,${k.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:nt?"visible":"hidden",...w.style,...Y},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:T,onMouseMove:O,onMouseLeave:V,onContextMenu:N,onClick:st,onDoubleClick:et,onKeyDown:Q?ct:void 0,tabIndex:Q?0:void 0,onFocus:Q?dt:void 0,role:w.ariaRole??(Q?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${r1}-${C}`,"aria-label":w.ariaLabel,...w.domAttributes,children:z.jsx(iA,{value:t,children:z.jsx(j,{id:t,data:w.data,type:D,positionAbsoluteX:k.positionAbsolute.x,positionAbsoluteY:k.positionAbsolute.y,selected:w.selected??!1,selectable:Z,draggable:q,deletable:w.deletable??!0,isConnectable:lt,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:B,dragHandle:w.dragHandle,zIndex:k.z,parentId:w.parentId,...L})})})}var wA=W.memo(SA);const EA=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function p1(t){const{nodesDraggable:i,nodesConnectable:r,nodesFocusable:a,elementsSelectable:u,onError:s}=Bt(EA,ie),c=yA(t.onlyRenderVisibleElements),d=xA();return z.jsx("div",{className:"react-flow__nodes",style:As,children:c.map(m=>z.jsx(wA,{id:m,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:d,nodesDraggable:i,nodesConnectable:r,nodesFocusable:a,elementsSelectable:u,nodeClickDistance:t.nodeClickDistance,onError:s},m))})}p1.displayName="NodeRenderer";const _A=W.memo(p1);function CA(t){return Bt(W.useCallback(r=>{if(!t)return r.edges.map(u=>u.id);const a=[];if(r.width&&r.height)for(const u of r.edges){const s=r.nodeLookup.get(u.source),c=r.nodeLookup.get(u.target);s&&c&&SN({sourceNode:s,targetNode:c,width:r.width,height:r.height,transform:r.transform})&&a.push(u.id)}return a},[t]),ie)}const NA=({color:t="none",strokeWidth:i=1})=>{const r={strokeWidth:i,...t&&{stroke:t}};return z.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},TA=({color:t="none",strokeWidth:i=1})=>{const r={strokeWidth:i,...t&&{stroke:t,fill:t}};return z.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Y0={[cs.Arrow]:NA,[cs.ArrowClosed]:TA};function AA(t){const i=re();return W.useMemo(()=>Object.prototype.hasOwnProperty.call(Y0,t)?Y0[t]:(i.getState().onError?.("009",qn.error009(t)),null),[t])}const MA=({id:t,type:i,color:r,width:a=12.5,height:u=12.5,markerUnits:s="strokeWidth",strokeWidth:c,orient:d="auto-start-reverse"})=>{const m=AA(i);return m?z.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${a}`,markerHeight:`${u}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:d,refX:"0",refY:"0",children:z.jsx(m,{color:r,strokeWidth:c})}):null},m1=({defaultColor:t,rfId:i})=>{const r=Bt(s=>s.edges),a=Bt(s=>s.defaultEdgeOptions),u=W.useMemo(()=>MN(r,{id:i,defaultColor:t,defaultMarkerStart:a?.markerStart,defaultMarkerEnd:a?.markerEnd}),[r,a,i,t]);return u.length?z.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:z.jsx("defs",{children:u.map(s=>z.jsx(MA,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};m1.displayName="MarkerDefinitions";var zA=W.memo(m1);function g1({x:t,y:i,label:r,labelStyle:a,labelShowBg:u=!0,labelBgStyle:s,labelBgPadding:c=[2,4],labelBgBorderRadius:d=2,children:m,className:p,...g}){const[y,v]=W.useState({x:1,y:0,width:0,height:0}),x=ye(["react-flow__edge-textwrapper",p]),S=W.useRef(null);return W.useEffect(()=>{if(S.current){const C=S.current.getBBox();v({x:C.x,y:C.y,width:C.width,height:C.height})}},[r]),r?z.jsxs("g",{transform:`translate(${t-y.width/2} ${i-y.height/2})`,className:x,visibility:y.width?"visible":"hidden",...g,children:[u&&z.jsx("rect",{width:y.width+2*c[0],x:-c[0],y:-c[1],height:y.height+2*c[1],className:"react-flow__edge-textbg",style:s,rx:d,ry:d}),z.jsx("text",{className:"react-flow__edge-text",y:y.height/2,dy:"0.3em",ref:S,style:a,children:r}),m]}):null}g1.displayName="EdgeText";const OA=W.memo(g1);function Ms({path:t,labelX:i,labelY:r,label:a,labelStyle:u,labelShowBg:s,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:m,interactionWidth:p=20,...g}){return z.jsxs(z.Fragment,{children:[z.jsx("path",{...g,d:t,fill:"none",className:ye(["react-flow__edge-path",g.className])}),p?z.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,a&&Tn(i)&&Tn(r)?z.jsx(OA,{x:i,y:r,label:a,labelStyle:u,labelShowBg:s,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:m}):null]})}function Q0({pos:t,x1:i,y1:r,x2:a,y2:u}){return t===xt.Left||t===xt.Right?[.5*(i+a),r]:[i,.5*(r+u)]}function y1({sourceX:t,sourceY:i,sourcePosition:r=xt.Bottom,targetX:a,targetY:u,targetPosition:s=xt.Top}){const[c,d]=Q0({pos:r,x1:t,y1:i,x2:a,y2:u}),[m,p]=Q0({pos:s,x1:a,y1:u,x2:t,y2:i}),[g,y,v,x]=Vx({sourceX:t,sourceY:i,targetX:a,targetY:u,sourceControlX:c,sourceControlY:d,targetControlX:m,targetControlY:p});return[`M${t},${i} C${c},${d} ${m},${p} ${a},${u}`,g,y,v,x]}function v1(t){return W.memo(({id:i,sourceX:r,sourceY:a,targetX:u,targetY:s,sourcePosition:c,targetPosition:d,label:m,labelStyle:p,labelShowBg:g,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:S,markerEnd:C,markerStart:M,interactionWidth:E})=>{const[H,w,k]=y1({sourceX:r,sourceY:a,sourcePosition:c,targetX:u,targetY:s,targetPosition:d}),I=t.isInternal?void 0:i;return z.jsx(Ms,{id:I,path:H,labelX:w,labelY:k,label:m,labelStyle:p,labelShowBg:g,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:S,markerEnd:C,markerStart:M,interactionWidth:E})})}const DA=v1({isInternal:!1}),x1=v1({isInternal:!0});DA.displayName="SimpleBezierEdge";x1.displayName="SimpleBezierEdgeInternal";function b1(t){return W.memo(({id:i,sourceX:r,sourceY:a,targetX:u,targetY:s,label:c,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:y,style:v,sourcePosition:x=xt.Bottom,targetPosition:S=xt.Top,markerEnd:C,markerStart:M,pathOptions:E,interactionWidth:H})=>{const[w,k,I]=Vd({sourceX:r,sourceY:a,sourcePosition:x,targetX:u,targetY:s,targetPosition:S,borderRadius:E?.borderRadius,offset:E?.offset,stepPosition:E?.stepPosition}),D=t.isInternal?void 0:i;return z.jsx(Ms,{id:D,path:w,labelX:k,labelY:I,label:c,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:y,style:v,markerEnd:C,markerStart:M,interactionWidth:H})})}const S1=b1({isInternal:!1}),w1=b1({isInternal:!0});S1.displayName="SmoothStepEdge";w1.displayName="SmoothStepEdgeInternal";function E1(t){return W.memo(({id:i,...r})=>{const a=t.isInternal?void 0:i;return z.jsx(S1,{...r,id:a,pathOptions:W.useMemo(()=>({borderRadius:0,offset:r.pathOptions?.offset}),[r.pathOptions?.offset])})})}const kA=E1({isInternal:!1}),_1=E1({isInternal:!0});kA.displayName="StepEdge";_1.displayName="StepEdgeInternal";function C1(t){return W.memo(({id:i,sourceX:r,sourceY:a,targetX:u,targetY:s,label:c,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:y,style:v,markerEnd:x,markerStart:S,interactionWidth:C})=>{const[M,E,H]=Qx({sourceX:r,sourceY:a,targetX:u,targetY:s}),w=t.isInternal?void 0:i;return z.jsx(Ms,{id:w,path:M,labelX:E,labelY:H,label:c,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:y,style:v,markerEnd:x,markerStart:S,interactionWidth:C})})}const RA=C1({isInternal:!1}),N1=C1({isInternal:!0});RA.displayName="StraightEdge";N1.displayName="StraightEdgeInternal";function T1(t){return W.memo(({id:i,sourceX:r,sourceY:a,targetX:u,targetY:s,sourcePosition:c=xt.Bottom,targetPosition:d=xt.Top,label:m,labelStyle:p,labelShowBg:g,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:S,markerEnd:C,markerStart:M,pathOptions:E,interactionWidth:H})=>{const[w,k,I]=Ix({sourceX:r,sourceY:a,sourcePosition:c,targetX:u,targetY:s,targetPosition:d,curvature:E?.curvature}),D=t.isInternal?void 0:i;return z.jsx(Ms,{id:D,path:w,labelX:k,labelY:I,label:m,labelStyle:p,labelShowBg:g,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:S,markerEnd:C,markerStart:M,interactionWidth:H})})}const HA=T1({isInternal:!1}),A1=T1({isInternal:!0});HA.displayName="BezierEdge";A1.displayName="BezierEdgeInternal";const X0={default:A1,straight:N1,step:_1,smoothstep:w1,simplebezier:x1},G0={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},jA=(t,i,r)=>r===xt.Left?t-i:r===xt.Right?t+i:t,LA=(t,i,r)=>r===xt.Top?t-i:r===xt.Bottom?t+i:t,Z0="react-flow__edgeupdater";function F0({position:t,centerX:i,centerY:r,radius:a=10,onMouseDown:u,onMouseEnter:s,onMouseOut:c,type:d}){return z.jsx("circle",{onMouseDown:u,onMouseEnter:s,onMouseOut:c,className:ye([Z0,`${Z0}-${d}`]),cx:jA(i,a,t),cy:LA(r,a,t),r:a,stroke:"transparent",fill:"transparent"})}function BA({isReconnectable:t,reconnectRadius:i,edge:r,sourceX:a,sourceY:u,targetX:s,targetY:c,sourcePosition:d,targetPosition:m,onReconnect:p,onReconnectStart:g,onReconnectEnd:y,setReconnecting:v,setUpdateHover:x}){const S=re(),C=(k,I)=>{if(k.button!==0)return;const{autoPanOnConnect:D,domNode:j,connectionMode:q,connectionRadius:Z,lib:lt,onConnectStart:Q,cancelConnection:G,nodeLookup:nt,rfId:R,panBy:B,updateConnection:A}=S.getState(),L=I.type==="target",Y=(O,V)=>{v(!1),y?.(O,r,I.type,V)},K=O=>p?.(r,O),T=(O,V)=>{v(!0),g?.(k,r,I.type),Q?.(O,V)};Qd.onPointerDown(k.nativeEvent,{autoPanOnConnect:D,connectionMode:q,connectionRadius:Z,domNode:j,handleId:I.id,nodeId:I.nodeId,nodeLookup:nt,isTarget:L,edgeUpdaterType:I.type,lib:lt,flowId:R,cancelConnection:G,panBy:B,isValidConnection:(...O)=>S.getState().isValidConnection?.(...O)??!0,onConnect:K,onConnectStart:T,onConnectEnd:(...O)=>S.getState().onConnectEnd?.(...O),onReconnectEnd:Y,updateConnection:A,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:k.currentTarget})},M=k=>C(k,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),E=k=>C(k,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),H=()=>x(!0),w=()=>x(!1);return z.jsxs(z.Fragment,{children:[(t===!0||t==="source")&&z.jsx(F0,{position:d,centerX:a,centerY:u,radius:i,onMouseDown:M,onMouseEnter:H,onMouseOut:w,type:"source"}),(t===!0||t==="target")&&z.jsx(F0,{position:m,centerX:s,centerY:c,radius:i,onMouseDown:E,onMouseEnter:H,onMouseOut:w,type:"target"})]})}function UA({id:t,edgesFocusable:i,edgesReconnectable:r,elementsSelectable:a,onClick:u,onDoubleClick:s,onContextMenu:c,onMouseEnter:d,onMouseMove:m,onMouseLeave:p,reconnectRadius:g,onReconnect:y,onReconnectStart:v,onReconnectEnd:x,rfId:S,edgeTypes:C,noPanClassName:M,onError:E,disableKeyboardA11y:H}){let w=Bt(vt=>vt.edgeLookup.get(t));const k=Bt(vt=>vt.defaultEdgeOptions);w=k?{...k,...w}:w;let I=w.type||"default",D=C?.[I]||X0[I];D===void 0&&(E?.("011",qn.error011(I)),I="default",D=C?.default||X0.default);const j=!!(w.focusable||i&&typeof w.focusable>"u"),q=typeof y<"u"&&(w.reconnectable||r&&typeof w.reconnectable>"u"),Z=!!(w.selectable||a&&typeof w.selectable>"u"),lt=W.useRef(null),[Q,G]=W.useState(!1),[nt,R]=W.useState(!1),B=re(),{zIndex:A,sourceX:L,sourceY:Y,targetX:K,targetY:T,sourcePosition:O,targetPosition:V}=Bt(W.useCallback(vt=>{const Et=vt.nodeLookup.get(w.source),Ot=vt.nodeLookup.get(w.target);if(!Et||!Ot)return{zIndex:w.zIndex,...G0};const It=AN({id:t,sourceNode:Et,targetNode:Ot,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:vt.connectionMode,onError:E});return{zIndex:bN({selected:w.selected,zIndex:w.zIndex,sourceNode:Et,targetNode:Ot,elevateOnSelect:vt.elevateEdgesOnSelect,zIndexMode:vt.zIndexMode}),...It||G0}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),ie),N=W.useMemo(()=>w.markerStart?`url('#${Id(w.markerStart,S)}')`:void 0,[w.markerStart,S]),et=W.useMemo(()=>w.markerEnd?`url('#${Id(w.markerEnd,S)}')`:void 0,[w.markerEnd,S]);if(w.hidden||L===null||Y===null||K===null||T===null)return null;const st=vt=>{const{addSelectedEdges:Et,unselectNodesAndEdges:Ot,multiSelectionActive:It}=B.getState();Z&&(B.setState({nodesSelectionActive:!1}),w.selected&&It?(Ot({nodes:[],edges:[w]}),lt.current?.blur()):Et([t])),u&&u(vt,w)},ct=s?vt=>{s(vt,{...w})}:void 0,dt=c?vt=>{c(vt,{...w})}:void 0,ut=d?vt=>{d(vt,{...w})}:void 0,pt=m?vt=>{m(vt,{...w})}:void 0,wt=p?vt=>{p(vt,{...w})}:void 0,_t=vt=>{if(!H&&Tx.includes(vt.key)&&Z){const{unselectNodesAndEdges:Et,addSelectedEdges:Ot}=B.getState();vt.key==="Escape"?(lt.current?.blur(),Et({edges:[w]})):Ot([t])}};return z.jsx("svg",{style:{zIndex:A},children:z.jsxs("g",{className:ye(["react-flow__edge",`react-flow__edge-${I}`,w.className,M,{selected:w.selected,animated:w.animated,inactive:!Z&&!u,updating:Q,selectable:Z}]),onClick:st,onDoubleClick:ct,onContextMenu:dt,onMouseEnter:ut,onMouseMove:pt,onMouseLeave:wt,onKeyDown:j?_t:void 0,tabIndex:j?0:void 0,role:w.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":j?`${l1}-${S}`:void 0,ref:lt,...w.domAttributes,children:[!nt&&z.jsx(D,{id:t,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:Z,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:L,sourceY:Y,targetX:K,targetY:T,sourcePosition:O,targetPosition:V,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:N,markerEnd:et,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),q&&z.jsx(BA,{edge:w,isReconnectable:q,reconnectRadius:g,onReconnect:y,onReconnectStart:v,onReconnectEnd:x,sourceX:L,sourceY:Y,targetX:K,targetY:T,sourcePosition:O,targetPosition:V,setUpdateHover:G,setReconnecting:R})]})})}var qA=W.memo(UA);const VA=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function M1({defaultMarkerColor:t,onlyRenderVisibleElements:i,rfId:r,edgeTypes:a,noPanClassName:u,onReconnect:s,onEdgeContextMenu:c,onEdgeMouseEnter:d,onEdgeMouseMove:m,onEdgeMouseLeave:p,onEdgeClick:g,reconnectRadius:y,onEdgeDoubleClick:v,onReconnectStart:x,onReconnectEnd:S,disableKeyboardA11y:C}){const{edgesFocusable:M,edgesReconnectable:E,elementsSelectable:H,onError:w}=Bt(VA,ie),k=CA(i);return z.jsxs("div",{className:"react-flow__edges",children:[z.jsx(zA,{defaultColor:t,rfId:r}),k.map(I=>z.jsx(qA,{id:I,edgesFocusable:M,edgesReconnectable:E,elementsSelectable:H,noPanClassName:u,onReconnect:s,onContextMenu:c,onMouseEnter:d,onMouseMove:m,onMouseLeave:p,onClick:g,reconnectRadius:y,onDoubleClick:v,onReconnectStart:x,onReconnectEnd:S,rfId:r,onError:w,edgeTypes:a,disableKeyboardA11y:C},I))]})}M1.displayName="EdgeRenderer";const IA=W.memo(M1),YA=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function QA({children:t}){const i=Bt(YA);return z.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:i},children:t})}function XA(t){const i=_h(),r=W.useRef(!1);W.useEffect(()=>{!r.current&&i.viewportInitialized&&t&&(setTimeout(()=>t(i),1),r.current=!0)},[t,i.viewportInitialized])}const GA=t=>t.panZoom?.syncViewport;function ZA(t){const i=Bt(GA),r=re();return W.useEffect(()=>{t&&(i?.(t),r.setState({transform:[t.x,t.y,t.zoom]}))},[t,i]),null}function FA(t){return t.connection.inProgress?{...t.connection,to:uo(t.connection.to,t.transform)}:{...t.connection}}function KA(t){return FA}function $A(t){const i=KA();return Bt(i,ie)}const PA=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function JA({containerStyle:t,style:i,type:r,component:a}){const{nodesConnectable:u,width:s,height:c,isValid:d,inProgress:m}=Bt(PA,ie);return!(s&&u&&m)?null:z.jsx("svg",{style:t,width:s,height:c,className:"react-flow__connectionline react-flow__container",children:z.jsx("g",{className:ye(["react-flow__connection",zx(d)]),children:z.jsx(z1,{style:i,type:r,CustomComponent:a,isValid:d})})})}const z1=({style:t,type:i=Fi.Bezier,CustomComponent:r,isValid:a})=>{const{inProgress:u,from:s,fromNode:c,fromHandle:d,fromPosition:m,to:p,toNode:g,toHandle:y,toPosition:v,pointer:x}=$A();if(!u)return;if(r)return z.jsx(r,{connectionLineType:i,connectionLineStyle:t,fromNode:c,fromHandle:d,fromX:s.x,fromY:s.y,toX:p.x,toY:p.y,fromPosition:m,toPosition:v,connectionStatus:zx(a),toNode:g,toHandle:y,pointer:x});let S="";const C={sourceX:s.x,sourceY:s.y,sourcePosition:m,targetX:p.x,targetY:p.y,targetPosition:v};switch(i){case Fi.Bezier:[S]=Ix(C);break;case Fi.SimpleBezier:[S]=y1(C);break;case Fi.Step:[S]=Vd({...C,borderRadius:0});break;case Fi.SmoothStep:[S]=Vd(C);break;default:[S]=Qx(C)}return z.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};z1.displayName="ConnectionLine";const WA={};function K0(t=WA){W.useRef(t),re(),W.useEffect(()=>{},[t])}function tM(){re(),W.useRef(!1),W.useEffect(()=>{},[])}function O1({nodeTypes:t,edgeTypes:i,onInit:r,onNodeClick:a,onEdgeClick:u,onNodeDoubleClick:s,onEdgeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:m,onNodeMouseLeave:p,onNodeContextMenu:g,onSelectionContextMenu:y,onSelectionStart:v,onSelectionEnd:x,connectionLineType:S,connectionLineStyle:C,connectionLineComponent:M,connectionLineContainerStyle:E,selectionKeyCode:H,selectionOnDrag:w,selectionMode:k,multiSelectionKeyCode:I,panActivationKeyCode:D,zoomActivationKeyCode:j,deleteKeyCode:q,onlyRenderVisibleElements:Z,elementsSelectable:lt,defaultViewport:Q,translateExtent:G,minZoom:nt,maxZoom:R,preventScrolling:B,defaultMarkerColor:A,zoomOnScroll:L,zoomOnPinch:Y,panOnScroll:K,panOnScrollSpeed:T,panOnScrollMode:O,zoomOnDoubleClick:V,panOnDrag:N,onPaneClick:et,onPaneMouseEnter:st,onPaneMouseMove:ct,onPaneMouseLeave:dt,onPaneScroll:ut,onPaneContextMenu:pt,paneClickDistance:wt,nodeClickDistance:_t,onEdgeContextMenu:vt,onEdgeMouseEnter:Et,onEdgeMouseMove:Ot,onEdgeMouseLeave:It,reconnectRadius:Ut,onReconnect:oe,onReconnectStart:Ke,onReconnectEnd:Ae,noDragClassName:He,noWheelClassName:xn,noPanClassName:Yn,disableKeyboardA11y:Qn,nodeExtent:ve,rfId:gi,viewport:it,onViewportChange:ht}){return K0(t),K0(i),tM(),XA(r),ZA(it),z.jsx(mA,{onPaneClick:et,onPaneMouseEnter:st,onPaneMouseMove:ct,onPaneMouseLeave:dt,onPaneContextMenu:pt,onPaneScroll:ut,paneClickDistance:wt,deleteKeyCode:q,selectionKeyCode:H,selectionOnDrag:w,selectionMode:k,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:I,panActivationKeyCode:D,zoomActivationKeyCode:j,elementsSelectable:lt,zoomOnScroll:L,zoomOnPinch:Y,zoomOnDoubleClick:V,panOnScroll:K,panOnScrollSpeed:T,panOnScrollMode:O,panOnDrag:N,defaultViewport:Q,translateExtent:G,minZoom:nt,maxZoom:R,onSelectionContextMenu:y,preventScrolling:B,noDragClassName:He,noWheelClassName:xn,noPanClassName:Yn,disableKeyboardA11y:Qn,onViewportChange:ht,isControlledViewport:!!it,children:z.jsxs(QA,{children:[z.jsx(IA,{edgeTypes:i,onEdgeClick:u,onEdgeDoubleClick:c,onReconnect:oe,onReconnectStart:Ke,onReconnectEnd:Ae,onlyRenderVisibleElements:Z,onEdgeContextMenu:vt,onEdgeMouseEnter:Et,onEdgeMouseMove:Ot,onEdgeMouseLeave:It,reconnectRadius:Ut,defaultMarkerColor:A,noPanClassName:Yn,disableKeyboardA11y:Qn,rfId:gi}),z.jsx(JA,{style:C,type:S,component:M,containerStyle:E}),z.jsx("div",{className:"react-flow__edgelabel-renderer"}),z.jsx(_A,{nodeTypes:t,onNodeClick:a,onNodeDoubleClick:s,onNodeMouseEnter:d,onNodeMouseMove:m,onNodeMouseLeave:p,onNodeContextMenu:g,nodeClickDistance:_t,onlyRenderVisibleElements:Z,noPanClassName:Yn,noDragClassName:He,disableKeyboardA11y:Qn,nodeExtent:ve,rfId:gi}),z.jsx("div",{className:"react-flow__viewport-portal"})]})})}O1.displayName="GraphView";const eM=W.memo(O1),$0=({nodes:t,edges:i,defaultNodes:r,defaultEdges:a,width:u,height:s,fitView:c,fitViewOptions:d,minZoom:m=.5,maxZoom:p=2,nodeOrigin:g,nodeExtent:y,zIndexMode:v="basic"}={})=>{const x=new Map,S=new Map,C=new Map,M=new Map,E=a??i??[],H=r??t??[],w=g??[0,0],k=y??Ka;Zx(C,M,E);const I=Yd(H,x,S,{nodeOrigin:w,nodeExtent:k,zIndexMode:v});let D=[0,0,1];if(c&&u&&s){const j=ao(x,{filter:Q=>!!((Q.width||Q.initialWidth)&&(Q.height||Q.initialHeight))}),{x:q,y:Z,zoom:lt}=yh(j,u,s,m,p,d?.padding??.1);D=[q,Z,lt]}return{rfId:"1",width:u??0,height:s??0,transform:D,nodes:H,nodesInitialized:I,nodeLookup:x,parentLookup:S,edges:E,edgeLookup:M,connectionLookup:C,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:a!==void 0,panZoom:null,minZoom:m,maxZoom:p,translateExtent:Ka,nodeExtent:k,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Tl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,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:d,fitViewResolver:null,connection:{...Mx},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:pN,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Ax,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},nM=({nodes:t,edges:i,defaultNodes:r,defaultEdges:a,width:u,height:s,fitView:c,fitViewOptions:d,minZoom:m,maxZoom:p,nodeOrigin:g,nodeExtent:y,zIndexMode:v})=>vT((x,S)=>{async function C(){const{nodeLookup:M,panZoom:E,fitViewOptions:H,fitViewResolver:w,width:k,height:I,minZoom:D,maxZoom:j}=S();E&&(await dN({nodes:M,width:k,height:I,panZoom:E,minZoom:D,maxZoom:j},H),w?.resolve(!0),x({fitViewResolver:null}))}return{...$0({nodes:t,edges:i,width:u,height:s,fitView:c,fitViewOptions:d,minZoom:m,maxZoom:p,nodeOrigin:g,nodeExtent:y,defaultNodes:r,defaultEdges:a,zIndexMode:v}),setNodes:M=>{const{nodeLookup:E,parentLookup:H,nodeOrigin:w,elevateNodesOnSelect:k,fitViewQueued:I,zIndexMode:D}=S(),j=Yd(M,E,H,{nodeOrigin:w,nodeExtent:y,elevateNodesOnSelect:k,checkEquality:!0,zIndexMode:D});I&&j?(C(),x({nodes:M,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0})):x({nodes:M,nodesInitialized:j})},setEdges:M=>{const{connectionLookup:E,edgeLookup:H}=S();Zx(E,H,M),x({edges:M})},setDefaultNodesAndEdges:(M,E)=>{if(M){const{setNodes:H}=S();H(M),x({hasDefaultNodes:!0})}if(E){const{setEdges:H}=S();H(E),x({hasDefaultEdges:!0})}},updateNodeInternals:M=>{const{triggerNodeChanges:E,nodeLookup:H,parentLookup:w,domNode:k,nodeOrigin:I,nodeExtent:D,debug:j,fitViewQueued:q,zIndexMode:Z}=S(),{changes:lt,updatedInternals:Q}=jN(M,H,w,k,I,D,Z);Q&&(DN(H,w,{nodeOrigin:I,nodeExtent:D,zIndexMode:Z}),q?(C(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),lt?.length>0&&(j&&console.log("React Flow: trigger node changes",lt),E?.(lt)))},updateNodePositions:(M,E=!1)=>{const H=[];let w=[];const{nodeLookup:k,triggerNodeChanges:I,connection:D,updateConnection:j,onNodesChangeMiddlewareMap:q}=S();for(const[Z,lt]of M){const Q=k.get(Z),G=!!(Q?.expandParent&&Q?.parentId&&lt?.position),nt={id:Z,type:"position",position:G?{x:Math.max(0,lt.position.x),y:Math.max(0,lt.position.y)}:lt.position,dragging:E};if(Q&&D.inProgress&&D.fromNode.id===Q.id){const R=Ar(Q,D.fromHandle,xt.Left,!0);j({...D,from:R})}G&&Q.parentId&&H.push({id:Z,parentId:Q.parentId,rect:{...lt.internals.positionAbsolute,width:lt.measured.width??0,height:lt.measured.height??0}}),w.push(nt)}if(H.length>0){const{parentLookup:Z,nodeOrigin:lt}=S(),Q=Eh(H,k,Z,lt);w.push(...Q)}for(const Z of q.values())w=Z(w);I(w)},triggerNodeChanges:M=>{const{onNodesChange:E,setNodes:H,nodes:w,hasDefaultNodes:k,debug:I}=S();if(M?.length){if(k){const D=UT(M,w);H(D)}I&&console.log("React Flow: trigger node changes",M),E?.(M)}},triggerEdgeChanges:M=>{const{onEdgesChange:E,setEdges:H,edges:w,hasDefaultEdges:k,debug:I}=S();if(M?.length){if(k){const D=qT(M,w);H(D)}I&&console.log("React Flow: trigger edge changes",M),E?.(M)}},addSelectedNodes:M=>{const{multiSelectionActive:E,edgeLookup:H,nodeLookup:w,triggerNodeChanges:k,triggerEdgeChanges:I}=S();if(E){const D=M.map(j=>xr(j,!0));k(D);return}k(bl(w,new Set([...M]),!0)),I(bl(H))},addSelectedEdges:M=>{const{multiSelectionActive:E,edgeLookup:H,nodeLookup:w,triggerNodeChanges:k,triggerEdgeChanges:I}=S();if(E){const D=M.map(j=>xr(j,!0));I(D);return}I(bl(H,new Set([...M]))),k(bl(w,new Set,!0))},unselectNodesAndEdges:({nodes:M,edges:E}={})=>{const{edges:H,nodes:w,nodeLookup:k,triggerNodeChanges:I,triggerEdgeChanges:D}=S(),j=M||w,q=E||H,Z=[];for(const Q of j){if(!Q.selected)continue;const G=k.get(Q.id);G&&(G.selected=!1),Z.push(xr(Q.id,!1))}const lt=[];for(const Q of q)Q.selected&&lt.push(xr(Q.id,!1));I(Z),D(lt)},setMinZoom:M=>{const{panZoom:E,maxZoom:H}=S();E?.setScaleExtent([M,H]),x({minZoom:M})},setMaxZoom:M=>{const{panZoom:E,minZoom:H}=S();E?.setScaleExtent([H,M]),x({maxZoom:M})},setTranslateExtent:M=>{S().panZoom?.setTranslateExtent(M),x({translateExtent:M})},resetSelectedElements:()=>{const{edges:M,nodes:E,triggerNodeChanges:H,triggerEdgeChanges:w,elementsSelectable:k}=S();if(!k)return;const I=E.reduce((j,q)=>q.selected?[...j,xr(q.id,!1)]:j,[]),D=M.reduce((j,q)=>q.selected?[...j,xr(q.id,!1)]:j,[]);H(I),w(D)},setNodeExtent:M=>{const{nodes:E,nodeLookup:H,parentLookup:w,nodeOrigin:k,elevateNodesOnSelect:I,nodeExtent:D,zIndexMode:j}=S();M[0][0]===D[0][0]&&M[0][1]===D[0][1]&&M[1][0]===D[1][0]&&M[1][1]===D[1][1]||(Yd(E,H,w,{nodeOrigin:k,nodeExtent:M,elevateNodesOnSelect:I,checkEquality:!1,zIndexMode:j}),x({nodeExtent:M}))},panBy:M=>{const{transform:E,width:H,height:w,panZoom:k,translateExtent:I}=S();return LN({delta:M,panZoom:k,transform:E,translateExtent:I,width:H,height:w})},setCenter:async(M,E,H)=>{const{width:w,height:k,maxZoom:I,panZoom:D}=S();if(!D)return Promise.resolve(!1);const j=typeof H?.zoom<"u"?H.zoom:I;return await D.setViewport({x:w/2-M*j,y:k/2-E*j,zoom:j},{duration:H?.duration,ease:H?.ease,interpolate:H?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{x({connection:{...Mx}})},updateConnection:M=>{x({connection:M})},reset:()=>x({...$0()})}},Object.is);function iM({initialNodes:t,initialEdges:i,defaultNodes:r,defaultEdges:a,initialWidth:u,initialHeight:s,initialMinZoom:c,initialMaxZoom:d,initialFitViewOptions:m,fitView:p,nodeOrigin:g,nodeExtent:y,zIndexMode:v,children:x}){const[S]=W.useState(()=>nM({nodes:t,edges:i,defaultNodes:r,defaultEdges:a,width:u,height:s,fitView:p,minZoom:c,maxZoom:d,fitViewOptions:m,nodeOrigin:g,nodeExtent:y,zIndexMode:v}));return z.jsx(xT,{value:S,children:z.jsx(QT,{children:x})})}function rM({children:t,nodes:i,edges:r,defaultNodes:a,defaultEdges:u,width:s,height:c,fitView:d,fitViewOptions:m,minZoom:p,maxZoom:g,nodeOrigin:y,nodeExtent:v,zIndexMode:x}){return W.useContext(Ns)?z.jsx(z.Fragment,{children:t}):z.jsx(iM,{initialNodes:i,initialEdges:r,defaultNodes:a,defaultEdges:u,initialWidth:s,initialHeight:c,fitView:d,initialFitViewOptions:m,initialMinZoom:p,initialMaxZoom:g,nodeOrigin:y,nodeExtent:v,zIndexMode:x,children:t})}const lM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function aM({nodes:t,edges:i,defaultNodes:r,defaultEdges:a,className:u,nodeTypes:s,edgeTypes:c,onNodeClick:d,onEdgeClick:m,onInit:p,onMove:g,onMoveStart:y,onMoveEnd:v,onConnect:x,onConnectStart:S,onConnectEnd:C,onClickConnectStart:M,onClickConnectEnd:E,onNodeMouseEnter:H,onNodeMouseMove:w,onNodeMouseLeave:k,onNodeContextMenu:I,onNodeDoubleClick:D,onNodeDragStart:j,onNodeDrag:q,onNodeDragStop:Z,onNodesDelete:lt,onEdgesDelete:Q,onDelete:G,onSelectionChange:nt,onSelectionDragStart:R,onSelectionDrag:B,onSelectionDragStop:A,onSelectionContextMenu:L,onSelectionStart:Y,onSelectionEnd:K,onBeforeDelete:T,connectionMode:O,connectionLineType:V=Fi.Bezier,connectionLineStyle:N,connectionLineComponent:et,connectionLineContainerStyle:st,deleteKeyCode:ct="Backspace",selectionKeyCode:dt="Shift",selectionOnDrag:ut=!1,selectionMode:pt=$a.Full,panActivationKeyCode:wt="Space",multiSelectionKeyCode:_t=Ja()?"Meta":"Control",zoomActivationKeyCode:vt=Ja()?"Meta":"Control",snapToGrid:Et,snapGrid:Ot,onlyRenderVisibleElements:It=!1,selectNodesOnDrag:Ut,nodesDraggable:oe,autoPanOnNodeFocus:Ke,nodesConnectable:Ae,nodesFocusable:He,nodeOrigin:xn=a1,edgesFocusable:Yn,edgesReconnectable:Qn,elementsSelectable:ve=!0,defaultViewport:gi=DT,minZoom:it=.5,maxZoom:ht=2,translateExtent:bt=Ka,preventScrolling:zt=!0,nodeExtent:Lt,defaultMarkerColor:ke="#b1b1b7",zoomOnScroll:bn=!0,zoomOnPinch:we=!0,panOnScroll:ue=!1,panOnScrollSpeed:Me=.5,panOnScrollMode:Xt=Er.Free,zoomOnDoubleClick:zn=!0,panOnDrag:$e=!0,onPaneClick:ks,onPaneMouseEnter:zr,onPaneMouseMove:Or,onPaneMouseLeave:Dr,onPaneScroll:Xn,onPaneContextMenu:kr,paneClickDistance:Ji=1,nodeClickDistance:Rs=0,children:fo,onReconnect:Hl,onReconnectStart:Wi,onReconnectEnd:Hs,onEdgeContextMenu:ho,onEdgeDoubleClick:po,onEdgeMouseEnter:mo,onEdgeMouseMove:jl,onEdgeMouseLeave:Ll,reconnectRadius:go=10,onNodesChange:yo,onEdgesChange:On,noDragClassName:xe="nodrag",noWheelClassName:ze="nowheel",noPanClassName:Gn="nopan",fitView:Rr,fitViewOptions:vo,connectOnClick:js,attributionPosition:xo,proOptions:tr,defaultEdgeOptions:Bl,elevateNodesOnSelect:yi=!0,elevateEdgesOnSelect:vi=!1,disableKeyboardA11y:xi=!1,autoPanOnConnect:bi,autoPanOnNodeDrag:fe,autoPanSpeed:bo,connectionRadius:So,isValidConnection:Zn,onError:Si,style:Ls,id:Ul,nodeDragThreshold:wo,connectionDragThreshold:Bs,viewport:Hr,onViewportChange:jr,width:Sn,height:je,colorMode:Eo="light",debug:Us,onScroll:Lr,ariaLabelConfig:_o,zIndexMode:er="basic",...qs},Le){const nr=Ul||"1",Co=jT(Eo),ql=W.useCallback(Fn=>{Fn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Lr?.(Fn)},[Lr]);return z.jsx("div",{"data-testid":"rf__wrapper",...qs,onScroll:ql,style:{...Ls,...lM},ref:Le,className:ye(["react-flow",u,Co]),id:Ul,role:"application",children:z.jsxs(rM,{nodes:t,edges:i,width:Sn,height:je,fitView:Rr,fitViewOptions:vo,minZoom:it,maxZoom:ht,nodeOrigin:xn,nodeExtent:Lt,zIndexMode:er,children:[z.jsx(eM,{onInit:p,onNodeClick:d,onEdgeClick:m,onNodeMouseEnter:H,onNodeMouseMove:w,onNodeMouseLeave:k,onNodeContextMenu:I,onNodeDoubleClick:D,nodeTypes:s,edgeTypes:c,connectionLineType:V,connectionLineStyle:N,connectionLineComponent:et,connectionLineContainerStyle:st,selectionKeyCode:dt,selectionOnDrag:ut,selectionMode:pt,deleteKeyCode:ct,multiSelectionKeyCode:_t,panActivationKeyCode:wt,zoomActivationKeyCode:vt,onlyRenderVisibleElements:It,defaultViewport:gi,translateExtent:bt,minZoom:it,maxZoom:ht,preventScrolling:zt,zoomOnScroll:bn,zoomOnPinch:we,zoomOnDoubleClick:zn,panOnScroll:ue,panOnScrollSpeed:Me,panOnScrollMode:Xt,panOnDrag:$e,onPaneClick:ks,onPaneMouseEnter:zr,onPaneMouseMove:Or,onPaneMouseLeave:Dr,onPaneScroll:Xn,onPaneContextMenu:kr,paneClickDistance:Ji,nodeClickDistance:Rs,onSelectionContextMenu:L,onSelectionStart:Y,onSelectionEnd:K,onReconnect:Hl,onReconnectStart:Wi,onReconnectEnd:Hs,onEdgeContextMenu:ho,onEdgeDoubleClick:po,onEdgeMouseEnter:mo,onEdgeMouseMove:jl,onEdgeMouseLeave:Ll,reconnectRadius:go,defaultMarkerColor:ke,noDragClassName:xe,noWheelClassName:ze,noPanClassName:Gn,rfId:nr,disableKeyboardA11y:xi,nodeExtent:Lt,viewport:Hr,onViewportChange:jr}),z.jsx(HT,{nodes:t,edges:i,defaultNodes:r,defaultEdges:a,onConnect:x,onConnectStart:S,onConnectEnd:C,onClickConnectStart:M,onClickConnectEnd:E,nodesDraggable:oe,autoPanOnNodeFocus:Ke,nodesConnectable:Ae,nodesFocusable:He,edgesFocusable:Yn,edgesReconnectable:Qn,elementsSelectable:ve,elevateNodesOnSelect:yi,elevateEdgesOnSelect:vi,minZoom:it,maxZoom:ht,nodeExtent:Lt,onNodesChange:yo,onEdgesChange:On,snapToGrid:Et,snapGrid:Ot,connectionMode:O,translateExtent:bt,connectOnClick:js,defaultEdgeOptions:Bl,fitView:Rr,fitViewOptions:vo,onNodesDelete:lt,onEdgesDelete:Q,onDelete:G,onNodeDragStart:j,onNodeDrag:q,onNodeDragStop:Z,onSelectionDrag:B,onSelectionDragStart:R,onSelectionDragStop:A,onMove:g,onMoveStart:y,onMoveEnd:v,noPanClassName:Gn,nodeOrigin:xn,rfId:nr,autoPanOnConnect:bi,autoPanOnNodeDrag:fe,autoPanSpeed:bo,onError:Si,connectionRadius:So,isValidConnection:Zn,selectNodesOnDrag:Ut,nodeDragThreshold:wo,connectionDragThreshold:Bs,onBeforeDelete:T,debug:Us,ariaLabelConfig:_o,zIndexMode:er}),z.jsx(OT,{onSelectionChange:nt}),fo,z.jsx(NT,{proOptions:tr,position:xo}),z.jsx(CT,{rfId:nr,disableKeyboardA11y:xi})]})})}var oM=u1(aM);function uM({dimensions:t,lineWidth:i,variant:r,className:a}){return z.jsx("path",{strokeWidth:i,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:ye(["react-flow__background-pattern",r,a])})}function sM({radius:t,className:i}){return z.jsx("circle",{cx:t,cy:t,r:t,className:ye(["react-flow__background-pattern","dots",i])})}var $i;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})($i||($i={}));const cM={[$i.Dots]:1,[$i.Lines]:1,[$i.Cross]:6},fM=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function D1({id:t,variant:i=$i.Dots,gap:r=20,size:a,lineWidth:u=1,offset:s=0,color:c,bgColor:d,style:m,className:p,patternClassName:g}){const y=W.useRef(null),{transform:v,patternId:x}=Bt(fM,ie),S=a||cM[i],C=i===$i.Dots,M=i===$i.Cross,E=Array.isArray(r)?r:[r,r],H=[E[0]*v[2]||1,E[1]*v[2]||1],w=S*v[2],k=Array.isArray(s)?s:[s,s],I=M?[w,w]:H,D=[k[0]*v[2]||1+I[0]/2,k[1]*v[2]||1+I[1]/2],j=`${x}${t||""}`;return z.jsxs("svg",{className:ye(["react-flow__background",p]),style:{...m,...As,"--xy-background-color-props":d,"--xy-background-pattern-color-props":c},ref:y,"data-testid":"rf__background",children:[z.jsx("pattern",{id:j,x:v[0]%H[0],y:v[1]%H[1],width:H[0],height:H[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${D[0]},-${D[1]})`,children:C?z.jsx(sM,{radius:w/2,className:g}):z.jsx(uM,{dimensions:I,lineWidth:u,variant:i,className:g})}),z.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}D1.displayName="Background";const dM=W.memo(D1);function hM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:z.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function pM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:z.jsx("path",{d:"M0 0h32v4.2H0z"})})}function mM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:z.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 gM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:z.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 yM(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:z.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 Xu({children:t,className:i,...r}){return z.jsx("button",{type:"button",className:ye(["react-flow__controls-button",i]),...r,children:t})}const vM=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function k1({style:t,showZoom:i=!0,showFitView:r=!0,showInteractive:a=!0,fitViewOptions:u,onZoomIn:s,onZoomOut:c,onFitView:d,onInteractiveChange:m,className:p,children:g,position:y="bottom-left",orientation:v="vertical","aria-label":x}){const S=re(),{isInteractive:C,minZoomReached:M,maxZoomReached:E,ariaLabelConfig:H}=Bt(vM,ie),{zoomIn:w,zoomOut:k,fitView:I}=_h(),D=()=>{w(),s?.()},j=()=>{k(),c?.()},q=()=>{I(u),d?.()},Z=()=>{S.setState({nodesDraggable:!C,nodesConnectable:!C,elementsSelectable:!C}),m?.(!C)},lt=v==="horizontal"?"horizontal":"vertical";return z.jsxs(Ts,{className:ye(["react-flow__controls",lt,p]),position:y,style:t,"data-testid":"rf__controls","aria-label":x??H["controls.ariaLabel"],children:[i&&z.jsxs(z.Fragment,{children:[z.jsx(Xu,{onClick:D,className:"react-flow__controls-zoomin",title:H["controls.zoomIn.ariaLabel"],"aria-label":H["controls.zoomIn.ariaLabel"],disabled:E,children:z.jsx(hM,{})}),z.jsx(Xu,{onClick:j,className:"react-flow__controls-zoomout",title:H["controls.zoomOut.ariaLabel"],"aria-label":H["controls.zoomOut.ariaLabel"],disabled:M,children:z.jsx(pM,{})})]}),r&&z.jsx(Xu,{className:"react-flow__controls-fitview",onClick:q,title:H["controls.fitView.ariaLabel"],"aria-label":H["controls.fitView.ariaLabel"],children:z.jsx(mM,{})}),a&&z.jsx(Xu,{className:"react-flow__controls-interactive",onClick:Z,title:H["controls.interactive.ariaLabel"],"aria-label":H["controls.interactive.ariaLabel"],children:C?z.jsx(yM,{}):z.jsx(gM,{})}),g]})}k1.displayName="Controls";const xM=W.memo(k1);function bM({id:t,x:i,y:r,width:a,height:u,style:s,color:c,strokeColor:d,strokeWidth:m,className:p,borderRadius:g,shapeRendering:y,selected:v,onClick:x}){const{background:S,backgroundColor:C}=s||{},M=c||S||C;return z.jsx("rect",{className:ye(["react-flow__minimap-node",{selected:v},p]),x:i,y:r,rx:g,ry:g,width:a,height:u,style:{fill:M,stroke:d,strokeWidth:m},shapeRendering:y,onClick:x?E=>x(E,t):void 0})}const SM=W.memo(bM),wM=t=>t.nodes.map(i=>i.id),fd=t=>t instanceof Function?t:()=>t;function EM({nodeStrokeColor:t,nodeColor:i,nodeClassName:r="",nodeBorderRadius:a=5,nodeStrokeWidth:u,nodeComponent:s=SM,onClick:c}){const d=Bt(wM,ie),m=fd(i),p=fd(t),g=fd(r),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return z.jsx(z.Fragment,{children:d.map(v=>z.jsx(CM,{id:v,nodeColorFunc:m,nodeStrokeColorFunc:p,nodeClassNameFunc:g,nodeBorderRadius:a,nodeStrokeWidth:u,NodeComponent:s,onClick:c,shapeRendering:y},v))})}function _M({id:t,nodeColorFunc:i,nodeStrokeColorFunc:r,nodeClassNameFunc:a,nodeBorderRadius:u,nodeStrokeWidth:s,shapeRendering:c,NodeComponent:d,onClick:m}){const{node:p,x:g,y,width:v,height:x}=Bt(S=>{const C=S.nodeLookup.get(t);if(!C)return{node:void 0,x:0,y:0,width:0,height:0};const M=C.internals.userNode,{x:E,y:H}=C.internals.positionAbsolute,{width:w,height:k}=mi(M);return{node:M,x:E,y:H,width:w,height:k}},ie);return!p||p.hidden||!jx(p)?null:z.jsx(d,{x:g,y,width:v,height:x,style:p.style,selected:!!p.selected,className:a(p),color:i(p),borderRadius:u,strokeColor:r(p),strokeWidth:s,shapeRendering:c,onClick:m,id:p.id})}const CM=W.memo(_M);var NM=W.memo(EM);const TM=200,AM=150,MM=t=>!t.hidden,zM=t=>{const i={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:i,boundingRect:t.nodeLookup.size>0?Hx(ao(t.nodeLookup,{filter:MM}),i):i,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},OM="react-flow__minimap-desc";function R1({style:t,className:i,nodeStrokeColor:r,nodeColor:a,nodeClassName:u="",nodeBorderRadius:s=5,nodeStrokeWidth:c,nodeComponent:d,bgColor:m,maskColor:p,maskStrokeColor:g,maskStrokeWidth:y,position:v="bottom-right",onClick:x,onNodeClick:S,pannable:C=!1,zoomable:M=!1,ariaLabel:E,inversePan:H,zoomStep:w=1,offsetScale:k=5}){const I=re(),D=W.useRef(null),{boundingRect:j,viewBB:q,rfId:Z,panZoom:lt,translateExtent:Q,flowWidth:G,flowHeight:nt,ariaLabelConfig:R}=Bt(zM,ie),B=t?.width??TM,A=t?.height??AM,L=j.width/B,Y=j.height/A,K=Math.max(L,Y),T=K*B,O=K*A,V=k*K,N=j.x-(T-j.width)/2-V,et=j.y-(O-j.height)/2-V,st=T+V*2,ct=O+V*2,dt=`${OM}-${Z}`,ut=W.useRef(0),pt=W.useRef();ut.current=K,W.useEffect(()=>{if(D.current&&lt)return pt.current=GN({domNode:D.current,panZoom:lt,getTransform:()=>I.getState().transform,getViewScale:()=>ut.current}),()=>{pt.current?.destroy()}},[lt]),W.useEffect(()=>{pt.current?.update({translateExtent:Q,width:G,height:nt,inversePan:H,pannable:C,zoomStep:w,zoomable:M})},[C,M,H,w,Q,G,nt]);const wt=x?Et=>{const[Ot,It]=pt.current?.pointer(Et)||[0,0];x(Et,{x:Ot,y:It})}:void 0,_t=S?W.useCallback((Et,Ot)=>{const It=I.getState().nodeLookup.get(Ot).internals.userNode;S(Et,It)},[]):void 0,vt=E??R["minimap.ariaLabel"];return z.jsx(Ts,{position:v,style:{...t,"--xy-minimap-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-width-props":typeof y=="number"?y*K:void 0,"--xy-minimap-node-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof c=="number"?c:void 0},className:ye(["react-flow__minimap",i]),"data-testid":"rf__minimap",children:z.jsxs("svg",{width:B,height:A,viewBox:`${N} ${et} ${st} ${ct}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":dt,ref:D,onClick:wt,children:[vt&&z.jsx("title",{id:dt,children:vt}),z.jsx(NM,{onClick:_t,nodeColor:a,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:u,nodeStrokeWidth:c,nodeComponent:d}),z.jsx("path",{className:"react-flow__minimap-mask",d:`M${N-V},${et-V}h${st+V*2}v${ct+V*2}h${-st-V*2}z
15
+ M${q.x},${q.y}h${q.width}v${q.height}h${-q.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}R1.displayName="MiniMap";W.memo(R1);const DM=t=>i=>t?`${Math.max(1/i.transform[2],1)}`:void 0,kM={[Ol.Line]:"right",[Ol.Handle]:"bottom-right"};function RM({nodeId:t,position:i,variant:r=Ol.Handle,className:a,style:u=void 0,children:s,color:c,minWidth:d=10,minHeight:m=10,maxWidth:p=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:y=!1,resizeDirection:v,autoScale:x=!0,shouldResize:S,onResizeStart:C,onResize:M,onResizeEnd:E}){const H=d1(),w=typeof t=="string"?t:H,k=re(),I=W.useRef(null),D=r===Ol.Handle,j=Bt(W.useCallback(DM(D&&x),[D,x]),ie),q=W.useRef(null),Z=i??kM[r];W.useEffect(()=>{if(!(!I.current||!w))return q.current||(q.current=aT({domNode:I.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:Q,transform:G,snapGrid:nt,snapToGrid:R,nodeOrigin:B,domNode:A}=k.getState();return{nodeLookup:Q,transform:G,snapGrid:nt,snapToGrid:R,nodeOrigin:B,paneDomNode:A}},onChange:(Q,G)=>{const{triggerNodeChanges:nt,nodeLookup:R,parentLookup:B,nodeOrigin:A}=k.getState(),L=[],Y={x:Q.x,y:Q.y},K=R.get(w);if(K&&K.expandParent&&K.parentId){const T=K.origin??A,O=Q.width??K.measured.width??0,V=Q.height??K.measured.height??0,N={id:K.id,parentId:K.parentId,rect:{width:O,height:V,...Lx({x:Q.x??K.position.x,y:Q.y??K.position.y},{width:O,height:V},K.parentId,R,T)}},et=Eh([N],R,B,A);L.push(...et),Y.x=Q.x?Math.max(T[0]*O,Q.x):void 0,Y.y=Q.y?Math.max(T[1]*V,Q.y):void 0}if(Y.x!==void 0&&Y.y!==void 0){const T={id:w,type:"position",position:{...Y}};L.push(T)}if(Q.width!==void 0&&Q.height!==void 0){const O={id:w,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:Q.width,height:Q.height}};L.push(O)}for(const T of G){const O={...T,type:"position"};L.push(O)}nt(L)},onEnd:({width:Q,height:G})=>{const nt={id:w,type:"dimensions",resizing:!1,dimensions:{width:Q,height:G}};k.getState().triggerNodeChanges([nt])}})),q.current.update({controlPosition:Z,boundaries:{minWidth:d,minHeight:m,maxWidth:p,maxHeight:g},keepAspectRatio:y,resizeDirection:v,onResizeStart:C,onResize:M,onResizeEnd:E,shouldResize:S}),()=>{q.current?.destroy()}},[Z,d,m,p,g,y,C,M,E,S]);const lt=Z.split("-");return z.jsx("div",{className:ye(["react-flow__resize-control","nodrag",...lt,r,a]),ref:I,style:{...u,scale:j,...c&&{[D?"backgroundColor":"borderColor"]:c}},children:s})}W.memo(RM);const P0=200,HM=60,J0=40,jM=40;function LM(t,i){if(t.length===0)return{};const r={},a={};for(const g of t)a[g.nodeId]=g,r[g.nodeId]||(r[g.nodeId]=[]);for(const g of t)g.parentNodeId&&r[g.parentNodeId]&&r[g.parentNodeId].push(g.nodeId);const u=t.filter(g=>!g.parentNodeId||!a[g.parentNodeId]),s={},c=[];for(const g of u)s[g.nodeId]=0,c.push(g.nodeId);for(;c.length>0;){const g=c.shift(),y=r[g]??[];for(const v of y)v in s||(s[v]=s[g]+1,c.push(v))}for(const g of t)g.nodeId in s||(s[g.nodeId]=0);const d={};let m=0;for(const[g,y]of Object.entries(s))d[y]||(d[y]=[]),d[y].push(g),y>m&&(m=y);for(const g of Object.keys(d))d[Number(g)].sort((y,v)=>{const x=a[y],S=a[v];return(x?.createdAtEventIndex??0)-(S?.createdAtEventIndex??0)});const p={};for(let g=0;g<=m;g++){const y=d[g]??[],x=-(y.length*P0+(y.length-1)*J0)/2;for(let S=0;S<y.length;S++)p[y[S]]={x:x+S*(P0+J0),y:g*(HM+jM)}}return p}const BM={step:{bg:"#1e3a5f",border:"#3b82f6"},checkpoint:{bg:"#1a3d2e",border:"#22c55e"},blocked_attempt:{bg:"#3d1a1a",border:"#ef4444"}};function UM({run:t,onNodeClick:i}){const{nodes:r,edges:a}=W.useMemo(()=>{const s=LM(t.nodes,t.edges),c=t.nodes.map(m=>{const p=BM[m.nodeKind],g=s[m.nodeId]??{x:0,y:0},y=!!m.stepLabel;return{id:m.nodeId,position:g,data:{label:qM(m)},style:{background:p.bg,border:`2px solid ${m.isPreferredTip?"#fbbf24":p.border}`,borderRadius:m.nodeKind==="checkpoint"?"50%":"8px",color:"#fafafa",padding:y?"6px 10px":"8px 12px",fontSize:y?"10px":"11px",fontFamily:y?"system-ui, sans-serif":"monospace",width:m.nodeKind==="checkpoint"?40:void 0,maxWidth:y?180:void 0,height:m.nodeKind==="checkpoint"?40:void 0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",boxShadow:m.isPreferredTip?"0 0 12px rgba(251, 191, 36, 0.4)":"none",cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal",lineHeight:"1.3",wordBreak:"break-word"}}}),d=t.edges.map((m,p)=>({id:`e-${p}`,source:m.fromNodeId,target:m.toNodeId,style:{stroke:m.edgeKind==="checkpoint"?"#22c55e":"#3b82f6",strokeWidth:2},animated:m.edgeKind==="acked_step"}));return{nodes:c,edges:d}},[t]),u=W.useCallback((s,c)=>i?.(c.id),[i]);return z.jsxs(oM,{nodes:r,edges:a,fitView:!0,proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,colorMode:"dark",onNodeClick:u,children:[z.jsx(dM,{color:"#333",gap:20}),z.jsx(xM,{})]})}function qM(t){const i=t.stepLabel??t.nodeId.slice(-8);return t.isPreferredTip?`* ${i}`:t.isTip?`> ${i}`:i}function VM(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const IM=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YM=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QM={};function W0(t,i){return(QM.jsx?YM:IM).test(t)}const XM=/[ \t\n\f\r]/g;function GM(t){return typeof t=="object"?t.type==="text"?tv(t.value):!1:tv(t)}function tv(t){return t.replace(XM,"")===""}class so{constructor(i,r,a){this.normal=r,this.property=i,a&&(this.space=a)}}so.prototype.normal={};so.prototype.property={};so.prototype.space=void 0;function H1(t,i){const r={},a={};for(const u of t)Object.assign(r,u.property),Object.assign(a,u.normal);return new so(r,a,i)}function Gd(t){return t.toLowerCase()}class Fe{constructor(i,r){this.attribute=r,this.property=i}}Fe.prototype.attribute="";Fe.prototype.booleanish=!1;Fe.prototype.boolean=!1;Fe.prototype.commaOrSpaceSeparated=!1;Fe.prototype.commaSeparated=!1;Fe.prototype.defined=!1;Fe.prototype.mustUseProperty=!1;Fe.prototype.number=!1;Fe.prototype.overloadedBoolean=!1;Fe.prototype.property="";Fe.prototype.spaceSeparated=!1;Fe.prototype.space=void 0;let ZM=0;const Mt=Mr(),ge=Mr(),Zd=Mr(),ft=Mr(),Jt=Mr(),El=Mr(),ln=Mr();function Mr(){return 2**++ZM}const Fd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:ge,commaOrSpaceSeparated:ln,commaSeparated:El,number:ft,overloadedBoolean:Zd,spaceSeparated:Jt},Symbol.toStringTag,{value:"Module"})),dd=Object.keys(Fd);class Nh extends Fe{constructor(i,r,a,u){let s=-1;if(super(i,r),ev(this,"space",u),typeof a=="number")for(;++s<dd.length;){const c=dd[s];ev(this,dd[s],(a&Fd[c])===Fd[c])}}}Nh.prototype.defined=!0;function ev(t,i,r){r&&(t[i]=r)}function Dl(t){const i={},r={};for(const[a,u]of Object.entries(t.properties)){const s=new Nh(a,t.transform(t.attributes||{},a),u,t.space);t.mustUseProperty&&t.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),i[a]=s,r[Gd(a)]=a,r[Gd(s.attribute)]=a}return new so(i,r,t.space)}const j1=Dl({properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:ft,ariaColIndex:ft,ariaColSpan:ft,ariaControls:Jt,ariaCurrent:null,ariaDescribedBy:Jt,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:Jt,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:Jt,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Jt,ariaLevel:ft,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:Jt,ariaPlaceholder:null,ariaPosInSet:ft,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:Jt,ariaRowCount:ft,ariaRowIndex:ft,ariaRowSpan:ft,ariaSelected:ge,ariaSetSize:ft,ariaSort:null,ariaValueMax:ft,ariaValueMin:ft,ariaValueNow:ft,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function L1(t,i){return i in t?t[i]:i}function B1(t,i){return L1(t,i.toLowerCase())}const FM=Dl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:El,acceptCharset:Jt,accessKey:Jt,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:Jt,autoFocus:Mt,autoPlay:Mt,blocking:Jt,capture:null,charSet:null,checked:Mt,cite:null,className:Jt,cols:ft,colSpan:null,content:null,contentEditable:ge,controls:Mt,controlsList:Jt,coords:ft|El,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:Zd,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:Jt,height:ft,hidden:Zd,high:ft,href:null,hrefLang:null,htmlFor:Jt,httpEquiv:Jt,id:null,imageSizes:null,imageSrcSet:null,inert:Mt,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:Jt,itemRef:Jt,itemScope:Mt,itemType:Jt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:ft,manifest:null,max:null,maxLength:ft,media:null,method:null,min:null,minLength:ft,multiple:Mt,muted:Mt,name:null,nonce:null,noModule:Mt,noValidate:Mt,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:Mt,optimum:ft,pattern:null,ping:Jt,placeholder:null,playsInline:Mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:Jt,required:Mt,reversed:Mt,rows:ft,rowSpan:ft,sandbox:Jt,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shadowRootClonable:Mt,shadowRootDelegatesFocus:Mt,shadowRootMode:null,shape:null,size:ft,sizes:null,slot:null,span:ft,spellCheck:ge,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ft,step:null,style:null,tabIndex:ft,target:null,title:null,translate:null,type:null,typeMustMatch:Mt,useMap:null,value:ge,width:ft,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Jt,axis:null,background:null,bgColor:null,border:ft,borderColor:null,bottomMargin:ft,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Mt,declare:Mt,event:null,face:null,frame:null,frameBorder:null,hSpace:ft,leftMargin:ft,link:null,longDesc:null,lowSrc:null,marginHeight:ft,marginWidth:ft,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:ft,rules:null,scheme:null,scrolling:ge,standby:null,summary:null,text:null,topMargin:ft,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ft,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:ft,security:null,unselectable:null},space:"html",transform:B1}),KM=Dl({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:ln,accentHeight:ft,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ft,amplitude:ft,arabicForm:null,ascent:ft,attributeName:null,attributeType:null,azimuth:ft,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ft,by:null,calcMode:null,capHeight:ft,className:Jt,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:ft,diffuseConstant:ft,direction:null,display:null,dur:null,divisor:ft,dominantBaseline:null,download:Mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ft,enableBackground:null,end:null,event:null,exponent:ft,externalResourcesRequired:null,fill:null,fillOpacity:ft,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:El,g2:El,glyphName:El,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ft,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ft,horizOriginX:ft,horizOriginY:ft,id:null,ideographic:ft,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ft,k:ft,k1:ft,k2:ft,k3:ft,k4:ft,kernelMatrix:ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ft,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:ft,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:ft,overlineThickness:ft,paintOrder:null,panose1:null,path:null,pathLength:ft,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Jt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ft,pointsAtY:ft,pointsAtZ:ft,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ln,rev:ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ln,requiredFeatures:ln,requiredFonts:ln,requiredFormats:ln,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:ft,specularExponent:ft,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ft,strikethroughThickness:ft,string:null,stroke:null,strokeDashArray:ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ft,strokeOpacity:ft,strokeWidth:null,style:null,surfaceScale:ft,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ln,tabIndex:ft,tableValues:null,target:null,targetX:ft,targetY:ft,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ft,underlineThickness:ft,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ft,values:null,vAlphabetic:ft,vMathematical:ft,vectorEffect:null,vHanging:ft,vIdeographic:ft,version:null,vertAdvY:ft,vertOriginX:ft,vertOriginY:ft,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ft,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:L1}),U1=Dl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),q1=Dl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:B1}),V1=Dl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),$M={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"},PM=/[A-Z]/g,nv=/-[a-z]/g,JM=/^data[-\w.:]+$/i;function WM(t,i){const r=Gd(i);let a=i,u=Fe;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&JM.test(i)){if(i.charAt(4)==="-"){const s=i.slice(5).replace(nv,ez);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=i.slice(4);if(!nv.test(s)){let c=s.replace(PM,tz);c.charAt(0)!=="-"&&(c="-"+c),i="data"+c}}u=Nh}return new u(a,i)}function tz(t){return"-"+t.toLowerCase()}function ez(t){return t.charAt(1).toUpperCase()}const nz=H1([j1,FM,U1,q1,V1],"html"),Th=H1([j1,KM,U1,q1,V1],"svg");function iz(t){return t.join(" ").trim()}var yl={},hd,iv;function rz(){if(iv)return hd;iv=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,m=`
16
+ `,p="/",g="*",y="",v="comment",x="declaration";function S(M,E){if(typeof M!="string")throw new TypeError("First argument must be a string");if(!M)return[];E=E||{};var H=1,w=1;function k(R){var B=R.match(i);B&&(H+=B.length);var A=R.lastIndexOf(m);w=~A?R.length-A:w+R.length}function I(){var R={line:H,column:w};return function(B){return B.position=new D(R),Z(),B}}function D(R){this.start=R,this.end={line:H,column:w},this.source=E.source}D.prototype.content=M;function j(R){var B=new Error(E.source+":"+H+":"+w+": "+R);if(B.reason=R,B.filename=E.source,B.line=H,B.column=w,B.source=M,!E.silent)throw B}function q(R){var B=R.exec(M);if(B){var A=B[0];return k(A),M=M.slice(A.length),B}}function Z(){q(r)}function lt(R){var B;for(R=R||[];B=Q();)B!==!1&&R.push(B);return R}function Q(){var R=I();if(!(p!=M.charAt(0)||g!=M.charAt(1))){for(var B=2;y!=M.charAt(B)&&(g!=M.charAt(B)||p!=M.charAt(B+1));)++B;if(B+=2,y===M.charAt(B-1))return j("End of comment missing");var A=M.slice(2,B-2);return w+=2,k(A),M=M.slice(B),w+=2,R({type:v,comment:A})}}function G(){var R=I(),B=q(a);if(B){if(Q(),!q(u))return j("property missing ':'");var A=q(s),L=R({type:x,property:C(B[0].replace(t,y)),value:A?C(A[0].replace(t,y)):y});return q(c),L}}function nt(){var R=[];lt(R);for(var B;B=G();)B!==!1&&(R.push(B),lt(R));return R}return Z(),nt()}function C(M){return M?M.replace(d,y):y}return hd=S,hd}var rv;function lz(){if(rv)return yl;rv=1;var t=yl&&yl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(yl,"__esModule",{value:!0}),yl.default=r;const i=t(rz());function r(a,u){let s=null;if(!a||typeof a!="string")return s;const c=(0,i.default)(a),d=typeof u=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:g}=m;d?u(p,g,m):g&&(s=s||{},s[p]=g)}),s}return yl}var Da={},lv;function az(){if(lv)return Da;lv=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(p){return!p||r.test(p)||t.test(p)},c=function(p,g){return g.toUpperCase()},d=function(p,g){return"".concat(g,"-")},m=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(u,d):p=p.replace(a,d),p.replace(i,c))};return Da.camelCase=m,Da}var ka,av;function oz(){if(av)return ka;av=1;var t=ka&&ka.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},i=t(lz()),r=az();function a(u,s){var c={};return!u||typeof u!="string"||(0,i.default)(u,function(d,m){d&&m&&(c[(0,r.camelCase)(d,s)]=m)}),c}return a.default=a,ka=a,ka}var uz=oz();const sz=ys(uz),I1=Y1("end"),Ah=Y1("start");function Y1(t){return i;function i(r){const a=r&&r.position&&r.position[t]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function cz(t){const i=Ah(t),r=I1(t);if(i&&r)return{start:i,end:r}}function qa(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ov(t.position):"start"in t||"end"in t?ov(t):"line"in t||"column"in t?Kd(t):""}function Kd(t){return uv(t&&t.line)+":"+uv(t&&t.column)}function ov(t){return Kd(t&&t.start)+"-"+Kd(t&&t.end)}function uv(t){return t&&typeof t=="number"?t:1}class De extends Error{constructor(i,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let u="",s={},c=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof i=="string"?u=i:!s.cause&&i&&(c=!0,u=i.message,s.cause=i),!s.ruleId&&!s.source&&typeof a=="string"){const m=a.indexOf(":");m===-1?s.ruleId=a:(s.source=a.slice(0,m),s.ruleId=a.slice(m+1))}if(!s.place&&s.ancestors&&s.ancestors){const m=s.ancestors[s.ancestors.length-1];m&&(s.place=m.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=d?d.line:void 0,this.name=qa(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}De.prototype.file="";De.prototype.name="";De.prototype.reason="";De.prototype.message="";De.prototype.stack="";De.prototype.column=void 0;De.prototype.line=void 0;De.prototype.ancestors=void 0;De.prototype.cause=void 0;De.prototype.fatal=void 0;De.prototype.place=void 0;De.prototype.ruleId=void 0;De.prototype.source=void 0;const Mh={}.hasOwnProperty,fz=new Map,dz=/[A-Z]/g,hz=new Set(["table","tbody","thead","tfoot","tr"]),pz=new Set(["td","th"]),Q1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function mz(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let a;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=Ez(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=wz(r,i.jsx,i.jsxs)}const u={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:a,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Th:nz,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},s=X1(u,t,void 0);return s&&typeof s!="string"?s:u.create(t,u.Fragment,{children:s||void 0},void 0)}function X1(t,i,r){if(i.type==="element")return gz(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return yz(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return xz(t,i,r);if(i.type==="mdxjsEsm")return vz(t,i);if(i.type==="root")return bz(t,i,r);if(i.type==="text")return Sz(t,i)}function gz(t,i,r){const a=t.schema;let u=a;i.tagName.toLowerCase()==="svg"&&a.space==="html"&&(u=Th,t.schema=u),t.ancestors.push(i);const s=Z1(t,i.tagName,!1),c=_z(t,i);let d=Oh(t,i);return hz.has(i.tagName)&&(d=d.filter(function(m){return typeof m=="string"?!GM(m):!0})),G1(t,c,s,i),zh(c,d),t.ancestors.pop(),t.schema=a,t.create(i,s,c,r)}function yz(t,i){if(i.data&&i.data.estree&&t.evaluater){const a=i.data.estree.body[0];return a.type,t.evaluater.evaluateExpression(a.expression)}to(t,i.position)}function vz(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);to(t,i.position)}function xz(t,i,r){const a=t.schema;let u=a;i.name==="svg"&&a.space==="html"&&(u=Th,t.schema=u),t.ancestors.push(i);const s=i.name===null?t.Fragment:Z1(t,i.name,!0),c=Cz(t,i),d=Oh(t,i);return G1(t,c,s,i),zh(c,d),t.ancestors.pop(),t.schema=a,t.create(i,s,c,r)}function bz(t,i,r){const a={};return zh(a,Oh(t,i)),t.create(i,t.Fragment,a,r)}function Sz(t,i){return i.value}function G1(t,i,r,a){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=a)}function zh(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function wz(t,i,r){return a;function a(u,s,c,d){const p=Array.isArray(c.children)?r:i;return d?p(s,c,d):p(s,c)}}function Ez(t,i){return r;function r(a,u,s,c){const d=Array.isArray(s.children),m=Ah(a);return i(u,s,c,d,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function _z(t,i){const r={};let a,u;for(u in i.properties)if(u!=="children"&&Mh.call(i.properties,u)){const s=Nz(t,u,i.properties[u]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&pz.has(i.tagName)?a=d:r[c]=d}}if(a){const s=r.style||(r.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function Cz(t,i){const r={};for(const a of i.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&t.evaluater){const s=a.data.estree.body[0];s.type;const c=s.expression;c.type;const d=c.properties[0];d.type,Object.assign(r,t.evaluater.evaluateExpression(d.argument))}else to(t,i.position);else{const u=a.name;let s;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&t.evaluater){const d=a.value.data.estree.body[0];d.type,s=t.evaluater.evaluateExpression(d.expression)}else to(t,i.position);else s=a.value===null?!0:a.value;r[u]=s}return r}function Oh(t,i){const r=[];let a=-1;const u=t.passKeys?new Map:fz;for(;++a<i.children.length;){const s=i.children[a];let c;if(t.passKeys){const m=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(m){const p=u.get(m)||0;c=m+"-"+p,u.set(m,p+1)}}const d=X1(t,s,c);d!==void 0&&r.push(d)}return r}function Nz(t,i,r){const a=WM(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?VM(r):iz(r)),a.property==="style"){let u=typeof r=="object"?r:Tz(t,String(r));return t.stylePropertyNameCase==="css"&&(u=Az(u)),["style",u]}return[t.elementAttributeNameCase==="react"&&a.space?$M[a.property]||a.property:a.attribute,r]}}function Tz(t,i){try{return sz(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const a=r,u=new De("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=t.filePath||void 0,u.url=Q1+"#cannot-parse-style-attribute",u}}function Z1(t,i,r){let a;if(!r)a={type:"Literal",value:i};else if(i.includes(".")){const u=i.split(".");let s=-1,c;for(;++s<u.length;){const d=W0(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}a=c}else a=W0(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(a.type==="Literal"){const u=a.value;return Mh.call(t.components,u)?t.components[u]:u}if(t.evaluater)return t.evaluater.evaluateExpression(a);to(t)}function to(t,i){const r=new De("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=Q1+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Az(t){const i={};let r;for(r in t)Mh.call(t,r)&&(i[Mz(r)]=t[r]);return i}function Mz(t){let i=t.replace(dz,zz);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function zz(t){return"-"+t.toLowerCase()}const pd={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"]},Oz={};function Dz(t,i){const r=Oz,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,u=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return F1(t,a,u)}function F1(t,i,r){if(kz(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return sv(t.children,i,r)}return Array.isArray(t)?sv(t,i,r):""}function sv(t,i,r){const a=[];let u=-1;for(;++u<t.length;)a[u]=F1(t[u],i,r);return a.join("")}function kz(t){return!!(t&&typeof t=="object")}const cv=document.createElement("i");function Dh(t){const i="&"+t+";";cv.innerHTML=i;const r=cv.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function Vn(t,i,r,a){const u=t.length;let s=0,c;if(i<0?i=-i>u?0:u+i:i=i>u?u:i,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(i,r),t.splice(...c);else for(r&&t.splice(i,r);s<a.length;)c=a.slice(s,s+1e4),c.unshift(i,0),t.splice(...c),s+=1e4,i+=1e4}function vn(t,i){return t.length>0?(Vn(t,t.length,0,i),t):i}const fv={}.hasOwnProperty;function Rz(t){const i={};let r=-1;for(;++r<t.length;)Hz(i,t[r]);return i}function Hz(t,i){let r;for(r in i){const u=(fv.call(t,r)?t[r]:void 0)||(t[r]={}),s=i[r];let c;if(s)for(c in s){fv.call(u,c)||(u[c]=[]);const d=s[c];jz(u[c],Array.isArray(d)?d:d?[d]:[])}}}function jz(t,i){let r=-1;const a=[];for(;++r<i.length;)(i[r].add==="after"?t:a).push(i[r]);Vn(t,0,0,a)}function K1(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function _l(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Bn=Pi(/[A-Za-z]/),on=Pi(/[\dA-Za-z]/),Lz=Pi(/[#-'*+\--9=?A-Z^-~]/);function $d(t){return t!==null&&(t<32||t===127)}const Pd=Pi(/\d/),Bz=Pi(/[\dA-Fa-f]/),Uz=Pi(/[!-/:-@[-`{-~]/);function Ct(t){return t!==null&&t<-2}function Ze(t){return t!==null&&(t<0||t===32)}function Qt(t){return t===-2||t===-1||t===32}const qz=Pi(new RegExp("\\p{P}|\\p{S}","u")),Vz=Pi(/\s/);function Pi(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function kl(t){const i=[];let r=-1,a=0,u=0;for(;++r<t.length;){const s=t.charCodeAt(r);let c="";if(s===37&&on(t.charCodeAt(r+1))&&on(t.charCodeAt(r+2)))u=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const d=t.charCodeAt(r+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),u=1):c="�"}else c=String.fromCharCode(s);c&&(i.push(t.slice(a,r),encodeURIComponent(c)),a=r+u+1,c=""),u&&(r+=u,u=0)}return i.join("")+t.slice(a)}function Wt(t,i,r,a){const u=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(m){return Qt(m)?(t.enter(r),d(m)):i(m)}function d(m){return Qt(m)&&s++<u?(t.consume(m),d):(t.exit(r),i(m))}}const Iz={tokenize:Yz};function Yz(t){const i=t.attempt(this.parser.constructs.contentInitial,a,u);let r;return i;function a(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Wt(t,i,"linePrefix")}function u(d){return t.enter("paragraph"),s(d)}function s(d){const m=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return Ct(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const Qz={tokenize:Xz},dv={tokenize:Gz};function Xz(t){const i=this,r=[];let a=0,u,s,c;return d;function d(w){if(a<r.length){const k=r[a];return i.containerState=k[1],t.attempt(k[0].continuation,m,p)(w)}return p(w)}function m(w){if(a++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,u&&H();const k=i.events.length;let I=k,D;for(;I--;)if(i.events[I][0]==="exit"&&i.events[I][1].type==="chunkFlow"){D=i.events[I][1].end;break}E(a);let j=k;for(;j<i.events.length;)i.events[j][1].end={...D},j++;return Vn(i.events,I+1,0,i.events.slice(k)),i.events.length=j,p(w)}return d(w)}function p(w){if(a===r.length){if(!u)return v(w);if(u.currentConstruct&&u.currentConstruct.concrete)return S(w);i.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(dv,g,y)(w)}function g(w){return u&&H(),E(a),v(w)}function y(w){return i.parser.lazy[i.now().line]=a!==r.length,c=i.now().offset,S(w)}function v(w){return i.containerState={},t.attempt(dv,x,S)(w)}function x(w){return a++,r.push([i.currentConstruct,i.containerState]),v(w)}function S(w){if(w===null){u&&H(),E(0),t.consume(w);return}return u=u||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),C(w)}function C(w){if(w===null){M(t.exit("chunkFlow"),!0),E(0),t.consume(w);return}return Ct(w)?(t.consume(w),M(t.exit("chunkFlow")),a=0,i.interrupt=void 0,d):(t.consume(w),C)}function M(w,k){const I=i.sliceStream(w);if(k&&I.push(null),w.previous=s,s&&(s.next=w),s=w,u.defineSkip(w.start),u.write(I),i.parser.lazy[w.start.line]){let D=u.events.length;for(;D--;)if(u.events[D][1].start.offset<c&&(!u.events[D][1].end||u.events[D][1].end.offset>c))return;const j=i.events.length;let q=j,Z,lt;for(;q--;)if(i.events[q][0]==="exit"&&i.events[q][1].type==="chunkFlow"){if(Z){lt=i.events[q][1].end;break}Z=!0}for(E(a),D=j;D<i.events.length;)i.events[D][1].end={...lt},D++;Vn(i.events,q+1,0,i.events.slice(j)),i.events.length=D}}function E(w){let k=r.length;for(;k-- >w;){const I=r[k];i.containerState=I[1],I[0].exit.call(i,t)}r.length=w}function H(){u.write([null]),s=void 0,u=void 0,i.containerState._closeFlow=void 0}}function Gz(t,i,r){return Wt(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hv(t){if(t===null||Ze(t)||Vz(t))return 1;if(qz(t))return 2}function kh(t,i,r){const a=[];let u=-1;for(;++u<t.length;){const s=t[u].resolveAll;s&&!a.includes(s)&&(i=s(i,r),a.push(s))}return i}const Jd={name:"attention",resolveAll:Zz,tokenize:Fz};function Zz(t,i){let r=-1,a,u,s,c,d,m,p,g;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(a=r;a--;)if(t[a][0]==="exit"&&t[a][1].type==="attentionSequence"&&t[a][1]._open&&i.sliceSerialize(t[a][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[a][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[a][1].end.offset-t[a][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;m=t[a][1].end.offset-t[a][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const y={...t[a][1].end},v={...t[r][1].start};pv(y,-m),pv(v,m),c={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...t[a][1].end}},d={type:m>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:v},s={type:m>1?"strongText":"emphasisText",start:{...t[a][1].end},end:{...t[r][1].start}},u={type:m>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[a][1].end={...c.start},t[r][1].start={...d.end},p=[],t[a][1].end.offset-t[a][1].start.offset&&(p=vn(p,[["enter",t[a][1],i],["exit",t[a][1],i]])),p=vn(p,[["enter",u,i],["enter",c,i],["exit",c,i],["enter",s,i]]),p=vn(p,kh(i.parser.constructs.insideSpan.null,t.slice(a+1,r),i)),p=vn(p,[["exit",s,i],["enter",d,i],["exit",d,i],["exit",u,i]]),t[r][1].end.offset-t[r][1].start.offset?(g=2,p=vn(p,[["enter",t[r][1],i],["exit",t[r][1],i]])):g=0,Vn(t,a-1,r-a+3,p),r=a+p.length-g-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function Fz(t,i){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,u=hv(a);let s;return c;function c(m){return s=m,t.enter("attentionSequence"),d(m)}function d(m){if(m===s)return t.consume(m),d;const p=t.exit("attentionSequence"),g=hv(m),y=!g||g===2&&u||r.includes(m),v=!u||u===2&&g||r.includes(a);return p._open=!!(s===42?y:y&&(u||!v)),p._close=!!(s===42?v:v&&(g||!y)),i(m)}}function pv(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const Kz={name:"autolink",tokenize:$z};function $z(t,i,r){let a=0;return u;function u(x){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(x){return Bn(x)?(t.consume(x),c):x===64?r(x):p(x)}function c(x){return x===43||x===45||x===46||on(x)?(a=1,d(x)):p(x)}function d(x){return x===58?(t.consume(x),a=0,m):(x===43||x===45||x===46||on(x))&&a++<32?(t.consume(x),d):(a=0,p(x))}function m(x){return x===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),i):x===null||x===32||x===60||$d(x)?r(x):(t.consume(x),m)}function p(x){return x===64?(t.consume(x),g):Lz(x)?(t.consume(x),p):r(x)}function g(x){return on(x)?y(x):r(x)}function y(x){return x===46?(t.consume(x),a=0,g):x===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),i):v(x)}function v(x){if((x===45||on(x))&&a++<63){const S=x===45?v:y;return t.consume(x),S}return r(x)}}const zs={partial:!0,tokenize:Pz};function Pz(t,i,r){return a;function a(s){return Qt(s)?Wt(t,u,"linePrefix")(s):u(s)}function u(s){return s===null||Ct(s)?i(s):r(s)}}const $1={continuation:{tokenize:Wz},exit:t3,name:"blockQuote",tokenize:Jz};function Jz(t,i,r){const a=this;return u;function u(c){if(c===62){const d=a.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),s}return r(c)}function s(c){return Qt(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(c))}}function Wz(t,i,r){const a=this;return u;function u(c){return Qt(c)?Wt(t,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt($1,i,r)(c)}}function t3(t){t.exit("blockQuote")}const P1={name:"characterEscape",tokenize:e3};function e3(t,i,r){return a;function a(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),u}function u(s){return Uz(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(s)}}const J1={name:"characterReference",tokenize:n3};function n3(t,i,r){const a=this;let u=0,s,c;return d;function d(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),m}function m(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),p):(t.enter("characterReferenceValue"),s=31,c=on,g(y))}function p(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,c=Bz,g):(t.enter("characterReferenceValue"),s=7,c=Pd,g(y))}function g(y){if(y===59&&u){const v=t.exit("characterReferenceValue");return c===on&&!Dh(a.sliceSerialize(v))?r(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return c(y)&&u++<s?(t.consume(y),g):r(y)}}const mv={partial:!0,tokenize:r3},gv={concrete:!0,name:"codeFenced",tokenize:i3};function i3(t,i,r){const a=this,u={partial:!0,tokenize:I};let s=0,c=0,d;return m;function m(D){return p(D)}function p(D){const j=a.events[a.events.length-1];return s=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,d=D,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),g(D)}function g(D){return D===d?(c++,t.consume(D),g):c<3?r(D):(t.exit("codeFencedFenceSequence"),Qt(D)?Wt(t,y,"whitespace")(D):y(D))}function y(D){return D===null||Ct(D)?(t.exit("codeFencedFence"),a.interrupt?i(D):t.check(mv,C,k)(D)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),v(D))}function v(D){return D===null||Ct(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(D)):Qt(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Wt(t,x,"whitespace")(D)):D===96&&D===d?r(D):(t.consume(D),v)}function x(D){return D===null||Ct(D)?y(D):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||Ct(D)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(D)):D===96&&D===d?r(D):(t.consume(D),S)}function C(D){return t.attempt(u,k,M)(D)}function M(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),E}function E(D){return s>0&&Qt(D)?Wt(t,H,"linePrefix",s+1)(D):H(D)}function H(D){return D===null||Ct(D)?t.check(mv,C,k)(D):(t.enter("codeFlowValue"),w(D))}function w(D){return D===null||Ct(D)?(t.exit("codeFlowValue"),H(D)):(t.consume(D),w)}function k(D){return t.exit("codeFenced"),i(D)}function I(D,j,q){let Z=0;return lt;function lt(B){return D.enter("lineEnding"),D.consume(B),D.exit("lineEnding"),Q}function Q(B){return D.enter("codeFencedFence"),Qt(B)?Wt(D,G,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):G(B)}function G(B){return B===d?(D.enter("codeFencedFenceSequence"),nt(B)):q(B)}function nt(B){return B===d?(Z++,D.consume(B),nt):Z>=c?(D.exit("codeFencedFenceSequence"),Qt(B)?Wt(D,R,"whitespace")(B):R(B)):q(B)}function R(B){return B===null||Ct(B)?(D.exit("codeFencedFence"),j(B)):q(B)}}}function r3(t,i,r){const a=this;return u;function u(c){return c===null?r(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s)}function s(c){return a.parser.lazy[a.now().line]?r(c):i(c)}}const md={name:"codeIndented",tokenize:a3},l3={partial:!0,tokenize:o3};function a3(t,i,r){const a=this;return u;function u(p){return t.enter("codeIndented"),Wt(t,s,"linePrefix",5)(p)}function s(p){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(p):r(p)}function c(p){return p===null?m(p):Ct(p)?t.attempt(l3,c,m)(p):(t.enter("codeFlowValue"),d(p))}function d(p){return p===null||Ct(p)?(t.exit("codeFlowValue"),c(p)):(t.consume(p),d)}function m(p){return t.exit("codeIndented"),i(p)}}function o3(t,i,r){const a=this;return u;function u(c){return a.parser.lazy[a.now().line]?r(c):Ct(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):Wt(t,s,"linePrefix",5)(c)}function s(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(c):Ct(c)?u(c):r(c)}}const u3={name:"codeText",previous:c3,resolve:s3,tokenize:f3};function s3(t){let i=t.length-4,r=3,a,u;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(a=r;++a<i;)if(t[a][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(a=r-1,i++;++a<=i;)u===void 0?a!==i&&t[a][1].type!=="lineEnding"&&(u=a):(a===i||t[a][1].type==="lineEnding")&&(t[u][1].type="codeTextData",a!==u+2&&(t[u][1].end=t[a-1][1].end,t.splice(u+2,a-u-2),i-=a-u-2,a=u+2),u=void 0);return t}function c3(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function f3(t,i,r){let a=0,u,s;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),d(y)}function d(y){return y===96?(t.consume(y),a++,d):(t.exit("codeTextSequence"),m(y))}function m(y){return y===null?r(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),m):y===96?(s=t.enter("codeTextSequence"),u=0,g(y)):Ct(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),m):(t.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||Ct(y)?(t.exit("codeTextData"),m(y)):(t.consume(y),p)}function g(y){return y===96?(t.consume(y),u++,g):u===a?(t.exit("codeTextSequence"),t.exit("codeText"),i(y)):(s.type="codeTextData",p(y))}}class d3{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(i,a):i>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(i,r,a){const u=r||0;this.setCursor(Math.trunc(i));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return a&&Ra(this.left,a),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Ra(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Ra(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);Ra(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Ra(this.left,r.reverse())}}}function Ra(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function W1(t){const i={};let r=-1,a,u,s,c,d,m,p;const g=new d3(t);for(;++r<g.length;){for(;r in i;)r=i[r];if(a=g.get(r),r&&a[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(m=a[1]._tokenizer.events,s=0,s<m.length&&m[s][1].type==="lineEndingBlank"&&(s+=2),s<m.length&&m[s][1].type==="content"))for(;++s<m.length&&m[s][1].type!=="content";)m[s][1].type==="chunkText"&&(m[s][1]._isInFirstContentOfListItem=!0,s++);if(a[0]==="enter")a[1].contentType&&(Object.assign(i,h3(g,r)),r=i[r],p=!0);else if(a[1]._container){for(s=r,u=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(u&&(g.get(u)[1].type="lineEndingBlank"),c[1].type="lineEnding",u=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;u&&(a[1].end={...g.get(u)[1].start},d=g.slice(u,r),d.unshift(a),g.splice(u,r-u+1,d))}}return Vn(t,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function h3(t,i){const r=t.get(i)[1],a=t.get(i)[2];let u=i-1;const s=[];let c=r._tokenizer;c||(c=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,m=[],p={};let g,y,v=-1,x=r,S=0,C=0;const M=[C];for(;x;){for(;t.get(++u)[1]!==x;);s.push(u),x._tokenizer||(g=a.sliceStream(x),x.next||g.push(null),y&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=x,x=x.next}for(x=r;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(C=v+1,M.push(C),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):M.pop(),v=M.length;v--;){const E=d.slice(M[v],M[v+1]),H=s.pop();m.push([H,H+E.length-1]),t.splice(H,2,E)}for(m.reverse(),v=-1;++v<m.length;)p[S+m[v][0]]=S+m[v][1],S+=m[v][1]-m[v][0]-1;return p}const p3={resolve:g3,tokenize:y3},m3={partial:!0,tokenize:v3};function g3(t){return W1(t),t}function y3(t,i){let r;return a;function a(d){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),u(d)}function u(d){return d===null?s(d):Ct(d)?t.check(m3,c,s)(d):(t.consume(d),u)}function s(d){return t.exit("chunkContent"),t.exit("content"),i(d)}function c(d){return t.consume(d),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,u}}function v3(t,i,r){const a=this;return u;function u(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Wt(t,s,"linePrefix")}function s(c){if(c===null||Ct(c))return r(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(c):t.interrupt(a.parser.constructs.flow,r,i)(c)}}function tb(t,i,r,a,u,s,c,d,m){const p=m||Number.POSITIVE_INFINITY;let g=0;return y;function y(E){return E===60?(t.enter(a),t.enter(u),t.enter(s),t.consume(E),t.exit(s),v):E===null||E===32||E===41||$d(E)?r(E):(t.enter(a),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),C(E))}function v(E){return E===62?(t.enter(s),t.consume(E),t.exit(s),t.exit(u),t.exit(a),i):(t.enter(d),t.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===62?(t.exit("chunkString"),t.exit(d),v(E)):E===null||E===60||Ct(E)?r(E):(t.consume(E),E===92?S:x)}function S(E){return E===60||E===62||E===92?(t.consume(E),x):x(E)}function C(E){return!g&&(E===null||E===41||Ze(E))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(a),i(E)):g<p&&E===40?(t.consume(E),g++,C):E===41?(t.consume(E),g--,C):E===null||E===32||E===40||$d(E)?r(E):(t.consume(E),E===92?M:C)}function M(E){return E===40||E===41||E===92?(t.consume(E),C):C(E)}}function eb(t,i,r,a,u,s){const c=this;let d=0,m;return p;function p(x){return t.enter(a),t.enter(u),t.consume(x),t.exit(u),t.enter(s),g}function g(x){return d>999||x===null||x===91||x===93&&!m||x===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?r(x):x===93?(t.exit(s),t.enter(u),t.consume(x),t.exit(u),t.exit(a),i):Ct(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),g):(t.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||Ct(x)||d++>999?(t.exit("chunkString"),g(x)):(t.consume(x),m||(m=!Qt(x)),x===92?v:y)}function v(x){return x===91||x===92||x===93?(t.consume(x),d++,y):y(x)}}function nb(t,i,r,a,u,s){let c;return d;function d(v){return v===34||v===39||v===40?(t.enter(a),t.enter(u),t.consume(v),t.exit(u),c=v===40?41:v,m):r(v)}function m(v){return v===c?(t.enter(u),t.consume(v),t.exit(u),t.exit(a),i):(t.enter(s),p(v))}function p(v){return v===c?(t.exit(s),m(c)):v===null?r(v):Ct(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),Wt(t,p,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||Ct(v)?(t.exit("chunkString"),p(v)):(t.consume(v),v===92?y:g)}function y(v){return v===c||v===92?(t.consume(v),g):g(v)}}function Va(t,i){let r;return a;function a(u){return Ct(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),r=!0,a):Qt(u)?Wt(t,a,r?"linePrefix":"lineSuffix")(u):i(u)}}const x3={name:"definition",tokenize:S3},b3={partial:!0,tokenize:w3};function S3(t,i,r){const a=this;let u;return s;function s(x){return t.enter("definition"),c(x)}function c(x){return eb.call(a,t,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return u=_l(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),m):r(x)}function m(x){return Ze(x)?Va(t,p)(x):p(x)}function p(x){return tb(t,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return t.attempt(b3,y,y)(x)}function y(x){return Qt(x)?Wt(t,v,"whitespace")(x):v(x)}function v(x){return x===null||Ct(x)?(t.exit("definition"),a.parser.defined.push(u),i(x)):r(x)}}function w3(t,i,r){return a;function a(d){return Ze(d)?Va(t,u)(d):r(d)}function u(d){return nb(t,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Qt(d)?Wt(t,c,"whitespace")(d):c(d)}function c(d){return d===null||Ct(d)?i(d):r(d)}}const E3={name:"hardBreakEscape",tokenize:_3};function _3(t,i,r){return a;function a(s){return t.enter("hardBreakEscape"),t.consume(s),u}function u(s){return Ct(s)?(t.exit("hardBreakEscape"),i(s)):r(s)}}const C3={name:"headingAtx",resolve:N3,tokenize:T3};function N3(t,i){let r=t.length-2,a=3,u,s;return t[a][1].type==="whitespace"&&(a+=2),r-2>a&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&t[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(u={type:"atxHeadingText",start:t[a][1].start,end:t[r][1].end},s={type:"chunkText",start:t[a][1].start,end:t[r][1].end,contentType:"text"},Vn(t,a,r-a+1,[["enter",u,i],["enter",s,i],["exit",s,i],["exit",u,i]])),t}function T3(t,i,r){let a=0;return u;function u(g){return t.enter("atxHeading"),s(g)}function s(g){return t.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(t.consume(g),c):g===null||Ze(g)?(t.exit("atxHeadingSequence"),d(g)):r(g)}function d(g){return g===35?(t.enter("atxHeadingSequence"),m(g)):g===null||Ct(g)?(t.exit("atxHeading"),i(g)):Qt(g)?Wt(t,d,"whitespace")(g):(t.enter("atxHeadingText"),p(g))}function m(g){return g===35?(t.consume(g),m):(t.exit("atxHeadingSequence"),d(g))}function p(g){return g===null||g===35||Ze(g)?(t.exit("atxHeadingText"),d(g)):(t.consume(g),p)}}const A3=["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"],yv=["pre","script","style","textarea"],M3={concrete:!0,name:"htmlFlow",resolveTo:D3,tokenize:k3},z3={partial:!0,tokenize:H3},O3={partial:!0,tokenize:R3};function D3(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function k3(t,i,r){const a=this;let u,s,c,d,m;return p;function p(N){return g(N)}function g(N){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(N),y}function y(N){return N===33?(t.consume(N),v):N===47?(t.consume(N),s=!0,C):N===63?(t.consume(N),u=3,a.interrupt?i:T):Bn(N)?(t.consume(N),c=String.fromCharCode(N),M):r(N)}function v(N){return N===45?(t.consume(N),u=2,x):N===91?(t.consume(N),u=5,d=0,S):Bn(N)?(t.consume(N),u=4,a.interrupt?i:T):r(N)}function x(N){return N===45?(t.consume(N),a.interrupt?i:T):r(N)}function S(N){const et="CDATA[";return N===et.charCodeAt(d++)?(t.consume(N),d===et.length?a.interrupt?i:G:S):r(N)}function C(N){return Bn(N)?(t.consume(N),c=String.fromCharCode(N),M):r(N)}function M(N){if(N===null||N===47||N===62||Ze(N)){const et=N===47,st=c.toLowerCase();return!et&&!s&&yv.includes(st)?(u=1,a.interrupt?i(N):G(N)):A3.includes(c.toLowerCase())?(u=6,et?(t.consume(N),E):a.interrupt?i(N):G(N)):(u=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(N):s?H(N):w(N))}return N===45||on(N)?(t.consume(N),c+=String.fromCharCode(N),M):r(N)}function E(N){return N===62?(t.consume(N),a.interrupt?i:G):r(N)}function H(N){return Qt(N)?(t.consume(N),H):lt(N)}function w(N){return N===47?(t.consume(N),lt):N===58||N===95||Bn(N)?(t.consume(N),k):Qt(N)?(t.consume(N),w):lt(N)}function k(N){return N===45||N===46||N===58||N===95||on(N)?(t.consume(N),k):I(N)}function I(N){return N===61?(t.consume(N),D):Qt(N)?(t.consume(N),I):w(N)}function D(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(t.consume(N),m=N,j):Qt(N)?(t.consume(N),D):q(N)}function j(N){return N===m?(t.consume(N),m=null,Z):N===null||Ct(N)?r(N):(t.consume(N),j)}function q(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ze(N)?I(N):(t.consume(N),q)}function Z(N){return N===47||N===62||Qt(N)?w(N):r(N)}function lt(N){return N===62?(t.consume(N),Q):r(N)}function Q(N){return N===null||Ct(N)?G(N):Qt(N)?(t.consume(N),Q):r(N)}function G(N){return N===45&&u===2?(t.consume(N),A):N===60&&u===1?(t.consume(N),L):N===62&&u===4?(t.consume(N),O):N===63&&u===3?(t.consume(N),T):N===93&&u===5?(t.consume(N),K):Ct(N)&&(u===6||u===7)?(t.exit("htmlFlowData"),t.check(z3,V,nt)(N)):N===null||Ct(N)?(t.exit("htmlFlowData"),nt(N)):(t.consume(N),G)}function nt(N){return t.check(O3,R,V)(N)}function R(N){return t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),B}function B(N){return N===null||Ct(N)?nt(N):(t.enter("htmlFlowData"),G(N))}function A(N){return N===45?(t.consume(N),T):G(N)}function L(N){return N===47?(t.consume(N),c="",Y):G(N)}function Y(N){if(N===62){const et=c.toLowerCase();return yv.includes(et)?(t.consume(N),O):G(N)}return Bn(N)&&c.length<8?(t.consume(N),c+=String.fromCharCode(N),Y):G(N)}function K(N){return N===93?(t.consume(N),T):G(N)}function T(N){return N===62?(t.consume(N),O):N===45&&u===2?(t.consume(N),T):G(N)}function O(N){return N===null||Ct(N)?(t.exit("htmlFlowData"),V(N)):(t.consume(N),O)}function V(N){return t.exit("htmlFlow"),i(N)}}function R3(t,i,r){const a=this;return u;function u(c){return Ct(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):r(c)}function s(c){return a.parser.lazy[a.now().line]?r(c):i(c)}}function H3(t,i,r){return a;function a(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),t.attempt(zs,i,r)}}const j3={name:"htmlText",tokenize:L3};function L3(t,i,r){const a=this;let u,s,c;return d;function d(T){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(T),m}function m(T){return T===33?(t.consume(T),p):T===47?(t.consume(T),I):T===63?(t.consume(T),w):Bn(T)?(t.consume(T),q):r(T)}function p(T){return T===45?(t.consume(T),g):T===91?(t.consume(T),s=0,S):Bn(T)?(t.consume(T),H):r(T)}function g(T){return T===45?(t.consume(T),x):r(T)}function y(T){return T===null?r(T):T===45?(t.consume(T),v):Ct(T)?(c=y,L(T)):(t.consume(T),y)}function v(T){return T===45?(t.consume(T),x):y(T)}function x(T){return T===62?A(T):T===45?v(T):y(T)}function S(T){const O="CDATA[";return T===O.charCodeAt(s++)?(t.consume(T),s===O.length?C:S):r(T)}function C(T){return T===null?r(T):T===93?(t.consume(T),M):Ct(T)?(c=C,L(T)):(t.consume(T),C)}function M(T){return T===93?(t.consume(T),E):C(T)}function E(T){return T===62?A(T):T===93?(t.consume(T),E):C(T)}function H(T){return T===null||T===62?A(T):Ct(T)?(c=H,L(T)):(t.consume(T),H)}function w(T){return T===null?r(T):T===63?(t.consume(T),k):Ct(T)?(c=w,L(T)):(t.consume(T),w)}function k(T){return T===62?A(T):w(T)}function I(T){return Bn(T)?(t.consume(T),D):r(T)}function D(T){return T===45||on(T)?(t.consume(T),D):j(T)}function j(T){return Ct(T)?(c=j,L(T)):Qt(T)?(t.consume(T),j):A(T)}function q(T){return T===45||on(T)?(t.consume(T),q):T===47||T===62||Ze(T)?Z(T):r(T)}function Z(T){return T===47?(t.consume(T),A):T===58||T===95||Bn(T)?(t.consume(T),lt):Ct(T)?(c=Z,L(T)):Qt(T)?(t.consume(T),Z):A(T)}function lt(T){return T===45||T===46||T===58||T===95||on(T)?(t.consume(T),lt):Q(T)}function Q(T){return T===61?(t.consume(T),G):Ct(T)?(c=Q,L(T)):Qt(T)?(t.consume(T),Q):Z(T)}function G(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(t.consume(T),u=T,nt):Ct(T)?(c=G,L(T)):Qt(T)?(t.consume(T),G):(t.consume(T),R)}function nt(T){return T===u?(t.consume(T),u=void 0,B):T===null?r(T):Ct(T)?(c=nt,L(T)):(t.consume(T),nt)}function R(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Ze(T)?Z(T):(t.consume(T),R)}function B(T){return T===47||T===62||Ze(T)?Z(T):r(T)}function A(T){return T===62?(t.consume(T),t.exit("htmlTextData"),t.exit("htmlText"),i):r(T)}function L(T){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),Y}function Y(T){return Qt(T)?Wt(t,K,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):K(T)}function K(T){return t.enter("htmlTextData"),c(T)}}const Rh={name:"labelEnd",resolveAll:V3,resolveTo:I3,tokenize:Y3},B3={tokenize:Q3},U3={tokenize:X3},q3={tokenize:G3};function V3(t){let i=-1;const r=[];for(;++i<t.length;){const a=t[i][1];if(r.push(t[i]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const u=a.type==="labelImage"?4:2;a.type="data",i+=u}}return t.length!==r.length&&Vn(t,0,t.length,r),t}function I3(t,i){let r=t.length,a=0,u,s,c,d;for(;r--;)if(u=t[r][1],s){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;t[r][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(c){if(t[r][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(s=r,u.type!=="labelLink")){a=2;break}}else u.type==="labelEnd"&&(c=r);const m={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},p={type:"label",start:{...t[s][1].start},end:{...t[c][1].end}},g={type:"labelText",start:{...t[s+a+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",m,i],["enter",p,i]],d=vn(d,t.slice(s+1,s+a+3)),d=vn(d,[["enter",g,i]]),d=vn(d,kh(i.parser.constructs.insideSpan.null,t.slice(s+a+4,c-3),i)),d=vn(d,[["exit",g,i],t[c-2],t[c-1],["exit",p,i]]),d=vn(d,t.slice(c+1)),d=vn(d,[["exit",m,i]]),Vn(t,s,t.length,d),t}function Y3(t,i,r){const a=this;let u=a.events.length,s,c;for(;u--;)if((a.events[u][1].type==="labelImage"||a.events[u][1].type==="labelLink")&&!a.events[u][1]._balanced){s=a.events[u][1];break}return d;function d(v){return s?s._inactive?y(v):(c=a.parser.defined.includes(_l(a.sliceSerialize({start:s.end,end:a.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(v),t.exit("labelMarker"),t.exit("labelEnd"),m):r(v)}function m(v){return v===40?t.attempt(B3,g,c?g:y)(v):v===91?t.attempt(U3,g,c?p:y)(v):c?g(v):y(v)}function p(v){return t.attempt(q3,g,y)(v)}function g(v){return i(v)}function y(v){return s._balanced=!0,r(v)}}function Q3(t,i,r){return a;function a(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),u}function u(y){return Ze(y)?Va(t,s)(y):s(y)}function s(y){return y===41?g(y):tb(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Ze(y)?Va(t,m)(y):g(y)}function d(y){return r(y)}function m(y){return y===34||y===39||y===40?nb(t,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function p(y){return Ze(y)?Va(t,g)(y):g(y)}function g(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),i):r(y)}}function X3(t,i,r){const a=this;return u;function u(d){return eb.call(a,t,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return a.parser.defined.includes(_l(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?i(d):r(d)}function c(d){return r(d)}}function G3(t,i,r){return a;function a(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),u}function u(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),i):r(s)}}const Z3={name:"labelStartImage",resolveAll:Rh.resolveAll,tokenize:F3};function F3(t,i,r){const a=this;return u;function u(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),s}function s(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):r(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):i(d)}}const K3={name:"labelStartLink",resolveAll:Rh.resolveAll,tokenize:$3};function $3(t,i,r){const a=this;return u;function u(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(c):i(c)}}const gd={name:"lineEnding",tokenize:P3};function P3(t,i){return r;function r(a){return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Wt(t,i,"linePrefix")}}const es={name:"thematicBreak",tokenize:J3};function J3(t,i,r){let a=0,u;return s;function s(p){return t.enter("thematicBreak"),c(p)}function c(p){return u=p,d(p)}function d(p){return p===u?(t.enter("thematicBreakSequence"),m(p)):a>=3&&(p===null||Ct(p))?(t.exit("thematicBreak"),i(p)):r(p)}function m(p){return p===u?(t.consume(p),a++,m):(t.exit("thematicBreakSequence"),Qt(p)?Wt(t,d,"whitespace")(p):d(p))}}const Qe={continuation:{tokenize:nO},exit:rO,name:"list",tokenize:eO},W3={partial:!0,tokenize:lO},tO={partial:!0,tokenize:iO};function eO(t,i,r){const a=this,u=a.events[a.events.length-1];let s=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,c=0;return d;function d(x){const S=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Pd(x)){if(a.containerState.type||(a.containerState.type=S,t.enter(S,{_container:!0})),S==="listUnordered")return t.enter("listItemPrefix"),x===42||x===45?t.check(es,r,p)(x):p(x);if(!a.interrupt||x===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(x)}return r(x)}function m(x){return Pd(x)&&++c<10?(t.consume(x),m):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(t.exit("listItemValue"),p(x)):r(x)}function p(x){return t.enter("listItemMarker"),t.consume(x),t.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,t.check(zs,a.interrupt?r:g,t.attempt(W3,v,y))}function g(x){return a.containerState.initialBlankLine=!0,s++,v(x)}function y(x){return Qt(x)?(t.enter("listItemPrefixWhitespace"),t.consume(x),t.exit("listItemPrefixWhitespace"),v):r(x)}function v(x){return a.containerState.size=s+a.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(x)}}function nO(t,i,r){const a=this;return a.containerState._closeFlow=void 0,t.check(zs,u,s);function u(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Wt(t,i,"listItemIndent",a.containerState.size+1)(d)}function s(d){return a.containerState.furtherBlankLines||!Qt(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,t.attempt(tO,i,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,Wt(t,t.attempt(Qe,i,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function iO(t,i,r){const a=this;return Wt(t,u,"listItemIndent",a.containerState.size+1);function u(s){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?i(s):r(s)}}function rO(t){t.exit(this.containerState.type)}function lO(t,i,r){const a=this;return Wt(t,u,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(s){const c=a.events[a.events.length-1];return!Qt(s)&&c&&c[1].type==="listItemPrefixWhitespace"?i(s):r(s)}}const vv={name:"setextUnderline",resolveTo:aO,tokenize:oO};function aO(t,i){let r=t.length,a,u,s;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){a=r;break}t[r][1].type==="paragraph"&&(u=r)}else t[r][1].type==="content"&&t.splice(r,1),!s&&t[r][1].type==="definition"&&(s=r);const c={type:"setextHeading",start:{...t[a][1].start},end:{...t[t.length-1][1].end}};return t[u][1].type="setextHeadingText",s?(t.splice(u,0,["enter",c,i]),t.splice(s+1,0,["exit",t[a][1],i]),t[a][1].end={...t[s][1].end}):t[a][1]=c,t.push(["exit",c,i]),t}function oO(t,i,r){const a=this;let u;return s;function s(p){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(t.enter("setextHeadingLine"),u=p,c(p)):r(p)}function c(p){return t.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===u?(t.consume(p),d):(t.exit("setextHeadingLineSequence"),Qt(p)?Wt(t,m,"lineSuffix")(p):m(p))}function m(p){return p===null||Ct(p)?(t.exit("setextHeadingLine"),i(p)):r(p)}}const uO={tokenize:sO};function sO(t){const i=this,r=t.attempt(zs,a,t.attempt(this.parser.constructs.flowInitial,u,Wt(t,t.attempt(this.parser.constructs.flow,u,t.attempt(p3,u)),"linePrefix")));return r;function a(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function u(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const cO={resolveAll:rb()},fO=ib("string"),dO=ib("text");function ib(t){return{resolveAll:rb(t==="text"?hO:void 0),tokenize:i};function i(r){const a=this,u=this.parser.constructs[t],s=r.attempt(u,c,d);return c;function c(g){return p(g)?s(g):d(g)}function d(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),m}function m(g){return p(g)?(r.exit("data"),s(g)):(r.consume(g),m)}function p(g){if(g===null)return!0;const y=u[g];let v=-1;if(y)for(;++v<y.length;){const x=y[v];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function rb(t){return i;function i(r,a){let u=-1,s;for(;++u<=r.length;)s===void 0?r[u]&&r[u][1].type==="data"&&(s=u,u++):(!r[u]||r[u][1].type!=="data")&&(u!==s+2&&(r[s][1].end=r[u-1][1].end,r.splice(s+2,u-s-2),u=s+2),s=void 0);return t?t(r,a):r}}function hO(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const a=t[r-1][1],u=i.sliceStream(a);let s=u.length,c=-1,d=0,m;for(;s--;){const p=u[s];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(p===-2)m=!0,d++;else if(p!==-1){s++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(d=0),d){const p={type:r===t.length||m||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:a.start._bufferIndex+c,_index:a.start._index+s,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...p.start},a.start.offset===a.end.offset?Object.assign(a,p):(t.splice(r,0,["enter",p,i],["exit",p,i]),r+=2)}r++}return t}const pO={42:Qe,43:Qe,45:Qe,48:Qe,49:Qe,50:Qe,51:Qe,52:Qe,53:Qe,54:Qe,55:Qe,56:Qe,57:Qe,62:$1},mO={91:x3},gO={[-2]:md,[-1]:md,32:md},yO={35:C3,42:es,45:[vv,es],60:M3,61:vv,95:es,96:gv,126:gv},vO={38:J1,92:P1},xO={[-5]:gd,[-4]:gd,[-3]:gd,33:Z3,38:J1,42:Jd,60:[Kz,j3],91:K3,92:[E3,P1],93:Rh,95:Jd,96:u3},bO={null:[Jd,cO]},SO={null:[42,95]},wO={null:[]},EO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:SO,contentInitial:mO,disable:wO,document:pO,flow:yO,flowInitial:gO,insideSpan:bO,string:vO,text:xO},Symbol.toStringTag,{value:"Module"}));function _O(t,i,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const u={},s=[];let c=[],d=[];const m={attempt:j(I),check:j(D),consume:H,enter:w,exit:k,interrupt:j(D,{interrupt:!0})},p={code:null,containerState:{},defineSkip:C,events:[],now:S,parser:t,previous:null,sliceSerialize:v,sliceStream:x,write:y};let g=i.tokenize.call(p,m);return i.resolveAll&&s.push(i),p;function y(Q){return c=vn(c,Q),M(),c[c.length-1]!==null?[]:(q(i,0),p.events=kh(s,p.events,p),p.events)}function v(Q,G){return NO(x(Q),G)}function x(Q){return CO(c,Q)}function S(){const{_bufferIndex:Q,_index:G,line:nt,column:R,offset:B}=a;return{_bufferIndex:Q,_index:G,line:nt,column:R,offset:B}}function C(Q){u[Q.line]=Q.column,lt()}function M(){let Q;for(;a._index<c.length;){const G=c[a._index];if(typeof G=="string")for(Q=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Q&&a._bufferIndex<G.length;)E(G.charCodeAt(a._bufferIndex));else E(G)}}function E(Q){g=g(Q)}function H(Q){Ct(Q)?(a.line++,a.column=1,a.offset+=Q===-3?2:1,lt()):Q!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),p.previous=Q}function w(Q,G){const nt=G||{};return nt.type=Q,nt.start=S(),p.events.push(["enter",nt,p]),d.push(nt),nt}function k(Q){const G=d.pop();return G.end=S(),p.events.push(["exit",G,p]),G}function I(Q,G){q(Q,G.from)}function D(Q,G){G.restore()}function j(Q,G){return nt;function nt(R,B,A){let L,Y,K,T;return Array.isArray(R)?V(R):"tokenize"in R?V([R]):O(R);function O(ct){return dt;function dt(ut){const pt=ut!==null&&ct[ut],wt=ut!==null&&ct.null,_t=[...Array.isArray(pt)?pt:pt?[pt]:[],...Array.isArray(wt)?wt:wt?[wt]:[]];return V(_t)(ut)}}function V(ct){return L=ct,Y=0,ct.length===0?A:N(ct[Y])}function N(ct){return dt;function dt(ut){return T=Z(),K=ct,ct.partial||(p.currentConstruct=ct),ct.name&&p.parser.constructs.disable.null.includes(ct.name)?st():ct.tokenize.call(G?Object.assign(Object.create(p),G):p,m,et,st)(ut)}}function et(ct){return Q(K,T),B}function st(ct){return T.restore(),++Y<L.length?N(L[Y]):A}}}function q(Q,G){Q.resolveAll&&!s.includes(Q)&&s.push(Q),Q.resolve&&Vn(p.events,G,p.events.length-G,Q.resolve(p.events.slice(G),p)),Q.resolveTo&&(p.events=Q.resolveTo(p.events,p))}function Z(){const Q=S(),G=p.previous,nt=p.currentConstruct,R=p.events.length,B=Array.from(d);return{from:R,restore:A};function A(){a=Q,p.previous=G,p.currentConstruct=nt,p.events.length=R,d=B,lt()}}function lt(){a.line in u&&a.column<2&&(a.column=u[a.line],a.offset+=u[a.line]-1)}}function CO(t,i){const r=i.start._index,a=i.start._bufferIndex,u=i.end._index,s=i.end._bufferIndex;let c;if(r===u)c=[t[r].slice(a,s)];else{if(c=t.slice(r,u),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}s>0&&c.push(t[u].slice(0,s))}return c}function NO(t,i){let r=-1;const a=[];let u;for(;++r<t.length;){const s=t[r];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
17
+ `;break}case-3:{c=`\r
18
+ `;break}case-2:{c=i?" ":" ";break}case-1:{if(!i&&u)continue;c=" ";break}default:c=String.fromCharCode(s)}u=s===-2,a.push(c)}return a.join("")}function TO(t){const a={constructs:Rz([EO,...(t||{}).extensions||[]]),content:u(Iz),defined:[],document:u(Qz),flow:u(uO),lazy:{},string:u(fO),text:u(dO)};return a;function u(s){return c;function c(d){return _O(a,s,d)}}}function AO(t){for(;!W1(t););return t}const xv=/[\0\t\n\r]/g;function MO(){let t=1,i="",r=!0,a;return u;function u(s,c,d){const m=[];let p,g,y,v,x;for(s=i+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,i="",r&&(s.charCodeAt(0)===65279&&y++,r=void 0);y<s.length;){if(xv.lastIndex=y,p=xv.exec(s),v=p&&p.index!==void 0?p.index:s.length,x=s.charCodeAt(v),!p){i=s.slice(y);break}if(x===10&&y===v&&a)m.push(-3),a=void 0;else switch(a&&(m.push(-5),a=void 0),y<v&&(m.push(s.slice(y,v)),t+=v-y),x){case 0:{m.push(65533),t++;break}case 9:{for(g=Math.ceil(t/4)*4,m.push(-2);t++<g;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:a=!0,t=1}y=v+1}return d&&(a&&m.push(-5),i&&m.push(i),m.push(null)),m}}const zO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function OO(t){return t.replace(zO,DO)}function DO(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const u=r.charCodeAt(1),s=u===120||u===88;return K1(r.slice(s?2:1),s?16:10)}return Dh(r)||t}const lb={}.hasOwnProperty;function kO(t,i,r){return typeof i!="string"&&(r=i,i=void 0),RO(r)(AO(TO(r).document().write(MO()(t,i,!0))))}function RO(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ae),autolinkProtocol:Z,autolinkEmail:Z,atxHeading:s(It),blockQuote:s(wt),characterEscape:Z,characterReference:Z,codeFenced:s(_t),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(_t,c),codeText:s(vt,c),codeTextData:Z,data:Z,codeFlowValue:Z,definition:s(Et),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Ot),hardBreakEscape:s(Ut),hardBreakTrailing:s(Ut),htmlFlow:s(oe,c),htmlFlowData:Z,htmlText:s(oe,c),htmlTextData:Z,image:s(Ke),label:c,link:s(Ae),listItem:s(xn),listItemValue:v,listOrdered:s(He,y),listUnordered:s(He),paragraph:s(Yn),reference:N,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(It),strong:s(Qn),thematicBreak:s(gi)},exit:{atxHeading:m(),atxHeadingSequence:I,autolink:m(),autolinkEmail:pt,autolinkProtocol:ut,blockQuote:m(),characterEscapeValue:lt,characterReferenceMarkerHexadecimal:st,characterReferenceMarkerNumeric:st,characterReferenceValue:ct,characterReference:dt,codeFenced:m(M),codeFencedFence:C,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:lt,codeIndented:m(E),codeText:m(B),codeTextData:lt,data:lt,definition:m(),definitionDestinationString:k,definitionLabelString:H,definitionTitleString:w,emphasis:m(),hardBreakEscape:m(G),hardBreakTrailing:m(G),htmlFlow:m(nt),htmlFlowData:lt,htmlText:m(R),htmlTextData:lt,image:m(L),label:K,labelText:Y,lineEnding:Q,link:m(A),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:et,resourceDestinationString:T,resourceTitleString:O,resource:V,setextHeading:m(q),setextHeadingLineSequence:j,setextHeadingText:D,strong:m(),thematicBreak:m()}};ab(i,(t||{}).mdastExtensions||[]);const r={};return a;function a(it){let ht={type:"root",children:[]};const bt={stack:[ht],tokenStack:[],config:i,enter:d,exit:p,buffer:c,resume:g,data:r},zt=[];let Lt=-1;for(;++Lt<it.length;)if(it[Lt][1].type==="listOrdered"||it[Lt][1].type==="listUnordered")if(it[Lt][0]==="enter")zt.push(Lt);else{const ke=zt.pop();Lt=u(it,ke,Lt)}for(Lt=-1;++Lt<it.length;){const ke=i[it[Lt][0]];lb.call(ke,it[Lt][1].type)&&ke[it[Lt][1].type].call(Object.assign({sliceSerialize:it[Lt][2].sliceSerialize},bt),it[Lt][1])}if(bt.tokenStack.length>0){const ke=bt.tokenStack[bt.tokenStack.length-1];(ke[1]||bv).call(bt,void 0,ke[0])}for(ht.position={start:Zi(it.length>0?it[0][1].start:{line:1,column:1,offset:0}),end:Zi(it.length>0?it[it.length-2][1].end:{line:1,column:1,offset:0})},Lt=-1;++Lt<i.transforms.length;)ht=i.transforms[Lt](ht)||ht;return ht}function u(it,ht,bt){let zt=ht-1,Lt=-1,ke=!1,bn,we,ue,Me;for(;++zt<=bt;){const Xt=it[zt];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?Lt++:Lt--,Me=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(bn&&!Me&&!Lt&&!ue&&(ue=zt),Me=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Me=void 0}if(!Lt&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||Lt===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(bn){let zn=zt;for(we=void 0;zn--;){const $e=it[zn];if($e[1].type==="lineEnding"||$e[1].type==="lineEndingBlank"){if($e[0]==="exit")continue;we&&(it[we][1].type="lineEndingBlank",ke=!0),$e[1].type="lineEnding",we=zn}else if(!($e[1].type==="linePrefix"||$e[1].type==="blockQuotePrefix"||$e[1].type==="blockQuotePrefixWhitespace"||$e[1].type==="blockQuoteMarker"||$e[1].type==="listItemIndent"))break}ue&&(!we||ue<we)&&(bn._spread=!0),bn.end=Object.assign({},we?it[we][1].start:Xt[1].end),it.splice(we||zt,0,["exit",bn,Xt[2]]),zt++,bt++}if(Xt[1].type==="listItemPrefix"){const zn={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};bn=zn,it.splice(zt,0,["enter",zn,Xt[2]]),zt++,bt++,ue=void 0,Me=!0}}}return it[ht][1]._spread=ke,bt}function s(it,ht){return bt;function bt(zt){d.call(this,it(zt),zt),ht&&ht.call(this,zt)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(it,ht,bt){this.stack[this.stack.length-1].children.push(it),this.stack.push(it),this.tokenStack.push([ht,bt||void 0]),it.position={start:Zi(ht.start),end:void 0}}function m(it){return ht;function ht(bt){it&&it.call(this,bt),p.call(this,bt)}}function p(it,ht){const bt=this.stack.pop(),zt=this.tokenStack.pop();if(zt)zt[0].type!==it.type&&(ht?ht.call(this,it,zt[0]):(zt[1]||bv).call(this,it,zt[0]));else throw new Error("Cannot close `"+it.type+"` ("+qa({start:it.start,end:it.end})+"): it’s not open");bt.position.end=Zi(it.end)}function g(){return Dz(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(it){if(this.data.expectingFirstListItemValue){const ht=this.stack[this.stack.length-2];ht.start=Number.parseInt(this.sliceSerialize(it),10),this.data.expectingFirstListItemValue=void 0}}function x(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.lang=it}function S(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.meta=it}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function M(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it.replace(/(\r?\n|\r)$/g,"")}function H(it){const ht=this.resume(),bt=this.stack[this.stack.length-1];bt.label=ht,bt.identifier=_l(this.sliceSerialize(it)).toLowerCase()}function w(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.title=it}function k(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.url=it}function I(it){const ht=this.stack[this.stack.length-1];if(!ht.depth){const bt=this.sliceSerialize(it).length;ht.depth=bt}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function j(it){const ht=this.stack[this.stack.length-1];ht.depth=this.sliceSerialize(it).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function Z(it){const bt=this.stack[this.stack.length-1].children;let zt=bt[bt.length-1];(!zt||zt.type!=="text")&&(zt=ve(),zt.position={start:Zi(it.start),end:void 0},bt.push(zt)),this.stack.push(zt)}function lt(it){const ht=this.stack.pop();ht.value+=this.sliceSerialize(it),ht.position.end=Zi(it.end)}function Q(it){const ht=this.stack[this.stack.length-1];if(this.data.atHardBreak){const bt=ht.children[ht.children.length-1];bt.position.end=Zi(it.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ht.type)&&(Z.call(this,it),lt.call(this,it))}function G(){this.data.atHardBreak=!0}function nt(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it}function R(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it}function B(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it}function A(){const it=this.stack[this.stack.length-1];if(this.data.inReference){const ht=this.data.referenceType||"shortcut";it.type+="Reference",it.referenceType=ht,delete it.url,delete it.title}else delete it.identifier,delete it.label;this.data.referenceType=void 0}function L(){const it=this.stack[this.stack.length-1];if(this.data.inReference){const ht=this.data.referenceType||"shortcut";it.type+="Reference",it.referenceType=ht,delete it.url,delete it.title}else delete it.identifier,delete it.label;this.data.referenceType=void 0}function Y(it){const ht=this.sliceSerialize(it),bt=this.stack[this.stack.length-2];bt.label=OO(ht),bt.identifier=_l(ht).toLowerCase()}function K(){const it=this.stack[this.stack.length-1],ht=this.resume(),bt=this.stack[this.stack.length-1];if(this.data.inReference=!0,bt.type==="link"){const zt=it.children;bt.children=zt}else bt.alt=ht}function T(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.url=it}function O(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.title=it}function V(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function et(it){const ht=this.resume(),bt=this.stack[this.stack.length-1];bt.label=ht,bt.identifier=_l(this.sliceSerialize(it)).toLowerCase(),this.data.referenceType="full"}function st(it){this.data.characterReferenceType=it.type}function ct(it){const ht=this.sliceSerialize(it),bt=this.data.characterReferenceType;let zt;bt?(zt=K1(ht,bt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):zt=Dh(ht);const Lt=this.stack[this.stack.length-1];Lt.value+=zt}function dt(it){const ht=this.stack.pop();ht.position.end=Zi(it.end)}function ut(it){lt.call(this,it);const ht=this.stack[this.stack.length-1];ht.url=this.sliceSerialize(it)}function pt(it){lt.call(this,it);const ht=this.stack[this.stack.length-1];ht.url="mailto:"+this.sliceSerialize(it)}function wt(){return{type:"blockquote",children:[]}}function _t(){return{type:"code",lang:null,meta:null,value:""}}function vt(){return{type:"inlineCode",value:""}}function Et(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ot(){return{type:"emphasis",children:[]}}function It(){return{type:"heading",depth:0,children:[]}}function Ut(){return{type:"break"}}function oe(){return{type:"html",value:""}}function Ke(){return{type:"image",title:null,url:"",alt:null}}function Ae(){return{type:"link",title:null,url:"",children:[]}}function He(it){return{type:"list",ordered:it.type==="listOrdered",start:null,spread:it._spread,children:[]}}function xn(it){return{type:"listItem",spread:it._spread,checked:null,children:[]}}function Yn(){return{type:"paragraph",children:[]}}function Qn(){return{type:"strong",children:[]}}function ve(){return{type:"text",value:""}}function gi(){return{type:"thematicBreak"}}}function Zi(t){return{line:t.line,column:t.column,offset:t.offset}}function ab(t,i){let r=-1;for(;++r<i.length;){const a=i[r];Array.isArray(a)?ab(t,a):HO(t,a)}}function HO(t,i){let r;for(r in i)if(lb.call(i,r))switch(r){case"canContainEols":{const a=i[r];a&&t[r].push(...a);break}case"transforms":{const a=i[r];a&&t[r].push(...a);break}case"enter":case"exit":{const a=i[r];a&&Object.assign(t[r],a);break}}}function bv(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+qa({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+qa({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+qa({start:i.start,end:i.end})+") is still open")}function jO(t){const i=this;i.parser=r;function r(a){return kO(a,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function LO(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function BO(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
19
+ `}]}function UO(t,i){const r=i.value?i.value+`
20
+ `:"",a={},u=i.lang?i.lang.split(/\s+/):[];u.length>0&&(a.className=["language-"+u[0]]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return i.meta&&(s.data={meta:i.meta}),t.patch(i,s),s=t.applyData(i,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(i,s),s}function qO(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function VO(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function IO(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=String(i.identifier).toUpperCase(),u=kl(a.toLowerCase()),s=t.footnoteOrder.indexOf(a);let c,d=t.footnoteCounts.get(a);d===void 0?(d=0,t.footnoteOrder.push(a),c=t.footnoteOrder.length):c=s+1,d+=1,t.footnoteCounts.set(a,d);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+u,id:r+"fnref-"+u+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(i,m);const p={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(i,p),t.applyData(i,p)}function YO(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function QO(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function ob(t,i){const r=i.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+a}];const u=t.all(i),s=u[0];s&&s.type==="text"?s.value="["+s.value:u.unshift({type:"text",value:"["});const c=u[u.length-1];return c&&c.type==="text"?c.value+=a:u.push({type:"text",value:a}),u}function XO(t,i){const r=String(i.identifier).toUpperCase(),a=t.definitionById.get(r);if(!a)return ob(t,i);const u={src:kl(a.url||""),alt:i.alt};a.title!==null&&a.title!==void 0&&(u.title=a.title);const s={type:"element",tagName:"img",properties:u,children:[]};return t.patch(i,s),t.applyData(i,s)}function GO(t,i){const r={src:kl(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,a),t.applyData(i,a)}function ZO(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,a),t.applyData(i,a)}function FO(t,i){const r=String(i.identifier).toUpperCase(),a=t.definitionById.get(r);if(!a)return ob(t,i);const u={href:kl(a.url||"")};a.title!==null&&a.title!==void 0&&(u.title=a.title);const s={type:"element",tagName:"a",properties:u,children:t.all(i)};return t.patch(i,s),t.applyData(i,s)}function KO(t,i){const r={href:kl(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function $O(t,i,r){const a=t.all(i),u=r?PO(r):ub(i),s={},c=[];if(typeof i.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const g=a[d];(u||d!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
21
+ `}),g.type==="element"&&g.tagName==="p"&&!u?c.push(...g.children):c.push(g)}const m=a[a.length-1];m&&(u||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
22
+ `});const p={type:"element",tagName:"li",properties:s,children:c};return t.patch(i,p),t.applyData(i,p)}function PO(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let a=-1;for(;!i&&++a<r.length;)i=ub(r[a])}return i}function ub(t){const i=t.spread;return i??t.children.length>1}function JO(t,i){const r={},a=t.all(i);let u=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++u<a.length;){const c=a[u];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(a,!0)};return t.patch(i,s),t.applyData(i,s)}function WO(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function tD(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function eD(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function nD(t,i){const r=t.all(i),a=r.shift(),u=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([a],!0)};t.patch(i.children[0],c),u.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},d=Ah(i.children[1]),m=I1(i.children[i.children.length-1]);d&&m&&(c.position={start:d,end:m}),u.push(c)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(u,!0)};return t.patch(i,s),t.applyData(i,s)}function iD(t,i,r){const a=r?r.children:void 0,s=(a?a.indexOf(i):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,d=c?c.length:i.children.length;let m=-1;const p=[];for(;++m<d;){const y=i.children[m],v={},x=c?c[m]:void 0;x&&(v.align=x);let S={type:"element",tagName:s,properties:v,children:[]};y&&(S.children=t.all(y),t.patch(y,S),S=t.applyData(y,S)),p.push(S)}const g={type:"element",tagName:"tr",properties:{},children:t.wrap(p,!0)};return t.patch(i,g),t.applyData(i,g)}function rD(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const Sv=9,wv=32;function lD(t){const i=String(t),r=/\r?\n|\r/g;let a=r.exec(i),u=0;const s=[];for(;a;)s.push(Ev(i.slice(u,a.index),u>0,!0),a[0]),u=a.index+a[0].length,a=r.exec(i);return s.push(Ev(i.slice(u),u>0,!1)),s.join("")}function Ev(t,i,r){let a=0,u=t.length;if(i){let s=t.codePointAt(a);for(;s===Sv||s===wv;)a++,s=t.codePointAt(a)}if(r){let s=t.codePointAt(u-1);for(;s===Sv||s===wv;)u--,s=t.codePointAt(u-1)}return u>a?t.slice(a,u):""}function aD(t,i){const r={type:"text",value:lD(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function oD(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const uD={blockquote:LO,break:BO,code:UO,delete:qO,emphasis:VO,footnoteReference:IO,heading:YO,html:QO,imageReference:XO,image:GO,inlineCode:ZO,linkReference:FO,link:KO,listItem:$O,list:JO,paragraph:WO,root:tD,strong:eD,table:nD,tableCell:rD,tableRow:iD,text:aD,thematicBreak:oD,toml:Gu,yaml:Gu,definition:Gu,footnoteDefinition:Gu};function Gu(){}const sb=-1,Os=0,Ia=1,ms=2,Hh=3,jh=4,Lh=5,Bh=6,cb=7,fb=8,_v=typeof self=="object"?self:globalThis,sD=(t,i)=>{const r=(u,s)=>(t.set(s,u),u),a=u=>{if(t.has(u))return t.get(u);const[s,c]=i[u];switch(s){case Os:case sb:return r(c,u);case Ia:{const d=r([],u);for(const m of c)d.push(a(m));return d}case ms:{const d=r({},u);for(const[m,p]of c)d[a(m)]=a(p);return d}case Hh:return r(new Date(c),u);case jh:{const{source:d,flags:m}=c;return r(new RegExp(d,m),u)}case Lh:{const d=r(new Map,u);for(const[m,p]of c)d.set(a(m),a(p));return d}case Bh:{const d=r(new Set,u);for(const m of c)d.add(a(m));return d}case cb:{const{name:d,message:m}=c;return r(new _v[d](m),u)}case fb:return r(BigInt(c),u);case"BigInt":return r(Object(BigInt(c)),u);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return r(new DataView(d),c)}}return r(new _v[s](c),u)};return a},Cv=t=>sD(new Map,t)(0),vl="",{toString:cD}={},{keys:fD}=Object,Ha=t=>{const i=typeof t;if(i!=="object"||!t)return[Os,i];const r=cD.call(t).slice(8,-1);switch(r){case"Array":return[Ia,vl];case"Object":return[ms,vl];case"Date":return[Hh,vl];case"RegExp":return[jh,vl];case"Map":return[Lh,vl];case"Set":return[Bh,vl];case"DataView":return[Ia,r]}return r.includes("Array")?[Ia,r]:r.includes("Error")?[cb,r]:[ms,r]},Zu=([t,i])=>t===Os&&(i==="function"||i==="symbol"),dD=(t,i,r,a)=>{const u=(c,d)=>{const m=a.push(c)-1;return r.set(d,m),m},s=c=>{if(r.has(c))return r.get(c);let[d,m]=Ha(c);switch(d){case Os:{let g=c;switch(m){case"bigint":d=fb,g=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+m);g=null;break;case"undefined":return u([sb],c)}return u([d,g],c)}case Ia:{if(m){let v=c;return m==="DataView"?v=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(v=new Uint8Array(c)),u([m,[...v]],c)}const g=[],y=u([d,g],c);for(const v of c)g.push(s(v));return y}case ms:{if(m)switch(m){case"BigInt":return u([m,c.toString()],c);case"Boolean":case"Number":case"String":return u([m,c.valueOf()],c)}if(i&&"toJSON"in c)return s(c.toJSON());const g=[],y=u([d,g],c);for(const v of fD(c))(t||!Zu(Ha(c[v])))&&g.push([s(v),s(c[v])]);return y}case Hh:return u([d,c.toISOString()],c);case jh:{const{source:g,flags:y}=c;return u([d,{source:g,flags:y}],c)}case Lh:{const g=[],y=u([d,g],c);for(const[v,x]of c)(t||!(Zu(Ha(v))||Zu(Ha(x))))&&g.push([s(v),s(x)]);return y}case Bh:{const g=[],y=u([d,g],c);for(const v of c)(t||!Zu(Ha(v)))&&g.push(s(v));return y}}const{message:p}=c;return u([d,{name:m,message:p}],c)};return s},Nv=(t,{json:i,lossy:r}={})=>{const a=[];return dD(!(i||r),!!i,new Map,a)(t),a},gs=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?Cv(Nv(t,i)):structuredClone(t):(t,i)=>Cv(Nv(t,i));function hD(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function pD(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function mD(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||hD,a=t.options.footnoteBackLabel||pD,u=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let m=-1;for(;++m<t.footnoteOrder.length;){const p=t.footnoteById.get(t.footnoteOrder[m]);if(!p)continue;const g=t.all(p),y=String(p.identifier).toUpperCase(),v=kl(y.toLowerCase());let x=0;const S=[],C=t.footnoteCounts.get(y);for(;C!==void 0&&++x<=C;){S.length>0&&S.push({type:"text",value:" "});let H=typeof r=="string"?r:r(m,x);typeof H=="string"&&(H={type:"text",value:H}),S.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(m,x),className:["data-footnote-backref"]},children:Array.isArray(H)?H:[H]})}const M=g[g.length-1];if(M&&M.type==="element"&&M.tagName==="p"){const H=M.children[M.children.length-1];H&&H.type==="text"?H.value+=" ":M.children.push({type:"text",value:" "}),M.children.push(...S)}else g.push(...S);const E={type:"element",tagName:"li",properties:{id:i+"fn-"+v},children:t.wrap(g,!0)};t.patch(p,E),d.push(E)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...gs(c),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
23
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
24
+ `}]}}const db=(function(t){if(t==null)return xD;if(typeof t=="function")return Ds(t);if(typeof t=="object")return Array.isArray(t)?gD(t):yD(t);if(typeof t=="string")return vD(t);throw new Error("Expected function, string, or object as test")});function gD(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=db(t[r]);return Ds(a);function a(...u){let s=-1;for(;++s<i.length;)if(i[s].apply(this,u))return!0;return!1}}function yD(t){const i=t;return Ds(r);function r(a){const u=a;let s;for(s in t)if(u[s]!==i[s])return!1;return!0}}function vD(t){return Ds(i);function i(r){return r&&r.type===t}}function Ds(t){return i;function i(r,a,u){return!!(bD(r)&&t.call(this,r,typeof a=="number"?a:void 0,u||void 0))}}function xD(){return!0}function bD(t){return t!==null&&typeof t=="object"&&"type"in t}const hb=[],SD=!0,Tv=!1,wD="skip";function ED(t,i,r,a){let u;typeof i=="function"&&typeof r!="function"?(a=r,r=i):u=i;const s=db(u),c=a?-1:1;d(t,void 0,[])();function d(m,p,g){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const x=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(m.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=hb,S,C,M;if((!i||s(m,p,g[g.length-1]||void 0))&&(x=_D(r(m,g)),x[0]===Tv))return x;if("children"in m&&m.children){const E=m;if(E.children&&x[0]!==wD)for(C=(a?E.children.length:-1)+c,M=g.concat(E);C>-1&&C<E.children.length;){const H=E.children[C];if(S=d(H,C,M)(),S[0]===Tv)return S;C=typeof S[1]=="number"?S[1]:C+c}}return x}}}function _D(t){return Array.isArray(t)?t:typeof t=="number"?[SD,t]:t==null?hb:[t]}function pb(t,i,r,a){let u,s,c;typeof i=="function"&&typeof r!="function"?(s=void 0,c=i,u=r):(s=i,c=r,u=a),ED(t,s,d,u);function d(m,p){const g=p[p.length-1],y=g?g.children.indexOf(m):void 0;return c(m,y,g)}}const Wd={}.hasOwnProperty,CD={};function ND(t,i){const r=i||CD,a=new Map,u=new Map,s=new Map,c={...uD,...r.handlers},d={all:p,applyData:AD,definitionById:a,footnoteById:u,footnoteCounts:s,footnoteOrder:[],handlers:c,one:m,options:r,patch:TD,wrap:zD};return pb(t,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:u,v=String(g.identifier).toUpperCase();y.has(v)||y.set(v,g)}}),d;function m(g,y){const v=g.type,x=d.handlers[v];if(Wd.call(d.handlers,v)&&x)return x(d,g,y);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in g){const{children:C,...M}=g,E=gs(M);return E.children=d.all(g),E}return gs(g)}return(d.options.unknownHandler||MD)(d,g,y)}function p(g){const y=[];if("children"in g){const v=g.children;let x=-1;for(;++x<v.length;){const S=d.one(v[x],g);if(S){if(x&&v[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Av(S.value)),!Array.isArray(S)&&S.type==="element")){const C=S.children[0];C&&C.type==="text"&&(C.value=Av(C.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function TD(t,i){t.position&&(i.position=cz(t))}function AD(t,i){let r=i;if(t&&t.data){const a=t.data.hName,u=t.data.hChildren,s=t.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const c="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:c}}r.type==="element"&&s&&Object.assign(r.properties,gs(s)),"children"in r&&r.children&&u!==null&&u!==void 0&&(r.children=u)}return r}function MD(t,i){const r=i.data||{},a="value"in i&&!(Wd.call(r,"hProperties")||Wd.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function zD(t,i){const r=[];let a=-1;for(i&&r.push({type:"text",value:`
25
+ `});++a<t.length;)a&&r.push({type:"text",value:`
26
+ `}),r.push(t[a]);return i&&t.length>0&&r.push({type:"text",value:`
27
+ `}),r}function Av(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function Mv(t,i){const r=ND(t,i),a=r.one(t,void 0),u=mD(r),s=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return u&&s.children.push({type:"text",value:`
28
+ `},u),s}function OD(t,i){return t&&"run"in t?async function(r,a){const u=Mv(r,{file:a,...i});await t.run(u,a)}:function(r,a){return Mv(r,{file:a,...t||i})}}function zv(t){if(t)throw t}var yd,Ov;function DD(){if(Ov)return yd;Ov=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=function(p){return typeof Array.isArray=="function"?Array.isArray(p):i.call(p)==="[object Array]"},s=function(p){if(!p||i.call(p)!=="[object Object]")return!1;var g=t.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&t.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!y)return!1;var v;for(v in p);return typeof v>"u"||t.call(p,v)},c=function(p,g){r&&g.name==="__proto__"?r(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},d=function(p,g){if(g==="__proto__")if(t.call(p,g)){if(a)return a(p,g).value}else return;return p[g]};return yd=function m(){var p,g,y,v,x,S,C=arguments[0],M=1,E=arguments.length,H=!1;for(typeof C=="boolean"&&(H=C,C=arguments[1]||{},M=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});M<E;++M)if(p=arguments[M],p!=null)for(g in p)y=d(C,g),v=d(p,g),C!==v&&(H&&v&&(s(v)||(x=u(v)))?(x?(x=!1,S=y&&u(y)?y:[]):S=y&&s(y)?y:{},c(C,{name:g,newValue:m(H,S,v)})):typeof v<"u"&&c(C,{name:g,newValue:v}));return C},yd}var kD=DD();const vd=ys(kD);function th(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function RD(){const t=[],i={run:r,use:a};return i;function r(...u){let s=-1;const c=u.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...u);function d(m,...p){const g=t[++s];let y=-1;if(m){c(m);return}for(;++y<u.length;)(p[y]===null||p[y]===void 0)&&(p[y]=u[y]);u=p,g?HD(g,d)(...p):c(null,...p)}}function a(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return t.push(u),i}}function HD(t,i){let r;return a;function a(...c){const d=t.length>c.length;let m;d&&c.push(u);try{m=t.apply(this,c)}catch(p){const g=p;if(d&&r)throw g;return u(g)}d||(m&&m.then&&typeof m.then=="function"?m.then(s,u):m instanceof Error?u(m):s(m))}function u(c,...d){r||(r=!0,i(c,...d))}function s(c){u(null,c)}}const jn={basename:jD,dirname:LD,extname:BD,join:UD,sep:"/"};function jD(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');co(t);let r=0,a=-1,u=t.length,s;if(i===void 0||i.length===0||i.length>t.length){for(;u--;)if(t.codePointAt(u)===47){if(s){r=u+1;break}}else a<0&&(s=!0,a=u+1);return a<0?"":t.slice(r,a)}if(i===t)return"";let c=-1,d=i.length-1;for(;u--;)if(t.codePointAt(u)===47){if(s){r=u+1;break}}else c<0&&(s=!0,c=u+1),d>-1&&(t.codePointAt(u)===i.codePointAt(d--)?d<0&&(a=u):(d=-1,a=c));return r===a?a=c:a<0&&(a=t.length),t.slice(r,a)}function LD(t){if(co(t),t.length===0)return".";let i=-1,r=t.length,a;for(;--r;)if(t.codePointAt(r)===47){if(a){i=r;break}}else a||(a=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function BD(t){co(t);let i=t.length,r=-1,a=0,u=-1,s=0,c;for(;i--;){const d=t.codePointAt(i);if(d===47){if(c){a=i+1;break}continue}r<0&&(c=!0,r=i+1),d===46?u<0?u=i:s!==1&&(s=1):u>-1&&(s=-1)}return u<0||r<0||s===0||s===1&&u===r-1&&u===a+1?"":t.slice(u,r)}function UD(...t){let i=-1,r;for(;++i<t.length;)co(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":qD(r)}function qD(t){co(t);const i=t.codePointAt(0)===47;let r=VD(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function VD(t,i){let r="",a=0,u=-1,s=0,c=-1,d,m;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(u===c-1||s===1))if(u!==c-1&&s===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",a=0):(r=r.slice(0,m),a=r.length-1-r.lastIndexOf("/")),u=c,s=0;continue}}else if(r.length>0){r="",a=0,u=c,s=0;continue}}i&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+t.slice(u+1,c):r=t.slice(u+1,c),a=c-u-1;u=c,s=0}else d===46&&s>-1?s++:s=-1}return r}function co(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const ID={cwd:YD};function YD(){return"/"}function eh(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function QD(t){if(typeof t=="string")t=new URL(t);else if(!eh(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return XD(t)}function XD(t){if(t.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const a=i.codePointAt(r+2);if(a===70||a===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(i)}const xd=["history","path","basename","stem","extname","dirname"];class mb{constructor(i){let r;i?eh(i)?r={path:i}:typeof i=="string"||GD(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":ID.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<xd.length;){const s=xd[a];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let u;for(u in r)xd.includes(u)||(this[u]=r[u])}get basename(){return typeof this.path=="string"?jn.basename(this.path):void 0}set basename(i){Sd(i,"basename"),bd(i,"basename"),this.path=jn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?jn.dirname(this.path):void 0}set dirname(i){Dv(this.basename,"dirname"),this.path=jn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?jn.extname(this.path):void 0}set extname(i){if(bd(i,"extname"),Dv(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){eh(i)&&(i=QD(i)),Sd(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?jn.basename(this.path,this.extname):void 0}set stem(i){Sd(i,"stem"),bd(i,"stem"),this.path=jn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,a){const u=this.message(i,r,a);throw u.fatal=!0,u}info(i,r,a){const u=this.message(i,r,a);return u.fatal=void 0,u}message(i,r,a){const u=new De(i,r,a);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function bd(t,i){if(t&&t.includes(jn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+jn.sep+"`")}function Sd(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function Dv(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function GD(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const ZD=(function(t){const a=this.constructor.prototype,u=a[t],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),FD={}.hasOwnProperty;class Uh extends ZD{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=RD()}copy(){const i=new Uh;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];i.use(...a)}return i.data(vd(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(_d("data",this.frozen),this.namespace[i]=r,this):FD.call(this.namespace,i)&&this.namespace[i]||void 0:i?(_d("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const u=r.call(i,...a);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=Fu(i),a=this.parser||this.Parser;return wd("parse",a),a(String(r),r)}process(i,r){const a=this;return this.freeze(),wd("process",this.parser||this.Parser),Ed("process",this.compiler||this.Compiler),r?u(void 0,r):new Promise(u);function u(s,c){const d=Fu(i),m=a.parse(d);a.run(m,d,function(g,y,v){if(g||!y||!v)return p(g);const x=y,S=a.stringify(x,v);PD(S)?v.value=S:v.result=S,p(g,v)});function p(g,y){g||!y?c(g):s?s(y):r(void 0,y)}}}processSync(i){let r=!1,a;return this.freeze(),wd("processSync",this.parser||this.Parser),Ed("processSync",this.compiler||this.Compiler),this.process(i,u),Rv("processSync","process",r),a;function u(s,c){r=!0,zv(s),a=c}}run(i,r,a){kv(i),this.freeze();const u=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?s(void 0,a):new Promise(s);function s(c,d){const m=Fu(r);u.run(i,m,p);function p(g,y,v){const x=y||i;g?d(g):c?c(x):a(void 0,x,v)}}}runSync(i,r){let a=!1,u;return this.run(i,r,s),Rv("runSync","run",a),u;function s(c,d){zv(c),u=d,a=!0}}stringify(i,r){this.freeze();const a=Fu(r),u=this.compiler||this.Compiler;return Ed("stringify",u),kv(i),u(i,a)}use(i,...r){const a=this.attachers,u=this.namespace;if(_d("use",this.frozen),i!=null)if(typeof i=="function")m(i,r);else if(typeof i=="object")Array.isArray(i)?d(i):c(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function s(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...y]=p;m(g,y)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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");d(p.plugins),p.settings&&(u.settings=vd(!0,u.settings,p.settings))}function d(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const y=p[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,g){let y=-1,v=-1;for(;++y<a.length;)if(a[y][0]===p){v=y;break}if(v===-1)a.push([p,...g]);else if(g.length>0){let[x,...S]=g;const C=a[v][1];th(C)&&th(x)&&(x=vd(!0,C,x)),a[v]=[p,x,...S]}}}}const KD=new Uh().freeze();function wd(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Ed(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function _d(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kv(t){if(!th(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Rv(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function Fu(t){return $D(t)?t:new mb(t)}function $D(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function PD(t){return typeof t=="string"||JD(t)}function JD(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const WD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Hv=[],jv={allowDangerousHtml:!0},t4=/^(https?|ircs?|mailto|xmpp)$/i,e4=[{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 n4(t){const i=i4(t),r=r4(t);return l4(i.runSync(i.parse(r),r),t)}function i4(t){const i=t.rehypePlugins||Hv,r=t.remarkPlugins||Hv,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...jv}:jv;return KD().use(jO).use(r).use(OD,a).use(i)}function r4(t){const i=t.children||"",r=new mb;return typeof i=="string"&&(r.value=i),r}function l4(t,i){const r=i.allowedElements,a=i.allowElement,u=i.components,s=i.disallowedElements,c=i.skipHtml,d=i.unwrapDisallowed,m=i.urlTransform||a4;for(const g of e4)Object.hasOwn(i,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+WD+g.id,void 0);return pb(t,p),mz(t,{Fragment:z.Fragment,components:u,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function p(g,y,v){if(g.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let x;for(x in pd)if(Object.hasOwn(pd,x)&&Object.hasOwn(g.properties,x)){const S=g.properties[x],C=pd[x];(C===null||C.includes(g.tagName))&&(g.properties[x]=m(String(S||""),x,g))}}if(g.type==="element"){let x=r?!r.includes(g.tagName):s?s.includes(g.tagName):!1;if(!x&&a&&typeof y=="number"&&(x=!a(g,y,v)),x&&v&&typeof y=="number")return d&&g.children?v.children.splice(y,1,...g.children):v.children.splice(y,1),y}}}function a4(t){const i=t.indexOf(":"),r=t.indexOf("?"),a=t.indexOf("#"),u=t.indexOf("/");return i===-1||u!==-1&&i>u||r!==-1&&i>r||a!==-1&&i>a||t4.test(t.slice(0,i))?t:""}function o4({children:t,className:i}){return z.jsx("div",{className:`markdown-view ${i??""}`,children:z.jsx(n4,{children:t})})}function u4({sessionId:t,nodeId:i,onClose:r}){const{data:a,isLoading:u,error:s}=gE(t,i);return z.jsxs("div",{className:"fixed inset-y-0 right-0 w-[420px] bg-[var(--bg-secondary)] border-l border-[var(--border)] flex flex-col z-50",children:[z.jsx(s4,{stepLabel:a?.stepLabel??null,nodeId:i,onClose:r}),z.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[u&&z.jsx("div",{className:"text-[var(--text-secondary)] text-sm",children:"Loading..."}),s&&z.jsx("div",{className:"text-[var(--error)] text-sm bg-[var(--bg-card)] rounded p-3",children:s.message}),a&&z.jsx(c4,{detail:a})]})]})}function s4({stepLabel:t,nodeId:i,onClose:r}){return z.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)] shrink-0 gap-2",children:[z.jsxs("div",{className:"min-w-0",children:[t&&z.jsx("div",{className:"text-sm font-medium text-[var(--text-primary)] truncate",children:t}),z.jsx("div",{className:"font-mono text-xs text-[var(--text-muted)] truncate",children:i})]}),z.jsx("button",{onClick:r,className:"shrink-0 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors text-lg leading-none cursor-pointer",children:"✕"})]})}function c4({detail:t}){return z.jsxs(z.Fragment,{children:[z.jsx(f4,{detail:t}),t.recapMarkdown&&z.jsx(d4,{markdown:t.recapMarkdown}),t.advanceOutcome&&z.jsx(h4,{outcome:t.advanceOutcome}),t.validations.length>0&&z.jsx(p4,{validations:t.validations}),t.gaps.length>0&&z.jsx(g4,{gaps:t.gaps}),t.artifacts.length>0&&z.jsx(y4,{artifacts:t.artifacts})]})}function f4({detail:t}){return z.jsx(Rl,{title:"Node",children:z.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs",children:[z.jsx(Ku,{label:"Kind",value:z.jsx(x4,{kind:t.nodeKind})}),z.jsx(Ku,{label:"Event Index",value:String(t.createdAtEventIndex)}),t.parentNodeId&&z.jsx(Ku,{label:"Parent",value:t.parentNodeId,mono:!0}),t.isTip&&z.jsx(Ku,{label:"Tip",value:t.isPreferredTip?"Preferred tip":"Tip"})]})})}function d4({markdown:t}){return z.jsx(Rl,{title:"Recap",children:z.jsx(o4,{children:t})})}function h4({outcome:t}){const i=t.kind==="advanced";return z.jsx(Rl,{title:"Advance Outcome",children:z.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[z.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded font-medium",style:{backgroundColor:i?"var(--success)20":"var(--blocked)20",color:i?"var(--success)":"var(--blocked)"},children:i?"Advanced":"Blocked"}),z.jsxs("span",{className:"text-[var(--text-muted)]",children:["attempt ",t.attemptId.slice(-8)," at event #",t.recordedAtEventIndex]})]})})}function p4({validations:t}){return z.jsx(Rl,{title:`Validations (${t.length})`,children:z.jsx("div",{className:"space-y-2",children:t.map(i=>z.jsx(m4,{validation:i},i.validationId))})})}function m4({validation:t}){const i=t.outcome==="pass";return z.jsxs("div",{className:"bg-[var(--bg-primary)] rounded p-3 text-xs space-y-2",children:[z.jsxs("div",{className:"flex items-center gap-2",children:[z.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:i?"var(--success)20":"var(--error)20",color:i?"var(--success)":"var(--error)"},children:i?"Pass":"Fail"}),z.jsx("span",{className:"text-[var(--text-muted)] font-mono",children:t.contractRef})]}),t.issues.length>0&&z.jsxs("div",{children:[z.jsx("div",{className:"text-[var(--text-muted)] mb-1",children:"Issues:"}),z.jsx("ul",{className:"list-disc list-inside text-[var(--error)] space-y-0.5",children:t.issues.map((r,a)=>z.jsx("li",{children:r},a))})]}),t.suggestions.length>0&&z.jsxs("div",{children:[z.jsx("div",{className:"text-[var(--text-muted)] mb-1",children:"Suggestions:"}),z.jsx("ul",{className:"list-disc list-inside text-[var(--text-secondary)] space-y-0.5",children:t.suggestions.map((r,a)=>z.jsx("li",{children:r},a))})]})]})}function g4({gaps:t}){return z.jsx(Rl,{title:`Gaps (${t.length})`,children:z.jsx("div",{className:"space-y-1.5",children:t.map(i=>z.jsxs("div",{className:"flex items-start gap-2 text-xs bg-[var(--bg-primary)] rounded p-2",children:[z.jsx("span",{className:"shrink-0 mt-0.5 inline-flex items-center px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:i.isResolved?"var(--success)20":i.severity==="critical"?"var(--error)20":"var(--warning)20",color:i.isResolved?"var(--success)":i.severity==="critical"?"var(--error)":"var(--warning)"},children:i.isResolved?"Resolved":i.severity==="critical"?"Critical":"Non-critical"}),z.jsx("span",{className:"text-[var(--text-secondary)]",children:i.summary})]},i.gapId))})})}function y4({artifacts:t}){return z.jsx(Rl,{title:`Artifacts (${t.length})`,children:z.jsx("div",{className:"space-y-2",children:t.map(i=>z.jsxs("div",{className:"bg-[var(--bg-primary)] rounded p-3 text-xs space-y-1",children:[z.jsxs("div",{className:"flex items-center gap-2 text-[var(--text-muted)]",children:[z.jsx("span",{children:i.contentType}),z.jsx("span",{children:"·"}),z.jsx("span",{children:b4(i.byteLength)})]}),z.jsx("pre",{className:"text-[var(--text-secondary)] whitespace-pre-wrap break-words font-mono max-h-48 overflow-y-auto",children:typeof i.content=="string"?i.content:JSON.stringify(i.content,null,2)})]},i.sha256))})})}function Rl({title:t,children:i}){return z.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border)] rounded-lg overflow-hidden",children:[z.jsx("div",{className:"px-3 py-2 border-b border-[var(--border)]",children:z.jsx("h3",{className:"text-xs font-medium text-[var(--text-muted)] uppercase tracking-wide",children:t})}),z.jsx("div",{className:"p-3",children:i})]})}function Ku({label:t,value:i,mono:r}){return z.jsxs(z.Fragment,{children:[z.jsx("dt",{className:"text-[var(--text-muted)]",children:t}),z.jsx("dd",{className:r?"font-mono text-[var(--text-secondary)] truncate":"text-[var(--text-primary)]",children:i})]})}const v4={step:{label:"Step",color:"var(--accent)"},checkpoint:{label:"Checkpoint",color:"var(--success)"},blocked_attempt:{label:"Blocked",color:"var(--error)"}};function x4({kind:t}){const i=v4[t];return z.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:`${i.color}20`,color:i.color},children:i.label})}function b4(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function S4({sessionId:t}){const{data:i,isLoading:r,error:a}=mE(t),[u,s]=W.useState(null),c=W.useCallback(m=>{s(p=>p===m?null:m)},[]),d=W.useCallback(()=>s(null),[]);return r?z.jsx("div",{className:"text-[var(--text-secondary)]",children:"Loading session..."}):a?z.jsxs("div",{className:"text-[var(--error)] bg-[var(--bg-card)] rounded-lg p-4",children:["Failed to load session: ",a.message]}):i?z.jsxs("div",{className:u?"mr-[420px] transition-[margin] duration-200":"transition-[margin] duration-200",children:[i.sessionTitle&&z.jsx("h2",{className:"text-base font-medium text-[var(--text-primary)] mb-2",children:i.sessionTitle}),z.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[z.jsx(Kv,{health:i.health}),z.jsxs("span",{className:"text-sm text-[var(--text-muted)]",children:[i.runs.length," run",i.runs.length!==1?"s":""]})]}),i.runs.length===0?z.jsx("div",{className:"text-center py-16 text-[var(--text-secondary)]",children:"No runs in this session"}):z.jsx("div",{className:"space-y-6",children:i.runs.map(m=>z.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border)] rounded-lg overflow-hidden",children:[z.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[z.jsxs("div",{className:"flex items-center gap-3",children:[z.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)]",children:m.workflowName??m.workflowId??"Run"}),z.jsx("span",{className:"font-mono text-xs text-[var(--text-muted)]",children:m.runId})]}),z.jsxs("div",{className:"flex items-center gap-2",children:[m.hasUnresolvedCriticalGaps&&z.jsx("span",{className:"text-xs text-[var(--warning)]",children:"Critical gaps"}),z.jsx(Fv,{status:m.status})]})]}),z.jsx("div",{className:"h-[500px]",children:z.jsx(UM,{run:m,onNodeClick:c})})]},m.runId))}),u&&z.jsx(u4,{sessionId:t,nodeId:u,onClose:d})]}):null}function w4(){const[t,i]=W.useState(null);return z.jsxs("div",{className:"min-h-screen bg-[var(--bg-primary)]",children:[z.jsx("header",{className:"border-b border-[var(--border)] px-6 py-4",children:z.jsxs("div",{className:"flex items-center gap-4",children:[t&&z.jsx("button",{onClick:()=>i(null),className:"text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:"← Back"}),z.jsx("h1",{className:"text-lg font-semibold text-[var(--text-primary)]",children:"WorkRail Console"}),t&&z.jsx("span",{className:"text-sm text-[var(--text-muted)] font-mono",children:t})]})}),z.jsx("main",{className:"p-6",children:t?z.jsx(S4,{sessionId:t}):z.jsx(CE,{onSelectSession:i})})]})}const E4=new tE({defaultOptions:{queries:{refetchInterval:5e3,staleTime:2e3}}});zw.createRoot(document.getElementById("root")).render(z.jsx(W.StrictMode,{children:z.jsx(nE,{client:E4,children:z.jsx(w4,{})})}));