ruby_reactor 0.4.0 → 0.4.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.
- checksums.yaml +4 -4
- data/.release-please-config.json +3 -0
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +8 -0
- data/lib/ruby_reactor/context.rb +5 -2
- data/lib/ruby_reactor/context_serializer.rb +46 -2
- data/lib/ruby_reactor/dsl/reactor.rb +10 -1
- data/lib/ruby_reactor/executor/result_handler.rb +1 -12
- data/lib/ruby_reactor/executor.rb +7 -1
- data/lib/ruby_reactor/reactor.rb +11 -4
- data/lib/ruby_reactor/storage/redis_adapter.rb +10 -3
- data/lib/ruby_reactor/storage/redis_locking.rb +17 -0
- data/lib/ruby_reactor/utils/backtrace_location.rb +37 -0
- data/lib/ruby_reactor/version.rb +1 -1
- data/lib/ruby_reactor/web/api.rb +68 -8
- data/lib/ruby_reactor/web/coordination_serializer.rb +180 -0
- data/lib/ruby_reactor/web/public/assets/index-CCnNVQy5.css +1 -0
- data/lib/ruby_reactor/web/public/assets/index-D7IBZvos.js +21 -0
- data/lib/ruby_reactor/web/public/index.html +2 -2
- data/lib/ruby_reactor.rb +7 -2
- metadata +6 -4
- data/lib/ruby_reactor/web/public/assets/index-VdeLgH9k.js +0 -19
- data/lib/ruby_reactor/web/public/assets/index-_z-6BvuM.css +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function r(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(s){if(s.ep)return;s.ep=!0;const u=r(s);fetch(s.href,u)}})();function ah(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wf={exports:{}},ro={};var cp;function Rw(){if(cp)return ro;cp=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(o,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:t,type:o,key:f,ref:s!==void 0?s:null,props:u}}return ro.Fragment=l,ro.jsx=r,ro.jsxs=r,ro}var up;function zw(){return up||(up=1,Wf.exports=Rw()),Wf.exports}var y=zw(),Pf={exports:{}},He={};var fp;function Ow(){if(fp)return He;fp=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=b&&R[b]||R["@@iterator"],typeof R=="function"?R:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,C={};function A(R,U,I){this.props=R,this.context=U,this.refs=C,this.updater=I||S}A.prototype.isReactComponent={},A.prototype.setState=function(R,U){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,U,"setState")},A.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function M(){}M.prototype=A.prototype;function E(R,U,I){this.props=R,this.context=U,this.refs=C,this.updater=I||S}var z=E.prototype=new M;z.constructor=E,N(z,A.prototype),z.isPureReactComponent=!0;var B=Array.isArray;function H(){}var L={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function X(R,U,I){var P=I.ref;return{$$typeof:t,type:R,key:U,ref:P!==void 0?P:null,props:I}}function ae(R,U){return X(R.type,U,R.props)}function Q(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function W(R){var U={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(I){return U[I]})}var ie=/\/+/g;function j(R,U){return typeof R=="object"&&R!==null&&R.key!=null?W(""+R.key):U.toString(36)}function Z(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(H,H):(R.status="pending",R.then(function(U){R.status==="pending"&&(R.status="fulfilled",R.value=U)},function(U){R.status==="pending"&&(R.status="rejected",R.reason=U)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function T(R,U,I,P,ue){var de=typeof R;(de==="undefined"||de==="boolean")&&(R=null);var se=!1;if(R===null)se=!0;else switch(de){case"bigint":case"string":case"number":se=!0;break;case"object":switch(R.$$typeof){case t:case l:se=!0;break;case x:return se=R._init,T(se(R._payload),U,I,P,ue)}}if(se)return ue=ue(R),se=P===""?"."+j(R,0):P,B(ue)?(I="",se!=null&&(I=se.replace(ie,"$&/")+"/"),T(ue,U,I,"",function(Te){return Te})):ue!=null&&(Q(ue)&&(ue=ae(ue,I+(ue.key==null||R&&R.key===ue.key?"":(""+ue.key).replace(ie,"$&/")+"/")+se)),U.push(ue)),1;se=0;var fe=P===""?".":P+":";if(B(R))for(var me=0;me<R.length;me++)P=R[me],de=fe+j(P,me),se+=T(P,U,I,de,ue);else if(me=w(R),typeof me=="function")for(R=me.call(R),me=0;!(P=R.next()).done;)P=P.value,de=fe+j(P,me++),se+=T(P,U,I,de,ue);else if(de==="object"){if(typeof R.then=="function")return T(Z(R),U,I,P,ue);throw U=String(R),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return se}function k(R,U,I){if(R==null)return R;var P=[],ue=0;return T(R,P,"","",function(de){return U.call(I,de,ue++)}),P}function D(R){if(R._status===-1){var U=R._result;U=U(),U.then(function(I){(R._status===0||R._status===-1)&&(R._status=1,R._result=I)},function(I){(R._status===0||R._status===-1)&&(R._status=2,R._result=I)}),R._status===-1&&(R._status=0,R._result=U)}if(R._status===1)return R._result.default;throw R._result}var G=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},te={map:k,forEach:function(R,U,I){k(R,function(){U.apply(this,arguments)},I)},count:function(R){var U=0;return k(R,function(){U++}),U},toArray:function(R){return k(R,function(U){return U})||[]},only:function(R){if(!Q(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return He.Activity=p,He.Children=te,He.Component=A,He.Fragment=r,He.Profiler=s,He.PureComponent=E,He.StrictMode=o,He.Suspense=g,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,He.__COMPILER_RUNTIME={__proto__:null,c:function(R){return L.H.useMemoCache(R)}},He.cache=function(R){return function(){return R.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(R,U,I){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var P=N({},R.props),ue=R.key;if(U!=null)for(de in U.key!==void 0&&(ue=""+U.key),U)!q.call(U,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&U.ref===void 0||(P[de]=U[de]);var de=arguments.length-2;if(de===1)P.children=I;else if(1<de){for(var se=Array(de),fe=0;fe<de;fe++)se[fe]=arguments[fe+2];P.children=se}return X(R.type,ue,P)},He.createContext=function(R){return R={$$typeof:f,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:u,_context:R},R},He.createElement=function(R,U,I){var P,ue={},de=null;if(U!=null)for(P in U.key!==void 0&&(de=""+U.key),U)q.call(U,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(ue[P]=U[P]);var se=arguments.length-2;if(se===1)ue.children=I;else if(1<se){for(var fe=Array(se),me=0;me<se;me++)fe[me]=arguments[me+2];ue.children=fe}if(R&&R.defaultProps)for(P in se=R.defaultProps,se)ue[P]===void 0&&(ue[P]=se[P]);return X(R,de,ue)},He.createRef=function(){return{current:null}},He.forwardRef=function(R){return{$$typeof:h,render:R}},He.isValidElement=Q,He.lazy=function(R){return{$$typeof:x,_payload:{_status:-1,_result:R},_init:D}},He.memo=function(R,U){return{$$typeof:m,type:R,compare:U===void 0?null:U}},He.startTransition=function(R){var U=L.T,I={};L.T=I;try{var P=R(),ue=L.S;ue!==null&&ue(I,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(H,G)}catch(de){G(de)}finally{U!==null&&I.types!==null&&(U.types=I.types),L.T=U}},He.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},He.use=function(R){return L.H.use(R)},He.useActionState=function(R,U,I){return L.H.useActionState(R,U,I)},He.useCallback=function(R,U){return L.H.useCallback(R,U)},He.useContext=function(R){return L.H.useContext(R)},He.useDebugValue=function(){},He.useDeferredValue=function(R,U){return L.H.useDeferredValue(R,U)},He.useEffect=function(R,U){return L.H.useEffect(R,U)},He.useEffectEvent=function(R){return L.H.useEffectEvent(R)},He.useId=function(){return L.H.useId()},He.useImperativeHandle=function(R,U,I){return L.H.useImperativeHandle(R,U,I)},He.useInsertionEffect=function(R,U){return L.H.useInsertionEffect(R,U)},He.useLayoutEffect=function(R,U){return L.H.useLayoutEffect(R,U)},He.useMemo=function(R,U){return L.H.useMemo(R,U)},He.useOptimistic=function(R,U){return L.H.useOptimistic(R,U)},He.useReducer=function(R,U,I){return L.H.useReducer(R,U,I)},He.useRef=function(R){return L.H.useRef(R)},He.useState=function(R){return L.H.useState(R)},He.useSyncExternalStore=function(R,U,I){return L.H.useSyncExternalStore(R,U,I)},He.useTransition=function(){return L.H.useTransition()},He.version="19.2.3",He}var dp;function To(){return dp||(dp=1,Pf.exports=Ow()),Pf.exports}var O=To();const Dc=ah(O);var ed={exports:{}},oo={},td={exports:{}},nd={};var hp;function jw(){return hp||(hp=1,(function(t){function l(T,k){var D=T.length;T.push(k);e:for(;0<D;){var G=D-1>>>1,te=T[G];if(0<s(te,k))T[G]=k,T[D]=te,D=G;else break e}}function r(T){return T.length===0?null:T[0]}function o(T){if(T.length===0)return null;var k=T[0],D=T.pop();if(D!==k){T[0]=D;e:for(var G=0,te=T.length,R=te>>>1;G<R;){var U=2*(G+1)-1,I=T[U],P=U+1,ue=T[P];if(0>s(I,D))P<te&&0>s(ue,I)?(T[G]=ue,T[P]=D,G=P):(T[G]=I,T[U]=D,G=U);else if(P<te&&0>s(ue,D))T[G]=ue,T[P]=D,G=P;else break e}}return k}function s(T,k){var D=T.sortIndex-k.sortIndex;return D!==0?D:T.id-k.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var g=[],m=[],x=1,p=null,b=3,w=!1,S=!1,N=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function z(T){for(var k=r(m);k!==null;){if(k.callback===null)o(m);else if(k.startTime<=T)o(m),k.sortIndex=k.expirationTime,l(g,k);else break;k=r(m)}}function B(T){if(N=!1,z(T),!S)if(r(g)!==null)S=!0,H||(H=!0,W());else{var k=r(m);k!==null&&Z(B,k.startTime-T)}}var H=!1,L=-1,q=5,X=-1;function ae(){return C?!0:!(t.unstable_now()-X<q)}function Q(){if(C=!1,H){var T=t.unstable_now();X=T;var k=!0;try{e:{S=!1,N&&(N=!1,M(L),L=-1),w=!0;var D=b;try{t:{for(z(T),p=r(g);p!==null&&!(p.expirationTime>T&&ae());){var G=p.callback;if(typeof G=="function"){p.callback=null,b=p.priorityLevel;var te=G(p.expirationTime<=T);if(T=t.unstable_now(),typeof te=="function"){p.callback=te,z(T),k=!0;break t}p===r(g)&&o(g),z(T)}else o(g);p=r(g)}if(p!==null)k=!0;else{var R=r(m);R!==null&&Z(B,R.startTime-T),k=!1}}break e}finally{p=null,b=D,w=!1}k=void 0}}finally{k?W():H=!1}}}var W;if(typeof E=="function")W=function(){E(Q)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,j=ie.port2;ie.port1.onmessage=Q,W=function(){j.postMessage(null)}}else W=function(){A(Q,0)};function Z(T,k){L=A(function(){T(t.unstable_now())},k)}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(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(T){switch(b){case 1:case 2:case 3:var k=3;break;default:k=b}var D=b;b=k;try{return T()}finally{b=D}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function(T,k){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var D=b;b=T;try{return k()}finally{b=D}},t.unstable_scheduleCallback=function(T,k,D){var G=t.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?G+D:G):D=G,T){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=D+te,T={id:x++,callback:k,priorityLevel:T,startTime:D,expirationTime:te,sortIndex:-1},D>G?(T.sortIndex=D,l(m,T),r(g)===null&&T===r(m)&&(N?(M(L),L=-1):N=!0,Z(B,D-G))):(T.sortIndex=te,l(g,T),S||w||(S=!0,H||(H=!0,W()))),T},t.unstable_shouldYield=ae,t.unstable_wrapCallback=function(T){var k=b;return function(){var D=b;b=k;try{return T.apply(this,arguments)}finally{b=D}}}})(nd)),nd}var mp;function Dw(){return mp||(mp=1,td.exports=jw()),td.exports}var ad={exports:{}},cn={};var gp;function kw(){if(gp)return cn;gp=1;var t=To();function l(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)m+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(l(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(g,m,x){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:g,containerInfo:m,implementation:x}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return cn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,cn.createPortal=function(g,m){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return u(g,m,null,x)},cn.flushSync=function(g){var m=f.T,x=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=m,o.p=x,o.d.f()}},cn.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,o.d.C(g,m))},cn.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},cn.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var x=m.as,p=h(x,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;x==="style"?o.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:w}):x==="script"&&o.d.X(g,{crossOrigin:p,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},cn.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var x=h(m.as,m.crossOrigin);o.d.M(g,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&o.d.M(g)},cn.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var x=m.as,p=h(x,m.crossOrigin);o.d.L(g,x,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},cn.preloadModule=function(g,m){if(typeof g=="string")if(m){var x=h(m.as,m.crossOrigin);o.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(g)},cn.requestFormReset=function(g){o.d.r(g)},cn.unstable_batchedUpdates=function(g,m){return g(m)},cn.useFormState=function(g,m,x){return f.H.useFormState(g,m,x)},cn.useFormStatus=function(){return f.H.useHostTransitionStatus()},cn.version="19.2.3",cn}var pp;function Iy(){if(pp)return ad.exports;pp=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(l){console.error(l)}}return t(),ad.exports=kw(),ad.exports}var yp;function Hw(){if(yp)return oo;yp=1;var t=Dw(),l=To(),r=Iy();function o(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}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 s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function f(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 h(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 g(e){if(u(e)!==e)throw Error(o(188))}function m(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(o(188));return n!==e?null:e}for(var a=e,i=n;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(i=c.return,i!==null){a=i;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return g(c),e;if(d===i)return g(c),n;d=d.sibling}throw Error(o(188))}if(a.return!==i.return)a=c,i=d;else{for(var v=!1,_=c.child;_;){if(_===a){v=!0,a=c,i=d;break}if(_===i){v=!0,i=c,a=d;break}_=_.sibling}if(!v){for(_=d.child;_;){if(_===a){v=!0,a=d,i=c;break}if(_===i){v=!0,i=d,a=c;break}_=_.sibling}if(!v)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),E=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function W(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function j(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case A:return"Profiler";case C:return"StrictMode";case B:return"Suspense";case H:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case E:return e.displayName||"Context";case M:return(e._context.displayName||"Context")+".Consumer";case z:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return n=e.displayName||null,n!==null?n:j(e.type)||"Memo";case q:n=e._payload,e=e._init;try{return j(e(n))}catch{}}return null}var Z=Array.isArray,T=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D={pending:!1,data:null,method:null,action:null},G=[],te=-1;function R(e){return{current:e}}function U(e){0>te||(e.current=G[te],G[te]=null,te--)}function I(e,n){te++,G[te]=e.current,e.current=n}var P=R(null),ue=R(null),de=R(null),se=R(null);function fe(e,n){switch(I(de,n),I(ue,e),I(P,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Og(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Og(n),e=jg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(P),I(P,e)}function me(){U(P),U(ue),U(de)}function Te(e){e.memoizedState!==null&&I(se,e);var n=P.current,a=jg(n,e.type);n!==a&&(I(ue,e),I(P,a))}function je(e){ue.current===e&&(U(P),U(ue)),se.current===e&&(U(se),no._currentValue=D)}var Se,Re;function Ve(e){if(Se===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Se=n&&n[1]||"",Re=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Se+e+Re}var at=!1;function Me(e,n){if(!e||at)return"";at=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ne){var ee=ne}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(ne){ee=ne}e.call(ce.prototype)}}else{try{throw Error()}catch(ne){ee=ne}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ne){if(ne&&ee&&typeof ne.stack=="string")return[ne.stack,ee.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=i.DetermineComponentFrameRoot(),v=d[0],_=d[1];if(v&&_){var V=v.split(`
|
|
4
|
+
`),F=_.split(`
|
|
5
|
+
`);for(c=i=0;i<V.length&&!V[i].includes("DetermineComponentFrameRoot");)i++;for(;c<F.length&&!F[c].includes("DetermineComponentFrameRoot");)c++;if(i===V.length||c===F.length)for(i=V.length-1,c=F.length-1;1<=i&&0<=c&&V[i]!==F[c];)c--;for(;1<=i&&0<=c;i--,c--)if(V[i]!==F[c]){if(i!==1||c!==1)do if(i--,c--,0>c||V[i]!==F[c]){var le=`
|
|
6
|
+
`+V[i].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=i&&0<=c);break}}}finally{at=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ve(a):""}function Le(e,n){switch(e.tag){case 26:case 27:case 5:return Ve(e.type);case 16:return Ve("Lazy");case 13:return e.child!==n&&n!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ve("Activity");default:return""}}function We(e){try{var n="",a=null;do n+=Le(e,a),a=e,e=e.return;while(e);return n}catch(i){return`
|
|
7
|
+
Error generating stack: `+i.message+`
|
|
8
|
+
`+i.stack}}var Ge=Object.prototype.hasOwnProperty,xt=t.unstable_scheduleCallback,Qt=t.unstable_cancelCallback,gt=t.unstable_shouldYield,vt=t.unstable_requestPaint,Je=t.unstable_now,zn=t.unstable_getCurrentPriorityLevel,Gt=t.unstable_ImmediatePriority,ln=t.unstable_UserBlockingPriority,Ct=t.unstable_NormalPriority,fn=t.unstable_LowPriority,On=t.unstable_IdlePriority,Vl=t.log,ya=t.unstable_setDisableYieldValue,xa=null,Kt=null;function jn(e){if(typeof Vl=="function"&&ya(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(xa,e)}catch{}}var Wt=Math.clz32?Math.clz32:yi,gr=Math.log,Yl=Math.LN2;function yi(e){return e>>>=0,e===0?32:31-(gr(e)/Yl|0)|0}var va=256,tl=262144,ba=4194304;function rn(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 Y(e,n,a){var i=e.pendingLanes;if(i===0)return 0;var c=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var _=i&134217727;return _!==0?(i=_&~d,i!==0?c=rn(i):(v&=_,v!==0?c=rn(v):a||(a=_&~e,a!==0&&(c=rn(a))))):(_=i&~d,_!==0?c=rn(_):v!==0?c=rn(v):a||(a=i&~e,a!==0&&(c=rn(a)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:c}function re(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function pe(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 ke(){var e=ba;return ba<<=1,(ba&62914560)===0&&(ba=4194304),e}function pt(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function rt(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ve(e,n,a,i,c,d){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var _=e.entanglements,V=e.expirationTimes,F=e.hiddenUpdates;for(a=v&~a;0<a;){var le=31-Wt(a),ce=1<<le;_[le]=0,V[le]=-1;var ee=F[le];if(ee!==null)for(F[le]=null,le=0;le<ee.length;le++){var ne=ee[le];ne!==null&&(ne.lane&=-536870913)}a&=~ce}i!==0&&ye(e,i,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~n))}function ye(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var i=31-Wt(n);e.entangledLanes|=n,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function ze(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var i=31-Wt(a),c=1<<i;c&n|e[i]&n&&(e[i]|=n),a&=~c}}function Mt(e,n){var a=n&-n;return a=(a&42)!==0?1:bt(a),(a&(e.suspendedLanes|n))!==0?0:a}function bt(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 Xn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function nl(){var e=k.p;return e!==0?e:(e=window.event,e===void 0?32:np(e.type))}function al(e,n){var a=k.p;try{return k.p=e,n()}finally{k.p=a}}var Dn=Math.random().toString(36).slice(2),At="__reactFiber$"+Dn,It="__reactProps$"+Dn,Zn="__reactContainer$"+Dn,ll="__reactEvents$"+Dn,ql="__reactListeners$"+Dn,il="__reactHandles$"+Dn,xi="__reactResources$"+Dn,wa="__reactMarker$"+Dn;function $l(e){delete e[At],delete e[It],delete e[ll],delete e[ql],delete e[il]}function Pt(e){var n=e[At];if(n)return n;for(var a=e.parentNode;a;){if(n=a[Zn]||a[At]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Vg(e);e!==null;){if(a=e[At])return a;e=Vg(e)}return n}e=a,a=e.parentNode}return null}function Qn(e){if(e=e[At]||e[Zn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Kn(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(o(33))}function ra(e){var n=e[xi];return n||(n=e[xi]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ot(e){e[wa]=!0}var vi=new Set,Sa={};function In(e,n){he(e,n),he(e+"Capture",n)}function he(e,n){for(Sa[e]=n,e=0;e<n.length;e++)vi.add(n[e])}var Ne=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]*$"),Ye={},lt={};function Tt(e){return Ge.call(lt,e)?!0:Ge.call(Ye,e)?!1:Ne.test(e)?lt[e]=!0:(Ye[e]=!0,!1)}function Jt(e,n,a){if(Tt(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var i=n.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function dn(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function on(e,n,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+i)}}function ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hn(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function bi(e,n,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,d=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(v){a=""+v,d.call(this,v)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ea(e){if(!e._valueTracker){var n=hn(e)?"checked":"value";e._valueTracker=bi(e,n,""+e[n])}}function Gl(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),i="";return e&&(i=hn(e)?e.checked?"true":"false":e.value),e=i,e!==a?(n.setValue(e),!0):!1}function _a(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 pr=/[\n"\\]/g;function sn(e){return e.replace(pr,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Na(e,n,a,i,c,d,v,_){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+ft(n)):e.value!==""+ft(n)&&(e.value=""+ft(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?rl(e,v,ft(n)):a!=null?rl(e,v,ft(a)):i!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+ft(_):e.removeAttribute("name")}function Ca(e,n,a,i,c,d,v,_){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){Ea(e);return}a=a!=null?""+ft(a):"",n=n!=null?""+ft(n):a,_||n===e.value||(e.value=n),e.defaultValue=n}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=_?e.checked:!!i,e.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Ea(e)}function rl(e,n,a){n==="number"&&_a(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Lt(e,n,a,i){if(e=e.options,n){n={};for(var c=0;c<a.length;c++)n["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=n.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&i&&(e[a].defaultSelected=!0)}else{for(a=""+ft(a),n=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function Yo(e,n,a){if(n!=null&&(n=""+ft(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+ft(a):""}function wi(e,n,a,i){if(n==null){if(i!=null){if(a!=null)throw Error(o(92));if(Z(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),n=a}a=ft(n),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),Ea(e)}function De(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var qo=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 Bt(e,n,a){var i=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":i?e.setProperty(n,a):typeof a!="number"||a===0||qo.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function ot(e,n,a){if(n!=null&&typeof n!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||n!=null&&n.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in n)i=n[c],n.hasOwnProperty(c)&&a[c]!==i&&Bt(e,c,i)}else for(var d in n)n.hasOwnProperty(d)&&Bt(e,d,n[d])}function ol(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 Ma=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"]]),yr=/^[\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 sl(e){return yr.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ge(){}var Ee=null;function Be(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qe=null,Rt=null;function kn(e){var n=Qn(e);if(n&&(e=n.stateNode)){var a=e[It]||null;e:switch(e=n.stateNode,n.type){case"input":if(Na(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+sn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var i=a[n];if(i!==e&&i.form===e.form){var c=i[It]||null;if(!c)throw Error(o(90));Na(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<a.length;n++)i=a[n],i.form===e.form&&Gl(i)}break e;case"textarea":Yo(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Lt(e,!!a.multiple,n,!1)}}}var xr=!1;function $o(e,n,a){if(xr)return e(n,a);xr=!0;try{var i=e(n);return i}finally{if(xr=!1,(Qe!==null||Rt!==null)&&(Rs(),Qe&&(n=Qe,e=Rt,Rt=Qe=null,kn(n),e)))for(n=0;n<e.length;n++)kn(e[n])}}function vr(e,n){var a=e.stateNode;if(a===null)return null;var i=a[It]||null;if(i===null)return null;a=i[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,n,typeof a));return a}var Aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fc=!1;if(Aa)try{var br={};Object.defineProperty(br,"passive",{get:function(){Fc=!0}}),window.addEventListener("test",br,br),window.removeEventListener("test",br,br)}catch{Fc=!1}var cl=null,Wc=null,Go=null;function jh(){if(Go)return Go;var e,n=Wc,a=n.length,i,c="value"in cl?cl.value:cl.textContent,d=c.length;for(e=0;e<a&&n[e]===c[e];e++);var v=a-e;for(i=1;i<=v&&n[a-i]===c[d-i];i++);return Go=c.slice(e,1<i?1-i:void 0)}function Xo(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 Zo(){return!0}function Dh(){return!1}function gn(e){function n(a,i,c,d,v){this._reactName=a,this._targetInst=c,this.type=i,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(a=e[_],this[_]=a?a(d):d[_]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Zo:Dh,this.isPropagationStopped=Dh,this}return p(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Zo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Zo)},persist:function(){},isPersistent:Zo}),n}var Xl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qo=gn(Xl),wr=p({},Xl,{view:0,detail:0}),Ab=gn(wr),Pc,eu,Sr,Ko=p({},wr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nu,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!==Sr&&(Sr&&e.type==="mousemove"?(Pc=e.screenX-Sr.screenX,eu=e.screenY-Sr.screenY):eu=Pc=0,Sr=e),Pc)},movementY:function(e){return"movementY"in e?e.movementY:eu}}),kh=gn(Ko),Tb=p({},Ko,{dataTransfer:0}),Rb=gn(Tb),zb=p({},wr,{relatedTarget:0}),tu=gn(zb),Ob=p({},Xl,{animationName:0,elapsedTime:0,pseudoElement:0}),jb=gn(Ob),Db=p({},Xl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kb=gn(Db),Hb=p({},Xl,{data:0}),Hh=gn(Hb),Lb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bb={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"},Ub={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vb(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Ub[e])?!!n[e]:!1}function nu(){return Vb}var Yb=p({},wr,{key:function(e){if(e.key){var n=Lb[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Xo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nu,charCode:function(e){return e.type==="keypress"?Xo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qb=gn(Yb),$b=p({},Ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lh=gn($b),Gb=p({},wr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nu}),Xb=gn(Gb),Zb=p({},Xl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qb=gn(Zb),Kb=p({},Ko,{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}),Ib=gn(Kb),Jb=p({},Xl,{newState:0,oldState:0}),Fb=gn(Jb),Wb=[9,13,27,32],au=Aa&&"CompositionEvent"in window,Er=null;Aa&&"documentMode"in document&&(Er=document.documentMode);var Pb=Aa&&"TextEvent"in window&&!Er,Bh=Aa&&(!au||Er&&8<Er&&11>=Er),Uh=" ",Vh=!1;function Yh(e,n){switch(e){case"keyup":return Wb.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Si=!1;function e1(e,n){switch(e){case"compositionend":return qh(n);case"keypress":return n.which!==32?null:(Vh=!0,Uh);case"textInput":return e=n.data,e===Uh&&Vh?null:e;default:return null}}function t1(e,n){if(Si)return e==="compositionend"||!au&&Yh(e,n)?(e=jh(),Go=Wc=cl=null,Si=!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 Bh&&n.locale!=="ko"?null:n.data;default:return null}}var n1={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 $h(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!n1[e.type]:n==="textarea"}function Gh(e,n,a,i){Qe?Rt?Rt.push(i):Rt=[i]:Qe=i,n=Ls(n,"onChange"),0<n.length&&(a=new Qo("onChange","change",null,a,i),e.push({event:a,listeners:n}))}var _r=null,Nr=null;function a1(e){Cg(e,0)}function Io(e){var n=Kn(e);if(Gl(n))return e}function Xh(e,n){if(e==="change")return n}var Zh=!1;if(Aa){var lu;if(Aa){var iu="oninput"in document;if(!iu){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),iu=typeof Qh.oninput=="function"}lu=iu}else lu=!1;Zh=lu&&(!document.documentMode||9<document.documentMode)}function Kh(){_r&&(_r.detachEvent("onpropertychange",Ih),Nr=_r=null)}function Ih(e){if(e.propertyName==="value"&&Io(Nr)){var n=[];Gh(n,Nr,e,Be(e)),$o(a1,n)}}function l1(e,n,a){e==="focusin"?(Kh(),_r=n,Nr=a,_r.attachEvent("onpropertychange",Ih)):e==="focusout"&&Kh()}function i1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Io(Nr)}function r1(e,n){if(e==="click")return Io(n)}function o1(e,n){if(e==="input"||e==="change")return Io(n)}function s1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Sn=typeof Object.is=="function"?Object.is:s1;function Cr(e,n){if(Sn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),i=Object.keys(n);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var c=a[i];if(!Ge.call(n,c)||!Sn(e[c],n[c]))return!1}return!0}function Jh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fh(e,n){var a=Jh(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=n&&i>=n)return{node:a,offset:n-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Jh(a)}}function Wh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Wh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ph(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=_a(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=_a(e.document)}return n}function ru(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 c1=Aa&&"documentMode"in document&&11>=document.documentMode,Ei=null,ou=null,Mr=null,su=!1;function em(e,n,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;su||Ei==null||Ei!==_a(i)||(i=Ei,"selectionStart"in i&&ru(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Mr&&Cr(Mr,i)||(Mr=i,i=Ls(ou,"onSelect"),0<i.length&&(n=new Qo("onSelect","select",null,n,a),e.push({event:n,listeners:i}),n.target=Ei)))}function Zl(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var _i={animationend:Zl("Animation","AnimationEnd"),animationiteration:Zl("Animation","AnimationIteration"),animationstart:Zl("Animation","AnimationStart"),transitionrun:Zl("Transition","TransitionRun"),transitionstart:Zl("Transition","TransitionStart"),transitioncancel:Zl("Transition","TransitionCancel"),transitionend:Zl("Transition","TransitionEnd")},cu={},tm={};Aa&&(tm=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);function Ql(e){if(cu[e])return cu[e];if(!_i[e])return e;var n=_i[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in tm)return cu[e]=n[a];return e}var nm=Ql("animationend"),am=Ql("animationiteration"),lm=Ql("animationstart"),u1=Ql("transitionrun"),f1=Ql("transitionstart"),d1=Ql("transitioncancel"),im=Ql("transitionend"),rm=new Map,uu="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(" ");uu.push("scrollEnd");function Jn(e,n){rm.set(e,n),In(n,[e])}var Jo=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)},Hn=[],Ni=0,fu=0;function Fo(){for(var e=Ni,n=fu=Ni=0;n<e;){var a=Hn[n];Hn[n++]=null;var i=Hn[n];Hn[n++]=null;var c=Hn[n];Hn[n++]=null;var d=Hn[n];if(Hn[n++]=null,i!==null&&c!==null){var v=i.pending;v===null?c.next=c:(c.next=v.next,v.next=c),i.pending=c}d!==0&&om(a,c,d)}}function Wo(e,n,a,i){Hn[Ni++]=e,Hn[Ni++]=n,Hn[Ni++]=a,Hn[Ni++]=i,fu|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function du(e,n,a,i){return Wo(e,n,a,i),Po(e)}function Kl(e,n){return Wo(e,null,null,n),Po(e)}function om(e,n,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,i=d.alternate,i!==null&&(i.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-Wt(a),e=d.hiddenUpdates,i=e[c],i===null?e[c]=[n]:i.push(n),n.lane=a|536870912),d):null}function Po(e){if(50<Ir)throw Ir=0,Sf=null,Error(o(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Ci={};function h1(e,n,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(e,n,a,i){return new h1(e,n,a,i)}function hu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ta(e,n){var a=e.alternate;return a===null?(a=En(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function sm(e,n){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function es(e,n,a,i,c,d){var v=0;if(i=e,typeof e=="function")hu(e)&&(v=1);else if(typeof e=="string")v=xw(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=En(31,a,n,c),e.elementType=X,e.lanes=d,e;case N:return Il(a.children,c,d,n);case C:v=8,c|=24;break;case A:return e=En(12,a,n,c|2),e.elementType=A,e.lanes=d,e;case B:return e=En(13,a,n,c),e.elementType=B,e.lanes=d,e;case H:return e=En(19,a,n,c),e.elementType=H,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case E:v=10;break e;case M:v=9;break e;case z:v=11;break e;case L:v=14;break e;case q:v=16,i=null;break e}v=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return n=En(v,a,n,c),n.elementType=e,n.type=i,n.lanes=d,n}function Il(e,n,a,i){return e=En(7,e,i,n),e.lanes=a,e}function mu(e,n,a){return e=En(6,e,null,n),e.lanes=a,e}function cm(e){var n=En(18,null,null,0);return n.stateNode=e,n}function gu(e,n,a){return n=En(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var um=new WeakMap;function Ln(e,n){if(typeof e=="object"&&e!==null){var a=um.get(e);return a!==void 0?a:(n={value:e,source:n,stack:We(n)},um.set(e,n),n)}return{value:e,source:n,stack:We(n)}}var Mi=[],Ai=0,ts=null,Ar=0,Bn=[],Un=0,ul=null,oa=1,sa="";function Ra(e,n){Mi[Ai++]=Ar,Mi[Ai++]=ts,ts=e,Ar=n}function fm(e,n,a){Bn[Un++]=oa,Bn[Un++]=sa,Bn[Un++]=ul,ul=e;var i=oa;e=sa;var c=32-Wt(i)-1;i&=~(1<<c),a+=1;var d=32-Wt(n)+c;if(30<d){var v=c-c%5;d=(i&(1<<v)-1).toString(32),i>>=v,c-=v,oa=1<<32-Wt(n)+c|a<<c|i,sa=d+e}else oa=1<<d|a<<c|i,sa=e}function pu(e){e.return!==null&&(Ra(e,1),fm(e,1,0))}function yu(e){for(;e===ts;)ts=Mi[--Ai],Mi[Ai]=null,Ar=Mi[--Ai],Mi[Ai]=null;for(;e===ul;)ul=Bn[--Un],Bn[Un]=null,sa=Bn[--Un],Bn[Un]=null,oa=Bn[--Un],Bn[Un]=null}function dm(e,n){Bn[Un++]=oa,Bn[Un++]=sa,Bn[Un++]=ul,oa=n.id,sa=n.overflow,ul=e}var en=null,wt=null,Fe=!1,fl=null,Vn=!1,xu=Error(o(519));function dl(e){var n=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Tr(Ln(n,e)),xu}function hm(e){var n=e.stateNode,a=e.type,i=e.memoizedProps;switch(n[At]=e,n[It]=i,a){case"dialog":Ze("cancel",n),Ze("close",n);break;case"iframe":case"object":case"embed":Ze("load",n);break;case"video":case"audio":for(a=0;a<Fr.length;a++)Ze(Fr[a],n);break;case"source":Ze("error",n);break;case"img":case"image":case"link":Ze("error",n),Ze("load",n);break;case"details":Ze("toggle",n);break;case"input":Ze("invalid",n),Ca(n,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ze("invalid",n);break;case"textarea":Ze("invalid",n),wi(n,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||i.suppressHydrationWarning===!0||Rg(n.textContent,a)?(i.popover!=null&&(Ze("beforetoggle",n),Ze("toggle",n)),i.onScroll!=null&&Ze("scroll",n),i.onScrollEnd!=null&&Ze("scrollend",n),i.onClick!=null&&(n.onclick=ge),n=!0):n=!1,n||dl(e,!0)}function mm(e){for(en=e.return;en;)switch(en.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:en=en.return}}function Ti(e){if(e!==en)return!1;if(!Fe)return mm(e),Fe=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Lf(e.type,e.memoizedProps)),a=!a),a&&wt&&dl(e),mm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));wt=Ug(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));wt=Ug(e)}else n===27?(n=wt,Cl(e.type)?(e=qf,qf=null,wt=e):wt=n):wt=en?qn(e.stateNode.nextSibling):null;return!0}function Jl(){wt=en=null,Fe=!1}function vu(){var e=fl;return e!==null&&(vn===null?vn=e:vn.push.apply(vn,e),fl=null),e}function Tr(e){fl===null?fl=[e]:fl.push(e)}var bu=R(null),Fl=null,za=null;function hl(e,n,a){I(bu,n._currentValue),n._currentValue=a}function Oa(e){e._currentValue=bu.current,U(bu)}function wu(e,n,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),e===a)break;e=e.return}}function Su(e,n,a,i){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var v=c.child;d=d.firstContext;e:for(;d!==null;){var _=d;d=c;for(var V=0;V<n.length;V++)if(_.context===n[V]){d.lanes|=a,_=d.alternate,_!==null&&(_.lanes|=a),wu(d.return,a,e),i||(v=null);break e}d=_.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(o(341));v.lanes|=a,d=v.alternate,d!==null&&(d.lanes|=a),wu(v,a,e),v=null}else v=c.child;if(v!==null)v.return=c;else for(v=c;v!==null;){if(v===e){v=null;break}if(c=v.sibling,c!==null){c.return=v.return,v=c;break}v=v.return}c=v}}function Ri(e,n,a,i){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var v=c.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var _=c.type;Sn(c.pendingProps.value,v.value)||(e!==null?e.push(_):e=[_])}}else if(c===se.current){if(v=c.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(no):e=[no])}c=c.return}e!==null&&Su(n,e,a,i),n.flags|=262144}function ns(e){for(e=e.firstContext;e!==null;){if(!Sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wl(e){Fl=e,za=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function tn(e){return gm(Fl,e)}function as(e,n){return Fl===null&&Wl(e),gm(e,n)}function gm(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},za===null){if(e===null)throw Error(o(308));za=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else za=za.next=n;return a}var m1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},g1=t.unstable_scheduleCallback,p1=t.unstable_NormalPriority,Ut={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eu(){return{controller:new m1,data:new Map,refCount:0}}function Rr(e){e.refCount--,e.refCount===0&&g1(p1,function(){e.controller.abort()})}var zr=null,_u=0,zi=0,Oi=null;function y1(e,n){if(zr===null){var a=zr=[];_u=0,zi=Af(),Oi={status:"pending",value:void 0,then:function(i){a.push(i)}}}return _u++,n.then(pm,pm),n}function pm(){if(--_u===0&&zr!==null){Oi!==null&&(Oi.status="fulfilled");var e=zr;zr=null,zi=0,Oi=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function x1(e,n){var a=[],i={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){i.status="fulfilled",i.value=n;for(var c=0;c<a.length;c++)(0,a[c])(n)},function(c){for(i.status="rejected",i.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),i}var ym=T.S;T.S=function(e,n){eg=Je(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&y1(e,n),ym!==null&&ym(e,n)};var Pl=R(null);function Nu(){var e=Pl.current;return e!==null?e:yt.pooledCache}function ls(e,n){n===null?I(Pl,Pl.current):I(Pl,n.pool)}function xm(){var e=Nu();return e===null?null:{parent:Ut._currentValue,pool:e}}var ji=Error(o(460)),Cu=Error(o(474)),is=Error(o(542)),rs={then:function(){}};function vm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bm(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(ge,ge),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Sm(e),e;default:if(typeof n.status=="string")n.then(ge,ge);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=n,e.status="pending",e.then(function(i){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=i}},function(i){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=i}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Sm(e),e}throw ti=n,ji}}function ei(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ti=a,ji):a}}var ti=null;function wm(){if(ti===null)throw Error(o(459));var e=ti;return ti=null,e}function Sm(e){if(e===ji||e===is)throw Error(o(483))}var Di=null,Or=0;function os(e){var n=Or;return Or+=1,Di===null&&(Di=[]),bm(Di,e,n)}function jr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function ss(e,n){throw n.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Em(e){function n(K,$){if(e){var J=K.deletions;J===null?(K.deletions=[$],K.flags|=16):J.push($)}}function a(K,$){if(!e)return null;for(;$!==null;)n(K,$),$=$.sibling;return null}function i(K){for(var $=new Map;K!==null;)K.key!==null?$.set(K.key,K):$.set(K.index,K),K=K.sibling;return $}function c(K,$){return K=Ta(K,$),K.index=0,K.sibling=null,K}function d(K,$,J){return K.index=J,e?(J=K.alternate,J!==null?(J=J.index,J<$?(K.flags|=67108866,$):J):(K.flags|=67108866,$)):(K.flags|=1048576,$)}function v(K){return e&&K.alternate===null&&(K.flags|=67108866),K}function _(K,$,J,oe){return $===null||$.tag!==6?($=mu(J,K.mode,oe),$.return=K,$):($=c($,J),$.return=K,$)}function V(K,$,J,oe){var Ae=J.type;return Ae===N?le(K,$,J.props.children,oe,J.key):$!==null&&($.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===q&&ei(Ae)===$.type)?($=c($,J.props),jr($,J),$.return=K,$):($=es(J.type,J.key,J.props,null,K.mode,oe),jr($,J),$.return=K,$)}function F(K,$,J,oe){return $===null||$.tag!==4||$.stateNode.containerInfo!==J.containerInfo||$.stateNode.implementation!==J.implementation?($=gu(J,K.mode,oe),$.return=K,$):($=c($,J.children||[]),$.return=K,$)}function le(K,$,J,oe,Ae){return $===null||$.tag!==7?($=Il(J,K.mode,oe,Ae),$.return=K,$):($=c($,J),$.return=K,$)}function ce(K,$,J){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=mu(""+$,K.mode,J),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case w:return J=es($.type,$.key,$.props,null,K.mode,J),jr(J,$),J.return=K,J;case S:return $=gu($,K.mode,J),$.return=K,$;case q:return $=ei($),ce(K,$,J)}if(Z($)||W($))return $=Il($,K.mode,J,null),$.return=K,$;if(typeof $.then=="function")return ce(K,os($),J);if($.$$typeof===E)return ce(K,as(K,$),J);ss(K,$)}return null}function ee(K,$,J,oe){var Ae=$!==null?$.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Ae!==null?null:_(K,$,""+J,oe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case w:return J.key===Ae?V(K,$,J,oe):null;case S:return J.key===Ae?F(K,$,J,oe):null;case q:return J=ei(J),ee(K,$,J,oe)}if(Z(J)||W(J))return Ae!==null?null:le(K,$,J,oe,null);if(typeof J.then=="function")return ee(K,$,os(J),oe);if(J.$$typeof===E)return ee(K,$,as(K,J),oe);ss(K,J)}return null}function ne(K,$,J,oe,Ae){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(J)||null,_($,K,""+oe,Ae);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case w:return K=K.get(oe.key===null?J:oe.key)||null,V($,K,oe,Ae);case S:return K=K.get(oe.key===null?J:oe.key)||null,F($,K,oe,Ae);case q:return oe=ei(oe),ne(K,$,J,oe,Ae)}if(Z(oe)||W(oe))return K=K.get(J)||null,le($,K,oe,Ae,null);if(typeof oe.then=="function")return ne(K,$,J,os(oe),Ae);if(oe.$$typeof===E)return ne(K,$,J,as($,oe),Ae);ss($,oe)}return null}function xe(K,$,J,oe){for(var Ae=null,tt=null,_e=$,qe=$=0,Ie=null;_e!==null&&qe<J.length;qe++){_e.index>qe?(Ie=_e,_e=null):Ie=_e.sibling;var nt=ee(K,_e,J[qe],oe);if(nt===null){_e===null&&(_e=Ie);break}e&&_e&&nt.alternate===null&&n(K,_e),$=d(nt,$,qe),tt===null?Ae=nt:tt.sibling=nt,tt=nt,_e=Ie}if(qe===J.length)return a(K,_e),Fe&&Ra(K,qe),Ae;if(_e===null){for(;qe<J.length;qe++)_e=ce(K,J[qe],oe),_e!==null&&($=d(_e,$,qe),tt===null?Ae=_e:tt.sibling=_e,tt=_e);return Fe&&Ra(K,qe),Ae}for(_e=i(_e);qe<J.length;qe++)Ie=ne(_e,K,qe,J[qe],oe),Ie!==null&&(e&&Ie.alternate!==null&&_e.delete(Ie.key===null?qe:Ie.key),$=d(Ie,$,qe),tt===null?Ae=Ie:tt.sibling=Ie,tt=Ie);return e&&_e.forEach(function(zl){return n(K,zl)}),Fe&&Ra(K,qe),Ae}function Oe(K,$,J,oe){if(J==null)throw Error(o(151));for(var Ae=null,tt=null,_e=$,qe=$=0,Ie=null,nt=J.next();_e!==null&&!nt.done;qe++,nt=J.next()){_e.index>qe?(Ie=_e,_e=null):Ie=_e.sibling;var zl=ee(K,_e,nt.value,oe);if(zl===null){_e===null&&(_e=Ie);break}e&&_e&&zl.alternate===null&&n(K,_e),$=d(zl,$,qe),tt===null?Ae=zl:tt.sibling=zl,tt=zl,_e=Ie}if(nt.done)return a(K,_e),Fe&&Ra(K,qe),Ae;if(_e===null){for(;!nt.done;qe++,nt=J.next())nt=ce(K,nt.value,oe),nt!==null&&($=d(nt,$,qe),tt===null?Ae=nt:tt.sibling=nt,tt=nt);return Fe&&Ra(K,qe),Ae}for(_e=i(_e);!nt.done;qe++,nt=J.next())nt=ne(_e,K,qe,nt.value,oe),nt!==null&&(e&&nt.alternate!==null&&_e.delete(nt.key===null?qe:nt.key),$=d(nt,$,qe),tt===null?Ae=nt:tt.sibling=nt,tt=nt);return e&&_e.forEach(function(Tw){return n(K,Tw)}),Fe&&Ra(K,qe),Ae}function mt(K,$,J,oe){if(typeof J=="object"&&J!==null&&J.type===N&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case w:e:{for(var Ae=J.key;$!==null;){if($.key===Ae){if(Ae=J.type,Ae===N){if($.tag===7){a(K,$.sibling),oe=c($,J.props.children),oe.return=K,K=oe;break e}}else if($.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===q&&ei(Ae)===$.type){a(K,$.sibling),oe=c($,J.props),jr(oe,J),oe.return=K,K=oe;break e}a(K,$);break}else n(K,$);$=$.sibling}J.type===N?(oe=Il(J.props.children,K.mode,oe,J.key),oe.return=K,K=oe):(oe=es(J.type,J.key,J.props,null,K.mode,oe),jr(oe,J),oe.return=K,K=oe)}return v(K);case S:e:{for(Ae=J.key;$!==null;){if($.key===Ae)if($.tag===4&&$.stateNode.containerInfo===J.containerInfo&&$.stateNode.implementation===J.implementation){a(K,$.sibling),oe=c($,J.children||[]),oe.return=K,K=oe;break e}else{a(K,$);break}else n(K,$);$=$.sibling}oe=gu(J,K.mode,oe),oe.return=K,K=oe}return v(K);case q:return J=ei(J),mt(K,$,J,oe)}if(Z(J))return xe(K,$,J,oe);if(W(J)){if(Ae=W(J),typeof Ae!="function")throw Error(o(150));return J=Ae.call(J),Oe(K,$,J,oe)}if(typeof J.then=="function")return mt(K,$,os(J),oe);if(J.$$typeof===E)return mt(K,$,as(K,J),oe);ss(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,$!==null&&$.tag===6?(a(K,$.sibling),oe=c($,J),oe.return=K,K=oe):(a(K,$),oe=mu(J,K.mode,oe),oe.return=K,K=oe),v(K)):a(K,$)}return function(K,$,J,oe){try{Or=0;var Ae=mt(K,$,J,oe);return Di=null,Ae}catch(_e){if(_e===ji||_e===is)throw _e;var tt=En(29,_e,null,K.mode);return tt.lanes=oe,tt.return=K,tt}}}var ni=Em(!0),_m=Em(!1),ml=!1;function Mu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Au(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 gl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function pl(e,n,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(it&2)!==0){var c=i.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),i.pending=n,n=Po(e),om(e,null,a),n}return Wo(e,i,n,a),Po(e)}function Dr(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var i=n.lanes;i&=e.pendingLanes,a|=i,n.lanes=a,ze(e,a)}}function Tu(e,n){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=v:d=d.next=v,a=a.next}while(a!==null);d===null?c=d=n:d=d.next=n}else c=d=n;a={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Ru=!1;function kr(){if(Ru){var e=Oi;if(e!==null)throw e}}function Hr(e,n,a,i){Ru=!1;var c=e.updateQueue;ml=!1;var d=c.firstBaseUpdate,v=c.lastBaseUpdate,_=c.shared.pending;if(_!==null){c.shared.pending=null;var V=_,F=V.next;V.next=null,v===null?d=F:v.next=F,v=V;var le=e.alternate;le!==null&&(le=le.updateQueue,_=le.lastBaseUpdate,_!==v&&(_===null?le.firstBaseUpdate=F:_.next=F,le.lastBaseUpdate=V))}if(d!==null){var ce=c.baseState;v=0,le=F=V=null,_=d;do{var ee=_.lane&-536870913,ne=ee!==_.lane;if(ne?(Ke&ee)===ee:(i&ee)===ee){ee!==0&&ee===zi&&(Ru=!0),le!==null&&(le=le.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var xe=e,Oe=_;ee=n;var mt=a;switch(Oe.tag){case 1:if(xe=Oe.payload,typeof xe=="function"){ce=xe.call(mt,ce,ee);break e}ce=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Oe.payload,ee=typeof xe=="function"?xe.call(mt,ce,ee):xe,ee==null)break e;ce=p({},ce,ee);break e;case 2:ml=!0}}ee=_.callback,ee!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=c.callbacks,ne===null?c.callbacks=[ee]:ne.push(ee))}else ne={lane:ee,tag:_.tag,payload:_.payload,callback:_.callback,next:null},le===null?(F=le=ne,V=ce):le=le.next=ne,v|=ee;if(_=_.next,_===null){if(_=c.shared.pending,_===null)break;ne=_,_=ne.next,ne.next=null,c.lastBaseUpdate=ne,c.shared.pending=null}}while(!0);le===null&&(V=ce),c.baseState=V,c.firstBaseUpdate=F,c.lastBaseUpdate=le,d===null&&(c.shared.lanes=0),wl|=v,e.lanes=v,e.memoizedState=ce}}function Nm(e,n){if(typeof e!="function")throw Error(o(191,e));e.call(n)}function Cm(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Nm(a[e],n)}var ki=R(null),cs=R(0);function Mm(e,n){e=Ya,I(cs,e),I(ki,n),Ya=e|n.baseLanes}function zu(){I(cs,Ya),I(ki,ki.current)}function Ou(){Ya=cs.current,U(ki),U(cs)}var _n=R(null),Yn=null;function yl(e){var n=e.alternate;I(kt,kt.current&1),I(_n,e),Yn===null&&(n===null||ki.current!==null||n.memoizedState!==null)&&(Yn=e)}function ju(e){I(kt,kt.current),I(_n,e),Yn===null&&(Yn=e)}function Am(e){e.tag===22?(I(kt,kt.current),I(_n,e),Yn===null&&(Yn=e)):xl()}function xl(){I(kt,kt.current),I(_n,_n.current)}function Nn(e){U(_n),Yn===e&&(Yn=null),U(kt)}var kt=R(0);function us(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Vf(a)||Yf(a)))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 ja=0,Ue=null,dt=null,Vt=null,fs=!1,Hi=!1,ai=!1,ds=0,Lr=0,Li=null,v1=0;function jt(){throw Error(o(321))}function Du(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!Sn(e[a],n[a]))return!1;return!0}function ku(e,n,a,i,c,d){return ja=d,Ue=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,T.H=e===null||e.memoizedState===null?f0:Ju,ai=!1,d=a(i,c),ai=!1,Hi&&(d=Rm(n,a,i,c)),Tm(e),d}function Tm(e){T.H=Vr;var n=dt!==null&&dt.next!==null;if(ja=0,Vt=dt=Ue=null,fs=!1,Lr=0,Li=null,n)throw Error(o(300));e===null||Yt||(e=e.dependencies,e!==null&&ns(e)&&(Yt=!0))}function Rm(e,n,a,i){Ue=e;var c=0;do{if(Hi&&(Li=null),Lr=0,Hi=!1,25<=c)throw Error(o(301));if(c+=1,Vt=dt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}T.H=d0,d=n(a,i)}while(Hi);return d}function b1(){var e=T.H,n=e.useState()[0];return n=typeof n.then=="function"?Br(n):n,e=e.useState()[0],(dt!==null?dt.memoizedState:null)!==e&&(Ue.flags|=1024),n}function Hu(){var e=ds!==0;return ds=0,e}function Lu(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Bu(e){if(fs){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}fs=!1}ja=0,Vt=dt=Ue=null,Hi=!1,Lr=ds=0,Li=null}function mn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Ue.memoizedState=Vt=e:Vt=Vt.next=e,Vt}function Ht(){if(dt===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var n=Vt===null?Ue.memoizedState:Vt.next;if(n!==null)Vt=n,dt=e;else{if(e===null)throw Ue.alternate===null?Error(o(467)):Error(o(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Vt===null?Ue.memoizedState=Vt=e:Vt=Vt.next=e}return Vt}function hs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Br(e){var n=Lr;return Lr+=1,Li===null&&(Li=[]),e=bm(Li,e,n),n=Ue,(Vt===null?n.memoizedState:Vt.next)===null&&(n=n.alternate,T.H=n===null||n.memoizedState===null?f0:Ju),e}function ms(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Br(e);if(e.$$typeof===E)return tn(e)}throw Error(o(438,String(e)))}function Uu(e){var n=null,a=Ue.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var i=Ue.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(n={data:i.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=hs(),Ue.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),i=0;i<e;i++)a[i]=ae;return n.index++,a}function Da(e,n){return typeof n=="function"?n(e):n}function gs(e){var n=Ht();return Vu(n,dt,e)}function Vu(e,n,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var c=e.baseQueue,d=i.pending;if(d!==null){if(c!==null){var v=c.next;c.next=d.next,d.next=v}n.baseQueue=c=d,i.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var _=v=null,V=null,F=n,le=!1;do{var ce=F.lane&-536870913;if(ce!==F.lane?(Ke&ce)===ce:(ja&ce)===ce){var ee=F.revertLane;if(ee===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ce===zi&&(le=!0);else if((ja&ee)===ee){F=F.next,ee===zi&&(le=!0);continue}else ce={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},V===null?(_=V=ce,v=d):V=V.next=ce,Ue.lanes|=ee,wl|=ee;ce=F.action,ai&&a(d,ce),d=F.hasEagerState?F.eagerState:a(d,ce)}else ee={lane:ce,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},V===null?(_=V=ee,v=d):V=V.next=ee,Ue.lanes|=ce,wl|=ce;F=F.next}while(F!==null&&F!==n);if(V===null?v=d:V.next=_,!Sn(d,e.memoizedState)&&(Yt=!0,le&&(a=Oi,a!==null)))throw a;e.memoizedState=d,e.baseState=v,e.baseQueue=V,i.lastRenderedState=d}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Yu(e){var n=Ht(),a=n.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,c=a.pending,d=n.memoizedState;if(c!==null){a.pending=null;var v=c=c.next;do d=e(d,v.action),v=v.next;while(v!==c);Sn(d,n.memoizedState)||(Yt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,i]}function zm(e,n,a){var i=Ue,c=Ht(),d=Fe;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=n();var v=!Sn((dt||c).memoizedState,a);if(v&&(c.memoizedState=a,Yt=!0),c=c.queue,Gu(Dm.bind(null,i,c,e),[e]),c.getSnapshot!==n||v||Vt!==null&&Vt.memoizedState.tag&1){if(i.flags|=2048,Bi(9,{destroy:void 0},jm.bind(null,i,c,a,n),null),yt===null)throw Error(o(349));d||(ja&127)!==0||Om(i,n,a)}return a}function Om(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Ue.updateQueue,n===null?(n=hs(),Ue.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function jm(e,n,a,i){n.value=a,n.getSnapshot=i,km(n)&&Hm(e)}function Dm(e,n,a){return a(function(){km(n)&&Hm(e)})}function km(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Sn(e,a)}catch{return!0}}function Hm(e){var n=Kl(e,2);n!==null&&bn(n,e,2)}function qu(e){var n=mn();if(typeof e=="function"){var a=e;if(e=a(),ai){jn(!0);try{a()}finally{jn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:e},n}function Lm(e,n,a,i){return e.baseState=a,Vu(e,dt,typeof i=="function"?i:Da)}function w1(e,n,a,i,c){if(xs(e))throw Error(o(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};T.T!==null?a(!0):d.isTransition=!1,i(d),a=n.pending,a===null?(d.next=n.pending=d,Bm(n,d)):(d.next=a.next,n.pending=a.next=d)}}function Bm(e,n){var a=n.action,i=n.payload,c=e.state;if(n.isTransition){var d=T.T,v={};T.T=v;try{var _=a(c,i),V=T.S;V!==null&&V(v,_),Um(e,n,_)}catch(F){$u(e,n,F)}finally{d!==null&&v.types!==null&&(d.types=v.types),T.T=d}}else try{d=a(c,i),Um(e,n,d)}catch(F){$u(e,n,F)}}function Um(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Vm(e,n,i)},function(i){return $u(e,n,i)}):Vm(e,n,a)}function Vm(e,n,a){n.status="fulfilled",n.value=a,Ym(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,Bm(e,a)))}function $u(e,n,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do n.status="rejected",n.reason=a,Ym(n),n=n.next;while(n!==i)}e.action=null}function Ym(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function qm(e,n){return n}function $m(e,n){if(Fe){var a=yt.formState;if(a!==null){e:{var i=Ue;if(Fe){if(wt){t:{for(var c=wt,d=Vn;c.nodeType!==8;){if(!d){c=null;break t}if(c=qn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){wt=qn(c.nextSibling),i=c.data==="F!";break e}}dl(i)}i=!1}i&&(n=a[0])}}return a=mn(),a.memoizedState=a.baseState=n,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qm,lastRenderedState:n},a.queue=i,a=s0.bind(null,Ue,i),i.dispatch=a,i=qu(!1),d=Iu.bind(null,Ue,!1,i.queue),i=mn(),c={state:n,dispatch:null,action:e,pending:null},i.queue=c,a=w1.bind(null,Ue,c,d,a),c.dispatch=a,i.memoizedState=e,[n,a,!1]}function Gm(e){var n=Ht();return Xm(n,dt,e)}function Xm(e,n,a){if(n=Vu(e,n,qm)[0],e=gs(Da)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var i=Br(n)}catch(v){throw v===ji?is:v}else i=n;n=Ht();var c=n.queue,d=c.dispatch;return a!==n.memoizedState&&(Ue.flags|=2048,Bi(9,{destroy:void 0},S1.bind(null,c,a),null)),[i,d,e]}function S1(e,n){e.action=n}function Zm(e){var n=Ht(),a=dt;if(a!==null)return Xm(n,a,e);Ht(),n=n.memoizedState,a=Ht();var i=a.queue.dispatch;return a.memoizedState=e,[n,i,!1]}function Bi(e,n,a,i){return e={tag:e,create:a,deps:i,inst:n,next:null},n=Ue.updateQueue,n===null&&(n=hs(),Ue.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,n.lastEffect=e),e}function Qm(){return Ht().memoizedState}function ps(e,n,a,i){var c=mn();Ue.flags|=e,c.memoizedState=Bi(1|n,{destroy:void 0},a,i===void 0?null:i)}function ys(e,n,a,i){var c=Ht();i=i===void 0?null:i;var d=c.memoizedState.inst;dt!==null&&i!==null&&Du(i,dt.memoizedState.deps)?c.memoizedState=Bi(n,d,a,i):(Ue.flags|=e,c.memoizedState=Bi(1|n,d,a,i))}function Km(e,n){ps(8390656,8,e,n)}function Gu(e,n){ys(2048,8,e,n)}function E1(e){Ue.flags|=4;var n=Ue.updateQueue;if(n===null)n=hs(),Ue.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Im(e){var n=Ht().memoizedState;return E1({ref:n,nextImpl:e}),function(){if((it&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}function Jm(e,n){return ys(4,2,e,n)}function Fm(e,n){return ys(4,4,e,n)}function Wm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Pm(e,n,a){a=a!=null?a.concat([e]):null,ys(4,4,Wm.bind(null,n,e),a)}function Xu(){}function e0(e,n){var a=Ht();n=n===void 0?null:n;var i=a.memoizedState;return n!==null&&Du(n,i[1])?i[0]:(a.memoizedState=[e,n],e)}function t0(e,n){var a=Ht();n=n===void 0?null:n;var i=a.memoizedState;if(n!==null&&Du(n,i[1]))return i[0];if(i=e(),ai){jn(!0);try{e()}finally{jn(!1)}}return a.memoizedState=[i,n],i}function Zu(e,n,a){return a===void 0||(ja&1073741824)!==0&&(Ke&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=ng(),Ue.lanes|=e,wl|=e,a)}function n0(e,n,a,i){return Sn(a,n)?a:ki.current!==null?(e=Zu(e,a,i),Sn(e,n)||(Yt=!0),e):(ja&42)===0||(ja&1073741824)!==0&&(Ke&261930)===0?(Yt=!0,e.memoizedState=a):(e=ng(),Ue.lanes|=e,wl|=e,n)}function a0(e,n,a,i,c){var d=k.p;k.p=d!==0&&8>d?d:8;var v=T.T,_={};T.T=_,Iu(e,!1,n,a);try{var V=c(),F=T.S;if(F!==null&&F(_,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var le=x1(V,i);Ur(e,n,le,An(e))}else Ur(e,n,i,An(e))}catch(ce){Ur(e,n,{then:function(){},status:"rejected",reason:ce},An())}finally{k.p=d,v!==null&&_.types!==null&&(v.types=_.types),T.T=v}}function _1(){}function Qu(e,n,a,i){if(e.tag!==5)throw Error(o(476));var c=l0(e).queue;a0(e,c,n,D,a===null?_1:function(){return i0(e),a(i)})}function l0(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:D,baseState:D,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:D},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function i0(e){var n=l0(e);n.next===null&&(n=e.alternate.memoizedState),Ur(e,n.next.queue,{},An())}function Ku(){return tn(no)}function r0(){return Ht().memoizedState}function o0(){return Ht().memoizedState}function N1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=An();e=gl(a);var i=pl(n,e,a);i!==null&&(bn(i,n,a),Dr(i,n,a)),n={cache:Eu()},e.payload=n;return}n=n.return}}function C1(e,n,a){var i=An();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},xs(e)?c0(n,a):(a=du(e,n,a,i),a!==null&&(bn(a,e,i),u0(a,n,i)))}function s0(e,n,a){var i=An();Ur(e,n,a,i)}function Ur(e,n,a,i){var c={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(xs(e))c0(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var v=n.lastRenderedState,_=d(v,a);if(c.hasEagerState=!0,c.eagerState=_,Sn(_,v))return Wo(e,n,c,0),yt===null&&Fo(),!1}catch{}if(a=du(e,n,c,i),a!==null)return bn(a,e,i),u0(a,n,i),!0}return!1}function Iu(e,n,a,i){if(i={lane:2,revertLane:Af(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},xs(e)){if(n)throw Error(o(479))}else n=du(e,a,i,2),n!==null&&bn(n,e,2)}function xs(e){var n=e.alternate;return e===Ue||n!==null&&n===Ue}function c0(e,n){Hi=fs=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function u0(e,n,a){if((a&4194048)!==0){var i=n.lanes;i&=e.pendingLanes,a|=i,n.lanes=a,ze(e,a)}}var Vr={readContext:tn,use:ms,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};Vr.useEffectEvent=jt;var f0={readContext:tn,use:ms,useCallback:function(e,n){return mn().memoizedState=[e,n===void 0?null:n],e},useContext:tn,useEffect:Km,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ps(4194308,4,Wm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ps(4194308,4,e,n)},useInsertionEffect:function(e,n){ps(4,2,e,n)},useMemo:function(e,n){var a=mn();n=n===void 0?null:n;var i=e();if(ai){jn(!0);try{e()}finally{jn(!1)}}return a.memoizedState=[i,n],i},useReducer:function(e,n,a){var i=mn();if(a!==void 0){var c=a(n);if(ai){jn(!0);try{a(n)}finally{jn(!1)}}}else c=n;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=C1.bind(null,Ue,e),[i.memoizedState,e]},useRef:function(e){var n=mn();return e={current:e},n.memoizedState=e},useState:function(e){e=qu(e);var n=e.queue,a=s0.bind(null,Ue,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Xu,useDeferredValue:function(e,n){var a=mn();return Zu(a,e,n)},useTransition:function(){var e=qu(!1);return e=a0.bind(null,Ue,e.queue,!0,!1),mn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var i=Ue,c=mn();if(Fe){if(a===void 0)throw Error(o(407));a=a()}else{if(a=n(),yt===null)throw Error(o(349));(Ke&127)!==0||Om(i,n,a)}c.memoizedState=a;var d={value:a,getSnapshot:n};return c.queue=d,Km(Dm.bind(null,i,d,e),[e]),i.flags|=2048,Bi(9,{destroy:void 0},jm.bind(null,i,d,a,n),null),a},useId:function(){var e=mn(),n=yt.identifierPrefix;if(Fe){var a=sa,i=oa;a=(i&~(1<<32-Wt(i)-1)).toString(32)+a,n="_"+n+"R_"+a,a=ds++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=v1++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Ku,useFormState:$m,useActionState:$m,useOptimistic:function(e){var n=mn();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Iu.bind(null,Ue,!0,a),a.dispatch=n,[e,n]},useMemoCache:Uu,useCacheRefresh:function(){return mn().memoizedState=N1.bind(null,Ue)},useEffectEvent:function(e){var n=mn(),a={impl:e};return n.memoizedState=a,function(){if((it&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Ju={readContext:tn,use:ms,useCallback:e0,useContext:tn,useEffect:Gu,useImperativeHandle:Pm,useInsertionEffect:Jm,useLayoutEffect:Fm,useMemo:t0,useReducer:gs,useRef:Qm,useState:function(){return gs(Da)},useDebugValue:Xu,useDeferredValue:function(e,n){var a=Ht();return n0(a,dt.memoizedState,e,n)},useTransition:function(){var e=gs(Da)[0],n=Ht().memoizedState;return[typeof e=="boolean"?e:Br(e),n]},useSyncExternalStore:zm,useId:r0,useHostTransitionStatus:Ku,useFormState:Gm,useActionState:Gm,useOptimistic:function(e,n){var a=Ht();return Lm(a,dt,e,n)},useMemoCache:Uu,useCacheRefresh:o0};Ju.useEffectEvent=Im;var d0={readContext:tn,use:ms,useCallback:e0,useContext:tn,useEffect:Gu,useImperativeHandle:Pm,useInsertionEffect:Jm,useLayoutEffect:Fm,useMemo:t0,useReducer:Yu,useRef:Qm,useState:function(){return Yu(Da)},useDebugValue:Xu,useDeferredValue:function(e,n){var a=Ht();return dt===null?Zu(a,e,n):n0(a,dt.memoizedState,e,n)},useTransition:function(){var e=Yu(Da)[0],n=Ht().memoizedState;return[typeof e=="boolean"?e:Br(e),n]},useSyncExternalStore:zm,useId:r0,useHostTransitionStatus:Ku,useFormState:Zm,useActionState:Zm,useOptimistic:function(e,n){var a=Ht();return dt!==null?Lm(a,dt,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Uu,useCacheRefresh:o0};d0.useEffectEvent=Im;function Fu(e,n,a,i){n=e.memoizedState,a=a(i,n),a=a==null?n:p({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Wu={enqueueSetState:function(e,n,a){e=e._reactInternals;var i=An(),c=gl(i);c.payload=n,a!=null&&(c.callback=a),n=pl(e,c,i),n!==null&&(bn(n,e,i),Dr(n,e,i))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var i=An(),c=gl(i);c.tag=1,c.payload=n,a!=null&&(c.callback=a),n=pl(e,c,i),n!==null&&(bn(n,e,i),Dr(n,e,i))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=An(),i=gl(a);i.tag=2,n!=null&&(i.callback=n),n=pl(e,i,a),n!==null&&(bn(n,e,a),Dr(n,e,a))}};function h0(e,n,a,i,c,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,v):n.prototype&&n.prototype.isPureReactComponent?!Cr(a,i)||!Cr(c,d):!0}function m0(e,n,a,i){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,i),n.state!==e&&Wu.enqueueReplaceState(n,n.state,null)}function li(e,n){var a=n;if("ref"in n){a={};for(var i in n)i!=="ref"&&(a[i]=n[i])}if(e=e.defaultProps){a===n&&(a=p({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function g0(e){Jo(e)}function p0(e){console.error(e)}function y0(e){Jo(e)}function vs(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(i){setTimeout(function(){throw i})}}function x0(e,n,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Pu(e,n,a){return a=gl(a),a.tag=3,a.payload={element:null},a.callback=function(){vs(e,n)},a}function v0(e){return e=gl(e),e.tag=3,e}function b0(e,n,a,i){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=i.value;e.payload=function(){return c(d)},e.callback=function(){x0(n,a,i)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){x0(n,a,i),typeof c!="function"&&(Sl===null?Sl=new Set([this]):Sl.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})})}function M1(e,n,a,i,c){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(n=a.alternate,n!==null&&Ri(n,a,c,!0),a=_n.current,a!==null){switch(a.tag){case 31:case 13:return Yn===null?zs():a.alternate===null&&Dt===0&&(Dt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,i===rs?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([i]):n.add(i),Nf(e,i,c)),!1;case 22:return a.flags|=65536,i===rs?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([i]):a.add(i)),Nf(e,i,c)),!1}throw Error(o(435,a.tag))}return Nf(e,i,c),zs(),!1}if(Fe)return n=_n.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,i!==xu&&(e=Error(o(422),{cause:i}),Tr(Ln(e,a)))):(i!==xu&&(n=Error(o(423),{cause:i}),Tr(Ln(n,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=Ln(i,a),c=Pu(e.stateNode,i,c),Tu(e,c),Dt!==4&&(Dt=2)),!1;var d=Error(o(520),{cause:i});if(d=Ln(d,a),Kr===null?Kr=[d]:Kr.push(d),Dt!==4&&(Dt=2),n===null)return!0;i=Ln(i,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Pu(a.stateNode,i,e),Tu(a,e),!1;case 1:if(n=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Sl===null||!Sl.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=v0(c),b0(c,e,a,i),Tu(a,c),!1}a=a.return}while(a!==null);return!1}var ef=Error(o(461)),Yt=!1;function nn(e,n,a,i){n.child=e===null?_m(n,null,a,i):ni(n,e.child,a,i)}function w0(e,n,a,i,c){a=a.render;var d=n.ref;if("ref"in i){var v={};for(var _ in i)_!=="ref"&&(v[_]=i[_])}else v=i;return Wl(n),i=ku(e,n,a,v,d,c),_=Hu(),e!==null&&!Yt?(Lu(e,n,c),ka(e,n,c)):(Fe&&_&&pu(n),n.flags|=1,nn(e,n,i,c),n.child)}function S0(e,n,a,i,c){if(e===null){var d=a.type;return typeof d=="function"&&!hu(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,E0(e,n,d,i,c)):(e=es(a.type,null,i,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!cf(e,c)){var v=d.memoizedProps;if(a=a.compare,a=a!==null?a:Cr,a(v,i)&&e.ref===n.ref)return ka(e,n,c)}return n.flags|=1,e=Ta(d,i),e.ref=n.ref,e.return=n,n.child=e}function E0(e,n,a,i,c){if(e!==null){var d=e.memoizedProps;if(Cr(d,i)&&e.ref===n.ref)if(Yt=!1,n.pendingProps=i=d,cf(e,c))(e.flags&131072)!==0&&(Yt=!0);else return n.lanes=e.lanes,ka(e,n,c)}return tf(e,n,a,i,c)}function _0(e,n,a,i){var c=i.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(i=n.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;i=c&~d}else i=0,n.child=null;return N0(e,n,d,a,i)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&ls(n,d!==null?d.cachePool:null),d!==null?Mm(n,d):zu(),Am(n);else return i=n.lanes=536870912,N0(e,n,d!==null?d.baseLanes|a:a,a,i)}else d!==null?(ls(n,d.cachePool),Mm(n,d),xl(),n.memoizedState=null):(e!==null&&ls(n,null),zu(),xl());return nn(e,n,c,a),n.child}function Yr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function N0(e,n,a,i,c){var d=Nu();return d=d===null?null:{parent:Ut._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},e!==null&&ls(n,null),zu(),Am(n),e!==null&&Ri(e,n,i,!0),n.childLanes=c,null}function bs(e,n){return n=Ss({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function C0(e,n,a){return ni(n,e.child,null,a),e=bs(n,n.pendingProps),e.flags|=2,Nn(n),n.memoizedState=null,e}function A1(e,n,a){var i=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Fe){if(i.mode==="hidden")return e=bs(n,i),n.lanes=536870912,Yr(null,e);if(ju(n),(e=wt)?(e=Bg(e,Vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ul!==null?{id:oa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},a=cm(e),a.return=n,n.child=a,en=n,wt=null)):e=null,e===null)throw dl(n);return n.lanes=536870912,null}return bs(n,i)}var d=e.memoizedState;if(d!==null){var v=d.dehydrated;if(ju(n),c)if(n.flags&256)n.flags&=-257,n=C0(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(o(558));else if(Yt||Ri(e,n,a,!1),c=(a&e.childLanes)!==0,Yt||c){if(i=yt,i!==null&&(v=Mt(i,a),v!==0&&v!==d.retryLane))throw d.retryLane=v,Kl(e,v),bn(i,e,v),ef;zs(),n=C0(e,n,a)}else e=d.treeContext,wt=qn(v.nextSibling),en=n,Fe=!0,fl=null,Vn=!1,e!==null&&dm(n,e),n=bs(n,i),n.flags|=4096;return n}return e=Ta(e.child,{mode:i.mode,children:i.children}),e.ref=n.ref,n.child=e,e.return=n,e}function ws(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function tf(e,n,a,i,c){return Wl(n),a=ku(e,n,a,i,void 0,c),i=Hu(),e!==null&&!Yt?(Lu(e,n,c),ka(e,n,c)):(Fe&&i&&pu(n),n.flags|=1,nn(e,n,a,c),n.child)}function M0(e,n,a,i,c,d){return Wl(n),n.updateQueue=null,a=Rm(n,i,a,c),Tm(e),i=Hu(),e!==null&&!Yt?(Lu(e,n,d),ka(e,n,d)):(Fe&&i&&pu(n),n.flags|=1,nn(e,n,a,d),n.child)}function A0(e,n,a,i,c){if(Wl(n),n.stateNode===null){var d=Ci,v=a.contextType;typeof v=="object"&&v!==null&&(d=tn(v)),d=new a(i,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Wu,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=i,d.state=n.memoizedState,d.refs={},Mu(n),v=a.contextType,d.context=typeof v=="object"&&v!==null?tn(v):Ci,d.state=n.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Fu(n,a,v,i),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Wu.enqueueReplaceState(d,d.state,null),Hr(n,i,d,c),kr(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),i=!0}else if(e===null){d=n.stateNode;var _=n.memoizedProps,V=li(a,_);d.props=V;var F=d.context,le=a.contextType;v=Ci,typeof le=="object"&&le!==null&&(v=tn(le));var ce=a.getDerivedStateFromProps;le=typeof ce=="function"||typeof d.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,le||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(_||F!==v)&&m0(n,d,i,v),ml=!1;var ee=n.memoizedState;d.state=ee,Hr(n,i,d,c),kr(),F=n.memoizedState,_||ee!==F||ml?(typeof ce=="function"&&(Fu(n,a,ce,i),F=n.memoizedState),(V=ml||h0(n,a,V,i,ee,F,v))?(le||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=i,n.memoizedState=F),d.props=i,d.state=F,d.context=v,i=V):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{d=n.stateNode,Au(e,n),v=n.memoizedProps,le=li(a,v),d.props=le,ce=n.pendingProps,ee=d.context,F=a.contextType,V=Ci,typeof F=="object"&&F!==null&&(V=tn(F)),_=a.getDerivedStateFromProps,(F=typeof _=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==ce||ee!==V)&&m0(n,d,i,V),ml=!1,ee=n.memoizedState,d.state=ee,Hr(n,i,d,c),kr();var ne=n.memoizedState;v!==ce||ee!==ne||ml||e!==null&&e.dependencies!==null&&ns(e.dependencies)?(typeof _=="function"&&(Fu(n,a,_,i),ne=n.memoizedState),(le=ml||h0(n,a,le,i,ee,ne,V)||e!==null&&e.dependencies!==null&&ns(e.dependencies))?(F||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(i,ne,V),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(i,ne,V)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&ee===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&ee===e.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=ne),d.props=i,d.state=ne,d.context=V,i=le):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&ee===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&ee===e.memoizedState||(n.flags|=1024),i=!1)}return d=i,ws(e,n),i=(n.flags&128)!==0,d||i?(d=n.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&i?(n.child=ni(n,e.child,null,c),n.child=ni(n,null,a,c)):nn(e,n,a,c),n.memoizedState=d.state,e=n.child):e=ka(e,n,c),e}function T0(e,n,a,i){return Jl(),n.flags|=256,nn(e,n,a,i),n.child}var nf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function af(e){return{baseLanes:e,cachePool:xm()}}function lf(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=Mn),e}function R0(e,n,a){var i=n.pendingProps,c=!1,d=(n.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(kt.current&2)!==0),v&&(c=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(Fe){if(c?yl(n):xl(),(e=wt)?(e=Bg(e,Vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ul!==null?{id:oa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},a=cm(e),a.return=n,n.child=a,en=n,wt=null)):e=null,e===null)throw dl(n);return Yf(e)?n.lanes=32:n.lanes=536870912,null}var _=i.children;return i=i.fallback,c?(xl(),c=n.mode,_=Ss({mode:"hidden",children:_},c),i=Il(i,c,a,null),_.return=n,i.return=n,_.sibling=i,n.child=_,i=n.child,i.memoizedState=af(a),i.childLanes=lf(e,v,a),n.memoizedState=nf,Yr(null,i)):(yl(n),rf(n,_))}var V=e.memoizedState;if(V!==null&&(_=V.dehydrated,_!==null)){if(d)n.flags&256?(yl(n),n.flags&=-257,n=of(e,n,a)):n.memoizedState!==null?(xl(),n.child=e.child,n.flags|=128,n=null):(xl(),_=i.fallback,c=n.mode,i=Ss({mode:"visible",children:i.children},c),_=Il(_,c,a,null),_.flags|=2,i.return=n,_.return=n,i.sibling=_,n.child=i,ni(n,e.child,null,a),i=n.child,i.memoizedState=af(a),i.childLanes=lf(e,v,a),n.memoizedState=nf,n=Yr(null,i));else if(yl(n),Yf(_)){if(v=_.nextSibling&&_.nextSibling.dataset,v)var F=v.dgst;v=F,i=Error(o(419)),i.stack="",i.digest=v,Tr({value:i,source:null,stack:null}),n=of(e,n,a)}else if(Yt||Ri(e,n,a,!1),v=(a&e.childLanes)!==0,Yt||v){if(v=yt,v!==null&&(i=Mt(v,a),i!==0&&i!==V.retryLane))throw V.retryLane=i,Kl(e,i),bn(v,e,i),ef;Vf(_)||zs(),n=of(e,n,a)}else Vf(_)?(n.flags|=192,n.child=e.child,n=null):(e=V.treeContext,wt=qn(_.nextSibling),en=n,Fe=!0,fl=null,Vn=!1,e!==null&&dm(n,e),n=rf(n,i.children),n.flags|=4096);return n}return c?(xl(),_=i.fallback,c=n.mode,V=e.child,F=V.sibling,i=Ta(V,{mode:"hidden",children:i.children}),i.subtreeFlags=V.subtreeFlags&65011712,F!==null?_=Ta(F,_):(_=Il(_,c,a,null),_.flags|=2),_.return=n,i.return=n,i.sibling=_,n.child=i,Yr(null,i),i=n.child,_=e.child.memoizedState,_===null?_=af(a):(c=_.cachePool,c!==null?(V=Ut._currentValue,c=c.parent!==V?{parent:V,pool:V}:c):c=xm(),_={baseLanes:_.baseLanes|a,cachePool:c}),i.memoizedState=_,i.childLanes=lf(e,v,a),n.memoizedState=nf,Yr(e.child,i)):(yl(n),a=e.child,e=a.sibling,a=Ta(a,{mode:"visible",children:i.children}),a.return=n,a.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=a,n.memoizedState=null,a)}function rf(e,n){return n=Ss({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Ss(e,n){return e=En(22,e,null,n),e.lanes=0,e}function of(e,n,a){return ni(n,e.child,null,a),e=rf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function z0(e,n,a){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n),wu(e.return,n,a)}function sf(e,n,a,i,c,d){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:c,treeForkCount:d}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=i,v.tail=a,v.tailMode=c,v.treeForkCount=d)}function O0(e,n,a){var i=n.pendingProps,c=i.revealOrder,d=i.tail;i=i.children;var v=kt.current,_=(v&2)!==0;if(_?(v=v&1|2,n.flags|=128):v&=1,I(kt,v),nn(e,n,i,a),i=Fe?Ar:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&z0(e,a,n);else if(e.tag===19)z0(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=n.child,c=null;a!==null;)e=a.alternate,e!==null&&us(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=n.child,n.child=null):(c=a.sibling,a.sibling=null),sf(n,!1,c,a,d,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&us(e)===null){n.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}sf(n,!0,a,null,d,i);break;case"together":sf(n,!1,null,null,void 0,i);break;default:n.memoizedState=null}return n.child}function ka(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),wl|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ri(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,a=Ta(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Ta(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function cf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ns(e)))}function T1(e,n,a){switch(n.tag){case 3:fe(n,n.stateNode.containerInfo),hl(n,Ut,e.memoizedState.cache),Jl();break;case 27:case 5:Te(n);break;case 4:fe(n,n.stateNode.containerInfo);break;case 10:hl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,ju(n),null;break;case 13:var i=n.memoizedState;if(i!==null)return i.dehydrated!==null?(yl(n),n.flags|=128,null):(a&n.child.childLanes)!==0?R0(e,n,a):(yl(n),e=ka(e,n,a),e!==null?e.sibling:null);yl(n);break;case 19:var c=(e.flags&128)!==0;if(i=(a&n.childLanes)!==0,i||(Ri(e,n,a,!1),i=(a&n.childLanes)!==0),c){if(i)return O0(e,n,a);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),I(kt,kt.current),i)break;return null;case 22:return n.lanes=0,_0(e,n,a,n.pendingProps);case 24:hl(n,Ut,e.memoizedState.cache)}return ka(e,n,a)}function j0(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)Yt=!0;else{if(!cf(e,a)&&(n.flags&128)===0)return Yt=!1,T1(e,n,a);Yt=(e.flags&131072)!==0}else Yt=!1,Fe&&(n.flags&1048576)!==0&&fm(n,Ar,n.index);switch(n.lanes=0,n.tag){case 16:e:{var i=n.pendingProps;if(e=ei(n.elementType),n.type=e,typeof e=="function")hu(e)?(i=li(e,i),n.tag=1,n=A0(null,n,e,i,a)):(n.tag=0,n=tf(null,n,e,i,a));else{if(e!=null){var c=e.$$typeof;if(c===z){n.tag=11,n=w0(null,n,e,i,a);break e}else if(c===L){n.tag=14,n=S0(null,n,e,i,a);break e}}throw n=j(e)||e,Error(o(306,n,""))}}return n;case 0:return tf(e,n,n.type,n.pendingProps,a);case 1:return i=n.type,c=li(i,n.pendingProps),A0(e,n,i,c,a);case 3:e:{if(fe(n,n.stateNode.containerInfo),e===null)throw Error(o(387));i=n.pendingProps;var d=n.memoizedState;c=d.element,Au(e,n),Hr(n,i,null,a);var v=n.memoizedState;if(i=v.cache,hl(n,Ut,i),i!==d.cache&&Su(n,[Ut],a,!0),kr(),i=v.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=T0(e,n,i,a);break e}else if(i!==c){c=Ln(Error(o(424)),n),Tr(c),n=T0(e,n,i,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(wt=qn(e.firstChild),en=n,Fe=!0,fl=null,Vn=!0,a=_m(n,null,i,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Jl(),i===c){n=ka(e,n,a);break e}nn(e,n,i,a)}n=n.child}return n;case 26:return ws(e,n),e===null?(a=Gg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Fe||(a=n.type,e=n.pendingProps,i=Bs(de.current).createElement(a),i[At]=n,i[It]=e,an(i,a,e),Ot(i),n.stateNode=i):n.memoizedState=Gg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Te(n),e===null&&Fe&&(i=n.stateNode=Yg(n.type,n.pendingProps,de.current),en=n,Vn=!0,c=wt,Cl(n.type)?(qf=c,wt=qn(i.firstChild)):wt=c),nn(e,n,n.pendingProps.children,a),ws(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Fe&&((c=i=wt)&&(i=iw(i,n.type,n.pendingProps,Vn),i!==null?(n.stateNode=i,en=n,wt=qn(i.firstChild),Vn=!1,c=!0):c=!1),c||dl(n)),Te(n),c=n.type,d=n.pendingProps,v=e!==null?e.memoizedProps:null,i=d.children,Lf(c,d)?i=null:v!==null&&Lf(c,v)&&(n.flags|=32),n.memoizedState!==null&&(c=ku(e,n,b1,null,null,a),no._currentValue=c),ws(e,n),nn(e,n,i,a),n.child;case 6:return e===null&&Fe&&((e=a=wt)&&(a=rw(a,n.pendingProps,Vn),a!==null?(n.stateNode=a,en=n,wt=null,e=!0):e=!1),e||dl(n)),null;case 13:return R0(e,n,a);case 4:return fe(n,n.stateNode.containerInfo),i=n.pendingProps,e===null?n.child=ni(n,null,i,a):nn(e,n,i,a),n.child;case 11:return w0(e,n,n.type,n.pendingProps,a);case 7:return nn(e,n,n.pendingProps,a),n.child;case 8:return nn(e,n,n.pendingProps.children,a),n.child;case 12:return nn(e,n,n.pendingProps.children,a),n.child;case 10:return i=n.pendingProps,hl(n,n.type,i.value),nn(e,n,i.children,a),n.child;case 9:return c=n.type._context,i=n.pendingProps.children,Wl(n),c=tn(c),i=i(c),n.flags|=1,nn(e,n,i,a),n.child;case 14:return S0(e,n,n.type,n.pendingProps,a);case 15:return E0(e,n,n.type,n.pendingProps,a);case 19:return O0(e,n,a);case 31:return A1(e,n,a);case 22:return _0(e,n,a,n.pendingProps);case 24:return Wl(n),i=tn(Ut),e===null?(c=Nu(),c===null&&(c=yt,d=Eu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),n.memoizedState={parent:i,cache:c},Mu(n),hl(n,Ut,c)):((e.lanes&a)!==0&&(Au(e,n),Hr(n,null,null,a),kr()),c=e.memoizedState,d=n.memoizedState,c.parent!==i?(c={parent:i,cache:i},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),hl(n,Ut,i)):(i=d.cache,hl(n,Ut,i),i!==c.cache&&Su(n,[Ut],a,!0))),nn(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(o(156,n.tag))}function Ha(e){e.flags|=4}function uf(e,n,a,i,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(rg())e.flags|=8192;else throw ti=rs,Cu}else e.flags&=-16777217}function D0(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ig(n))if(rg())e.flags|=8192;else throw ti=rs,Cu}function Es(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?ke():536870912,e.lanes|=n,qi|=n)}function qr(e,n){if(!Fe)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function St(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(n)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=a,n}function R1(e,n,a){var i=n.pendingProps;switch(yu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(n),null;case 1:return St(n),null;case 3:return a=n.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),Oa(Ut),me(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ti(n)?Ha(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,vu())),St(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?(Ha(n),d!==null?(St(n),D0(n,d)):(St(n),uf(n,c,null,i,a))):d?d!==e.memoizedState?(Ha(n),St(n),D0(n,d)):(St(n),n.flags&=-16777217):(e=e.memoizedProps,e!==i&&Ha(n),St(n),uf(n,c,e,i,a)),null;case 27:if(je(n),a=de.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==i&&Ha(n);else{if(!i){if(n.stateNode===null)throw Error(o(166));return St(n),null}e=P.current,Ti(n)?hm(n):(e=Yg(c,i,a),n.stateNode=e,Ha(n))}return St(n),null;case 5:if(je(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==i&&Ha(n);else{if(!i){if(n.stateNode===null)throw Error(o(166));return St(n),null}if(d=P.current,Ti(n))hm(n);else{var v=Bs(de.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof i.is=="string"?v.createElement("select",{is:i.is}):v.createElement("select"),i.multiple?d.multiple=!0:i.size&&(d.size=i.size);break;default:d=typeof i.is=="string"?v.createElement(c,{is:i.is}):v.createElement(c)}}d[At]=n,d[It]=i;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=d;e:switch(an(d,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ha(n)}}return St(n),uf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==i&&Ha(n);else{if(typeof i!="string"&&n.stateNode===null)throw Error(o(166));if(e=de.current,Ti(n)){if(e=n.stateNode,a=n.memoizedProps,i=null,c=en,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[At]=n,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||Rg(e.nodeValue,a)),e||dl(n,!0)}else e=Bs(e).createTextNode(i),e[At]=n,n.stateNode=e}return St(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(i=Ti(n),a!==null){if(e===null){if(!i)throw Error(o(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[At]=n}else Jl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;St(n),e=!1}else a=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(Nn(n),n):(Nn(n),null);if((n.flags&128)!==0)throw Error(o(558))}return St(n),null;case 13:if(i=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ti(n),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[At]=n}else Jl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;St(n),c=!1}else c=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(Nn(n),n):(Nn(n),null)}return Nn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=n.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==c&&(i.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),Es(n,n.updateQueue),St(n),null);case 4:return me(),e===null&&Of(n.stateNode.containerInfo),St(n),null;case 10:return Oa(n.type),St(n),null;case 19:if(U(kt),i=n.memoizedState,i===null)return St(n),null;if(c=(n.flags&128)!==0,d=i.rendering,d===null)if(c)qr(i,!1);else{if(Dt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=us(e),d!==null){for(n.flags|=128,qr(i,!1),e=d.updateQueue,n.updateQueue=e,Es(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)sm(a,e),a=a.sibling;return I(kt,kt.current&1|2),Fe&&Ra(n,i.treeForkCount),n.child}e=e.sibling}i.tail!==null&&Je()>As&&(n.flags|=128,c=!0,qr(i,!1),n.lanes=4194304)}else{if(!c)if(e=us(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,Es(n,e),qr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!d.alternate&&!Fe)return St(n),null}else 2*Je()-i.renderingStartTime>As&&a!==536870912&&(n.flags|=128,c=!0,qr(i,!1),n.lanes=4194304);i.isBackwards?(d.sibling=n.child,n.child=d):(e=i.last,e!==null?e.sibling=d:n.child=d,i.last=d)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Je(),e.sibling=null,a=kt.current,I(kt,c?a&1|2:a&1),Fe&&Ra(n,i.treeForkCount),e):(St(n),null);case 22:case 23:return Nn(n),Ou(),i=n.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(n.flags|=8192):i&&(n.flags|=8192),i?(a&536870912)!==0&&(n.flags&128)===0&&(St(n),n.subtreeFlags&6&&(n.flags|=8192)):St(n),a=n.updateQueue,a!==null&&Es(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048),e!==null&&U(Pl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Oa(Ut),St(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function z1(e,n){switch(yu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Oa(Ut),me(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return je(n),null;case 31:if(n.memoizedState!==null){if(Nn(n),n.alternate===null)throw Error(o(340));Jl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Nn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));Jl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return U(kt),null;case 4:return me(),null;case 10:return Oa(n.type),null;case 22:case 23:return Nn(n),Ou(),e!==null&&U(Pl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Oa(Ut),null;case 25:return null;default:return null}}function k0(e,n){switch(yu(n),n.tag){case 3:Oa(Ut),me();break;case 26:case 27:case 5:je(n);break;case 4:me();break;case 31:n.memoizedState!==null&&Nn(n);break;case 13:Nn(n);break;case 19:U(kt);break;case 10:Oa(n.type);break;case 22:case 23:Nn(n),Ou(),e!==null&&U(Pl);break;case 24:Oa(Ut)}}function $r(e,n){try{var a=n.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){i=void 0;var d=a.create,v=a.inst;i=d(),v.destroy=i}a=a.next}while(a!==c)}}catch(_){ct(n,n.return,_)}}function vl(e,n,a){try{var i=n.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var d=c.next;i=d;do{if((i.tag&e)===e){var v=i.inst,_=v.destroy;if(_!==void 0){v.destroy=void 0,c=n;var V=a,F=_;try{F()}catch(le){ct(c,V,le)}}}i=i.next}while(i!==d)}}catch(le){ct(n,n.return,le)}}function H0(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Cm(n,a)}catch(i){ct(e,e.return,i)}}}function L0(e,n,a){a.props=li(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){ct(e,n,i)}}function Gr(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(c){ct(e,n,c)}}function ca(e,n){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(c){ct(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){ct(e,n,c)}else a.current=null}function B0(e){var n=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(c){ct(e,e.return,c)}}function ff(e,n,a){try{var i=e.stateNode;P1(i,e.type,a,n),i[It]=n}catch(c){ct(e,e.return,c)}}function U0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cl(e.type)||e.tag===4}function df(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||U0(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&&Cl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function hf(e,n,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ge));else if(i!==4&&(i===27&&Cl(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(hf(e,n,a),e=e.sibling;e!==null;)hf(e,n,a),e=e.sibling}function _s(e,n,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(i!==4&&(i===27&&Cl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(_s(e,n,a),e=e.sibling;e!==null;)_s(e,n,a),e=e.sibling}function V0(e){var n=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);an(n,i,a),n[At]=e,n[It]=a}catch(d){ct(e,e.return,d)}}var La=!1,qt=!1,mf=!1,Y0=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function O1(e,n){if(e=e.containerInfo,kf=Xs,e=Ph(e),ru(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var c=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var v=0,_=-1,V=-1,F=0,le=0,ce=e,ee=null;t:for(;;){for(var ne;ce!==a||c!==0&&ce.nodeType!==3||(_=v+c),ce!==d||i!==0&&ce.nodeType!==3||(V=v+i),ce.nodeType===3&&(v+=ce.nodeValue.length),(ne=ce.firstChild)!==null;)ee=ce,ce=ne;for(;;){if(ce===e)break t;if(ee===a&&++F===c&&(_=v),ee===d&&++le===i&&(V=v),(ne=ce.nextSibling)!==null)break;ce=ee,ee=ce.parentNode}ce=ne}a=_===-1||V===-1?null:{start:_,end:V}}else a=null}a=a||{start:0,end:0}}else a=null;for(Hf={focusedElem:e,selectionRange:a},Xs=!1,Ft=n;Ft!==null;)if(n=Ft,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ft=e;else for(;Ft!==null;){switch(n=Ft,d=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(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,c=d.memoizedProps,d=d.memoizedState,i=a.stateNode;try{var xe=li(a.type,c);e=i.getSnapshotBeforeUpdate(xe,d),i.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){ct(a,a.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Uf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Uf(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(o(163))}if(e=n.sibling,e!==null){e.return=n.return,Ft=e;break}Ft=n.return}}function q0(e,n,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:Ua(e,a),i&4&&$r(5,a);break;case 1:if(Ua(e,a),i&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(v){ct(a,a.return,v)}else{var c=li(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){ct(a,a.return,v)}}i&64&&H0(a),i&512&&Gr(a,a.return);break;case 3:if(Ua(e,a),i&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Cm(e,n)}catch(v){ct(a,a.return,v)}}break;case 27:n===null&&i&4&&V0(a);case 26:case 5:Ua(e,a),n===null&&i&4&&B0(a),i&512&&Gr(a,a.return);break;case 12:Ua(e,a);break;case 31:Ua(e,a),i&4&&X0(e,a);break;case 13:Ua(e,a),i&4&&Z0(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Y1.bind(null,a),ow(e,a))));break;case 22:if(i=a.memoizedState!==null||La,!i){n=n!==null&&n.memoizedState!==null||qt,c=La;var d=qt;La=i,(qt=n)&&!d?Va(e,a,(a.subtreeFlags&8772)!==0):Ua(e,a),La=c,qt=d}break;case 30:break;default:Ua(e,a)}}function $0(e){var n=e.alternate;n!==null&&(e.alternate=null,$0(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&$l(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 Et=null,pn=!1;function Ba(e,n,a){for(a=a.child;a!==null;)G0(e,n,a),a=a.sibling}function G0(e,n,a){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(xa,a)}catch{}switch(a.tag){case 26:qt||ca(a,n),Ba(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:qt||ca(a,n);var i=Et,c=pn;Cl(a.type)&&(Et=a.stateNode,pn=!1),Ba(e,n,a),Pr(a.stateNode),Et=i,pn=c;break;case 5:qt||ca(a,n);case 6:if(i=Et,c=pn,Et=null,Ba(e,n,a),Et=i,pn=c,Et!==null)if(pn)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(a.stateNode)}catch(d){ct(a,n,d)}else try{Et.removeChild(a.stateNode)}catch(d){ct(a,n,d)}break;case 18:Et!==null&&(pn?(e=Et,Hg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ji(e)):Hg(Et,a.stateNode));break;case 4:i=Et,c=pn,Et=a.stateNode.containerInfo,pn=!0,Ba(e,n,a),Et=i,pn=c;break;case 0:case 11:case 14:case 15:vl(2,a,n),qt||vl(4,a,n),Ba(e,n,a);break;case 1:qt||(ca(a,n),i=a.stateNode,typeof i.componentWillUnmount=="function"&&L0(a,n,i)),Ba(e,n,a);break;case 21:Ba(e,n,a);break;case 22:qt=(i=qt)||a.memoizedState!==null,Ba(e,n,a),qt=i;break;default:Ba(e,n,a)}}function X0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ji(e)}catch(a){ct(n,n.return,a)}}}function Z0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ji(e)}catch(a){ct(n,n.return,a)}}function j1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Y0),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Y0),n;default:throw Error(o(435,e.tag))}}function Ns(e,n){var a=j1(e);n.forEach(function(i){if(!a.has(i)){a.add(i);var c=q1.bind(null,e,i);i.then(c,c)}})}function yn(e,n){var a=n.deletions;if(a!==null)for(var i=0;i<a.length;i++){var c=a[i],d=e,v=n,_=v;e:for(;_!==null;){switch(_.tag){case 27:if(Cl(_.type)){Et=_.stateNode,pn=!1;break e}break;case 5:Et=_.stateNode,pn=!1;break e;case 3:case 4:Et=_.stateNode.containerInfo,pn=!0;break e}_=_.return}if(Et===null)throw Error(o(160));G0(d,v,c),Et=null,pn=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Q0(n,e),n=n.sibling}var Fn=null;function Q0(e,n){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yn(n,e),xn(e),i&4&&(vl(3,e,e.return),$r(3,e),vl(5,e,e.return));break;case 1:yn(n,e),xn(e),i&512&&(qt||a===null||ca(a,a.return)),i&64&&La&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var c=Fn;if(yn(n,e),xn(e),i&512&&(qt||a===null||ca(a,a.return)),i&4){var d=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":d=c.getElementsByTagName("title")[0],(!d||d[wa]||d[At]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(i),c.head.insertBefore(d,c.querySelector("head > title"))),an(d,i,a),d[At]=e,Ot(d),i=d;break e;case"link":var v=Qg("link","href",c).get(i+(a.href||""));if(v){for(var _=0;_<v.length;_++)if(d=v[_],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(_,1);break t}}d=c.createElement(i),an(d,i,a),c.head.appendChild(d);break;case"meta":if(v=Qg("meta","content",c).get(i+(a.content||""))){for(_=0;_<v.length;_++)if(d=v[_],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(_,1);break t}}d=c.createElement(i),an(d,i,a),c.head.appendChild(d);break;default:throw Error(o(468,i))}d[At]=e,Ot(d),i=d}e.stateNode=i}else Kg(c,e.type,e.stateNode);else e.stateNode=Zg(c,i,e.memoizedProps);else d!==i?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,i===null?Kg(c,e.type,e.stateNode):Zg(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&ff(e,e.memoizedProps,a.memoizedProps)}break;case 27:yn(n,e),xn(e),i&512&&(qt||a===null||ca(a,a.return)),a!==null&&i&4&&ff(e,e.memoizedProps,a.memoizedProps);break;case 5:if(yn(n,e),xn(e),i&512&&(qt||a===null||ca(a,a.return)),e.flags&32){c=e.stateNode;try{De(c,"")}catch(xe){ct(e,e.return,xe)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,ff(e,c,a!==null?a.memoizedProps:c)),i&1024&&(mf=!0);break;case 6:if(yn(n,e),xn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(xe){ct(e,e.return,xe)}}break;case 3:if(Ys=null,c=Fn,Fn=Us(n.containerInfo),yn(n,e),Fn=c,xn(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Ji(n.containerInfo)}catch(xe){ct(e,e.return,xe)}mf&&(mf=!1,K0(e));break;case 4:i=Fn,Fn=Us(e.stateNode.containerInfo),yn(n,e),xn(e),Fn=i;break;case 12:yn(n,e),xn(e);break;case 31:yn(n,e),xn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Ns(e,i)));break;case 13:yn(n,e),xn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ms=Je()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Ns(e,i)));break;case 22:c=e.memoizedState!==null;var V=a!==null&&a.memoizedState!==null,F=La,le=qt;if(La=F||c,qt=le||V,yn(n,e),qt=le,La=F,xn(e),i&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(a===null||V||La||qt||ii(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){V=a=n;try{if(d=V.stateNode,c)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{_=V.stateNode;var ce=V.memoizedProps.style,ee=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;_.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(xe){ct(V,V.return,xe)}}}else if(n.tag===6){if(a===null){V=n;try{V.stateNode.nodeValue=c?"":V.memoizedProps}catch(xe){ct(V,V.return,xe)}}}else if(n.tag===18){if(a===null){V=n;try{var ne=V.stateNode;c?Lg(ne,!0):Lg(V.stateNode,!1)}catch(xe){ct(V,V.return,xe)}}}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 e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,Ns(e,a))));break;case 19:yn(n,e),xn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Ns(e,i)));break;case 30:break;case 21:break;default:yn(n,e),xn(e)}}function xn(e){var n=e.flags;if(n&2){try{for(var a,i=e.return;i!==null;){if(U0(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var c=a.stateNode,d=df(e);_s(e,d,c);break;case 5:var v=a.stateNode;a.flags&32&&(De(v,""),a.flags&=-33);var _=df(e);_s(e,_,v);break;case 3:case 4:var V=a.stateNode.containerInfo,F=df(e);hf(e,F,V);break;default:throw Error(o(161))}}catch(le){ct(e,e.return,le)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function K0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;K0(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Ua(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)q0(e,n.alternate,n),n=n.sibling}function ii(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:vl(4,n,n.return),ii(n);break;case 1:ca(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&L0(n,n.return,a),ii(n);break;case 27:Pr(n.stateNode);case 26:case 5:ca(n,n.return),ii(n);break;case 22:n.memoizedState===null&&ii(n);break;case 30:ii(n);break;default:ii(n)}e=e.sibling}}function Va(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var i=n.alternate,c=e,d=n,v=d.flags;switch(d.tag){case 0:case 11:case 15:Va(c,d,a),$r(4,d);break;case 1:if(Va(c,d,a),i=d,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(F){ct(i,i.return,F)}if(i=d,c=i.updateQueue,c!==null){var _=i.stateNode;try{var V=c.shared.hiddenCallbacks;if(V!==null)for(c.shared.hiddenCallbacks=null,c=0;c<V.length;c++)Nm(V[c],_)}catch(F){ct(i,i.return,F)}}a&&v&64&&H0(d),Gr(d,d.return);break;case 27:V0(d);case 26:case 5:Va(c,d,a),a&&i===null&&v&4&&B0(d),Gr(d,d.return);break;case 12:Va(c,d,a);break;case 31:Va(c,d,a),a&&v&4&&X0(c,d);break;case 13:Va(c,d,a),a&&v&4&&Z0(c,d);break;case 22:d.memoizedState===null&&Va(c,d,a),Gr(d,d.return);break;case 30:break;default:Va(c,d,a)}n=n.sibling}}function gf(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Rr(a))}function pf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Rr(e))}function Wn(e,n,a,i){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)I0(e,n,a,i),n=n.sibling}function I0(e,n,a,i){var c=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(e,n,a,i),c&2048&&$r(9,n);break;case 1:Wn(e,n,a,i);break;case 3:Wn(e,n,a,i),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Rr(e)));break;case 12:if(c&2048){Wn(e,n,a,i),e=n.stateNode;try{var d=n.memoizedProps,v=d.id,_=d.onPostCommit;typeof _=="function"&&_(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(V){ct(n,n.return,V)}}else Wn(e,n,a,i);break;case 31:Wn(e,n,a,i);break;case 13:Wn(e,n,a,i);break;case 23:break;case 22:d=n.stateNode,v=n.alternate,n.memoizedState!==null?d._visibility&2?Wn(e,n,a,i):Xr(e,n):d._visibility&2?Wn(e,n,a,i):(d._visibility|=2,Ui(e,n,a,i,(n.subtreeFlags&10256)!==0||!1)),c&2048&&gf(v,n);break;case 24:Wn(e,n,a,i),c&2048&&pf(n.alternate,n);break;default:Wn(e,n,a,i)}}function Ui(e,n,a,i,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,v=n,_=a,V=i,F=v.flags;switch(v.tag){case 0:case 11:case 15:Ui(d,v,_,V,c),$r(8,v);break;case 23:break;case 22:var le=v.stateNode;v.memoizedState!==null?le._visibility&2?Ui(d,v,_,V,c):Xr(d,v):(le._visibility|=2,Ui(d,v,_,V,c)),c&&F&2048&&gf(v.alternate,v);break;case 24:Ui(d,v,_,V,c),c&&F&2048&&pf(v.alternate,v);break;default:Ui(d,v,_,V,c)}n=n.sibling}}function Xr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,i=n,c=i.flags;switch(i.tag){case 22:Xr(a,i),c&2048&&gf(i.alternate,i);break;case 24:Xr(a,i),c&2048&&pf(i.alternate,i);break;default:Xr(a,i)}n=n.sibling}}var Zr=8192;function Vi(e,n,a){if(e.subtreeFlags&Zr)for(e=e.child;e!==null;)J0(e,n,a),e=e.sibling}function J0(e,n,a){switch(e.tag){case 26:Vi(e,n,a),e.flags&Zr&&e.memoizedState!==null&&vw(a,Fn,e.memoizedState,e.memoizedProps);break;case 5:Vi(e,n,a);break;case 3:case 4:var i=Fn;Fn=Us(e.stateNode.containerInfo),Vi(e,n,a),Fn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Zr,Zr=16777216,Vi(e,n,a),Zr=i):Vi(e,n,a));break;default:Vi(e,n,a)}}function F0(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 Qr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var i=n[a];Ft=i,P0(i,e)}F0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)W0(e),e=e.sibling}function W0(e){switch(e.tag){case 0:case 11:case 15:Qr(e),e.flags&2048&&vl(9,e,e.return);break;case 3:Qr(e);break;case 12:Qr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Cs(e)):Qr(e);break;default:Qr(e)}}function Cs(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var i=n[a];Ft=i,P0(i,e)}F0(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:vl(8,n,n.return),Cs(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Cs(n));break;default:Cs(n)}e=e.sibling}}function P0(e,n){for(;Ft!==null;){var a=Ft;switch(a.tag){case 0:case 11:case 15:vl(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Rr(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,Ft=i;else e:for(a=e;Ft!==null;){i=Ft;var c=i.sibling,d=i.return;if($0(i),i===a){Ft=null;break e}if(c!==null){c.return=d,Ft=c;break e}Ft=d}}}var D1={getCacheForType:function(e){var n=tn(Ut),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return tn(Ut).controller.signal}},k1=typeof WeakMap=="function"?WeakMap:Map,it=0,yt=null,Xe=null,Ke=0,st=0,Cn=null,bl=!1,Yi=!1,yf=!1,Ya=0,Dt=0,wl=0,ri=0,xf=0,Mn=0,qi=0,Kr=null,vn=null,vf=!1,Ms=0,eg=0,As=1/0,Ts=null,Sl=null,Xt=0,El=null,$i=null,qa=0,bf=0,wf=null,tg=null,Ir=0,Sf=null;function An(){return(it&2)!==0&&Ke!==0?Ke&-Ke:T.T!==null?Af():nl()}function ng(){if(Mn===0)if((Ke&536870912)===0||Fe){var e=tl;tl<<=1,(tl&3932160)===0&&(tl=262144),Mn=e}else Mn=536870912;return e=_n.current,e!==null&&(e.flags|=32),Mn}function bn(e,n,a){(e===yt&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(Gi(e,0),_l(e,Ke,Mn,!1)),rt(e,a),((it&2)===0||e!==yt)&&(e===yt&&((it&2)===0&&(ri|=a),Dt===4&&_l(e,Ke,Mn,!1)),ua(e))}function ag(e,n,a){if((it&6)!==0)throw Error(o(327));var i=!a&&(n&127)===0&&(n&e.expiredLanes)===0||re(e,n),c=i?B1(e,n):_f(e,n,!0),d=i;do{if(c===0){Yi&&!i&&_l(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!H1(a)){c=_f(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var _=e;c=Kr;var V=_.current.memoizedState.isDehydrated;if(V&&(Gi(_,v).flags|=256),v=_f(_,v,!1),v!==2){if(yf&&!V){_.errorRecoveryDisabledLanes|=d,ri|=d,c=4;break e}d=vn,vn=c,d!==null&&(vn===null?vn=d:vn.push.apply(vn,d))}c=v}if(d=!1,c!==2)continue}}if(c===1){Gi(e,0),_l(e,n,0,!0);break}e:{switch(i=e,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((n&4194048)!==n)break;case 6:_l(i,n,Mn,!bl);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((n&62914560)===n&&(c=Ms+300-Je(),10<c)){if(_l(i,n,Mn,!bl),Y(i,0,!0)!==0)break e;qa=n,i.timeoutHandle=Dg(lg.bind(null,i,a,vn,Ts,vf,n,Mn,ri,qi,bl,d,"Throttled",-0,0),c);break e}lg(i,a,vn,Ts,vf,n,Mn,ri,qi,bl,d,null,-0,0)}}break}while(!0);ua(e)}function lg(e,n,a,i,c,d,v,_,V,F,le,ce,ee,ne){if(e.timeoutHandle=-1,ce=n.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ge},J0(n,d,ce);var xe=(d&62914560)===d?Ms-Je():(d&4194048)===d?eg-Je():0;if(xe=bw(ce,xe),xe!==null){qa=d,e.cancelPendingCommit=xe(dg.bind(null,e,n,d,a,i,c,v,_,V,le,ce,null,ee,ne)),_l(e,d,v,!F);return}}dg(e,n,d,a,i,c,v,_,V)}function H1(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var c=a[i],d=c.getSnapshot;c=c.value;try{if(!Sn(d(),c))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;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 _l(e,n,a,i){n&=~xf,n&=~ri,e.suspendedLanes|=n,e.pingedLanes&=~n,i&&(e.warmLanes|=n),i=e.expirationTimes;for(var c=n;0<c;){var d=31-Wt(c),v=1<<d;i[d]=-1,c&=~v}a!==0&&ye(e,a,n)}function Rs(){return(it&6)===0?(Jr(0),!1):!0}function Ef(){if(Xe!==null){if(st===0)var e=Xe.return;else e=Xe,za=Fl=null,Bu(e),Di=null,Or=0,e=Xe;for(;e!==null;)k0(e.alternate,e),e=e.return;Xe=null}}function Gi(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,nw(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),qa=0,Ef(),yt=e,Xe=a=Ta(e.current,null),Ke=n,st=0,Cn=null,bl=!1,Yi=re(e,n),yf=!1,qi=Mn=xf=ri=wl=Dt=0,vn=Kr=null,vf=!1,(n&8)!==0&&(n|=n&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=n;0<i;){var c=31-Wt(i),d=1<<c;n|=e[c],i&=~d}return Ya=n,Fo(),a}function ig(e,n){Ue=null,T.H=Vr,n===ji||n===is?(n=wm(),st=3):n===Cu?(n=wm(),st=4):st=n===ef?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Cn=n,Xe===null&&(Dt=1,vs(e,Ln(n,e.current)))}function rg(){var e=_n.current;return e===null?!0:(Ke&4194048)===Ke?Yn===null:(Ke&62914560)===Ke||(Ke&536870912)!==0?e===Yn:!1}function og(){var e=T.H;return T.H=Vr,e===null?Vr:e}function sg(){var e=T.A;return T.A=D1,e}function zs(){Dt=4,bl||(Ke&4194048)!==Ke&&_n.current!==null||(Yi=!0),(wl&134217727)===0&&(ri&134217727)===0||yt===null||_l(yt,Ke,Mn,!1)}function _f(e,n,a){var i=it;it|=2;var c=og(),d=sg();(yt!==e||Ke!==n)&&(Ts=null,Gi(e,n)),n=!1;var v=Dt;e:do try{if(st!==0&&Xe!==null){var _=Xe,V=Cn;switch(st){case 8:Ef(),v=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(n=!0);var F=st;if(st=0,Cn=null,Xi(e,_,V,F),a&&Yi){v=0;break e}break;default:F=st,st=0,Cn=null,Xi(e,_,V,F)}}L1(),v=Dt;break}catch(le){ig(e,le)}while(!0);return n&&e.shellSuspendCounter++,za=Fl=null,it=i,T.H=c,T.A=d,Xe===null&&(yt=null,Ke=0,Fo()),v}function L1(){for(;Xe!==null;)cg(Xe)}function B1(e,n){var a=it;it|=2;var i=og(),c=sg();yt!==e||Ke!==n?(Ts=null,As=Je()+500,Gi(e,n)):Yi=re(e,n);e:do try{if(st!==0&&Xe!==null){n=Xe;var d=Cn;t:switch(st){case 1:st=0,Cn=null,Xi(e,n,d,1);break;case 2:case 9:if(vm(d)){st=0,Cn=null,ug(n);break}n=function(){st!==2&&st!==9||yt!==e||(st=7),ua(e)},d.then(n,n);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:vm(d)?(st=0,Cn=null,ug(n)):(st=0,Cn=null,Xi(e,n,d,7));break;case 5:var v=null;switch(Xe.tag){case 26:v=Xe.memoizedState;case 5:case 27:var _=Xe;if(v?Ig(v):_.stateNode.complete){st=0,Cn=null;var V=_.sibling;if(V!==null)Xe=V;else{var F=_.return;F!==null?(Xe=F,Os(F)):Xe=null}break t}}st=0,Cn=null,Xi(e,n,d,5);break;case 6:st=0,Cn=null,Xi(e,n,d,6);break;case 8:Ef(),Dt=6;break e;default:throw Error(o(462))}}U1();break}catch(le){ig(e,le)}while(!0);return za=Fl=null,T.H=i,T.A=c,it=a,Xe!==null?0:(yt=null,Ke=0,Fo(),Dt)}function U1(){for(;Xe!==null&&!gt();)cg(Xe)}function cg(e){var n=j0(e.alternate,e,Ya);e.memoizedProps=e.pendingProps,n===null?Os(e):Xe=n}function ug(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=M0(a,n,n.pendingProps,n.type,void 0,Ke);break;case 11:n=M0(a,n,n.pendingProps,n.type.render,n.ref,Ke);break;case 5:Bu(n);default:k0(a,n),n=Xe=sm(n,Ya),n=j0(a,n,Ya)}e.memoizedProps=e.pendingProps,n===null?Os(e):Xe=n}function Xi(e,n,a,i){za=Fl=null,Bu(n),Di=null,Or=0;var c=n.return;try{if(M1(e,c,n,a,Ke)){Dt=1,vs(e,Ln(a,e.current)),Xe=null;return}}catch(d){if(c!==null)throw Xe=c,d;Dt=1,vs(e,Ln(a,e.current)),Xe=null;return}n.flags&32768?(Fe||i===1?e=!0:Yi||(Ke&536870912)!==0?e=!1:(bl=e=!0,(i===2||i===9||i===3||i===6)&&(i=_n.current,i!==null&&i.tag===13&&(i.flags|=16384))),fg(n,e)):Os(n)}function Os(e){var n=e;do{if((n.flags&32768)!==0){fg(n,bl);return}e=n.return;var a=R1(n.alternate,n,Ya);if(a!==null){Xe=a;return}if(n=n.sibling,n!==null){Xe=n;return}Xe=n=e}while(n!==null);Dt===0&&(Dt=5)}function fg(e,n){do{var a=z1(e.alternate,e);if(a!==null){a.flags&=32767,Xe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Xe=e;return}Xe=e=a}while(e!==null);Dt=6,Xe=null}function dg(e,n,a,i,c,d,v,_,V){e.cancelPendingCommit=null;do js();while(Xt!==0);if((it&6)!==0)throw Error(o(327));if(n!==null){if(n===e.current)throw Error(o(177));if(d=n.lanes|n.childLanes,d|=fu,ve(e,a,d,v,_,V),e===yt&&(Xe=yt=null,Ke=0),$i=n,El=e,qa=a,bf=d,wf=c,tg=i,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$1(Ct,function(){return yg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||i){i=T.T,T.T=null,c=k.p,k.p=2,v=it,it|=4;try{O1(e,n,a)}finally{it=v,k.p=c,T.T=i}}Xt=1,hg(),mg(),gg()}}function hg(){if(Xt===1){Xt=0;var e=El,n=$i,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=T.T,T.T=null;var i=k.p;k.p=2;var c=it;it|=4;try{Q0(n,e);var d=Hf,v=Ph(e.containerInfo),_=d.focusedElem,V=d.selectionRange;if(v!==_&&_&&_.ownerDocument&&Wh(_.ownerDocument.documentElement,_)){if(V!==null&&ru(_)){var F=V.start,le=V.end;if(le===void 0&&(le=F),"selectionStart"in _)_.selectionStart=F,_.selectionEnd=Math.min(le,_.value.length);else{var ce=_.ownerDocument||document,ee=ce&&ce.defaultView||window;if(ee.getSelection){var ne=ee.getSelection(),xe=_.textContent.length,Oe=Math.min(V.start,xe),mt=V.end===void 0?Oe:Math.min(V.end,xe);!ne.extend&&Oe>mt&&(v=mt,mt=Oe,Oe=v);var K=Fh(_,Oe),$=Fh(_,mt);if(K&&$&&(ne.rangeCount!==1||ne.anchorNode!==K.node||ne.anchorOffset!==K.offset||ne.focusNode!==$.node||ne.focusOffset!==$.offset)){var J=ce.createRange();J.setStart(K.node,K.offset),ne.removeAllRanges(),Oe>mt?(ne.addRange(J),ne.extend($.node,$.offset)):(J.setEnd($.node,$.offset),ne.addRange(J))}}}}for(ce=[],ne=_;ne=ne.parentNode;)ne.nodeType===1&&ce.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ce.length;_++){var oe=ce[_];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Xs=!!kf,Hf=kf=null}finally{it=c,k.p=i,T.T=a}}e.current=n,Xt=2}}function mg(){if(Xt===2){Xt=0;var e=El,n=$i,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=T.T,T.T=null;var i=k.p;k.p=2;var c=it;it|=4;try{q0(e,n.alternate,n)}finally{it=c,k.p=i,T.T=a}}Xt=3}}function gg(){if(Xt===4||Xt===3){Xt=0,vt();var e=El,n=$i,a=qa,i=tg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Xt=5:(Xt=0,$i=El=null,pg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Sl=null),Xn(a),n=n.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(xa,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=T.T,c=k.p,k.p=2,T.T=null;try{for(var d=e.onRecoverableError,v=0;v<i.length;v++){var _=i[v];d(_.value,{componentStack:_.stack})}}finally{T.T=n,k.p=c}}(qa&3)!==0&&js(),ua(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Sf?Ir++:(Ir=0,Sf=e):Ir=0,Jr(0)}}function pg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Rr(n)))}function js(){return hg(),mg(),gg(),yg()}function yg(){if(Xt!==5)return!1;var e=El,n=bf;bf=0;var a=Xn(qa),i=T.T,c=k.p;try{k.p=32>a?32:a,T.T=null,a=wf,wf=null;var d=El,v=qa;if(Xt=0,$i=El=null,qa=0,(it&6)!==0)throw Error(o(331));var _=it;if(it|=4,W0(d.current),I0(d,d.current,v,a),it=_,Jr(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(xa,d)}catch{}return!0}finally{k.p=c,T.T=i,pg(e,n)}}function xg(e,n,a){n=Ln(a,n),n=Pu(e.stateNode,n,2),e=pl(e,n,2),e!==null&&(rt(e,2),ua(e))}function ct(e,n,a){if(e.tag===3)xg(e,e,a);else for(;n!==null;){if(n.tag===3){xg(n,e,a);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Sl===null||!Sl.has(i))){e=Ln(a,e),a=v0(2),i=pl(n,a,2),i!==null&&(b0(a,i,n,e),rt(i,2),ua(i));break}}n=n.return}}function Nf(e,n,a){var i=e.pingCache;if(i===null){i=e.pingCache=new k1;var c=new Set;i.set(n,c)}else c=i.get(n),c===void 0&&(c=new Set,i.set(n,c));c.has(a)||(yf=!0,c.add(a),e=V1.bind(null,e,n,a),n.then(e,e))}function V1(e,n,a){var i=e.pingCache;i!==null&&i.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,yt===e&&(Ke&a)===a&&(Dt===4||Dt===3&&(Ke&62914560)===Ke&&300>Je()-Ms?(it&2)===0&&Gi(e,0):xf|=a,qi===Ke&&(qi=0)),ua(e)}function vg(e,n){n===0&&(n=ke()),e=Kl(e,n),e!==null&&(rt(e,n),ua(e))}function Y1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),vg(e,a)}function q1(e,n){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(n),vg(e,a)}function $1(e,n){return xt(e,n)}var Ds=null,Zi=null,Cf=!1,ks=!1,Mf=!1,Nl=0;function ua(e){e!==Zi&&e.next===null&&(Zi===null?Ds=Zi=e:Zi=Zi.next=e),ks=!0,Cf||(Cf=!0,X1())}function Jr(e,n){if(!Mf&&ks){Mf=!0;do for(var a=!1,i=Ds;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var d=0;else{var v=i.suspendedLanes,_=i.pingedLanes;d=(1<<31-Wt(42|e)+1)-1,d&=c&~(v&~_),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Eg(i,d))}else d=Ke,d=Y(i,i===yt?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(d&3)===0||re(i,d)||(a=!0,Eg(i,d));i=i.next}while(a);Mf=!1}}function G1(){bg()}function bg(){ks=Cf=!1;var e=0;Nl!==0&&tw()&&(e=Nl);for(var n=Je(),a=null,i=Ds;i!==null;){var c=i.next,d=wg(i,n);d===0?(i.next=null,a===null?Ds=c:a.next=c,c===null&&(Zi=a)):(a=i,(e!==0||(d&3)!==0)&&(ks=!0)),i=c}Xt!==0&&Xt!==5||Jr(e),Nl!==0&&(Nl=0)}function wg(e,n){for(var a=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-Wt(d),_=1<<v,V=c[v];V===-1?((_&a)===0||(_&i)!==0)&&(c[v]=pe(_,n)):V<=n&&(e.expiredLanes|=_),d&=~_}if(n=yt,a=Ke,a=Y(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===n&&(st===2||st===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Qt(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||re(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(i!==null&&Qt(i),Xn(a)){case 2:case 8:a=ln;break;case 32:a=Ct;break;case 268435456:a=On;break;default:a=Ct}return i=Sg.bind(null,e),a=xt(a,i),e.callbackPriority=n,e.callbackNode=a,n}return i!==null&&i!==null&&Qt(i),e.callbackPriority=2,e.callbackNode=null,2}function Sg(e,n){if(Xt!==0&&Xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(js()&&e.callbackNode!==a)return null;var i=Ke;return i=Y(e,e===yt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(ag(e,i,n),wg(e,Je()),e.callbackNode!=null&&e.callbackNode===a?Sg.bind(null,e):null)}function Eg(e,n){if(js())return null;ag(e,n,!0)}function X1(){aw(function(){(it&6)!==0?xt(Gt,G1):bg()})}function Af(){if(Nl===0){var e=zi;e===0&&(e=va,va<<=1,(va&261888)===0&&(va=256)),Nl=e}return Nl}function _g(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:sl(""+e)}function Ng(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function Z1(e,n,a,i,c){if(n==="submit"&&a&&a.stateNode===c){var d=_g((c[It]||null).action),v=i.submitter;v&&(n=(n=v[It]||null)?_g(n.formAction):v.getAttribute("formAction"),n!==null&&(d=n,v=null));var _=new Qo("action","action",null,i,c);e.push({event:_,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Nl!==0){var V=v?Ng(c,v):new FormData(c);Qu(a,{pending:!0,data:V,method:c.method,action:d},null,V)}}else typeof d=="function"&&(_.preventDefault(),V=v?Ng(c,v):new FormData(c),Qu(a,{pending:!0,data:V,method:c.method,action:d},d,V))},currentTarget:c}]})}}for(var Tf=0;Tf<uu.length;Tf++){var Rf=uu[Tf],Q1=Rf.toLowerCase(),K1=Rf[0].toUpperCase()+Rf.slice(1);Jn(Q1,"on"+K1)}Jn(nm,"onAnimationEnd"),Jn(am,"onAnimationIteration"),Jn(lm,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(u1,"onTransitionRun"),Jn(f1,"onTransitionStart"),Jn(d1,"onTransitionCancel"),Jn(im,"onTransitionEnd"),he("onMouseEnter",["mouseout","mouseover"]),he("onMouseLeave",["mouseout","mouseover"]),he("onPointerEnter",["pointerout","pointerover"]),he("onPointerLeave",["pointerout","pointerover"]),In("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),In("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),In("onBeforeInput",["compositionend","keypress","textInput","paste"]),In("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),In("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),In("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fr="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(" "),I1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fr));function Cg(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],c=i.event;i=i.listeners;e:{var d=void 0;if(n)for(var v=i.length-1;0<=v;v--){var _=i[v],V=_.instance,F=_.currentTarget;if(_=_.listener,V!==d&&c.isPropagationStopped())break e;d=_,c.currentTarget=F;try{d(c)}catch(le){Jo(le)}c.currentTarget=null,d=V}else for(v=0;v<i.length;v++){if(_=i[v],V=_.instance,F=_.currentTarget,_=_.listener,V!==d&&c.isPropagationStopped())break e;d=_,c.currentTarget=F;try{d(c)}catch(le){Jo(le)}c.currentTarget=null,d=V}}}}function Ze(e,n){var a=n[ll];a===void 0&&(a=n[ll]=new Set);var i=e+"__bubble";a.has(i)||(Mg(n,e,2,!1),a.add(i))}function zf(e,n,a){var i=0;n&&(i|=4),Mg(a,e,i,n)}var Hs="_reactListening"+Math.random().toString(36).slice(2);function Of(e){if(!e[Hs]){e[Hs]=!0,vi.forEach(function(a){a!=="selectionchange"&&(I1.has(a)||zf(a,!1,e),zf(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Hs]||(n[Hs]=!0,zf("selectionchange",!1,n))}}function Mg(e,n,a,i){switch(np(n)){case 2:var c=Ew;break;case 8:c=_w;break;default:c=Qf}a=c.bind(null,n,a,e),c=void 0,!Fc||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(n,a,{capture:!0,passive:c}):e.addEventListener(n,a,!0):c!==void 0?e.addEventListener(n,a,{passive:c}):e.addEventListener(n,a,!1)}function jf(e,n,a,i,c){var d=i;if((n&1)===0&&(n&2)===0&&i!==null)e:for(;;){if(i===null)return;var v=i.tag;if(v===3||v===4){var _=i.stateNode.containerInfo;if(_===c)break;if(v===4)for(v=i.return;v!==null;){var V=v.tag;if((V===3||V===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;_!==null;){if(v=Pt(_),v===null)return;if(V=v.tag,V===5||V===6||V===26||V===27){i=d=v;continue e}_=_.parentNode}}i=i.return}$o(function(){var F=d,le=Be(a),ce=[];e:{var ee=rm.get(e);if(ee!==void 0){var ne=Qo,xe=e;switch(e){case"keypress":if(Xo(a)===0)break e;case"keydown":case"keyup":ne=qb;break;case"focusin":xe="focus",ne=tu;break;case"focusout":xe="blur",ne=tu;break;case"beforeblur":case"afterblur":ne=tu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=kh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Rb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Xb;break;case nm:case am:case lm:ne=jb;break;case im:ne=Qb;break;case"scroll":case"scrollend":ne=Ab;break;case"wheel":ne=Ib;break;case"copy":case"cut":case"paste":ne=kb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Lh;break;case"toggle":case"beforetoggle":ne=Fb}var Oe=(n&4)!==0,mt=!Oe&&(e==="scroll"||e==="scrollend"),K=Oe?ee!==null?ee+"Capture":null:ee;Oe=[];for(var $=F,J;$!==null;){var oe=$;if(J=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||J===null||K===null||(oe=vr($,K),oe!=null&&Oe.push(Wr($,oe,J))),mt)break;$=$.return}0<Oe.length&&(ee=new ne(ee,xe,null,a,le),ce.push({event:ee,listeners:Oe}))}}if((n&7)===0){e:{if(ee=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",ee&&a!==Ee&&(xe=a.relatedTarget||a.fromElement)&&(Pt(xe)||xe[Zn]))break e;if((ne||ee)&&(ee=le.window===le?le:(ee=le.ownerDocument)?ee.defaultView||ee.parentWindow:window,ne?(xe=a.relatedTarget||a.toElement,ne=F,xe=xe?Pt(xe):null,xe!==null&&(mt=u(xe),Oe=xe.tag,xe!==mt||Oe!==5&&Oe!==27&&Oe!==6)&&(xe=null)):(ne=null,xe=F),ne!==xe)){if(Oe=kh,oe="onMouseLeave",K="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=Lh,oe="onPointerLeave",K="onPointerEnter",$="pointer"),mt=ne==null?ee:Kn(ne),J=xe==null?ee:Kn(xe),ee=new Oe(oe,$+"leave",ne,a,le),ee.target=mt,ee.relatedTarget=J,oe=null,Pt(le)===F&&(Oe=new Oe(K,$+"enter",xe,a,le),Oe.target=J,Oe.relatedTarget=mt,oe=Oe),mt=oe,ne&&xe)t:{for(Oe=J1,K=ne,$=xe,J=0,oe=K;oe;oe=Oe(oe))J++;oe=0;for(var Ae=$;Ae;Ae=Oe(Ae))oe++;for(;0<J-oe;)K=Oe(K),J--;for(;0<oe-J;)$=Oe($),oe--;for(;J--;){if(K===$||$!==null&&K===$.alternate){Oe=K;break t}K=Oe(K),$=Oe($)}Oe=null}else Oe=null;ne!==null&&Ag(ce,ee,ne,Oe,!1),xe!==null&&mt!==null&&Ag(ce,mt,xe,Oe,!0)}}e:{if(ee=F?Kn(F):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var tt=Xh;else if($h(ee))if(Zh)tt=o1;else{tt=i1;var _e=l1}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?F&&ol(F.elementType)&&(tt=Xh):tt=r1;if(tt&&(tt=tt(e,F))){Gh(ce,tt,a,le);break e}_e&&_e(e,ee,F),e==="focusout"&&F&&ee.type==="number"&&F.memoizedProps.value!=null&&rl(ee,"number",ee.value)}switch(_e=F?Kn(F):window,e){case"focusin":($h(_e)||_e.contentEditable==="true")&&(Ei=_e,ou=F,Mr=null);break;case"focusout":Mr=ou=Ei=null;break;case"mousedown":su=!0;break;case"contextmenu":case"mouseup":case"dragend":su=!1,em(ce,a,le);break;case"selectionchange":if(c1)break;case"keydown":case"keyup":em(ce,a,le)}var qe;if(au)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Si?Yh(e,a)&&(Ie="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(Bh&&a.locale!=="ko"&&(Si||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Si&&(qe=jh()):(cl=le,Wc="value"in cl?cl.value:cl.textContent,Si=!0)),_e=Ls(F,Ie),0<_e.length&&(Ie=new Hh(Ie,e,null,a,le),ce.push({event:Ie,listeners:_e}),qe?Ie.data=qe:(qe=qh(a),qe!==null&&(Ie.data=qe)))),(qe=Pb?e1(e,a):t1(e,a))&&(Ie=Ls(F,"onBeforeInput"),0<Ie.length&&(_e=new Hh("onBeforeInput","beforeinput",null,a,le),ce.push({event:_e,listeners:Ie}),_e.data=qe)),Z1(ce,e,F,a,le)}Cg(ce,n)})}function Wr(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Ls(e,n){for(var a=n+"Capture",i=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=vr(e,a),c!=null&&i.unshift(Wr(e,c,d)),c=vr(e,n),c!=null&&i.push(Wr(e,c,d))),e.tag===3)return i;e=e.return}return[]}function J1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ag(e,n,a,i,c){for(var d=n._reactName,v=[];a!==null&&a!==i;){var _=a,V=_.alternate,F=_.stateNode;if(_=_.tag,V!==null&&V===i)break;_!==5&&_!==26&&_!==27||F===null||(V=F,c?(F=vr(a,d),F!=null&&v.unshift(Wr(a,F,V))):c||(F=vr(a,d),F!=null&&v.push(Wr(a,F,V)))),a=a.return}v.length!==0&&e.push({event:n,listeners:v})}var F1=/\r\n?/g,W1=/\u0000|\uFFFD/g;function Tg(e){return(typeof e=="string"?e:""+e).replace(F1,`
|
|
9
|
+
`).replace(W1,"")}function Rg(e,n){return n=Tg(n),Tg(e)===n}function ht(e,n,a,i,c,d){switch(a){case"children":typeof i=="string"?n==="body"||n==="textarea"&&i===""||De(e,i):(typeof i=="number"||typeof i=="bigint")&&n!=="body"&&De(e,""+i);break;case"className":dn(e,"class",i);break;case"tabIndex":dn(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":dn(e,a,i);break;case"style":ot(e,i,d);break;case"data":if(n!=="object"){dn(e,"data",i);break}case"src":case"href":if(i===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=sl(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(n!=="input"&&ht(e,n,"name",c.name,c,null),ht(e,n,"formEncType",c.formEncType,c,null),ht(e,n,"formMethod",c.formMethod,c,null),ht(e,n,"formTarget",c.formTarget,c,null)):(ht(e,n,"encType",c.encType,c,null),ht(e,n,"method",c.method,c,null),ht(e,n,"target",c.target,c,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=sl(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=ge);break;case"onScroll":i!=null&&Ze("scroll",e);break;case"onScrollEnd":i!=null&&Ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=sl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Ze("beforetoggle",e),Ze("toggle",e),Jt(e,"popover",i);break;case"xlinkActuate":on(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":on(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":on(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":on(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":on(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":on(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":on(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":on(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":on(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Jt(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Ma.get(a)||a,Jt(e,a,i))}}function Df(e,n,a,i,c,d){switch(a){case"style":ot(e,i,d);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?De(e,i):(typeof i=="number"||typeof i=="bigint")&&De(e,""+i);break;case"onScroll":i!=null&&Ze("scroll",e);break;case"onScrollEnd":i!=null&&Ze("scrollend",e);break;case"onClick":i!=null&&(e.onclick=ge);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sa.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),n=a.slice(2,c?a.length-7:void 0),d=e[It]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof i=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,i,c);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):Jt(e,a,i)}}}function an(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",e),Ze("load",e);var i=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var v=a[d];if(v!=null)switch(d){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:ht(e,n,d,v,a,null)}}c&&ht(e,n,"srcSet",a.srcSet,a,null),i&&ht(e,n,"src",a.src,a,null);return;case"input":Ze("invalid",e);var _=d=v=c=null,V=null,F=null;for(i in a)if(a.hasOwnProperty(i)){var le=a[i];if(le!=null)switch(i){case"name":c=le;break;case"type":v=le;break;case"checked":V=le;break;case"defaultChecked":F=le;break;case"value":d=le;break;case"defaultValue":_=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,n));break;default:ht(e,n,i,le,a,null)}}Ca(e,d,_,V,F,v,c,!1);return;case"select":Ze("invalid",e),i=v=d=null;for(c in a)if(a.hasOwnProperty(c)&&(_=a[c],_!=null))switch(c){case"value":d=_;break;case"defaultValue":v=_;break;case"multiple":i=_;default:ht(e,n,c,_,a,null)}n=d,a=v,e.multiple=!!i,n!=null?Lt(e,!!i,n,!1):a!=null&&Lt(e,!!i,a,!0);return;case"textarea":Ze("invalid",e),d=c=i=null;for(v in a)if(a.hasOwnProperty(v)&&(_=a[v],_!=null))switch(v){case"value":i=_;break;case"defaultValue":c=_;break;case"children":d=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(91));break;default:ht(e,n,v,_,a,null)}wi(e,i,c,d);return;case"option":for(V in a)if(a.hasOwnProperty(V)&&(i=a[V],i!=null))switch(V){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:ht(e,n,V,i,a,null)}return;case"dialog":Ze("beforetoggle",e),Ze("toggle",e),Ze("cancel",e),Ze("close",e);break;case"iframe":case"object":Ze("load",e);break;case"video":case"audio":for(i=0;i<Fr.length;i++)Ze(Fr[i],e);break;case"image":Ze("error",e),Ze("load",e);break;case"details":Ze("toggle",e);break;case"embed":case"source":case"link":Ze("error",e),Ze("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(F in a)if(a.hasOwnProperty(F)&&(i=a[F],i!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:ht(e,n,F,i,a,null)}return;default:if(ol(n)){for(le in a)a.hasOwnProperty(le)&&(i=a[le],i!==void 0&&Df(e,n,le,i,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(i=a[_],i!=null&&ht(e,n,_,i,a,null))}function P1(e,n,a,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,v=null,_=null,V=null,F=null,le=null;for(ne in a){var ce=a[ne];if(a.hasOwnProperty(ne)&&ce!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":V=ce;default:i.hasOwnProperty(ne)||ht(e,n,ne,null,i,ce)}}for(var ee in i){var ne=i[ee];if(ce=a[ee],i.hasOwnProperty(ee)&&(ne!=null||ce!=null))switch(ee){case"type":d=ne;break;case"name":c=ne;break;case"checked":F=ne;break;case"defaultChecked":le=ne;break;case"value":v=ne;break;case"defaultValue":_=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(o(137,n));break;default:ne!==ce&&ht(e,n,ee,ne,i,ce)}}Na(e,v,_,V,F,le,d,c);return;case"select":ne=v=_=ee=null;for(d in a)if(V=a[d],a.hasOwnProperty(d)&&V!=null)switch(d){case"value":break;case"multiple":ne=V;default:i.hasOwnProperty(d)||ht(e,n,d,null,i,V)}for(c in i)if(d=i[c],V=a[c],i.hasOwnProperty(c)&&(d!=null||V!=null))switch(c){case"value":ee=d;break;case"defaultValue":_=d;break;case"multiple":v=d;default:d!==V&&ht(e,n,c,d,i,V)}n=_,a=v,i=ne,ee!=null?Lt(e,!!a,ee,!1):!!i!=!!a&&(n!=null?Lt(e,!!a,n,!0):Lt(e,!!a,a?[]:"",!1));return;case"textarea":ne=ee=null;for(_ in a)if(c=a[_],a.hasOwnProperty(_)&&c!=null&&!i.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ht(e,n,_,null,i,c)}for(v in i)if(c=i[v],d=a[v],i.hasOwnProperty(v)&&(c!=null||d!=null))switch(v){case"value":ee=c;break;case"defaultValue":ne=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&ht(e,n,v,c,i,d)}Yo(e,ee,ne);return;case"option":for(var xe in a)if(ee=a[xe],a.hasOwnProperty(xe)&&ee!=null&&!i.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:ht(e,n,xe,null,i,ee)}for(V in i)if(ee=i[V],ne=a[V],i.hasOwnProperty(V)&&ee!==ne&&(ee!=null||ne!=null))switch(V){case"selected":e.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:ht(e,n,V,ee,i,ne)}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 Oe in a)ee=a[Oe],a.hasOwnProperty(Oe)&&ee!=null&&!i.hasOwnProperty(Oe)&&ht(e,n,Oe,null,i,ee);for(F in i)if(ee=i[F],ne=a[F],i.hasOwnProperty(F)&&ee!==ne&&(ee!=null||ne!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(o(137,n));break;default:ht(e,n,F,ee,i,ne)}return;default:if(ol(n)){for(var mt in a)ee=a[mt],a.hasOwnProperty(mt)&&ee!==void 0&&!i.hasOwnProperty(mt)&&Df(e,n,mt,void 0,i,ee);for(le in i)ee=i[le],ne=a[le],!i.hasOwnProperty(le)||ee===ne||ee===void 0&&ne===void 0||Df(e,n,le,ee,i,ne);return}}for(var K in a)ee=a[K],a.hasOwnProperty(K)&&ee!=null&&!i.hasOwnProperty(K)&&ht(e,n,K,null,i,ee);for(ce in i)ee=i[ce],ne=a[ce],!i.hasOwnProperty(ce)||ee===ne||ee==null&&ne==null||ht(e,n,ce,ee,i,ne)}function zg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ew(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var c=a[i],d=c.transferSize,v=c.initiatorType,_=c.duration;if(d&&_&&zg(v)){for(v=0,_=c.responseEnd,i+=1;i<a.length;i++){var V=a[i],F=V.startTime;if(F>_)break;var le=V.transferSize,ce=V.initiatorType;le&&zg(ce)&&(V=V.responseEnd,v+=le*(V<_?1:(_-F)/(V-F)))}if(--i,n+=8*(d+v)/(c.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 kf=null,Hf=null;function Bs(e){return e.nodeType===9?e:e.ownerDocument}function Og(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 jg(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 Lf(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 Bf=null;function tw(){var e=window.event;return e&&e.type==="popstate"?e===Bf?!1:(Bf=e,!0):(Bf=null,!1)}var Dg=typeof setTimeout=="function"?setTimeout:void 0,nw=typeof clearTimeout=="function"?clearTimeout:void 0,kg=typeof Promise=="function"?Promise:void 0,aw=typeof queueMicrotask=="function"?queueMicrotask:typeof kg<"u"?function(e){return kg.resolve(null).then(e).catch(lw)}:Dg;function lw(e){setTimeout(function(){throw e})}function Cl(e){return e==="head"}function Hg(e,n){var a=n,i=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(c),Ji(n);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Pr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Pr(a);for(var d=a.firstChild;d;){var v=d.nextSibling,_=d.nodeName;d[wa]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=v}}else a==="body"&&Pr(e.ownerDocument.body);a=c}while(a);Ji(n)}function Lg(e,n){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function Uf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Uf(a),$l(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function iw(e,n,a,i){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[wa])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function rw(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=qn(e.nextSibling),e===null))return null;return e}function Bg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=qn(e.nextSibling),e===null))return null;return e}function Vf(e){return e.data==="$?"||e.data==="$~"}function Yf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ow(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var i=function(){n(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function qn(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 qf=null;function Ug(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return qn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Vg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Yg(e,n,a){switch(n=Bs(a),e){case"html":if(e=n.documentElement,!e)throw Error(o(452));return e;case"head":if(e=n.head,!e)throw Error(o(453));return e;case"body":if(e=n.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Pr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);$l(e)}var $n=new Map,qg=new Set;function Us(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var $a=k.d;k.d={f:sw,r:cw,D:uw,C:fw,L:dw,m:hw,X:gw,S:mw,M:pw};function sw(){var e=$a.f(),n=Rs();return e||n}function cw(e){var n=Qn(e);n!==null&&n.tag===5&&n.type==="form"?i0(n):$a.r(e)}var Qi=typeof document>"u"?null:document;function $g(e,n,a){var i=Qi;if(i&&typeof n=="string"&&n){var c=sn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),qg.has(c)||(qg.add(c),e={rel:e,crossOrigin:a,href:n},i.querySelector(c)===null&&(n=i.createElement("link"),an(n,"link",e),Ot(n),i.head.appendChild(n)))}}function uw(e){$a.D(e),$g("dns-prefetch",e,null)}function fw(e,n){$a.C(e,n),$g("preconnect",e,n)}function dw(e,n,a){$a.L(e,n,a);var i=Qi;if(i&&e&&n){var c='link[rel="preload"][as="'+sn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+sn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+sn(a.imageSizes)+'"]')):c+='[href="'+sn(e)+'"]';var d=c;switch(n){case"style":d=Ki(e);break;case"script":d=Ii(e)}$n.has(d)||(e=p({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),$n.set(d,e),i.querySelector(c)!==null||n==="style"&&i.querySelector(eo(d))||n==="script"&&i.querySelector(to(d))||(n=i.createElement("link"),an(n,"link",e),Ot(n),i.head.appendChild(n)))}}function hw(e,n){$a.m(e,n);var a=Qi;if(a&&e){var i=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+sn(i)+'"][href="'+sn(e)+'"]',d=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ii(e)}if(!$n.has(d)&&(e=p({rel:"modulepreload",href:e},n),$n.set(d,e),a.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(to(d)))return}i=a.createElement("link"),an(i,"link",e),Ot(i),a.head.appendChild(i)}}}function mw(e,n,a){$a.S(e,n,a);var i=Qi;if(i&&e){var c=ra(i).hoistableStyles,d=Ki(e);n=n||"default";var v=c.get(d);if(!v){var _={loading:0,preload:null};if(v=i.querySelector(eo(d)))_.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":n},a),(a=$n.get(d))&&$f(e,a);var V=v=i.createElement("link");Ot(V),an(V,"link",e),V._p=new Promise(function(F,le){V.onload=F,V.onerror=le}),V.addEventListener("load",function(){_.loading|=1}),V.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Vs(v,n,i)}v={type:"stylesheet",instance:v,count:1,state:_},c.set(d,v)}}}function gw(e,n){$a.X(e,n);var a=Qi;if(a&&e){var i=ra(a).hoistableScripts,c=Ii(e),d=i.get(c);d||(d=a.querySelector(to(c)),d||(e=p({src:e,async:!0},n),(n=$n.get(c))&&Gf(e,n),d=a.createElement("script"),Ot(d),an(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(c,d))}}function pw(e,n){$a.M(e,n);var a=Qi;if(a&&e){var i=ra(a).hoistableScripts,c=Ii(e),d=i.get(c);d||(d=a.querySelector(to(c)),d||(e=p({src:e,async:!0,type:"module"},n),(n=$n.get(c))&&Gf(e,n),d=a.createElement("script"),Ot(d),an(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(c,d))}}function Gg(e,n,a,i){var c=(c=de.current)?Us(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Ki(a.href),a=ra(c).hoistableStyles,i=a.get(n),i||(i={type:"style",instance:null,count:0,state:null},a.set(n,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ki(a.href);var d=ra(c).hoistableStyles,v=d.get(e);if(v||(c=c.ownerDocument||c,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=c.querySelector(eo(e)))&&!d._p&&(v.instance=d,v.state.loading=5),$n.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},$n.set(e,a),d||yw(c,e,a,v.state))),n&&i===null)throw Error(o(528,""));return v}if(n&&i!==null)throw Error(o(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ii(a),a=ra(c).hoistableScripts,i=a.get(n),i||(i={type:"script",instance:null,count:0,state:null},a.set(n,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ki(e){return'href="'+sn(e)+'"'}function eo(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function yw(e,n,a,i){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?i.loading=1:(n=e.createElement("link"),i.preload=n,n.addEventListener("load",function(){return i.loading|=1}),n.addEventListener("error",function(){return i.loading|=2}),an(n,"link",a),Ot(n),e.head.appendChild(n))}function Ii(e){return'[src="'+sn(e)+'"]'}function to(e){return"script[async]"+e}function Zg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var i=e.querySelector('style[data-href~="'+sn(a.href)+'"]');if(i)return n.instance=i,Ot(i),i;var c=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ot(i),an(i,"style",c),Vs(i,a.precedence,e),n.instance=i;case"stylesheet":c=Ki(a.href);var d=e.querySelector(eo(c));if(d)return n.state.loading|=4,n.instance=d,Ot(d),d;i=Xg(a),(c=$n.get(c))&&$f(i,c),d=(e.ownerDocument||e).createElement("link"),Ot(d);var v=d;return v._p=new Promise(function(_,V){v.onload=_,v.onerror=V}),an(d,"link",i),n.state.loading|=4,Vs(d,a.precedence,e),n.instance=d;case"script":return d=Ii(a.src),(c=e.querySelector(to(d)))?(n.instance=c,Ot(c),c):(i=a,(c=$n.get(d))&&(i=p({},a),Gf(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ot(c),an(c,"link",i),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(i=n.instance,n.state.loading|=4,Vs(i,a.precedence,e));return n.instance}function Vs(e,n,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,d=c,v=0;v<i.length;v++){var _=i[v];if(_.dataset.precedence===n)d=_;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function $f(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Gf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Ys=null;function Qg(e,n,a){if(Ys===null){var i=new Map,c=Ys=new Map;c.set(a,i)}else c=Ys,i=c.get(a),i||(i=new Map,c.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[wa]||d[At]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(n)||"";v=e+v;var _=i.get(v);_?_.push(d):i.set(v,[d])}}return i}function Kg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function xw(e,n,a){if(a===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;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Ig(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function vw(e,n,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Ki(i.href),d=n.querySelector(eo(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=qs.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=d,Ot(d);return}d=n.ownerDocument||n,i=Xg(i),(c=$n.get(c))&&$f(i,c),d=d.createElement("link"),Ot(d);var v=d;v._p=new Promise(function(_,V){v.onload=_,v.onerror=V}),an(d,"link",i),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=qs.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Xf=0;function bw(e,n){return e.stylesheets&&e.count===0&&Gs(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Gs(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Xf===0&&(Xf=62500*ew());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gs(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Xf?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function qs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $s=null;function Gs(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$s=new Map,n.forEach(ww,e),$s=null,qs.call(e))}function ww(e,n){if(!(n.state.loading&4)){var a=$s.get(e);if(a)var i=a.get(null);else{a=new Map,$s.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var v=c[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),i=v)}i&&a.set(null,i)}c=n.instance,v=c.getAttribute("data-precedence"),d=a.get(v)||i,d===i&&a.set(null,c),a.set(v,c),this.count++,i=qs.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var no={$$typeof:E,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function Sw(e,n,a,i,c,d,v,_,V){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=pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.hiddenUpdates=pt(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function Jg(e,n,a,i,c,d,v,_,V,F,le,ce){return e=new Sw(e,n,a,v,V,F,le,ce,_),n=1,d===!0&&(n|=24),d=En(3,null,null,n),e.current=d,d.stateNode=e,n=Eu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:i,isDehydrated:a,cache:n},Mu(d),e}function Fg(e){return e?(e=Ci,e):Ci}function Wg(e,n,a,i,c,d){c=Fg(c),i.context===null?i.context=c:i.pendingContext=c,i=gl(n),i.payload={element:a},d=d===void 0?null:d,d!==null&&(i.callback=d),a=pl(e,i,n),a!==null&&(bn(a,e,n),Dr(a,e,n))}function Pg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Zf(e,n){Pg(e,n),(e=e.alternate)&&Pg(e,n)}function ep(e){if(e.tag===13||e.tag===31){var n=Kl(e,67108864);n!==null&&bn(n,e,67108864),Zf(e,67108864)}}function tp(e){if(e.tag===13||e.tag===31){var n=An();n=bt(n);var a=Kl(e,n);a!==null&&bn(a,e,n),Zf(e,n)}}var Xs=!0;function Ew(e,n,a,i){var c=T.T;T.T=null;var d=k.p;try{k.p=2,Qf(e,n,a,i)}finally{k.p=d,T.T=c}}function _w(e,n,a,i){var c=T.T;T.T=null;var d=k.p;try{k.p=8,Qf(e,n,a,i)}finally{k.p=d,T.T=c}}function Qf(e,n,a,i){if(Xs){var c=Kf(i);if(c===null)jf(e,n,i,Zs,a),ap(e,i);else if(Cw(c,e,n,a,i))i.stopPropagation();else if(ap(e,i),n&4&&-1<Nw.indexOf(e)){for(;c!==null;){var d=Qn(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=rn(d.pendingLanes);if(v!==0){var _=d;for(_.pendingLanes|=2,_.entangledLanes|=2;v;){var V=1<<31-Wt(v);_.entanglements[1]|=V,v&=~V}ua(d),(it&6)===0&&(As=Je()+500,Jr(0))}}break;case 31:case 13:_=Kl(d,2),_!==null&&bn(_,d,2),Rs(),Zf(d,2)}if(d=Kf(i),d===null&&jf(e,n,i,Zs,a),d===c)break;c=d}c!==null&&i.stopPropagation()}else jf(e,n,i,null,a)}}function Kf(e){return e=Be(e),If(e)}var Zs=null;function If(e){if(Zs=null,e=Pt(e),e!==null){var n=u(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=f(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Zs=e,null}function np(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(zn()){case Gt:return 2;case ln:return 8;case Ct:case fn:return 32;case On:return 268435456;default:return 32}default:return 32}}var Jf=!1,Ml=null,Al=null,Tl=null,ao=new Map,lo=new Map,Rl=[],Nw="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 ap(e,n){switch(e){case"focusin":case"focusout":Ml=null;break;case"dragenter":case"dragleave":Al=null;break;case"mouseover":case"mouseout":Tl=null;break;case"pointerover":case"pointerout":ao.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":lo.delete(n.pointerId)}}function io(e,n,a,i,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:i,nativeEvent:d,targetContainers:[c]},n!==null&&(n=Qn(n),n!==null&&ep(n)),e):(e.eventSystemFlags|=i,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Cw(e,n,a,i,c){switch(n){case"focusin":return Ml=io(Ml,e,n,a,i,c),!0;case"dragenter":return Al=io(Al,e,n,a,i,c),!0;case"mouseover":return Tl=io(Tl,e,n,a,i,c),!0;case"pointerover":var d=c.pointerId;return ao.set(d,io(ao.get(d)||null,e,n,a,i,c)),!0;case"gotpointercapture":return d=c.pointerId,lo.set(d,io(lo.get(d)||null,e,n,a,i,c)),!0}return!1}function lp(e){var n=Pt(e.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,al(e.priority,function(){tp(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,al(e.priority,function(){tp(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qs(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Kf(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);Ee=i,a.target.dispatchEvent(i),Ee=null}else return n=Qn(a),n!==null&&ep(n),e.blockedOn=a,!1;n.shift()}return!0}function ip(e,n,a){Qs(e)&&a.delete(n)}function Mw(){Jf=!1,Ml!==null&&Qs(Ml)&&(Ml=null),Al!==null&&Qs(Al)&&(Al=null),Tl!==null&&Qs(Tl)&&(Tl=null),ao.forEach(ip),lo.forEach(ip)}function Ks(e,n){e.blockedOn===n&&(e.blockedOn=null,Jf||(Jf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mw)))}var Is=null;function rp(e){Is!==e&&(Is=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Is===e&&(Is=null);for(var n=0;n<e.length;n+=3){var a=e[n],i=e[n+1],c=e[n+2];if(typeof i!="function"){if(If(i||a)===null)continue;break}var d=Qn(a);d!==null&&(e.splice(n,3),n-=3,Qu(d,{pending:!0,data:c,method:a.method,action:i},i,c))}}))}function Ji(e){function n(V){return Ks(V,e)}Ml!==null&&Ks(Ml,e),Al!==null&&Ks(Al,e),Tl!==null&&Ks(Tl,e),ao.forEach(n),lo.forEach(n);for(var a=0;a<Rl.length;a++){var i=Rl[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Rl.length&&(a=Rl[0],a.blockedOn===null);)lp(a),a.blockedOn===null&&Rl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var c=a[i],d=a[i+1],v=c[It]||null;if(typeof d=="function")v||rp(a);else if(v){var _=null;if(d&&d.hasAttribute("formAction")){if(c=d,v=d[It]||null)_=v.formAction;else if(If(c)!==null)continue}else _=v.action;typeof _=="function"?a[i+1]=_:(a.splice(i,3),i-=3),rp(a)}}}function op(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return c=v})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function Ff(e){this._internalRoot=e}Js.prototype.render=Ff.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));var a=n.current,i=An();Wg(a,i,e,n,null,null)},Js.prototype.unmount=Ff.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Wg(e.current,2,null,e,null,null),Rs(),n[Zn]=null}};function Js(e){this._internalRoot=e}Js.prototype.unstable_scheduleHydration=function(e){if(e){var n=nl();e={blockedOn:null,target:e,priority:n};for(var a=0;a<Rl.length&&n!==0&&n<Rl[a].priority;a++);Rl.splice(a,0,e),a===0&&lp(e)}};var sp=l.version;if(sp!=="19.2.3")throw Error(o(527,sp,"19.2.3"));k.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var Aw={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fs.isDisabled&&Fs.supportsFiber)try{xa=Fs.inject(Aw),Kt=Fs}catch{}}return oo.createRoot=function(e,n){if(!s(e))throw Error(o(299));var a=!1,i="",c=g0,d=p0,v=y0;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=Jg(e,1,!1,null,null,a,i,null,c,d,v,op),e[Zn]=n.current,Of(e),new Ff(n)},oo.hydrateRoot=function(e,n,a){if(!s(e))throw Error(o(299));var i=!1,c="",d=g0,v=p0,_=y0,V=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(V=a.formState)),n=Jg(e,1,!0,n,a??null,i,c,V,d,v,_,op),n.context=Fg(null),a=n.current,i=An(),i=bt(i),c=gl(i),c.callback=null,pl(a,c,i),a=i,n.current.lanes=a,rt(n,a),ua(n),e[Zn]=n.current,Of(e),new Js(n)},oo.version="19.2.3",oo}var xp;function Lw(){if(xp)return ed.exports;xp=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(l){console.error(l)}}return t(),ed.exports=Hw(),ed.exports}var Bw=Lw();var vp="popstate";function Uw(t={}){function l(o,s){let{pathname:u,search:f,hash:h}=o.location;return Td("",{pathname:u,search:f,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(o,s){return typeof s=="string"?s:xo(s)}return Yw(l,r,null,t)}function zt(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function aa(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Vw(){return Math.random().toString(36).substring(2,10)}function bp(t,l){return{usr:t.state,key:t.key,idx:l}}function Td(t,l,r=null,o){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?fr(l):l,state:r,key:l&&l.key||o||Vw()}}function xo({pathname:t="/",search:l="",hash:r=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function fr(t){let l={};if(t){let r=t.indexOf("#");r>=0&&(l.hash=t.substring(r),t=t.substring(0,r));let o=t.indexOf("?");o>=0&&(l.search=t.substring(o),t=t.substring(0,o)),t&&(l.pathname=t)}return l}function Yw(t,l,r,o={}){let{window:s=document.defaultView,v5Compat:u=!1}=o,f=s.history,h="POP",g=null,m=x();m==null&&(m=0,f.replaceState({...f.state,idx:m},""));function x(){return(f.state||{idx:null}).idx}function p(){h="POP";let C=x(),A=C==null?null:C-m;m=C,g&&g({action:h,location:N.location,delta:A})}function b(C,A){h="PUSH";let M=Td(N.location,C,A);m=x()+1;let E=bp(M,m),z=N.createHref(M);try{f.pushState(E,"",z)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;s.location.assign(z)}u&&g&&g({action:h,location:N.location,delta:1})}function w(C,A){h="REPLACE";let M=Td(N.location,C,A);m=x();let E=bp(M,m),z=N.createHref(M);f.replaceState(E,"",z),u&&g&&g({action:h,location:N.location,delta:0})}function S(C){return qw(C)}let N={get action(){return h},get location(){return t(s,f)},listen(C){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener(vp,p),g=C,()=>{s.removeEventListener(vp,p),g=null}},createHref(C){return l(s,C)},createURL:S,encodeLocation(C){let A=S(C);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:b,replace:w,go(C){return f.go(C)}};return N}function qw(t,l=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),zt(r,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:xo(t);return o=o.replace(/ $/,"%20"),!l&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Jy(t,l,r="/"){return $w(t,l,r,!1)}function $w(t,l,r,o){let s=typeof l=="string"?fr(l):l,u=Fa(s.pathname||"/",r);if(u==null)return null;let f=Fy(t);Gw(f);let h=null;for(let g=0;h==null&&g<f.length;++g){let m=tS(u);h=Pw(f[g],m,o)}return h}function Fy(t,l=[],r=[],o="",s=!1){let u=(f,h,g=s,m)=>{let x={relativePath:m===void 0?f.path||"":m,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(o)&&g)return;zt(x.relativePath.startsWith(o),`Absolute route path "${x.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(o.length)}let p=Ja([o,x.relativePath]),b=r.concat(x);f.children&&f.children.length>0&&(zt(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Fy(f.children,l,b,p,g)),!(f.path==null&&!f.index)&&l.push({path:p,score:Fw(p,f.index),routesMeta:b})};return t.forEach((f,h)=>{if(f.path===""||!f.path?.includes("?"))u(f,h);else for(let g of Wy(f.path))u(f,h,!0,g)}),l}function Wy(t){let l=t.split("/");if(l.length===0)return[];let[r,...o]=l,s=r.endsWith("?"),u=r.replace(/\?$/,"");if(o.length===0)return s?[u,""]:[u];let f=Wy(o.join("/")),h=[];return h.push(...f.map(g=>g===""?u:[u,g].join("/"))),s&&h.push(...f),h.map(g=>t.startsWith("/")&&g===""?"/":g)}function Gw(t){t.sort((l,r)=>l.score!==r.score?r.score-l.score:Ww(l.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var Xw=/^:[\w-]+$/,Zw=3,Qw=2,Kw=1,Iw=10,Jw=-2,wp=t=>t==="*";function Fw(t,l){let r=t.split("/"),o=r.length;return r.some(wp)&&(o+=Jw),l&&(o+=Qw),r.filter(s=>!wp(s)).reduce((s,u)=>s+(Xw.test(u)?Zw:u===""?Kw:Iw),o)}function Ww(t,l){return t.length===l.length&&t.slice(0,-1).every((o,s)=>o===l[s])?t[t.length-1]-l[l.length-1]:0}function Pw(t,l,r=!1){let{routesMeta:o}=t,s={},u="/",f=[];for(let h=0;h<o.length;++h){let g=o[h],m=h===o.length-1,x=u==="/"?l:l.slice(u.length)||"/",p=wc({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},x),b=g.route;if(!p&&m&&r&&!o[o.length-1].route.index&&(p=wc({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!p)return null;Object.assign(s,p.params),f.push({params:s,pathname:Ja([u,p.pathname]),pathnameBase:rS(Ja([u,p.pathnameBase])),route:b}),p.pathnameBase!=="/"&&(u=Ja([u,p.pathnameBase]))}return f}function wc(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,o]=eS(t.path,t.caseSensitive,t.end),s=l.match(r);if(!s)return null;let u=s[0],f=u.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:o.reduce((m,{paramName:x,isOptional:p},b)=>{if(x==="*"){let S=h[b]||"";f=u.slice(0,u.length-S.length).replace(/(.)\/+$/,"$1")}const w=h[b];return p&&!w?m[x]=void 0:m[x]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:f,pattern:t}}function eS(t,l=!1,r=!0){aa(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let o=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,g)=>(o.push({paramName:h,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(o.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,l?void 0:"i"),o]}function tS(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return aa(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function Fa(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let r=l.endsWith("/")?l.length-1:l.length,o=t.charAt(r);return o&&o!=="/"?null:t.slice(r)||"/"}var nS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aS=t=>nS.test(t);function lS(t,l="/"){let{pathname:r,search:o="",hash:s=""}=typeof t=="string"?fr(t):t,u;if(r)if(aS(r))u=r;else{if(r.includes("//")){let f=r;r=r.replace(/\/\/+/g,"/"),aa(!1,`Pathnames cannot have embedded double slashes - normalizing ${f} -> ${r}`)}r.startsWith("/")?u=Sp(r.substring(1),"/"):u=Sp(r,l)}else u=l;return{pathname:u,search:oS(o),hash:sS(s)}}function Sp(t,l){let r=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function ld(t,l,r,o){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iS(t){return t.filter((l,r)=>r===0||l.route.path&&l.route.path.length>0)}function Py(t){let l=iS(t);return l.map((r,o)=>o===l.length-1?r.pathname:r.pathnameBase)}function ex(t,l,r,o=!1){let s;typeof t=="string"?s=fr(t):(s={...t},zt(!s.pathname||!s.pathname.includes("?"),ld("?","pathname","search",s)),zt(!s.pathname||!s.pathname.includes("#"),ld("#","pathname","hash",s)),zt(!s.search||!s.search.includes("#"),ld("#","search","hash",s)));let u=t===""||s.pathname==="",f=u?"/":s.pathname,h;if(f==null)h=r;else{let p=l.length-1;if(!o&&f.startsWith("..")){let b=f.split("/");for(;b[0]==="..";)b.shift(),p-=1;s.pathname=b.join("/")}h=p>=0?l[p]:"/"}let g=lS(s,h),m=f&&f!=="/"&&f.endsWith("/"),x=(u||f===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(m||x)&&(g.pathname+="/"),g}var Ja=t=>t.join("/").replace(/\/\/+/g,"/"),rS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),oS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,sS=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function cS(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function uS(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tx=["POST","PUT","PATCH","DELETE"];new Set(tx);var fS=["GET",...tx];new Set(fS);var dr=O.createContext(null);dr.displayName="DataRouter";var kc=O.createContext(null);kc.displayName="DataRouterState";O.createContext(!1);var nx=O.createContext({isTransitioning:!1});nx.displayName="ViewTransition";var dS=O.createContext(new Map);dS.displayName="Fetchers";var hS=O.createContext(null);hS.displayName="Await";var la=O.createContext(null);la.displayName="Navigation";var Ro=O.createContext(null);Ro.displayName="Location";var ga=O.createContext({outlet:null,matches:[],isDataRoute:!1});ga.displayName="Route";var lh=O.createContext(null);lh.displayName="RouteError";function mS(t,{relative:l}={}){zt(zo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=O.useContext(la),{hash:s,pathname:u,search:f}=Oo(t,{relative:l}),h=u;return r!=="/"&&(h=u==="/"?r:Ja([r,u])),o.createHref({pathname:h,search:f,hash:s})}function zo(){return O.useContext(Ro)!=null}function Ul(){return zt(zo(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(Ro).location}var ax="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lx(t){O.useContext(la).static||O.useLayoutEffect(t)}function ix(){let{isDataRoute:t}=O.useContext(ga);return t?MS():gS()}function gS(){zt(zo(),"useNavigate() may be used only in the context of a <Router> component.");let t=O.useContext(dr),{basename:l,navigator:r}=O.useContext(la),{matches:o}=O.useContext(ga),{pathname:s}=Ul(),u=JSON.stringify(Py(o)),f=O.useRef(!1);return lx(()=>{f.current=!0}),O.useCallback((g,m={})=>{if(aa(f.current,ax),!f.current)return;if(typeof g=="number"){r.go(g);return}let x=ex(g,JSON.parse(u),s,m.relative==="path");t==null&&l!=="/"&&(x.pathname=x.pathname==="/"?l:Ja([l,x.pathname])),(m.replace?r.replace:r.push)(x,m.state,m)},[l,r,u,s,t])}O.createContext(null);function rx(){let{matches:t}=O.useContext(ga),l=t[t.length-1];return l?l.params:{}}function Oo(t,{relative:l}={}){let{matches:r}=O.useContext(ga),{pathname:o}=Ul(),s=JSON.stringify(Py(r));return O.useMemo(()=>ex(t,JSON.parse(s),o,l==="path"),[t,s,o,l])}function pS(t,l){return ox(t,l)}function ox(t,l,r,o,s){zt(zo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=O.useContext(la),{matches:f}=O.useContext(ga),h=f[f.length-1],g=h?h.params:{},m=h?h.pathname:"/",x=h?h.pathnameBase:"/",p=h&&h.route;{let M=p&&p.path||"";sx(m,!p||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${M}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let b=Ul(),w;if(l){let M=typeof l=="string"?fr(l):l;zt(x==="/"||M.pathname?.startsWith(x),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${x}" but pathname "${M.pathname}" was given in the \`location\` prop.`),w=M}else w=b;let S=w.pathname||"/",N=S;if(x!=="/"){let M=x.replace(/^\//,"").split("/");N="/"+S.replace(/^\//,"").split("/").slice(M.length).join("/")}let C=Jy(t,{pathname:N});aa(p||C!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),aa(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=wS(C&&C.map(M=>Object.assign({},M,{params:Object.assign({},g,M.params),pathname:Ja([x,u.encodeLocation?u.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?x:Ja([x,u.encodeLocation?u.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),f,r,o,s);return l&&A?O.createElement(Ro.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},A):A}function yS(){let t=CS(),l=cS(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:u},"ErrorBoundary")," or"," ",O.createElement("code",{style:u},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},l),r?O.createElement("pre",{style:s},r):null,f)}var xS=O.createElement(yS,null),vS=class extends O.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?O.createElement(ga.Provider,{value:this.props.routeContext},O.createElement(lh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function bS({routeContext:t,match:l,children:r}){let o=O.useContext(dr);return o&&o.static&&o.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=l.route.id),O.createElement(ga.Provider,{value:t},r)}function wS(t,l=[],r=null,o=null,s=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(l.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let u=t,f=r?.errors;if(f!=null){let x=u.findIndex(p=>p.route.id&&f?.[p.route.id]!==void 0);zt(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),u=u.slice(0,Math.min(u.length,x+1))}let h=!1,g=-1;if(r)for(let x=0;x<u.length;x++){let p=u[x];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(g=x),p.route.id){let{loaderData:b,errors:w}=r,S=p.route.loader&&!b.hasOwnProperty(p.route.id)&&(!w||w[p.route.id]===void 0);if(p.route.lazy||S){h=!0,g>=0?u=u.slice(0,g+1):u=[u[0]];break}}}let m=r&&o?(x,p)=>{o(x,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:uS(r.matches),errorInfo:p})}:void 0;return u.reduceRight((x,p,b)=>{let w,S=!1,N=null,C=null;r&&(w=f&&p.route.id?f[p.route.id]:void 0,N=p.route.errorElement||xS,h&&(g<0&&b===0?(sx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,C=null):g===b&&(S=!0,C=p.route.hydrateFallbackElement||null)));let A=l.concat(u.slice(0,b+1)),M=()=>{let E;return w?E=N:S?E=C:p.route.Component?E=O.createElement(p.route.Component,null):p.route.element?E=p.route.element:E=x,O.createElement(bS,{match:p,routeContext:{outlet:x,matches:A,isDataRoute:r!=null},children:E})};return r&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?O.createElement(vS,{location:r.location,revalidation:r.revalidation,component:N,error:w,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:m}):M()},null)}function ih(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function SS(t){let l=O.useContext(dr);return zt(l,ih(t)),l}function ES(t){let l=O.useContext(kc);return zt(l,ih(t)),l}function _S(t){let l=O.useContext(ga);return zt(l,ih(t)),l}function rh(t){let l=_S(t),r=l.matches[l.matches.length-1];return zt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function NS(){return rh("useRouteId")}function CS(){let t=O.useContext(lh),l=ES("useRouteError"),r=rh("useRouteError");return t!==void 0?t:l.errors?.[r]}function MS(){let{router:t}=SS("useNavigate"),l=rh("useNavigate"),r=O.useRef(!1);return lx(()=>{r.current=!0}),O.useCallback(async(s,u={})=>{aa(r.current,ax),r.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:l,...u}))},[t,l])}var Ep={};function sx(t,l,r){!l&&!Ep[t]&&(Ep[t]=!0,aa(!1,r))}O.memo(AS);function AS({routes:t,future:l,state:r,unstable_onError:o}){return ox(t,void 0,r,o,l)}function ho(t){zt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function TS({basename:t="/",children:l=null,location:r,navigationType:o="POP",navigator:s,static:u=!1,unstable_useTransitions:f}){zt(!zo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),g=O.useMemo(()=>({basename:h,navigator:s,static:u,unstable_useTransitions:f,future:{}}),[h,s,u,f]);typeof r=="string"&&(r=fr(r));let{pathname:m="/",search:x="",hash:p="",state:b=null,key:w="default"}=r,S=O.useMemo(()=>{let N=Fa(m,h);return N==null?null:{location:{pathname:N,search:x,hash:p,state:b,key:w},navigationType:o}},[h,m,x,p,b,w,o]);return aa(S!=null,`<Router basename="${h}"> is not able to match the URL "${m}${x}${p}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:O.createElement(la.Provider,{value:g},O.createElement(Ro.Provider,{children:l,value:S}))}function RS({children:t,location:l}){return pS(Rd(t),l)}function Rd(t,l=[]){let r=[];return O.Children.forEach(t,(o,s)=>{if(!O.isValidElement(o))return;let u=[...l,s];if(o.type===O.Fragment){r.push.apply(r,Rd(o.props.children,u));return}zt(o.type===ho,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),zt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let f={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(f.children=Rd(o.props.children,u)),r.push(f)}),r}var mc="get",gc="application/x-www-form-urlencoded";function Hc(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function zS(t){return Hc(t)&&t.tagName.toLowerCase()==="button"}function OS(t){return Hc(t)&&t.tagName.toLowerCase()==="form"}function jS(t){return Hc(t)&&t.tagName.toLowerCase()==="input"}function DS(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function kS(t,l){return t.button===0&&(!l||l==="_self")&&!DS(t)}var Ws=null;function HS(){if(Ws===null)try{new FormData(document.createElement("form"),0),Ws=!1}catch{Ws=!0}return Ws}var LS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function id(t){return t!=null&&!LS.has(t)?(aa(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gc}"`),null):t}function BS(t,l){let r,o,s,u,f;if(OS(t)){let h=t.getAttribute("action");o=h?Fa(h,l):null,r=t.getAttribute("method")||mc,s=id(t.getAttribute("enctype"))||gc,u=new FormData(t)}else if(zS(t)||jS(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=t.getAttribute("formaction")||h.getAttribute("action");if(o=g?Fa(g,l):null,r=t.getAttribute("formmethod")||h.getAttribute("method")||mc,s=id(t.getAttribute("formenctype"))||id(h.getAttribute("enctype"))||gc,u=new FormData(h,t),!HS()){let{name:m,type:x,value:p}=t;if(x==="image"){let b=m?`${m}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else m&&u.append(m,p)}}else{if(Hc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=mc,o=null,s=gc,f=t}return u&&s==="text/plain"&&(f=u,u=void 0),{action:o,method:r.toLowerCase(),encType:s,formData:u,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oh(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function US(t,l,r){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return o.pathname==="/"?o.pathname=`_root.${r}`:l&&Fa(o.pathname,l)==="/"?o.pathname=`${l.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function VS(t,l){if(t.id in l)return l[t.id];try{let r=await import(t.module);return l[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function YS(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function qS(t,l,r){let o=await Promise.all(t.map(async s=>{let u=l.routes[s.route.id];if(u){let f=await VS(u,r);return f.links?f.links():[]}return[]}));return ZS(o.flat(1).filter(YS).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function _p(t,l,r,o,s,u){let f=(g,m)=>r[m]?g.route.id!==r[m].route.id:!0,h=(g,m)=>r[m].pathname!==g.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==g.params["*"];return u==="assets"?l.filter((g,m)=>f(g,m)||h(g,m)):u==="data"?l.filter((g,m)=>{let x=o.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(f(g,m)||h(g,m))return!0;if(g.route.shouldRevalidate){let p=g.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function $S(t,l,{includeHydrateFallback:r}={}){return GS(t.map(o=>{let s=l.routes[o.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function GS(t){return[...new Set(t)]}function XS(t){let l={},r=Object.keys(t).sort();for(let o of r)l[o]=t[o];return l}function ZS(t,l){let r=new Set;return new Set(l),t.reduce((o,s)=>{let u=JSON.stringify(XS(s));return r.has(u)||(r.add(u),o.push({key:u,link:s})),o},[])}function cx(){let t=O.useContext(dr);return oh(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function QS(){let t=O.useContext(kc);return oh(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var sh=O.createContext(void 0);sh.displayName="FrameworkContext";function ux(){let t=O.useContext(sh);return oh(t,"You must render this element inside a <HydratedRouter> element"),t}function KS(t,l){let r=O.useContext(sh),[o,s]=O.useState(!1),[u,f]=O.useState(!1),{onFocus:h,onBlur:g,onMouseEnter:m,onMouseLeave:x,onTouchStart:p}=l,b=O.useRef(null);O.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let N=A=>{A.forEach(M=>{f(M.isIntersecting)})},C=new IntersectionObserver(N,{threshold:.5});return b.current&&C.observe(b.current),()=>{C.disconnect()}}},[t]),O.useEffect(()=>{if(o){let N=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(N)}}},[o]);let w=()=>{s(!0)},S=()=>{s(!1),f(!1)};return r?t!=="intent"?[u,b,{}]:[u,b,{onFocus:so(h,w),onBlur:so(g,S),onMouseEnter:so(m,w),onMouseLeave:so(x,S),onTouchStart:so(p,w)}]:[!1,b,{}]}function so(t,l){return r=>{t&&t(r),r.defaultPrevented||l(r)}}function IS({page:t,...l}){let{router:r}=cx(),o=O.useMemo(()=>Jy(r.routes,t,r.basename),[r.routes,t,r.basename]);return o?O.createElement(FS,{page:t,matches:o,...l}):null}function JS(t){let{manifest:l,routeModules:r}=ux(),[o,s]=O.useState([]);return O.useEffect(()=>{let u=!1;return qS(t,l,r).then(f=>{u||s(f)}),()=>{u=!0}},[t,l,r]),o}function FS({page:t,matches:l,...r}){let o=Ul(),{manifest:s,routeModules:u}=ux(),{basename:f}=cx(),{loaderData:h,matches:g}=QS(),m=O.useMemo(()=>_p(t,l,g,s,o,"data"),[t,l,g,s,o]),x=O.useMemo(()=>_p(t,l,g,s,o,"assets"),[t,l,g,s,o]),p=O.useMemo(()=>{if(t===o.pathname+o.search+o.hash)return[];let S=new Set,N=!1;if(l.forEach(A=>{let M=s.routes[A.route.id];!M||!M.hasLoader||(!m.some(E=>E.route.id===A.route.id)&&A.route.id in h&&u[A.route.id]?.shouldRevalidate||M.hasClientLoader?N=!0:S.add(A.route.id))}),S.size===0)return[];let C=US(t,f,"data");return N&&S.size>0&&C.searchParams.set("_routes",l.filter(A=>S.has(A.route.id)).map(A=>A.route.id).join(",")),[C.pathname+C.search]},[f,h,o,s,m,l,t,u]),b=O.useMemo(()=>$S(x,s),[x,s]),w=JS(x);return O.createElement(O.Fragment,null,p.map(S=>O.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),b.map(S=>O.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),w.map(({key:S,link:N})=>O.createElement("link",{key:S,nonce:r.nonce,...N})))}function WS(...t){return l=>{t.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var fx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fx&&(window.__reactRouterVersion="7.10.1")}catch{}function PS({basename:t,children:l,unstable_useTransitions:r,window:o}){let s=O.useRef();s.current==null&&(s.current=Uw({window:o,v5Compat:!0}));let u=s.current,[f,h]=O.useState({action:u.action,location:u.location}),g=O.useCallback(m=>{r===!1?h(m):O.startTransition(()=>h(m))},[r]);return O.useLayoutEffect(()=>u.listen(g),[u,g]),O.createElement(TS,{basename:t,children:l,location:f.location,navigationType:f.action,navigator:u,unstable_useTransitions:r===!0})}var dx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gn=O.forwardRef(function({onClick:l,discover:r="render",prefetch:o="none",relative:s,reloadDocument:u,replace:f,state:h,target:g,to:m,preventScrollReset:x,viewTransition:p,...b},w){let{basename:S,unstable_useTransitions:N}=O.useContext(la),C=typeof m=="string"&&dx.test(m),A,M=!1;if(typeof m=="string"&&C&&(A=m,fx))try{let ae=new URL(window.location.href),Q=m.startsWith("//")?new URL(ae.protocol+m):new URL(m),W=Fa(Q.pathname,S);Q.origin===ae.origin&&W!=null?m=W+Q.search+Q.hash:M=!0}catch{aa(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let E=mS(m,{relative:s}),[z,B,H]=KS(o,b),L=aE(m,{replace:f,state:h,target:g,preventScrollReset:x,relative:s,viewTransition:p,unstable_useTransitions:N});function q(ae){l&&l(ae),ae.defaultPrevented||L(ae)}let X=O.createElement("a",{...b,...H,href:A||E,onClick:M||u?l:q,ref:WS(w,B),target:g,"data-discover":!C&&r==="render"?"true":void 0});return z&&!C?O.createElement(O.Fragment,null,X,O.createElement(IS,{page:E})):X});Gn.displayName="Link";var eE=O.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:o="",end:s=!1,style:u,to:f,viewTransition:h,children:g,...m},x){let p=Oo(f,{relative:m.relative}),b=Ul(),w=O.useContext(kc),{navigator:S,basename:N}=O.useContext(la),C=w!=null&&sE(p)&&h===!0,A=S.encodeLocation?S.encodeLocation(p).pathname:p.pathname,M=b.pathname,E=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;r||(M=M.toLowerCase(),E=E?E.toLowerCase():null,A=A.toLowerCase()),E&&N&&(E=Fa(E,N)||E);const z=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let B=M===A||!s&&M.startsWith(A)&&M.charAt(z)==="/",H=E!=null&&(E===A||!s&&E.startsWith(A)&&E.charAt(A.length)==="/"),L={isActive:B,isPending:H,isTransitioning:C},q=B?l:void 0,X;typeof o=="function"?X=o(L):X=[o,B?"active":null,H?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let ae=typeof u=="function"?u(L):u;return O.createElement(Gn,{...m,"aria-current":q,className:X,ref:x,style:ae,to:f,viewTransition:h},typeof g=="function"?g(L):g)});eE.displayName="NavLink";var tE=O.forwardRef(({discover:t="render",fetcherKey:l,navigate:r,reloadDocument:o,replace:s,state:u,method:f=mc,action:h,onSubmit:g,relative:m,preventScrollReset:x,viewTransition:p,...b},w)=>{let{unstable_useTransitions:S}=O.useContext(la),N=rE(),C=oE(h,{relative:m}),A=f.toLowerCase()==="get"?"get":"post",M=typeof h=="string"&&dx.test(h),E=z=>{if(g&&g(z),z.defaultPrevented)return;z.preventDefault();let B=z.nativeEvent.submitter,H=B?.getAttribute("formmethod")||f,L=()=>N(B||z.currentTarget,{fetcherKey:l,method:H,navigate:r,replace:s,state:u,relative:m,preventScrollReset:x,viewTransition:p});S&&r!==!1?O.startTransition(()=>L()):L()};return O.createElement("form",{ref:w,method:A,action:C,onSubmit:o?g:E,...b,"data-discover":!M&&t==="render"?"true":void 0})});tE.displayName="Form";function nE(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hx(t){let l=O.useContext(dr);return zt(l,nE(t)),l}function aE(t,{target:l,replace:r,state:o,preventScrollReset:s,relative:u,viewTransition:f,unstable_useTransitions:h}={}){let g=ix(),m=Ul(),x=Oo(t,{relative:u});return O.useCallback(p=>{if(kS(p,l)){p.preventDefault();let b=r!==void 0?r:xo(m)===xo(x),w=()=>g(t,{replace:b,state:o,preventScrollReset:s,relative:u,viewTransition:f});h?O.startTransition(()=>w()):w()}},[m,g,x,r,o,l,t,s,u,f,h])}var lE=0,iE=()=>`__${String(++lE)}__`;function rE(){let{router:t}=hx("useSubmit"),{basename:l}=O.useContext(la),r=NS(),o=t.fetch,s=t.navigate;return O.useCallback(async(u,f={})=>{let{action:h,method:g,encType:m,formData:x,body:p}=BS(u,l);if(f.navigate===!1){let b=f.fetcherKey||iE();await o(b,r,f.action||h,{preventScrollReset:f.preventScrollReset,formData:x,body:p,formMethod:f.method||g,formEncType:f.encType||m,flushSync:f.flushSync})}else await s(f.action||h,{preventScrollReset:f.preventScrollReset,formData:x,body:p,formMethod:f.method||g,formEncType:f.encType||m,replace:f.replace,state:f.state,fromRouteId:r,flushSync:f.flushSync,viewTransition:f.viewTransition})},[o,s,l,r])}function oE(t,{relative:l}={}){let{basename:r}=O.useContext(la),o=O.useContext(ga);zt(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),u={...Oo(t||".",{relative:l})},f=Ul();if(t==null){u.search=f.search;let h=new URLSearchParams(u.search),g=h.getAll("index");if(g.some(x=>x==="")){h.delete("index"),g.filter(p=>p).forEach(p=>h.append("index",p));let x=h.toString();u.search=x?`?${x}`:""}}return(!t||t===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Ja([r,u.pathname])),xo(u)}function sE(t,{relative:l}={}){let r=O.useContext(nx);zt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=hx("useViewTransitionState"),s=Oo(t,{relative:l});if(!r.isTransitioning)return!1;let u=Fa(r.currentLocation.pathname,o)||r.currentLocation.pathname,f=Fa(r.nextLocation.pathname,o)||r.nextLocation.pathname;return wc(s.pathname,f)!=null||wc(s.pathname,u)!=null}Iy();const cE=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uE=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,r,o)=>o?o.toUpperCase():r.toLowerCase()),Np=t=>{const l=uE(t);return l.charAt(0).toUpperCase()+l.slice(1)},mx=(...t)=>t.filter((l,r,o)=>!!l&&l.trim()!==""&&o.indexOf(l)===r).join(" ").trim(),fE=t=>{for(const l in t)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};var dE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hE=O.forwardRef(({color:t="currentColor",size:l=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:u,iconNode:f,...h},g)=>O.createElement("svg",{ref:g,...dE,width:l,height:l,stroke:t,strokeWidth:o?Number(r)*24/Number(l):r,className:mx("lucide",s),...!u&&!fE(h)&&{"aria-hidden":"true"},...h},[...f.map(([m,x])=>O.createElement(m,x)),...Array.isArray(u)?u:[u]]));const ut=(t,l)=>{const r=O.forwardRef(({className:o,...s},u)=>O.createElement(hE,{ref:u,iconNode:l,className:mx(`lucide-${cE(Np(t))}`,`lucide-${t}`,o),...s}));return r.displayName=Np(t),r};const mE=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],jo=ut("activity",mE);const gE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],pE=ut("arrow-right",gE);const yE=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],xE=ut("ban",yE);const vE=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Cp=ut("box",vE);const bE=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],wE=ut("calendar",bE);const SE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],EE=ut("chevron-down",SE);const _E=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ch=ut("chevron-left",_E);const NE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],CE=ut("chevron-right",NE);const ME=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],AE=ut("chevron-up",ME);const TE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Wa=ut("circle-alert",TE);const RE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}],["path",{d:"M8 12h8",key:"1wcyev"}]],zE=ut("circle-arrow-right",RE);const OE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],jE=ut("circle-check-big",OE);const DE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],gx=ut("circle-check",DE);const kE=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Sc=ut("clock",kE);const HE=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],LE=ut("code",HE);const BE=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],px=ut("funnel",BE);const UE=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],VE=ut("gauge",UE);const YE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],qE=ut("history",YE);const $E=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],GE=ut("layout-dashboard",$E);const XE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ZE=ut("lock",XE);const QE=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],KE=ut("octagon-x",QE);const IE=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],yx=ut("play",IE);const JE=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],FE=ut("radio",JE);const WE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Mp=ut("rotate-ccw",WE);const PE=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],uh=ut("search",PE);const e2=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],t2=ut("skip-forward",e2);const n2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a2=ut("terminal",n2);const l2=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],i2=ut("timer",l2);const r2=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],o2=ut("zap",r2);var rd={exports:{}},od={};var Ap;function s2(){if(Ap)return od;Ap=1;var t=To();function l(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var r=typeof Object.is=="function"?Object.is:l,o=t.useState,s=t.useEffect,u=t.useLayoutEffect,f=t.useDebugValue;function h(p,b){var w=b(),S=o({inst:{value:w,getSnapshot:b}}),N=S[0].inst,C=S[1];return u(function(){N.value=w,N.getSnapshot=b,g(N)&&C({inst:N})},[p,w,b]),s(function(){return g(N)&&C({inst:N}),p(function(){g(N)&&C({inst:N})})},[p]),f(w),w}function g(p){var b=p.getSnapshot;p=p.value;try{var w=b();return!r(p,w)}catch{return!0}}function m(p,b){return b()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return od.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:x,od}var Tp;function xx(){return Tp||(Tp=1,rd.exports=s2()),rd.exports}var Rp=xx();const vx=0,bx=1,wx=2,zp=3;var Op=Object.prototype.hasOwnProperty;function zd(t,l){var r,o;if(t===l)return!0;if(t&&l&&(r=t.constructor)===l.constructor){if(r===Date)return t.getTime()===l.getTime();if(r===RegExp)return t.toString()===l.toString();if(r===Array){if((o=t.length)===l.length)for(;o--&&zd(t[o],l[o]););return o===-1}if(!r||typeof t=="object"){o=0;for(r in t)if(Op.call(t,r)&&++o&&!Op.call(l,r)||!(r in l)||!zd(t[r],l[r]))return!1;return Object.keys(l).length===o}}return t!==t&&l!==l}const Za=new WeakMap,Ka=()=>{},un=Ka(),Od=Object,et=t=>t===un,da=t=>typeof t=="function",Ll=(t,l)=>({...t,...l}),Sx=t=>da(t.then),sd={},Ps={},fh="undefined",Do=typeof window!=fh,jd=typeof document!=fh,c2=Do&&"Deno"in window,u2=()=>Do&&typeof window.requestAnimationFrame!=fh,Ex=(t,l)=>{const r=Za.get(t);return[()=>!et(l)&&t.get(l)||sd,o=>{if(!et(l)){const s=t.get(l);l in Ps||(Ps[l]=s),r[5](l,Ll(s,o),s||sd)}},r[6],()=>!et(l)&&l in Ps?Ps[l]:!et(l)&&t.get(l)||sd]};let Dd=!0;const f2=()=>Dd,[kd,Hd]=Do&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ka,Ka],d2=()=>{const t=jd&&document.visibilityState;return et(t)||t!=="hidden"},h2=t=>(jd&&document.addEventListener("visibilitychange",t),kd("focus",t),()=>{jd&&document.removeEventListener("visibilitychange",t),Hd("focus",t)}),m2=t=>{const l=()=>{Dd=!0,t()},r=()=>{Dd=!1};return kd("online",l),kd("offline",r),()=>{Hd("online",l),Hd("offline",r)}},g2={isOnline:f2,isVisible:d2},p2={initFocus:h2,initReconnect:m2},jp=!Dc.useId,tr=!Do||c2,y2=t=>u2()?window.requestAnimationFrame(t):setTimeout(t,1),cd=tr?O.useEffect:O.useLayoutEffect,ud=typeof navigator<"u"&&navigator.connection,Dp=!tr&&ud&&(["slow-2g","2g"].includes(ud.effectiveType)||ud.saveData),ec=new WeakMap,x2=t=>Od.prototype.toString.call(t),fd=(t,l)=>t===`[object ${l}]`;let v2=0;const Ld=t=>{const l=typeof t,r=x2(t),o=fd(r,"Date"),s=fd(r,"RegExp"),u=fd(r,"Object");let f,h;if(Od(t)===t&&!o&&!s){if(f=ec.get(t),f)return f;if(f=++v2+"~",ec.set(t,f),Array.isArray(t)){for(f="@",h=0;h<t.length;h++)f+=Ld(t[h])+",";ec.set(t,f)}if(u){f="#";const g=Od.keys(t).sort();for(;!et(h=g.pop());)et(t[h])||(f+=h+":"+Ld(t[h])+",");ec.set(t,f)}}else f=o?t.toJSON():l=="symbol"?t.toString():l=="string"?JSON.stringify(t):""+t;return f},dh=t=>{if(da(t))try{t=t()}catch{t=""}const l=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?Ld(t):"",[t,l]};let b2=0;const Bd=()=>++b2;async function _x(...t){const[l,r,o,s]=t,u=Ll({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let f=u.populateCache;const h=u.rollbackOnError;let g=u.optimisticData;const m=b=>typeof h=="function"?h(b):h!==!1,x=u.throwOnError;if(da(r)){const b=r,w=[],S=l.keys();for(const N of S)!/^\$(inf|sub)\$/.test(N)&&b(l.get(N)._k)&&w.push(N);return Promise.all(w.map(p))}return p(r);async function p(b){const[w]=dh(b);if(!w)return;const[S,N]=Ex(l,w),[C,A,M,E]=Za.get(l),z=()=>{const j=C[w];return(da(u.revalidate)?u.revalidate(S().data,b):u.revalidate!==!1)&&(delete M[w],delete E[w],j&&j[0])?j[0](wx).then(()=>S().data):S().data};if(t.length<3)return z();let B=o,H,L=!1;const q=Bd();A[w]=[q,0];const X=!et(g),ae=S(),Q=ae.data,W=ae._c,ie=et(W)?Q:W;if(X&&(g=da(g)?g(ie,Q):g,N({data:g,_c:ie})),da(B))try{B=B(ie)}catch(j){H=j,L=!0}if(B&&Sx(B))if(B=await B.catch(j=>{H=j,L=!0}),q!==A[w][0]){if(L)throw H;return B}else L&&X&&m(H)&&(f=!0,N({data:ie,_c:un}));if(f&&!L)if(da(f)){const j=f(B,ie);N({data:j,error:un,_c:un})}else N({data:B,error:un,_c:un});if(A[w][1]=Bd(),Promise.resolve(z()).then(()=>{N({_c:un})}),L){if(x)throw H;return}return B}}const kp=(t,l)=>{for(const r in t)t[r][0]&&t[r][0](l)},w2=(t,l)=>{if(!Za.has(t)){const r=Ll(p2,l),o=Object.create(null),s=_x.bind(un,t);let u=Ka;const f=Object.create(null),h=(x,p)=>{const b=f[x]||[];return f[x]=b,b.push(p),()=>b.splice(b.indexOf(p),1)},g=(x,p,b)=>{t.set(x,p);const w=f[x];if(w)for(const S of w)S(p,b)},m=()=>{if(!Za.has(t)&&(Za.set(t,[o,Object.create(null),Object.create(null),Object.create(null),s,g,h]),!tr)){const x=r.initFocus(setTimeout.bind(un,kp.bind(un,o,vx))),p=r.initReconnect(setTimeout.bind(un,kp.bind(un,o,bx)));u=()=>{x&&x(),p&&p(),Za.delete(t)}}};return m(),[t,s,m,u]}return[t,Za.get(t)[4]]},S2=(t,l,r,o,s)=>{const u=r.errorRetryCount,f=s.retryCount,h=~~((Math.random()+.5)*(1<<(f<8?f:8)))*r.errorRetryInterval;!et(u)&&f>u||setTimeout(o,h,s)},E2=zd,[Nx,Ud]=w2(new Map),_2=Ll({onLoadingSlow:Ka,onSuccess:Ka,onError:Ka,onErrorRetry:S2,onDiscarded:Ka,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Dp?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Dp?5e3:3e3,compare:E2,isPaused:()=>!1,cache:Nx,mutate:Ud,fallback:{}},g2),N2=(t,l)=>{const r=Ll(t,l);if(l){const{use:o,fallback:s}=t,{use:u,fallback:f}=l;o&&u&&(r.use=o.concat(u)),s&&f&&(r.fallback=Ll(s,f))}return r},C2=O.createContext({}),M2="$inf$",Cx=Do&&window.__SWR_DEVTOOLS_USE__,A2=Cx?window.__SWR_DEVTOOLS_USE__:[],T2=()=>{Cx&&(window.__SWR_DEVTOOLS_REACT__=Dc)},R2=t=>da(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],z2=()=>{const t=O.useContext(C2);return O.useMemo(()=>Ll(_2,t),[t])},O2=t=>(l,r,o)=>t(l,r&&((...u)=>{const[f]=dh(l),[,,,h]=Za.get(Nx);if(f.startsWith(M2))return r(...u);const g=h[f];return et(g)?r(...u):(delete h[f],g)}),o),j2=A2.concat(O2),D2=t=>function(...r){const o=z2(),[s,u,f]=R2(r),h=N2(o,f);let g=t;const{use:m}=h,x=(m||[]).concat(j2);for(let p=x.length;p--;)g=x[p](g);return g(s,u||h.fetcher||null,h)},k2=(t,l,r)=>{const o=l[t]||(l[t]=[]);return o.push(r),()=>{const s=o.indexOf(r);s>=0&&(o[s]=o[o.length-1],o.pop())}};T2();const dd=Dc.use||(t=>{switch(t.status){case"pending":throw t;case"fulfilled":return t.value;case"rejected":throw t.reason;default:throw t.status="pending",t.then(l=>{t.status="fulfilled",t.value=l},l=>{t.status="rejected",t.reason=l}),t}}),hd={dedupe:!0},Hp=Promise.resolve(un),H2=(t,l,r)=>{const{cache:o,compare:s,suspense:u,fallbackData:f,revalidateOnMount:h,revalidateIfStale:g,refreshInterval:m,refreshWhenHidden:x,refreshWhenOffline:p,keepPreviousData:b,strictServerPrefetchWarning:w}=r,[S,N,C,A]=Za.get(o),[M,E]=dh(t),z=O.useRef(!1),B=O.useRef(!1),H=O.useRef(M),L=O.useRef(l),q=O.useRef(r),X=()=>q.current,ae=()=>X().isVisible()&&X().isOnline(),[Q,W,ie,j]=Ex(o,M),Z=O.useRef({}).current,T=et(f)?et(r.fallback)?un:r.fallback[M]:f,k=(Me,Le)=>{for(const We in Z){const Ge=We;if(Ge==="data"){if(!s(Me[Ge],Le[Ge])&&(!et(Me[Ge])||!s(de,Le[Ge])))return!1}else if(Le[Ge]!==Me[Ge])return!1}return!0},D=O.useMemo(()=>{const Me=!M||!l?!1:et(h)?X().isPaused()||u?!1:g!==!1:h,Le=vt=>{const Je=Ll(vt);return delete Je._k,Me?{isValidating:!0,isLoading:!0,...Je}:Je},We=Q(),Ge=j(),xt=Le(We),Qt=We===Ge?xt:Le(Ge);let gt=xt;return[()=>{const vt=Le(Q());return k(vt,gt)?(gt.data=vt.data,gt.isLoading=vt.isLoading,gt.isValidating=vt.isValidating,gt.error=vt.error,gt):(gt=vt,vt)},()=>Qt]},[o,M]),G=Rp.useSyncExternalStore(O.useCallback(Me=>ie(M,(Le,We)=>{k(We,Le)||Me()}),[o,M]),D[0],D[1]),te=!z.current,R=S[M]&&S[M].length>0,U=G.data,I=et(U)?T&&Sx(T)?dd(T):T:U,P=G.error,ue=O.useRef(I),de=b?et(U)?et(ue.current)?I:ue.current:U:I,se=M&&et(I),fe=!tr&&Rp.useSyncExternalStore(()=>Ka,()=>!1,()=>!0);w&&fe&&!u&&se&&console.warn(`Missing pre-initiated data for serialized key "${M}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const me=R&&!et(P)?!1:te&&!et(h)?h:X().isPaused()?!1:u?et(I)?!1:g:et(I)||g,Te=!!(M&&l&&te&&me),je=et(G.isValidating)?Te:G.isValidating,Se=et(G.isLoading)?Te:G.isLoading,Re=O.useCallback(async Me=>{const Le=L.current;if(!M||!Le||B.current||X().isPaused())return!1;let We,Ge,xt=!0;const Qt=Me||{},gt=!C[M]||!Qt.dedupe,vt=()=>jp?!B.current&&M===H.current&&z.current:M===H.current,Je={isValidating:!1,isLoading:!1},zn=()=>{W(Je)},Gt=()=>{const Ct=C[M];Ct&&Ct[1]===Ge&&delete C[M]},ln={isValidating:!0};et(Q().data)&&(ln.isLoading=!0);try{if(gt&&(W(ln),r.loadingTimeout&&et(Q().data)&&setTimeout(()=>{xt&&vt()&&X().onLoadingSlow(M,r)},r.loadingTimeout),C[M]=[Le(E),Bd()]),[We,Ge]=C[M],We=await We,gt&&setTimeout(Gt,r.dedupingInterval),!C[M]||C[M][1]!==Ge)return gt&&vt()&&X().onDiscarded(M),!1;Je.error=un;const Ct=N[M];if(!et(Ct)&&(Ge<=Ct[0]||Ge<=Ct[1]||Ct[1]===0))return zn(),gt&&vt()&&X().onDiscarded(M),!1;const fn=Q().data;Je.data=s(fn,We)?fn:We,gt&&vt()&&X().onSuccess(We,M,r)}catch(Ct){Gt();const fn=X(),{shouldRetryOnError:On}=fn;fn.isPaused()||(Je.error=Ct,gt&&vt()&&(fn.onError(Ct,M,fn),(On===!0||da(On)&&On(Ct))&&(!X().revalidateOnFocus||!X().revalidateOnReconnect||ae())&&fn.onErrorRetry(Ct,M,fn,Vl=>{const ya=S[M];ya&&ya[0]&&ya[0](zp,Vl)},{retryCount:(Qt.retryCount||0)+1,dedupe:!0})))}return xt=!1,zn(),!0},[M,o]),Ve=O.useCallback((...Me)=>_x(o,H.current,...Me),[]);if(cd(()=>{L.current=l,q.current=r,et(U)||(ue.current=U)}),cd(()=>{if(!M)return;const Me=Re.bind(un,hd);let Le=0;X().revalidateOnFocus&&(Le=Date.now()+X().focusThrottleInterval);const Ge=k2(M,S,(xt,Qt={})=>{if(xt==vx){const gt=Date.now();X().revalidateOnFocus&>>Le&&ae()&&(Le=gt+X().focusThrottleInterval,Me())}else if(xt==bx)X().revalidateOnReconnect&&ae()&&Me();else{if(xt==wx)return Re();if(xt==zp)return Re(Qt)}});return B.current=!1,H.current=M,z.current=!0,W({_k:E}),me&&(C[M]||(et(I)||tr?Me():y2(Me))),()=>{B.current=!0,Ge()}},[M]),cd(()=>{let Me;function Le(){const Ge=da(m)?m(Q().data):m;Ge&&Me!==-1&&(Me=setTimeout(We,Ge))}function We(){!Q().error&&(x||X().isVisible())&&(p||X().isOnline())?Re(hd).then(Le):Le()}return Le(),()=>{Me&&(clearTimeout(Me),Me=-1)}},[m,x,p,M]),O.useDebugValue(de),u){if(!jp&&tr&&se)throw new Error("Fallback data is required when using Suspense in SSR.");se&&(L.current=l,q.current=r,B.current=!1);const Me=A[M],Le=!et(Me)&&se?Ve(Me):Hp;if(dd(Le),!et(P)&&se)throw P;const We=se?Re(hd):Hp;!et(de)&&se&&(We.status="fulfilled",We.value=!0),dd(We)}return{mutate:Ve,get data(){return Z.data=!0,de},get error(){return Z.error=!0,P},get isValidating(){return Z.isValidating=!0,je},get isLoading(){return Z.isLoading=!0,Se}}},Lc=D2(H2);function Mx(t){var l,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(l=0;l<s;l++)t[l]&&(r=Mx(t[l]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function L2(){for(var t,l,r=0,o="",s=arguments.length;r<s;r++)(t=arguments[r])&&(l=Mx(t))&&(o&&(o+=" "),o+=l);return o}const B2=(t,l)=>{const r=new Array(t.length+l.length);for(let o=0;o<t.length;o++)r[o]=t[o];for(let o=0;o<l.length;o++)r[t.length+o]=l[o];return r},U2=(t,l)=>({classGroupId:t,validator:l}),Ax=(t=new Map,l=null,r)=>({nextPart:t,validators:l,classGroupId:r}),Ec="-",Lp=[],V2="arbitrary..",Y2=t=>{const l=$2(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return q2(f);const h=f.split(Ec),g=h[0]===""&&h.length>1?1:0;return Tx(h,g,l)},getConflictingClassGroupIds:(f,h)=>{if(h){const g=o[f],m=r[f];return g?m?B2(m,g):g:m||Lp}return r[f]||Lp}}},Tx=(t,l,r)=>{if(t.length-l===0)return r.classGroupId;const s=t[l],u=r.nextPart.get(s);if(u){const m=Tx(t,l+1,u);if(m)return m}const f=r.validators;if(f===null)return;const h=l===0?t.join(Ec):t.slice(l).join(Ec),g=f.length;for(let m=0;m<g;m++){const x=f[m];if(x.validator(h))return x.classGroupId}},q2=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=t.slice(1,-1),r=l.indexOf(":"),o=l.slice(0,r);return o?V2+o:void 0})(),$2=t=>{const{theme:l,classGroups:r}=t;return G2(r,l)},G2=(t,l)=>{const r=Ax();for(const o in t){const s=t[o];hh(s,r,o,l)}return r},hh=(t,l,r,o)=>{const s=t.length;for(let u=0;u<s;u++){const f=t[u];X2(f,l,r,o)}},X2=(t,l,r,o)=>{if(typeof t=="string"){Z2(t,l,r);return}if(typeof t=="function"){Q2(t,l,r,o);return}K2(t,l,r,o)},Z2=(t,l,r)=>{const o=t===""?l:Rx(l,t);o.classGroupId=r},Q2=(t,l,r,o)=>{if(I2(t)){hh(t(o),l,r,o);return}l.validators===null&&(l.validators=[]),l.validators.push(U2(r,t))},K2=(t,l,r,o)=>{const s=Object.entries(t),u=s.length;for(let f=0;f<u;f++){const[h,g]=s[f];hh(g,Rx(l,h),r,o)}},Rx=(t,l)=>{let r=t;const o=l.split(Ec),s=o.length;for(let u=0;u<s;u++){const f=o[u];let h=r.nextPart.get(f);h||(h=Ax(),r.nextPart.set(f,h)),r=h}return r},I2=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,J2=t=>{if(t<1)return{get:()=>{},set:()=>{}};let l=0,r=Object.create(null),o=Object.create(null);const s=(u,f)=>{r[u]=f,l++,l>t&&(l=0,o=r,r=Object.create(null))};return{get(u){let f=r[u];if(f!==void 0)return f;if((f=o[u])!==void 0)return s(u,f),f},set(u,f){u in r?r[u]=f:s(u,f)}}},Vd="!",Bp=":",F2=[],Up=(t,l,r,o,s)=>({modifiers:t,hasImportantModifier:l,baseClassName:r,maybePostfixModifierPosition:o,isExternal:s}),W2=t=>{const{prefix:l,experimentalParseClassName:r}=t;let o=s=>{const u=[];let f=0,h=0,g=0,m;const x=s.length;for(let N=0;N<x;N++){const C=s[N];if(f===0&&h===0){if(C===Bp){u.push(s.slice(g,N)),g=N+1;continue}if(C==="/"){m=N;continue}}C==="["?f++:C==="]"?f--:C==="("?h++:C===")"&&h--}const p=u.length===0?s:s.slice(g);let b=p,w=!1;p.endsWith(Vd)?(b=p.slice(0,-1),w=!0):p.startsWith(Vd)&&(b=p.slice(1),w=!0);const S=m&&m>g?m-g:void 0;return Up(u,w,b,S)};if(l){const s=l+Bp,u=o;o=f=>f.startsWith(s)?u(f.slice(s.length)):Up(F2,!1,f,void 0,!0)}if(r){const s=o;o=u=>r({className:u,parseClassName:s})}return o},P2=t=>{const l=new Map;return t.orderSensitiveModifiers.forEach((r,o)=>{l.set(r,1e6+o)}),r=>{const o=[];let s=[];for(let u=0;u<r.length;u++){const f=r[u],h=f[0]==="[",g=l.has(f);h||g?(s.length>0&&(s.sort(),o.push(...s),s=[]),o.push(f)):s.push(f)}return s.length>0&&(s.sort(),o.push(...s)),o}},e_=t=>({cache:J2(t.cacheSize),parseClassName:W2(t),sortModifiers:P2(t),...Y2(t)}),t_=/\s+/,n_=(t,l)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:u}=l,f=[],h=t.trim().split(t_);let g="";for(let m=h.length-1;m>=0;m-=1){const x=h[m],{isExternal:p,modifiers:b,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:N}=r(x);if(p){g=x+(g.length>0?" "+g:g);continue}let C=!!N,A=o(C?S.substring(0,N):S);if(!A){if(!C){g=x+(g.length>0?" "+g:g);continue}if(A=o(S),!A){g=x+(g.length>0?" "+g:g);continue}C=!1}const M=b.length===0?"":b.length===1?b[0]:u(b).join(":"),E=w?M+Vd:M,z=E+A;if(f.indexOf(z)>-1)continue;f.push(z);const B=s(A,C);for(let H=0;H<B.length;++H){const L=B[H];f.push(E+L)}g=x+(g.length>0?" "+g:g)}return g},a_=(...t)=>{let l=0,r,o,s="";for(;l<t.length;)(r=t[l++])&&(o=zx(r))&&(s&&(s+=" "),s+=o);return s},zx=t=>{if(typeof t=="string")return t;let l,r="";for(let o=0;o<t.length;o++)t[o]&&(l=zx(t[o]))&&(r&&(r+=" "),r+=l);return r},l_=(t,...l)=>{let r,o,s,u;const f=g=>{const m=l.reduce((x,p)=>p(x),t());return r=e_(m),o=r.cache.get,s=r.cache.set,u=h,h(g)},h=g=>{const m=o(g);if(m)return m;const x=n_(g,r);return s(g,x),x};return u=f,(...g)=>u(a_(...g))},i_=[],Zt=t=>{const l=r=>r[t]||i_;return l.isThemeGetter=!0,l},Ox=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r_=/^\d+\/\d+$/,o_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,c_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fi=t=>r_.test(t),$e=t=>!!t&&!Number.isNaN(Number(t)),Ol=t=>!!t&&Number.isInteger(Number(t)),md=t=>t.endsWith("%")&&$e(t.slice(0,-1)),Ga=t=>o_.test(t),d_=()=>!0,h_=t=>s_.test(t)&&!c_.test(t),Dx=()=>!1,m_=t=>u_.test(t),g_=t=>f_.test(t),p_=t=>!be(t)&&!we(t),y_=t=>hr(t,Lx,Dx),be=t=>Ox.test(t),oi=t=>hr(t,Bx,h_),gd=t=>hr(t,S_,$e),Vp=t=>hr(t,kx,Dx),x_=t=>hr(t,Hx,g_),tc=t=>hr(t,Ux,m_),we=t=>jx.test(t),co=t=>mr(t,Bx),v_=t=>mr(t,E_),Yp=t=>mr(t,kx),b_=t=>mr(t,Lx),w_=t=>mr(t,Hx),nc=t=>mr(t,Ux,!0),hr=(t,l,r)=>{const o=Ox.exec(t);return o?o[1]?l(o[1]):r(o[2]):!1},mr=(t,l,r=!1)=>{const o=jx.exec(t);return o?o[1]?l(o[1]):r:!1},kx=t=>t==="position"||t==="percentage",Hx=t=>t==="image"||t==="url",Lx=t=>t==="length"||t==="size"||t==="bg-size",Bx=t=>t==="length",S_=t=>t==="number",E_=t=>t==="family-name",Ux=t=>t==="shadow",__=()=>{const t=Zt("color"),l=Zt("font"),r=Zt("text"),o=Zt("font-weight"),s=Zt("tracking"),u=Zt("leading"),f=Zt("breakpoint"),h=Zt("container"),g=Zt("spacing"),m=Zt("radius"),x=Zt("shadow"),p=Zt("inset-shadow"),b=Zt("text-shadow"),w=Zt("drop-shadow"),S=Zt("blur"),N=Zt("perspective"),C=Zt("aspect"),A=Zt("ease"),M=Zt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...z(),we,be],H=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],q=()=>[we,be,g],X=()=>[Fi,"full","auto",...q()],ae=()=>[Ol,"none","subgrid",we,be],Q=()=>["auto",{span:["full",Ol,we,be]},Ol,we,be],W=()=>[Ol,"auto",we,be],ie=()=>["auto","min","max","fr",we,be],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...q()],k=()=>[Fi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...q()],D=()=>[t,we,be],G=()=>[...z(),Yp,Vp,{position:[we,be]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",b_,y_,{size:[we,be]}],U=()=>[md,co,oi],I=()=>["","none","full",m,we,be],P=()=>["",$e,co,oi],ue=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[$e,md,Yp,Vp],fe=()=>["","none",S,we,be],me=()=>["none",$e,we,be],Te=()=>["none",$e,we,be],je=()=>[$e,we,be],Se=()=>[Fi,"full",...q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ga],breakpoint:[Ga],color:[d_],container:[Ga],"drop-shadow":[Ga],ease:["in","out","in-out"],font:[p_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ga],shadow:[Ga],spacing:["px",$e],text:[Ga],"text-shadow":[Ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Fi,be,we,C]}],container:["container"],columns:[{columns:[$e,be,we,h]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{start:X()}],end:[{end:X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[Ol,"auto",we,be]}],basis:[{basis:[Fi,"full","auto",h,...q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$e,Fi,"auto","initial","none",be]}],grow:[{grow:["",$e,we,be]}],shrink:[{shrink:["",$e,we,be]}],order:[{order:[Ol,"first","last","none",we,be]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:q()}],"gap-x":[{"gap-x":q()}],"gap-y":[{"gap-y":q()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:q()}],px:[{px:q()}],py:[{py:q()}],ps:[{ps:q()}],pe:[{pe:q()}],pt:[{pt:q()}],pr:[{pr:q()}],pb:[{pb:q()}],pl:[{pl:q()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":q()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],w:[{w:[h,"screen",...k()]}],"min-w":[{"min-w":[h,"screen","none",...k()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",r,co,oi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,we,gd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",md,be]}],"font-family":[{font:[v_,be,l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,we,be]}],"line-clamp":[{"line-clamp":[$e,"none",we,gd]}],leading:[{leading:[u,...q()]}],"list-image":[{"list-image":["none",we,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[$e,"from-font","auto",we,oi]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[$e,"auto",we,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ol,we,be],radial:["",we,be],conic:[Ol,we,be]},w_,x_]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$e,we,be]}],"outline-w":[{outline:["",$e,co,oi]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",x,nc,tc]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",p,nc,tc]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[$e,oi]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",b,nc,tc]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[$e,we,be]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[$e]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[we,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[$e]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,be]}],filter:[{filter:["","none",we,be]}],blur:[{blur:fe()}],brightness:[{brightness:[$e,we,be]}],contrast:[{contrast:[$e,we,be]}],"drop-shadow":[{"drop-shadow":["","none",w,nc,tc]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",$e,we,be]}],"hue-rotate":[{"hue-rotate":[$e,we,be]}],invert:[{invert:["",$e,we,be]}],saturate:[{saturate:[$e,we,be]}],sepia:[{sepia:["",$e,we,be]}],"backdrop-filter":[{"backdrop-filter":["","none",we,be]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[$e,we,be]}],"backdrop-contrast":[{"backdrop-contrast":[$e,we,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$e,we,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$e,we,be]}],"backdrop-invert":[{"backdrop-invert":["",$e,we,be]}],"backdrop-opacity":[{"backdrop-opacity":[$e,we,be]}],"backdrop-saturate":[{"backdrop-saturate":[$e,we,be]}],"backdrop-sepia":[{"backdrop-sepia":["",$e,we,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":q()}],"border-spacing-x":[{"border-spacing-x":q()}],"border-spacing-y":[{"border-spacing-y":q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$e,"initial",we,be]}],ease:[{ease:["linear","initial",A,we,be]}],delay:[{delay:[$e,we,be]}],animate:[{animate:["none",M,we,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,we,be]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Te()}],"scale-x":[{"scale-x":Te()}],"scale-y":[{"scale-y":Te()}],"scale-z":[{"scale-z":Te()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[we,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,be]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[$e,co,oi,gd]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},N_=l_(__);function di(...t){return N_(L2(t))}function Qa(t){const l=window.RUBY_REACTOR_BASE||"/",r=l.endsWith("/")?l.slice(0,-1):l,o=t.startsWith("/")?t:`/${t}`;return`${r}${o}`}function C_(t){const l=new Map;for(const r of t){let o=l.get(r.class);o||(o={className:r.class,runs:0,success:0,running:0,errors:0},l.set(r.class,o)),o.runs+=1,r.status==="completed"||r.status==="skipped"?o.success+=1:r.status==="running"||r.status==="paused"?o.running+=1:(r.status==="failed"||r.status==="cancelled")&&(o.errors+=1)}return Array.from(l.values()).sort((r,o)=>r.className.localeCompare(o.className))}function Yd(t){return`/reactors/by-class/${encodeURIComponent(t)}`}const M_=t=>fetch(t).then(l=>l.json());function A_(){const{data:t,error:l,isLoading:r}=Lc(Qa("/api/reactors"),M_,{refreshInterval:2e3}),[o,s]=O.useState(""),u=O.useMemo(()=>C_(t??[]).filter(h=>h.className.toLowerCase().includes(o.toLowerCase())),[t,o]),f=O.useMemo(()=>u.reduce((h,g)=>({runs:h.runs+g.runs,success:h.success+g.success,running:h.running+g.running,errors:h.errors+g.errors}),{runs:0,success:0,running:0,errors:0}),[u]);return l?y.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 flex items-center gap-2",children:[y.jsx(Wa,{className:"w-5 h-5"}),"Failed to load reactors"]}):y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Dashboard"}),y.jsx("p",{className:"text-slate-400 text-sm mt-1",children:"Reactor classes grouped with execution counts."})]}),y.jsxs("div",{className:"relative",children:[y.jsx(uh,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),y.jsx("input",{type:"text",placeholder:"Search class name...",value:o,onChange:h=>s(h.target.value),className:"bg-slate-900/50 border border-slate-800 text-sm rounded-lg pl-9 pr-4 py-2 text-slate-200 placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 w-full sm:w-64 transition-all"})]})]}),y.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[y.jsx(ac,{label:"Total Runs",value:f.runs}),y.jsx(ac,{label:"Success",value:f.success,tone:"success"}),y.jsx(ac,{label:"Running",value:f.running,tone:"running"}),y.jsx(ac,{label:"Errors",value:f.errors,tone:"error"})]}),y.jsx("div",{className:"bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden shadow-xl shadow-black/20",children:r?y.jsx("div",{className:"p-12 flex items-center justify-center text-slate-500 animate-pulse",children:"Loading reactor data..."}):y.jsx("div",{className:"overflow-x-auto",children:y.jsxs("table",{className:"w-full text-left text-sm",children:[y.jsx("thead",{className:"bg-slate-900/80 border-b border-slate-800 text-slate-400 font-medium",children:y.jsxs("tr",{children:[y.jsx("th",{className:"px-6 py-4 font-medium",children:"Class Name"}),y.jsx("th",{className:"px-6 py-4 font-medium text-right tabular-nums",children:"Runs"}),y.jsx("th",{className:"px-6 py-4 font-medium text-right tabular-nums",children:"Success"}),y.jsx("th",{className:"px-6 py-4 font-medium text-right tabular-nums",children:"Running"}),y.jsx("th",{className:"px-6 py-4 font-medium text-right tabular-nums",children:"Errors"}),y.jsx("th",{className:"px-6 py-4 w-10"})]})}),y.jsxs("tbody",{className:"divide-y divide-slate-800/50",children:[u.map(h=>y.jsxs("tr",{className:"group hover:bg-slate-800/30 transition-colors",children:[y.jsx("td",{className:"px-6 py-4",children:y.jsxs(Gn,{to:Yd(h.className),className:"flex items-center gap-2 text-slate-200 font-medium group-hover:text-indigo-400 transition-colors",children:[y.jsx("span",{className:"absolute -left-2 w-1 h-0 group-hover:h-4 bg-indigo-500 rounded-full transition-all duration-300 opacity-0 group-hover:opacity-100"}),h.className]})}),y.jsx("td",{className:"px-6 py-4 text-right text-slate-300 tabular-nums",children:h.runs}),y.jsx("td",{className:"px-6 py-4 text-right text-teal-400 tabular-nums",children:h.success}),y.jsx("td",{className:"px-6 py-4 text-right text-indigo-400 tabular-nums",children:h.running}),y.jsx("td",{className:"px-6 py-4 text-right text-rose-400 tabular-nums",children:h.errors}),y.jsx("td",{className:"px-6 py-4 text-slate-600 group-hover:text-indigo-400 transition-colors",children:y.jsx(Gn,{to:Yd(h.className),"aria-label":`View ${h.className} instances`,children:y.jsx(CE,{className:"w-4 h-4"})})})]},h.className)),u.length===0&&y.jsx("tr",{children:y.jsx("td",{colSpan:6,className:"px-6 py-24 text-center",children:y.jsxs("div",{className:"flex flex-col items-center gap-3 text-slate-500",children:[y.jsx("div",{className:"p-4 bg-slate-900 rounded-full border border-slate-800",children:y.jsx(jo,{className:"w-6 h-6 text-slate-600"})}),y.jsx("p",{children:"No reactor classes found matching your search."})]})})})]})]})})})]})}function ac({label:t,value:l,tone:r}){const o=r==="success"?"text-teal-400":r==="running"?"text-indigo-400":r==="error"?"text-rose-400":"text-white";return y.jsxs("div",{className:"bg-slate-900/50 border border-slate-800 rounded-xl px-4 py-3",children:[y.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wide",children:t}),y.jsx("p",{className:`text-2xl font-bold tabular-nums mt-1 ${o}`,children:l})]})}function Vx({status:t}){const l={running:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20 shadow-[0_0_10px_rgba(99,102,241,0.15)]",completed:"bg-teal-500/10 text-teal-400 border-teal-500/20 shadow-[0_0_10px_rgba(20,184,166,0.15)]",skipped:"bg-sky-500/10 text-sky-400 border-sky-500/20 shadow-[0_0_10px_rgba(14,165,233,0.15)]",failed:"bg-rose-500/10 text-rose-400 border-rose-500/20 shadow-[0_0_10px_rgba(244,63,94,0.15)]",cancelled:"bg-slate-800 text-slate-400 border-slate-700",paused:"bg-amber-500/10 text-amber-400 border-amber-500/20"}[t]||"bg-slate-800 text-slate-400 border-slate-700",r={running:y.jsx(jo,{className:"w-3 h-3 animate-pulse"}),completed:y.jsx(gx,{className:"w-3 h-3"}),skipped:y.jsx(t2,{className:"w-3 h-3"}),failed:y.jsx(Wa,{className:"w-3 h-3"}),cancelled:y.jsx(Sc,{className:"w-3 h-3"}),paused:y.jsx(Sc,{className:"w-3 h-3"})}[t];return y.jsxs("span",{className:di("inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium border backdrop-blur-md transition-all",l),children:[r,y.jsx("span",{className:"capitalize tracking-wide",children:t})]})}const T_=t=>fetch(t).then(l=>l.json());function R_(){const{data:t,error:l,isLoading:r}=Lc(Qa("/api/reactors"),T_,{refreshInterval:2e3}),[o,s]=O.useState(""),[u,f]=O.useState("all"),h=t?.filter(g=>{const m=g.id.toLowerCase().includes(o.toLowerCase())||g.class.toLowerCase().includes(o.toLowerCase()),x=u==="all"||g.status===u;return m&&x});return l?y.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 flex items-center gap-2",children:[y.jsx(Wa,{className:"w-5 h-5"}),"Failed to load reactors"]}):y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Live Executions"}),y.jsx("p",{className:"text-slate-400 text-sm mt-1",children:"Real-time view of all reactor runs."})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"relative",children:[y.jsx(uh,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),y.jsx("input",{type:"text",placeholder:"Search ID or Class...",value:o,onChange:g=>s(g.target.value),className:"bg-slate-900/50 border border-slate-800 text-sm rounded-lg pl-9 pr-4 py-2 text-slate-200 placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 w-full sm:w-64 transition-all"})]}),y.jsxs("div",{className:"relative",children:[y.jsx(px,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 pointer-events-none"}),y.jsxs("select",{value:u,onChange:g=>f(g.target.value),className:"appearance-none bg-slate-900/50 border border-slate-800 text-slate-300 rounded-lg pl-9 pr-8 py-2 hover:bg-slate-800 hover:text-white transition-colors text-sm font-medium focus:outline-none focus:ring-2 focus:ring-indigo-500/50 cursor-pointer",children:[y.jsx("option",{value:"all",children:"All Status"}),y.jsx("option",{value:"running",children:"Running"}),y.jsx("option",{value:"completed",children:"Completed"}),y.jsx("option",{value:"skipped",children:"Skipped"}),y.jsx("option",{value:"failed",children:"Failed"}),y.jsx("option",{value:"cancelled",children:"Cancelled"})]})]})]})]}),y.jsx("div",{className:"bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden shadow-xl shadow-black/20",children:r?y.jsx("div",{className:"p-12 flex items-center justify-center text-slate-500 animate-pulse",children:"Loading reactor data..."}):y.jsx("div",{className:"overflow-x-auto",children:y.jsxs("table",{className:"w-full text-left text-sm",children:[y.jsx("thead",{className:"bg-slate-900/80 border-b border-slate-800 text-slate-400 font-medium pb-4",children:y.jsxs("tr",{children:[y.jsx("th",{className:"px-6 py-4 font-medium",children:"Reactor ID"}),y.jsx("th",{className:"px-6 py-4 font-medium",children:"Class Name"}),y.jsx("th",{className:"px-6 py-4 font-medium",children:"Status"}),y.jsx("th",{className:"px-6 py-4 font-medium",children:"Failure"}),y.jsx("th",{className:"px-6 py-4 font-medium",children:"Started"}),y.jsx("th",{className:"px-6 py-4 text-right font-medium",children:"Actions"})]})}),y.jsxs("tbody",{className:"divide-y divide-slate-800/50",children:[h?.map(g=>y.jsxs("tr",{className:"group hover:bg-slate-800/30 transition-colors",children:[y.jsx("td",{className:"px-6 py-4 font-mono text-slate-500 group-hover:text-indigo-400 transition-colors",children:y.jsxs(Gn,{to:`/reactors/${g.id}`,className:"block relative",children:[y.jsx("span",{className:"absolute -left-2 top-1/2 -translate-y-1/2 w-1 h-0 group-hover:h-4 bg-indigo-500 rounded-full transition-all duration-300 opacity-0 group-hover:opacity-100"}),g.id.substring(0,8),"..."]})}),y.jsx("td",{className:"px-6 py-4 text-slate-200 font-medium",children:g.class}),y.jsx("td",{className:"px-6 py-4",children:y.jsx(Vx,{status:g.status})}),y.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:g.status==="failed"&&g.failure&&y.jsxs("div",{className:"flex flex-col",children:[y.jsx("span",{className:"text-rose-400 font-medium",children:g.failure.step_name}),y.jsx("span",{className:"text-slate-500 text-[10px] leading-tight opacity-70",children:g.failure.exception_class})]})}),y.jsx("td",{className:"px-6 py-4 text-slate-500 tabular-nums",children:new Date(g.created_at).toLocaleString()}),y.jsx("td",{className:"px-6 py-4 text-right",children:y.jsxs(Gn,{to:`/reactors/${g.id}`,className:"inline-flex items-center gap-1.5 text-xs font-medium text-slate-500 hover:text-indigo-400 transition-colors px-3 py-1.5 rounded-md hover:bg-indigo-500/10",children:["Inspect",y.jsx("span",{className:"sr-only",children:g.id})]})})]},g.id)),h?.length===0&&y.jsx("tr",{children:y.jsx("td",{colSpan:6,className:"px-6 py-24 text-center",children:y.jsxs("div",{className:"flex flex-col items-center gap-3 text-slate-500",children:[y.jsx("div",{className:"p-4 bg-slate-900 rounded-full border border-slate-800",children:y.jsx(jo,{className:"w-6 h-6 text-slate-600"})}),y.jsx("p",{children:"No active reactors found matching your filters."})]})})})]})]})})})]})}const z_=t=>fetch(t).then(l=>l.json());function O_(){const{className:t}=rx(),l=t?decodeURIComponent(t):"",{data:r,error:o,isLoading:s}=Lc(Qa("/api/reactors"),z_,{refreshInterval:2e3}),[u,f]=O.useState(""),[h,g]=O.useState("all"),m=r?.filter(p=>p.class===l),x=m?.filter(p=>{const b=p.id.toLowerCase().includes(u.toLowerCase()),w=h==="all"||p.status===h;return b&&w});return o?y.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 flex items-center gap-2",children:[y.jsx(Wa,{className:"w-5 h-5"}),"Failed to load reactors"]}):y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[y.jsxs("div",{className:"flex items-start gap-4",children:[y.jsx(Gn,{to:"/",className:"p-2 hover:bg-white/5 rounded-full text-slate-400 hover:text-white transition-colors mt-0.5",children:y.jsx(ch,{className:"w-5 h-5"})}),y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:l}),y.jsxs("p",{className:"text-slate-400 text-sm mt-1",children:[m?.length??0," execution",m?.length===1?"":"s"]})]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"relative",children:[y.jsx(uh,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),y.jsx("input",{type:"text",placeholder:"Search ID...",value:u,onChange:p=>f(p.target.value),className:"bg-slate-900/50 border border-slate-800 text-sm rounded-lg pl-9 pr-4 py-2 text-slate-200 placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 w-full sm:w-64 transition-all"})]}),y.jsxs("div",{className:"relative",children:[y.jsx(px,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 pointer-events-none"}),y.jsxs("select",{value:h,onChange:p=>g(p.target.value),className:"appearance-none bg-slate-900/50 border border-slate-800 text-slate-300 rounded-lg pl-9 pr-8 py-2 hover:bg-slate-800 hover:text-white transition-colors text-sm font-medium focus:outline-none focus:ring-2 focus:ring-indigo-500/50 cursor-pointer",children:[y.jsx("option",{value:"all",children:"All Status"}),y.jsx("option",{value:"running",children:"Running"}),y.jsx("option",{value:"completed",children:"Completed"}),y.jsx("option",{value:"skipped",children:"Skipped"}),y.jsx("option",{value:"failed",children:"Failed"}),y.jsx("option",{value:"cancelled",children:"Cancelled"})]})]})]})]}),y.jsx("div",{className:"bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden shadow-xl shadow-black/20",children:s?y.jsx("div",{className:"p-12 flex items-center justify-center text-slate-500 animate-pulse",children:"Loading reactor data..."}):y.jsx("div",{className:"overflow-x-auto",children:y.jsxs("table",{className:"w-full text-left text-sm",children:[y.jsx("thead",{className:"bg-slate-900/80 border-b border-slate-800 text-slate-400 font-medium pb-4",children:y.jsxs("tr",{children:[y.jsx("th",{className:"px-6 py-4 font-medium",children:"Reactor ID"}),y.jsx("th",{className:"px-6 py-4 font-medium",children:"Status"}),y.jsx("th",{className:"px-6 py-4 font-medium",children:"Failure"}),y.jsx("th",{className:"px-6 py-4 font-medium",children:"Started"}),y.jsx("th",{className:"px-6 py-4 text-right font-medium",children:"Actions"})]})}),y.jsxs("tbody",{className:"divide-y divide-slate-800/50",children:[x?.map(p=>y.jsxs("tr",{className:"group hover:bg-slate-800/30 transition-colors cursor-pointer",children:[y.jsx("td",{className:"px-6 py-4 font-mono text-slate-500 group-hover:text-indigo-400 transition-colors",children:y.jsxs(Gn,{to:`/reactors/${p.id}`,className:"block relative",children:[y.jsx("span",{className:"absolute -left-2 top-1/2 -translate-y-1/2 w-1 h-0 group-hover:h-4 bg-indigo-500 rounded-full transition-all duration-300 opacity-0 group-hover:opacity-100"}),p.id.substring(0,8),"..."]})}),y.jsx("td",{className:"px-6 py-4",children:y.jsx(Vx,{status:p.status})}),y.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:p.status==="failed"&&p.failure&&y.jsxs("div",{className:"flex flex-col",children:[y.jsx("span",{className:"text-rose-400 font-medium",children:p.failure.step_name}),y.jsx("span",{className:"text-slate-500 text-[10px] leading-tight opacity-70",children:p.failure.exception_class})]})}),y.jsx("td",{className:"px-6 py-4 text-slate-500 tabular-nums",children:new Date(p.created_at).toLocaleString()}),y.jsx("td",{className:"px-6 py-4 text-right",children:y.jsxs(Gn,{to:`/reactors/${p.id}`,className:"inline-flex items-center gap-1.5 text-xs font-medium text-slate-500 hover:text-indigo-400 transition-colors px-3 py-1.5 rounded-md hover:bg-indigo-500/10",children:["Inspect",y.jsx("span",{className:"sr-only",children:p.id})]})})]},p.id)),x?.length===0&&y.jsx("tr",{children:y.jsx("td",{colSpan:5,className:"px-6 py-24 text-center",children:y.jsxs("div",{className:"flex flex-col items-center gap-3 text-slate-500",children:[y.jsx("div",{className:"p-4 bg-slate-900 rounded-full border border-slate-800",children:y.jsx(jo,{className:"w-6 h-6 text-slate-600"})}),y.jsx("p",{children:"No executions found for this reactor class."})]})})})]})]})})})]})}function $t(t){if(typeof t=="string"||typeof t=="number")return""+t;let l="";if(Array.isArray(t))for(let r=0,o;r<t.length;r++)(o=$t(t[r]))!==""&&(l+=(l&&" ")+o);else for(let r in t)t[r]&&(l+=(l&&" ")+r);return l}var j_={value:()=>{}};function Bc(){for(var t=0,l=arguments.length,r={},o;t<l;++t){if(!(o=arguments[t]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new pc(r)}function pc(t){this._=t}function D_(t,l){return t.trim().split(/^|\s+/).map(function(r){var o="",s=r.indexOf(".");if(s>=0&&(o=r.slice(s+1),r=r.slice(0,s)),r&&!l.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}pc.prototype=Bc.prototype={constructor:pc,on:function(t,l){var r=this._,o=D_(t+"",r),s,u=-1,f=o.length;if(arguments.length<2){for(;++u<f;)if((s=(t=o[u]).type)&&(s=k_(r[s],t.name)))return s;return}if(l!=null&&typeof l!="function")throw new Error("invalid callback: "+l);for(;++u<f;)if(s=(t=o[u]).type)r[s]=qp(r[s],t.name,l);else if(l==null)for(s in r)r[s]=qp(r[s],t.name,null);return this},copy:function(){var t={},l=this._;for(var r in l)t[r]=l[r].slice();return new pc(t)},call:function(t,l){if((s=arguments.length-2)>0)for(var r=new Array(s),o=0,s,u;o<s;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],o=0,s=u.length;o<s;++o)u[o].value.apply(l,r)},apply:function(t,l,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],s=0,u=o.length;s<u;++s)o[s].value.apply(l,r)}};function k_(t,l){for(var r=0,o=t.length,s;r<o;++r)if((s=t[r]).name===l)return s.value}function qp(t,l,r){for(var o=0,s=t.length;o<s;++o)if(t[o].name===l){t[o]=j_,t=t.slice(0,o).concat(t.slice(o+1));break}return r!=null&&t.push({name:l,value:r}),t}var qd="http://www.w3.org/1999/xhtml";const $p={svg:"http://www.w3.org/2000/svg",xhtml:qd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Uc(t){var l=t+="",r=l.indexOf(":");return r>=0&&(l=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),$p.hasOwnProperty(l)?{space:$p[l],local:t}:t}function H_(t){return function(){var l=this.ownerDocument,r=this.namespaceURI;return r===qd&&l.documentElement.namespaceURI===qd?l.createElement(t):l.createElementNS(r,t)}}function L_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Yx(t){var l=Uc(t);return(l.local?L_:H_)(l)}function B_(){}function mh(t){return t==null?B_:function(){return this.querySelector(t)}}function U_(t){typeof t!="function"&&(t=mh(t));for(var l=this._groups,r=l.length,o=new Array(r),s=0;s<r;++s)for(var u=l[s],f=u.length,h=o[s]=new Array(f),g,m,x=0;x<f;++x)(g=u[x])&&(m=t.call(g,g.__data__,x,u))&&("__data__"in g&&(m.__data__=g.__data__),h[x]=m);return new Rn(o,this._parents)}function V_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Y_(){return[]}function qx(t){return t==null?Y_:function(){return this.querySelectorAll(t)}}function q_(t){return function(){return V_(t.apply(this,arguments))}}function $_(t){typeof t=="function"?t=q_(t):t=qx(t);for(var l=this._groups,r=l.length,o=[],s=[],u=0;u<r;++u)for(var f=l[u],h=f.length,g,m=0;m<h;++m)(g=f[m])&&(o.push(t.call(g,g.__data__,m,f)),s.push(g));return new Rn(o,s)}function $x(t){return function(){return this.matches(t)}}function Gx(t){return function(l){return l.matches(t)}}var G_=Array.prototype.find;function X_(t){return function(){return G_.call(this.children,t)}}function Z_(){return this.firstElementChild}function Q_(t){return this.select(t==null?Z_:X_(typeof t=="function"?t:Gx(t)))}var K_=Array.prototype.filter;function I_(){return Array.from(this.children)}function J_(t){return function(){return K_.call(this.children,t)}}function F_(t){return this.selectAll(t==null?I_:J_(typeof t=="function"?t:Gx(t)))}function W_(t){typeof t!="function"&&(t=$x(t));for(var l=this._groups,r=l.length,o=new Array(r),s=0;s<r;++s)for(var u=l[s],f=u.length,h=o[s]=[],g,m=0;m<f;++m)(g=u[m])&&t.call(g,g.__data__,m,u)&&h.push(g);return new Rn(o,this._parents)}function Xx(t){return new Array(t.length)}function P_(){return new Rn(this._enter||this._groups.map(Xx),this._parents)}function _c(t,l){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=l}_c.prototype={constructor:_c,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,l){return this._parent.insertBefore(t,l)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function eN(t){return function(){return t}}function tN(t,l,r,o,s,u){for(var f=0,h,g=l.length,m=u.length;f<m;++f)(h=l[f])?(h.__data__=u[f],o[f]=h):r[f]=new _c(t,u[f]);for(;f<g;++f)(h=l[f])&&(s[f]=h)}function nN(t,l,r,o,s,u,f){var h,g,m=new Map,x=l.length,p=u.length,b=new Array(x),w;for(h=0;h<x;++h)(g=l[h])&&(b[h]=w=f.call(g,g.__data__,h,l)+"",m.has(w)?s[h]=g:m.set(w,g));for(h=0;h<p;++h)w=f.call(t,u[h],h,u)+"",(g=m.get(w))?(o[h]=g,g.__data__=u[h],m.delete(w)):r[h]=new _c(t,u[h]);for(h=0;h<x;++h)(g=l[h])&&m.get(b[h])===g&&(s[h]=g)}function aN(t){return t.__data__}function lN(t,l){if(!arguments.length)return Array.from(this,aN);var r=l?nN:tN,o=this._parents,s=this._groups;typeof t!="function"&&(t=eN(t));for(var u=s.length,f=new Array(u),h=new Array(u),g=new Array(u),m=0;m<u;++m){var x=o[m],p=s[m],b=p.length,w=iN(t.call(x,x&&x.__data__,m,o)),S=w.length,N=h[m]=new Array(S),C=f[m]=new Array(S),A=g[m]=new Array(b);r(x,p,N,C,A,w,l);for(var M=0,E=0,z,B;M<S;++M)if(z=N[M]){for(M>=E&&(E=M+1);!(B=C[E])&&++E<S;);z._next=B||null}}return f=new Rn(f,o),f._enter=h,f._exit=g,f}function iN(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function rN(){return new Rn(this._exit||this._groups.map(Xx),this._parents)}function oN(t,l,r){var o=this.enter(),s=this,u=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),l!=null&&(s=l(s),s&&(s=s.selection())),r==null?u.remove():r(u),o&&s?o.merge(s).order():s}function sN(t){for(var l=t.selection?t.selection():t,r=this._groups,o=l._groups,s=r.length,u=o.length,f=Math.min(s,u),h=new Array(s),g=0;g<f;++g)for(var m=r[g],x=o[g],p=m.length,b=h[g]=new Array(p),w,S=0;S<p;++S)(w=m[S]||x[S])&&(b[S]=w);for(;g<s;++g)h[g]=r[g];return new Rn(h,this._parents)}function cN(){for(var t=this._groups,l=-1,r=t.length;++l<r;)for(var o=t[l],s=o.length-1,u=o[s],f;--s>=0;)(f=o[s])&&(u&&f.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(f,u),u=f);return this}function uN(t){t||(t=fN);function l(p,b){return p&&b?t(p.__data__,b.__data__):!p-!b}for(var r=this._groups,o=r.length,s=new Array(o),u=0;u<o;++u){for(var f=r[u],h=f.length,g=s[u]=new Array(h),m,x=0;x<h;++x)(m=f[x])&&(g[x]=m);g.sort(l)}return new Rn(s,this._parents).order()}function fN(t,l){return t<l?-1:t>l?1:t>=l?0:NaN}function dN(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function hN(){return Array.from(this)}function mN(){for(var t=this._groups,l=0,r=t.length;l<r;++l)for(var o=t[l],s=0,u=o.length;s<u;++s){var f=o[s];if(f)return f}return null}function gN(){let t=0;for(const l of this)++t;return t}function pN(){return!this.node()}function yN(t){for(var l=this._groups,r=0,o=l.length;r<o;++r)for(var s=l[r],u=0,f=s.length,h;u<f;++u)(h=s[u])&&t.call(h,h.__data__,u,s);return this}function xN(t){return function(){this.removeAttribute(t)}}function vN(t){return function(){this.removeAttributeNS(t.space,t.local)}}function bN(t,l){return function(){this.setAttribute(t,l)}}function wN(t,l){return function(){this.setAttributeNS(t.space,t.local,l)}}function SN(t,l){return function(){var r=l.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function EN(t,l){return function(){var r=l.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function _N(t,l){var r=Uc(t);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((l==null?r.local?vN:xN:typeof l=="function"?r.local?EN:SN:r.local?wN:bN)(r,l))}function Zx(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function NN(t){return function(){this.style.removeProperty(t)}}function CN(t,l,r){return function(){this.style.setProperty(t,l,r)}}function MN(t,l,r){return function(){var o=l.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,r)}}function AN(t,l,r){return arguments.length>1?this.each((l==null?NN:typeof l=="function"?MN:CN)(t,l,r??"")):lr(this.node(),t)}function lr(t,l){return t.style.getPropertyValue(l)||Zx(t).getComputedStyle(t,null).getPropertyValue(l)}function TN(t){return function(){delete this[t]}}function RN(t,l){return function(){this[t]=l}}function zN(t,l){return function(){var r=l.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function ON(t,l){return arguments.length>1?this.each((l==null?TN:typeof l=="function"?zN:RN)(t,l)):this.node()[t]}function Qx(t){return t.trim().split(/^|\s+/)}function gh(t){return t.classList||new Kx(t)}function Kx(t){this._node=t,this._names=Qx(t.getAttribute("class")||"")}Kx.prototype={add:function(t){var l=this._names.indexOf(t);l<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var l=this._names.indexOf(t);l>=0&&(this._names.splice(l,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ix(t,l){for(var r=gh(t),o=-1,s=l.length;++o<s;)r.add(l[o])}function Jx(t,l){for(var r=gh(t),o=-1,s=l.length;++o<s;)r.remove(l[o])}function jN(t){return function(){Ix(this,t)}}function DN(t){return function(){Jx(this,t)}}function kN(t,l){return function(){(l.apply(this,arguments)?Ix:Jx)(this,t)}}function HN(t,l){var r=Qx(t+"");if(arguments.length<2){for(var o=gh(this.node()),s=-1,u=r.length;++s<u;)if(!o.contains(r[s]))return!1;return!0}return this.each((typeof l=="function"?kN:l?jN:DN)(r,l))}function LN(){this.textContent=""}function BN(t){return function(){this.textContent=t}}function UN(t){return function(){var l=t.apply(this,arguments);this.textContent=l??""}}function VN(t){return arguments.length?this.each(t==null?LN:(typeof t=="function"?UN:BN)(t)):this.node().textContent}function YN(){this.innerHTML=""}function qN(t){return function(){this.innerHTML=t}}function $N(t){return function(){var l=t.apply(this,arguments);this.innerHTML=l??""}}function GN(t){return arguments.length?this.each(t==null?YN:(typeof t=="function"?$N:qN)(t)):this.node().innerHTML}function XN(){this.nextSibling&&this.parentNode.appendChild(this)}function ZN(){return this.each(XN)}function QN(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function KN(){return this.each(QN)}function IN(t){var l=typeof t=="function"?t:Yx(t);return this.select(function(){return this.appendChild(l.apply(this,arguments))})}function JN(){return null}function FN(t,l){var r=typeof t=="function"?t:Yx(t),o=l==null?JN:typeof l=="function"?l:mh(l);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function WN(){var t=this.parentNode;t&&t.removeChild(this)}function PN(){return this.each(WN)}function eC(){var t=this.cloneNode(!1),l=this.parentNode;return l?l.insertBefore(t,this.nextSibling):t}function tC(){var t=this.cloneNode(!0),l=this.parentNode;return l?l.insertBefore(t,this.nextSibling):t}function nC(t){return this.select(t?tC:eC)}function aC(t){return arguments.length?this.property("__data__",t):this.node().__data__}function lC(t){return function(l){t.call(this,l,this.__data__)}}function iC(t){return t.trim().split(/^|\s+/).map(function(l){var r="",o=l.indexOf(".");return o>=0&&(r=l.slice(o+1),l=l.slice(0,o)),{type:l,name:r}})}function rC(t){return function(){var l=this.__on;if(l){for(var r=0,o=-1,s=l.length,u;r<s;++r)u=l[r],(!t.type||u.type===t.type)&&u.name===t.name?this.removeEventListener(u.type,u.listener,u.options):l[++o]=u;++o?l.length=o:delete this.__on}}}function oC(t,l,r){return function(){var o=this.__on,s,u=lC(l);if(o){for(var f=0,h=o.length;f<h;++f)if((s=o[f]).type===t.type&&s.name===t.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=u,s.options=r),s.value=l;return}}this.addEventListener(t.type,u,r),s={type:t.type,name:t.name,value:l,listener:u,options:r},o?o.push(s):this.__on=[s]}}function sC(t,l,r){var o=iC(t+""),s,u=o.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,m=h.length,x;g<m;++g)for(s=0,x=h[g];s<u;++s)if((f=o[s]).type===x.type&&f.name===x.name)return x.value}return}for(h=l?oC:rC,s=0;s<u;++s)this.each(h(o[s],l,r));return this}function Fx(t,l,r){var o=Zx(t),s=o.CustomEvent;typeof s=="function"?s=new s(l,r):(s=o.document.createEvent("Event"),r?(s.initEvent(l,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(l,!1,!1)),t.dispatchEvent(s)}function cC(t,l){return function(){return Fx(this,t,l)}}function uC(t,l){return function(){return Fx(this,t,l.apply(this,arguments))}}function fC(t,l){return this.each((typeof l=="function"?uC:cC)(t,l))}function*dC(){for(var t=this._groups,l=0,r=t.length;l<r;++l)for(var o=t[l],s=0,u=o.length,f;s<u;++s)(f=o[s])&&(yield f)}var Wx=[null];function Rn(t,l){this._groups=t,this._parents=l}function ko(){return new Rn([[document.documentElement]],Wx)}function hC(){return this}Rn.prototype=ko.prototype={constructor:Rn,select:U_,selectAll:$_,selectChild:Q_,selectChildren:F_,filter:W_,data:lN,enter:P_,exit:rN,join:oN,merge:sN,selection:hC,order:cN,sort:uN,call:dN,nodes:hN,node:mN,size:gN,empty:pN,each:yN,attr:_N,style:AN,property:ON,classed:HN,text:VN,html:GN,raise:ZN,lower:KN,append:IN,insert:FN,remove:PN,clone:nC,datum:aC,on:sC,dispatch:fC,[Symbol.iterator]:dC};function Tn(t){return typeof t=="string"?new Rn([[document.querySelector(t)]],[document.documentElement]):new Rn([[t]],Wx)}function mC(t){let l;for(;l=t.sourceEvent;)t=l;return t}function Pn(t,l){if(t=mC(t),l===void 0&&(l=t.currentTarget),l){var r=l.ownerSVGElement||l;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(l.getScreenCTM().inverse()),[o.x,o.y]}if(l.getBoundingClientRect){var s=l.getBoundingClientRect();return[t.clientX-s.left-l.clientLeft,t.clientY-s.top-l.clientTop]}}return[t.pageX,t.pageY]}const gC={passive:!1},vo={capture:!0,passive:!1};function pd(t){t.stopImmediatePropagation()}function nr(t){t.preventDefault(),t.stopImmediatePropagation()}function Px(t){var l=t.document.documentElement,r=Tn(t).on("dragstart.drag",nr,vo);"onselectstart"in l?r.on("selectstart.drag",nr,vo):(l.__noselect=l.style.MozUserSelect,l.style.MozUserSelect="none")}function ev(t,l){var r=t.document.documentElement,o=Tn(t).on("dragstart.drag",null);l&&(o.on("click.drag",nr,vo),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const lc=t=>()=>t;function $d(t,{sourceEvent:l,subject:r,target:o,identifier:s,active:u,x:f,y:h,dx:g,dy:m,dispatch:x}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:l,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:x}})}$d.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function pC(t){return!t.ctrlKey&&!t.button}function yC(){return this.parentNode}function xC(t,l){return l??{x:t.x,y:t.y}}function vC(){return navigator.maxTouchPoints||"ontouchstart"in this}function tv(){var t=pC,l=yC,r=xC,o=vC,s={},u=Bc("start","drag","end"),f=0,h,g,m,x,p=0;function b(z){z.on("mousedown.drag",w).filter(o).on("touchstart.drag",C).on("touchmove.drag",A,gC).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(z,B){if(!(x||!t.call(this,z,B))){var H=E(this,l.call(this,z,B),z,B,"mouse");H&&(Tn(z.view).on("mousemove.drag",S,vo).on("mouseup.drag",N,vo),Px(z.view),pd(z),m=!1,h=z.clientX,g=z.clientY,H("start",z))}}function S(z){if(nr(z),!m){var B=z.clientX-h,H=z.clientY-g;m=B*B+H*H>p}s.mouse("drag",z)}function N(z){Tn(z.view).on("mousemove.drag mouseup.drag",null),ev(z.view,m),nr(z),s.mouse("end",z)}function C(z,B){if(t.call(this,z,B)){var H=z.changedTouches,L=l.call(this,z,B),q=H.length,X,ae;for(X=0;X<q;++X)(ae=E(this,L,z,B,H[X].identifier,H[X]))&&(pd(z),ae("start",z,H[X]))}}function A(z){var B=z.changedTouches,H=B.length,L,q;for(L=0;L<H;++L)(q=s[B[L].identifier])&&(nr(z),q("drag",z,B[L]))}function M(z){var B=z.changedTouches,H=B.length,L,q;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),L=0;L<H;++L)(q=s[B[L].identifier])&&(pd(z),q("end",z,B[L]))}function E(z,B,H,L,q,X){var ae=u.copy(),Q=Pn(X||H,B),W,ie,j;if((j=r.call(z,new $d("beforestart",{sourceEvent:H,target:b,identifier:q,active:f,x:Q[0],y:Q[1],dx:0,dy:0,dispatch:ae}),L))!=null)return W=j.x-Q[0]||0,ie=j.y-Q[1]||0,function Z(T,k,D){var G=Q,te;switch(T){case"start":s[q]=Z,te=f++;break;case"end":delete s[q],--f;case"drag":Q=Pn(D||k,B),te=f;break}ae.call(T,z,new $d(T,{sourceEvent:k,subject:j,target:b,identifier:q,active:te,x:Q[0]+W,y:Q[1]+ie,dx:Q[0]-G[0],dy:Q[1]-G[1],dispatch:ae}),L)}}return b.filter=function(z){return arguments.length?(t=typeof z=="function"?z:lc(!!z),b):t},b.container=function(z){return arguments.length?(l=typeof z=="function"?z:lc(z),b):l},b.subject=function(z){return arguments.length?(r=typeof z=="function"?z:lc(z),b):r},b.touchable=function(z){return arguments.length?(o=typeof z=="function"?z:lc(!!z),b):o},b.on=function(){var z=u.on.apply(u,arguments);return z===u?b:z},b.clickDistance=function(z){return arguments.length?(p=(z=+z)*z,b):Math.sqrt(p)},b}function ph(t,l,r){t.prototype=l.prototype=r,r.constructor=t}function nv(t,l){var r=Object.create(t.prototype);for(var o in l)r[o]=l[o];return r}function Ho(){}var bo=.7,Nc=1/bo,ar="\\s*([+-]?\\d+)\\s*",wo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ha="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bC=/^#([0-9a-f]{3,8})$/,wC=new RegExp(`^rgb\\(${ar},${ar},${ar}\\)$`),SC=new RegExp(`^rgb\\(${ha},${ha},${ha}\\)$`),EC=new RegExp(`^rgba\\(${ar},${ar},${ar},${wo}\\)$`),_C=new RegExp(`^rgba\\(${ha},${ha},${ha},${wo}\\)$`),NC=new RegExp(`^hsl\\(${wo},${ha},${ha}\\)$`),CC=new RegExp(`^hsla\\(${wo},${ha},${ha},${wo}\\)$`),Gp={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};ph(Ho,hi,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Xp,formatHex:Xp,formatHex8:MC,formatHsl:AC,formatRgb:Zp,toString:Zp});function Xp(){return this.rgb().formatHex()}function MC(){return this.rgb().formatHex8()}function AC(){return av(this).formatHsl()}function Zp(){return this.rgb().formatRgb()}function hi(t){var l,r;return t=(t+"").trim().toLowerCase(),(l=bC.exec(t))?(r=l[1].length,l=parseInt(l[1],16),r===6?Qp(l):r===3?new wn(l>>8&15|l>>4&240,l>>4&15|l&240,(l&15)<<4|l&15,1):r===8?ic(l>>24&255,l>>16&255,l>>8&255,(l&255)/255):r===4?ic(l>>12&15|l>>8&240,l>>8&15|l>>4&240,l>>4&15|l&240,((l&15)<<4|l&15)/255):null):(l=wC.exec(t))?new wn(l[1],l[2],l[3],1):(l=SC.exec(t))?new wn(l[1]*255/100,l[2]*255/100,l[3]*255/100,1):(l=EC.exec(t))?ic(l[1],l[2],l[3],l[4]):(l=_C.exec(t))?ic(l[1]*255/100,l[2]*255/100,l[3]*255/100,l[4]):(l=NC.exec(t))?Jp(l[1],l[2]/100,l[3]/100,1):(l=CC.exec(t))?Jp(l[1],l[2]/100,l[3]/100,l[4]):Gp.hasOwnProperty(t)?Qp(Gp[t]):t==="transparent"?new wn(NaN,NaN,NaN,0):null}function Qp(t){return new wn(t>>16&255,t>>8&255,t&255,1)}function ic(t,l,r,o){return o<=0&&(t=l=r=NaN),new wn(t,l,r,o)}function TC(t){return t instanceof Ho||(t=hi(t)),t?(t=t.rgb(),new wn(t.r,t.g,t.b,t.opacity)):new wn}function Gd(t,l,r,o){return arguments.length===1?TC(t):new wn(t,l,r,o??1)}function wn(t,l,r,o){this.r=+t,this.g=+l,this.b=+r,this.opacity=+o}ph(wn,Gd,nv(Ho,{brighter(t){return t=t==null?Nc:Math.pow(Nc,t),new wn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?bo:Math.pow(bo,t),new wn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wn(ui(this.r),ui(this.g),ui(this.b),Cc(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:Kp,formatHex:Kp,formatHex8:RC,formatRgb:Ip,toString:Ip}));function Kp(){return`#${ci(this.r)}${ci(this.g)}${ci(this.b)}`}function RC(){return`#${ci(this.r)}${ci(this.g)}${ci(this.b)}${ci((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ip(){const t=Cc(this.opacity);return`${t===1?"rgb(":"rgba("}${ui(this.r)}, ${ui(this.g)}, ${ui(this.b)}${t===1?")":`, ${t})`}`}function Cc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ui(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ci(t){return t=ui(t),(t<16?"0":"")+t.toString(16)}function Jp(t,l,r,o){return o<=0?t=l=r=NaN:r<=0||r>=1?t=l=NaN:l<=0&&(t=NaN),new ea(t,l,r,o)}function av(t){if(t instanceof ea)return new ea(t.h,t.s,t.l,t.opacity);if(t instanceof Ho||(t=hi(t)),!t)return new ea;if(t instanceof ea)return t;t=t.rgb();var l=t.r/255,r=t.g/255,o=t.b/255,s=Math.min(l,r,o),u=Math.max(l,r,o),f=NaN,h=u-s,g=(u+s)/2;return h?(l===u?f=(r-o)/h+(r<o)*6:r===u?f=(o-l)/h+2:f=(l-r)/h+4,h/=g<.5?u+s:2-u-s,f*=60):h=g>0&&g<1?0:f,new ea(f,h,g,t.opacity)}function zC(t,l,r,o){return arguments.length===1?av(t):new ea(t,l,r,o??1)}function ea(t,l,r,o){this.h=+t,this.s=+l,this.l=+r,this.opacity=+o}ph(ea,zC,nv(Ho,{brighter(t){return t=t==null?Nc:Math.pow(Nc,t),new ea(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?bo:Math.pow(bo,t),new ea(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,l=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*l,s=2*r-o;return new wn(yd(t>=240?t-240:t+120,s,o),yd(t,s,o),yd(t<120?t+240:t-120,s,o),this.opacity)},clamp(){return new ea(Fp(this.h),rc(this.s),rc(this.l),Cc(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=Cc(this.opacity);return`${t===1?"hsl(":"hsla("}${Fp(this.h)}, ${rc(this.s)*100}%, ${rc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Fp(t){return t=(t||0)%360,t<0?t+360:t}function rc(t){return Math.max(0,Math.min(1,t||0))}function yd(t,l,r){return(t<60?l+(r-l)*t/60:t<180?r:t<240?l+(r-l)*(240-t)/60:l)*255}const yh=t=>()=>t;function OC(t,l){return function(r){return t+r*l}}function jC(t,l,r){return t=Math.pow(t,r),l=Math.pow(l,r)-t,r=1/r,function(o){return Math.pow(t+o*l,r)}}function DC(t){return(t=+t)==1?lv:function(l,r){return r-l?jC(l,r,t):yh(isNaN(l)?r:l)}}function lv(t,l){var r=l-t;return r?OC(t,r):yh(isNaN(t)?l:t)}const Mc=(function t(l){var r=DC(l);function o(s,u){var f=r((s=Gd(s)).r,(u=Gd(u)).r),h=r(s.g,u.g),g=r(s.b,u.b),m=lv(s.opacity,u.opacity);return function(x){return s.r=f(x),s.g=h(x),s.b=g(x),s.opacity=m(x),s+""}}return o.gamma=t,o})(1);function kC(t,l){l||(l=[]);var r=t?Math.min(l.length,t.length):0,o=l.slice(),s;return function(u){for(s=0;s<r;++s)o[s]=t[s]*(1-u)+l[s]*u;return o}}function HC(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function LC(t,l){var r=l?l.length:0,o=t?Math.min(r,t.length):0,s=new Array(o),u=new Array(r),f;for(f=0;f<o;++f)s[f]=po(t[f],l[f]);for(;f<r;++f)u[f]=l[f];return function(h){for(f=0;f<o;++f)u[f]=s[f](h);return u}}function BC(t,l){var r=new Date;return t=+t,l=+l,function(o){return r.setTime(t*(1-o)+l*o),r}}function fa(t,l){return t=+t,l=+l,function(r){return t*(1-r)+l*r}}function UC(t,l){var r={},o={},s;(t===null||typeof t!="object")&&(t={}),(l===null||typeof l!="object")&&(l={});for(s in l)s in t?r[s]=po(t[s],l[s]):o[s]=l[s];return function(u){for(s in r)o[s]=r[s](u);return o}}var Xd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xd=new RegExp(Xd.source,"g");function VC(t){return function(){return t}}function YC(t){return function(l){return t(l)+""}}function iv(t,l){var r=Xd.lastIndex=xd.lastIndex=0,o,s,u,f=-1,h=[],g=[];for(t=t+"",l=l+"";(o=Xd.exec(t))&&(s=xd.exec(l));)(u=s.index)>r&&(u=l.slice(r,u),h[f]?h[f]+=u:h[++f]=u),(o=o[0])===(s=s[0])?h[f]?h[f]+=s:h[++f]=s:(h[++f]=null,g.push({i:f,x:fa(o,s)})),r=xd.lastIndex;return r<l.length&&(u=l.slice(r),h[f]?h[f]+=u:h[++f]=u),h.length<2?g[0]?YC(g[0].x):VC(l):(l=g.length,function(m){for(var x=0,p;x<l;++x)h[(p=g[x]).i]=p.x(m);return h.join("")})}function po(t,l){var r=typeof l,o;return l==null||r==="boolean"?yh(l):(r==="number"?fa:r==="string"?(o=hi(l))?(l=o,Mc):iv:l instanceof hi?Mc:l instanceof Date?BC:HC(l)?kC:Array.isArray(l)?LC:typeof l.valueOf!="function"&&typeof l.toString!="function"||isNaN(l)?UC:fa)(t,l)}var Wp=180/Math.PI,Zd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rv(t,l,r,o,s,u){var f,h,g;return(f=Math.sqrt(t*t+l*l))&&(t/=f,l/=f),(g=t*r+l*o)&&(r-=t*g,o-=l*g),(h=Math.sqrt(r*r+o*o))&&(r/=h,o/=h,g/=h),t*o<l*r&&(t=-t,l=-l,g=-g,f=-f),{translateX:s,translateY:u,rotate:Math.atan2(l,t)*Wp,skewX:Math.atan(g)*Wp,scaleX:f,scaleY:h}}var oc;function qC(t){const l=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return l.isIdentity?Zd:rv(l.a,l.b,l.c,l.d,l.e,l.f)}function $C(t){return t==null||(oc||(oc=document.createElementNS("http://www.w3.org/2000/svg","g")),oc.setAttribute("transform",t),!(t=oc.transform.baseVal.consolidate()))?Zd:(t=t.matrix,rv(t.a,t.b,t.c,t.d,t.e,t.f))}function ov(t,l,r,o){function s(m){return m.length?m.pop()+" ":""}function u(m,x,p,b,w,S){if(m!==p||x!==b){var N=w.push("translate(",null,l,null,r);S.push({i:N-4,x:fa(m,p)},{i:N-2,x:fa(x,b)})}else(p||b)&&w.push("translate("+p+l+b+r)}function f(m,x,p,b){m!==x?(m-x>180?x+=360:x-m>180&&(m+=360),b.push({i:p.push(s(p)+"rotate(",null,o)-2,x:fa(m,x)})):x&&p.push(s(p)+"rotate("+x+o)}function h(m,x,p,b){m!==x?b.push({i:p.push(s(p)+"skewX(",null,o)-2,x:fa(m,x)}):x&&p.push(s(p)+"skewX("+x+o)}function g(m,x,p,b,w,S){if(m!==p||x!==b){var N=w.push(s(w)+"scale(",null,",",null,")");S.push({i:N-4,x:fa(m,p)},{i:N-2,x:fa(x,b)})}else(p!==1||b!==1)&&w.push(s(w)+"scale("+p+","+b+")")}return function(m,x){var p=[],b=[];return m=t(m),x=t(x),u(m.translateX,m.translateY,x.translateX,x.translateY,p,b),f(m.rotate,x.rotate,p,b),h(m.skewX,x.skewX,p,b),g(m.scaleX,m.scaleY,x.scaleX,x.scaleY,p,b),m=x=null,function(w){for(var S=-1,N=b.length,C;++S<N;)p[(C=b[S]).i]=C.x(w);return p.join("")}}}var GC=ov(qC,"px, ","px)","deg)"),XC=ov($C,", ",")",")"),ZC=1e-12;function Pp(t){return((t=Math.exp(t))+1/t)/2}function QC(t){return((t=Math.exp(t))-1/t)/2}function KC(t){return((t=Math.exp(2*t))-1)/(t+1)}const yc=(function t(l,r,o){function s(u,f){var h=u[0],g=u[1],m=u[2],x=f[0],p=f[1],b=f[2],w=x-h,S=p-g,N=w*w+S*S,C,A;if(N<ZC)A=Math.log(b/m)/l,C=function(L){return[h+L*w,g+L*S,m*Math.exp(l*L*A)]};else{var M=Math.sqrt(N),E=(b*b-m*m+o*N)/(2*m*r*M),z=(b*b-m*m-o*N)/(2*b*r*M),B=Math.log(Math.sqrt(E*E+1)-E),H=Math.log(Math.sqrt(z*z+1)-z);A=(H-B)/l,C=function(L){var q=L*A,X=Pp(B),ae=m/(r*M)*(X*KC(l*q+B)-QC(B));return[h+ae*w,g+ae*S,m*X/Pp(l*q+B)]}}return C.duration=A*1e3*l/Math.SQRT2,C}return s.rho=function(u){var f=Math.max(.001,+u),h=f*f,g=h*h;return t(f,h,g)},s})(Math.SQRT2,2,4);var ir=0,mo=0,uo=0,sv=1e3,Ac,go,Tc=0,mi=0,Vc=0,So=typeof performance=="object"&&performance.now?performance:Date,cv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function xh(){return mi||(cv(IC),mi=So.now()+Vc)}function IC(){mi=0}function Rc(){this._call=this._time=this._next=null}Rc.prototype=uv.prototype={constructor:Rc,restart:function(t,l,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?xh():+r)+(l==null?0:+l),!this._next&&go!==this&&(go?go._next=this:Ac=this,go=this),this._call=t,this._time=r,Qd()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qd())}};function uv(t,l,r){var o=new Rc;return o.restart(t,l,r),o}function JC(){xh(),++ir;for(var t=Ac,l;t;)(l=mi-t._time)>=0&&t._call.call(void 0,l),t=t._next;--ir}function ey(){mi=(Tc=So.now())+Vc,ir=mo=0;try{JC()}finally{ir=0,WC(),mi=0}}function FC(){var t=So.now(),l=t-Tc;l>sv&&(Vc-=l,Tc=t)}function WC(){for(var t,l=Ac,r,o=1/0;l;)l._call?(o>l._time&&(o=l._time),t=l,l=l._next):(r=l._next,l._next=null,l=t?t._next=r:Ac=r);go=t,Qd(o)}function Qd(t){if(!ir){mo&&(mo=clearTimeout(mo));var l=t-mi;l>24?(t<1/0&&(mo=setTimeout(ey,t-So.now()-Vc)),uo&&(uo=clearInterval(uo))):(uo||(Tc=So.now(),uo=setInterval(FC,sv)),ir=1,cv(ey))}}function ty(t,l,r){var o=new Rc;return l=l==null?0:+l,o.restart(s=>{o.stop(),t(s+l)},l,r),o}var PC=Bc("start","end","cancel","interrupt"),eM=[],fv=0,ny=1,Kd=2,xc=3,ay=4,Id=5,vc=6;function Yc(t,l,r,o,s,u){var f=t.__transition;if(!f)t.__transition={};else if(r in f)return;tM(t,r,{name:l,index:o,group:s,on:PC,tween:eM,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:fv})}function vh(t,l){var r=ia(t,l);if(r.state>fv)throw new Error("too late; already scheduled");return r}function pa(t,l){var r=ia(t,l);if(r.state>xc)throw new Error("too late; already running");return r}function ia(t,l){var r=t.__transition;if(!r||!(r=r[l]))throw new Error("transition not found");return r}function tM(t,l,r){var o=t.__transition,s;o[l]=r,r.timer=uv(u,0,r.time);function u(m){r.state=ny,r.timer.restart(f,r.delay,r.time),r.delay<=m&&f(m-r.delay)}function f(m){var x,p,b,w;if(r.state!==ny)return g();for(x in o)if(w=o[x],w.name===r.name){if(w.state===xc)return ty(f);w.state===ay?(w.state=vc,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete o[x]):+x<l&&(w.state=vc,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete o[x])}if(ty(function(){r.state===xc&&(r.state=ay,r.timer.restart(h,r.delay,r.time),h(m))}),r.state=Kd,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Kd){for(r.state=xc,s=new Array(b=r.tween.length),x=0,p=-1;x<b;++x)(w=r.tween[x].value.call(t,t.__data__,r.index,r.group))&&(s[++p]=w);s.length=p+1}}function h(m){for(var x=m<r.duration?r.ease.call(null,m/r.duration):(r.timer.restart(g),r.state=Id,1),p=-1,b=s.length;++p<b;)s[p].call(t,x);r.state===Id&&(r.on.call("end",t,t.__data__,r.index,r.group),g())}function g(){r.state=vc,r.timer.stop(),delete o[l];for(var m in o)return;delete t.__transition}}function bc(t,l){var r=t.__transition,o,s,u=!0,f;if(r){l=l==null?null:l+"";for(f in r){if((o=r[f]).name!==l){u=!1;continue}s=o.state>Kd&&o.state<Id,o.state=vc,o.timer.stop(),o.on.call(s?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete r[f]}u&&delete t.__transition}}function nM(t){return this.each(function(){bc(this,t)})}function aM(t,l){var r,o;return function(){var s=pa(this,t),u=s.tween;if(u!==r){o=r=u;for(var f=0,h=o.length;f<h;++f)if(o[f].name===l){o=o.slice(),o.splice(f,1);break}}s.tween=o}}function lM(t,l,r){var o,s;if(typeof r!="function")throw new Error;return function(){var u=pa(this,t),f=u.tween;if(f!==o){s=(o=f).slice();for(var h={name:l,value:r},g=0,m=s.length;g<m;++g)if(s[g].name===l){s[g]=h;break}g===m&&s.push(h)}u.tween=s}}function iM(t,l){var r=this._id;if(t+="",arguments.length<2){for(var o=ia(this.node(),r).tween,s=0,u=o.length,f;s<u;++s)if((f=o[s]).name===t)return f.value;return null}return this.each((l==null?aM:lM)(r,t,l))}function bh(t,l,r){var o=t._id;return t.each(function(){var s=pa(this,o);(s.value||(s.value={}))[l]=r.apply(this,arguments)}),function(s){return ia(s,o).value[l]}}function dv(t,l){var r;return(typeof l=="number"?fa:l instanceof hi?Mc:(r=hi(l))?(l=r,Mc):iv)(t,l)}function rM(t){return function(){this.removeAttribute(t)}}function oM(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sM(t,l,r){var o,s=r+"",u;return function(){var f=this.getAttribute(t);return f===s?null:f===o?u:u=l(o=f,r)}}function cM(t,l,r){var o,s=r+"",u;return function(){var f=this.getAttributeNS(t.space,t.local);return f===s?null:f===o?u:u=l(o=f,r)}}function uM(t,l,r){var o,s,u;return function(){var f,h=r(this),g;return h==null?void this.removeAttribute(t):(f=this.getAttribute(t),g=h+"",f===g?null:f===o&&g===s?u:(s=g,u=l(o=f,h)))}}function fM(t,l,r){var o,s,u;return function(){var f,h=r(this),g;return h==null?void this.removeAttributeNS(t.space,t.local):(f=this.getAttributeNS(t.space,t.local),g=h+"",f===g?null:f===o&&g===s?u:(s=g,u=l(o=f,h)))}}function dM(t,l){var r=Uc(t),o=r==="transform"?XC:dv;return this.attrTween(t,typeof l=="function"?(r.local?fM:uM)(r,o,bh(this,"attr."+t,l)):l==null?(r.local?oM:rM)(r):(r.local?cM:sM)(r,o,l))}function hM(t,l){return function(r){this.setAttribute(t,l.call(this,r))}}function mM(t,l){return function(r){this.setAttributeNS(t.space,t.local,l.call(this,r))}}function gM(t,l){var r,o;function s(){var u=l.apply(this,arguments);return u!==o&&(r=(o=u)&&mM(t,u)),r}return s._value=l,s}function pM(t,l){var r,o;function s(){var u=l.apply(this,arguments);return u!==o&&(r=(o=u)&&hM(t,u)),r}return s._value=l,s}function yM(t,l){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(l==null)return this.tween(r,null);if(typeof l!="function")throw new Error;var o=Uc(t);return this.tween(r,(o.local?gM:pM)(o,l))}function xM(t,l){return function(){vh(this,t).delay=+l.apply(this,arguments)}}function vM(t,l){return l=+l,function(){vh(this,t).delay=l}}function bM(t){var l=this._id;return arguments.length?this.each((typeof t=="function"?xM:vM)(l,t)):ia(this.node(),l).delay}function wM(t,l){return function(){pa(this,t).duration=+l.apply(this,arguments)}}function SM(t,l){return l=+l,function(){pa(this,t).duration=l}}function EM(t){var l=this._id;return arguments.length?this.each((typeof t=="function"?wM:SM)(l,t)):ia(this.node(),l).duration}function _M(t,l){if(typeof l!="function")throw new Error;return function(){pa(this,t).ease=l}}function NM(t){var l=this._id;return arguments.length?this.each(_M(l,t)):ia(this.node(),l).ease}function CM(t,l){return function(){var r=l.apply(this,arguments);if(typeof r!="function")throw new Error;pa(this,t).ease=r}}function MM(t){if(typeof t!="function")throw new Error;return this.each(CM(this._id,t))}function AM(t){typeof t!="function"&&(t=$x(t));for(var l=this._groups,r=l.length,o=new Array(r),s=0;s<r;++s)for(var u=l[s],f=u.length,h=o[s]=[],g,m=0;m<f;++m)(g=u[m])&&t.call(g,g.__data__,m,u)&&h.push(g);return new Pa(o,this._parents,this._name,this._id)}function TM(t){if(t._id!==this._id)throw new Error;for(var l=this._groups,r=t._groups,o=l.length,s=r.length,u=Math.min(o,s),f=new Array(o),h=0;h<u;++h)for(var g=l[h],m=r[h],x=g.length,p=f[h]=new Array(x),b,w=0;w<x;++w)(b=g[w]||m[w])&&(p[w]=b);for(;h<o;++h)f[h]=l[h];return new Pa(f,this._parents,this._name,this._id)}function RM(t){return(t+"").trim().split(/^|\s+/).every(function(l){var r=l.indexOf(".");return r>=0&&(l=l.slice(0,r)),!l||l==="start"})}function zM(t,l,r){var o,s,u=RM(l)?vh:pa;return function(){var f=u(this,t),h=f.on;h!==o&&(s=(o=h).copy()).on(l,r),f.on=s}}function OM(t,l){var r=this._id;return arguments.length<2?ia(this.node(),r).on.on(t):this.each(zM(r,t,l))}function jM(t){return function(){var l=this.parentNode;for(var r in this.__transition)if(+r!==t)return;l&&l.removeChild(this)}}function DM(){return this.on("end.remove",jM(this._id))}function kM(t){var l=this._name,r=this._id;typeof t!="function"&&(t=mh(t));for(var o=this._groups,s=o.length,u=new Array(s),f=0;f<s;++f)for(var h=o[f],g=h.length,m=u[f]=new Array(g),x,p,b=0;b<g;++b)(x=h[b])&&(p=t.call(x,x.__data__,b,h))&&("__data__"in x&&(p.__data__=x.__data__),m[b]=p,Yc(m[b],l,r,b,m,ia(x,r)));return new Pa(u,this._parents,l,r)}function HM(t){var l=this._name,r=this._id;typeof t!="function"&&(t=qx(t));for(var o=this._groups,s=o.length,u=[],f=[],h=0;h<s;++h)for(var g=o[h],m=g.length,x,p=0;p<m;++p)if(x=g[p]){for(var b=t.call(x,x.__data__,p,g),w,S=ia(x,r),N=0,C=b.length;N<C;++N)(w=b[N])&&Yc(w,l,r,N,b,S);u.push(b),f.push(x)}return new Pa(u,f,l,r)}var LM=ko.prototype.constructor;function BM(){return new LM(this._groups,this._parents)}function UM(t,l){var r,o,s;return function(){var u=lr(this,t),f=(this.style.removeProperty(t),lr(this,t));return u===f?null:u===r&&f===o?s:s=l(r=u,o=f)}}function hv(t){return function(){this.style.removeProperty(t)}}function VM(t,l,r){var o,s=r+"",u;return function(){var f=lr(this,t);return f===s?null:f===o?u:u=l(o=f,r)}}function YM(t,l,r){var o,s,u;return function(){var f=lr(this,t),h=r(this),g=h+"";return h==null&&(g=h=(this.style.removeProperty(t),lr(this,t))),f===g?null:f===o&&g===s?u:(s=g,u=l(o=f,h))}}function qM(t,l){var r,o,s,u="style."+l,f="end."+u,h;return function(){var g=pa(this,t),m=g.on,x=g.value[u]==null?h||(h=hv(l)):void 0;(m!==r||s!==x)&&(o=(r=m).copy()).on(f,s=x),g.on=o}}function $M(t,l,r){var o=(t+="")=="transform"?GC:dv;return l==null?this.styleTween(t,UM(t,o)).on("end.style."+t,hv(t)):typeof l=="function"?this.styleTween(t,YM(t,o,bh(this,"style."+t,l))).each(qM(this._id,t)):this.styleTween(t,VM(t,o,l),r).on("end.style."+t,null)}function GM(t,l,r){return function(o){this.style.setProperty(t,l.call(this,o),r)}}function XM(t,l,r){var o,s;function u(){var f=l.apply(this,arguments);return f!==s&&(o=(s=f)&&GM(t,f,r)),o}return u._value=l,u}function ZM(t,l,r){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(l==null)return this.tween(o,null);if(typeof l!="function")throw new Error;return this.tween(o,XM(t,l,r??""))}function QM(t){return function(){this.textContent=t}}function KM(t){return function(){var l=t(this);this.textContent=l??""}}function IM(t){return this.tween("text",typeof t=="function"?KM(bh(this,"text",t)):QM(t==null?"":t+""))}function JM(t){return function(l){this.textContent=t.call(this,l)}}function FM(t){var l,r;function o(){var s=t.apply(this,arguments);return s!==r&&(l=(r=s)&&JM(s)),l}return o._value=t,o}function WM(t){var l="text";if(arguments.length<1)return(l=this.tween(l))&&l._value;if(t==null)return this.tween(l,null);if(typeof t!="function")throw new Error;return this.tween(l,FM(t))}function PM(){for(var t=this._name,l=this._id,r=mv(),o=this._groups,s=o.length,u=0;u<s;++u)for(var f=o[u],h=f.length,g,m=0;m<h;++m)if(g=f[m]){var x=ia(g,l);Yc(g,t,r,m,f,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new Pa(o,this._parents,t,r)}function e4(){var t,l,r=this,o=r._id,s=r.size();return new Promise(function(u,f){var h={value:f},g={value:function(){--s===0&&u()}};r.each(function(){var m=pa(this,o),x=m.on;x!==t&&(l=(t=x).copy(),l._.cancel.push(h),l._.interrupt.push(h),l._.end.push(g)),m.on=l}),s===0&&u()})}var t4=0;function Pa(t,l,r,o){this._groups=t,this._parents=l,this._name=r,this._id=o}function mv(){return++t4}var Xa=ko.prototype;Pa.prototype={constructor:Pa,select:kM,selectAll:HM,selectChild:Xa.selectChild,selectChildren:Xa.selectChildren,filter:AM,merge:TM,selection:BM,transition:PM,call:Xa.call,nodes:Xa.nodes,node:Xa.node,size:Xa.size,empty:Xa.empty,each:Xa.each,on:OM,attr:dM,attrTween:yM,style:$M,styleTween:ZM,text:IM,textTween:WM,remove:DM,tween:iM,delay:bM,duration:EM,ease:NM,easeVarying:MM,end:e4,[Symbol.iterator]:Xa[Symbol.iterator]};function n4(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var a4={time:null,delay:0,duration:250,ease:n4};function l4(t,l){for(var r;!(r=t.__transition)||!(r=r[l]);)if(!(t=t.parentNode))throw new Error(`transition ${l} not found`);return r}function i4(t){var l,r;t instanceof Pa?(l=t._id,t=t._name):(l=mv(),(r=a4).time=xh(),t=t==null?null:t+"");for(var o=this._groups,s=o.length,u=0;u<s;++u)for(var f=o[u],h=f.length,g,m=0;m<h;++m)(g=f[m])&&Yc(g,t,l,m,f,r||l4(g,l));return new Pa(o,this._parents,t,l)}ko.prototype.interrupt=nM;ko.prototype.transition=i4;const sc=t=>()=>t;function r4(t,{sourceEvent:l,target:r,transform:o,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:l,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:s}})}function Ia(t,l,r){this.k=t,this.x=l,this.y=r}Ia.prototype={constructor:Ia,scale:function(t){return t===1?this:new Ia(this.k*t,this.x,this.y)},translate:function(t,l){return t===0&l===0?this:new Ia(this.k,this.x+this.k*t,this.y+this.k*l)},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 qc=new Ia(1,0,0);gv.prototype=Ia.prototype;function gv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return qc;return t.__zoom}function vd(t){t.stopImmediatePropagation()}function fo(t){t.preventDefault(),t.stopImmediatePropagation()}function o4(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function s4(){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 ly(){return this.__zoom||qc}function c4(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function u4(){return navigator.maxTouchPoints||"ontouchstart"in this}function f4(t,l,r){var o=t.invertX(l[0][0])-r[0][0],s=t.invertX(l[1][0])-r[1][0],u=t.invertY(l[0][1])-r[0][1],f=t.invertY(l[1][1])-r[1][1];return t.translate(s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s),f>u?(u+f)/2:Math.min(0,u)||Math.max(0,f))}function pv(){var t=o4,l=s4,r=f4,o=c4,s=u4,u=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,g=yc,m=Bc("start","zoom","end"),x,p,b,w=500,S=150,N=0,C=10;function A(j){j.property("__zoom",ly).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",X).on("dblclick.zoom",ae).filter(s).on("touchstart.zoom",Q).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",ie).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(j,Z,T,k){var D=j.selection?j.selection():j;D.property("__zoom",ly),j!==D?B(j,Z,T,k):D.interrupt().each(function(){H(this,arguments).event(k).start().zoom(null,typeof Z=="function"?Z.apply(this,arguments):Z).end()})},A.scaleBy=function(j,Z,T,k){A.scaleTo(j,function(){var D=this.__zoom.k,G=typeof Z=="function"?Z.apply(this,arguments):Z;return D*G},T,k)},A.scaleTo=function(j,Z,T,k){A.transform(j,function(){var D=l.apply(this,arguments),G=this.__zoom,te=T==null?z(D):typeof T=="function"?T.apply(this,arguments):T,R=G.invert(te),U=typeof Z=="function"?Z.apply(this,arguments):Z;return r(E(M(G,U),te,R),D,f)},T,k)},A.translateBy=function(j,Z,T,k){A.transform(j,function(){return r(this.__zoom.translate(typeof Z=="function"?Z.apply(this,arguments):Z,typeof T=="function"?T.apply(this,arguments):T),l.apply(this,arguments),f)},null,k)},A.translateTo=function(j,Z,T,k,D){A.transform(j,function(){var G=l.apply(this,arguments),te=this.__zoom,R=k==null?z(G):typeof k=="function"?k.apply(this,arguments):k;return r(qc.translate(R[0],R[1]).scale(te.k).translate(typeof Z=="function"?-Z.apply(this,arguments):-Z,typeof T=="function"?-T.apply(this,arguments):-T),G,f)},k,D)};function M(j,Z){return Z=Math.max(u[0],Math.min(u[1],Z)),Z===j.k?j:new Ia(Z,j.x,j.y)}function E(j,Z,T){var k=Z[0]-T[0]*j.k,D=Z[1]-T[1]*j.k;return k===j.x&&D===j.y?j:new Ia(j.k,k,D)}function z(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function B(j,Z,T,k){j.on("start.zoom",function(){H(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(k).end()}).tween("zoom",function(){var D=this,G=arguments,te=H(D,G).event(k),R=l.apply(D,G),U=T==null?z(R):typeof T=="function"?T.apply(D,G):T,I=Math.max(R[1][0]-R[0][0],R[1][1]-R[0][1]),P=D.__zoom,ue=typeof Z=="function"?Z.apply(D,G):Z,de=g(P.invert(U).concat(I/P.k),ue.invert(U).concat(I/ue.k));return function(se){if(se===1)se=ue;else{var fe=de(se),me=I/fe[2];se=new Ia(me,U[0]-fe[0]*me,U[1]-fe[1]*me)}te.zoom(null,se)}})}function H(j,Z,T){return!T&&j.__zooming||new L(j,Z)}function L(j,Z){this.that=j,this.args=Z,this.active=0,this.sourceEvent=null,this.extent=l.apply(j,Z),this.taps=0}L.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,Z){return this.mouse&&j!=="mouse"&&(this.mouse[1]=Z.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=Z.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=Z.invert(this.touch1[0])),this.that.__zoom=Z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var Z=Tn(this.that).datum();m.call(j,this.that,new r4(j,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:m}),Z)}};function q(j,...Z){if(!t.apply(this,arguments))return;var T=H(this,Z).event(j),k=this.__zoom,D=Math.max(u[0],Math.min(u[1],k.k*Math.pow(2,o.apply(this,arguments)))),G=Pn(j);if(T.wheel)(T.mouse[0][0]!==G[0]||T.mouse[0][1]!==G[1])&&(T.mouse[1]=k.invert(T.mouse[0]=G)),clearTimeout(T.wheel);else{if(k.k===D)return;T.mouse=[G,k.invert(G)],bc(this),T.start()}fo(j),T.wheel=setTimeout(te,S),T.zoom("mouse",r(E(M(k,D),T.mouse[0],T.mouse[1]),T.extent,f));function te(){T.wheel=null,T.end()}}function X(j,...Z){if(b||!t.apply(this,arguments))return;var T=j.currentTarget,k=H(this,Z,!0).event(j),D=Tn(j.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",I,!0),G=Pn(j,T),te=j.clientX,R=j.clientY;Px(j.view),vd(j),k.mouse=[G,this.__zoom.invert(G)],bc(this),k.start();function U(P){if(fo(P),!k.moved){var ue=P.clientX-te,de=P.clientY-R;k.moved=ue*ue+de*de>N}k.event(P).zoom("mouse",r(E(k.that.__zoom,k.mouse[0]=Pn(P,T),k.mouse[1]),k.extent,f))}function I(P){D.on("mousemove.zoom mouseup.zoom",null),ev(P.view,k.moved),fo(P),k.event(P).end()}}function ae(j,...Z){if(t.apply(this,arguments)){var T=this.__zoom,k=Pn(j.changedTouches?j.changedTouches[0]:j,this),D=T.invert(k),G=T.k*(j.shiftKey?.5:2),te=r(E(M(T,G),k,D),l.apply(this,Z),f);fo(j),h>0?Tn(this).transition().duration(h).call(B,te,k,j):Tn(this).call(A.transform,te,k,j)}}function Q(j,...Z){if(t.apply(this,arguments)){var T=j.touches,k=T.length,D=H(this,Z,j.changedTouches.length===k).event(j),G,te,R,U;for(vd(j),te=0;te<k;++te)R=T[te],U=Pn(R,this),U=[U,this.__zoom.invert(U),R.identifier],D.touch0?!D.touch1&&D.touch0[2]!==U[2]&&(D.touch1=U,D.taps=0):(D.touch0=U,G=!0,D.taps=1+!!x);x&&(x=clearTimeout(x)),G&&(D.taps<2&&(p=U[0],x=setTimeout(function(){x=null},w)),bc(this),D.start())}}function W(j,...Z){if(this.__zooming){var T=H(this,Z).event(j),k=j.changedTouches,D=k.length,G,te,R,U;for(fo(j),G=0;G<D;++G)te=k[G],R=Pn(te,this),T.touch0&&T.touch0[2]===te.identifier?T.touch0[0]=R:T.touch1&&T.touch1[2]===te.identifier&&(T.touch1[0]=R);if(te=T.that.__zoom,T.touch1){var I=T.touch0[0],P=T.touch0[1],ue=T.touch1[0],de=T.touch1[1],se=(se=ue[0]-I[0])*se+(se=ue[1]-I[1])*se,fe=(fe=de[0]-P[0])*fe+(fe=de[1]-P[1])*fe;te=M(te,Math.sqrt(se/fe)),R=[(I[0]+ue[0])/2,(I[1]+ue[1])/2],U=[(P[0]+de[0])/2,(P[1]+de[1])/2]}else if(T.touch0)R=T.touch0[0],U=T.touch0[1];else return;T.zoom("touch",r(E(te,R,U),T.extent,f))}}function ie(j,...Z){if(this.__zooming){var T=H(this,Z).event(j),k=j.changedTouches,D=k.length,G,te;for(vd(j),b&&clearTimeout(b),b=setTimeout(function(){b=null},w),G=0;G<D;++G)te=k[G],T.touch0&&T.touch0[2]===te.identifier?delete T.touch0:T.touch1&&T.touch1[2]===te.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(te=Pn(te,this),Math.hypot(p[0]-te[0],p[1]-te[1])<C)){var R=Tn(this).on("dblclick.zoom");R&&R.apply(this,arguments)}}}return A.wheelDelta=function(j){return arguments.length?(o=typeof j=="function"?j:sc(+j),A):o},A.filter=function(j){return arguments.length?(t=typeof j=="function"?j:sc(!!j),A):t},A.touchable=function(j){return arguments.length?(s=typeof j=="function"?j:sc(!!j),A):s},A.extent=function(j){return arguments.length?(l=typeof j=="function"?j:sc([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),A):l},A.scaleExtent=function(j){return arguments.length?(u[0]=+j[0],u[1]=+j[1],A):[u[0],u[1]]},A.translateExtent=function(j){return arguments.length?(f[0][0]=+j[0][0],f[1][0]=+j[1][0],f[0][1]=+j[0][1],f[1][1]=+j[1][1],A):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},A.constrain=function(j){return arguments.length?(r=j,A):r},A.duration=function(j){return arguments.length?(h=+j,A):h},A.interpolate=function(j){return arguments.length?(g=j,A):g},A.on=function(){var j=m.on.apply(m,arguments);return j===m?A:j},A.clickDistance=function(j){return arguments.length?(N=(j=+j)*j,A):Math.sqrt(N)},A.tapDistance=function(j){return arguments.length?(C=+j,A):C},A}const ma={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:l,sourceHandle:r,targetHandle:o})=>`Couldn't create edge for ${t} handle id: "${t==="source"?r:o}", edge id: ${l}.`,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."},Eo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],yv=["Enter"," ","Escape"],xv={"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:l,y:r})=>`Moved selected node ${t}. New position, x: ${l}, 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 rr;(function(t){t.Strict="strict",t.Loose="loose"})(rr||(rr={}));var fi;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(fi||(fi={}));var _o;(function(t){t.Partial="partial",t.Full="full"})(_o||(_o={}));const vv={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var kl;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(kl||(kl={}));var No;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(No||(No={}));var Ce;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(Ce||(Ce={}));const iy={[Ce.Left]:Ce.Right,[Ce.Right]:Ce.Left,[Ce.Top]:Ce.Bottom,[Ce.Bottom]:Ce.Top};function bv(t){return t===null?null:t?"valid":"invalid"}const wv=t=>"id"in t&&"source"in t&&"target"in t,d4=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),wh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Lo=(t,l=[0,0])=>{const{width:r,height:o}=el(t),s=t.origin??l,u=r*s[0],f=o*s[1];return{x:t.position.x-u,y:t.position.y-f}},h4=(t,l={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const r=t.reduce((o,s)=>{const u=typeof s=="string";let f=!l.nodeLookup&&!u?s:void 0;l.nodeLookup&&(f=u?l.nodeLookup.get(s):wh(s)?s:l.nodeLookup.get(s.id));const h=f?zc(f,l.nodeOrigin):{x:0,y:0,x2:0,y2:0};return $c(o,h)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Gc(r)},Bo=(t,l={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return t.forEach(s=>{(l.filter===void 0||l.filter(s))&&(r=$c(r,zc(s)),o=!0)}),o?Gc(r):{x:0,y:0,width:0,height:0}},Sh=(t,l,[r,o,s]=[0,0,1],u=!1,f=!1)=>{const h={...Vo(l,[r,o,s]),width:l.width/s,height:l.height/s},g=[];for(const m of t.values()){const{measured:x,selectable:p=!0,hidden:b=!1}=m;if(f&&!p||b)continue;const w=x.width??m.width??m.initialWidth??null,S=x.height??m.height??m.initialHeight??null,N=Co(h,sr(m)),C=(w??0)*(S??0),A=u&&N>0;(!m.internals.handleBounds||A||N>=C||m.dragging)&&g.push(m)}return g},m4=(t,l)=>{const r=new Set;return t.forEach(o=>{r.add(o.id)}),l.filter(o=>r.has(o.source)||r.has(o.target))};function g4(t,l){const r=new Map,o=l?.nodes?new Set(l.nodes.map(s=>s.id)):null;return t.forEach(s=>{s.measured.width&&s.measured.height&&(l?.includeHiddenNodes||!s.hidden)&&(!o||o.has(s.id))&&r.set(s.id,s)}),r}async function p4({nodes:t,width:l,height:r,panZoom:o,minZoom:s,maxZoom:u},f){if(t.size===0)return Promise.resolve(!0);const h=g4(t,f),g=Bo(h),m=Eh(g,l,r,f?.minZoom??s,f?.maxZoom??u,f?.padding??.1);return await o.setViewport(m,{duration:f?.duration,ease:f?.ease,interpolate:f?.interpolate}),Promise.resolve(!0)}function Sv({nodeId:t,nextPosition:l,nodeLookup:r,nodeOrigin:o=[0,0],nodeExtent:s,onError:u}){const f=r.get(t),h=f.parentId?r.get(f.parentId):void 0,{x:g,y:m}=h?h.internals.positionAbsolute:{x:0,y:0},x=f.origin??o;let p=f.extent||s;if(f.extent==="parent"&&!f.expandParent)if(!h)u?.("005",ma.error005());else{const w=h.measured.width,S=h.measured.height;w&&S&&(p=[[g,m],[g+w,m+S]])}else h&&cr(f.extent)&&(p=[[f.extent[0][0]+g,f.extent[0][1]+m],[f.extent[1][0]+g,f.extent[1][1]+m]]);const b=cr(p)?gi(l,p,f.measured):l;return(f.measured.width===void 0||f.measured.height===void 0)&&u?.("015",ma.error015()),{position:{x:b.x-g+(f.measured.width??0)*x[0],y:b.y-m+(f.measured.height??0)*x[1]},positionAbsolute:b}}async function y4({nodesToRemove:t=[],edgesToRemove:l=[],nodes:r,edges:o,onBeforeDelete:s}){const u=new Set(t.map(b=>b.id)),f=[];for(const b of r){if(b.deletable===!1)continue;const w=u.has(b.id),S=!w&&b.parentId&&f.find(N=>N.id===b.parentId);(w||S)&&f.push(b)}const h=new Set(l.map(b=>b.id)),g=o.filter(b=>b.deletable!==!1),x=m4(f,g);for(const b of g)h.has(b.id)&&!x.find(S=>S.id===b.id)&&x.push(b);if(!s)return{edges:x,nodes:f};const p=await s({nodes:f,edges:x});return typeof p=="boolean"?p?{edges:x,nodes:f}:{edges:[],nodes:[]}:p}const or=(t,l=0,r=1)=>Math.min(Math.max(t,l),r),gi=(t={x:0,y:0},l,r)=>({x:or(t.x,l[0][0],l[1][0]-(r?.width??0)),y:or(t.y,l[0][1],l[1][1]-(r?.height??0))});function Ev(t,l,r){const{width:o,height:s}=el(r),{x:u,y:f}=r.internals.positionAbsolute;return gi(t,[[u,f],[u+o,f+s]],l)}const ry=(t,l,r)=>t<l?or(Math.abs(t-l),1,l)/l:t>r?-or(Math.abs(t-r),1,l)/l:0,_v=(t,l,r=15,o=40)=>{const s=ry(t.x,o,l.width-o)*r,u=ry(t.y,o,l.height-o)*r;return[s,u]},$c=(t,l)=>({x:Math.min(t.x,l.x),y:Math.min(t.y,l.y),x2:Math.max(t.x2,l.x2),y2:Math.max(t.y2,l.y2)}),Jd=({x:t,y:l,width:r,height:o})=>({x:t,y:l,x2:t+r,y2:l+o}),Gc=({x:t,y:l,x2:r,y2:o})=>({x:t,y:l,width:r-t,height:o-l}),sr=(t,l=[0,0])=>{const{x:r,y:o}=wh(t)?t.internals.positionAbsolute:Lo(t,l);return{x:r,y:o,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},zc=(t,l=[0,0])=>{const{x:r,y:o}=wh(t)?t.internals.positionAbsolute:Lo(t,l);return{x:r,y:o,x2:r+(t.measured?.width??t.width??t.initialWidth??0),y2:o+(t.measured?.height??t.height??t.initialHeight??0)}},Nv=(t,l)=>Gc($c(Jd(t),Jd(l))),Co=(t,l)=>{const r=Math.max(0,Math.min(t.x+t.width,l.x+l.width)-Math.max(t.x,l.x)),o=Math.max(0,Math.min(t.y+t.height,l.y+l.height)-Math.max(t.y,l.y));return Math.ceil(r*o)},oy=t=>ta(t.width)&&ta(t.height)&&ta(t.x)&&ta(t.y),ta=t=>!isNaN(t)&&isFinite(t),x4=(t,l)=>{},Uo=(t,l=[1,1])=>({x:l[0]*Math.round(t.x/l[0]),y:l[1]*Math.round(t.y/l[1])}),Vo=({x:t,y:l},[r,o,s],u=!1,f=[1,1])=>{const h={x:(t-r)/s,y:(l-o)/s};return u?Uo(h,f):h},Oc=({x:t,y:l},[r,o,s])=>({x:t*s+r,y:l*s+o});function Wi(t,l){if(typeof t=="number")return Math.floor((l-l/(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(l*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 v4(t,l,r){if(typeof t=="string"||typeof t=="number"){const o=Wi(t,r),s=Wi(t,l);return{top:o,right:s,bottom:o,left:s,x:s*2,y:o*2}}if(typeof t=="object"){const o=Wi(t.top??t.y??0,r),s=Wi(t.bottom??t.y??0,r),u=Wi(t.left??t.x??0,l),f=Wi(t.right??t.x??0,l);return{top:o,right:f,bottom:s,left:u,x:u+f,y:o+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function b4(t,l,r,o,s,u){const{x:f,y:h}=Oc(t,[l,r,o]),{x:g,y:m}=Oc({x:t.x+t.width,y:t.y+t.height},[l,r,o]),x=s-g,p=u-m;return{left:Math.floor(f),top:Math.floor(h),right:Math.floor(x),bottom:Math.floor(p)}}const Eh=(t,l,r,o,s,u)=>{const f=v4(u,l,r),h=(l-f.x)/t.width,g=(r-f.y)/t.height,m=Math.min(h,g),x=or(m,o,s),p=t.x+t.width/2,b=t.y+t.height/2,w=l/2-p*x,S=r/2-b*x,N=b4(t,w,S,x,l,r),C={left:Math.min(N.left-f.left,0),top:Math.min(N.top-f.top,0),right:Math.min(N.right-f.right,0),bottom:Math.min(N.bottom-f.bottom,0)};return{x:w-C.left+C.right,y:S-C.top+C.bottom,zoom:x}},Mo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function cr(t){return t!=null&&t!=="parent"}function el(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function Cv(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function Mv(t,l={width:0,height:0},r,o,s){const u={...t},f=o.get(r);if(f){const h=f.origin||s;u.x+=f.internals.positionAbsolute.x-(l.width??0)*h[0],u.y+=f.internals.positionAbsolute.y-(l.height??0)*h[1]}return u}function sy(t,l){if(t.size!==l.size)return!1;for(const r of t)if(!l.has(r))return!1;return!0}function w4(){let t,l;return{promise:new Promise((o,s)=>{t=o,l=s}),resolve:t,reject:l}}function S4(t){return{...xv,...t||{}}}function yo(t,{snapGrid:l=[0,0],snapToGrid:r=!1,transform:o,containerBounds:s}){const{x:u,y:f}=na(t),h=Vo({x:u-(s?.left??0),y:f-(s?.top??0)},o),{x:g,y:m}=r?Uo(h,l):h;return{xSnapped:g,ySnapped:m,...h}}const _h=t=>({width:t.offsetWidth,height:t.offsetHeight}),Av=t=>t?.getRootNode?.()||window?.document,E4=["INPUT","SELECT","TEXTAREA"];function Tv(t){const l=t.composedPath?.()?.[0]||t.target;return l?.nodeType!==1?!1:E4.includes(l.nodeName)||l.hasAttribute("contenteditable")||!!l.closest(".nokey")}const Rv=t=>"clientX"in t,na=(t,l)=>{const r=Rv(t),o=r?t.clientX:t.touches?.[0].clientX,s=r?t.clientY:t.touches?.[0].clientY;return{x:o-(l?.left??0),y:s-(l?.top??0)}},cy=(t,l,r,o,s)=>{const u=l.querySelectorAll(`.${t}`);return!u||!u.length?null:Array.from(u).map(f=>{const h=f.getBoundingClientRect();return{id:f.getAttribute("data-handleid"),type:t,nodeId:s,position:f.getAttribute("data-handlepos"),x:(h.left-r.left)/o,y:(h.top-r.top)/o,..._h(f)}})};function zv({sourceX:t,sourceY:l,targetX:r,targetY:o,sourceControlX:s,sourceControlY:u,targetControlX:f,targetControlY:h}){const g=t*.125+s*.375+f*.375+r*.125,m=l*.125+u*.375+h*.375+o*.125,x=Math.abs(g-t),p=Math.abs(m-l);return[g,m,x,p]}function cc(t,l){return t>=0?.5*t:l*25*Math.sqrt(-t)}function uy({pos:t,x1:l,y1:r,x2:o,y2:s,c:u}){switch(t){case Ce.Left:return[l-cc(l-o,u),r];case Ce.Right:return[l+cc(o-l,u),r];case Ce.Top:return[l,r-cc(r-s,u)];case Ce.Bottom:return[l,r+cc(s-r,u)]}}function Ov({sourceX:t,sourceY:l,sourcePosition:r=Ce.Bottom,targetX:o,targetY:s,targetPosition:u=Ce.Top,curvature:f=.25}){const[h,g]=uy({pos:r,x1:t,y1:l,x2:o,y2:s,c:f}),[m,x]=uy({pos:u,x1:o,y1:s,x2:t,y2:l,c:f}),[p,b,w,S]=zv({sourceX:t,sourceY:l,targetX:o,targetY:s,sourceControlX:h,sourceControlY:g,targetControlX:m,targetControlY:x});return[`M${t},${l} C${h},${g} ${m},${x} ${o},${s}`,p,b,w,S]}function jv({sourceX:t,sourceY:l,targetX:r,targetY:o}){const s=Math.abs(r-t)/2,u=r<t?r+s:r-s,f=Math.abs(o-l)/2,h=o<l?o+f:o-f;return[u,h,s,f]}function _4({sourceNode:t,targetNode:l,selected:r=!1,zIndex:o=0,elevateOnSelect:s=!1,zIndexMode:u="basic"}){if(u==="manual")return o;const f=s&&r?o+1e3:o,h=Math.max(t.parentId||s&&t.selected?t.internals.z:0,l.parentId||s&&l.selected?l.internals.z:0);return f+h}function N4({sourceNode:t,targetNode:l,width:r,height:o,transform:s}){const u=$c(zc(t),zc(l));u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const f={x:-s[0]/s[2],y:-s[1]/s[2],width:r/s[2],height:o/s[2]};return Co(f,Gc(u))>0}const C4=({source:t,sourceHandle:l,target:r,targetHandle:o})=>`xy-edge__${t}${l||""}-${r}${o||""}`,M4=(t,l)=>l.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)),A4=(t,l,r={})=>{if(!t.source||!t.target)return l;const o=r.getEdgeId||C4;let s;return wv(t)?s={...t}:s={...t,id:o(t)},M4(s,l)?l:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,l.concat(s))};function Dv({sourceX:t,sourceY:l,targetX:r,targetY:o}){const[s,u,f,h]=jv({sourceX:t,sourceY:l,targetX:r,targetY:o});return[`M ${t},${l}L ${r},${o}`,s,u,f,h]}const fy={[Ce.Left]:{x:-1,y:0},[Ce.Right]:{x:1,y:0},[Ce.Top]:{x:0,y:-1},[Ce.Bottom]:{x:0,y:1}},T4=({source:t,sourcePosition:l=Ce.Bottom,target:r})=>l===Ce.Left||l===Ce.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},dy=(t,l)=>Math.sqrt(Math.pow(l.x-t.x,2)+Math.pow(l.y-t.y,2));function R4({source:t,sourcePosition:l=Ce.Bottom,target:r,targetPosition:o=Ce.Top,center:s,offset:u,stepPosition:f}){const h=fy[l],g=fy[o],m={x:t.x+h.x*u,y:t.y+h.y*u},x={x:r.x+g.x*u,y:r.y+g.y*u},p=T4({source:m,sourcePosition:l,target:x}),b=p.x!==0?"x":"y",w=p[b];let S=[],N,C;const A={x:0,y:0},M={x:0,y:0},[,,E,z]=jv({sourceX:t.x,sourceY:t.y,targetX:r.x,targetY:r.y});if(h[b]*g[b]===-1){b==="x"?(N=s.x??m.x+(x.x-m.x)*f,C=s.y??(m.y+x.y)/2):(N=s.x??(m.x+x.x)/2,C=s.y??m.y+(x.y-m.y)*f);const H=[{x:N,y:m.y},{x:N,y:x.y}],L=[{x:m.x,y:C},{x:x.x,y:C}];h[b]===w?S=b==="x"?H:L:S=b==="x"?L:H}else{const H=[{x:m.x,y:x.y}],L=[{x:x.x,y:m.y}];if(b==="x"?S=h.x===w?L:H:S=h.y===w?H:L,l===o){const W=Math.abs(t[b]-r[b]);if(W<=u){const ie=Math.min(u-1,u-W);h[b]===w?A[b]=(m[b]>t[b]?-1:1)*ie:M[b]=(x[b]>r[b]?-1:1)*ie}}if(l!==o){const W=b==="x"?"y":"x",ie=h[b]===g[W],j=m[W]>x[W],Z=m[W]<x[W];(h[b]===1&&(!ie&&j||ie&&Z)||h[b]!==1&&(!ie&&Z||ie&&j))&&(S=b==="x"?H:L)}const q={x:m.x+A.x,y:m.y+A.y},X={x:x.x+M.x,y:x.y+M.y},ae=Math.max(Math.abs(q.x-S[0].x),Math.abs(X.x-S[0].x)),Q=Math.max(Math.abs(q.y-S[0].y),Math.abs(X.y-S[0].y));ae>=Q?(N=(q.x+X.x)/2,C=S[0].y):(N=S[0].x,C=(q.y+X.y)/2)}return[[t,{x:m.x+A.x,y:m.y+A.y},...S,{x:x.x+M.x,y:x.y+M.y},r],N,C,E,z]}function z4(t,l,r,o){const s=Math.min(dy(t,l)/2,dy(l,r)/2,o),{x:u,y:f}=l;if(t.x===u&&u===r.x||t.y===f&&f===r.y)return`L${u} ${f}`;if(t.y===f){const m=t.x<r.x?-1:1,x=t.y<r.y?1:-1;return`L ${u+s*m},${f}Q ${u},${f} ${u},${f+s*x}`}const h=t.x<r.x?1:-1,g=t.y<r.y?-1:1;return`L ${u},${f+s*g}Q ${u},${f} ${u+s*h},${f}`}function Fd({sourceX:t,sourceY:l,sourcePosition:r=Ce.Bottom,targetX:o,targetY:s,targetPosition:u=Ce.Top,borderRadius:f=5,centerX:h,centerY:g,offset:m=20,stepPosition:x=.5}){const[p,b,w,S,N]=R4({source:{x:t,y:l},sourcePosition:r,target:{x:o,y:s},targetPosition:u,center:{x:h,y:g},offset:m,stepPosition:x});return[p.reduce((A,M,E)=>{let z="";return E>0&&E<p.length-1?z=z4(p[E-1],M,p[E+1],f):z=`${E===0?"M":"L"}${M.x} ${M.y}`,A+=z,A},""),b,w,S,N]}function hy(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function O4(t){const{sourceNode:l,targetNode:r}=t;if(!hy(l)||!hy(r))return null;const o=l.internals.handleBounds||my(l.handles),s=r.internals.handleBounds||my(r.handles),u=gy(o?.source??[],t.sourceHandle),f=gy(t.connectionMode===rr.Strict?s?.target??[]:(s?.target??[]).concat(s?.source??[]),t.targetHandle);if(!u||!f)return t.onError?.("008",ma.error008(u?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const h=u?.position||Ce.Bottom,g=f?.position||Ce.Top,m=pi(l,u,h),x=pi(r,f,g);return{sourceX:m.x,sourceY:m.y,targetX:x.x,targetY:x.y,sourcePosition:h,targetPosition:g}}function my(t){if(!t)return null;const l=[],r=[];for(const o of t)o.width=o.width??1,o.height=o.height??1,o.type==="source"?l.push(o):o.type==="target"&&r.push(o);return{source:l,target:r}}function pi(t,l,r=Ce.Left,o=!1){const s=(l?.x??0)+t.internals.positionAbsolute.x,u=(l?.y??0)+t.internals.positionAbsolute.y,{width:f,height:h}=l??el(t);if(o)return{x:s+f/2,y:u+h/2};switch(l?.position??r){case Ce.Top:return{x:s+f/2,y:u};case Ce.Right:return{x:s+f,y:u+h/2};case Ce.Bottom:return{x:s+f/2,y:u+h};case Ce.Left:return{x:s,y:u+h/2}}}function gy(t,l){return t&&(l?t.find(r=>r.id===l):t[0])||null}function Wd(t,l){return t?typeof t=="string"?t:`${l?`${l}__`:""}${Object.keys(t).sort().map(o=>`${o}=${t[o]}`).join("&")}`:""}function j4(t,{id:l,defaultColor:r,defaultMarkerStart:o,defaultMarkerEnd:s}){const u=new Set;return t.reduce((f,h)=>([h.markerStart||o,h.markerEnd||s].forEach(g=>{if(g&&typeof g=="object"){const m=Wd(g,l);u.has(m)||(f.push({id:m,color:g.color||r,...g}),u.add(m))}}),f),[]).sort((f,h)=>f.id.localeCompare(h.id))}const kv=1e3,D4=10,Nh={nodeOrigin:[0,0],nodeExtent:Eo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},k4={...Nh,checkEquality:!0};function Ch(t,l){const r={...t};for(const o in l)l[o]!==void 0&&(r[o]=l[o]);return r}function H4(t,l,r){const o=Ch(Nh,r);for(const s of t.values())if(s.parentId)Ah(s,t,l,o);else{const u=Lo(s,o.nodeOrigin),f=cr(s.extent)?s.extent:o.nodeExtent,h=gi(u,f,el(s));s.internals.positionAbsolute=h}}function L4(t,l){if(!t.handles)return t.measured?l?.internals.handleBounds:void 0;const r=[],o=[];for(const s of t.handles){const u={id:s.id,width:s.width??1,height:s.height??1,nodeId:t.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?r.push(u):s.type==="target"&&o.push(u)}return{source:r,target:o}}function Mh(t){return t==="manual"}function Pd(t,l,r,o={}){const s=Ch(k4,o),u={i:0},f=new Map(l),h=s?.elevateNodesOnSelect&&!Mh(s.zIndexMode)?kv:0;let g=t.length>0;l.clear(),r.clear();for(const m of t){let x=f.get(m.id);if(s.checkEquality&&m===x?.internals.userNode)l.set(m.id,x);else{const p=Lo(m,s.nodeOrigin),b=cr(m.extent)?m.extent:s.nodeExtent,w=gi(p,b,el(m));x={...s.defaults,...m,measured:{width:m.measured?.width,height:m.measured?.height},internals:{positionAbsolute:w,handleBounds:L4(m,x),z:Hv(m,h,s.zIndexMode),userNode:m}},l.set(m.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(g=!1),m.parentId&&Ah(x,l,r,o,u)}return g}function B4(t,l){if(!t.parentId)return;const r=l.get(t.parentId);r?r.set(t.id,t):l.set(t.parentId,new Map([[t.id,t]]))}function Ah(t,l,r,o,s){const{elevateNodesOnSelect:u,nodeOrigin:f,nodeExtent:h,zIndexMode:g}=Ch(Nh,o),m=t.parentId,x=l.get(m);if(!x){console.warn(`Parent node ${m} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}B4(t,r),s&&!x.parentId&&x.internals.rootParentIndex===void 0&&g==="auto"&&(x.internals.rootParentIndex=++s.i,x.internals.z=x.internals.z+s.i*D4),s&&x.internals.rootParentIndex!==void 0&&(s.i=x.internals.rootParentIndex);const p=u&&!Mh(g)?kv:0,{x:b,y:w,z:S}=U4(t,x,f,h,p,g),{positionAbsolute:N}=t.internals,C=b!==N.x||w!==N.y;(C||S!==t.internals.z)&&l.set(t.id,{...t,internals:{...t.internals,positionAbsolute:C?{x:b,y:w}:N,z:S}})}function Hv(t,l,r){const o=ta(t.zIndex)?t.zIndex:0;return Mh(r)?o:o+(t.selected?l:0)}function U4(t,l,r,o,s,u){const{x:f,y:h}=l.internals.positionAbsolute,g=el(t),m=Lo(t,r),x=cr(t.extent)?gi(m,t.extent,g):m;let p=gi({x:f+x.x,y:h+x.y},o,g);t.extent==="parent"&&(p=Ev(p,g,l));const b=Hv(t,s,u),w=l.internals.z??0;return{x:p.x,y:p.y,z:w>=b?w+1:b}}function Th(t,l,r,o=[0,0]){const s=[],u=new Map;for(const f of t){const h=l.get(f.parentId);if(!h)continue;const g=u.get(f.parentId)?.expandedRect??sr(h),m=Nv(g,f.rect);u.set(f.parentId,{expandedRect:m,parent:h})}return u.size>0&&u.forEach(({expandedRect:f,parent:h},g)=>{const m=h.internals.positionAbsolute,x=el(h),p=h.origin??o,b=f.x<m.x?Math.round(Math.abs(m.x-f.x)):0,w=f.y<m.y?Math.round(Math.abs(m.y-f.y)):0,S=Math.max(x.width,Math.round(f.width)),N=Math.max(x.height,Math.round(f.height)),C=(S-x.width)*p[0],A=(N-x.height)*p[1];(b>0||w>0||C||A)&&(s.push({id:g,type:"position",position:{x:h.position.x-b+C,y:h.position.y-w+A}}),r.get(g)?.forEach(M=>{t.some(E=>E.id===M.id)||s.push({id:M.id,type:"position",position:{x:M.position.x+b,y:M.position.y+w}})})),(x.width<f.width||x.height<f.height||b||w)&&s.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:S+(b?p[0]*b-C:0),height:N+(w?p[1]*w-A:0)}})}),s}function V4(t,l,r,o,s,u,f){const h=o?.querySelector(".xyflow__viewport");let g=!1;if(!h)return{changes:[],updatedInternals:g};const m=[],x=window.getComputedStyle(h),{m22:p}=new window.DOMMatrixReadOnly(x.transform),b=[];for(const w of t.values()){const S=l.get(w.id);if(!S)continue;if(S.hidden){l.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),g=!0;continue}const N=_h(w.nodeElement),C=S.measured.width!==N.width||S.measured.height!==N.height;if(!!(N.width&&N.height&&(C||!S.internals.handleBounds||w.force))){const M=w.nodeElement.getBoundingClientRect(),E=cr(S.extent)?S.extent:u;let{positionAbsolute:z}=S.internals;S.parentId&&S.extent==="parent"?z=Ev(z,N,l.get(S.parentId)):E&&(z=gi(z,E,N));const B={...S,measured:N,internals:{...S.internals,positionAbsolute:z,handleBounds:{source:cy("source",w.nodeElement,M,p,S.id),target:cy("target",w.nodeElement,M,p,S.id)}}};l.set(S.id,B),S.parentId&&Ah(B,l,r,{nodeOrigin:s,zIndexMode:f}),g=!0,C&&(m.push({id:S.id,type:"dimensions",dimensions:N}),S.expandParent&&S.parentId&&b.push({id:S.id,parentId:S.parentId,rect:sr(B,s)}))}}if(b.length>0){const w=Th(b,l,r,s);m.push(...w)}return{changes:m,updatedInternals:g}}async function Y4({delta:t,panZoom:l,transform:r,translateExtent:o,width:s,height:u}){if(!l||!t.x&&!t.y)return Promise.resolve(!1);const f=await l.setViewportConstrained({x:r[0]+t.x,y:r[1]+t.y,zoom:r[2]},[[0,0],[s,u]],o),h=!!f&&(f.x!==r[0]||f.y!==r[1]||f.k!==r[2]);return Promise.resolve(h)}function py(t,l,r,o,s,u){let f=s;const h=o.get(f)||new Map;o.set(f,h.set(r,l)),f=`${s}-${t}`;const g=o.get(f)||new Map;if(o.set(f,g.set(r,l)),u){f=`${s}-${t}-${u}`;const m=o.get(f)||new Map;o.set(f,m.set(r,l))}}function Lv(t,l,r){t.clear(),l.clear();for(const o of r){const{source:s,target:u,sourceHandle:f=null,targetHandle:h=null}=o,g={edgeId:o.id,source:s,target:u,sourceHandle:f,targetHandle:h},m=`${s}-${f}--${u}-${h}`,x=`${u}-${h}--${s}-${f}`;py("source",g,x,t,s,f),py("target",g,m,t,u,h),l.set(o.id,o)}}function Bv(t,l){if(!t.parentId)return!1;const r=l.get(t.parentId);return r?r.selected?!0:Bv(r,l):!1}function yy(t,l,r){let o=t;do{if(o?.matches?.(l))return!0;if(o===r)return!1;o=o?.parentElement}while(o);return!1}function q4(t,l,r,o){const s=new Map;for(const[u,f]of t)if((f.selected||f.id===o)&&(!f.parentId||!Bv(f,t))&&(f.draggable||l&&typeof f.draggable>"u")){const h=t.get(u);h&&s.set(u,{id:u,position:h.position||{x:0,y:0},distance:{x:r.x-h.internals.positionAbsolute.x,y:r.y-h.internals.positionAbsolute.y},extent:h.extent,parentId:h.parentId,origin:h.origin,expandParent:h.expandParent,internals:{positionAbsolute:h.internals.positionAbsolute||{x:0,y:0}},measured:{width:h.measured.width??0,height:h.measured.height??0}})}return s}function bd({nodeId:t,dragItems:l,nodeLookup:r,dragging:o=!0}){const s=[];for(const[f,h]of l){const g=r.get(f)?.internals.userNode;g&&s.push({...g,position:h.position,dragging:o})}if(!t)return[s[0],s];const u=r.get(t)?.internals.userNode;return[u?{...u,position:l.get(t)?.position||u.position,dragging:o}:s[0],s]}function $4({dragItems:t,snapGrid:l,x:r,y:o}){const s=t.values().next().value;if(!s)return null;const u={x:r-s.distance.x,y:o-s.distance.y},f=Uo(u,l);return{x:f.x-u.x,y:f.y-u.y}}function G4({onNodeMouseDown:t,getStoreItems:l,onDragStart:r,onDrag:o,onDragStop:s}){let u={x:null,y:null},f=0,h=new Map,g=!1,m={x:0,y:0},x=null,p=!1,b=null,w=!1,S=!1,N=null;function C({noDragClassName:M,handleSelector:E,domNode:z,isSelectable:B,nodeId:H,nodeClickDistance:L=0}){b=Tn(z);function q({x:W,y:ie}){const{nodeLookup:j,nodeExtent:Z,snapGrid:T,snapToGrid:k,nodeOrigin:D,onNodeDrag:G,onSelectionDrag:te,onError:R,updateNodePositions:U}=l();u={x:W,y:ie};let I=!1;const P=h.size>1,ue=P&&Z?Jd(Bo(h)):null,de=P&&k?$4({dragItems:h,snapGrid:T,x:W,y:ie}):null;for(const[se,fe]of h){if(!j.has(se))continue;let me={x:W-fe.distance.x,y:ie-fe.distance.y};k&&(me=de?{x:Math.round(me.x+de.x),y:Math.round(me.y+de.y)}:Uo(me,T));let Te=null;if(P&&Z&&!fe.extent&&ue){const{positionAbsolute:Re}=fe.internals,Ve=Re.x-ue.x+Z[0][0],at=Re.x+fe.measured.width-ue.x2+Z[1][0],Me=Re.y-ue.y+Z[0][1],Le=Re.y+fe.measured.height-ue.y2+Z[1][1];Te=[[Ve,Me],[at,Le]]}const{position:je,positionAbsolute:Se}=Sv({nodeId:se,nextPosition:me,nodeLookup:j,nodeExtent:Te||Z,nodeOrigin:D,onError:R});I=I||fe.position.x!==je.x||fe.position.y!==je.y,fe.position=je,fe.internals.positionAbsolute=Se}if(S=S||I,!!I&&(U(h,!0),N&&(o||G||!H&&te))){const[se,fe]=bd({nodeId:H,dragItems:h,nodeLookup:j});o?.(N,h,se,fe),G?.(N,se,fe),H||te?.(N,fe)}}async function X(){if(!x)return;const{transform:W,panBy:ie,autoPanSpeed:j,autoPanOnNodeDrag:Z}=l();if(!Z){g=!1,cancelAnimationFrame(f);return}const[T,k]=_v(m,x,j);(T!==0||k!==0)&&(u.x=(u.x??0)-T/W[2],u.y=(u.y??0)-k/W[2],await ie({x:T,y:k})&&q(u)),f=requestAnimationFrame(X)}function ae(W){const{nodeLookup:ie,multiSelectionActive:j,nodesDraggable:Z,transform:T,snapGrid:k,snapToGrid:D,selectNodesOnDrag:G,onNodeDragStart:te,onSelectionDragStart:R,unselectNodesAndEdges:U}=l();p=!0,(!G||!B)&&!j&&H&&(ie.get(H)?.selected||U()),B&&G&&H&&t?.(H);const I=yo(W.sourceEvent,{transform:T,snapGrid:k,snapToGrid:D,containerBounds:x});if(u=I,h=q4(ie,Z,I,H),h.size>0&&(r||te||!H&&R)){const[P,ue]=bd({nodeId:H,dragItems:h,nodeLookup:ie});r?.(W.sourceEvent,h,P,ue),te?.(W.sourceEvent,P,ue),H||R?.(W.sourceEvent,ue)}}const Q=tv().clickDistance(L).on("start",W=>{const{domNode:ie,nodeDragThreshold:j,transform:Z,snapGrid:T,snapToGrid:k}=l();x=ie?.getBoundingClientRect()||null,w=!1,S=!1,N=W.sourceEvent,j===0&&ae(W),u=yo(W.sourceEvent,{transform:Z,snapGrid:T,snapToGrid:k,containerBounds:x}),m=na(W.sourceEvent,x)}).on("drag",W=>{const{autoPanOnNodeDrag:ie,transform:j,snapGrid:Z,snapToGrid:T,nodeDragThreshold:k,nodeLookup:D}=l(),G=yo(W.sourceEvent,{transform:j,snapGrid:Z,snapToGrid:T,containerBounds:x});if(N=W.sourceEvent,(W.sourceEvent.type==="touchmove"&&W.sourceEvent.touches.length>1||H&&!D.has(H))&&(w=!0),!w){if(!g&&ie&&p&&(g=!0,X()),!p){const te=na(W.sourceEvent,x),R=te.x-m.x,U=te.y-m.y;Math.sqrt(R*R+U*U)>k&&ae(W)}(u.x!==G.xSnapped||u.y!==G.ySnapped)&&h&&p&&(m=na(W.sourceEvent,x),q(G))}}).on("end",W=>{if(!(!p||w)&&(g=!1,p=!1,cancelAnimationFrame(f),h.size>0)){const{nodeLookup:ie,updateNodePositions:j,onNodeDragStop:Z,onSelectionDragStop:T}=l();if(S&&(j(h,!1),S=!1),s||Z||!H&&T){const[k,D]=bd({nodeId:H,dragItems:h,nodeLookup:ie,dragging:!1});s?.(W.sourceEvent,h,k,D),Z?.(W.sourceEvent,k,D),H||T?.(W.sourceEvent,D)}}}).filter(W=>{const ie=W.target;return!W.button&&(!M||!yy(ie,`.${M}`,z))&&(!E||yy(ie,E,z))});b.call(Q)}function A(){b?.on(".drag",null)}return{update:C,destroy:A}}function X4(t,l,r){const o=[],s={x:t.x-r,y:t.y-r,width:r*2,height:r*2};for(const u of l.values())Co(s,sr(u))>0&&o.push(u);return o}const Z4=250;function Q4(t,l,r,o){let s=[],u=1/0;const f=X4(t,r,l+Z4);for(const h of f){const g=[...h.internals.handleBounds?.source??[],...h.internals.handleBounds?.target??[]];for(const m of g){if(o.nodeId===m.nodeId&&o.type===m.type&&o.id===m.id)continue;const{x,y:p}=pi(h,m,m.position,!0),b=Math.sqrt(Math.pow(x-t.x,2)+Math.pow(p-t.y,2));b>l||(b<u?(s=[{...m,x,y:p}],u=b):b===u&&s.push({...m,x,y:p}))}}if(!s.length)return null;if(s.length>1){const h=o.type==="source"?"target":"source";return s.find(g=>g.type===h)??s[0]}return s[0]}function Uv(t,l,r,o,s,u=!1){const f=o.get(t);if(!f)return null;const h=s==="strict"?f.internals.handleBounds?.[l]:[...f.internals.handleBounds?.source??[],...f.internals.handleBounds?.target??[]],g=(r?h?.find(m=>m.id===r):h?.[0])??null;return g&&u?{...g,...pi(f,g,g.position,!0)}:g}function Vv(t,l){return t||(l?.classList.contains("target")?"target":l?.classList.contains("source")?"source":null)}function K4(t,l){let r=null;return l?r=!0:t&&!l&&(r=!1),r}const Yv=()=>!0;function I4(t,{connectionMode:l,connectionRadius:r,handleId:o,nodeId:s,edgeUpdaterType:u,isTarget:f,domNode:h,nodeLookup:g,lib:m,autoPanOnConnect:x,flowId:p,panBy:b,cancelConnection:w,onConnectStart:S,onConnect:N,onConnectEnd:C,isValidConnection:A=Yv,onReconnectEnd:M,updateConnection:E,getTransform:z,getFromHandle:B,autoPanSpeed:H,dragThreshold:L=1,handleDomNode:q}){const X=Av(t.target);let ae=0,Q;const{x:W,y:ie}=na(t),j=Vv(u,q),Z=h?.getBoundingClientRect();let T=!1;if(!Z||!j)return;const k=Uv(s,j,o,g,l);if(!k)return;let D=na(t,Z),G=!1,te=null,R=!1,U=null;function I(){if(!x||!Z)return;const[je,Se]=_v(D,Z,H);b({x:je,y:Se}),ae=requestAnimationFrame(I)}const P={...k,nodeId:s,type:j,position:k.position},ue=g.get(s);let se={inProgress:!0,isValid:null,from:pi(ue,P,Ce.Left,!0),fromHandle:P,fromPosition:P.position,fromNode:ue,to:D,toHandle:null,toPosition:iy[P.position],toNode:null,pointer:D};function fe(){T=!0,E(se),S?.(t,{nodeId:s,handleId:o,handleType:j})}L===0&&fe();function me(je){if(!T){const{x:Le,y:We}=na(je),Ge=Le-W,xt=We-ie;if(!(Ge*Ge+xt*xt>L*L))return;fe()}if(!B()||!P){Te(je);return}const Se=z();D=na(je,Z),Q=Q4(Vo(D,Se,!1,[1,1]),r,g,P),G||(I(),G=!0);const Re=qv(je,{handle:Q,connectionMode:l,fromNodeId:s,fromHandleId:o,fromType:f?"target":"source",isValidConnection:A,doc:X,lib:m,flowId:p,nodeLookup:g});U=Re.handleDomNode,te=Re.connection,R=K4(!!Q,Re.isValid);const Ve=g.get(s),at=Ve?pi(Ve,P,Ce.Left,!0):se.from,Me={...se,from:at,isValid:R,to:Re.toHandle&&R?Oc({x:Re.toHandle.x,y:Re.toHandle.y},Se):D,toHandle:Re.toHandle,toPosition:R&&Re.toHandle?Re.toHandle.position:iy[P.position],toNode:Re.toHandle?g.get(Re.toHandle.nodeId):null,pointer:D};E(Me),se=Me}function Te(je){if(!("touches"in je&&je.touches.length>0)){if(T){(Q||U)&&te&&R&&N?.(te);const{inProgress:Se,...Re}=se,Ve={...Re,toPosition:se.toHandle?se.toPosition:null};C?.(je,Ve),u&&M?.(je,Ve)}w(),cancelAnimationFrame(ae),G=!1,R=!1,te=null,U=null,X.removeEventListener("mousemove",me),X.removeEventListener("mouseup",Te),X.removeEventListener("touchmove",me),X.removeEventListener("touchend",Te)}}X.addEventListener("mousemove",me),X.addEventListener("mouseup",Te),X.addEventListener("touchmove",me),X.addEventListener("touchend",Te)}function qv(t,{handle:l,connectionMode:r,fromNodeId:o,fromHandleId:s,fromType:u,doc:f,lib:h,flowId:g,isValidConnection:m=Yv,nodeLookup:x}){const p=u==="target",b=l?f.querySelector(`.${h}-flow__handle[data-id="${g}-${l?.nodeId}-${l?.id}-${l?.type}"]`):null,{x:w,y:S}=na(t),N=f.elementFromPoint(w,S),C=N?.classList.contains(`${h}-flow__handle`)?N:b,A={handleDomNode:C,isValid:!1,connection:null,toHandle:null};if(C){const M=Vv(void 0,C),E=C.getAttribute("data-nodeid"),z=C.getAttribute("data-handleid"),B=C.classList.contains("connectable"),H=C.classList.contains("connectableend");if(!E||!M)return A;const L={source:p?E:o,sourceHandle:p?z:s,target:p?o:E,targetHandle:p?s:z};A.connection=L;const X=B&&H&&(r===rr.Strict?p&&M==="source"||!p&&M==="target":E!==o||z!==s);A.isValid=X&&m(L),A.toHandle=Uv(E,M,z,x,r,!0)}return A}const eh={onPointerDown:I4,isValid:qv};function J4({domNode:t,panZoom:l,getTransform:r,getViewScale:o}){const s=Tn(t);function u({translateExtent:h,width:g,height:m,zoomStep:x=1,pannable:p=!0,zoomable:b=!0,inversePan:w=!1}){const S=E=>{if(E.sourceEvent.type!=="wheel"||!l)return;const z=r(),B=E.sourceEvent.ctrlKey&&Mo()?10:1,H=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*x,L=z[2]*Math.pow(2,H*B);l.scaleTo(L)};let N=[0,0];const C=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(N=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},A=E=>{const z=r();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!l)return;const B=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],H=[B[0]-N[0],B[1]-N[1]];N=B;const L=o()*Math.max(z[2],Math.log(z[2]))*(w?-1:1),q={x:z[0]-H[0]*L,y:z[1]-H[1]*L},X=[[0,0],[g,m]];l.setViewportConstrained({x:q.x,y:q.y,zoom:z[2]},X,h)},M=pv().on("start",C).on("zoom",p?A:null).on("zoom.wheel",b?S:null);s.call(M,{})}function f(){s.on("zoom",null)}return{update:u,destroy:f,pointer:Pn}}const Xc=t=>({x:t.x,y:t.y,zoom:t.k}),wd=({x:t,y:l,zoom:r})=>qc.translate(t,l).scale(r),Pi=(t,l)=>t.target.closest(`.${l}`),$v=(t,l)=>l===2&&Array.isArray(t)&&t.includes(2),F4=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,Sd=(t,l=0,r=F4,o=()=>{})=>{const s=typeof l=="number"&&l>0;return s||o(),s?t.transition().duration(l).ease(r).on("end",o):t},Gv=t=>{const l=t.ctrlKey&&Mo()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*l};function W4({zoomPanValues:t,noWheelClassName:l,d3Selection:r,d3Zoom:o,panOnScrollMode:s,panOnScrollSpeed:u,zoomOnPinch:f,onPanZoomStart:h,onPanZoom:g,onPanZoomEnd:m}){return x=>{if(Pi(x,l))return x.ctrlKey&&x.preventDefault(),!1;x.preventDefault(),x.stopImmediatePropagation();const p=r.property("__zoom").k||1;if(x.ctrlKey&&f){const C=Pn(x),A=Gv(x),M=p*Math.pow(2,A);o.scaleTo(r,M,C,x);return}const b=x.deltaMode===1?20:1;let w=s===fi.Vertical?0:x.deltaX*b,S=s===fi.Horizontal?0:x.deltaY*b;!Mo()&&x.shiftKey&&s!==fi.Vertical&&(w=x.deltaY*b,S=0),o.translateBy(r,-(w/p)*u,-(S/p)*u,{internal:!0});const N=Xc(r.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(g?.(x,N),t.panScrollTimeout=setTimeout(()=>{m?.(x,N),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,h?.(x,N))}}function P4({noWheelClassName:t,preventScrolling:l,d3ZoomHandler:r}){return function(o,s){const u=o.type==="wheel",f=!l&&u&&!o.ctrlKey,h=Pi(o,t);if(o.ctrlKey&&u&&h&&o.preventDefault(),f||h)return null;o.preventDefault(),r.call(this,o,s)}}function e3({zoomPanValues:t,onDraggingChange:l,onPanZoomStart:r}){return o=>{if(o.sourceEvent?.internal)return;const s=Xc(o.transform);t.mouseButton=o.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=s,o.sourceEvent?.type==="mousedown"&&l(!0),r&&r?.(o.sourceEvent,s)}}function t3({zoomPanValues:t,panOnDrag:l,onPaneContextMenu:r,onTransformChange:o,onPanZoom:s}){return u=>{t.usedRightMouseButton=!!(r&&$v(l,t.mouseButton??0)),u.sourceEvent?.sync||o([u.transform.x,u.transform.y,u.transform.k]),s&&!u.sourceEvent?.internal&&s?.(u.sourceEvent,Xc(u.transform))}}function n3({zoomPanValues:t,panOnDrag:l,panOnScroll:r,onDraggingChange:o,onPanZoomEnd:s,onPaneContextMenu:u}){return f=>{if(!f.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,u&&$v(l,t.mouseButton??0)&&!t.usedRightMouseButton&&f.sourceEvent&&u(f.sourceEvent),t.usedRightMouseButton=!1,o(!1),s)){const h=Xc(f.transform);t.prevViewport=h,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{s?.(f.sourceEvent,h)},r?150:0)}}}function a3({zoomActivationKeyPressed:t,zoomOnScroll:l,zoomOnPinch:r,panOnDrag:o,panOnScroll:s,zoomOnDoubleClick:u,userSelectionActive:f,noWheelClassName:h,noPanClassName:g,lib:m,connectionInProgress:x}){return p=>{const b=t||l,w=r&&p.ctrlKey,S=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Pi(p,`${m}-flow__node`)||Pi(p,`${m}-flow__edge`)))return!0;if(!o&&!b&&!s&&!u&&!r||f||x&&!S||Pi(p,h)&&S||Pi(p,g)&&(!S||s&&S&&!t)||!r&&p.ctrlKey&&S)return!1;if(!r&&p.type==="touchstart"&&p.touches?.length>1)return p.preventDefault(),!1;if(!b&&!s&&!w&&S||!o&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(o)&&!o.includes(p.button)&&p.type==="mousedown")return!1;const N=Array.isArray(o)&&o.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||S)&&N}}function l3({domNode:t,minZoom:l,maxZoom:r,translateExtent:o,viewport:s,onPanZoom:u,onPanZoomStart:f,onPanZoomEnd:h,onDraggingChange:g}){const m={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},x=t.getBoundingClientRect(),p=pv().scaleExtent([l,r]).translateExtent(o),b=Tn(t).call(p);M({x:s.x,y:s.y,zoom:or(s.zoom,l,r)},[[0,0],[x.width,x.height]],o);const w=b.on("wheel.zoom"),S=b.on("dblclick.zoom");p.wheelDelta(Gv);function N(Q,W){return b?new Promise(ie=>{p?.interpolate(W?.interpolate==="linear"?po:yc).transform(Sd(b,W?.duration,W?.ease,()=>ie(!0)),Q)}):Promise.resolve(!1)}function C({noWheelClassName:Q,noPanClassName:W,onPaneContextMenu:ie,userSelectionActive:j,panOnScroll:Z,panOnDrag:T,panOnScrollMode:k,panOnScrollSpeed:D,preventScrolling:G,zoomOnPinch:te,zoomOnScroll:R,zoomOnDoubleClick:U,zoomActivationKeyPressed:I,lib:P,onTransformChange:ue,connectionInProgress:de,paneClickDistance:se,selectionOnDrag:fe}){j&&!m.isZoomingOrPanning&&A();const me=Z&&!I&&!j;p.clickDistance(fe?1/0:!ta(se)||se<0?0:se);const Te=me?W4({zoomPanValues:m,noWheelClassName:Q,d3Selection:b,d3Zoom:p,panOnScrollMode:k,panOnScrollSpeed:D,zoomOnPinch:te,onPanZoomStart:f,onPanZoom:u,onPanZoomEnd:h}):P4({noWheelClassName:Q,preventScrolling:G,d3ZoomHandler:w});if(b.on("wheel.zoom",Te,{passive:!1}),!j){const Se=e3({zoomPanValues:m,onDraggingChange:g,onPanZoomStart:f});p.on("start",Se);const Re=t3({zoomPanValues:m,panOnDrag:T,onPaneContextMenu:!!ie,onPanZoom:u,onTransformChange:ue});p.on("zoom",Re);const Ve=n3({zoomPanValues:m,panOnDrag:T,panOnScroll:Z,onPaneContextMenu:ie,onPanZoomEnd:h,onDraggingChange:g});p.on("end",Ve)}const je=a3({zoomActivationKeyPressed:I,panOnDrag:T,zoomOnScroll:R,panOnScroll:Z,zoomOnDoubleClick:U,zoomOnPinch:te,userSelectionActive:j,noPanClassName:W,noWheelClassName:Q,lib:P,connectionInProgress:de});p.filter(je),U?b.on("dblclick.zoom",S):b.on("dblclick.zoom",null)}function A(){p.on("zoom",null)}async function M(Q,W,ie){const j=wd(Q),Z=p?.constrain()(j,W,ie);return Z&&await N(Z),new Promise(T=>T(Z))}async function E(Q,W){const ie=wd(Q);return await N(ie,W),new Promise(j=>j(ie))}function z(Q){if(b){const W=wd(Q),ie=b.property("__zoom");(ie.k!==Q.zoom||ie.x!==Q.x||ie.y!==Q.y)&&p?.transform(b,W,null,{sync:!0})}}function B(){const Q=b?gv(b.node()):{x:0,y:0,k:1};return{x:Q.x,y:Q.y,zoom:Q.k}}function H(Q,W){return b?new Promise(ie=>{p?.interpolate(W?.interpolate==="linear"?po:yc).scaleTo(Sd(b,W?.duration,W?.ease,()=>ie(!0)),Q)}):Promise.resolve(!1)}function L(Q,W){return b?new Promise(ie=>{p?.interpolate(W?.interpolate==="linear"?po:yc).scaleBy(Sd(b,W?.duration,W?.ease,()=>ie(!0)),Q)}):Promise.resolve(!1)}function q(Q){p?.scaleExtent(Q)}function X(Q){p?.translateExtent(Q)}function ae(Q){const W=!ta(Q)||Q<0?0:Q;p?.clickDistance(W)}return{update:C,destroy:A,setViewport:E,setViewportConstrained:M,getViewport:B,scaleTo:H,scaleBy:L,setScaleExtent:q,setTranslateExtent:X,syncViewport:z,setClickDistance:ae}}var ur;(function(t){t.Line="line",t.Handle="handle"})(ur||(ur={}));function i3({width:t,prevWidth:l,height:r,prevHeight:o,affectsX:s,affectsY:u}){const f=t-l,h=r-o,g=[f>0?1:f<0?-1:0,h>0?1:h<0?-1:0];return f&&s&&(g[0]=g[0]*-1),h&&u&&(g[1]=g[1]*-1),g}function xy(t){const l=t.includes("right")||t.includes("left"),r=t.includes("bottom")||t.includes("top"),o=t.includes("left"),s=t.includes("top");return{isHorizontal:l,isVertical:r,affectsX:o,affectsY:s}}function jl(t,l){return Math.max(0,l-t)}function Dl(t,l){return Math.max(0,t-l)}function uc(t,l,r){return Math.max(0,l-t,t-r)}function vy(t,l){return t?!l:l}function r3(t,l,r,o,s,u,f,h){let{affectsX:g,affectsY:m}=l;const{isHorizontal:x,isVertical:p}=l,b=x&&p,{xSnapped:w,ySnapped:S}=r,{minWidth:N,maxWidth:C,minHeight:A,maxHeight:M}=o,{x:E,y:z,width:B,height:H,aspectRatio:L}=t;let q=Math.floor(x?w-t.pointerX:0),X=Math.floor(p?S-t.pointerY:0);const ae=B+(g?-q:q),Q=H+(m?-X:X),W=-u[0]*B,ie=-u[1]*H;let j=uc(ae,N,C),Z=uc(Q,A,M);if(f){let D=0,G=0;g&&q<0?D=jl(E+q+W,f[0][0]):!g&&q>0&&(D=Dl(E+ae+W,f[1][0])),m&&X<0?G=jl(z+X+ie,f[0][1]):!m&&X>0&&(G=Dl(z+Q+ie,f[1][1])),j=Math.max(j,D),Z=Math.max(Z,G)}if(h){let D=0,G=0;g&&q>0?D=Dl(E+q,h[0][0]):!g&&q<0&&(D=jl(E+ae,h[1][0])),m&&X>0?G=Dl(z+X,h[0][1]):!m&&X<0&&(G=jl(z+Q,h[1][1])),j=Math.max(j,D),Z=Math.max(Z,G)}if(s){if(x){const D=uc(ae/L,A,M)*L;if(j=Math.max(j,D),f){let G=0;!g&&!m||g&&!m&&b?G=Dl(z+ie+ae/L,f[1][1])*L:G=jl(z+ie+(g?q:-q)/L,f[0][1])*L,j=Math.max(j,G)}if(h){let G=0;!g&&!m||g&&!m&&b?G=jl(z+ae/L,h[1][1])*L:G=Dl(z+(g?q:-q)/L,h[0][1])*L,j=Math.max(j,G)}}if(p){const D=uc(Q*L,N,C)/L;if(Z=Math.max(Z,D),f){let G=0;!g&&!m||m&&!g&&b?G=Dl(E+Q*L+W,f[1][0])/L:G=jl(E+(m?X:-X)*L+W,f[0][0])/L,Z=Math.max(Z,G)}if(h){let G=0;!g&&!m||m&&!g&&b?G=jl(E+Q*L,h[1][0])/L:G=Dl(E+(m?X:-X)*L,h[0][0])/L,Z=Math.max(Z,G)}}}X=X+(X<0?Z:-Z),q=q+(q<0?j:-j),s&&(b?ae>Q*L?X=(vy(g,m)?-q:q)/L:q=(vy(g,m)?-X:X)*L:x?(X=q/L,m=g):(q=X*L,g=m));const T=g?E+q:E,k=m?z+X:z;return{width:B+(g?-q:q),height:H+(m?-X:X),x:u[0]*q*(g?-1:1)+T,y:u[1]*X*(m?-1:1)+k}}const Xv={width:0,height:0,x:0,y:0},o3={...Xv,pointerX:0,pointerY:0,aspectRatio:1};function s3(t){return[[0,0],[t.measured.width,t.measured.height]]}function c3(t,l,r){const o=l.position.x+t.position.x,s=l.position.y+t.position.y,u=t.measured.width??0,f=t.measured.height??0,h=r[0]*u,g=r[1]*f;return[[o-h,s-g],[o+u-h,s+f-g]]}function u3({domNode:t,nodeId:l,getStoreItems:r,onChange:o,onEnd:s}){const u=Tn(t);let f={controlDirection:xy("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:m,boundaries:x,keepAspectRatio:p,resizeDirection:b,onResizeStart:w,onResize:S,onResizeEnd:N,shouldResize:C}){let A={...Xv},M={...o3};f={boundaries:x,resizeDirection:b,keepAspectRatio:p,controlDirection:xy(m)};let E,z=null,B=[],H,L,q,X=!1;const ae=tv().on("start",Q=>{const{nodeLookup:W,transform:ie,snapGrid:j,snapToGrid:Z,nodeOrigin:T,paneDomNode:k}=r();if(E=W.get(l),!E)return;z=k?.getBoundingClientRect()??null;const{xSnapped:D,ySnapped:G}=yo(Q.sourceEvent,{transform:ie,snapGrid:j,snapToGrid:Z,containerBounds:z});A={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},M={...A,pointerX:D,pointerY:G,aspectRatio:A.width/A.height},H=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(H=W.get(E.parentId),L=H&&E.extent==="parent"?s3(H):void 0),B=[],q=void 0;for(const[te,R]of W)if(R.parentId===l&&(B.push({id:te,position:{...R.position},extent:R.extent}),R.extent==="parent"||R.expandParent)){const U=c3(R,E,R.origin??T);q?q=[[Math.min(U[0][0],q[0][0]),Math.min(U[0][1],q[0][1])],[Math.max(U[1][0],q[1][0]),Math.max(U[1][1],q[1][1])]]:q=U}w?.(Q,{...A})}).on("drag",Q=>{const{transform:W,snapGrid:ie,snapToGrid:j,nodeOrigin:Z}=r(),T=yo(Q.sourceEvent,{transform:W,snapGrid:ie,snapToGrid:j,containerBounds:z}),k=[];if(!E)return;const{x:D,y:G,width:te,height:R}=A,U={},I=E.origin??Z,{width:P,height:ue,x:de,y:se}=r3(M,f.controlDirection,T,f.boundaries,f.keepAspectRatio,I,L,q),fe=P!==te,me=ue!==R,Te=de!==D&&fe,je=se!==G&&me;if(!Te&&!je&&!fe&&!me)return;if((Te||je||I[0]===1||I[1]===1)&&(U.x=Te?de:A.x,U.y=je?se:A.y,A.x=U.x,A.y=U.y,B.length>0)){const at=de-D,Me=se-G;for(const Le of B)Le.position={x:Le.position.x-at+I[0]*(P-te),y:Le.position.y-Me+I[1]*(ue-R)},k.push(Le)}if((fe||me)&&(U.width=fe&&(!f.resizeDirection||f.resizeDirection==="horizontal")?P:A.width,U.height=me&&(!f.resizeDirection||f.resizeDirection==="vertical")?ue:A.height,A.width=U.width,A.height=U.height),H&&E.expandParent){const at=I[0]*(U.width??0);U.x&&U.x<at&&(A.x=at,M.x=M.x-(U.x-at));const Me=I[1]*(U.height??0);U.y&&U.y<Me&&(A.y=Me,M.y=M.y-(U.y-Me))}const Se=i3({width:A.width,prevWidth:te,height:A.height,prevHeight:R,affectsX:f.controlDirection.affectsX,affectsY:f.controlDirection.affectsY}),Re={...A,direction:Se};C?.(Q,Re)!==!1&&(X=!0,S?.(Q,Re),o(U,k))}).on("end",Q=>{X&&(N?.(Q,{...A}),s?.({...A}),X=!1)});u.call(ae)}function g(){u.on(".drag",null)}return{update:h,destroy:g}}var Ed={exports:{}},_d={};var by;function f3(){if(by)return _d;by=1;var t=To(),l=xx();function r(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var o=typeof Object.is=="function"?Object.is:r,s=l.useSyncExternalStore,u=t.useRef,f=t.useEffect,h=t.useMemo,g=t.useDebugValue;return _d.useSyncExternalStoreWithSelector=function(m,x,p,b,w){var S=u(null);if(S.current===null){var N={hasValue:!1,value:null};S.current=N}else N=S.current;S=h(function(){function A(H){if(!M){if(M=!0,E=H,H=b(H),w!==void 0&&N.hasValue){var L=N.value;if(w(L,H))return z=L}return z=H}if(L=z,o(E,H))return L;var q=b(H);return w!==void 0&&w(L,q)?(E=H,L):(E=H,z=q)}var M=!1,E,z,B=p===void 0?null:p;return[function(){return A(x())},B===null?void 0:function(){return A(B())}]},[x,p,b,w]);var C=s(m,S[0],S[1]);return f(function(){N.hasValue=!0,N.value=C},[C]),g(C),C},_d}var wy;function d3(){return wy||(wy=1,Ed.exports=f3()),Ed.exports}var h3=d3();const m3=ah(h3),g3={},Sy=t=>{let l;const r=new Set,o=(x,p)=>{const b=typeof x=="function"?x(l):x;if(!Object.is(b,l)){const w=l;l=p??(typeof b!="object"||b===null)?b:Object.assign({},l,b),r.forEach(S=>S(l,w))}},s=()=>l,g={setState:o,getState:s,getInitialState:()=>m,subscribe:x=>(r.add(x),()=>r.delete(x)),destroy:()=>{(g3?"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()}},m=l=t(o,s,g);return g},p3=t=>t?Sy(t):Sy,{useDebugValue:y3}=Dc,{useSyncExternalStoreWithSelector:x3}=m3,v3=t=>t;function Zv(t,l=v3,r){const o=x3(t.subscribe,t.getState,t.getServerState||t.getInitialState,l,r);return y3(o),o}const Ey=(t,l)=>{const r=p3(t),o=(s,u=l)=>Zv(r,s,u);return Object.assign(o,r),o},b3=(t,l)=>t?Ey(t,l):Ey;function _t(t,l){if(Object.is(t,l))return!0;if(typeof t!="object"||t===null||typeof l!="object"||l===null)return!1;if(t instanceof Map&&l instanceof Map){if(t.size!==l.size)return!1;for(const[o,s]of t)if(!Object.is(s,l.get(o)))return!1;return!0}if(t instanceof Set&&l instanceof Set){if(t.size!==l.size)return!1;for(const o of t)if(!l.has(o))return!1;return!0}const r=Object.keys(t);if(r.length!==Object.keys(l).length)return!1;for(const o of r)if(!Object.prototype.hasOwnProperty.call(l,o)||!Object.is(t[o],l[o]))return!1;return!0}const Zc=O.createContext(null),w3=Zc.Provider,Qv=ma.error001();function Pe(t,l){const r=O.useContext(Zc);if(r===null)throw new Error(Qv);return Zv(r,t,l)}function Nt(){const t=O.useContext(Zc);if(t===null)throw new Error(Qv);return O.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const _y={display:"none"},S3={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Kv="react-flow__node-desc",Iv="react-flow__edge-desc",E3="react-flow__aria-live",_3=t=>t.ariaLiveMessage,N3=t=>t.ariaLabelConfig;function C3({rfId:t}){const l=Pe(_3);return y.jsx("div",{id:`${E3}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:S3,children:l})}function M3({rfId:t,disableKeyboardA11y:l}){const r=Pe(N3);return y.jsxs(y.Fragment,{children:[y.jsx("div",{id:`${Kv}-${t}`,style:_y,children:l?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),y.jsx("div",{id:`${Iv}-${t}`,style:_y,children:r["edge.a11yDescription.default"]}),!l&&y.jsx(C3,{rfId:t})]})}const Qc=O.forwardRef(({position:t="top-left",children:l,className:r,style:o,...s},u)=>{const f=`${t}`.split("-");return y.jsx("div",{className:$t(["react-flow__panel",r,...f]),style:o,ref:u,...s,children:l})});Qc.displayName="Panel";function A3({proOptions:t,position:l="bottom-right"}){return t?.hideAttribution?null:y.jsx(Qc,{position:l,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:y.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const T3=t=>{const l=[],r=[];for(const[,o]of t.nodeLookup)o.selected&&l.push(o.internals.userNode);for(const[,o]of t.edgeLookup)o.selected&&r.push(o);return{selectedNodes:l,selectedEdges:r}},fc=t=>t.id;function R3(t,l){return _t(t.selectedNodes.map(fc),l.selectedNodes.map(fc))&&_t(t.selectedEdges.map(fc),l.selectedEdges.map(fc))}function z3({onSelectionChange:t}){const l=Nt(),{selectedNodes:r,selectedEdges:o}=Pe(T3,R3);return O.useEffect(()=>{const s={nodes:r,edges:o};t?.(s),l.getState().onSelectionChangeHandlers.forEach(u=>u(s))},[r,o,t]),null}const O3=t=>!!t.onSelectionChangeHandlers;function j3({onSelectionChange:t}){const l=Pe(O3);return t||l?y.jsx(z3,{onSelectionChange:t}):null}const Jv=[0,0],D3={x:0,y:0,zoom:1},k3=["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"],Ny=[...k3,"rfId"],H3=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}),Cy={translateExtent:Eo,nodeOrigin:Jv,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function L3(t){const{setNodes:l,setEdges:r,setMinZoom:o,setMaxZoom:s,setTranslateExtent:u,setNodeExtent:f,reset:h,setDefaultNodesAndEdges:g}=Pe(H3,_t),m=Nt();O.useEffect(()=>(g(t.defaultNodes,t.defaultEdges),()=>{x.current=Cy,h()}),[]);const x=O.useRef(Cy);return O.useEffect(()=>{for(const p of Ny){const b=t[p],w=x.current[p];b!==w&&(typeof t[p]>"u"||(p==="nodes"?l(b):p==="edges"?r(b):p==="minZoom"?o(b):p==="maxZoom"?s(b):p==="translateExtent"?u(b):p==="nodeExtent"?f(b):p==="ariaLabelConfig"?m.setState({ariaLabelConfig:S4(b)}):p==="fitView"?m.setState({fitViewQueued:b}):p==="fitViewOptions"?m.setState({fitViewOptions:b}):m.setState({[p]:b})))}x.current=t},Ny.map(p=>t[p])),null}function My(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function B3(t){const[l,r]=O.useState(t==="system"?null:t);return O.useEffect(()=>{if(t!=="system"){r(t);return}const o=My(),s=()=>r(o?.matches?"dark":"light");return s(),o?.addEventListener("change",s),()=>{o?.removeEventListener("change",s)}},[t]),l!==null?l:My()?.matches?"dark":"light"}const Ay=typeof document<"u"?document:null;function Ao(t=null,l={target:Ay,actInsideInputWithModifier:!0}){const[r,o]=O.useState(!1),s=O.useRef(!1),u=O.useRef(new Set([])),[f,h]=O.useMemo(()=>{if(t!==null){const m=(Array.isArray(t)?t:[t]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
12
|
+
`).replace(`
|
|
13
|
+
|
|
14
|
+
`,`
|
|
15
|
+
+`).split(`
|
|
16
|
+
`)),x=m.reduce((p,b)=>p.concat(...b),[]);return[m,x]}return[[],[]]},[t]);return O.useEffect(()=>{const g=l?.target??Ay,m=l?.actInsideInputWithModifier??!0;if(t!==null){const x=w=>{if(s.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!s.current||s.current&&!m)&&Tv(w))return!1;const N=Ry(w.code,h);if(u.current.add(w[N]),Ty(f,u.current,!1)){const C=w.composedPath?.()?.[0]||w.target,A=C?.nodeName==="BUTTON"||C?.nodeName==="A";l.preventDefault!==!1&&(s.current||!A)&&w.preventDefault(),o(!0)}},p=w=>{const S=Ry(w.code,h);Ty(f,u.current,!0)?(o(!1),u.current.clear()):u.current.delete(w[S]),w.key==="Meta"&&u.current.clear(),s.current=!1},b=()=>{u.current.clear(),o(!1)};return g?.addEventListener("keydown",x),g?.addEventListener("keyup",p),window.addEventListener("blur",b),window.addEventListener("contextmenu",b),()=>{g?.removeEventListener("keydown",x),g?.removeEventListener("keyup",p),window.removeEventListener("blur",b),window.removeEventListener("contextmenu",b)}}},[t,o]),r}function Ty(t,l,r){return t.filter(o=>r||o.length===l.size).some(o=>o.every(s=>l.has(s)))}function Ry(t,l){return l.includes(t)?"code":"key"}const U3=()=>{const t=Nt();return O.useMemo(()=>({zoomIn:l=>{const{panZoom:r}=t.getState();return r?r.scaleBy(1.2,{duration:l?.duration}):Promise.resolve(!1)},zoomOut:l=>{const{panZoom:r}=t.getState();return r?r.scaleBy(1/1.2,{duration:l?.duration}):Promise.resolve(!1)},zoomTo:(l,r)=>{const{panZoom:o}=t.getState();return o?o.scaleTo(l,{duration:r?.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(l,r)=>{const{transform:[o,s,u],panZoom:f}=t.getState();return f?(await f.setViewport({x:l.x??o,y:l.y??s,zoom:l.zoom??u},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[l,r,o]=t.getState().transform;return{x:l,y:r,zoom:o}},setCenter:async(l,r,o)=>t.getState().setCenter(l,r,o),fitBounds:async(l,r)=>{const{width:o,height:s,minZoom:u,maxZoom:f,panZoom:h}=t.getState(),g=Eh(l,o,s,u,f,r?.padding??.1);return h?(await h.setViewport(g,{duration:r?.duration,ease:r?.ease,interpolate:r?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(l,r={})=>{const{transform:o,snapGrid:s,snapToGrid:u,domNode:f}=t.getState();if(!f)return l;const{x:h,y:g}=f.getBoundingClientRect(),m={x:l.x-h,y:l.y-g},x=r.snapGrid??s,p=r.snapToGrid??u;return Vo(m,o,p,x)},flowToScreenPosition:l=>{const{transform:r,domNode:o}=t.getState();if(!o)return l;const{x:s,y:u}=o.getBoundingClientRect(),f=Oc(l,r);return{x:f.x+s,y:f.y+u}}}),[])};function Fv(t,l){const r=[],o=new Map,s=[];for(const u of t)if(u.type==="add"){s.push(u);continue}else if(u.type==="remove"||u.type==="replace")o.set(u.id,[u]);else{const f=o.get(u.id);f?f.push(u):o.set(u.id,[u])}for(const u of l){const f=o.get(u.id);if(!f){r.push(u);continue}if(f[0].type==="remove")continue;if(f[0].type==="replace"){r.push({...f[0].item});continue}const h={...u};for(const g of f)V3(g,h);r.push(h)}return s.length&&s.forEach(u=>{u.index!==void 0?r.splice(u.index,0,{...u.item}):r.push({...u.item})}),r}function V3(t,l){switch(t.type){case"select":{l.selected=t.selected;break}case"position":{typeof t.position<"u"&&(l.position=t.position),typeof t.dragging<"u"&&(l.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(l.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(l.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(l.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(l.resizing=t.resizing);break}}}function Wv(t,l){return Fv(t,l)}function Pv(t,l){return Fv(t,l)}function si(t,l){return{id:t,type:"select",selected:l}}function er(t,l=new Set,r=!1){const o=[];for(const[s,u]of t){const f=l.has(s);!(u.selected===void 0&&!f)&&u.selected!==f&&(r&&(u.selected=f),o.push(si(u.id,f)))}return o}function zy({items:t=[],lookup:l}){const r=[],o=new Map(t.map(s=>[s.id,s]));for(const[s,u]of t.entries()){const f=l.get(u.id),h=f?.internals?.userNode??f;h!==void 0&&h!==u&&r.push({id:u.id,item:u,type:"replace"}),h===void 0&&r.push({item:u,type:"add",index:s})}for(const[s]of l)o.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function Oy(t){return{id:t.id,type:"remove"}}const jy=t=>d4(t),Y3=t=>wv(t);function eb(t){return O.forwardRef(t)}const q3=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Dy(t){const[l,r]=O.useState(BigInt(0)),[o]=O.useState(()=>$3(()=>r(s=>s+BigInt(1))));return q3(()=>{const s=o.get();s.length&&(t(s),o.reset())},[l]),o}function $3(t){let l=[];return{get:()=>l,reset:()=>{l=[]},push:r=>{l.push(r),t()}}}const tb=O.createContext(null);function G3({children:t}){const l=Nt(),r=O.useCallback(h=>{const{nodes:g=[],setNodes:m,hasDefaultNodes:x,onNodesChange:p,nodeLookup:b,fitViewQueued:w,onNodesChangeMiddlewareMap:S}=l.getState();let N=g;for(const A of h)N=typeof A=="function"?A(N):A;let C=zy({items:N,lookup:b});for(const A of S.values())C=A(C);x&&m(N),C.length>0?p?.(C):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:A,nodes:M,setNodes:E}=l.getState();A&&E(M)})},[]),o=Dy(r),s=O.useCallback(h=>{const{edges:g=[],setEdges:m,hasDefaultEdges:x,onEdgesChange:p,edgeLookup:b}=l.getState();let w=g;for(const S of h)w=typeof S=="function"?S(w):S;x?m(w):p&&p(zy({items:w,lookup:b}))},[]),u=Dy(s),f=O.useMemo(()=>({nodeQueue:o,edgeQueue:u}),[]);return y.jsx(tb.Provider,{value:f,children:t})}function X3(){const t=O.useContext(tb);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const Z3=t=>!!t.panZoom;function Rh(){const t=U3(),l=Nt(),r=X3(),o=Pe(Z3),s=O.useMemo(()=>{const u=p=>l.getState().nodeLookup.get(p),f=p=>{r.nodeQueue.push(p)},h=p=>{r.edgeQueue.push(p)},g=p=>{const{nodeLookup:b,nodeOrigin:w}=l.getState(),S=jy(p)?p:b.get(p.id),N=S.parentId?Mv(S.position,S.measured,S.parentId,b,w):S.position,C={...S,position:N,width:S.measured?.width??S.width,height:S.measured?.height??S.height};return sr(C)},m=(p,b,w={replace:!1})=>{f(S=>S.map(N=>{if(N.id===p){const C=typeof b=="function"?b(N):b;return w.replace&&jy(C)?C:{...N,...C}}return N}))},x=(p,b,w={replace:!1})=>{h(S=>S.map(N=>{if(N.id===p){const C=typeof b=="function"?b(N):b;return w.replace&&Y3(C)?C:{...N,...C}}return N}))};return{getNodes:()=>l.getState().nodes.map(p=>({...p})),getNode:p=>u(p)?.internals.userNode,getInternalNode:u,getEdges:()=>{const{edges:p=[]}=l.getState();return p.map(b=>({...b}))},getEdge:p=>l.getState().edgeLookup.get(p),setNodes:f,setEdges:h,addNodes:p=>{const b=Array.isArray(p)?p:[p];r.nodeQueue.push(w=>[...w,...b])},addEdges:p=>{const b=Array.isArray(p)?p:[p];r.edgeQueue.push(w=>[...w,...b])},toObject:()=>{const{nodes:p=[],edges:b=[],transform:w}=l.getState(),[S,N,C]=w;return{nodes:p.map(A=>({...A})),edges:b.map(A=>({...A})),viewport:{x:S,y:N,zoom:C}}},deleteElements:async({nodes:p=[],edges:b=[]})=>{const{nodes:w,edges:S,onNodesDelete:N,onEdgesDelete:C,triggerNodeChanges:A,triggerEdgeChanges:M,onDelete:E,onBeforeDelete:z}=l.getState(),{nodes:B,edges:H}=await y4({nodesToRemove:p,edgesToRemove:b,nodes:w,edges:S,onBeforeDelete:z}),L=H.length>0,q=B.length>0;if(L){const X=H.map(Oy);C?.(H),M(X)}if(q){const X=B.map(Oy);N?.(B),A(X)}return(q||L)&&E?.({nodes:B,edges:H}),{deletedNodes:B,deletedEdges:H}},getIntersectingNodes:(p,b=!0,w)=>{const S=oy(p),N=S?p:g(p),C=w!==void 0;return N?(w||l.getState().nodes).filter(A=>{const M=l.getState().nodeLookup.get(A.id);if(M&&!S&&(A.id===p.id||!M.internals.positionAbsolute))return!1;const E=sr(C?A:M),z=Co(E,N);return b&&z>0||z>=E.width*E.height||z>=N.width*N.height}):[]},isNodeIntersecting:(p,b,w=!0)=>{const N=oy(p)?p:g(p);if(!N)return!1;const C=Co(N,b);return w&&C>0||C>=b.width*b.height||C>=N.width*N.height},updateNode:m,updateNodeData:(p,b,w={replace:!1})=>{m(p,S=>{const N=typeof b=="function"?b(S):b;return w.replace?{...S,data:N}:{...S,data:{...S.data,...N}}},w)},updateEdge:x,updateEdgeData:(p,b,w={replace:!1})=>{x(p,S=>{const N=typeof b=="function"?b(S):b;return w.replace?{...S,data:N}:{...S,data:{...S.data,...N}}},w)},getNodesBounds:p=>{const{nodeLookup:b,nodeOrigin:w}=l.getState();return h4(p,{nodeLookup:b,nodeOrigin:w})},getHandleConnections:({type:p,id:b,nodeId:w})=>Array.from(l.getState().connectionLookup.get(`${w}-${p}${b?`-${b}`:""}`)?.values()??[]),getNodeConnections:({type:p,handleId:b,nodeId:w})=>Array.from(l.getState().connectionLookup.get(`${w}${p?b?`-${p}-${b}`:`-${p}`:""}`)?.values()??[]),fitView:async p=>{const b=l.getState().fitViewResolver??w4();return l.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:b}),r.nodeQueue.push(w=>[...w]),b.promise}}},[]);return O.useMemo(()=>({...s,...t,viewportInitialized:o}),[o])}const ky=t=>t.selected,Q3=typeof window<"u"?window:void 0;function K3({deleteKeyCode:t,multiSelectionKeyCode:l}){const r=Nt(),{deleteElements:o}=Rh(),s=Ao(t,{actInsideInputWithModifier:!1}),u=Ao(l,{target:Q3});O.useEffect(()=>{if(s){const{edges:f,nodes:h}=r.getState();o({nodes:h.filter(ky),edges:f.filter(ky)}),r.setState({nodesSelectionActive:!1})}},[s]),O.useEffect(()=>{r.setState({multiSelectionActive:u})},[u])}function I3(t){const l=Nt();O.useEffect(()=>{const r=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const o=_h(t.current);(o.height===0||o.width===0)&&l.getState().onError?.("004",ma.error004()),l.setState({width:o.width||500,height:o.height||500})};if(t.current){r(),window.addEventListener("resize",r);const o=new ResizeObserver(()=>r());return o.observe(t.current),()=>{window.removeEventListener("resize",r),o&&t.current&&o.unobserve(t.current)}}},[])}const Kc={position:"absolute",width:"100%",height:"100%",top:0,left:0},J3=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function F3({onPaneContextMenu:t,zoomOnScroll:l=!0,zoomOnPinch:r=!0,panOnScroll:o=!1,panOnScrollSpeed:s=.5,panOnScrollMode:u=fi.Free,zoomOnDoubleClick:f=!0,panOnDrag:h=!0,defaultViewport:g,translateExtent:m,minZoom:x,maxZoom:p,zoomActivationKeyCode:b,preventScrolling:w=!0,children:S,noWheelClassName:N,noPanClassName:C,onViewportChange:A,isControlledViewport:M,paneClickDistance:E,selectionOnDrag:z}){const B=Nt(),H=O.useRef(null),{userSelectionActive:L,lib:q,connectionInProgress:X}=Pe(J3,_t),ae=Ao(b),Q=O.useRef();I3(H);const W=O.useCallback(ie=>{A?.({x:ie[0],y:ie[1],zoom:ie[2]}),M||B.setState({transform:ie})},[A,M]);return O.useEffect(()=>{if(H.current){Q.current=l3({domNode:H.current,minZoom:x,maxZoom:p,translateExtent:m,viewport:g,onDraggingChange:T=>B.setState({paneDragging:T}),onPanZoomStart:(T,k)=>{const{onViewportChangeStart:D,onMoveStart:G}=B.getState();G?.(T,k),D?.(k)},onPanZoom:(T,k)=>{const{onViewportChange:D,onMove:G}=B.getState();G?.(T,k),D?.(k)},onPanZoomEnd:(T,k)=>{const{onViewportChangeEnd:D,onMoveEnd:G}=B.getState();G?.(T,k),D?.(k)}});const{x:ie,y:j,zoom:Z}=Q.current.getViewport();return B.setState({panZoom:Q.current,transform:[ie,j,Z],domNode:H.current.closest(".react-flow")}),()=>{Q.current?.destroy()}}},[]),O.useEffect(()=>{Q.current?.update({onPaneContextMenu:t,zoomOnScroll:l,zoomOnPinch:r,panOnScroll:o,panOnScrollSpeed:s,panOnScrollMode:u,zoomOnDoubleClick:f,panOnDrag:h,zoomActivationKeyPressed:ae,preventScrolling:w,noPanClassName:C,userSelectionActive:L,noWheelClassName:N,lib:q,onTransformChange:W,connectionInProgress:X,selectionOnDrag:z,paneClickDistance:E})},[t,l,r,o,s,u,f,h,ae,w,C,L,N,q,W,X,z,E]),y.jsx("div",{className:"react-flow__renderer",ref:H,style:Kc,children:S})}const W3=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function P3(){const{userSelectionActive:t,userSelectionRect:l}=Pe(W3,_t);return t&&l?y.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:l.width,height:l.height,transform:`translate(${l.x}px, ${l.y}px)`}}):null}const Nd=(t,l)=>r=>{r.target===l.current&&t?.(r)},eA=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function tA({isSelecting:t,selectionKeyPressed:l,selectionMode:r=_o.Full,panOnDrag:o,paneClickDistance:s,selectionOnDrag:u,onSelectionStart:f,onSelectionEnd:h,onPaneClick:g,onPaneContextMenu:m,onPaneScroll:x,onPaneMouseEnter:p,onPaneMouseMove:b,onPaneMouseLeave:w,children:S}){const N=Nt(),{userSelectionActive:C,elementsSelectable:A,dragging:M,connectionInProgress:E}=Pe(eA,_t),z=A&&(t||C),B=O.useRef(null),H=O.useRef(),L=O.useRef(new Set),q=O.useRef(new Set),X=O.useRef(!1),ae=D=>{if(X.current||E){X.current=!1;return}g?.(D),N.getState().resetSelectedElements(),N.setState({nodesSelectionActive:!1})},Q=D=>{if(Array.isArray(o)&&o?.includes(2)){D.preventDefault();return}m?.(D)},W=x?D=>x(D):void 0,ie=D=>{X.current&&(D.stopPropagation(),X.current=!1)},j=D=>{const{domNode:G}=N.getState();if(H.current=G?.getBoundingClientRect(),!H.current)return;const te=D.target===B.current;if(!te&&!!D.target.closest(".nokey")||!t||!(u&&te||l)||D.button!==0||!D.isPrimary)return;D.target?.setPointerCapture?.(D.pointerId),X.current=!1;const{x:I,y:P}=na(D.nativeEvent,H.current);N.setState({userSelectionRect:{width:0,height:0,startX:I,startY:P,x:I,y:P}}),te||(D.stopPropagation(),D.preventDefault())},Z=D=>{const{userSelectionRect:G,transform:te,nodeLookup:R,edgeLookup:U,connectionLookup:I,triggerNodeChanges:P,triggerEdgeChanges:ue,defaultEdgeOptions:de,resetSelectedElements:se}=N.getState();if(!H.current||!G)return;const{x:fe,y:me}=na(D.nativeEvent,H.current),{startX:Te,startY:je}=G;if(!X.current){const Me=l?0:s;if(Math.hypot(fe-Te,me-je)<=Me)return;se(),f?.(D)}X.current=!0;const Se={startX:Te,startY:je,x:fe<Te?fe:Te,y:me<je?me:je,width:Math.abs(fe-Te),height:Math.abs(me-je)},Re=L.current,Ve=q.current;L.current=new Set(Sh(R,Se,te,r===_o.Partial,!0).map(Me=>Me.id)),q.current=new Set;const at=de?.selectable??!0;for(const Me of L.current){const Le=I.get(Me);if(Le)for(const{edgeId:We}of Le.values()){const Ge=U.get(We);Ge&&(Ge.selectable??at)&&q.current.add(We)}}if(!sy(Re,L.current)){const Me=er(R,L.current,!0);P(Me)}if(!sy(Ve,q.current)){const Me=er(U,q.current);ue(Me)}N.setState({userSelectionRect:Se,userSelectionActive:!0,nodesSelectionActive:!1})},T=D=>{D.button===0&&(D.target?.releasePointerCapture?.(D.pointerId),!C&&D.target===B.current&&N.getState().userSelectionRect&&ae?.(D),N.setState({userSelectionActive:!1,userSelectionRect:null}),X.current&&(h?.(D),N.setState({nodesSelectionActive:L.current.size>0})))},k=o===!0||Array.isArray(o)&&o.includes(0);return y.jsxs("div",{className:$t(["react-flow__pane",{draggable:k,dragging:M,selection:t}]),onClick:z?void 0:Nd(ae,B),onContextMenu:Nd(Q,B),onWheel:Nd(W,B),onPointerEnter:z?void 0:p,onPointerMove:z?Z:b,onPointerUp:z?T:void 0,onPointerDownCapture:z?j:void 0,onClickCapture:z?ie:void 0,onPointerLeave:w,ref:B,style:Kc,children:[S,y.jsx(P3,{})]})}function th({id:t,store:l,unselect:r=!1,nodeRef:o}){const{addSelectedNodes:s,unselectNodesAndEdges:u,multiSelectionActive:f,nodeLookup:h,onError:g}=l.getState(),m=h.get(t);if(!m){g?.("012",ma.error012(t));return}l.setState({nodesSelectionActive:!1}),m.selected?(r||m.selected&&f)&&(u({nodes:[m],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):s([t])}function nb({nodeRef:t,disabled:l=!1,noDragClassName:r,handleSelector:o,nodeId:s,isSelectable:u,nodeClickDistance:f}){const h=Nt(),[g,m]=O.useState(!1),x=O.useRef();return O.useEffect(()=>{x.current=G4({getStoreItems:()=>h.getState(),onNodeMouseDown:p=>{th({id:p,store:h,nodeRef:t})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}})},[]),O.useEffect(()=>{if(l)x.current?.destroy();else if(t.current)return x.current?.update({noDragClassName:r,handleSelector:o,domNode:t.current,isSelectable:u,nodeId:s,nodeClickDistance:f}),()=>{x.current?.destroy()}},[r,o,l,u,t,s]),g}const nA=t=>l=>l.selected&&(l.draggable||t&&typeof l.draggable>"u");function ab(){const t=Nt();return O.useCallback(r=>{const{nodeExtent:o,snapToGrid:s,snapGrid:u,nodesDraggable:f,onError:h,updateNodePositions:g,nodeLookup:m,nodeOrigin:x}=t.getState(),p=new Map,b=nA(f),w=s?u[0]:5,S=s?u[1]:5,N=r.direction.x*w*r.factor,C=r.direction.y*S*r.factor;for(const[,A]of m){if(!b(A))continue;let M={x:A.internals.positionAbsolute.x+N,y:A.internals.positionAbsolute.y+C};s&&(M=Uo(M,u));const{position:E,positionAbsolute:z}=Sv({nodeId:A.id,nextPosition:M,nodeLookup:m,nodeExtent:o,nodeOrigin:x,onError:h});A.position=E,A.internals.positionAbsolute=z,p.set(A.id,A)}g(p)},[])}const zh=O.createContext(null),aA=zh.Provider;zh.Consumer;const lb=()=>O.useContext(zh),lA=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),iA=(t,l,r)=>o=>{const{connectionClickStartHandle:s,connectionMode:u,connection:f}=o,{fromHandle:h,toHandle:g,isValid:m}=f,x=g?.nodeId===t&&g?.id===l&&g?.type===r;return{connectingFrom:h?.nodeId===t&&h?.id===l&&h?.type===r,connectingTo:x,clickConnecting:s?.nodeId===t&&s?.id===l&&s?.type===r,isPossibleEndHandle:u===rr.Strict?h?.type!==r:t!==h?.nodeId||l!==h?.id,connectionInProcess:!!h,clickConnectionInProcess:!!s,valid:x&&m}};function rA({type:t="source",position:l=Ce.Top,isValidConnection:r,isConnectable:o=!0,isConnectableStart:s=!0,isConnectableEnd:u=!0,id:f,onConnect:h,children:g,className:m,onMouseDown:x,onTouchStart:p,...b},w){const S=f||null,N=t==="target",C=Nt(),A=lb(),{connectOnClick:M,noPanClassName:E,rfId:z}=Pe(lA,_t),{connectingFrom:B,connectingTo:H,clickConnecting:L,isPossibleEndHandle:q,connectionInProcess:X,clickConnectionInProcess:ae,valid:Q}=Pe(iA(A,S,t),_t);A||C.getState().onError?.("010",ma.error010());const W=Z=>{const{defaultEdgeOptions:T,onConnect:k,hasDefaultEdges:D}=C.getState(),G={...T,...Z};if(D){const{edges:te,setEdges:R}=C.getState();R(A4(G,te))}k?.(G),h?.(G)},ie=Z=>{if(!A)return;const T=Rv(Z.nativeEvent);if(s&&(T&&Z.button===0||!T)){const k=C.getState();eh.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:k.autoPanOnConnect,connectionMode:k.connectionMode,connectionRadius:k.connectionRadius,domNode:k.domNode,nodeLookup:k.nodeLookup,lib:k.lib,isTarget:N,handleId:S,nodeId:A,flowId:k.rfId,panBy:k.panBy,cancelConnection:k.cancelConnection,onConnectStart:k.onConnectStart,onConnectEnd:k.onConnectEnd,updateConnection:k.updateConnection,onConnect:W,isValidConnection:r||k.isValidConnection,getTransform:()=>C.getState().transform,getFromHandle:()=>C.getState().connection.fromHandle,autoPanSpeed:k.autoPanSpeed,dragThreshold:k.connectionDragThreshold})}T?x?.(Z):p?.(Z)},j=Z=>{const{onClickConnectStart:T,onClickConnectEnd:k,connectionClickStartHandle:D,connectionMode:G,isValidConnection:te,lib:R,rfId:U,nodeLookup:I,connection:P}=C.getState();if(!A||!D&&!s)return;if(!D){T?.(Z.nativeEvent,{nodeId:A,handleId:S,handleType:t}),C.setState({connectionClickStartHandle:{nodeId:A,type:t,id:S}});return}const ue=Av(Z.target),de=r||te,{connection:se,isValid:fe}=eh.isValid(Z.nativeEvent,{handle:{nodeId:A,id:S,type:t},connectionMode:G,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:de,flowId:U,doc:ue,lib:R,nodeLookup:I});fe&&se&&W(se);const me=structuredClone(P);delete me.inProgress,me.toPosition=me.toHandle?me.toHandle.position:null,k?.(Z,me),C.setState({connectionClickStartHandle:null})};return y.jsx("div",{"data-handleid":S,"data-nodeid":A,"data-handlepos":l,"data-id":`${z}-${A}-${S}-${t}`,className:$t(["react-flow__handle",`react-flow__handle-${l}`,"nodrag",E,m,{source:!N,target:N,connectable:o,connectablestart:s,connectableend:u,clickconnecting:L,connectingfrom:B,connectingto:H,valid:Q,connectionindicator:o&&(!X||q)&&(X||ae?u:s)}]),onMouseDown:ie,onTouchStart:ie,onClick:M?j:void 0,ref:w,...b,children:g})}const Bl=O.memo(eb(rA));function oA({data:t,isConnectable:l,sourcePosition:r=Ce.Bottom}){return y.jsxs(y.Fragment,{children:[t?.label,y.jsx(Bl,{type:"source",position:r,isConnectable:l})]})}function sA({data:t,isConnectable:l,targetPosition:r=Ce.Top,sourcePosition:o=Ce.Bottom}){return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{type:"target",position:r,isConnectable:l}),t?.label,y.jsx(Bl,{type:"source",position:o,isConnectable:l})]})}function cA(){return null}function uA({data:t,isConnectable:l,targetPosition:r=Ce.Top}){return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{type:"target",position:r,isConnectable:l}),t?.label]})}const jc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Hy={input:oA,default:sA,output:uA,group:cA};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:l,height:r,x:o,y:s}=Bo(t.nodeLookup,{filter:u=>!!u.selected});return{width:ta(l)?l:null,height:ta(r)?r:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${o}px,${s}px)`}};function hA({onSelectionContextMenu:t,noPanClassName:l,disableKeyboardA11y:r}){const o=Nt(),{width:s,height:u,transformString:f,userSelectionActive:h}=Pe(dA,_t),g=ab(),m=O.useRef(null);if(O.useEffect(()=>{r||m.current?.focus({preventScroll:!0})},[r]),nb({nodeRef:m}),h||!s||!u)return null;const x=t?b=>{const w=o.getState().nodes.filter(S=>S.selected);t(b,w)}:void 0,p=b=>{Object.prototype.hasOwnProperty.call(jc,b.key)&&(b.preventDefault(),g({direction:jc[b.key],factor:b.shiftKey?4:1}))};return y.jsx("div",{className:$t(["react-flow__nodesselection","react-flow__container",l]),style:{transform:f},children:y.jsx("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:s,height:u}})})}const Ly=typeof window<"u"?window:void 0,mA=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function ib({children:t,onPaneClick:l,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:s,onPaneContextMenu:u,onPaneScroll:f,paneClickDistance:h,deleteKeyCode:g,selectionKeyCode:m,selectionOnDrag:x,selectionMode:p,onSelectionStart:b,onSelectionEnd:w,multiSelectionKeyCode:S,panActivationKeyCode:N,zoomActivationKeyCode:C,elementsSelectable:A,zoomOnScroll:M,zoomOnPinch:E,panOnScroll:z,panOnScrollSpeed:B,panOnScrollMode:H,zoomOnDoubleClick:L,panOnDrag:q,defaultViewport:X,translateExtent:ae,minZoom:Q,maxZoom:W,preventScrolling:ie,onSelectionContextMenu:j,noWheelClassName:Z,noPanClassName:T,disableKeyboardA11y:k,onViewportChange:D,isControlledViewport:G}){const{nodesSelectionActive:te,userSelectionActive:R}=Pe(mA,_t),U=Ao(m,{target:Ly}),I=Ao(N,{target:Ly}),P=I||q,ue=I||z,de=x&&P!==!0,se=U||R||de;return K3({deleteKeyCode:g,multiSelectionKeyCode:S}),y.jsx(F3,{onPaneContextMenu:u,elementsSelectable:A,zoomOnScroll:M,zoomOnPinch:E,panOnScroll:ue,panOnScrollSpeed:B,panOnScrollMode:H,zoomOnDoubleClick:L,panOnDrag:!U&&P,defaultViewport:X,translateExtent:ae,minZoom:Q,maxZoom:W,zoomActivationKeyCode:C,preventScrolling:ie,noWheelClassName:Z,noPanClassName:T,onViewportChange:D,isControlledViewport:G,paneClickDistance:h,selectionOnDrag:de,children:y.jsxs(tA,{onSelectionStart:b,onSelectionEnd:w,onPaneClick:l,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:s,onPaneContextMenu:u,onPaneScroll:f,panOnDrag:P,isSelecting:!!se,selectionMode:p,selectionKeyPressed:U,paneClickDistance:h,selectionOnDrag:de,children:[t,te&&y.jsx(hA,{onSelectionContextMenu:j,noPanClassName:T,disableKeyboardA11y:k})]})})}ib.displayName="FlowRenderer";const gA=O.memo(ib),pA=t=>l=>t?Sh(l.nodeLookup,{x:0,y:0,width:l.width,height:l.height},l.transform,!0).map(r=>r.id):Array.from(l.nodeLookup.keys());function yA(t){return Pe(O.useCallback(pA(t),[t]),_t)}const xA=t=>t.updateNodeInternals;function vA(){const t=Pe(xA),[l]=O.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const o=new Map;r.forEach(s=>{const u=s.target.getAttribute("data-id");o.set(u,{id:u,nodeElement:s.target,force:!0})}),t(o)}));return O.useEffect(()=>()=>{l?.disconnect()},[l]),l}function bA({node:t,nodeType:l,hasDimensions:r,resizeObserver:o}){const s=Nt(),u=O.useRef(null),f=O.useRef(null),h=O.useRef(t.sourcePosition),g=O.useRef(t.targetPosition),m=O.useRef(l),x=r&&!!t.internals.handleBounds;return O.useEffect(()=>{u.current&&!t.hidden&&(!x||f.current!==u.current)&&(f.current&&o?.unobserve(f.current),o?.observe(u.current),f.current=u.current)},[x,t.hidden]),O.useEffect(()=>()=>{f.current&&(o?.unobserve(f.current),f.current=null)},[]),O.useEffect(()=>{if(u.current){const p=m.current!==l,b=h.current!==t.sourcePosition,w=g.current!==t.targetPosition;(p||b||w)&&(m.current=l,h.current=t.sourcePosition,g.current=t.targetPosition,s.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:u.current,force:!0}]])))}},[t.id,l,t.sourcePosition,t.targetPosition]),u}function wA({id:t,onClick:l,onMouseEnter:r,onMouseMove:o,onMouseLeave:s,onContextMenu:u,onDoubleClick:f,nodesDraggable:h,elementsSelectable:g,nodesConnectable:m,nodesFocusable:x,resizeObserver:p,noDragClassName:b,noPanClassName:w,disableKeyboardA11y:S,rfId:N,nodeTypes:C,nodeClickDistance:A,onError:M}){const{node:E,internals:z,isParent:B}=Pe(fe=>{const me=fe.nodeLookup.get(t),Te=fe.parentLookup.has(t);return{node:me,internals:me.internals,isParent:Te}},_t);let H=E.type||"default",L=C?.[H]||Hy[H];L===void 0&&(M?.("003",ma.error003(H)),H="default",L=C?.default||Hy.default);const q=!!(E.draggable||h&&typeof E.draggable>"u"),X=!!(E.selectable||g&&typeof E.selectable>"u"),ae=!!(E.connectable||m&&typeof E.connectable>"u"),Q=!!(E.focusable||x&&typeof E.focusable>"u"),W=Nt(),ie=Cv(E),j=bA({node:E,nodeType:H,hasDimensions:ie,resizeObserver:p}),Z=nb({nodeRef:j,disabled:E.hidden||!q,noDragClassName:b,handleSelector:E.dragHandle,nodeId:t,isSelectable:X,nodeClickDistance:A}),T=ab();if(E.hidden)return null;const k=el(E),D=fA(E),G=X||q||l||r||o||s,te=r?fe=>r(fe,{...z.userNode}):void 0,R=o?fe=>o(fe,{...z.userNode}):void 0,U=s?fe=>s(fe,{...z.userNode}):void 0,I=u?fe=>u(fe,{...z.userNode}):void 0,P=f?fe=>f(fe,{...z.userNode}):void 0,ue=fe=>{const{selectNodesOnDrag:me,nodeDragThreshold:Te}=W.getState();X&&(!me||!q||Te>0)&&th({id:t,store:W,nodeRef:j}),l&&l(fe,{...z.userNode})},de=fe=>{if(!(Tv(fe.nativeEvent)||S)){if(yv.includes(fe.key)&&X){const me=fe.key==="Escape";th({id:t,store:W,unselect:me,nodeRef:j})}else if(q&&E.selected&&Object.prototype.hasOwnProperty.call(jc,fe.key)){fe.preventDefault();const{ariaLabelConfig:me}=W.getState();W.setState({ariaLiveMessage:me["node.a11yDescription.ariaLiveMessage"]({direction:fe.key.replace("Arrow","").toLowerCase(),x:~~z.positionAbsolute.x,y:~~z.positionAbsolute.y})}),T({direction:jc[fe.key],factor:fe.shiftKey?4:1})}}},se=()=>{if(S||!j.current?.matches(":focus-visible"))return;const{transform:fe,width:me,height:Te,autoPanOnNodeFocus:je,setCenter:Se}=W.getState();if(!je)return;Sh(new Map([[t,E]]),{x:0,y:0,width:me,height:Te},fe,!0).length>0||Se(E.position.x+k.width/2,E.position.y+k.height/2,{zoom:fe[2]})};return y.jsx("div",{className:$t(["react-flow__node",`react-flow__node-${H}`,{[w]:q},E.className,{selected:E.selected,selectable:X,parent:B,draggable:q,dragging:Z}]),ref:j,style:{zIndex:z.z,transform:`translate(${z.positionAbsolute.x}px,${z.positionAbsolute.y}px)`,pointerEvents:G?"all":"none",visibility:ie?"visible":"hidden",...E.style,...D},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:te,onMouseMove:R,onMouseLeave:U,onContextMenu:I,onClick:ue,onDoubleClick:P,onKeyDown:Q?de:void 0,tabIndex:Q?0:void 0,onFocus:Q?se:void 0,role:E.ariaRole??(Q?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${Kv}-${N}`,"aria-label":E.ariaLabel,...E.domAttributes,children:y.jsx(aA,{value:t,children:y.jsx(L,{id:t,data:E.data,type:H,positionAbsoluteX:z.positionAbsolute.x,positionAbsoluteY:z.positionAbsolute.y,selected:E.selected??!1,selectable:X,draggable:q,deletable:E.deletable??!0,isConnectable:ae,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:Z,dragHandle:E.dragHandle,zIndex:z.z,parentId:E.parentId,...k})})})}var SA=O.memo(wA);const EA=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function rb(t){const{nodesDraggable:l,nodesConnectable:r,nodesFocusable:o,elementsSelectable:s,onError:u}=Pe(EA,_t),f=yA(t.onlyRenderVisibleElements),h=vA();return y.jsx("div",{className:"react-flow__nodes",style:Kc,children:f.map(g=>y.jsx(SA,{id:g,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:h,nodesDraggable:l,nodesConnectable:r,nodesFocusable:o,elementsSelectable:s,nodeClickDistance:t.nodeClickDistance,onError:u},g))})}rb.displayName="NodeRenderer";const _A=O.memo(rb);function NA(t){return Pe(O.useCallback(r=>{if(!t)return r.edges.map(s=>s.id);const o=[];if(r.width&&r.height)for(const s of r.edges){const u=r.nodeLookup.get(s.source),f=r.nodeLookup.get(s.target);u&&f&&N4({sourceNode:u,targetNode:f,width:r.width,height:r.height,transform:r.transform})&&o.push(s.id)}return o},[t]),_t)}const CA=({color:t="none",strokeWidth:l=1})=>{const r={strokeWidth:l,...t&&{stroke:t}};return y.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},MA=({color:t="none",strokeWidth:l=1})=>{const r={strokeWidth:l,...t&&{stroke:t,fill:t}};return y.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},By={[No.Arrow]:CA,[No.ArrowClosed]:MA};function AA(t){const l=Nt();return O.useMemo(()=>Object.prototype.hasOwnProperty.call(By,t)?By[t]:(l.getState().onError?.("009",ma.error009(t)),null),[t])}const TA=({id:t,type:l,color:r,width:o=12.5,height:s=12.5,markerUnits:u="strokeWidth",strokeWidth:f,orient:h="auto-start-reverse"})=>{const g=AA(l);return g?y.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${o}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:h,refX:"0",refY:"0",children:y.jsx(g,{color:r,strokeWidth:f})}):null},ob=({defaultColor:t,rfId:l})=>{const r=Pe(u=>u.edges),o=Pe(u=>u.defaultEdgeOptions),s=O.useMemo(()=>j4(r,{id:l,defaultColor:t,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[r,o,l,t]);return s.length?y.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:y.jsx("defs",{children:s.map(u=>y.jsx(TA,{id:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,strokeWidth:u.strokeWidth,orient:u.orient},u.id))})}):null};ob.displayName="MarkerDefinitions";var RA=O.memo(ob);function sb({x:t,y:l,label:r,labelStyle:o,labelShowBg:s=!0,labelBgStyle:u,labelBgPadding:f=[2,4],labelBgBorderRadius:h=2,children:g,className:m,...x}){const[p,b]=O.useState({x:1,y:0,width:0,height:0}),w=$t(["react-flow__edge-textwrapper",m]),S=O.useRef(null);return O.useEffect(()=>{if(S.current){const N=S.current.getBBox();b({x:N.x,y:N.y,width:N.width,height:N.height})}},[r]),r?y.jsxs("g",{transform:`translate(${t-p.width/2} ${l-p.height/2})`,className:w,visibility:p.width?"visible":"hidden",...x,children:[s&&y.jsx("rect",{width:p.width+2*f[0],x:-f[0],y:-f[1],height:p.height+2*f[1],className:"react-flow__edge-textbg",style:u,rx:h,ry:h}),y.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:S,style:o,children:r}),g]}):null}sb.displayName="EdgeText";const zA=O.memo(sb);function Ic({path:t,labelX:l,labelY:r,label:o,labelStyle:s,labelShowBg:u,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:g,interactionWidth:m=20,...x}){return y.jsxs(y.Fragment,{children:[y.jsx("path",{...x,d:t,fill:"none",className:$t(["react-flow__edge-path",x.className])}),m?y.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}):null,o&&ta(l)&&ta(r)?y.jsx(zA,{x:l,y:r,label:o,labelStyle:s,labelShowBg:u,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:g}):null]})}function Uy({pos:t,x1:l,y1:r,x2:o,y2:s}){return t===Ce.Left||t===Ce.Right?[.5*(l+o),r]:[l,.5*(r+s)]}function cb({sourceX:t,sourceY:l,sourcePosition:r=Ce.Bottom,targetX:o,targetY:s,targetPosition:u=Ce.Top}){const[f,h]=Uy({pos:r,x1:t,y1:l,x2:o,y2:s}),[g,m]=Uy({pos:u,x1:o,y1:s,x2:t,y2:l}),[x,p,b,w]=zv({sourceX:t,sourceY:l,targetX:o,targetY:s,sourceControlX:f,sourceControlY:h,targetControlX:g,targetControlY:m});return[`M${t},${l} C${f},${h} ${g},${m} ${o},${s}`,x,p,b,w]}function ub(t){return O.memo(({id:l,sourceX:r,sourceY:o,targetX:s,targetY:u,sourcePosition:f,targetPosition:h,label:g,labelStyle:m,labelShowBg:x,labelBgStyle:p,labelBgPadding:b,labelBgBorderRadius:w,style:S,markerEnd:N,markerStart:C,interactionWidth:A})=>{const[M,E,z]=cb({sourceX:r,sourceY:o,sourcePosition:f,targetX:s,targetY:u,targetPosition:h}),B=t.isInternal?void 0:l;return y.jsx(Ic,{id:B,path:M,labelX:E,labelY:z,label:g,labelStyle:m,labelShowBg:x,labelBgStyle:p,labelBgPadding:b,labelBgBorderRadius:w,style:S,markerEnd:N,markerStart:C,interactionWidth:A})})}const OA=ub({isInternal:!1}),fb=ub({isInternal:!0});OA.displayName="SimpleBezierEdge";fb.displayName="SimpleBezierEdgeInternal";function db(t){return O.memo(({id:l,sourceX:r,sourceY:o,targetX:s,targetY:u,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:p,style:b,sourcePosition:w=Ce.Bottom,targetPosition:S=Ce.Top,markerEnd:N,markerStart:C,pathOptions:A,interactionWidth:M})=>{const[E,z,B]=Fd({sourceX:r,sourceY:o,sourcePosition:w,targetX:s,targetY:u,targetPosition:S,borderRadius:A?.borderRadius,offset:A?.offset,stepPosition:A?.stepPosition}),H=t.isInternal?void 0:l;return y.jsx(Ic,{id:H,path:E,labelX:z,labelY:B,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:p,style:b,markerEnd:N,markerStart:C,interactionWidth:M})})}const hb=db({isInternal:!1}),mb=db({isInternal:!0});hb.displayName="SmoothStepEdge";mb.displayName="SmoothStepEdgeInternal";function gb(t){return O.memo(({id:l,...r})=>{const o=t.isInternal?void 0:l;return y.jsx(hb,{...r,id:o,pathOptions:O.useMemo(()=>({borderRadius:0,offset:r.pathOptions?.offset}),[r.pathOptions?.offset])})})}const jA=gb({isInternal:!1}),pb=gb({isInternal:!0});jA.displayName="StepEdge";pb.displayName="StepEdgeInternal";function yb(t){return O.memo(({id:l,sourceX:r,sourceY:o,targetX:s,targetY:u,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:p,style:b,markerEnd:w,markerStart:S,interactionWidth:N})=>{const[C,A,M]=Dv({sourceX:r,sourceY:o,targetX:s,targetY:u}),E=t.isInternal?void 0:l;return y.jsx(Ic,{id:E,path:C,labelX:A,labelY:M,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:p,style:b,markerEnd:w,markerStart:S,interactionWidth:N})})}const DA=yb({isInternal:!1}),xb=yb({isInternal:!0});DA.displayName="StraightEdge";xb.displayName="StraightEdgeInternal";function vb(t){return O.memo(({id:l,sourceX:r,sourceY:o,targetX:s,targetY:u,sourcePosition:f=Ce.Bottom,targetPosition:h=Ce.Top,label:g,labelStyle:m,labelShowBg:x,labelBgStyle:p,labelBgPadding:b,labelBgBorderRadius:w,style:S,markerEnd:N,markerStart:C,pathOptions:A,interactionWidth:M})=>{const[E,z,B]=Ov({sourceX:r,sourceY:o,sourcePosition:f,targetX:s,targetY:u,targetPosition:h,curvature:A?.curvature}),H=t.isInternal?void 0:l;return y.jsx(Ic,{id:H,path:E,labelX:z,labelY:B,label:g,labelStyle:m,labelShowBg:x,labelBgStyle:p,labelBgPadding:b,labelBgBorderRadius:w,style:S,markerEnd:N,markerStart:C,interactionWidth:M})})}const kA=vb({isInternal:!1}),bb=vb({isInternal:!0});kA.displayName="BezierEdge";bb.displayName="BezierEdgeInternal";const Vy={default:bb,straight:xb,step:pb,smoothstep:mb,simplebezier:fb},Yy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},HA=(t,l,r)=>r===Ce.Left?t-l:r===Ce.Right?t+l:t,LA=(t,l,r)=>r===Ce.Top?t-l:r===Ce.Bottom?t+l:t,qy="react-flow__edgeupdater";function $y({position:t,centerX:l,centerY:r,radius:o=10,onMouseDown:s,onMouseEnter:u,onMouseOut:f,type:h}){return y.jsx("circle",{onMouseDown:s,onMouseEnter:u,onMouseOut:f,className:$t([qy,`${qy}-${h}`]),cx:HA(l,o,t),cy:LA(r,o,t),r:o,stroke:"transparent",fill:"transparent"})}function BA({isReconnectable:t,reconnectRadius:l,edge:r,sourceX:o,sourceY:s,targetX:u,targetY:f,sourcePosition:h,targetPosition:g,onReconnect:m,onReconnectStart:x,onReconnectEnd:p,setReconnecting:b,setUpdateHover:w}){const S=Nt(),N=(z,B)=>{if(z.button!==0)return;const{autoPanOnConnect:H,domNode:L,isValidConnection:q,connectionMode:X,connectionRadius:ae,lib:Q,onConnectStart:W,onConnectEnd:ie,cancelConnection:j,nodeLookup:Z,rfId:T,panBy:k,updateConnection:D}=S.getState(),G=B.type==="target",te=(I,P)=>{b(!1),p?.(I,r,B.type,P)},R=I=>m?.(r,I),U=(I,P)=>{b(!0),x?.(z,r,B.type),W?.(I,P)};eh.onPointerDown(z.nativeEvent,{autoPanOnConnect:H,connectionMode:X,connectionRadius:ae,domNode:L,handleId:B.id,nodeId:B.nodeId,nodeLookup:Z,isTarget:G,edgeUpdaterType:B.type,lib:Q,flowId:T,cancelConnection:j,panBy:k,isValidConnection:q,onConnect:R,onConnectStart:U,onConnectEnd:ie,onReconnectEnd:te,updateConnection:D,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:z.currentTarget})},C=z=>N(z,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),A=z=>N(z,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),M=()=>w(!0),E=()=>w(!1);return y.jsxs(y.Fragment,{children:[(t===!0||t==="source")&&y.jsx($y,{position:h,centerX:o,centerY:s,radius:l,onMouseDown:C,onMouseEnter:M,onMouseOut:E,type:"source"}),(t===!0||t==="target")&&y.jsx($y,{position:g,centerX:u,centerY:f,radius:l,onMouseDown:A,onMouseEnter:M,onMouseOut:E,type:"target"})]})}function UA({id:t,edgesFocusable:l,edgesReconnectable:r,elementsSelectable:o,onClick:s,onDoubleClick:u,onContextMenu:f,onMouseEnter:h,onMouseMove:g,onMouseLeave:m,reconnectRadius:x,onReconnect:p,onReconnectStart:b,onReconnectEnd:w,rfId:S,edgeTypes:N,noPanClassName:C,onError:A,disableKeyboardA11y:M}){let E=Pe(Se=>Se.edgeLookup.get(t));const z=Pe(Se=>Se.defaultEdgeOptions);E=z?{...z,...E}:E;let B=E.type||"default",H=N?.[B]||Vy[B];H===void 0&&(A?.("011",ma.error011(B)),B="default",H=N?.default||Vy.default);const L=!!(E.focusable||l&&typeof E.focusable>"u"),q=typeof p<"u"&&(E.reconnectable||r&&typeof E.reconnectable>"u"),X=!!(E.selectable||o&&typeof E.selectable>"u"),ae=O.useRef(null),[Q,W]=O.useState(!1),[ie,j]=O.useState(!1),Z=Nt(),{zIndex:T,sourceX:k,sourceY:D,targetX:G,targetY:te,sourcePosition:R,targetPosition:U}=Pe(O.useCallback(Se=>{const Re=Se.nodeLookup.get(E.source),Ve=Se.nodeLookup.get(E.target);if(!Re||!Ve)return{zIndex:E.zIndex,...Yy};const at=O4({id:t,sourceNode:Re,targetNode:Ve,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:Se.connectionMode,onError:A});return{zIndex:_4({selected:E.selected,zIndex:E.zIndex,sourceNode:Re,targetNode:Ve,elevateOnSelect:Se.elevateEdgesOnSelect,zIndexMode:Se.zIndexMode}),...at||Yy}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),_t),I=O.useMemo(()=>E.markerStart?`url('#${Wd(E.markerStart,S)}')`:void 0,[E.markerStart,S]),P=O.useMemo(()=>E.markerEnd?`url('#${Wd(E.markerEnd,S)}')`:void 0,[E.markerEnd,S]);if(E.hidden||k===null||D===null||G===null||te===null)return null;const ue=Se=>{const{addSelectedEdges:Re,unselectNodesAndEdges:Ve,multiSelectionActive:at}=Z.getState();X&&(Z.setState({nodesSelectionActive:!1}),E.selected&&at?(Ve({nodes:[],edges:[E]}),ae.current?.blur()):Re([t])),s&&s(Se,E)},de=u?Se=>{u(Se,{...E})}:void 0,se=f?Se=>{f(Se,{...E})}:void 0,fe=h?Se=>{h(Se,{...E})}:void 0,me=g?Se=>{g(Se,{...E})}:void 0,Te=m?Se=>{m(Se,{...E})}:void 0,je=Se=>{if(!M&&yv.includes(Se.key)&&X){const{unselectNodesAndEdges:Re,addSelectedEdges:Ve}=Z.getState();Se.key==="Escape"?(ae.current?.blur(),Re({edges:[E]})):Ve([t])}};return y.jsx("svg",{style:{zIndex:T},children:y.jsxs("g",{className:$t(["react-flow__edge",`react-flow__edge-${B}`,E.className,C,{selected:E.selected,animated:E.animated,inactive:!X&&!s,updating:Q,selectable:X}]),onClick:ue,onDoubleClick:de,onContextMenu:se,onMouseEnter:fe,onMouseMove:me,onMouseLeave:Te,onKeyDown:L?je:void 0,tabIndex:L?0:void 0,role:E.ariaRole??(L?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":L?`${Iv}-${S}`:void 0,ref:ae,...E.domAttributes,children:[!ie&&y.jsx(H,{id:t,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:X,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:k,sourceY:D,targetX:G,targetY:te,sourcePosition:R,targetPosition:U,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:I,markerEnd:P,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),q&&y.jsx(BA,{edge:E,isReconnectable:q,reconnectRadius:x,onReconnect:p,onReconnectStart:b,onReconnectEnd:w,sourceX:k,sourceY:D,targetX:G,targetY:te,sourcePosition:R,targetPosition:U,setUpdateHover:W,setReconnecting:j})]})})}var VA=O.memo(UA);const YA=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function wb({defaultMarkerColor:t,onlyRenderVisibleElements:l,rfId:r,edgeTypes:o,noPanClassName:s,onReconnect:u,onEdgeContextMenu:f,onEdgeMouseEnter:h,onEdgeMouseMove:g,onEdgeMouseLeave:m,onEdgeClick:x,reconnectRadius:p,onEdgeDoubleClick:b,onReconnectStart:w,onReconnectEnd:S,disableKeyboardA11y:N}){const{edgesFocusable:C,edgesReconnectable:A,elementsSelectable:M,onError:E}=Pe(YA,_t),z=NA(l);return y.jsxs("div",{className:"react-flow__edges",children:[y.jsx(RA,{defaultColor:t,rfId:r}),z.map(B=>y.jsx(VA,{id:B,edgesFocusable:C,edgesReconnectable:A,elementsSelectable:M,noPanClassName:s,onReconnect:u,onContextMenu:f,onMouseEnter:h,onMouseMove:g,onMouseLeave:m,onClick:x,reconnectRadius:p,onDoubleClick:b,onReconnectStart:w,onReconnectEnd:S,rfId:r,onError:E,edgeTypes:o,disableKeyboardA11y:N},B))]})}wb.displayName="EdgeRenderer";const qA=O.memo(wb),$A=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function GA({children:t}){const l=Pe($A);return y.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:l},children:t})}function XA(t){const l=Rh(),r=O.useRef(!1);O.useEffect(()=>{!r.current&&l.viewportInitialized&&t&&(setTimeout(()=>t(l),1),r.current=!0)},[t,l.viewportInitialized])}const ZA=t=>t.panZoom?.syncViewport;function QA(t){const l=Pe(ZA),r=Nt();return O.useEffect(()=>{t&&(l?.(t),r.setState({transform:[t.x,t.y,t.zoom]}))},[t,l]),null}function KA(t){return t.connection.inProgress?{...t.connection,to:Vo(t.connection.to,t.transform)}:{...t.connection}}function IA(t){return KA}function JA(t){const l=IA();return Pe(l,_t)}const FA=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function WA({containerStyle:t,style:l,type:r,component:o}){const{nodesConnectable:s,width:u,height:f,isValid:h,inProgress:g}=Pe(FA,_t);return!(u&&s&&g)?null:y.jsx("svg",{style:t,width:u,height:f,className:"react-flow__connectionline react-flow__container",children:y.jsx("g",{className:$t(["react-flow__connection",bv(h)]),children:y.jsx(Sb,{style:l,type:r,CustomComponent:o,isValid:h})})})}const Sb=({style:t,type:l=kl.Bezier,CustomComponent:r,isValid:o})=>{const{inProgress:s,from:u,fromNode:f,fromHandle:h,fromPosition:g,to:m,toNode:x,toHandle:p,toPosition:b,pointer:w}=JA();if(!s)return;if(r)return y.jsx(r,{connectionLineType:l,connectionLineStyle:t,fromNode:f,fromHandle:h,fromX:u.x,fromY:u.y,toX:m.x,toY:m.y,fromPosition:g,toPosition:b,connectionStatus:bv(o),toNode:x,toHandle:p,pointer:w});let S="";const N={sourceX:u.x,sourceY:u.y,sourcePosition:g,targetX:m.x,targetY:m.y,targetPosition:b};switch(l){case kl.Bezier:[S]=Ov(N);break;case kl.SimpleBezier:[S]=cb(N);break;case kl.Step:[S]=Fd({...N,borderRadius:0});break;case kl.SmoothStep:[S]=Fd(N);break;default:[S]=Dv(N)}return y.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};Sb.displayName="ConnectionLine";const PA={};function Gy(t=PA){O.useRef(t),Nt(),O.useEffect(()=>{},[t])}function eT(){Nt(),O.useRef(!1),O.useEffect(()=>{},[])}function Eb({nodeTypes:t,edgeTypes:l,onInit:r,onNodeClick:o,onEdgeClick:s,onNodeDoubleClick:u,onEdgeDoubleClick:f,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:m,onNodeContextMenu:x,onSelectionContextMenu:p,onSelectionStart:b,onSelectionEnd:w,connectionLineType:S,connectionLineStyle:N,connectionLineComponent:C,connectionLineContainerStyle:A,selectionKeyCode:M,selectionOnDrag:E,selectionMode:z,multiSelectionKeyCode:B,panActivationKeyCode:H,zoomActivationKeyCode:L,deleteKeyCode:q,onlyRenderVisibleElements:X,elementsSelectable:ae,defaultViewport:Q,translateExtent:W,minZoom:ie,maxZoom:j,preventScrolling:Z,defaultMarkerColor:T,zoomOnScroll:k,zoomOnPinch:D,panOnScroll:G,panOnScrollSpeed:te,panOnScrollMode:R,zoomOnDoubleClick:U,panOnDrag:I,onPaneClick:P,onPaneMouseEnter:ue,onPaneMouseMove:de,onPaneMouseLeave:se,onPaneScroll:fe,onPaneContextMenu:me,paneClickDistance:Te,nodeClickDistance:je,onEdgeContextMenu:Se,onEdgeMouseEnter:Re,onEdgeMouseMove:Ve,onEdgeMouseLeave:at,reconnectRadius:Me,onReconnect:Le,onReconnectStart:We,onReconnectEnd:Ge,noDragClassName:xt,noWheelClassName:Qt,noPanClassName:gt,disableKeyboardA11y:vt,nodeExtent:Je,rfId:zn,viewport:Gt,onViewportChange:ln}){return Gy(t),Gy(l),eT(),XA(r),QA(Gt),y.jsx(gA,{onPaneClick:P,onPaneMouseEnter:ue,onPaneMouseMove:de,onPaneMouseLeave:se,onPaneContextMenu:me,onPaneScroll:fe,paneClickDistance:Te,deleteKeyCode:q,selectionKeyCode:M,selectionOnDrag:E,selectionMode:z,onSelectionStart:b,onSelectionEnd:w,multiSelectionKeyCode:B,panActivationKeyCode:H,zoomActivationKeyCode:L,elementsSelectable:ae,zoomOnScroll:k,zoomOnPinch:D,zoomOnDoubleClick:U,panOnScroll:G,panOnScrollSpeed:te,panOnScrollMode:R,panOnDrag:I,defaultViewport:Q,translateExtent:W,minZoom:ie,maxZoom:j,onSelectionContextMenu:p,preventScrolling:Z,noDragClassName:xt,noWheelClassName:Qt,noPanClassName:gt,disableKeyboardA11y:vt,onViewportChange:ln,isControlledViewport:!!Gt,children:y.jsxs(GA,{children:[y.jsx(qA,{edgeTypes:l,onEdgeClick:s,onEdgeDoubleClick:f,onReconnect:Le,onReconnectStart:We,onReconnectEnd:Ge,onlyRenderVisibleElements:X,onEdgeContextMenu:Se,onEdgeMouseEnter:Re,onEdgeMouseMove:Ve,onEdgeMouseLeave:at,reconnectRadius:Me,defaultMarkerColor:T,noPanClassName:gt,disableKeyboardA11y:vt,rfId:zn}),y.jsx(WA,{style:N,type:S,component:C,containerStyle:A}),y.jsx("div",{className:"react-flow__edgelabel-renderer"}),y.jsx(_A,{nodeTypes:t,onNodeClick:o,onNodeDoubleClick:u,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:m,onNodeContextMenu:x,nodeClickDistance:je,onlyRenderVisibleElements:X,noPanClassName:gt,noDragClassName:xt,disableKeyboardA11y:vt,nodeExtent:Je,rfId:zn}),y.jsx("div",{className:"react-flow__viewport-portal"})]})})}Eb.displayName="GraphView";const tT=O.memo(Eb),Xy=({nodes:t,edges:l,defaultNodes:r,defaultEdges:o,width:s,height:u,fitView:f,fitViewOptions:h,minZoom:g=.5,maxZoom:m=2,nodeOrigin:x,nodeExtent:p,zIndexMode:b="basic"}={})=>{const w=new Map,S=new Map,N=new Map,C=new Map,A=o??l??[],M=r??t??[],E=x??[0,0],z=p??Eo;Lv(N,C,A);const B=Pd(M,w,S,{nodeOrigin:E,nodeExtent:z,zIndexMode:b});let H=[0,0,1];if(f&&s&&u){const L=Bo(w,{filter:Q=>!!((Q.width||Q.initialWidth)&&(Q.height||Q.initialHeight))}),{x:q,y:X,zoom:ae}=Eh(L,s,u,g,m,h?.padding??.1);H=[q,X,ae]}return{rfId:"1",width:s??0,height:u??0,transform:H,nodes:M,nodesInitialized:B,nodeLookup:w,parentLookup:S,edges:A,edgeLookup:C,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:g,maxZoom:m,translateExtent:Eo,nodeExtent:z,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:rr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:f??!1,fitViewOptions:h,fitViewResolver:null,connection:{...vv},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:x4,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:xv,zIndexMode:b,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},nT=({nodes:t,edges:l,defaultNodes:r,defaultEdges:o,width:s,height:u,fitView:f,fitViewOptions:h,minZoom:g,maxZoom:m,nodeOrigin:x,nodeExtent:p,zIndexMode:b})=>b3((w,S)=>{async function N(){const{nodeLookup:C,panZoom:A,fitViewOptions:M,fitViewResolver:E,width:z,height:B,minZoom:H,maxZoom:L}=S();A&&(await p4({nodes:C,width:z,height:B,panZoom:A,minZoom:H,maxZoom:L},M),E?.resolve(!0),w({fitViewResolver:null}))}return{...Xy({nodes:t,edges:l,width:s,height:u,fitView:f,fitViewOptions:h,minZoom:g,maxZoom:m,nodeOrigin:x,nodeExtent:p,defaultNodes:r,defaultEdges:o,zIndexMode:b}),setNodes:C=>{const{nodeLookup:A,parentLookup:M,nodeOrigin:E,elevateNodesOnSelect:z,fitViewQueued:B,zIndexMode:H}=S(),L=Pd(C,A,M,{nodeOrigin:E,nodeExtent:p,elevateNodesOnSelect:z,checkEquality:!0,zIndexMode:H});B&&L?(N(),w({nodes:C,nodesInitialized:L,fitViewQueued:!1,fitViewOptions:void 0})):w({nodes:C,nodesInitialized:L})},setEdges:C=>{const{connectionLookup:A,edgeLookup:M}=S();Lv(A,M,C),w({edges:C})},setDefaultNodesAndEdges:(C,A)=>{if(C){const{setNodes:M}=S();M(C),w({hasDefaultNodes:!0})}if(A){const{setEdges:M}=S();M(A),w({hasDefaultEdges:!0})}},updateNodeInternals:C=>{const{triggerNodeChanges:A,nodeLookup:M,parentLookup:E,domNode:z,nodeOrigin:B,nodeExtent:H,debug:L,fitViewQueued:q,zIndexMode:X}=S(),{changes:ae,updatedInternals:Q}=V4(C,M,E,z,B,H,X);Q&&(H4(M,E,{nodeOrigin:B,nodeExtent:H,zIndexMode:X}),q?(N(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),ae?.length>0&&(L&&console.log("React Flow: trigger node changes",ae),A?.(ae)))},updateNodePositions:(C,A=!1)=>{const M=[];let E=[];const{nodeLookup:z,triggerNodeChanges:B,connection:H,updateConnection:L,onNodesChangeMiddlewareMap:q}=S();for(const[X,ae]of C){const Q=z.get(X),W=!!(Q?.expandParent&&Q?.parentId&&ae?.position),ie={id:X,type:"position",position:W?{x:Math.max(0,ae.position.x),y:Math.max(0,ae.position.y)}:ae.position,dragging:A};if(Q&&H.inProgress&&H.fromNode.id===Q.id){const j=pi(Q,H.fromHandle,Ce.Left,!0);L({...H,from:j})}W&&Q.parentId&&M.push({id:X,parentId:Q.parentId,rect:{...ae.internals.positionAbsolute,width:ae.measured.width??0,height:ae.measured.height??0}}),E.push(ie)}if(M.length>0){const{parentLookup:X,nodeOrigin:ae}=S(),Q=Th(M,z,X,ae);E.push(...Q)}for(const X of q.values())E=X(E);B(E)},triggerNodeChanges:C=>{const{onNodesChange:A,setNodes:M,nodes:E,hasDefaultNodes:z,debug:B}=S();if(C?.length){if(z){const H=Wv(C,E);M(H)}B&&console.log("React Flow: trigger node changes",C),A?.(C)}},triggerEdgeChanges:C=>{const{onEdgesChange:A,setEdges:M,edges:E,hasDefaultEdges:z,debug:B}=S();if(C?.length){if(z){const H=Pv(C,E);M(H)}B&&console.log("React Flow: trigger edge changes",C),A?.(C)}},addSelectedNodes:C=>{const{multiSelectionActive:A,edgeLookup:M,nodeLookup:E,triggerNodeChanges:z,triggerEdgeChanges:B}=S();if(A){const H=C.map(L=>si(L,!0));z(H);return}z(er(E,new Set([...C]),!0)),B(er(M))},addSelectedEdges:C=>{const{multiSelectionActive:A,edgeLookup:M,nodeLookup:E,triggerNodeChanges:z,triggerEdgeChanges:B}=S();if(A){const H=C.map(L=>si(L,!0));B(H);return}B(er(M,new Set([...C]))),z(er(E,new Set,!0))},unselectNodesAndEdges:({nodes:C,edges:A}={})=>{const{edges:M,nodes:E,nodeLookup:z,triggerNodeChanges:B,triggerEdgeChanges:H}=S(),L=C||E,q=A||M,X=L.map(Q=>{const W=z.get(Q.id);return W&&(W.selected=!1),si(Q.id,!1)}),ae=q.map(Q=>si(Q.id,!1));B(X),H(ae)},setMinZoom:C=>{const{panZoom:A,maxZoom:M}=S();A?.setScaleExtent([C,M]),w({minZoom:C})},setMaxZoom:C=>{const{panZoom:A,minZoom:M}=S();A?.setScaleExtent([M,C]),w({maxZoom:C})},setTranslateExtent:C=>{S().panZoom?.setTranslateExtent(C),w({translateExtent:C})},resetSelectedElements:()=>{const{edges:C,nodes:A,triggerNodeChanges:M,triggerEdgeChanges:E,elementsSelectable:z}=S();if(!z)return;const B=A.reduce((L,q)=>q.selected?[...L,si(q.id,!1)]:L,[]),H=C.reduce((L,q)=>q.selected?[...L,si(q.id,!1)]:L,[]);M(B),E(H)},setNodeExtent:C=>{const{nodes:A,nodeLookup:M,parentLookup:E,nodeOrigin:z,elevateNodesOnSelect:B,nodeExtent:H,zIndexMode:L}=S();C[0][0]===H[0][0]&&C[0][1]===H[0][1]&&C[1][0]===H[1][0]&&C[1][1]===H[1][1]||(Pd(A,M,E,{nodeOrigin:z,nodeExtent:C,elevateNodesOnSelect:B,checkEquality:!1,zIndexMode:L}),w({nodeExtent:C}))},panBy:C=>{const{transform:A,width:M,height:E,panZoom:z,translateExtent:B}=S();return Y4({delta:C,panZoom:z,transform:A,translateExtent:B,width:M,height:E})},setCenter:async(C,A,M)=>{const{width:E,height:z,maxZoom:B,panZoom:H}=S();if(!H)return Promise.resolve(!1);const L=typeof M?.zoom<"u"?M.zoom:B;return await H.setViewport({x:E/2-C*L,y:z/2-A*L,zoom:L},{duration:M?.duration,ease:M?.ease,interpolate:M?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{w({connection:{...vv}})},updateConnection:C=>{w({connection:C})},reset:()=>w({...Xy()})}},Object.is);function aT({initialNodes:t,initialEdges:l,defaultNodes:r,defaultEdges:o,initialWidth:s,initialHeight:u,initialMinZoom:f,initialMaxZoom:h,initialFitViewOptions:g,fitView:m,nodeOrigin:x,nodeExtent:p,zIndexMode:b,children:w}){const[S]=O.useState(()=>nT({nodes:t,edges:l,defaultNodes:r,defaultEdges:o,width:s,height:u,fitView:m,minZoom:f,maxZoom:h,fitViewOptions:g,nodeOrigin:x,nodeExtent:p,zIndexMode:b}));return y.jsx(w3,{value:S,children:y.jsx(G3,{children:w})})}function lT({children:t,nodes:l,edges:r,defaultNodes:o,defaultEdges:s,width:u,height:f,fitView:h,fitViewOptions:g,minZoom:m,maxZoom:x,nodeOrigin:p,nodeExtent:b,zIndexMode:w}){return O.useContext(Zc)?y.jsx(y.Fragment,{children:t}):y.jsx(aT,{initialNodes:l,initialEdges:r,defaultNodes:o,defaultEdges:s,initialWidth:u,initialHeight:f,fitView:h,initialFitViewOptions:g,initialMinZoom:m,initialMaxZoom:x,nodeOrigin:p,nodeExtent:b,zIndexMode:w,children:t})}const iT={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function rT({nodes:t,edges:l,defaultNodes:r,defaultEdges:o,className:s,nodeTypes:u,edgeTypes:f,onNodeClick:h,onEdgeClick:g,onInit:m,onMove:x,onMoveStart:p,onMoveEnd:b,onConnect:w,onConnectStart:S,onConnectEnd:N,onClickConnectStart:C,onClickConnectEnd:A,onNodeMouseEnter:M,onNodeMouseMove:E,onNodeMouseLeave:z,onNodeContextMenu:B,onNodeDoubleClick:H,onNodeDragStart:L,onNodeDrag:q,onNodeDragStop:X,onNodesDelete:ae,onEdgesDelete:Q,onDelete:W,onSelectionChange:ie,onSelectionDragStart:j,onSelectionDrag:Z,onSelectionDragStop:T,onSelectionContextMenu:k,onSelectionStart:D,onSelectionEnd:G,onBeforeDelete:te,connectionMode:R,connectionLineType:U=kl.Bezier,connectionLineStyle:I,connectionLineComponent:P,connectionLineContainerStyle:ue,deleteKeyCode:de="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:fe=!1,selectionMode:me=_o.Full,panActivationKeyCode:Te="Space",multiSelectionKeyCode:je=Mo()?"Meta":"Control",zoomActivationKeyCode:Se=Mo()?"Meta":"Control",snapToGrid:Re,snapGrid:Ve,onlyRenderVisibleElements:at=!1,selectNodesOnDrag:Me,nodesDraggable:Le,autoPanOnNodeFocus:We,nodesConnectable:Ge,nodesFocusable:xt,nodeOrigin:Qt=Jv,edgesFocusable:gt,edgesReconnectable:vt,elementsSelectable:Je=!0,defaultViewport:zn=D3,minZoom:Gt=.5,maxZoom:ln=2,translateExtent:Ct=Eo,preventScrolling:fn=!0,nodeExtent:On,defaultMarkerColor:Vl="#b1b1b7",zoomOnScroll:ya=!0,zoomOnPinch:xa=!0,panOnScroll:Kt=!1,panOnScrollSpeed:jn=.5,panOnScrollMode:Wt=fi.Free,zoomOnDoubleClick:gr=!0,panOnDrag:Yl=!0,onPaneClick:yi,onPaneMouseEnter:va,onPaneMouseMove:tl,onPaneMouseLeave:ba,onPaneScroll:rn,onPaneContextMenu:Y,paneClickDistance:re=1,nodeClickDistance:pe=0,children:ke,onReconnect:pt,onReconnectStart:rt,onReconnectEnd:ve,onEdgeContextMenu:ye,onEdgeDoubleClick:ze,onEdgeMouseEnter:Mt,onEdgeMouseMove:bt,onEdgeMouseLeave:Xn,reconnectRadius:nl=10,onNodesChange:al,onEdgesChange:Dn,noDragClassName:At="nodrag",noWheelClassName:It="nowheel",noPanClassName:Zn="nopan",fitView:ll,fitViewOptions:ql,connectOnClick:il,attributionPosition:xi,proOptions:wa,defaultEdgeOptions:$l,elevateNodesOnSelect:Pt=!0,elevateEdgesOnSelect:Qn=!1,disableKeyboardA11y:Kn=!1,autoPanOnConnect:ra,autoPanOnNodeDrag:Ot,autoPanSpeed:vi,connectionRadius:Sa,isValidConnection:In,onError:he,style:Ne,id:Ye,nodeDragThreshold:lt,connectionDragThreshold:Tt,viewport:Jt,onViewportChange:dn,width:on,height:ft,colorMode:hn="light",debug:bi,onScroll:Ea,ariaLabelConfig:Gl,zIndexMode:_a="basic",...pr},sn){const Na=Ye||"1",Ca=B3(hn),rl=O.useCallback(Lt=>{Lt.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ea?.(Lt)},[Ea]);return y.jsx("div",{"data-testid":"rf__wrapper",...pr,onScroll:rl,style:{...Ne,...iT},ref:sn,className:$t(["react-flow",s,Ca]),id:Ye,role:"application",children:y.jsxs(lT,{nodes:t,edges:l,width:on,height:ft,fitView:ll,fitViewOptions:ql,minZoom:Gt,maxZoom:ln,nodeOrigin:Qt,nodeExtent:On,zIndexMode:_a,children:[y.jsx(tT,{onInit:m,onNodeClick:h,onEdgeClick:g,onNodeMouseEnter:M,onNodeMouseMove:E,onNodeMouseLeave:z,onNodeContextMenu:B,onNodeDoubleClick:H,nodeTypes:u,edgeTypes:f,connectionLineType:U,connectionLineStyle:I,connectionLineComponent:P,connectionLineContainerStyle:ue,selectionKeyCode:se,selectionOnDrag:fe,selectionMode:me,deleteKeyCode:de,multiSelectionKeyCode:je,panActivationKeyCode:Te,zoomActivationKeyCode:Se,onlyRenderVisibleElements:at,defaultViewport:zn,translateExtent:Ct,minZoom:Gt,maxZoom:ln,preventScrolling:fn,zoomOnScroll:ya,zoomOnPinch:xa,zoomOnDoubleClick:gr,panOnScroll:Kt,panOnScrollSpeed:jn,panOnScrollMode:Wt,panOnDrag:Yl,onPaneClick:yi,onPaneMouseEnter:va,onPaneMouseMove:tl,onPaneMouseLeave:ba,onPaneScroll:rn,onPaneContextMenu:Y,paneClickDistance:re,nodeClickDistance:pe,onSelectionContextMenu:k,onSelectionStart:D,onSelectionEnd:G,onReconnect:pt,onReconnectStart:rt,onReconnectEnd:ve,onEdgeContextMenu:ye,onEdgeDoubleClick:ze,onEdgeMouseEnter:Mt,onEdgeMouseMove:bt,onEdgeMouseLeave:Xn,reconnectRadius:nl,defaultMarkerColor:Vl,noDragClassName:At,noWheelClassName:It,noPanClassName:Zn,rfId:Na,disableKeyboardA11y:Kn,nodeExtent:On,viewport:Jt,onViewportChange:dn}),y.jsx(L3,{nodes:t,edges:l,defaultNodes:r,defaultEdges:o,onConnect:w,onConnectStart:S,onConnectEnd:N,onClickConnectStart:C,onClickConnectEnd:A,nodesDraggable:Le,autoPanOnNodeFocus:We,nodesConnectable:Ge,nodesFocusable:xt,edgesFocusable:gt,edgesReconnectable:vt,elementsSelectable:Je,elevateNodesOnSelect:Pt,elevateEdgesOnSelect:Qn,minZoom:Gt,maxZoom:ln,nodeExtent:On,onNodesChange:al,onEdgesChange:Dn,snapToGrid:Re,snapGrid:Ve,connectionMode:R,translateExtent:Ct,connectOnClick:il,defaultEdgeOptions:$l,fitView:ll,fitViewOptions:ql,onNodesDelete:ae,onEdgesDelete:Q,onDelete:W,onNodeDragStart:L,onNodeDrag:q,onNodeDragStop:X,onSelectionDrag:Z,onSelectionDragStart:j,onSelectionDragStop:T,onMove:x,onMoveStart:p,onMoveEnd:b,noPanClassName:Zn,nodeOrigin:Qt,rfId:Na,autoPanOnConnect:ra,autoPanOnNodeDrag:Ot,autoPanSpeed:vi,onError:he,connectionRadius:Sa,isValidConnection:In,selectNodesOnDrag:Me,nodeDragThreshold:lt,connectionDragThreshold:Tt,onBeforeDelete:te,debug:bi,ariaLabelConfig:Gl,zIndexMode:_a}),y.jsx(j3,{onSelectionChange:ie}),ke,y.jsx(A3,{proOptions:wa,position:xi}),y.jsx(M3,{rfId:Na,disableKeyboardA11y:Kn})]})})}var oT=eb(rT);function sT(t){const[l,r]=O.useState(t),o=O.useCallback(s=>r(u=>Wv(s,u)),[]);return[l,r,o]}function cT(t){const[l,r]=O.useState(t),o=O.useCallback(s=>r(u=>Pv(s,u)),[]);return[l,r,o]}function uT({dimensions:t,lineWidth:l,variant:r,className:o}){return y.jsx("path",{strokeWidth:l,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:$t(["react-flow__background-pattern",r,o])})}function fT({radius:t,className:l}){return y.jsx("circle",{cx:t,cy:t,r:t,className:$t(["react-flow__background-pattern","dots",l])})}var Hl;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Hl||(Hl={}));const dT={[Hl.Dots]:1,[Hl.Lines]:1,[Hl.Cross]:6},hT=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function _b({id:t,variant:l=Hl.Dots,gap:r=20,size:o,lineWidth:s=1,offset:u=0,color:f,bgColor:h,style:g,className:m,patternClassName:x}){const p=O.useRef(null),{transform:b,patternId:w}=Pe(hT,_t),S=o||dT[l],N=l===Hl.Dots,C=l===Hl.Cross,A=Array.isArray(r)?r:[r,r],M=[A[0]*b[2]||1,A[1]*b[2]||1],E=S*b[2],z=Array.isArray(u)?u:[u,u],B=C?[E,E]:M,H=[z[0]*b[2]||1+B[0]/2,z[1]*b[2]||1+B[1]/2],L=`${w}${t||""}`;return y.jsxs("svg",{className:$t(["react-flow__background",m]),style:{...g,...Kc,"--xy-background-color-props":h,"--xy-background-pattern-color-props":f},ref:p,"data-testid":"rf__background",children:[y.jsx("pattern",{id:L,x:b[0]%M[0],y:b[1]%M[1],width:M[0],height:M[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${H[0]},-${H[1]})`,children:N?y.jsx(fT,{radius:E/2,className:x}):y.jsx(uT,{dimensions:B,lineWidth:s,variant:l,className:x})}),y.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${L})`})]})}_b.displayName="Background";const mT=O.memo(_b);function gT(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:y.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function pT(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:y.jsx("path",{d:"M0 0h32v4.2H0z"})})}function yT(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:y.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 xT(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.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 vT(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.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 dc({children:t,className:l,...r}){return y.jsx("button",{type:"button",className:$t(["react-flow__controls-button",l]),...r,children:t})}const bT=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Nb({style:t,showZoom:l=!0,showFitView:r=!0,showInteractive:o=!0,fitViewOptions:s,onZoomIn:u,onZoomOut:f,onFitView:h,onInteractiveChange:g,className:m,children:x,position:p="bottom-left",orientation:b="vertical","aria-label":w}){const S=Nt(),{isInteractive:N,minZoomReached:C,maxZoomReached:A,ariaLabelConfig:M}=Pe(bT,_t),{zoomIn:E,zoomOut:z,fitView:B}=Rh(),H=()=>{E(),u?.()},L=()=>{z(),f?.()},q=()=>{B(s),h?.()},X=()=>{S.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),g?.(!N)},ae=b==="horizontal"?"horizontal":"vertical";return y.jsxs(Qc,{className:$t(["react-flow__controls",ae,m]),position:p,style:t,"data-testid":"rf__controls","aria-label":w??M["controls.ariaLabel"],children:[l&&y.jsxs(y.Fragment,{children:[y.jsx(dc,{onClick:H,className:"react-flow__controls-zoomin",title:M["controls.zoomIn.ariaLabel"],"aria-label":M["controls.zoomIn.ariaLabel"],disabled:A,children:y.jsx(gT,{})}),y.jsx(dc,{onClick:L,className:"react-flow__controls-zoomout",title:M["controls.zoomOut.ariaLabel"],"aria-label":M["controls.zoomOut.ariaLabel"],disabled:C,children:y.jsx(pT,{})})]}),r&&y.jsx(dc,{className:"react-flow__controls-fitview",onClick:q,title:M["controls.fitView.ariaLabel"],"aria-label":M["controls.fitView.ariaLabel"],children:y.jsx(yT,{})}),o&&y.jsx(dc,{className:"react-flow__controls-interactive",onClick:X,title:M["controls.interactive.ariaLabel"],"aria-label":M["controls.interactive.ariaLabel"],children:N?y.jsx(vT,{}):y.jsx(xT,{})}),x]})}Nb.displayName="Controls";const wT=O.memo(Nb);function ST({id:t,x:l,y:r,width:o,height:s,style:u,color:f,strokeColor:h,strokeWidth:g,className:m,borderRadius:x,shapeRendering:p,selected:b,onClick:w}){const{background:S,backgroundColor:N}=u||{},C=f||S||N;return y.jsx("rect",{className:$t(["react-flow__minimap-node",{selected:b},m]),x:l,y:r,rx:x,ry:x,width:o,height:s,style:{fill:C,stroke:h,strokeWidth:g},shapeRendering:p,onClick:w?A=>w(A,t):void 0})}const ET=O.memo(ST),_T=t=>t.nodes.map(l=>l.id),Cd=t=>t instanceof Function?t:()=>t;function NT({nodeStrokeColor:t,nodeColor:l,nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:u=ET,onClick:f}){const h=Pe(_T,_t),g=Cd(l),m=Cd(t),x=Cd(r),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return y.jsx(y.Fragment,{children:h.map(b=>y.jsx(MT,{id:b,nodeColorFunc:g,nodeStrokeColorFunc:m,nodeClassNameFunc:x,nodeBorderRadius:o,nodeStrokeWidth:s,NodeComponent:u,onClick:f,shapeRendering:p},b))})}function CT({id:t,nodeColorFunc:l,nodeStrokeColorFunc:r,nodeClassNameFunc:o,nodeBorderRadius:s,nodeStrokeWidth:u,shapeRendering:f,NodeComponent:h,onClick:g}){const{node:m,x,y:p,width:b,height:w}=Pe(S=>{const{internals:N}=S.nodeLookup.get(t),C=N.userNode,{x:A,y:M}=N.positionAbsolute,{width:E,height:z}=el(C);return{node:C,x:A,y:M,width:E,height:z}},_t);return!m||m.hidden||!Cv(m)?null:y.jsx(h,{x,y:p,width:b,height:w,style:m.style,selected:!!m.selected,className:o(m),color:l(m),borderRadius:s,strokeColor:r(m),strokeWidth:u,shapeRendering:f,onClick:g,id:m.id})}const MT=O.memo(CT);var AT=O.memo(NT);const TT=200,RT=150,zT=t=>!t.hidden,OT=t=>{const l={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:l,boundingRect:t.nodeLookup.size>0?Nv(Bo(t.nodeLookup,{filter:zT}),l):l,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},jT="react-flow__minimap-desc";function Cb({style:t,className:l,nodeStrokeColor:r,nodeColor:o,nodeClassName:s="",nodeBorderRadius:u=5,nodeStrokeWidth:f,nodeComponent:h,bgColor:g,maskColor:m,maskStrokeColor:x,maskStrokeWidth:p,position:b="bottom-right",onClick:w,onNodeClick:S,pannable:N=!1,zoomable:C=!1,ariaLabel:A,inversePan:M,zoomStep:E=1,offsetScale:z=5}){const B=Nt(),H=O.useRef(null),{boundingRect:L,viewBB:q,rfId:X,panZoom:ae,translateExtent:Q,flowWidth:W,flowHeight:ie,ariaLabelConfig:j}=Pe(OT,_t),Z=t?.width??TT,T=t?.height??RT,k=L.width/Z,D=L.height/T,G=Math.max(k,D),te=G*Z,R=G*T,U=z*G,I=L.x-(te-L.width)/2-U,P=L.y-(R-L.height)/2-U,ue=te+U*2,de=R+U*2,se=`${jT}-${X}`,fe=O.useRef(0),me=O.useRef();fe.current=G,O.useEffect(()=>{if(H.current&&ae)return me.current=J4({domNode:H.current,panZoom:ae,getTransform:()=>B.getState().transform,getViewScale:()=>fe.current}),()=>{me.current?.destroy()}},[ae]),O.useEffect(()=>{me.current?.update({translateExtent:Q,width:W,height:ie,inversePan:M,pannable:N,zoomStep:E,zoomable:C})},[N,C,M,E,Q,W,ie]);const Te=w?Re=>{const[Ve,at]=me.current?.pointer(Re)||[0,0];w(Re,{x:Ve,y:at})}:void 0,je=S?O.useCallback((Re,Ve)=>{const at=B.getState().nodeLookup.get(Ve).internals.userNode;S(Re,at)},[]):void 0,Se=A??j["minimap.ariaLabel"];return y.jsx(Qc,{position:b,style:{...t,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*G:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof f=="number"?f:void 0},className:$t(["react-flow__minimap",l]),"data-testid":"rf__minimap",children:y.jsxs("svg",{width:Z,height:T,viewBox:`${I} ${P} ${ue} ${de}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:H,onClick:Te,children:[Se&&y.jsx("title",{id:se,children:Se}),y.jsx(AT,{onClick:je,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:u,nodeClassName:s,nodeStrokeWidth:f,nodeComponent:h}),y.jsx("path",{className:"react-flow__minimap-mask",d:`M${I-U},${P-U}h${ue+U*2}v${de+U*2}h${-ue-U*2}z
|
|
17
|
+
M${q.x},${q.y}h${q.width}v${q.height}h${-q.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Cb.displayName="MiniMap";O.memo(Cb);const DT=t=>l=>t?`${Math.max(1/l.transform[2],1)}`:void 0,kT={[ur.Line]:"right",[ur.Handle]:"bottom-right"};function HT({nodeId:t,position:l,variant:r=ur.Handle,className:o,style:s=void 0,children:u,color:f,minWidth:h=10,minHeight:g=10,maxWidth:m=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:b,autoScale:w=!0,shouldResize:S,onResizeStart:N,onResize:C,onResizeEnd:A}){const M=lb(),E=typeof t=="string"?t:M,z=Nt(),B=O.useRef(null),H=r===ur.Handle,L=Pe(O.useCallback(DT(H&&w),[H,w]),_t),q=O.useRef(null),X=l??kT[r];O.useEffect(()=>{if(!(!B.current||!E))return q.current||(q.current=u3({domNode:B.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:Q,transform:W,snapGrid:ie,snapToGrid:j,nodeOrigin:Z,domNode:T}=z.getState();return{nodeLookup:Q,transform:W,snapGrid:ie,snapToGrid:j,nodeOrigin:Z,paneDomNode:T}},onChange:(Q,W)=>{const{triggerNodeChanges:ie,nodeLookup:j,parentLookup:Z,nodeOrigin:T}=z.getState(),k=[],D={x:Q.x,y:Q.y},G=j.get(E);if(G&&G.expandParent&&G.parentId){const te=G.origin??T,R=Q.width??G.measured.width??0,U=Q.height??G.measured.height??0,I={id:G.id,parentId:G.parentId,rect:{width:R,height:U,...Mv({x:Q.x??G.position.x,y:Q.y??G.position.y},{width:R,height:U},G.parentId,j,te)}},P=Th([I],j,Z,T);k.push(...P),D.x=Q.x?Math.max(te[0]*R,Q.x):void 0,D.y=Q.y?Math.max(te[1]*U,Q.y):void 0}if(D.x!==void 0&&D.y!==void 0){const te={id:E,type:"position",position:{...D}};k.push(te)}if(Q.width!==void 0&&Q.height!==void 0){const R={id:E,type:"dimensions",resizing:!0,setAttributes:b?b==="horizontal"?"width":"height":!0,dimensions:{width:Q.width,height:Q.height}};k.push(R)}for(const te of W){const R={...te,type:"position"};k.push(R)}ie(k)},onEnd:({width:Q,height:W})=>{const ie={id:E,type:"dimensions",resizing:!1,dimensions:{width:Q,height:W}};z.getState().triggerNodeChanges([ie])}})),q.current.update({controlPosition:X,boundaries:{minWidth:h,minHeight:g,maxWidth:m,maxHeight:x},keepAspectRatio:p,resizeDirection:b,onResizeStart:N,onResize:C,onResizeEnd:A,shouldResize:S}),()=>{q.current?.destroy()}},[X,h,g,m,x,p,N,C,A,S]);const ae=X.split("-");return y.jsx("div",{className:$t(["react-flow__resize-control","nodrag",...ae,r,o]),ref:B,style:{...s,scale:L,...f&&{[H?"backgroundColor":"borderColor"]:f}},children:u})}O.memo(HT);const LT=({data:t})=>{const l=t.selected,r=t.status,o={pending:"border-slate-700 bg-slate-900 text-slate-500",running:"border-indigo-500 bg-indigo-500/10 text-indigo-400 ring-2 ring-indigo-500/20",completed:"border-teal-500 bg-teal-500/10 text-teal-400",failed:"border-rose-500 bg-rose-500/10 text-rose-400 shadow-[0_0_15px_rgba(244,63,94,0.2)]",cancelled:"border-amber-500/50 bg-amber-500/10 text-amber-500"},s={pending:Sc,running:jo,completed:gx,failed:Wa,cancelled:xE}[r]||Sc;return y.jsxs("div",{className:di("px-4 py-3 rounded-lg border shadow-lg transition-all min-w-[150px]",o[r]||o.pending,l&&"ring-2 ring-white/20 scale-105"),children:[y.jsx(Bl,{type:"target",position:Ce.Top,className:"!bg-slate-500 !w-2 !h-2"}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(s,{className:di("w-4 h-4",r==="running"&&"animate-pulse")}),y.jsxs("div",{children:[y.jsx("div",{className:"font-medium text-sm",children:t.label}),y.jsx("div",{className:"text-[10px] opacity-70 uppercase tracking-wider",children:r==="cancelled"?"CANCELLED":t.type})]})]}),y.jsx(Bl,{type:"source",position:Ce.Bottom,className:"!bg-slate-500 !w-2 !h-2"})]})},BT=({data:t})=>{const l=t.selected,r=t.status,o={pending:"border-slate-700",running:"border-indigo-500",completed:"border-teal-500",failed:"border-rose-500",cancelled:"border-amber-500/50"};return y.jsxs("div",{className:di("px-4 py-8 rounded-xl border-2 border-dashed transition-all relative","bg-slate-900/50 backdrop-blur-sm",o[r]||o.pending,l&&"ring-2 ring-white/20 text-white"),style:{width:"100%",height:"100%"},children:[y.jsxs("div",{className:"absolute top-0 left-0 bg-slate-800 px-3 py-1 rounded-br-lg text-xs font-bold text-slate-300 border-b border-r border-slate-700",children:[t.label," (",t.type,")"]}),y.jsx(Bl,{type:"target",position:Ce.Top,className:"!bg-slate-500 !w-2 !h-2",style:{top:-10}}),y.jsx(Bl,{type:"source",position:Ce.Bottom,className:"!bg-slate-500 !w-2 !h-2",style:{bottom:-10}})]})},UT={step:LT,group:BT},Zy=200,VT=80,hc=40,YT=100,Md=50,Mb=(t,l=null,r,o="")=>{if(!t||Object.keys(t).length===0)return{nodes:[],edges:[],width:0,height:0};const s=[],u=[],f=[];Object.entries(t).forEach(([w,S])=>{const N=o?`${o}.${w}`:w;let C=null,A=Zy,M=VT;S.nested_structure&&(C=Mb(S.nested_structure,N,r,N),A=C.width+hc*2,M=C.height+hc*2+30,u.push(...C.edges)),f.push({key:w,fullId:N,config:S,width:A,height:M,childLayout:C})});const h={},g=(w,S=new Set)=>{if(S.has(w))return 0;if(h[w]!==void 0)return h[w];S.add(w);const N=t[w];if(!N||!N.depends_on||N.depends_on.length===0)return h[w]=0,0;const C=N.depends_on.filter(E=>t[E]);if(C.length===0)return h[w]=0,0;const A=C.map(E=>g(E,new Set(S))),M=Math.max(...A)+1;return h[w]=M,M};f.forEach(w=>g(w.key));const m={};f.forEach(w=>{const S=h[w.key];m[S]||(m[S]=[]),m[S].push(w)});let x=0,p=0;return Object.keys(m).map(Number).sort((w,S)=>w-S).forEach(w=>{const S=m[w],N=S.reduce((M,E)=>M+E.width+Md,0)-Md;p=Math.max(p,N);let C=-N/2;const A=Math.max(...S.map(M=>M.height));S.forEach(M=>{const E=!!M.childLayout,z=E?"group":"step",B={id:M.fullId,type:z,data:{label:M.key,type:M.config.type,status:r[M.fullId]||"pending",selected:!1},position:{x:C+M.width/2-(E?M.width/2:Zy/2),y:x},style:E?{width:M.width,height:M.height}:void 0,parentId:l||void 0,extent:l?"parent":void 0};if(M.childLayout){const H=Math.min(...M.childLayout.nodes.map(ae=>ae.position.x)),L=Math.min(...M.childLayout.nodes.map(ae=>ae.position.y)),q=-H+hc,X=-L+hc+30;M.childLayout.nodes.forEach(ae=>{ae.position.x+=q,ae.position.y+=X})}s.push(B),M.childLayout&&s.push(...M.childLayout.nodes),C+=M.width+Md}),x+=A+YT}),Object.entries(t).forEach(([w,S])=>{const N=o?`${o}.${w}`:w;S.depends_on&&S.depends_on.forEach(C=>{if(t[C]){const A=o?`${o}.${C}`:C;u.push({id:`${A}-${N}`,source:A,target:N,type:"smoothstep",animated:!0,style:{stroke:"#475569"},markerEnd:{type:No.ArrowClosed,color:"#475569"}})}})}),{nodes:s,edges:u,width:p,height:x}};function qT({structure:t,steps:l,onStepSelect:r,selectedStep:o,reactorStatus:s,error:u,results:f,composedContexts:h}){const g=O.useMemo(()=>{const M={},E=(z,B,H,L,q,X)=>{Object.keys(z||{}).forEach(ae=>{const Q=L?`${L}.${ae}`:ae,W=q?.status||X||s;if(M[Q]="pending",B&&B[ae]!==void 0?M[Q]="completed":H&&H.some(ie=>ie.step===ae)&&W==="running"&&(M[Q]="running"),q?.failure_reason?.step_name===ae&&(M[Q]="failed"),M[Q]==="pending"&&(W==="failed"||W==="cancelled")&&(M[Q]="cancelled"),z[ae].nested_structure){const ie=q?.composed_contexts?.[ae],j=ie?.context?.value||ie?.context,Z=z[ae].type==="map"&&(!j||M[Q]==="completed")?M[Q]:j?.status;E(z[ae].nested_structure,j?.intermediate_results||{},j?.execution_trace||[],Q,j,Z)}})};return E(t,f,l,"",{composed_contexts:h,failure_reason:u,status:s}),(s==="failed"||s==="cancelled")&&Object.keys(M).forEach(z=>{M[z]==="pending"&&(M[z]="cancelled")}),M},[t,l,s,u,f,h]),{nodes:m,edges:x}=O.useMemo(()=>{if(!t)return{nodes:[],edges:[]};const M=Mb(t,null,g);return{nodes:M.nodes.map(z=>({...z,data:{...z.data,selected:o===z.id}})),edges:M.edges}},[t,g,o]),[p,b,w]=sT([]),[S,N,C]=cT([]);O.useMemo(()=>{b(m),N(x)},[m,x,b,N]);const A=O.useCallback((M,E)=>{r(E.id)},[r]);return y.jsx("div",{className:"w-full h-full min-h-[500px] bg-slate-950 rounded-xl overflow-hidden",children:y.jsxs(oT,{nodes:p,edges:S,onNodesChange:w,onEdgesChange:C,nodeTypes:UT,onNodeClick:A,fitView:!0,className:"bg-slate-900/50",children:[y.jsx(mT,{color:"#1e293b",gap:16}),y.jsx(wT,{className:"bg-slate-800 border-slate-700 fill-slate-400 text-slate-400"})]})})}var Ad,Qy;function $T(){if(Qy)return Ad;Qy=1;function t(Y){return Y instanceof Map?Y.clear=Y.delete=Y.set=function(){throw new Error("map is read-only")}:Y instanceof Set&&(Y.add=Y.clear=Y.delete=function(){throw new Error("set is read-only")}),Object.freeze(Y),Object.getOwnPropertyNames(Y).forEach(re=>{const pe=Y[re],ke=typeof pe;(ke==="object"||ke==="function")&&!Object.isFrozen(pe)&&t(pe)}),Y}class l{constructor(re){re.data===void 0&&(re.data={}),this.data=re.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(Y){return Y.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(Y,...re){const pe=Object.create(null);for(const ke in Y)pe[ke]=Y[ke];return re.forEach(function(ke){for(const pt in ke)pe[pt]=ke[pt]}),pe}const s="</span>",u=Y=>!!Y.scope,f=(Y,{prefix:re})=>{if(Y.startsWith("language:"))return Y.replace("language:","language-");if(Y.includes(".")){const pe=Y.split(".");return[`${re}${pe.shift()}`,...pe.map((ke,pt)=>`${ke}${"_".repeat(pt+1)}`)].join(" ")}return`${re}${Y}`};class h{constructor(re,pe){this.buffer="",this.classPrefix=pe.classPrefix,re.walk(this)}addText(re){this.buffer+=r(re)}openNode(re){if(!u(re))return;const pe=f(re.scope,{prefix:this.classPrefix});this.span(pe)}closeNode(re){u(re)&&(this.buffer+=s)}value(){return this.buffer}span(re){this.buffer+=`<span class="${re}">`}}const g=(Y={})=>{const re={children:[]};return Object.assign(re,Y),re};class m{constructor(){this.rootNode=g(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(re){this.top.children.push(re)}openNode(re){const pe=g({scope:re});this.add(pe),this.stack.push(pe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(re){return this.constructor._walk(re,this.rootNode)}static _walk(re,pe){return typeof pe=="string"?re.addText(pe):pe.children&&(re.openNode(pe),pe.children.forEach(ke=>this._walk(re,ke)),re.closeNode(pe)),re}static _collapse(re){typeof re!="string"&&re.children&&(re.children.every(pe=>typeof pe=="string")?re.children=[re.children.join("")]:re.children.forEach(pe=>{m._collapse(pe)}))}}class x extends m{constructor(re){super(),this.options=re}addText(re){re!==""&&this.add(re)}startScope(re){this.openNode(re)}endScope(){this.closeNode()}__addSublanguage(re,pe){const ke=re.root;pe&&(ke.scope=`language:${pe}`),this.add(ke)}toHTML(){return new h(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(Y){return Y?typeof Y=="string"?Y:Y.source:null}function b(Y){return N("(?=",Y,")")}function w(Y){return N("(?:",Y,")*")}function S(Y){return N("(?:",Y,")?")}function N(...Y){return Y.map(pe=>p(pe)).join("")}function C(Y){const re=Y[Y.length-1];return typeof re=="object"&&re.constructor===Object?(Y.splice(Y.length-1,1),re):{}}function A(...Y){return"("+(C(Y).capture?"":"?:")+Y.map(ke=>p(ke)).join("|")+")"}function M(Y){return new RegExp(Y.toString()+"|").exec("").length-1}function E(Y,re){const pe=Y&&Y.exec(re);return pe&&pe.index===0}const z=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function B(Y,{joinWith:re}){let pe=0;return Y.map(ke=>{pe+=1;const pt=pe;let rt=p(ke),ve="";for(;rt.length>0;){const ye=z.exec(rt);if(!ye){ve+=rt;break}ve+=rt.substring(0,ye.index),rt=rt.substring(ye.index+ye[0].length),ye[0][0]==="\\"&&ye[1]?ve+="\\"+String(Number(ye[1])+pt):(ve+=ye[0],ye[0]==="("&&pe++)}return ve}).map(ke=>`(${ke})`).join(re)}const H=/\b\B/,L="[a-zA-Z]\\w*",q="[a-zA-Z_]\\w*",X="\\b\\d+(\\.\\d+)?",ae="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Q="\\b(0b[01]+)",W="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ie=(Y={})=>{const re=/^#![ ]*\//;return Y.binary&&(Y.begin=N(re,/.*\b/,Y.binary,/\b.*/)),o({scope:"meta",begin:re,end:/$/,relevance:0,"on:begin":(pe,ke)=>{pe.index!==0&&ke.ignoreMatch()}},Y)},j={begin:"\\\\[\\s\\S]",relevance:0},Z={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[j]},T={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[j]},k={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},D=function(Y,re,pe={}){const ke=o({scope:"comment",begin:Y,end:re,contains:[]},pe);ke.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const pt=A("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return ke.contains.push({begin:N(/[ ]+/,"(",pt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ke},G=D("//","$"),te=D("/\\*","\\*/"),R=D("#","$"),U={scope:"number",begin:X,relevance:0},I={scope:"number",begin:ae,relevance:0},P={scope:"number",begin:Q,relevance:0},ue={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]},de={scope:"title",begin:L,relevance:0},se={scope:"title",begin:q,relevance:0},fe={begin:"\\.\\s*"+q,relevance:0};var Te=Object.freeze({__proto__:null,APOS_STRING_MODE:Z,BACKSLASH_ESCAPE:j,BINARY_NUMBER_MODE:P,BINARY_NUMBER_RE:Q,COMMENT:D,C_BLOCK_COMMENT_MODE:te,C_LINE_COMMENT_MODE:G,C_NUMBER_MODE:I,C_NUMBER_RE:ae,END_SAME_AS_BEGIN:function(Y){return Object.assign(Y,{"on:begin":(re,pe)=>{pe.data._beginMatch=re[1]},"on:end":(re,pe)=>{pe.data._beginMatch!==re[1]&&pe.ignoreMatch()}})},HASH_COMMENT_MODE:R,IDENT_RE:L,MATCH_NOTHING_RE:H,METHOD_GUARD:fe,NUMBER_MODE:U,NUMBER_RE:X,PHRASAL_WORDS_MODE:k,QUOTE_STRING_MODE:T,REGEXP_MODE:ue,RE_STARTERS_RE:W,SHEBANG:ie,TITLE_MODE:de,UNDERSCORE_IDENT_RE:q,UNDERSCORE_TITLE_MODE:se});function je(Y,re){Y.input[Y.index-1]==="."&&re.ignoreMatch()}function Se(Y,re){Y.className!==void 0&&(Y.scope=Y.className,delete Y.className)}function Re(Y,re){re&&Y.beginKeywords&&(Y.begin="\\b("+Y.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Y.__beforeBegin=je,Y.keywords=Y.keywords||Y.beginKeywords,delete Y.beginKeywords,Y.relevance===void 0&&(Y.relevance=0))}function Ve(Y,re){Array.isArray(Y.illegal)&&(Y.illegal=A(...Y.illegal))}function at(Y,re){if(Y.match){if(Y.begin||Y.end)throw new Error("begin & end are not supported with match");Y.begin=Y.match,delete Y.match}}function Me(Y,re){Y.relevance===void 0&&(Y.relevance=1)}const Le=(Y,re)=>{if(!Y.beforeMatch)return;if(Y.starts)throw new Error("beforeMatch cannot be used with starts");const pe=Object.assign({},Y);Object.keys(Y).forEach(ke=>{delete Y[ke]}),Y.keywords=pe.keywords,Y.begin=N(pe.beforeMatch,b(pe.begin)),Y.starts={relevance:0,contains:[Object.assign(pe,{endsParent:!0})]},Y.relevance=0,delete pe.beforeMatch},We=["of","and","for","in","not","or","if","then","parent","list","value"],Ge="keyword";function xt(Y,re,pe=Ge){const ke=Object.create(null);return typeof Y=="string"?pt(pe,Y.split(" ")):Array.isArray(Y)?pt(pe,Y):Object.keys(Y).forEach(function(rt){Object.assign(ke,xt(Y[rt],re,rt))}),ke;function pt(rt,ve){re&&(ve=ve.map(ye=>ye.toLowerCase())),ve.forEach(function(ye){const ze=ye.split("|");ke[ze[0]]=[rt,Qt(ze[0],ze[1])]})}}function Qt(Y,re){return re?Number(re):gt(Y)?0:1}function gt(Y){return We.includes(Y.toLowerCase())}const vt={},Je=Y=>{console.error(Y)},zn=(Y,...re)=>{console.log(`WARN: ${Y}`,...re)},Gt=(Y,re)=>{vt[`${Y}/${re}`]||(console.log(`Deprecated as of ${Y}. ${re}`),vt[`${Y}/${re}`]=!0)},ln=new Error;function Ct(Y,re,{key:pe}){let ke=0;const pt=Y[pe],rt={},ve={};for(let ye=1;ye<=re.length;ye++)ve[ye+ke]=pt[ye],rt[ye+ke]=!0,ke+=M(re[ye-1]);Y[pe]=ve,Y[pe]._emit=rt,Y[pe]._multi=!0}function fn(Y){if(Array.isArray(Y.begin)){if(Y.skip||Y.excludeBegin||Y.returnBegin)throw Je("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ln;if(typeof Y.beginScope!="object"||Y.beginScope===null)throw Je("beginScope must be object"),ln;Ct(Y,Y.begin,{key:"beginScope"}),Y.begin=B(Y.begin,{joinWith:""})}}function On(Y){if(Array.isArray(Y.end)){if(Y.skip||Y.excludeEnd||Y.returnEnd)throw Je("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ln;if(typeof Y.endScope!="object"||Y.endScope===null)throw Je("endScope must be object"),ln;Ct(Y,Y.end,{key:"endScope"}),Y.end=B(Y.end,{joinWith:""})}}function Vl(Y){Y.scope&&typeof Y.scope=="object"&&Y.scope!==null&&(Y.beginScope=Y.scope,delete Y.scope)}function ya(Y){Vl(Y),typeof Y.beginScope=="string"&&(Y.beginScope={_wrap:Y.beginScope}),typeof Y.endScope=="string"&&(Y.endScope={_wrap:Y.endScope}),fn(Y),On(Y)}function xa(Y){function re(ve,ye){return new RegExp(p(ve),"m"+(Y.case_insensitive?"i":"")+(Y.unicodeRegex?"u":"")+(ye?"g":""))}class pe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ye,ze){ze.position=this.position++,this.matchIndexes[this.matchAt]=ze,this.regexes.push([ze,ye]),this.matchAt+=M(ye)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ye=this.regexes.map(ze=>ze[1]);this.matcherRe=re(B(ye,{joinWith:"|"}),!0),this.lastIndex=0}exec(ye){this.matcherRe.lastIndex=this.lastIndex;const ze=this.matcherRe.exec(ye);if(!ze)return null;const Mt=ze.findIndex((Xn,nl)=>nl>0&&Xn!==void 0),bt=this.matchIndexes[Mt];return ze.splice(0,Mt),Object.assign(ze,bt)}}class ke{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ye){if(this.multiRegexes[ye])return this.multiRegexes[ye];const ze=new pe;return this.rules.slice(ye).forEach(([Mt,bt])=>ze.addRule(Mt,bt)),ze.compile(),this.multiRegexes[ye]=ze,ze}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ye,ze){this.rules.push([ye,ze]),ze.type==="begin"&&this.count++}exec(ye){const ze=this.getMatcher(this.regexIndex);ze.lastIndex=this.lastIndex;let Mt=ze.exec(ye);if(this.resumingScanAtSamePosition()&&!(Mt&&Mt.index===this.lastIndex)){const bt=this.getMatcher(0);bt.lastIndex=this.lastIndex+1,Mt=bt.exec(ye)}return Mt&&(this.regexIndex+=Mt.position+1,this.regexIndex===this.count&&this.considerAll()),Mt}}function pt(ve){const ye=new ke;return ve.contains.forEach(ze=>ye.addRule(ze.begin,{rule:ze,type:"begin"})),ve.terminatorEnd&&ye.addRule(ve.terminatorEnd,{type:"end"}),ve.illegal&&ye.addRule(ve.illegal,{type:"illegal"}),ye}function rt(ve,ye){const ze=ve;if(ve.isCompiled)return ze;[Se,at,ya,Le].forEach(bt=>bt(ve,ye)),Y.compilerExtensions.forEach(bt=>bt(ve,ye)),ve.__beforeBegin=null,[Re,Ve,Me].forEach(bt=>bt(ve,ye)),ve.isCompiled=!0;let Mt=null;return typeof ve.keywords=="object"&&ve.keywords.$pattern&&(ve.keywords=Object.assign({},ve.keywords),Mt=ve.keywords.$pattern,delete ve.keywords.$pattern),Mt=Mt||/\w+/,ve.keywords&&(ve.keywords=xt(ve.keywords,Y.case_insensitive)),ze.keywordPatternRe=re(Mt,!0),ye&&(ve.begin||(ve.begin=/\B|\b/),ze.beginRe=re(ze.begin),!ve.end&&!ve.endsWithParent&&(ve.end=/\B|\b/),ve.end&&(ze.endRe=re(ze.end)),ze.terminatorEnd=p(ze.end)||"",ve.endsWithParent&&ye.terminatorEnd&&(ze.terminatorEnd+=(ve.end?"|":"")+ye.terminatorEnd)),ve.illegal&&(ze.illegalRe=re(ve.illegal)),ve.contains||(ve.contains=[]),ve.contains=[].concat(...ve.contains.map(function(bt){return jn(bt==="self"?ve:bt)})),ve.contains.forEach(function(bt){rt(bt,ze)}),ve.starts&&rt(ve.starts,ye),ze.matcher=pt(ze),ze}if(Y.compilerExtensions||(Y.compilerExtensions=[]),Y.contains&&Y.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Y.classNameAliases=o(Y.classNameAliases||{}),rt(Y)}function Kt(Y){return Y?Y.endsWithParent||Kt(Y.starts):!1}function jn(Y){return Y.variants&&!Y.cachedVariants&&(Y.cachedVariants=Y.variants.map(function(re){return o(Y,{variants:null},re)})),Y.cachedVariants?Y.cachedVariants:Kt(Y)?o(Y,{starts:Y.starts?o(Y.starts):null}):Object.isFrozen(Y)?o(Y):Y}var Wt="11.11.1";class gr extends Error{constructor(re,pe){super(re),this.name="HTMLInjectionError",this.html=pe}}const Yl=r,yi=o,va=Symbol("nomatch"),tl=7,ba=function(Y){const re=Object.create(null),pe=Object.create(null),ke=[];let pt=!0;const rt="Could not find the language '{}', did you forget to load/include a language module?",ve={disableAutodetect:!0,name:"Plain text",contains:[]};let ye={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:x};function ze(he){return ye.noHighlightRe.test(he)}function Mt(he){let Ne=he.className+" ";Ne+=he.parentNode?he.parentNode.className:"";const Ye=ye.languageDetectRe.exec(Ne);if(Ye){const lt=Pt(Ye[1]);return lt||(zn(rt.replace("{}",Ye[1])),zn("Falling back to no-highlight mode for this block.",he)),lt?Ye[1]:"no-highlight"}return Ne.split(/\s+/).find(lt=>ze(lt)||Pt(lt))}function bt(he,Ne,Ye){let lt="",Tt="";typeof Ne=="object"?(lt=he,Ye=Ne.ignoreIllegals,Tt=Ne.language):(Gt("10.7.0","highlight(lang, code, ...args) has been deprecated."),Gt("10.7.0",`Please use highlight(code, options) instead.
|
|
18
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Tt=he,lt=Ne),Ye===void 0&&(Ye=!0);const Jt={code:lt,language:Tt};Sa("before:highlight",Jt);const dn=Jt.result?Jt.result:Xn(Jt.language,Jt.code,Ye);return dn.code=Jt.code,Sa("after:highlight",dn),dn}function Xn(he,Ne,Ye,lt){const Tt=Object.create(null);function Jt(ge,Ee){return ge.keywords[Ee]}function dn(){if(!De.keywords){Bt.addText(ot);return}let ge=0;De.keywordPatternRe.lastIndex=0;let Ee=De.keywordPatternRe.exec(ot),Be="";for(;Ee;){Be+=ot.substring(ge,Ee.index);const Qe=Lt.case_insensitive?Ee[0].toLowerCase():Ee[0],Rt=Jt(De,Qe);if(Rt){const[kn,xr]=Rt;if(Bt.addText(Be),Be="",Tt[Qe]=(Tt[Qe]||0)+1,Tt[Qe]<=tl&&(ol+=xr),kn.startsWith("_"))Be+=Ee[0];else{const $o=Lt.classNameAliases[kn]||kn;hn(Ee[0],$o)}}else Be+=Ee[0];ge=De.keywordPatternRe.lastIndex,Ee=De.keywordPatternRe.exec(ot)}Be+=ot.substring(ge),Bt.addText(Be)}function on(){if(ot==="")return;let ge=null;if(typeof De.subLanguage=="string"){if(!re[De.subLanguage]){Bt.addText(ot);return}ge=Xn(De.subLanguage,ot,!0,qo[De.subLanguage]),qo[De.subLanguage]=ge._top}else ge=al(ot,De.subLanguage.length?De.subLanguage:null);De.relevance>0&&(ol+=ge.relevance),Bt.__addSublanguage(ge._emitter,ge.language)}function ft(){De.subLanguage!=null?on():dn(),ot=""}function hn(ge,Ee){ge!==""&&(Bt.startScope(Ee),Bt.addText(ge),Bt.endScope())}function bi(ge,Ee){let Be=1;const Qe=Ee.length-1;for(;Be<=Qe;){if(!ge._emit[Be]){Be++;continue}const Rt=Lt.classNameAliases[ge[Be]]||ge[Be],kn=Ee[Be];Rt?hn(kn,Rt):(ot=kn,dn(),ot=""),Be++}}function Ea(ge,Ee){return ge.scope&&typeof ge.scope=="string"&&Bt.openNode(Lt.classNameAliases[ge.scope]||ge.scope),ge.beginScope&&(ge.beginScope._wrap?(hn(ot,Lt.classNameAliases[ge.beginScope._wrap]||ge.beginScope._wrap),ot=""):ge.beginScope._multi&&(bi(ge.beginScope,Ee),ot="")),De=Object.create(ge,{parent:{value:De}}),De}function Gl(ge,Ee,Be){let Qe=E(ge.endRe,Be);if(Qe){if(ge["on:end"]){const Rt=new l(ge);ge["on:end"](Ee,Rt),Rt.isMatchIgnored&&(Qe=!1)}if(Qe){for(;ge.endsParent&&ge.parent;)ge=ge.parent;return ge}}if(ge.endsWithParent)return Gl(ge.parent,Ee,Be)}function _a(ge){return De.matcher.regexIndex===0?(ot+=ge[0],1):(sl=!0,0)}function pr(ge){const Ee=ge[0],Be=ge.rule,Qe=new l(Be),Rt=[Be.__beforeBegin,Be["on:begin"]];for(const kn of Rt)if(kn&&(kn(ge,Qe),Qe.isMatchIgnored))return _a(Ee);return Be.skip?ot+=Ee:(Be.excludeBegin&&(ot+=Ee),ft(),!Be.returnBegin&&!Be.excludeBegin&&(ot=Ee)),Ea(Be,ge),Be.returnBegin?0:Ee.length}function sn(ge){const Ee=ge[0],Be=Ne.substring(ge.index),Qe=Gl(De,ge,Be);if(!Qe)return va;const Rt=De;De.endScope&&De.endScope._wrap?(ft(),hn(Ee,De.endScope._wrap)):De.endScope&&De.endScope._multi?(ft(),bi(De.endScope,ge)):Rt.skip?ot+=Ee:(Rt.returnEnd||Rt.excludeEnd||(ot+=Ee),ft(),Rt.excludeEnd&&(ot=Ee));do De.scope&&Bt.closeNode(),!De.skip&&!De.subLanguage&&(ol+=De.relevance),De=De.parent;while(De!==Qe.parent);return Qe.starts&&Ea(Qe.starts,ge),Rt.returnEnd?0:Ee.length}function Na(){const ge=[];for(let Ee=De;Ee!==Lt;Ee=Ee.parent)Ee.scope&&ge.unshift(Ee.scope);ge.forEach(Ee=>Bt.openNode(Ee))}let Ca={};function rl(ge,Ee){const Be=Ee&&Ee[0];if(ot+=ge,Be==null)return ft(),0;if(Ca.type==="begin"&&Ee.type==="end"&&Ca.index===Ee.index&&Be===""){if(ot+=Ne.slice(Ee.index,Ee.index+1),!pt){const Qe=new Error(`0 width match regex (${he})`);throw Qe.languageName=he,Qe.badRule=Ca.rule,Qe}return 1}if(Ca=Ee,Ee.type==="begin")return pr(Ee);if(Ee.type==="illegal"&&!Ye){const Qe=new Error('Illegal lexeme "'+Be+'" for mode "'+(De.scope||"<unnamed>")+'"');throw Qe.mode=De,Qe}else if(Ee.type==="end"){const Qe=sn(Ee);if(Qe!==va)return Qe}if(Ee.type==="illegal"&&Be==="")return ot+=`
|
|
19
|
+
`,1;if(yr>1e5&&yr>Ee.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ot+=Be,Be.length}const Lt=Pt(he);if(!Lt)throw Je(rt.replace("{}",he)),new Error('Unknown language: "'+he+'"');const Yo=xa(Lt);let wi="",De=lt||Yo;const qo={},Bt=new ye.__emitter(ye);Na();let ot="",ol=0,Ma=0,yr=0,sl=!1;try{if(Lt.__emitTokens)Lt.__emitTokens(Ne,Bt);else{for(De.matcher.considerAll();;){yr++,sl?sl=!1:De.matcher.considerAll(),De.matcher.lastIndex=Ma;const ge=De.matcher.exec(Ne);if(!ge)break;const Ee=Ne.substring(Ma,ge.index),Be=rl(Ee,ge);Ma=ge.index+Be}rl(Ne.substring(Ma))}return Bt.finalize(),wi=Bt.toHTML(),{language:he,value:wi,relevance:ol,illegal:!1,_emitter:Bt,_top:De}}catch(ge){if(ge.message&&ge.message.includes("Illegal"))return{language:he,value:Yl(Ne),illegal:!0,relevance:0,_illegalBy:{message:ge.message,index:Ma,context:Ne.slice(Ma-100,Ma+100),mode:ge.mode,resultSoFar:wi},_emitter:Bt};if(pt)return{language:he,value:Yl(Ne),illegal:!1,relevance:0,errorRaised:ge,_emitter:Bt,_top:De};throw ge}}function nl(he){const Ne={value:Yl(he),illegal:!1,relevance:0,_top:ve,_emitter:new ye.__emitter(ye)};return Ne._emitter.addText(he),Ne}function al(he,Ne){Ne=Ne||ye.languages||Object.keys(re);const Ye=nl(he),lt=Ne.filter(Pt).filter(Kn).map(ft=>Xn(ft,he,!1));lt.unshift(Ye);const Tt=lt.sort((ft,hn)=>{if(ft.relevance!==hn.relevance)return hn.relevance-ft.relevance;if(ft.language&&hn.language){if(Pt(ft.language).supersetOf===hn.language)return 1;if(Pt(hn.language).supersetOf===ft.language)return-1}return 0}),[Jt,dn]=Tt,on=Jt;return on.secondBest=dn,on}function Dn(he,Ne,Ye){const lt=Ne&&pe[Ne]||Ye;he.classList.add("hljs"),he.classList.add(`language-${lt}`)}function At(he){let Ne=null;const Ye=Mt(he);if(ze(Ye))return;if(Sa("before:highlightElement",{el:he,language:Ye}),he.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",he);return}if(he.children.length>0&&(ye.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(he)),ye.throwUnescapedHTML))throw new gr("One of your code blocks includes unescaped HTML.",he.innerHTML);Ne=he;const lt=Ne.textContent,Tt=Ye?bt(lt,{language:Ye,ignoreIllegals:!0}):al(lt);he.innerHTML=Tt.value,he.dataset.highlighted="yes",Dn(he,Ye,Tt.language),he.result={language:Tt.language,re:Tt.relevance,relevance:Tt.relevance},Tt.secondBest&&(he.secondBest={language:Tt.secondBest.language,relevance:Tt.secondBest.relevance}),Sa("after:highlightElement",{el:he,result:Tt,text:lt})}function It(he){ye=yi(ye,he)}const Zn=()=>{il(),Gt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function ll(){il(),Gt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ql=!1;function il(){function he(){il()}if(document.readyState==="loading"){ql||window.addEventListener("DOMContentLoaded",he,!1),ql=!0;return}document.querySelectorAll(ye.cssSelector).forEach(At)}function xi(he,Ne){let Ye=null;try{Ye=Ne(Y)}catch(lt){if(Je("Language definition for '{}' could not be registered.".replace("{}",he)),pt)Je(lt);else throw lt;Ye=ve}Ye.name||(Ye.name=he),re[he]=Ye,Ye.rawDefinition=Ne.bind(null,Y),Ye.aliases&&Qn(Ye.aliases,{languageName:he})}function wa(he){delete re[he];for(const Ne of Object.keys(pe))pe[Ne]===he&&delete pe[Ne]}function $l(){return Object.keys(re)}function Pt(he){return he=(he||"").toLowerCase(),re[he]||re[pe[he]]}function Qn(he,{languageName:Ne}){typeof he=="string"&&(he=[he]),he.forEach(Ye=>{pe[Ye.toLowerCase()]=Ne})}function Kn(he){const Ne=Pt(he);return Ne&&!Ne.disableAutodetect}function ra(he){he["before:highlightBlock"]&&!he["before:highlightElement"]&&(he["before:highlightElement"]=Ne=>{he["before:highlightBlock"](Object.assign({block:Ne.el},Ne))}),he["after:highlightBlock"]&&!he["after:highlightElement"]&&(he["after:highlightElement"]=Ne=>{he["after:highlightBlock"](Object.assign({block:Ne.el},Ne))})}function Ot(he){ra(he),ke.push(he)}function vi(he){const Ne=ke.indexOf(he);Ne!==-1&&ke.splice(Ne,1)}function Sa(he,Ne){const Ye=he;ke.forEach(function(lt){lt[Ye]&<[Ye](Ne)})}function In(he){return Gt("10.7.0","highlightBlock will be removed entirely in v12.0"),Gt("10.7.0","Please use highlightElement now."),At(he)}Object.assign(Y,{highlight:bt,highlightAuto:al,highlightAll:il,highlightElement:At,highlightBlock:In,configure:It,initHighlighting:Zn,initHighlightingOnLoad:ll,registerLanguage:xi,unregisterLanguage:wa,listLanguages:$l,getLanguage:Pt,registerAliases:Qn,autoDetection:Kn,inherit:yi,addPlugin:Ot,removePlugin:vi}),Y.debugMode=function(){pt=!1},Y.safeMode=function(){pt=!0},Y.versionString=Wt,Y.regex={concat:N,lookahead:b,either:A,optional:S,anyNumberOfTimes:w};for(const he in Te)typeof Te[he]=="object"&&t(Te[he]);return Object.assign(Y,Te),Y},rn=ba({});return rn.newInstance=()=>ba({}),Ad=rn,rn.HighlightJS=rn,rn.default=rn,Ad}var GT=$T();const nh=ah(GT);function XT(t){const l=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=l.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=l.concat(o,/(::\w+)*/),f={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},h={className:"doctag",begin:"@[A-Za-z]+"},g={begin:"#<",end:">"},m=[t.COMMENT("#","$",{contains:[h]}),t.COMMENT("^=begin","^=end",{contains:[h],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],x={className:"subst",begin:/#\{/,end:/\}/,keywords:f},p={className:"string",contains:[t.BACKSLASH_ESCAPE,x],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:l.concat(/<<[-~]?'?/,l.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,x]})]}]},b="[1-9](_?[0-9])*|0",w="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${w}))?([eE][+-]?(${w})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},N={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:f}]},H=[p,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:f},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:f},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[N]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[p,{begin:r}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:f},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,x],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(g,m),relevance:0}].concat(g,m);x.contains=H,N.contains=H;const ae=[{begin:/^\s*=>/,starts:{end:"$",contains:H}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:f,contains:H}}];return m.unshift(g),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:f,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(ae).concat(m).concat(H)}}function ZT(t){if(!t||typeof t!="object")return;const l=t,{_type:r,...o}=l;return{...o,message:l.message||l.error,code_snippet:l.code_snippet}}nh.registerLanguage("ruby",XT);function QT(t){return!t||t.endsWith(".rb")||t.endsWith(".rake")?"ruby":t.endsWith(".ts")||t.endsWith(".tsx")?"typescript":t.endsWith(".js")||t.endsWith(".jsx")?"javascript":"ruby"}function KT(t,l){if(!t)return" ";try{return nh.highlight(t,{language:l}).value}catch{return nh.highlight(t,{language:"plaintext"}).value}}function IT({snippet:t,filePath:l,lineNumber:r}){const o=O.useMemo(()=>QT(l),[l]),s=l?.split("/").pop();return y.jsxs("div",{children:[y.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[y.jsx(LE,{className:"w-4 h-4"}),"Source Code"]}),y.jsxs("div",{className:"bg-slate-950 rounded-lg border border-slate-800 overflow-hidden",children:[(l||r)&&y.jsxs("div",{className:"px-4 py-2 border-b border-slate-800 bg-slate-900/80 flex items-center justify-between gap-2",children:[y.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-slate-500",children:"Location"}),y.jsxs("span",{className:"text-xs font-mono text-slate-400 truncate",title:l,children:[s,r?`:${r}`:""]})]}),y.jsx("pre",{className:"overflow-x-auto m-0 p-4 text-xs leading-6 bg-transparent",children:y.jsx("code",{className:`hljs language-${o} !bg-transparent !p-0 block`,children:t.map((u,f)=>y.jsxs("span",{className:`flex ${u.target?"bg-red-500/15 -mx-4 px-4 border-l-2 border-red-400":""}`,children:[y.jsx("span",{className:`select-none w-6 shrink-0 text-right pr-2 ${u.target?"text-red-400 font-bold":"text-slate-600"}`,"aria-hidden":"true",children:u.target?">":" "}),y.jsx("span",{className:`select-none w-10 shrink-0 text-right pr-4 ${u.target?"text-red-400/70":"text-slate-600"}`,children:u.line_number}),y.jsx("span",{className:"flex-1 pr-4 whitespace-pre",dangerouslySetInnerHTML:{__html:KT(u.content,o)}})]},`${u.line_number}-${f}`))})})]})]})}function JT({stepName:t,structure:l,results:r,trace:o,error:s,undoStack:u=[],stepAttempts:f={},composedContexts:h={},onClose:g,reactorId:m,reactorStatus:x,onAction:p}){const[b,w]=O.useState(!1),[S,N]=O.useState(""),[C,A]=O.useState(null),[M,E]=O.useState(!1),z=async()=>{if(!(!m||!t)){E(!0),A(null);try{let k={};if(S.trim())try{k=JSON.parse(S)}catch{A("Invalid JSON payload"),E(!1);return}const D=await fetch(Qa(`/api/reactors/${m}/continue`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({payload:k,step_name:t.split(".").pop()})}),G=await D.json();D.ok?(N(""),p&&p(),g&&g()):A(G.error||"Failed to resume")}catch(k){console.error("Failed to resume",k),A("An unexpected error occurred")}finally{E(!1)}}},B=O.useMemo(()=>{if(!t)return null;const k=t.split("."),D=(te,R,U)=>{const I=te[0],P=te.length===1,ue=R?.[I];if(P){const de=U?.intermediate_results||{},se=U?.execution_trace||[],fe=U?.retry_context?.step_attempts||{};return{stepConfig:ue,result:de[I],attempts:fe[I]||0,trace:se.filter(me=>me.step===I),context:U}}else{const de=U?.composed_contexts?.[I],se=de?.context?.value||de?.context;return D(te.slice(1),ue?.nested_structure,se)}},G={composed_contexts:h,failure_reason:s,intermediate_results:r,execution_trace:o,retry_context:{step_attempts:f}};try{return D(k,l,G)}catch(te){return console.error("Error resolving step data:",te),null}},[t,l,r,o,f,h,s]),H=B?.stepConfig,L=B?.result,q=B?.context?.failure_reason?.step_name===t?.split(".").pop(),X=B?.attempts||0,ae=X>1?X-1:0,Q=B?.trace||[],ie=Q[Q.length-1]?.arguments||(q?B?.context?.failure_reason?.step_arguments:{}),j=ZT(B?.context?.failure_reason),Z=j?.code_snippet,T=O.useMemo(()=>{const k=[],D=(G,te,R,U)=>{const I=G.filter(de=>de.type==="undo"||de.type==="compensate").map(de=>({step_name:de.step,result:de.result,status:"executed",timestamp:de.timestamp?._type==="Time"?de.timestamp.value:null,type:de.type})),P=(te||[]).map(de=>({step_name:de.step_name,result:null,status:"pending",timestamp:null,type:"undo"})),ue=[...I,...P.reverse()];ue.length>0&&k.push({reactorName:U,items:ue}),Object.entries(R||{}).forEach(([de,se])=>{const fe=se?.context?.value||se?.context;fe&&D(fe.execution_trace||[],fe.undo_stack||[],fe.composed_contexts||{},de)})};return D(o,u,h,"Root Reactor"),k},[o,u,h]);return t?y.jsxs("div",{className:"h-full flex flex-col bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden",children:[y.jsx("div",{className:"px-6 py-4 border-b border-slate-800 bg-slate-900/80",children:y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[g&&y.jsx("button",{onClick:g,className:"p-1 hover:bg-white/10 rounded-full text-slate-400 hover:text-white transition-colors",children:y.jsx(ch,{className:"w-5 h-5"})}),y.jsx("div",{className:"p-2 bg-indigo-500/10 rounded-lg",children:y.jsx(Cp,{className:"w-5 h-5 text-indigo-400"})}),y.jsxs("div",{children:[y.jsx("h2",{className:"font-bold text-white text-lg",children:t?.split(".").pop()}),y.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 font-mono mt-0.5",children:[y.jsx("span",{className:"uppercase tracking-wider text-indigo-400",children:H?.type||"UNKNOWN"}),H?.async&&y.jsx("span",{className:"bg-slate-800 px-1.5 py-0.5 rounded text-slate-400",children:"ASYNC"})]})]})]}),ae>0&&y.jsx("div",{className:"flex items-center gap-1.5 px-2.5 py-1 bg-amber-500/10 border border-amber-500/20 rounded-md",children:y.jsxs("span",{className:"text-xs font-medium text-amber-500",children:["Retries: ",ae]})})]})}),y.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-8",children:[x==="paused"&&H?.type==="interrupt"&&y.jsxs("div",{className:"bg-emerald-500/5 rounded-lg border border-emerald-500/20 p-4",children:[y.jsxs("h3",{className:"text-sm font-medium text-emerald-400 mb-2 flex items-center gap-2",children:[y.jsx(yx,{className:"w-4 h-4"}),"Resume Execution"]}),y.jsx("p",{className:"text-xs text-slate-400 mb-3",children:"This step is an interrupt point. You can provide a payload and resume execution from here."}),y.jsxs("div",{className:"space-y-3",children:[y.jsxs("div",{children:[y.jsx("label",{className:"text-xs font-mono text-slate-500 mb-1.5 block",children:"Payload (JSON)"}),y.jsx("textarea",{value:S,onChange:k=>N(k.target.value),placeholder:'{"key": "value"}',className:"w-full h-24 bg-slate-950 border border-slate-800 rounded-lg p-3 text-sm font-mono text-slate-200 focus:outline-none focus:border-emerald-500/50 focus:ring-1 focus:ring-emerald-500/50 font-mono placeholder-slate-700"})]}),C&&y.jsxs("div",{className:"text-xs text-red-400 flex items-center gap-1.5 bg-red-500/10 p-2 rounded border border-red-500/20",children:[y.jsx(Wa,{className:"w-3 h-3"}),C]}),y.jsx("button",{onClick:z,disabled:M,className:"w-full py-2 bg-emerald-600 hover:bg-emerald-500 text-white rounded-lg text-sm font-medium shadow-lg shadow-emerald-500/20 transition-all hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed",children:M?"Resuming...":"Resume Reactor"})]})]}),q&&j&&y.jsxs("div",{className:"space-y-4",children:[y.jsxs("h3",{className:"text-sm font-medium text-red-500 mb-3 flex items-center gap-2",children:[y.jsx(Wa,{className:"w-4 h-4"}),"Failure Details"]}),y.jsxs("div",{className:"bg-red-500/10 rounded-lg p-4 font-mono text-xs border border-red-500/20 text-red-300 overflow-x-auto space-y-2",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[j.exception_class&&y.jsx("span",{className:"text-[10px] uppercase font-bold tracking-wider text-red-400 opacity-70",children:j.exception_class}),y.jsx("div",{className:"font-bold text-sm leading-relaxed",children:j.message||j.error})]}),j.validation_errors&&y.jsxs("div",{className:"pt-3 mt-3 border-t border-red-500/10",children:[y.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-red-400/50 mb-2 block",children:"Validation Errors"}),y.jsx("div",{className:"space-y-2 bg-red-950/20 rounded p-2",children:Object.entries(j.validation_errors).map(([k,D])=>y.jsxs("div",{className:"flex flex-col",children:[y.jsxs("span",{className:"font-bold text-red-400 text-xs",children:[k,":"]}),y.jsx("div",{className:"pl-2",children:Array.isArray(D)?D.map((G,te)=>y.jsxs("div",{className:"text-red-300/90",children:["- ",G]},te)):y.jsxs("div",{className:"text-red-300/90",children:["- ",String(D)]})})]},k))})]})]}),Z&&Z.length>0&&y.jsx(IT,{snippet:Z,filePath:j.file_path,lineNumber:j.line_number}),j.backtrace&&y.jsxs("div",{className:"bg-red-500/10 rounded-lg p-4 font-mono text-xs border border-red-500/20 text-red-300 overflow-x-auto",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-red-400/50",children:"Stack Trace"}),y.jsx("button",{onClick:()=>w(!b),className:"flex items-center gap-1 text-[10px] font-bold text-red-400/70 hover:text-red-400 transition-colors uppercase tracking-wider",children:b?y.jsxs(y.Fragment,{children:[y.jsx(AE,{className:"w-3 h-3"})," Show Less"]}):y.jsxs(y.Fragment,{children:[y.jsx(EE,{className:"w-3 h-3"})," Show More (",j.backtrace.length," lines)"]})})]}),y.jsxs("div",{className:"text-red-400/70 whitespace-pre-wrap leading-relaxed max-h-[300px] overflow-y-auto custom-scrollbar",children:[b?j.backtrace.join(`
|
|
20
|
+
`):j.backtrace.slice(0,5).join(`
|
|
21
|
+
`),!b&&j.backtrace.length>5&&y.jsxs("div",{className:"mt-1 text-red-400/30 italic",children:["... and ",j.backtrace.length-5," more lines"]})]})]})]}),H?.depends_on?.length>0&&y.jsxs("div",{children:[y.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[y.jsx(zE,{className:"w-4 h-4"}),"Dependencies"]}),y.jsx("div",{className:"flex flex-wrap gap-2",children:H.depends_on.map(k=>y.jsx("span",{className:"px-2 py-1 bg-slate-800 border border-slate-700 rounded text-xs text-slate-300 font-mono",children:k},k))})]}),y.jsxs("div",{children:[y.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[y.jsx(pE,{className:"w-4 h-4"}),"Arguments"]}),y.jsx("div",{className:"bg-slate-950 rounded-lg p-4 font-mono text-xs border border-slate-800 overflow-x-auto",children:y.jsx("pre",{className:"text-slate-300",children:JSON.stringify(ie,null,2)})})]}),y.jsxs("div",{children:[y.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[y.jsx(a2,{className:"w-4 h-4"}),"Result"]}),L!==void 0?y.jsx("div",{className:"bg-slate-950 rounded-lg p-4 font-mono text-xs border border-slate-800 overflow-x-auto",children:y.jsx("pre",{className:"text-emerald-400",children:JSON.stringify(L,null,2)})}):y.jsx("div",{className:"bg-slate-950/50 rounded-lg p-4 font-mono text-xs border border-slate-800/50 text-slate-600 italic",children:q?y.jsx("span",{className:"text-red-400",children:"Step Failed"}):"No result (Pending or Failed)"})]})]})]}):y.jsxs("div",{className:"h-full flex flex-col bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden",children:[y.jsx("div",{className:"px-6 py-4 border-b border-slate-800 bg-slate-900/80",children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"p-2 bg-slate-800 rounded-lg",children:y.jsx(qE,{className:"w-5 h-5 text-slate-400"})}),y.jsxs("div",{children:[y.jsx("h2",{className:"font-bold text-white text-lg",children:"Execution Overview"}),y.jsx("div",{className:"text-xs text-slate-500 font-mono mt-0.5",children:"Global State"})]})]})}),y.jsx("div",{className:"flex-1 overflow-y-auto p-6 space-y-8",children:T.length>0?y.jsxs("div",{children:[y.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[y.jsx(Mp,{className:"w-4 h-4"}),"Compensation History"]}),y.jsx("div",{className:"space-y-6",children:T.map((k,D)=>y.jsxs("div",{className:"space-y-3",children:[y.jsxs("div",{className:"flex items-center gap-2 px-2",children:[y.jsx("div",{className:"h-px flex-1 bg-slate-800"}),y.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-slate-500 bg-slate-900/50 px-2 py-0.5 rounded border border-slate-800",children:k.reactorName}),y.jsx("div",{className:"h-px flex-1 bg-slate-800"})]}),y.jsx("div",{className:"space-y-2",children:k.items.map((G,te)=>y.jsxs("div",{className:`rounded-lg p-3 border flex items-start gap-3 ${G.status==="executed"?"bg-slate-950/50 border-slate-800":"bg-slate-900/30 border-slate-800/50 border-dashed opacity-75"}`,children:[y.jsx("div",{className:`p-1.5 rounded mt-0.5 ${G.status==="executed"?"bg-emerald-500/10 text-emerald-400":"bg-slate-700/50 text-slate-500"}`,children:G.status==="executed"?y.jsx(jE,{className:"w-3 h-3"}):y.jsx(Cp,{className:"w-3 h-3"})}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("span",{className:`font-medium text-sm block ${G.status==="executed"?"text-slate-300":"text-slate-500"}`,children:G.step_name}),y.jsxs("span",{className:"text-[10px] uppercase font-mono tracking-wider px-1.5 py-0.5 rounded bg-slate-800 text-slate-500 inline-flex items-center gap-1.5 mt-1",children:[G.type&&y.jsx("span",{className:`font-bold ${G.type==="compensate"?"text-amber-400":"text-indigo-400"}`,children:G.type}),y.jsx("span",{className:"opacity-50",children:"|"}),G.status]}),G.status==="executed"&&G.result&&y.jsx("div",{className:"mt-2 bg-black/30 rounded border border-white/5 p-2 font-mono text-xs text-slate-400 overflow-x-auto",children:JSON.stringify(G.result,null,2)})]})]},te))})]},D))})]}):y.jsxs("div",{className:"h-40 flex flex-col items-center justify-center text-slate-500 border border-slate-800/50 border-dashed rounded-xl bg-slate-900/30",children:[y.jsx(Mp,{className:"w-6 h-6 mb-2 opacity-50"}),y.jsx("p",{className:"text-center font-medium text-sm",children:"Undo History Empty"}),y.jsx("p",{className:"text-center text-xs mt-1 text-slate-600",children:"No compensations executed or pending."})]})})]})}function Oh(t){return t==null||t<0?"—":t===0?"expiring":t>=3600?`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`:t>=60?`${Math.floor(t/60)}m ${t%60}s`:`${t}s`}function Jc({keyValue:t,keyError:l}){return l?y.jsxs("span",{className:"text-xs text-amber-400/80 flex items-center gap-1",children:[y.jsx(Wa,{className:"w-3 h-3 shrink-0"}),l]}):y.jsx("span",{className:"font-mono text-xs text-slate-300 truncate",title:t??void 0,children:t??"—"})}function FT({lock:t}){const{state:l}=t,r=l?.held?l.owned_by_this_context?"Held (this run)":"Held (other)":"Free",o=l?.held?l.owned_by_this_context?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-slate-800 text-slate-400 border-slate-700";return y.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/60 p-3 space-y-2 min-w-0",children:[y.jsxs("div",{className:"flex items-center justify-between gap-2",children:[y.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y.jsx(ZE,{className:"w-4 h-4 text-indigo-400 shrink-0"}),y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Lock"})]}),y.jsx("span",{className:di("text-[10px] font-medium px-2 py-0.5 rounded-full border shrink-0",o),children:r})]}),y.jsx(Jc,{keyValue:t.key,keyError:t.key_error}),y.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-slate-500",children:[y.jsxs("span",{children:["TTL config: ",t.configured.ttl,"s"]}),t.configured.auto_extend&&y.jsx("span",{children:"Auto-extend"}),l?.held&&l.reentrant_count!==void 0&&l.reentrant_count>1&&y.jsxs("span",{children:["Reentrant: ",l.reentrant_count]}),l?.held&&l.ttl!==void 0&&l.ttl>=0&&y.jsxs("span",{children:["Expires: ",Oh(l.ttl)]}),l?.held&&l.owner&&!l.owned_by_this_context&&y.jsxs("span",{className:"font-mono truncate max-w-full",title:l.owner,children:["Owner: ",l.owner.substring(0,8),"…"]})]})]})}function WT({semaphore:t}){const{state:l,configured:r}=t,o=l?.held??0,s=l?.limit||r.limit||1,u=s>0?Math.min(100,o/s*100):0;return y.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/60 p-3 space-y-2 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(VE,{className:"w-4 h-4 text-violet-400 shrink-0"}),y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Semaphore"})]}),y.jsx(Jc,{keyValue:t.key,keyError:t.key_error}),l&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[y.jsxs("span",{children:[o," / ",s," held"]}),y.jsxs("span",{children:[l.available," available"]})]}),y.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:y.jsx("div",{className:"h-full bg-violet-500/70 rounded-full transition-all",style:{width:`${u}%`}})})]})]})}function PT({rateLimit:t}){return y.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/60 p-3 space-y-2 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(i2,{className:"w-4 h-4 text-cyan-400 shrink-0"}),y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Rate Limit"})]}),y.jsx(Jc,{keyValue:t.key,keyError:t.key_error}),t.state&&t.state.length>0&&y.jsx("div",{className:"space-y-1.5",children:t.state.map(l=>{const r=l.count>=l.limit;return y.jsxs("div",{className:"flex items-center justify-between text-xs gap-2",children:[y.jsx("span",{className:"text-slate-500 capitalize",children:l.name}),y.jsxs("span",{className:di("font-mono",r?"text-amber-400":"text-slate-300"),children:[l.count,"/",l.limit]}),y.jsx("span",{className:"text-slate-600 text-[10px]",children:Oh(l.ttl)})]},l.name)})})]})}function e5({period:t}){const l=t.state?.marked??!1;return y.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/60 p-3 space-y-2 min-w-0",children:[y.jsxs("div",{className:"flex items-center justify-between gap-2",children:[y.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y.jsx(wE,{className:"w-4 h-4 text-orange-400 shrink-0"}),y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Period"})]}),y.jsx("span",{className:di("text-[10px] font-medium px-2 py-0.5 rounded-full border shrink-0",l?"bg-orange-500/10 text-orange-400 border-orange-500/20":"bg-slate-800 text-slate-400 border-slate-700"),children:l?"Bucket marked":"Bucket open"})]}),y.jsx(Jc,{keyValue:t.key,keyError:t.key_error}),t.bucket_key&&y.jsx("p",{className:"text-[10px] font-mono text-slate-600 truncate",title:t.bucket_key,children:t.bucket_key}),y.jsxs("div",{className:"text-[11px] text-slate-500",children:[y.jsxs("span",{children:["Every: ",t.configured.every]}),l&&t.state?.ttl!==void 0&&t.state.ttl>=0&&y.jsxs("span",{className:"ml-3",children:["TTL: ",Oh(t.state.ttl)]})]})]})}function t5({coordination:t}){return!t||Object.keys(t).length===0?null:y.jsx("div",{className:"px-2 shrink-0",children:y.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/40 p-4",children:[y.jsx("h2",{className:"text-xs font-semibold uppercase tracking-widest text-slate-500 mb-3",children:"Coordination"}),y.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[t.lock&&y.jsx(FT,{lock:t.lock}),t.semaphore&&y.jsx(WT,{semaphore:t.semaphore}),t.rate_limit&&y.jsx(PT,{rateLimit:t.rate_limit}),t.period&&y.jsx(e5,{period:t.period})]})]})})}const n5=t=>fetch(t).then(l=>l.json());function a5(){const{id:t}=rx(),l=ix(),{data:r,error:o,isLoading:s}=Lc(t?Qa(`/api/reactors/${t}`):null,n5,{refreshInterval:1e3}),[u,f]=O.useState(null),[h,g]=O.useState(!1),[m,x]=O.useState(null),p=async w=>{if(t)try{await fetch(Qa(`/api/reactors/${t}/${w}`),{method:"POST"}),Ud(Qa(`/api/reactors/${t}`))}catch(S){console.error(`Failed to ${w}`,S)}},b=async()=>{if(!(!t||r?.status!=="failed"||h)){g(!0),x(null);try{const w=await fetch(Qa(`/api/reactors/${t}/retry`),{method:"POST"}),S=await w.json().catch(()=>({}));if(!w.ok||!S.id){x(S.error||"Failed to retry execution");return}l(`/reactors/${S.id}`)}catch(w){x("Failed to retry execution"),console.error("Failed to retry",w)}finally{g(!1)}}};return o?y.jsx("div",{className:"p-4 text-red-500 bg-red-500/10 border border-red-500/20 rounded-lg",children:"Failed to load reactor"}):s?y.jsx("div",{className:"p-4 text-slate-500 animate-pulse",children:"Loading reactor details..."}):y.jsxs("div",{className:"space-y-6 h-[calc(100vh-8rem)] flex flex-col relative",children:[y.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 border-b border-slate-800 pb-6 shrink-0",children:[y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx(Gn,{to:r.class?Yd(r.class):"/",className:"p-2 hover:bg-white/5 rounded-full text-slate-400 hover:text-white transition-colors",children:y.jsx(ch,{className:"w-5 h-5"})}),y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:r.class}),y.jsxs("span",{className:"px-2 py-0.5 rounded text-xs font-mono bg-slate-800 text-slate-400 border border-slate-700",children:["#",t]})]}),y.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[y.jsxs("span",{className:"text-sm text-slate-400",children:["Status: ",y.jsx("span",{className:`font-medium ${r.status==="failed"?"text-red-400":r.status==="completed"?"text-emerald-400":r.status==="paused"?"text-amber-400":r.status==="skipped"?"text-sky-400":r.status==="pending"?"text-slate-400":"text-slate-200"}`,children:r.status})]}),r.retry_count>0&&y.jsxs("span",{className:"text-sm text-slate-400 ml-3 pl-3 border-l border-slate-700",children:["Retries: ",y.jsx("span",{className:"font-medium text-amber-400",children:r.retry_count})]})]})]})]}),y.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[m&&y.jsx("span",{className:"text-xs text-red-400 max-w-xs truncate",title:m,children:m}),y.jsxs("button",{onClick:b,className:"flex items-center gap-2 px-4 py-2 bg-indigo-600 hover:bg-indigo-500 text-white rounded-lg shadow-lg shadow-indigo-500/20 text-sm font-medium transition-all hover:-translate-y-0.5 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",disabled:r.status!=="failed"||h,children:[y.jsx(yx,{className:"w-4 h-4"}),"Retry Execution"]}),y.jsxs("button",{onClick:()=>p("cancel"),className:"flex items-center gap-2 px-4 py-2 bg-slate-900 border border-slate-700 text-slate-300 rounded-lg hover:bg-slate-800 hover:text-white text-sm font-medium transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",disabled:r.status!=="running"&&r.status!=="paused",children:[y.jsx(KE,{className:"w-4 h-4"}),"Cancel"]})]})]}),y.jsx(t5,{coordination:r.coordination}),r.status==="failed"&&r.error&&y.jsx("div",{className:"px-2",children:y.jsxs("div",{className:"px-4 py-3 bg-red-500/10 border border-red-500/20 rounded-lg flex items-start gap-3",children:[y.jsx(Wa,{className:"w-5 h-5 text-red-500 shrink-0 mt-0.5"}),y.jsxs("div",{className:"space-y-1 overflow-hidden",children:[y.jsxs("h3",{className:"text-sm font-medium text-red-500",children:[r.error.snooze_attempts!=null?`Coordination contention — ${r.error.snooze_attempts} snooze attempts exhausted`:"Workflow Failed",r.error.step_name&&y.jsxs("span",{className:"text-red-400",children:[" at step ",y.jsx("span",{className:"font-mono bg-red-500/10 px-1 rounded",children:r.error.step_name})]})]}),y.jsx("p",{className:"text-xs text-red-400/80 font-mono truncate",children:r.error.message})]})]})}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 flex-1 min-h-0",children:[y.jsx("div",{className:"lg:col-span-2 h-full",children:y.jsx(qT,{structure:r.structure,steps:r.steps,selectedStep:u,onStepSelect:f,reactorStatus:r.status,error:r.error,results:r.intermediate_results,composedContexts:r.composed_contexts})}),y.jsx("div",{className:"h-full",children:y.jsx(JT,{stepName:u,structure:r.structure,results:r.intermediate_results,inputs:r.inputs,trace:r.steps,error:r.error,undoStack:r.undo_stack,stepAttempts:r.step_attempts,composedContexts:r.composed_contexts,onClose:()=>f(null),reactorId:t,reactorStatus:r.status,onAction:()=>Ud(Qa(`/api/reactors/${t}`))})})]})]})}const l5=window.RUBY_REACTOR_BASE||"/";function i5(){return y.jsx(PS,{basename:l5,children:y.jsxs("div",{className:"min-h-screen bg-slate-950 text-slate-50 font-sans selection:bg-indigo-500/30",children:[y.jsx("header",{className:"border-b border-slate-800/60 bg-slate-900/50 backdrop-blur-xl sticky top-0 z-50",children:y.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between",children:[y.jsxs(Gn,{to:"/",className:"flex items-center gap-3 group",children:[y.jsx("div",{className:"p-2 bg-indigo-500/10 rounded-lg group-hover:bg-indigo-500/20 transition-colors",children:y.jsx(o2,{className:"w-5 h-5 text-indigo-400 group-hover:text-indigo-300 transition-colors"})}),y.jsxs("span",{className:"font-bold text-lg tracking-tight text-white",children:["Ruby",y.jsx("span",{className:"text-indigo-400",children:"Reactor"})]})]}),y.jsxs("nav",{className:"flex items-center gap-1",children:[y.jsx(Ky,{to:"/",icon:y.jsx(GE,{className:"w-4 h-4"}),children:"Dashboard"}),y.jsx(Ky,{to:"/live",icon:y.jsx(FE,{className:"w-4 h-4"}),children:"Live"})]})]})}),y.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:y.jsxs(RS,{children:[y.jsx(ho,{path:"/",element:y.jsx(A_,{})}),y.jsx(ho,{path:"/live",element:y.jsx(R_,{})}),y.jsx(ho,{path:"/reactors/by-class/:className",element:y.jsx(O_,{})}),y.jsx(ho,{path:"/reactors/:id",element:y.jsx(a5,{})})]})})]})})}function Ky({to:t,icon:l,children:r}){const o=Ul(),s=o.pathname===t||t!=="/"&&o.pathname.startsWith(t);return y.jsxs(Gn,{to:t,className:`flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-all ${s?"text-white bg-white/10":"text-slate-400 hover:text-white hover:bg-white/5"}`,children:[l,r]})}class r5 extends O.Component{state={hasError:!1,error:null,errorInfo:null};static getDerivedStateFromError(l){return{hasError:!0,error:l,errorInfo:null}}componentDidCatch(l,r){console.error("Uncaught error:",l,r),this.setState({error:l,errorInfo:r})}render(){return this.state.hasError?y.jsxs("div",{className:"p-8 bg-slate-950 min-h-screen text-red-500",children:[y.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Something went wrong."}),y.jsx("pre",{className:"bg-slate-900 p-4 rounded overflow-auto text-sm mb-4",children:this.state.error&&this.state.error.toString()}),y.jsx("pre",{className:"bg-slate-900 p-4 rounded overflow-auto text-xs text-slate-500",children:this.state.errorInfo&&this.state.errorInfo.componentStack})]}):this.props.children}}Bw.createRoot(document.getElementById("root")).render(y.jsx(O.StrictMode,{children:y.jsx(r5,{children:y.jsx(i5,{})})}));
|