Files
pr-preview/frontend/dist/assets/index-BhM-WgUO.js
T
space 6434be8bed feat: add orphan EC2 cleanup on startup, fix SetupWizard routing, fix SSH key gen
- On startup, scan for EC2 instances with pp:managed=true and terminate any orphans
- SetupWizard now renders as full-page (no Layout wrapper)
- Fixed SSH RSA key generation (generateKeyPairSync with spki format)
- Removed unused import in orphanCleanup.ts
- Frontend rebuild with App.tsx routing fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-25 00:20:36 +02:00

906 lines
442 KiB
JavaScript

(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function l(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(u){if(u.ep)return;u.ep=!0;const d=l(u);fetch(u.href,d)}})();function mg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var zc={exports:{}},Ls={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Cy;function J1(){if(Cy)return Ls;Cy=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function l(r,u,d){var f=null;if(d!==void 0&&(f=""+d),u.key!==void 0&&(f=""+u.key),"key"in u){d={};for(var h in u)h!=="key"&&(d[h]=u[h])}else d=u;return u=d.ref,{$$typeof:n,type:r,key:f,ref:u!==void 0?u:null,props:d}}return Ls.Fragment=i,Ls.jsx=l,Ls.jsxs=l,Ls}var wy;function W1(){return wy||(wy=1,zc.exports=J1()),zc.exports}var g=W1(),Lc={exports:{}},ft={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ry;function I1(){if(Ry)return ft;Ry=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function E(N){return N===null||typeof N!="object"?null:(N=S&&N[S]||N["@@iterator"],typeof N=="function"?N:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function R(N,K,et){this.props=N,this.context=K,this.refs=_,this.updater=et||A}R.prototype.isReactComponent={},R.prototype.setState=function(N,K){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,K,"setState")},R.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function O(){}O.prototype=R.prototype;function D(N,K,et){this.props=N,this.context=K,this.refs=_,this.updater=et||A}var M=D.prototype=new O;M.constructor=D,w(M,R.prototype),M.isPureReactComponent=!0;var H=Array.isArray;function $(){}var V={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function Z(N,K,et){var it=et.ref;return{$$typeof:n,type:N,key:K,ref:it!==void 0?it:null,props:et}}function F(N,K){return Z(N.type,K,N.props)}function I(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ut(N){var K={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(et){return K[et]})}var Tt=/\/+/g;function pt(N,K){return typeof N=="object"&&N!==null&&N.key!=null?ut(""+N.key):K.toString(36)}function Q(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then($,$):(N.status="pending",N.then(function(K){N.status==="pending"&&(N.status="fulfilled",N.value=K)},function(K){N.status==="pending"&&(N.status="rejected",N.reason=K)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function L(N,K,et,it,dt){var yt=typeof N;(yt==="undefined"||yt==="boolean")&&(N=null);var wt=!1;if(N===null)wt=!0;else switch(yt){case"bigint":case"string":case"number":wt=!0;break;case"object":switch(N.$$typeof){case n:case i:wt=!0;break;case v:return wt=N._init,L(wt(N._payload),K,et,it,dt)}}if(wt)return dt=dt(N),wt=it===""?"."+pt(N,0):it,H(dt)?(et="",wt!=null&&(et=wt.replace(Tt,"$&/")+"/"),L(dt,K,et,"",function(Yi){return Yi})):dt!=null&&(I(dt)&&(dt=F(dt,et+(dt.key==null||N&&N.key===dt.key?"":(""+dt.key).replace(Tt,"$&/")+"/")+wt)),K.push(dt)),1;wt=0;var fe=it===""?".":it+":";if(H(N))for(var Xt=0;Xt<N.length;Xt++)it=N[Xt],yt=fe+pt(it,Xt),wt+=L(it,K,et,yt,dt);else if(Xt=E(N),typeof Xt=="function")for(N=Xt.call(N),Xt=0;!(it=N.next()).done;)it=it.value,yt=fe+pt(it,Xt++),wt+=L(it,K,et,yt,dt);else if(yt==="object"){if(typeof N.then=="function")return L(Q(N),K,et,it,dt);throw K=String(N),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return wt}function J(N,K,et){if(N==null)return N;var it=[],dt=0;return L(N,it,"","",function(yt){return K.call(et,yt,dt++)}),it}function tt(N){if(N._status===-1){var K=N._result;K=K(),K.then(function(et){(N._status===0||N._status===-1)&&(N._status=1,N._result=et)},function(et){(N._status===0||N._status===-1)&&(N._status=2,N._result=et)}),N._status===-1&&(N._status=0,N._result=K)}if(N._status===1)return N._result.default;throw N._result}var W=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ct={map:J,forEach:function(N,K,et){J(N,function(){K.apply(this,arguments)},et)},count:function(N){var K=0;return J(N,function(){K++}),K},toArray:function(N){return J(N,function(K){return K})||[]},only:function(N){if(!I(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return ft.Activity=x,ft.Children=ct,ft.Component=R,ft.Fragment=l,ft.Profiler=u,ft.PureComponent=D,ft.StrictMode=r,ft.Suspense=m,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ft.__COMPILER_RUNTIME={__proto__:null,c:function(N){return V.H.useMemoCache(N)}},ft.cache=function(N){return function(){return N.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(N,K,et){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var it=w({},N.props),dt=N.key;if(K!=null)for(yt in K.key!==void 0&&(dt=""+K.key),K)!q.call(K,yt)||yt==="key"||yt==="__self"||yt==="__source"||yt==="ref"&&K.ref===void 0||(it[yt]=K[yt]);var yt=arguments.length-2;if(yt===1)it.children=et;else if(1<yt){for(var wt=Array(yt),fe=0;fe<yt;fe++)wt[fe]=arguments[fe+2];it.children=wt}return Z(N.type,dt,it)},ft.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:d,_context:N},N},ft.createElement=function(N,K,et){var it,dt={},yt=null;if(K!=null)for(it in K.key!==void 0&&(yt=""+K.key),K)q.call(K,it)&&it!=="key"&&it!=="__self"&&it!=="__source"&&(dt[it]=K[it]);var wt=arguments.length-2;if(wt===1)dt.children=et;else if(1<wt){for(var fe=Array(wt),Xt=0;Xt<wt;Xt++)fe[Xt]=arguments[Xt+2];dt.children=fe}if(N&&N.defaultProps)for(it in wt=N.defaultProps,wt)dt[it]===void 0&&(dt[it]=wt[it]);return Z(N,yt,dt)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(N){return{$$typeof:h,render:N}},ft.isValidElement=I,ft.lazy=function(N){return{$$typeof:v,_payload:{_status:-1,_result:N},_init:tt}},ft.memo=function(N,K){return{$$typeof:p,type:N,compare:K===void 0?null:K}},ft.startTransition=function(N){var K=V.T,et={};V.T=et;try{var it=N(),dt=V.S;dt!==null&&dt(et,it),typeof it=="object"&&it!==null&&typeof it.then=="function"&&it.then($,W)}catch(yt){W(yt)}finally{K!==null&&et.types!==null&&(K.types=et.types),V.T=K}},ft.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ft.use=function(N){return V.H.use(N)},ft.useActionState=function(N,K,et){return V.H.useActionState(N,K,et)},ft.useCallback=function(N,K){return V.H.useCallback(N,K)},ft.useContext=function(N){return V.H.useContext(N)},ft.useDebugValue=function(){},ft.useDeferredValue=function(N,K){return V.H.useDeferredValue(N,K)},ft.useEffect=function(N,K){return V.H.useEffect(N,K)},ft.useEffectEvent=function(N){return V.H.useEffectEvent(N)},ft.useId=function(){return V.H.useId()},ft.useImperativeHandle=function(N,K,et){return V.H.useImperativeHandle(N,K,et)},ft.useInsertionEffect=function(N,K){return V.H.useInsertionEffect(N,K)},ft.useLayoutEffect=function(N,K){return V.H.useLayoutEffect(N,K)},ft.useMemo=function(N,K){return V.H.useMemo(N,K)},ft.useOptimistic=function(N,K){return V.H.useOptimistic(N,K)},ft.useReducer=function(N,K,et){return V.H.useReducer(N,K,et)},ft.useRef=function(N){return V.H.useRef(N)},ft.useState=function(N){return V.H.useState(N)},ft.useSyncExternalStore=function(N,K,et){return V.H.useSyncExternalStore(N,K,et)},ft.useTransition=function(){return V.H.useTransition()},ft.version="19.2.8",ft}var _y;function Vf(){return _y||(_y=1,Lc.exports=I1()),Lc.exports}var T=Vf();const _t=mg(T);var kc={exports:{}},ks={},Uc={exports:{}},Vc={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ny;function tS(){return Ny||(Ny=1,(function(n){function i(L,J){var tt=L.length;L.push(J);t:for(;0<tt;){var W=tt-1>>>1,ct=L[W];if(0<u(ct,J))L[W]=J,L[tt]=ct,tt=W;else break t}}function l(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var J=L[0],tt=L.pop();if(tt!==J){L[0]=tt;t:for(var W=0,ct=L.length,N=ct>>>1;W<N;){var K=2*(W+1)-1,et=L[K],it=K+1,dt=L[it];if(0>u(et,tt))it<ct&&0>u(dt,et)?(L[W]=dt,L[it]=tt,W=it):(L[W]=et,L[K]=tt,W=K);else if(it<ct&&0>u(dt,tt))L[W]=dt,L[it]=tt,W=it;else break t}}return J}function u(L,J){var tt=L.sortIndex-J.sortIndex;return tt!==0?tt:L.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var m=[],p=[],v=1,x=null,S=3,E=!1,A=!1,w=!1,_=!1,R=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function M(L){for(var J=l(p);J!==null;){if(J.callback===null)r(p);else if(J.startTime<=L)r(p),J.sortIndex=J.expirationTime,i(m,J);else break;J=l(p)}}function H(L){if(w=!1,M(L),!A)if(l(m)!==null)A=!0,$||($=!0,ut());else{var J=l(p);J!==null&&Q(H,J.startTime-L)}}var $=!1,V=-1,q=5,Z=-1;function F(){return _?!0:!(n.unstable_now()-Z<q)}function I(){if(_=!1,$){var L=n.unstable_now();Z=L;var J=!0;try{t:{A=!1,w&&(w=!1,O(V),V=-1),E=!0;var tt=S;try{e:{for(M(L),x=l(m);x!==null&&!(x.expirationTime>L&&F());){var W=x.callback;if(typeof W=="function"){x.callback=null,S=x.priorityLevel;var ct=W(x.expirationTime<=L);if(L=n.unstable_now(),typeof ct=="function"){x.callback=ct,M(L),J=!0;break e}x===l(m)&&r(m),M(L)}else r(m);x=l(m)}if(x!==null)J=!0;else{var N=l(p);N!==null&&Q(H,N.startTime-L),J=!1}}break t}finally{x=null,S=tt,E=!1}J=void 0}}finally{J?ut():$=!1}}}var ut;if(typeof D=="function")ut=function(){D(I)};else if(typeof MessageChannel<"u"){var Tt=new MessageChannel,pt=Tt.port2;Tt.port1.onmessage=I,ut=function(){pt.postMessage(null)}}else ut=function(){R(I,0)};function Q(L,J){V=R(function(){L(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(L){switch(S){case 1:case 2:case 3:var J=3;break;default:J=S}var tt=S;S=J;try{return L()}finally{S=tt}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(L,J){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var tt=S;S=L;try{return J()}finally{S=tt}},n.unstable_scheduleCallback=function(L,J,tt){var W=n.unstable_now();switch(typeof tt=="object"&&tt!==null?(tt=tt.delay,tt=typeof tt=="number"&&0<tt?W+tt:W):tt=W,L){case 1:var ct=-1;break;case 2:ct=250;break;case 5:ct=1073741823;break;case 4:ct=1e4;break;default:ct=5e3}return ct=tt+ct,L={id:v++,callback:J,priorityLevel:L,startTime:tt,expirationTime:ct,sortIndex:-1},tt>W?(L.sortIndex=tt,i(p,L),l(m)===null&&L===l(p)&&(w?(O(V),V=-1):w=!0,Q(H,tt-W))):(L.sortIndex=ct,i(m,L),A||E||(A=!0,$||($=!0,ut()))),L},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(L){var J=S;return function(){var tt=S;S=J;try{return L.apply(this,arguments)}finally{S=tt}}}})(Vc)),Vc}var jy;function eS(){return jy||(jy=1,Uc.exports=tS()),Uc.exports}var Bc={exports:{}},ce={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Dy;function nS(){if(Dy)return ce;Dy=1;var n=Vf();function i(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={d:{f:l,r:function(){throw Error(i(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},u=Symbol.for("react.portal");function d(m,p,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:m,containerInfo:p,implementation:v}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return ce.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ce.createPortal=function(m,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return d(m,p,null,v)},ce.flushSync=function(m){var p=f.T,v=r.p;try{if(f.T=null,r.p=2,m)return m()}finally{f.T=p,r.p=v,r.d.f()}},ce.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(m,p))},ce.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},ce.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var v=p.as,x=h(v,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?r.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:E}):v==="script"&&r.d.X(m,{crossOrigin:x,integrity:S,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},ce.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=h(p.as,p.crossOrigin);r.d.M(m,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(m)},ce.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,x=h(v,p.crossOrigin);r.d.L(m,v,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},ce.preloadModule=function(m,p){if(typeof m=="string")if(p){var v=h(p.as,p.crossOrigin);r.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(m)},ce.requestFormReset=function(m){r.d.r(m)},ce.unstable_batchedUpdates=function(m,p){return m(p)},ce.useFormState=function(m,p,v){return f.H.useFormState(m,p,v)},ce.useFormStatus=function(){return f.H.useHostTransitionStatus()},ce.version="19.2.8",ce}var My;function aS(){if(My)return Bc.exports;My=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Bc.exports=nS(),Bc.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Oy;function iS(){if(Oy)return ks;Oy=1;var n=eS(),i=Vf(),l=aS();function r(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)e+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function d(t){var e=t,a=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(a=e.return),t=e.return;while(t)}return e.tag===3?a:null}function f(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function h(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function m(t){if(d(t)!==t)throw Error(r(188))}function p(t){var e=t.alternate;if(!e){if(e=d(t),e===null)throw Error(r(188));return e!==t?null:t}for(var a=t,s=e;;){var o=a.return;if(o===null)break;var c=o.alternate;if(c===null){if(s=o.return,s!==null){a=s;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===a)return m(o),t;if(c===s)return m(o),e;c=c.sibling}throw Error(r(188))}if(a.return!==s.return)a=o,s=c;else{for(var y=!1,b=o.child;b;){if(b===a){y=!0,a=o,s=c;break}if(b===s){y=!0,s=o,a=c;break}b=b.sibling}if(!y){for(b=c.child;b;){if(b===a){y=!0,a=c,s=o;break}if(b===s){y=!0,s=c,a=o;break}b=b.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==s)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?t:e}function v(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=v(t),e!==null)return e;t=t.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),D=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function ut(t){return t===null||typeof t!="object"?null:(t=I&&t[I]||t["@@iterator"],typeof t=="function"?t:null)}var Tt=Symbol.for("react.client.reference");function pt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Tt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case w:return"Fragment";case R:return"Profiler";case _:return"StrictMode";case H:return"Suspense";case $:return"SuspenseList";case Z:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case A:return"Portal";case D:return t.displayName||"Context";case O:return(t._context.displayName||"Context")+".Consumer";case M:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return e=t.displayName||null,e!==null?e:pt(t.type)||"Memo";case q:e=t._payload,t=t._init;try{return pt(t(e))}catch{}}return null}var Q=Array.isArray,L=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tt={pending:!1,data:null,method:null,action:null},W=[],ct=-1;function N(t){return{current:t}}function K(t){0>ct||(t.current=W[ct],W[ct]=null,ct--)}function et(t,e){ct++,W[ct]=t.current,t.current=e}var it=N(null),dt=N(null),yt=N(null),wt=N(null);function fe(t,e){switch(et(yt,e),et(dt,t),et(it,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Zp(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Zp(e),t=$p(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}K(it),et(it,t)}function Xt(){K(it),K(dt),K(yt)}function Yi(t){t.memoizedState!==null&&et(wt,t);var e=it.current,a=$p(e,t.type);e!==a&&(et(dt,t),et(it,a))}function rl(t){dt.current===t&&(K(it),K(dt)),wt.current===t&&(K(wt),Ds._currentValue=tt)}var yo,Ad;function ga(t){if(yo===void 0)try{throw Error()}catch(a){var e=a.stack.trim().match(/\n( *(at )?)/);yo=e&&e[1]||"",Ad=-1<a.stack.indexOf(`
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+yo+t+Ad}var go=!1;function vo(t,e){if(!t||go)return"";go=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(e){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(G){var B=G}Reflect.construct(t,[],X)}else{try{X.call()}catch(G){B=G}t.call(X.prototype)}}else{try{throw Error()}catch(G){B=G}(X=t())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(G){if(G&&B&&typeof G.stack=="string")return[G.stack,B.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),y=c[0],b=c[1];if(y&&b){var C=y.split(`
`),U=b.split(`
`);for(o=s=0;s<C.length&&!C[s].includes("DetermineComponentFrameRoot");)s++;for(;o<U.length&&!U[o].includes("DetermineComponentFrameRoot");)o++;if(s===C.length||o===U.length)for(s=C.length-1,o=U.length-1;1<=s&&0<=o&&C[s]!==U[o];)o--;for(;1<=s&&0<=o;s--,o--)if(C[s]!==U[o]){if(s!==1||o!==1)do if(s--,o--,0>o||C[s]!==U[o]){var Y=`
`+C[s].replace(" at new "," at ");return t.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",t.displayName)),Y}while(1<=s&&0<=o);break}}}finally{go=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?ga(a):""}function _x(t,e){switch(t.tag){case 26:case 27:case 5:return ga(t.type);case 16:return ga("Lazy");case 13:return t.child!==e&&e!==null?ga("Suspense Fallback"):ga("Suspense");case 19:return ga("SuspenseList");case 0:case 15:return vo(t.type,!1);case 11:return vo(t.type.render,!1);case 1:return vo(t.type,!0);case 31:return ga("Activity");default:return""}}function Cd(t){try{var e="",a=null;do e+=_x(t,a),a=t,t=t.return;while(t);return e}catch(s){return`
Error generating stack: `+s.message+`
`+s.stack}}var xo=Object.prototype.hasOwnProperty,bo=n.unstable_scheduleCallback,So=n.unstable_cancelCallback,Nx=n.unstable_shouldYield,jx=n.unstable_requestPaint,Ee=n.unstable_now,Dx=n.unstable_getCurrentPriorityLevel,wd=n.unstable_ImmediatePriority,Rd=n.unstable_UserBlockingPriority,ol=n.unstable_NormalPriority,Mx=n.unstable_LowPriority,_d=n.unstable_IdlePriority,Ox=n.log,zx=n.unstable_setDisableYieldValue,qi=null,Ae=null;function Vn(t){if(typeof Ox=="function"&&zx(t),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(qi,t)}catch{}}var Ce=Math.clz32?Math.clz32:Ux,Lx=Math.log,kx=Math.LN2;function Ux(t){return t>>>=0,t===0?32:31-(Lx(t)/kx|0)|0}var ul=256,cl=262144,fl=4194304;function va(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function dl(t,e,a){var s=t.pendingLanes;if(s===0)return 0;var o=0,c=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var b=s&134217727;return b!==0?(s=b&~c,s!==0?o=va(s):(y&=b,y!==0?o=va(y):a||(a=b&~t,a!==0&&(o=va(a))))):(b=s&~c,b!==0?o=va(b):y!==0?o=va(y):a||(a=s&~t,a!==0&&(o=va(a)))),o===0?0:e!==0&&e!==o&&(e&c)===0&&(c=o&-o,a=e&-e,c>=a||c===32&&(a&4194048)!==0)?e:o}function Pi(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Vx(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Nd(){var t=fl;return fl<<=1,(fl&62914560)===0&&(fl=4194304),t}function To(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function Xi(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Bx(t,e,a,s,o,c){var y=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var b=t.entanglements,C=t.expirationTimes,U=t.hiddenUpdates;for(a=y&~a;0<a;){var Y=31-Ce(a),X=1<<Y;b[Y]=0,C[Y]=-1;var B=U[Y];if(B!==null)for(U[Y]=null,Y=0;Y<B.length;Y++){var G=B[Y];G!==null&&(G.lane&=-536870913)}a&=~X}s!==0&&jd(t,s,0),c!==0&&o===0&&t.tag!==0&&(t.suspendedLanes|=c&~(y&~e))}function jd(t,e,a){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-Ce(e);t.entangledLanes|=e,t.entanglements[s]=t.entanglements[s]|1073741824|a&261930}function Dd(t,e){var a=t.entangledLanes|=e;for(t=t.entanglements;a;){var s=31-Ce(a),o=1<<s;o&e|t[s]&e&&(t[s]|=e),a&=~o}}function Md(t,e){var a=e&-e;return a=(a&42)!==0?1:Eo(a),(a&(t.suspendedLanes|e))!==0?0:a}function Eo(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ao(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Od(){var t=J.p;return t!==0?t:(t=window.event,t===void 0?32:vy(t.type))}function zd(t,e){var a=J.p;try{return J.p=t,e()}finally{J.p=a}}var Bn=Math.random().toString(36).slice(2),ae="__reactFiber$"+Bn,ye="__reactProps$"+Bn,Pa="__reactContainer$"+Bn,Co="__reactEvents$"+Bn,Hx="__reactListeners$"+Bn,Gx="__reactHandles$"+Bn,Ld="__reactResources$"+Bn,Ki="__reactMarker$"+Bn;function wo(t){delete t[ae],delete t[ye],delete t[Co],delete t[Hx],delete t[Gx]}function Xa(t){var e=t[ae];if(e)return e;for(var a=t.parentNode;a;){if(e=a[Pa]||a[ae]){if(a=e.alternate,e.child!==null||a!==null&&a.child!==null)for(t=ny(t);t!==null;){if(a=t[ae])return a;t=ny(t)}return e}t=a,a=t.parentNode}return null}function Ka(t){if(t=t[ae]||t[Pa]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Qi(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function Qa(t){var e=t[Ld];return e||(e=t[Ld]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function ee(t){t[Ki]=!0}var kd=new Set,Ud={};function xa(t,e){Za(t,e),Za(t+"Capture",e)}function Za(t,e){for(Ud[t]=e,t=0;t<e.length;t++)kd.add(e[t])}var Yx=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]*$"),Vd={},Bd={};function qx(t){return xo.call(Bd,t)?!0:xo.call(Vd,t)?!1:Yx.test(t)?Bd[t]=!0:(Vd[t]=!0,!1)}function hl(t,e,a){if(qx(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var s=e.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+a)}}function ml(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+a)}}function yn(t,e,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,""+s)}}function Le(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Hd(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Px(t,e,a){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,c=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(y){a=""+y,c.call(this,y)}}),Object.defineProperty(t,e,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ro(t){if(!t._valueTracker){var e=Hd(t)?"checked":"value";t._valueTracker=Px(t,e,""+t[e])}}function Gd(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),s="";return t&&(s=Hd(t)?t.checked?"true":"false":t.value),t=s,t!==a?(e.setValue(t),!0):!1}function pl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Xx=/[\n"\\]/g;function ke(t){return t.replace(Xx,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function _o(t,e,a,s,o,c,y,b){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),e!=null?y==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Le(e)):t.value!==""+Le(e)&&(t.value=""+Le(e)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),e!=null?No(t,y,Le(e)):a!=null?No(t,y,Le(a)):s!=null&&t.removeAttribute("value"),o==null&&c!=null&&(t.defaultChecked=!!c),o!=null&&(t.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.name=""+Le(b):t.removeAttribute("name")}function Yd(t,e,a,s,o,c,y,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){Ro(t);return}a=a!=null?""+Le(a):"",e=e!=null?""+Le(e):a,b||e===t.value||(t.value=e),t.defaultValue=e}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=b?t.checked:!!s,t.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),Ro(t)}function No(t,e,a){e==="number"&&pl(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function $a(t,e,a,s){if(t=t.options,e){e={};for(var o=0;o<a.length;o++)e["$"+a[o]]=!0;for(a=0;a<t.length;a++)o=e.hasOwnProperty("$"+t[a].value),t[a].selected!==o&&(t[a].selected=o),o&&s&&(t[a].defaultSelected=!0)}else{for(a=""+Le(a),e=null,o=0;o<t.length;o++){if(t[o].value===a){t[o].selected=!0,s&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}e!==null&&(e.selected=!0)}}function qd(t,e,a){if(e!=null&&(e=""+Le(e),e!==t.value&&(t.value=e),a==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=a!=null?""+Le(a):""}function Pd(t,e,a,s){if(e==null){if(s!=null){if(a!=null)throw Error(r(92));if(Q(s)){if(1<s.length)throw Error(r(93));s=s[0]}a=s}a==null&&(a=""),e=a}a=Le(e),t.defaultValue=a,s=t.textContent,s===a&&s!==""&&s!==null&&(t.value=s),Ro(t)}function Fa(t,e){if(e){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=e;return}}t.textContent=e}var Kx=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 Xd(t,e,a){var s=e.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":s?t.setProperty(e,a):typeof a!="number"||a===0||Kx.has(e)?e==="float"?t.cssFloat=a:t[e]=(""+a).trim():t[e]=a+"px"}function Kd(t,e,a){if(e!=null&&typeof e!="object")throw Error(r(62));if(t=t.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||e!=null&&e.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var o in e)s=e[o],e.hasOwnProperty(o)&&a[o]!==s&&Xd(t,o,s)}else for(var c in e)e.hasOwnProperty(c)&&Xd(t,c,e[c])}function jo(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Qx=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"]]),Zx=/^[\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 yl(t){return Zx.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function gn(){}var Do=null;function Mo(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ja=null,Wa=null;function Qd(t){var e=Ka(t);if(e&&(t=e.stateNode)){var a=t[ye]||null;t:switch(t=e.stateNode,e.type){case"input":if(_o(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),e=a.name,a.type==="radio"&&e!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ke(""+e)+'"][type="radio"]'),e=0;e<a.length;e++){var s=a[e];if(s!==t&&s.form===t.form){var o=s[ye]||null;if(!o)throw Error(r(90));_o(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(e=0;e<a.length;e++)s=a[e],s.form===t.form&&Gd(s)}break t;case"textarea":qd(t,a.value,a.defaultValue);break t;case"select":e=a.value,e!=null&&$a(t,!!a.multiple,e,!1)}}}var Oo=!1;function Zd(t,e,a){if(Oo)return t(e,a);Oo=!0;try{var s=t(e);return s}finally{if(Oo=!1,(Ja!==null||Wa!==null)&&(ar(),Ja&&(e=Ja,t=Wa,Wa=Ja=null,Qd(e),t)))for(e=0;e<t.length;e++)Qd(t[e])}}function Zi(t,e){var a=t.stateNode;if(a===null)return null;var s=a[ye]||null;if(s===null)return null;a=s[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break t;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(r(231,e,typeof a));return a}var vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zo=!1;if(vn)try{var $i={};Object.defineProperty($i,"passive",{get:function(){zo=!0}}),window.addEventListener("test",$i,$i),window.removeEventListener("test",$i,$i)}catch{zo=!1}var Hn=null,Lo=null,gl=null;function $d(){if(gl)return gl;var t,e=Lo,a=e.length,s,o="value"in Hn?Hn.value:Hn.textContent,c=o.length;for(t=0;t<a&&e[t]===o[t];t++);var y=a-t;for(s=1;s<=y&&e[a-s]===o[c-s];s++);return gl=o.slice(t,1<s?1-s:void 0)}function vl(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function xl(){return!0}function Fd(){return!1}function ge(t){function e(a,s,o,c,y){this._reactName=a,this._targetInst=o,this.type=s,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var b in t)t.hasOwnProperty(b)&&(a=t[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?xl:Fd,this.isPropagationStopped=Fd,this}return x(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=xl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=xl)},persist:function(){},isPersistent:xl}),e}var ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bl=ge(ba),Fi=x({},ba,{view:0,detail:0}),$x=ge(Fi),ko,Uo,Ji,Sl=x({},Fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bo,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ji&&(Ji&&t.type==="mousemove"?(ko=t.screenX-Ji.screenX,Uo=t.screenY-Ji.screenY):Uo=ko=0,Ji=t),ko)},movementY:function(t){return"movementY"in t?t.movementY:Uo}}),Jd=ge(Sl),Fx=x({},Sl,{dataTransfer:0}),Jx=ge(Fx),Wx=x({},Fi,{relatedTarget:0}),Vo=ge(Wx),Ix=x({},ba,{animationName:0,elapsedTime:0,pseudoElement:0}),tb=ge(Ix),eb=x({},ba,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),nb=ge(eb),ab=x({},ba,{data:0}),Wd=ge(ab),ib={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sb={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"},lb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rb(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=lb[t])?!!e[t]:!1}function Bo(){return rb}var ob=x({},Fi,{key:function(t){if(t.key){var e=ib[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=vl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?sb[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bo,charCode:function(t){return t.type==="keypress"?vl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?vl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ub=ge(ob),cb=x({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Id=ge(cb),fb=x({},Fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bo}),db=ge(fb),hb=x({},ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),mb=ge(hb),pb=x({},Sl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),yb=ge(pb),gb=x({},ba,{newState:0,oldState:0}),vb=ge(gb),xb=[9,13,27,32],Ho=vn&&"CompositionEvent"in window,Wi=null;vn&&"documentMode"in document&&(Wi=document.documentMode);var bb=vn&&"TextEvent"in window&&!Wi,th=vn&&(!Ho||Wi&&8<Wi&&11>=Wi),eh=" ",nh=!1;function ah(t,e){switch(t){case"keyup":return xb.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ih(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ia=!1;function Sb(t,e){switch(t){case"compositionend":return ih(e);case"keypress":return e.which!==32?null:(nh=!0,eh);case"textInput":return t=e.data,t===eh&&nh?null:t;default:return null}}function Tb(t,e){if(Ia)return t==="compositionend"||!Ho&&ah(t,e)?(t=$d(),gl=Lo=Hn=null,Ia=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return th&&e.locale!=="ko"?null:e.data;default:return null}}var Eb={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 sh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Eb[t.type]:e==="textarea"}function lh(t,e,a,s){Ja?Wa?Wa.push(s):Wa=[s]:Ja=s,e=cr(e,"onChange"),0<e.length&&(a=new bl("onChange","change",null,a,s),t.push({event:a,listeners:e}))}var Ii=null,ts=null;function Ab(t){Yp(t,0)}function Tl(t){var e=Qi(t);if(Gd(e))return t}function rh(t,e){if(t==="change")return e}var oh=!1;if(vn){var Go;if(vn){var Yo="oninput"in document;if(!Yo){var uh=document.createElement("div");uh.setAttribute("oninput","return;"),Yo=typeof uh.oninput=="function"}Go=Yo}else Go=!1;oh=Go&&(!document.documentMode||9<document.documentMode)}function ch(){Ii&&(Ii.detachEvent("onpropertychange",fh),ts=Ii=null)}function fh(t){if(t.propertyName==="value"&&Tl(ts)){var e=[];lh(e,ts,t,Mo(t)),Zd(Ab,e)}}function Cb(t,e,a){t==="focusin"?(ch(),Ii=e,ts=a,Ii.attachEvent("onpropertychange",fh)):t==="focusout"&&ch()}function wb(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Tl(ts)}function Rb(t,e){if(t==="click")return Tl(e)}function _b(t,e){if(t==="input"||t==="change")return Tl(e)}function Nb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var we=typeof Object.is=="function"?Object.is:Nb;function es(t,e){if(we(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var a=Object.keys(t),s=Object.keys(e);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var o=a[s];if(!xo.call(e,o)||!we(t[o],e[o]))return!1}return!0}function dh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function hh(t,e){var a=dh(t);t=0;for(var s;a;){if(a.nodeType===3){if(s=t+a.textContent.length,t<=e&&s>=e)return{node:a,offset:e-t};t=s}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=dh(a)}}function mh(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?mh(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ph(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=pl(t.document);e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=pl(t.document)}return e}function qo(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var jb=vn&&"documentMode"in document&&11>=document.documentMode,ti=null,Po=null,ns=null,Xo=!1;function yh(t,e,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Xo||ti==null||ti!==pl(s)||(s=ti,"selectionStart"in s&&qo(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ns&&es(ns,s)||(ns=s,s=cr(Po,"onSelect"),0<s.length&&(e=new bl("onSelect","select",null,e,a),t.push({event:e,listeners:s}),e.target=ti)))}function Sa(t,e){var a={};return a[t.toLowerCase()]=e.toLowerCase(),a["Webkit"+t]="webkit"+e,a["Moz"+t]="moz"+e,a}var ei={animationend:Sa("Animation","AnimationEnd"),animationiteration:Sa("Animation","AnimationIteration"),animationstart:Sa("Animation","AnimationStart"),transitionrun:Sa("Transition","TransitionRun"),transitionstart:Sa("Transition","TransitionStart"),transitioncancel:Sa("Transition","TransitionCancel"),transitionend:Sa("Transition","TransitionEnd")},Ko={},gh={};vn&&(gh=document.createElement("div").style,"AnimationEvent"in window||(delete ei.animationend.animation,delete ei.animationiteration.animation,delete ei.animationstart.animation),"TransitionEvent"in window||delete ei.transitionend.transition);function Ta(t){if(Ko[t])return Ko[t];if(!ei[t])return t;var e=ei[t],a;for(a in e)if(e.hasOwnProperty(a)&&a in gh)return Ko[t]=e[a];return t}var vh=Ta("animationend"),xh=Ta("animationiteration"),bh=Ta("animationstart"),Db=Ta("transitionrun"),Mb=Ta("transitionstart"),Ob=Ta("transitioncancel"),Sh=Ta("transitionend"),Th=new Map,Qo="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(" ");Qo.push("scrollEnd");function Qe(t,e){Th.set(t,e),xa(e,[t])}var El=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ue=[],ni=0,Zo=0;function Al(){for(var t=ni,e=Zo=ni=0;e<t;){var a=Ue[e];Ue[e++]=null;var s=Ue[e];Ue[e++]=null;var o=Ue[e];Ue[e++]=null;var c=Ue[e];if(Ue[e++]=null,s!==null&&o!==null){var y=s.pending;y===null?o.next=o:(o.next=y.next,y.next=o),s.pending=o}c!==0&&Eh(a,o,c)}}function Cl(t,e,a,s){Ue[ni++]=t,Ue[ni++]=e,Ue[ni++]=a,Ue[ni++]=s,Zo|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function $o(t,e,a,s){return Cl(t,e,a,s),wl(t)}function Ea(t,e){return Cl(t,null,null,e),wl(t)}function Eh(t,e,a){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a);for(var o=!1,c=t.return;c!==null;)c.childLanes|=a,s=c.alternate,s!==null&&(s.childLanes|=a),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(o=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,o&&e!==null&&(o=31-Ce(a),t=c.hiddenUpdates,s=t[o],s===null?t[o]=[e]:s.push(e),e.lane=a|536870912),c):null}function wl(t){if(50<As)throw As=0,ic=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var ai={};function zb(t,e,a,s){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Re(t,e,a,s){return new zb(t,e,a,s)}function Fo(t){return t=t.prototype,!(!t||!t.isReactComponent)}function xn(t,e){var a=t.alternate;return a===null?(a=Re(t.tag,e,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=e,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,e=t.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Ah(t,e){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,e=a.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Rl(t,e,a,s,o,c){var y=0;if(s=t,typeof t=="function")Fo(t)&&(y=1);else if(typeof t=="string")y=B1(t,a,it.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Z:return t=Re(31,a,e,o),t.elementType=Z,t.lanes=c,t;case w:return Aa(a.children,o,c,e);case _:y=8,o|=24;break;case R:return t=Re(12,a,e,o|2),t.elementType=R,t.lanes=c,t;case H:return t=Re(13,a,e,o),t.elementType=H,t.lanes=c,t;case $:return t=Re(19,a,e,o),t.elementType=$,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case D:y=10;break t;case O:y=9;break t;case M:y=11;break t;case V:y=14;break t;case q:y=16,s=null;break t}y=29,a=Error(r(130,t===null?"null":typeof t,"")),s=null}return e=Re(y,a,e,o),e.elementType=t,e.type=s,e.lanes=c,e}function Aa(t,e,a,s){return t=Re(7,t,s,e),t.lanes=a,t}function Jo(t,e,a){return t=Re(6,t,null,e),t.lanes=a,t}function Ch(t){var e=Re(18,null,null,0);return e.stateNode=t,e}function Wo(t,e,a){return e=Re(4,t.children!==null?t.children:[],t.key,e),e.lanes=a,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var wh=new WeakMap;function Ve(t,e){if(typeof t=="object"&&t!==null){var a=wh.get(t);return a!==void 0?a:(e={value:t,source:e,stack:Cd(e)},wh.set(t,e),e)}return{value:t,source:e,stack:Cd(e)}}var ii=[],si=0,_l=null,as=0,Be=[],He=0,Gn=null,rn=1,on="";function bn(t,e){ii[si++]=as,ii[si++]=_l,_l=t,as=e}function Rh(t,e,a){Be[He++]=rn,Be[He++]=on,Be[He++]=Gn,Gn=t;var s=rn;t=on;var o=32-Ce(s)-1;s&=~(1<<o),a+=1;var c=32-Ce(e)+o;if(30<c){var y=o-o%5;c=(s&(1<<y)-1).toString(32),s>>=y,o-=y,rn=1<<32-Ce(e)+o|a<<o|s,on=c+t}else rn=1<<c|a<<o|s,on=t}function Io(t){t.return!==null&&(bn(t,1),Rh(t,1,0))}function tu(t){for(;t===_l;)_l=ii[--si],ii[si]=null,as=ii[--si],ii[si]=null;for(;t===Gn;)Gn=Be[--He],Be[He]=null,on=Be[--He],Be[He]=null,rn=Be[--He],Be[He]=null}function _h(t,e){Be[He++]=rn,Be[He++]=on,Be[He++]=Gn,rn=e.id,on=e.overflow,Gn=t}var ie=null,Vt=null,St=!1,Yn=null,Ge=!1,eu=Error(r(519));function qn(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw is(Ve(e,t)),eu}function Nh(t){var e=t.stateNode,a=t.type,s=t.memoizedProps;switch(e[ae]=t,e[ye]=s,a){case"dialog":vt("cancel",e),vt("close",e);break;case"iframe":case"object":case"embed":vt("load",e);break;case"video":case"audio":for(a=0;a<ws.length;a++)vt(ws[a],e);break;case"source":vt("error",e);break;case"img":case"image":case"link":vt("error",e),vt("load",e);break;case"details":vt("toggle",e);break;case"input":vt("invalid",e),Yd(e,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":vt("invalid",e);break;case"textarea":vt("invalid",e),Pd(e,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||e.textContent===""+a||s.suppressHydrationWarning===!0||Kp(e.textContent,a)?(s.popover!=null&&(vt("beforetoggle",e),vt("toggle",e)),s.onScroll!=null&&vt("scroll",e),s.onScrollEnd!=null&&vt("scrollend",e),s.onClick!=null&&(e.onclick=gn),e=!0):e=!1,e||qn(t,!0)}function jh(t){for(ie=t.return;ie;)switch(ie.tag){case 5:case 31:case 13:Ge=!1;return;case 27:case 3:Ge=!0;return;default:ie=ie.return}}function li(t){if(t!==ie)return!1;if(!St)return jh(t),St=!0,!1;var e=t.tag,a;if((a=e!==3&&e!==27)&&((a=e===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||xc(t.type,t.memoizedProps)),a=!a),a&&Vt&&qn(t),jh(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Vt=ey(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Vt=ey(t)}else e===27?(e=Vt,aa(t.type)?(t=Ac,Ac=null,Vt=t):Vt=e):Vt=ie?qe(t.stateNode.nextSibling):null;return!0}function Ca(){Vt=ie=null,St=!1}function nu(){var t=Yn;return t!==null&&(Se===null?Se=t:Se.push.apply(Se,t),Yn=null),t}function is(t){Yn===null?Yn=[t]:Yn.push(t)}var au=N(null),wa=null,Sn=null;function Pn(t,e,a){et(au,e._currentValue),e._currentValue=a}function Tn(t){t._currentValue=au.current,K(au)}function iu(t,e,a){for(;t!==null;){var s=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,s!==null&&(s.childLanes|=e)):s!==null&&(s.childLanes&e)!==e&&(s.childLanes|=e),t===a)break;t=t.return}}function su(t,e,a,s){var o=t.child;for(o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){var y=o.child;c=c.firstContext;t:for(;c!==null;){var b=c;c=o;for(var C=0;C<e.length;C++)if(b.context===e[C]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),iu(c.return,a,t),s||(y=null);break t}c=b.next}}else if(o.tag===18){if(y=o.return,y===null)throw Error(r(341));y.lanes|=a,c=y.alternate,c!==null&&(c.lanes|=a),iu(y,a,t),y=null}else y=o.child;if(y!==null)y.return=o;else for(y=o;y!==null;){if(y===t){y=null;break}if(o=y.sibling,o!==null){o.return=y.return,y=o;break}y=y.return}o=y}}function ri(t,e,a,s){t=null;for(var o=e,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var y=o.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var b=o.type;we(o.pendingProps.value,y.value)||(t!==null?t.push(b):t=[b])}}else if(o===wt.current){if(y=o.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(t!==null?t.push(Ds):t=[Ds])}o=o.return}t!==null&&su(e,t,a,s),e.flags|=262144}function Nl(t){for(t=t.firstContext;t!==null;){if(!we(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ra(t){wa=t,Sn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function se(t){return Dh(wa,t)}function jl(t,e){return wa===null&&Ra(t),Dh(t,e)}function Dh(t,e){var a=e._currentValue;if(e={context:e,memoizedValue:a,next:null},Sn===null){if(t===null)throw Error(r(308));Sn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Sn=Sn.next=e;return a}var Lb=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,s){t.push(s)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},kb=n.unstable_scheduleCallback,Ub=n.unstable_NormalPriority,Zt={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lu(){return{controller:new Lb,data:new Map,refCount:0}}function ss(t){t.refCount--,t.refCount===0&&kb(Ub,function(){t.controller.abort()})}var ls=null,ru=0,oi=0,ui=null;function Vb(t,e){if(ls===null){var a=ls=[];ru=0,oi=cc(),ui={status:"pending",value:void 0,then:function(s){a.push(s)}}}return ru++,e.then(Mh,Mh),e}function Mh(){if(--ru===0&&ls!==null){ui!==null&&(ui.status="fulfilled");var t=ls;ls=null,oi=0,ui=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Bb(t,e){var a=[],s={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var o=0;o<a.length;o++)(0,a[o])(e)},function(o){for(s.status="rejected",s.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),s}var Oh=L.S;L.S=function(t,e){yp=Ee(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Vb(t,e),Oh!==null&&Oh(t,e)};var _a=N(null);function ou(){var t=_a.current;return t!==null?t:zt.pooledCache}function Dl(t,e){e===null?et(_a,_a.current):et(_a,e.pool)}function zh(){var t=ou();return t===null?null:{parent:Zt._currentValue,pool:t}}var ci=Error(r(460)),uu=Error(r(474)),Ml=Error(r(542)),Ol={then:function(){}};function Lh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function kh(t,e,a){switch(a=t[a],a===void 0?t.push(e):a!==e&&(e.then(gn,gn),e=a),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Vh(t),t;default:if(typeof e.status=="string")e.then(gn,gn);else{if(t=zt,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var o=e;o.status="fulfilled",o.value=s}},function(s){if(e.status==="pending"){var o=e;o.status="rejected",o.reason=s}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Vh(t),t}throw ja=e,ci}}function Na(t){try{var e=t._init;return e(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ja=a,ci):a}}var ja=null;function Uh(){if(ja===null)throw Error(r(459));var t=ja;return ja=null,t}function Vh(t){if(t===ci||t===Ml)throw Error(r(483))}var fi=null,rs=0;function zl(t){var e=rs;return rs+=1,fi===null&&(fi=[]),kh(fi,t,e)}function os(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Ll(t,e){throw e.$$typeof===S?Error(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Bh(t){function e(z,j){if(t){var k=z.deletions;k===null?(z.deletions=[j],z.flags|=16):k.push(j)}}function a(z,j){if(!t)return null;for(;j!==null;)e(z,j),j=j.sibling;return null}function s(z){for(var j=new Map;z!==null;)z.key!==null?j.set(z.key,z):j.set(z.index,z),z=z.sibling;return j}function o(z,j){return z=xn(z,j),z.index=0,z.sibling=null,z}function c(z,j,k){return z.index=k,t?(k=z.alternate,k!==null?(k=k.index,k<j?(z.flags|=67108866,j):k):(z.flags|=67108866,j)):(z.flags|=1048576,j)}function y(z){return t&&z.alternate===null&&(z.flags|=67108866),z}function b(z,j,k,P){return j===null||j.tag!==6?(j=Jo(k,z.mode,P),j.return=z,j):(j=o(j,k),j.return=z,j)}function C(z,j,k,P){var rt=k.type;return rt===w?Y(z,j,k.props.children,P,k.key):j!==null&&(j.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===q&&Na(rt)===j.type)?(j=o(j,k.props),os(j,k),j.return=z,j):(j=Rl(k.type,k.key,k.props,null,z.mode,P),os(j,k),j.return=z,j)}function U(z,j,k,P){return j===null||j.tag!==4||j.stateNode.containerInfo!==k.containerInfo||j.stateNode.implementation!==k.implementation?(j=Wo(k,z.mode,P),j.return=z,j):(j=o(j,k.children||[]),j.return=z,j)}function Y(z,j,k,P,rt){return j===null||j.tag!==7?(j=Aa(k,z.mode,P,rt),j.return=z,j):(j=o(j,k),j.return=z,j)}function X(z,j,k){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Jo(""+j,z.mode,k),j.return=z,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case E:return k=Rl(j.type,j.key,j.props,null,z.mode,k),os(k,j),k.return=z,k;case A:return j=Wo(j,z.mode,k),j.return=z,j;case q:return j=Na(j),X(z,j,k)}if(Q(j)||ut(j))return j=Aa(j,z.mode,k,null),j.return=z,j;if(typeof j.then=="function")return X(z,zl(j),k);if(j.$$typeof===D)return X(z,jl(z,j),k);Ll(z,j)}return null}function B(z,j,k,P){var rt=j!==null?j.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return rt!==null?null:b(z,j,""+k,P);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case E:return k.key===rt?C(z,j,k,P):null;case A:return k.key===rt?U(z,j,k,P):null;case q:return k=Na(k),B(z,j,k,P)}if(Q(k)||ut(k))return rt!==null?null:Y(z,j,k,P,null);if(typeof k.then=="function")return B(z,j,zl(k),P);if(k.$$typeof===D)return B(z,j,jl(z,k),P);Ll(z,k)}return null}function G(z,j,k,P,rt){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return z=z.get(k)||null,b(j,z,""+P,rt);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case E:return z=z.get(P.key===null?k:P.key)||null,C(j,z,P,rt);case A:return z=z.get(P.key===null?k:P.key)||null,U(j,z,P,rt);case q:return P=Na(P),G(z,j,k,P,rt)}if(Q(P)||ut(P))return z=z.get(k)||null,Y(j,z,P,rt,null);if(typeof P.then=="function")return G(z,j,k,zl(P),rt);if(P.$$typeof===D)return G(z,j,k,jl(j,P),rt);Ll(j,P)}return null}function nt(z,j,k,P){for(var rt=null,Et=null,st=j,mt=j=0,bt=null;st!==null&&mt<k.length;mt++){st.index>mt?(bt=st,st=null):bt=st.sibling;var At=B(z,st,k[mt],P);if(At===null){st===null&&(st=bt);break}t&&st&&At.alternate===null&&e(z,st),j=c(At,j,mt),Et===null?rt=At:Et.sibling=At,Et=At,st=bt}if(mt===k.length)return a(z,st),St&&bn(z,mt),rt;if(st===null){for(;mt<k.length;mt++)st=X(z,k[mt],P),st!==null&&(j=c(st,j,mt),Et===null?rt=st:Et.sibling=st,Et=st);return St&&bn(z,mt),rt}for(st=s(st);mt<k.length;mt++)bt=G(st,z,mt,k[mt],P),bt!==null&&(t&&bt.alternate!==null&&st.delete(bt.key===null?mt:bt.key),j=c(bt,j,mt),Et===null?rt=bt:Et.sibling=bt,Et=bt);return t&&st.forEach(function(oa){return e(z,oa)}),St&&bn(z,mt),rt}function ot(z,j,k,P){if(k==null)throw Error(r(151));for(var rt=null,Et=null,st=j,mt=j=0,bt=null,At=k.next();st!==null&&!At.done;mt++,At=k.next()){st.index>mt?(bt=st,st=null):bt=st.sibling;var oa=B(z,st,At.value,P);if(oa===null){st===null&&(st=bt);break}t&&st&&oa.alternate===null&&e(z,st),j=c(oa,j,mt),Et===null?rt=oa:Et.sibling=oa,Et=oa,st=bt}if(At.done)return a(z,st),St&&bn(z,mt),rt;if(st===null){for(;!At.done;mt++,At=k.next())At=X(z,At.value,P),At!==null&&(j=c(At,j,mt),Et===null?rt=At:Et.sibling=At,Et=At);return St&&bn(z,mt),rt}for(st=s(st);!At.done;mt++,At=k.next())At=G(st,z,mt,At.value,P),At!==null&&(t&&At.alternate!==null&&st.delete(At.key===null?mt:At.key),j=c(At,j,mt),Et===null?rt=At:Et.sibling=At,Et=At);return t&&st.forEach(function(F1){return e(z,F1)}),St&&bn(z,mt),rt}function Ot(z,j,k,P){if(typeof k=="object"&&k!==null&&k.type===w&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case E:t:{for(var rt=k.key;j!==null;){if(j.key===rt){if(rt=k.type,rt===w){if(j.tag===7){a(z,j.sibling),P=o(j,k.props.children),P.return=z,z=P;break t}}else if(j.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===q&&Na(rt)===j.type){a(z,j.sibling),P=o(j,k.props),os(P,k),P.return=z,z=P;break t}a(z,j);break}else e(z,j);j=j.sibling}k.type===w?(P=Aa(k.props.children,z.mode,P,k.key),P.return=z,z=P):(P=Rl(k.type,k.key,k.props,null,z.mode,P),os(P,k),P.return=z,z=P)}return y(z);case A:t:{for(rt=k.key;j!==null;){if(j.key===rt)if(j.tag===4&&j.stateNode.containerInfo===k.containerInfo&&j.stateNode.implementation===k.implementation){a(z,j.sibling),P=o(j,k.children||[]),P.return=z,z=P;break t}else{a(z,j);break}else e(z,j);j=j.sibling}P=Wo(k,z.mode,P),P.return=z,z=P}return y(z);case q:return k=Na(k),Ot(z,j,k,P)}if(Q(k))return nt(z,j,k,P);if(ut(k)){if(rt=ut(k),typeof rt!="function")throw Error(r(150));return k=rt.call(k),ot(z,j,k,P)}if(typeof k.then=="function")return Ot(z,j,zl(k),P);if(k.$$typeof===D)return Ot(z,j,jl(z,k),P);Ll(z,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,j!==null&&j.tag===6?(a(z,j.sibling),P=o(j,k),P.return=z,z=P):(a(z,j),P=Jo(k,z.mode,P),P.return=z,z=P),y(z)):a(z,j)}return function(z,j,k,P){try{rs=0;var rt=Ot(z,j,k,P);return fi=null,rt}catch(st){if(st===ci||st===Ml)throw st;var Et=Re(29,st,null,z.mode);return Et.lanes=P,Et.return=z,Et}finally{}}}var Da=Bh(!0),Hh=Bh(!1),Xn=!1;function cu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fu(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Kn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Qn(t,e,a){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Ct&2)!==0){var o=s.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),s.pending=e,e=wl(t),Eh(t,null,a),e}return Cl(t,s,e,a),wl(t)}function us(t,e,a){if(e=e.updateQueue,e!==null&&(e=e.shared,(a&4194048)!==0)){var s=e.lanes;s&=t.pendingLanes,a|=s,e.lanes=a,Dd(t,a)}}function du(t,e){var a=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var o=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?o=c=y:c=c.next=y,a=a.next}while(a!==null);c===null?o=c=e:c=c.next=e}else o=c=e;a={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=e:t.next=e,a.lastBaseUpdate=e}var hu=!1;function cs(){if(hu){var t=ui;if(t!==null)throw t}}function fs(t,e,a,s){hu=!1;var o=t.updateQueue;Xn=!1;var c=o.firstBaseUpdate,y=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var C=b,U=C.next;C.next=null,y===null?c=U:y.next=U,y=C;var Y=t.alternate;Y!==null&&(Y=Y.updateQueue,b=Y.lastBaseUpdate,b!==y&&(b===null?Y.firstBaseUpdate=U:b.next=U,Y.lastBaseUpdate=C))}if(c!==null){var X=o.baseState;y=0,Y=U=C=null,b=c;do{var B=b.lane&-536870913,G=B!==b.lane;if(G?(xt&B)===B:(s&B)===B){B!==0&&B===oi&&(hu=!0),Y!==null&&(Y=Y.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});t:{var nt=t,ot=b;B=e;var Ot=a;switch(ot.tag){case 1:if(nt=ot.payload,typeof nt=="function"){X=nt.call(Ot,X,B);break t}X=nt;break t;case 3:nt.flags=nt.flags&-65537|128;case 0:if(nt=ot.payload,B=typeof nt=="function"?nt.call(Ot,X,B):nt,B==null)break t;X=x({},X,B);break t;case 2:Xn=!0}}B=b.callback,B!==null&&(t.flags|=64,G&&(t.flags|=8192),G=o.callbacks,G===null?o.callbacks=[B]:G.push(B))}else G={lane:B,tag:b.tag,payload:b.payload,callback:b.callback,next:null},Y===null?(U=Y=G,C=X):Y=Y.next=G,y|=B;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;G=b,b=G.next,G.next=null,o.lastBaseUpdate=G,o.shared.pending=null}}while(!0);Y===null&&(C=X),o.baseState=C,o.firstBaseUpdate=U,o.lastBaseUpdate=Y,c===null&&(o.shared.lanes=0),Wn|=y,t.lanes=y,t.memoizedState=X}}function Gh(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function Yh(t,e){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Gh(a[t],e)}var di=N(null),kl=N(0);function qh(t,e){t=Dn,et(kl,t),et(di,e),Dn=t|e.baseLanes}function mu(){et(kl,Dn),et(di,di.current)}function pu(){Dn=kl.current,K(di),K(kl)}var _e=N(null),Ye=null;function Zn(t){var e=t.alternate;et(Kt,Kt.current&1),et(_e,t),Ye===null&&(e===null||di.current!==null||e.memoizedState!==null)&&(Ye=t)}function yu(t){et(Kt,Kt.current),et(_e,t),Ye===null&&(Ye=t)}function Ph(t){t.tag===22?(et(Kt,Kt.current),et(_e,t),Ye===null&&(Ye=t)):$n()}function $n(){et(Kt,Kt.current),et(_e,_e.current)}function Ne(t){K(_e),Ye===t&&(Ye=null),K(Kt)}var Kt=N(0);function Ul(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Tc(a)||Ec(a)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var En=0,ht=null,Dt=null,$t=null,Vl=!1,hi=!1,Ma=!1,Bl=0,ds=0,mi=null,Hb=0;function Yt(){throw Error(r(321))}function gu(t,e){if(e===null)return!1;for(var a=0;a<e.length&&a<t.length;a++)if(!we(t[a],e[a]))return!1;return!0}function vu(t,e,a,s,o,c){return En=c,ht=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,L.H=t===null||t.memoizedState===null?Rm:Ou,Ma=!1,c=a(s,o),Ma=!1,hi&&(c=Kh(e,a,s,o)),Xh(t),c}function Xh(t){L.H=ps;var e=Dt!==null&&Dt.next!==null;if(En=0,$t=Dt=ht=null,Vl=!1,ds=0,mi=null,e)throw Error(r(300));t===null||Ft||(t=t.dependencies,t!==null&&Nl(t)&&(Ft=!0))}function Kh(t,e,a,s){ht=t;var o=0;do{if(hi&&(mi=null),ds=0,hi=!1,25<=o)throw Error(r(301));if(o+=1,$t=Dt=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}L.H=_m,c=e(a,s)}while(hi);return c}function Gb(){var t=L.H,e=t.useState()[0];return e=typeof e.then=="function"?hs(e):e,t=t.useState()[0],(Dt!==null?Dt.memoizedState:null)!==t&&(ht.flags|=1024),e}function xu(){var t=Bl!==0;return Bl=0,t}function bu(t,e,a){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~a}function Su(t){if(Vl){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Vl=!1}En=0,$t=Dt=ht=null,hi=!1,ds=Bl=0,mi=null}function de(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?ht.memoizedState=$t=t:$t=$t.next=t,$t}function Qt(){if(Dt===null){var t=ht.alternate;t=t!==null?t.memoizedState:null}else t=Dt.next;var e=$t===null?ht.memoizedState:$t.next;if(e!==null)$t=e,Dt=t;else{if(t===null)throw ht.alternate===null?Error(r(467)):Error(r(310));Dt=t,t={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},$t===null?ht.memoizedState=$t=t:$t=$t.next=t}return $t}function Hl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hs(t){var e=ds;return ds+=1,mi===null&&(mi=[]),t=kh(mi,t,e),e=ht,($t===null?e.memoizedState:$t.next)===null&&(e=e.alternate,L.H=e===null||e.memoizedState===null?Rm:Ou),t}function Gl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return hs(t);if(t.$$typeof===D)return se(t)}throw Error(r(438,String(t)))}function Tu(t){var e=null,a=ht.updateQueue;if(a!==null&&(e=a.memoCache),e==null){var s=ht.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(o){return o.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),a===null&&(a=Hl(),ht.updateQueue=a),a.memoCache=e,a=e.data[e.index],a===void 0)for(a=e.data[e.index]=Array(t),s=0;s<t;s++)a[s]=F;return e.index++,a}function An(t,e){return typeof e=="function"?e(t):e}function Yl(t){var e=Qt();return Eu(e,Dt,t)}function Eu(t,e,a){var s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var o=t.baseQueue,c=s.pending;if(c!==null){if(o!==null){var y=o.next;o.next=c.next,c.next=y}e.baseQueue=o=c,s.pending=null}if(c=t.baseState,o===null)t.memoizedState=c;else{e=o.next;var b=y=null,C=null,U=e,Y=!1;do{var X=U.lane&-536870913;if(X!==U.lane?(xt&X)===X:(En&X)===X){var B=U.revertLane;if(B===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),X===oi&&(Y=!0);else if((En&B)===B){U=U.next,B===oi&&(Y=!0);continue}else X={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},C===null?(b=C=X,y=c):C=C.next=X,ht.lanes|=B,Wn|=B;X=U.action,Ma&&a(c,X),c=U.hasEagerState?U.eagerState:a(c,X)}else B={lane:X,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},C===null?(b=C=B,y=c):C=C.next=B,ht.lanes|=X,Wn|=X;U=U.next}while(U!==null&&U!==e);if(C===null?y=c:C.next=b,!we(c,t.memoizedState)&&(Ft=!0,Y&&(a=ui,a!==null)))throw a;t.memoizedState=c,t.baseState=y,t.baseQueue=C,s.lastRenderedState=c}return o===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Au(t){var e=Qt(),a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=t;var s=a.dispatch,o=a.pending,c=e.memoizedState;if(o!==null){a.pending=null;var y=o=o.next;do c=t(c,y.action),y=y.next;while(y!==o);we(c,e.memoizedState)||(Ft=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),a.lastRenderedState=c}return[c,s]}function Qh(t,e,a){var s=ht,o=Qt(),c=St;if(c){if(a===void 0)throw Error(r(407));a=a()}else a=e();var y=!we((Dt||o).memoizedState,a);if(y&&(o.memoizedState=a,Ft=!0),o=o.queue,Ru(Fh.bind(null,s,o,t),[t]),o.getSnapshot!==e||y||$t!==null&&$t.memoizedState.tag&1){if(s.flags|=2048,pi(9,{destroy:void 0},$h.bind(null,s,o,a,e),null),zt===null)throw Error(r(349));c||(En&127)!==0||Zh(s,e,a)}return a}function Zh(t,e,a){t.flags|=16384,t={getSnapshot:e,value:a},e=ht.updateQueue,e===null?(e=Hl(),ht.updateQueue=e,e.stores=[t]):(a=e.stores,a===null?e.stores=[t]:a.push(t))}function $h(t,e,a,s){e.value=a,e.getSnapshot=s,Jh(e)&&Wh(t)}function Fh(t,e,a){return a(function(){Jh(e)&&Wh(t)})}function Jh(t){var e=t.getSnapshot;t=t.value;try{var a=e();return!we(t,a)}catch{return!0}}function Wh(t){var e=Ea(t,2);e!==null&&Te(e,t,2)}function Cu(t){var e=de();if(typeof t=="function"){var a=t;if(t=a(),Ma){Vn(!0);try{a()}finally{Vn(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:t},e}function Ih(t,e,a,s){return t.baseState=a,Eu(t,Dt,typeof s=="function"?s:An)}function Yb(t,e,a,s,o){if(Xl(t))throw Error(r(485));if(t=e.action,t!==null){var c={payload:o,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};L.T!==null?a(!0):c.isTransition=!1,s(c),a=e.pending,a===null?(c.next=e.pending=c,tm(e,c)):(c.next=a.next,e.pending=a.next=c)}}function tm(t,e){var a=e.action,s=e.payload,o=t.state;if(e.isTransition){var c=L.T,y={};L.T=y;try{var b=a(o,s),C=L.S;C!==null&&C(y,b),em(t,e,b)}catch(U){wu(t,e,U)}finally{c!==null&&y.types!==null&&(c.types=y.types),L.T=c}}else try{c=a(o,s),em(t,e,c)}catch(U){wu(t,e,U)}}function em(t,e,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){nm(t,e,s)},function(s){return wu(t,e,s)}):nm(t,e,a)}function nm(t,e,a){e.status="fulfilled",e.value=a,am(e),t.state=a,e=t.pending,e!==null&&(a=e.next,a===e?t.pending=null:(a=a.next,e.next=a,tm(t,a)))}function wu(t,e,a){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do e.status="rejected",e.reason=a,am(e),e=e.next;while(e!==s)}t.action=null}function am(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function im(t,e){return e}function sm(t,e){if(St){var a=zt.formState;if(a!==null){t:{var s=ht;if(St){if(Vt){e:{for(var o=Vt,c=Ge;o.nodeType!==8;){if(!c){o=null;break e}if(o=qe(o.nextSibling),o===null){o=null;break e}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){Vt=qe(o.nextSibling),s=o.data==="F!";break t}}qn(s)}s=!1}s&&(e=a[0])}}return a=de(),a.memoizedState=a.baseState=e,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:im,lastRenderedState:e},a.queue=s,a=Am.bind(null,ht,s),s.dispatch=a,s=Cu(!1),c=Mu.bind(null,ht,!1,s.queue),s=de(),o={state:e,dispatch:null,action:t,pending:null},s.queue=o,a=Yb.bind(null,ht,o,c,a),o.dispatch=a,s.memoizedState=t,[e,a,!1]}function lm(t){var e=Qt();return rm(e,Dt,t)}function rm(t,e,a){if(e=Eu(t,e,im)[0],t=Yl(An)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var s=hs(e)}catch(y){throw y===ci?Ml:y}else s=e;e=Qt();var o=e.queue,c=o.dispatch;return a!==e.memoizedState&&(ht.flags|=2048,pi(9,{destroy:void 0},qb.bind(null,o,a),null)),[s,c,t]}function qb(t,e){t.action=e}function om(t){var e=Qt(),a=Dt;if(a!==null)return rm(e,a,t);Qt(),e=e.memoizedState,a=Qt();var s=a.queue.dispatch;return a.memoizedState=t,[e,s,!1]}function pi(t,e,a,s){return t={tag:t,create:a,deps:s,inst:e,next:null},e=ht.updateQueue,e===null&&(e=Hl(),ht.updateQueue=e),a=e.lastEffect,a===null?e.lastEffect=t.next=t:(s=a.next,a.next=t,t.next=s,e.lastEffect=t),t}function um(){return Qt().memoizedState}function ql(t,e,a,s){var o=de();ht.flags|=t,o.memoizedState=pi(1|e,{destroy:void 0},a,s===void 0?null:s)}function Pl(t,e,a,s){var o=Qt();s=s===void 0?null:s;var c=o.memoizedState.inst;Dt!==null&&s!==null&&gu(s,Dt.memoizedState.deps)?o.memoizedState=pi(e,c,a,s):(ht.flags|=t,o.memoizedState=pi(1|e,c,a,s))}function cm(t,e){ql(8390656,8,t,e)}function Ru(t,e){Pl(2048,8,t,e)}function Pb(t){ht.flags|=4;var e=ht.updateQueue;if(e===null)e=Hl(),ht.updateQueue=e,e.events=[t];else{var a=e.events;a===null?e.events=[t]:a.push(t)}}function fm(t){var e=Qt().memoizedState;return Pb({ref:e,nextImpl:t}),function(){if((Ct&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function dm(t,e){return Pl(4,2,t,e)}function hm(t,e){return Pl(4,4,t,e)}function mm(t,e){if(typeof e=="function"){t=t();var a=e(t);return function(){typeof a=="function"?a():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function pm(t,e,a){a=a!=null?a.concat([t]):null,Pl(4,4,mm.bind(null,e,t),a)}function _u(){}function ym(t,e){var a=Qt();e=e===void 0?null:e;var s=a.memoizedState;return e!==null&&gu(e,s[1])?s[0]:(a.memoizedState=[t,e],t)}function gm(t,e){var a=Qt();e=e===void 0?null:e;var s=a.memoizedState;if(e!==null&&gu(e,s[1]))return s[0];if(s=t(),Ma){Vn(!0);try{t()}finally{Vn(!1)}}return a.memoizedState=[s,e],s}function Nu(t,e,a){return a===void 0||(En&1073741824)!==0&&(xt&261930)===0?t.memoizedState=e:(t.memoizedState=a,t=vp(),ht.lanes|=t,Wn|=t,a)}function vm(t,e,a,s){return we(a,e)?a:di.current!==null?(t=Nu(t,a,s),we(t,e)||(Ft=!0),t):(En&42)===0||(En&1073741824)!==0&&(xt&261930)===0?(Ft=!0,t.memoizedState=a):(t=vp(),ht.lanes|=t,Wn|=t,e)}function xm(t,e,a,s,o){var c=J.p;J.p=c!==0&&8>c?c:8;var y=L.T,b={};L.T=b,Mu(t,!1,e,a);try{var C=o(),U=L.S;if(U!==null&&U(b,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var Y=Bb(C,s);ms(t,e,Y,Me(t))}else ms(t,e,s,Me(t))}catch(X){ms(t,e,{then:function(){},status:"rejected",reason:X},Me())}finally{J.p=c,y!==null&&b.types!==null&&(y.types=b.types),L.T=y}}function Xb(){}function ju(t,e,a,s){if(t.tag!==5)throw Error(r(476));var o=bm(t).queue;xm(t,o,e,tt,a===null?Xb:function(){return Sm(t),a(s)})}function bm(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:tt,baseState:tt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:tt},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Sm(t){var e=bm(t);e.next===null&&(e=t.alternate.memoizedState),ms(t,e.next.queue,{},Me())}function Du(){return se(Ds)}function Tm(){return Qt().memoizedState}function Em(){return Qt().memoizedState}function Kb(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=Me();t=Kn(a);var s=Qn(e,t,a);s!==null&&(Te(s,e,a),us(s,e,a)),e={cache:lu()},t.payload=e;return}e=e.return}}function Qb(t,e,a){var s=Me();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Xl(t)?Cm(e,a):(a=$o(t,e,a,s),a!==null&&(Te(a,t,s),wm(a,e,s)))}function Am(t,e,a){var s=Me();ms(t,e,a,s)}function ms(t,e,a,s){var o={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Xl(t))Cm(e,o);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var y=e.lastRenderedState,b=c(y,a);if(o.hasEagerState=!0,o.eagerState=b,we(b,y))return Cl(t,e,o,0),zt===null&&Al(),!1}catch{}finally{}if(a=$o(t,e,o,s),a!==null)return Te(a,t,s),wm(a,e,s),!0}return!1}function Mu(t,e,a,s){if(s={lane:2,revertLane:cc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Xl(t)){if(e)throw Error(r(479))}else e=$o(t,a,s,2),e!==null&&Te(e,t,2)}function Xl(t){var e=t.alternate;return t===ht||e!==null&&e===ht}function Cm(t,e){hi=Vl=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function wm(t,e,a){if((a&4194048)!==0){var s=e.lanes;s&=t.pendingLanes,a|=s,e.lanes=a,Dd(t,a)}}var ps={readContext:se,use:Gl,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt};ps.useEffectEvent=Yt;var Rm={readContext:se,use:Gl,useCallback:function(t,e){return de().memoizedState=[t,e===void 0?null:e],t},useContext:se,useEffect:cm,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,ql(4194308,4,mm.bind(null,e,t),a)},useLayoutEffect:function(t,e){return ql(4194308,4,t,e)},useInsertionEffect:function(t,e){ql(4,2,t,e)},useMemo:function(t,e){var a=de();e=e===void 0?null:e;var s=t();if(Ma){Vn(!0);try{t()}finally{Vn(!1)}}return a.memoizedState=[s,e],s},useReducer:function(t,e,a){var s=de();if(a!==void 0){var o=a(e);if(Ma){Vn(!0);try{a(e)}finally{Vn(!1)}}}else o=e;return s.memoizedState=s.baseState=o,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:o},s.queue=t,t=t.dispatch=Qb.bind(null,ht,t),[s.memoizedState,t]},useRef:function(t){var e=de();return t={current:t},e.memoizedState=t},useState:function(t){t=Cu(t);var e=t.queue,a=Am.bind(null,ht,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:_u,useDeferredValue:function(t,e){var a=de();return Nu(a,t,e)},useTransition:function(){var t=Cu(!1);return t=xm.bind(null,ht,t.queue,!0,!1),de().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var s=ht,o=de();if(St){if(a===void 0)throw Error(r(407));a=a()}else{if(a=e(),zt===null)throw Error(r(349));(xt&127)!==0||Zh(s,e,a)}o.memoizedState=a;var c={value:a,getSnapshot:e};return o.queue=c,cm(Fh.bind(null,s,c,t),[t]),s.flags|=2048,pi(9,{destroy:void 0},$h.bind(null,s,c,a,e),null),a},useId:function(){var t=de(),e=zt.identifierPrefix;if(St){var a=on,s=rn;a=(s&~(1<<32-Ce(s)-1)).toString(32)+a,e="_"+e+"R_"+a,a=Bl++,0<a&&(e+="H"+a.toString(32)),e+="_"}else a=Hb++,e="_"+e+"r_"+a.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Du,useFormState:sm,useActionState:sm,useOptimistic:function(t){var e=de();e.memoizedState=e.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=a,e=Mu.bind(null,ht,!0,a),a.dispatch=e,[t,e]},useMemoCache:Tu,useCacheRefresh:function(){return de().memoizedState=Kb.bind(null,ht)},useEffectEvent:function(t){var e=de(),a={impl:t};return e.memoizedState=a,function(){if((Ct&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Ou={readContext:se,use:Gl,useCallback:ym,useContext:se,useEffect:Ru,useImperativeHandle:pm,useInsertionEffect:dm,useLayoutEffect:hm,useMemo:gm,useReducer:Yl,useRef:um,useState:function(){return Yl(An)},useDebugValue:_u,useDeferredValue:function(t,e){var a=Qt();return vm(a,Dt.memoizedState,t,e)},useTransition:function(){var t=Yl(An)[0],e=Qt().memoizedState;return[typeof t=="boolean"?t:hs(t),e]},useSyncExternalStore:Qh,useId:Tm,useHostTransitionStatus:Du,useFormState:lm,useActionState:lm,useOptimistic:function(t,e){var a=Qt();return Ih(a,Dt,t,e)},useMemoCache:Tu,useCacheRefresh:Em};Ou.useEffectEvent=fm;var _m={readContext:se,use:Gl,useCallback:ym,useContext:se,useEffect:Ru,useImperativeHandle:pm,useInsertionEffect:dm,useLayoutEffect:hm,useMemo:gm,useReducer:Au,useRef:um,useState:function(){return Au(An)},useDebugValue:_u,useDeferredValue:function(t,e){var a=Qt();return Dt===null?Nu(a,t,e):vm(a,Dt.memoizedState,t,e)},useTransition:function(){var t=Au(An)[0],e=Qt().memoizedState;return[typeof t=="boolean"?t:hs(t),e]},useSyncExternalStore:Qh,useId:Tm,useHostTransitionStatus:Du,useFormState:om,useActionState:om,useOptimistic:function(t,e){var a=Qt();return Dt!==null?Ih(a,Dt,t,e):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Tu,useCacheRefresh:Em};_m.useEffectEvent=fm;function zu(t,e,a,s){e=t.memoizedState,a=a(s,e),a=a==null?e:x({},e,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Lu={enqueueSetState:function(t,e,a){t=t._reactInternals;var s=Me(),o=Kn(s);o.payload=e,a!=null&&(o.callback=a),e=Qn(t,o,s),e!==null&&(Te(e,t,s),us(e,t,s))},enqueueReplaceState:function(t,e,a){t=t._reactInternals;var s=Me(),o=Kn(s);o.tag=1,o.payload=e,a!=null&&(o.callback=a),e=Qn(t,o,s),e!==null&&(Te(e,t,s),us(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var a=Me(),s=Kn(a);s.tag=2,e!=null&&(s.callback=e),e=Qn(t,s,a),e!==null&&(Te(e,t,a),us(e,t,a))}};function Nm(t,e,a,s,o,c,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,c,y):e.prototype&&e.prototype.isPureReactComponent?!es(a,s)||!es(o,c):!0}function jm(t,e,a,s){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(a,s),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(a,s),e.state!==t&&Lu.enqueueReplaceState(e,e.state,null)}function Oa(t,e){var a=e;if("ref"in e){a={};for(var s in e)s!=="ref"&&(a[s]=e[s])}if(t=t.defaultProps){a===e&&(a=x({},a));for(var o in t)a[o]===void 0&&(a[o]=t[o])}return a}function Dm(t){El(t)}function Mm(t){console.error(t)}function Om(t){El(t)}function Kl(t,e){try{var a=t.onUncaughtError;a(e.value,{componentStack:e.stack})}catch(s){setTimeout(function(){throw s})}}function zm(t,e,a){try{var s=t.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function ku(t,e,a){return a=Kn(a),a.tag=3,a.payload={element:null},a.callback=function(){Kl(t,e)},a}function Lm(t){return t=Kn(t),t.tag=3,t}function km(t,e,a,s){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var c=s.value;t.payload=function(){return o(c)},t.callback=function(){zm(e,a,s)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){zm(e,a,s),typeof o!="function"&&(In===null?In=new Set([this]):In.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function Zb(t,e,a,s,o){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=a.alternate,e!==null&&ri(e,a,o,!0),a=_e.current,a!==null){switch(a.tag){case 31:case 13:return Ye===null?ir():a.alternate===null&&qt===0&&(qt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,s===Ol?a.flags|=16384:(e=a.updateQueue,e===null?a.updateQueue=new Set([s]):e.add(s),rc(t,s,o)),!1;case 22:return a.flags|=65536,s===Ol?a.flags|=16384:(e=a.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=e):(a=e.retryQueue,a===null?e.retryQueue=new Set([s]):a.add(s)),rc(t,s,o)),!1}throw Error(r(435,a.tag))}return rc(t,s,o),ir(),!1}if(St)return e=_e.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=o,s!==eu&&(t=Error(r(422),{cause:s}),is(Ve(t,a)))):(s!==eu&&(e=Error(r(423),{cause:s}),is(Ve(e,a))),t=t.current.alternate,t.flags|=65536,o&=-o,t.lanes|=o,s=Ve(s,a),o=ku(t.stateNode,s,o),du(t,o),qt!==4&&(qt=2)),!1;var c=Error(r(520),{cause:s});if(c=Ve(c,a),Es===null?Es=[c]:Es.push(c),qt!==4&&(qt=2),e===null)return!0;s=Ve(s,a),a=e;do{switch(a.tag){case 3:return a.flags|=65536,t=o&-o,a.lanes|=t,t=ku(a.stateNode,s,t),du(a,t),!1;case 1:if(e=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(In===null||!In.has(c))))return a.flags|=65536,o&=-o,a.lanes|=o,o=Lm(o),km(o,t,a,s),du(a,o),!1}a=a.return}while(a!==null);return!1}var Uu=Error(r(461)),Ft=!1;function le(t,e,a,s){e.child=t===null?Hh(e,null,a,s):Da(e,t.child,a,s)}function Um(t,e,a,s,o){a=a.render;var c=e.ref;if("ref"in s){var y={};for(var b in s)b!=="ref"&&(y[b]=s[b])}else y=s;return Ra(e),s=vu(t,e,a,y,c,o),b=xu(),t!==null&&!Ft?(bu(t,e,o),Cn(t,e,o)):(St&&b&&Io(e),e.flags|=1,le(t,e,s,o),e.child)}function Vm(t,e,a,s,o){if(t===null){var c=a.type;return typeof c=="function"&&!Fo(c)&&c.defaultProps===void 0&&a.compare===null?(e.tag=15,e.type=c,Bm(t,e,c,s,o)):(t=Rl(a.type,null,s,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!Xu(t,o)){var y=c.memoizedProps;if(a=a.compare,a=a!==null?a:es,a(y,s)&&t.ref===e.ref)return Cn(t,e,o)}return e.flags|=1,t=xn(c,s),t.ref=e.ref,t.return=e,e.child=t}function Bm(t,e,a,s,o){if(t!==null){var c=t.memoizedProps;if(es(c,s)&&t.ref===e.ref)if(Ft=!1,e.pendingProps=s=c,Xu(t,o))(t.flags&131072)!==0&&(Ft=!0);else return e.lanes=t.lanes,Cn(t,e,o)}return Vu(t,e,a,s,o)}function Hm(t,e,a,s){var o=s.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,t!==null){for(s=e.child=t.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~c}else s=0,e.child=null;return Gm(t,e,c,a,s)}if((a&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Dl(e,c!==null?c.cachePool:null),c!==null?qh(e,c):mu(),Ph(e);else return s=e.lanes=536870912,Gm(t,e,c!==null?c.baseLanes|a:a,a,s)}else c!==null?(Dl(e,c.cachePool),qh(e,c),$n(),e.memoizedState=null):(t!==null&&Dl(e,null),mu(),$n());return le(t,e,o,a),e.child}function ys(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Gm(t,e,a,s,o){var c=ou();return c=c===null?null:{parent:Zt._currentValue,pool:c},e.memoizedState={baseLanes:a,cachePool:c},t!==null&&Dl(e,null),mu(),Ph(e),t!==null&&ri(t,e,s,!0),e.childLanes=o,null}function Ql(t,e){return e=$l({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Ym(t,e,a){return Da(e,t.child,null,a),t=Ql(e,e.pendingProps),t.flags|=2,Ne(e),e.memoizedState=null,t}function $b(t,e,a){var s=e.pendingProps,o=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(St){if(s.mode==="hidden")return t=Ql(e,s),e.lanes=536870912,ys(null,t);if(yu(e),(t=Vt)?(t=ty(t,Ge),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Gn!==null?{id:rn,overflow:on}:null,retryLane:536870912,hydrationErrors:null},a=Ch(t),a.return=e,e.child=a,ie=e,Vt=null)):t=null,t===null)throw qn(e);return e.lanes=536870912,null}return Ql(e,s)}var c=t.memoizedState;if(c!==null){var y=c.dehydrated;if(yu(e),o)if(e.flags&256)e.flags&=-257,e=Ym(t,e,a);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(r(558));else if(Ft||ri(t,e,a,!1),o=(a&t.childLanes)!==0,Ft||o){if(s=zt,s!==null&&(y=Md(s,a),y!==0&&y!==c.retryLane))throw c.retryLane=y,Ea(t,y),Te(s,t,y),Uu;ir(),e=Ym(t,e,a)}else t=c.treeContext,Vt=qe(y.nextSibling),ie=e,St=!0,Yn=null,Ge=!1,t!==null&&_h(e,t),e=Ql(e,s),e.flags|=4096;return e}return t=xn(t.child,{mode:s.mode,children:s.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Zl(t,e){var a=e.ref;if(a===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(t===null||t.ref!==a)&&(e.flags|=4194816)}}function Vu(t,e,a,s,o){return Ra(e),a=vu(t,e,a,s,void 0,o),s=xu(),t!==null&&!Ft?(bu(t,e,o),Cn(t,e,o)):(St&&s&&Io(e),e.flags|=1,le(t,e,a,o),e.child)}function qm(t,e,a,s,o,c){return Ra(e),e.updateQueue=null,a=Kh(e,s,a,o),Xh(t),s=xu(),t!==null&&!Ft?(bu(t,e,c),Cn(t,e,c)):(St&&s&&Io(e),e.flags|=1,le(t,e,a,c),e.child)}function Pm(t,e,a,s,o){if(Ra(e),e.stateNode===null){var c=ai,y=a.contextType;typeof y=="object"&&y!==null&&(c=se(y)),c=new a(s,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Lu,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=s,c.state=e.memoizedState,c.refs={},cu(e),y=a.contextType,c.context=typeof y=="object"&&y!==null?se(y):ai,c.state=e.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(zu(e,a,y,s),c.state=e.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&Lu.enqueueReplaceState(c,c.state,null),fs(e,s,c,o),cs(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!0}else if(t===null){c=e.stateNode;var b=e.memoizedProps,C=Oa(a,b);c.props=C;var U=c.context,Y=a.contextType;y=ai,typeof Y=="object"&&Y!==null&&(y=se(Y));var X=a.getDerivedStateFromProps;Y=typeof X=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=e.pendingProps!==b,Y||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||U!==y)&&jm(e,c,s,y),Xn=!1;var B=e.memoizedState;c.state=B,fs(e,s,c,o),cs(),U=e.memoizedState,b||B!==U||Xn?(typeof X=="function"&&(zu(e,a,X,s),U=e.memoizedState),(C=Xn||Nm(e,a,C,s,B,U,y))?(Y||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=s,e.memoizedState=U),c.props=s,c.state=U,c.context=y,s=C):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!1)}else{c=e.stateNode,fu(t,e),y=e.memoizedProps,Y=Oa(a,y),c.props=Y,X=e.pendingProps,B=c.context,U=a.contextType,C=ai,typeof U=="object"&&U!==null&&(C=se(U)),b=a.getDerivedStateFromProps,(U=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==X||B!==C)&&jm(e,c,s,C),Xn=!1,B=e.memoizedState,c.state=B,fs(e,s,c,o),cs();var G=e.memoizedState;y!==X||B!==G||Xn||t!==null&&t.dependencies!==null&&Nl(t.dependencies)?(typeof b=="function"&&(zu(e,a,b,s),G=e.memoizedState),(Y=Xn||Nm(e,a,Y,s,B,G,C)||t!==null&&t.dependencies!==null&&Nl(t.dependencies))?(U||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,G,C),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,G,C)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===t.memoizedProps&&B===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&B===t.memoizedState||(e.flags|=1024),e.memoizedProps=s,e.memoizedState=G),c.props=s,c.state=G,c.context=C,s=Y):(typeof c.componentDidUpdate!="function"||y===t.memoizedProps&&B===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&B===t.memoizedState||(e.flags|=1024),s=!1)}return c=s,Zl(t,e),s=(e.flags&128)!==0,c||s?(c=e.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&s?(e.child=Da(e,t.child,null,o),e.child=Da(e,null,a,o)):le(t,e,a,o),e.memoizedState=c.state,t=e.child):t=Cn(t,e,o),t}function Xm(t,e,a,s){return Ca(),e.flags|=256,le(t,e,a,s),e.child}var Bu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hu(t){return{baseLanes:t,cachePool:zh()}}function Gu(t,e,a){return t=t!==null?t.childLanes&~a:0,e&&(t|=De),t}function Km(t,e,a){var s=e.pendingProps,o=!1,c=(e.flags&128)!==0,y;if((y=c)||(y=t!==null&&t.memoizedState===null?!1:(Kt.current&2)!==0),y&&(o=!0,e.flags&=-129),y=(e.flags&32)!==0,e.flags&=-33,t===null){if(St){if(o?Zn(e):$n(),(t=Vt)?(t=ty(t,Ge),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Gn!==null?{id:rn,overflow:on}:null,retryLane:536870912,hydrationErrors:null},a=Ch(t),a.return=e,e.child=a,ie=e,Vt=null)):t=null,t===null)throw qn(e);return Ec(t)?e.lanes=32:e.lanes=536870912,null}var b=s.children;return s=s.fallback,o?($n(),o=e.mode,b=$l({mode:"hidden",children:b},o),s=Aa(s,o,a,null),b.return=e,s.return=e,b.sibling=s,e.child=b,s=e.child,s.memoizedState=Hu(a),s.childLanes=Gu(t,y,a),e.memoizedState=Bu,ys(null,s)):(Zn(e),Yu(e,b))}var C=t.memoizedState;if(C!==null&&(b=C.dehydrated,b!==null)){if(c)e.flags&256?(Zn(e),e.flags&=-257,e=qu(t,e,a)):e.memoizedState!==null?($n(),e.child=t.child,e.flags|=128,e=null):($n(),b=s.fallback,o=e.mode,s=$l({mode:"visible",children:s.children},o),b=Aa(b,o,a,null),b.flags|=2,s.return=e,b.return=e,s.sibling=b,e.child=s,Da(e,t.child,null,a),s=e.child,s.memoizedState=Hu(a),s.childLanes=Gu(t,y,a),e.memoizedState=Bu,e=ys(null,s));else if(Zn(e),Ec(b)){if(y=b.nextSibling&&b.nextSibling.dataset,y)var U=y.dgst;y=U,s=Error(r(419)),s.stack="",s.digest=y,is({value:s,source:null,stack:null}),e=qu(t,e,a)}else if(Ft||ri(t,e,a,!1),y=(a&t.childLanes)!==0,Ft||y){if(y=zt,y!==null&&(s=Md(y,a),s!==0&&s!==C.retryLane))throw C.retryLane=s,Ea(t,s),Te(y,t,s),Uu;Tc(b)||ir(),e=qu(t,e,a)}else Tc(b)?(e.flags|=192,e.child=t.child,e=null):(t=C.treeContext,Vt=qe(b.nextSibling),ie=e,St=!0,Yn=null,Ge=!1,t!==null&&_h(e,t),e=Yu(e,s.children),e.flags|=4096);return e}return o?($n(),b=s.fallback,o=e.mode,C=t.child,U=C.sibling,s=xn(C,{mode:"hidden",children:s.children}),s.subtreeFlags=C.subtreeFlags&65011712,U!==null?b=xn(U,b):(b=Aa(b,o,a,null),b.flags|=2),b.return=e,s.return=e,s.sibling=b,e.child=s,ys(null,s),s=e.child,b=t.child.memoizedState,b===null?b=Hu(a):(o=b.cachePool,o!==null?(C=Zt._currentValue,o=o.parent!==C?{parent:C,pool:C}:o):o=zh(),b={baseLanes:b.baseLanes|a,cachePool:o}),s.memoizedState=b,s.childLanes=Gu(t,y,a),e.memoizedState=Bu,ys(t.child,s)):(Zn(e),a=t.child,t=a.sibling,a=xn(a,{mode:"visible",children:s.children}),a.return=e,a.sibling=null,t!==null&&(y=e.deletions,y===null?(e.deletions=[t],e.flags|=16):y.push(t)),e.child=a,e.memoizedState=null,a)}function Yu(t,e){return e=$l({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function $l(t,e){return t=Re(22,t,null,e),t.lanes=0,t}function qu(t,e,a){return Da(e,t.child,null,a),t=Yu(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Qm(t,e,a){t.lanes|=e;var s=t.alternate;s!==null&&(s.lanes|=e),iu(t.return,e,a)}function Pu(t,e,a,s,o,c){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:o,treeForkCount:c}:(y.isBackwards=e,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=a,y.tailMode=o,y.treeForkCount=c)}function Zm(t,e,a){var s=e.pendingProps,o=s.revealOrder,c=s.tail;s=s.children;var y=Kt.current,b=(y&2)!==0;if(b?(y=y&1|2,e.flags|=128):y&=1,et(Kt,y),le(t,e,s,a),s=St?as:0,!b&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Qm(t,a,e);else if(t.tag===19)Qm(t,a,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(o){case"forwards":for(a=e.child,o=null;a!==null;)t=a.alternate,t!==null&&Ul(t)===null&&(o=a),a=a.sibling;a=o,a===null?(o=e.child,e.child=null):(o=a.sibling,a.sibling=null),Pu(e,!1,o,a,c,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&Ul(t)===null){e.child=o;break}t=o.sibling,o.sibling=a,a=o,o=t}Pu(e,!0,a,null,c,s);break;case"together":Pu(e,!1,null,null,void 0,s);break;default:e.memoizedState=null}return e.child}function Cn(t,e,a){if(t!==null&&(e.dependencies=t.dependencies),Wn|=e.lanes,(a&e.childLanes)===0)if(t!==null){if(ri(t,e,a,!1),(a&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(r(153));if(e.child!==null){for(t=e.child,a=xn(t,t.pendingProps),e.child=a,a.return=e;t.sibling!==null;)t=t.sibling,a=a.sibling=xn(t,t.pendingProps),a.return=e;a.sibling=null}return e.child}function Xu(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Nl(t)))}function Fb(t,e,a){switch(e.tag){case 3:fe(e,e.stateNode.containerInfo),Pn(e,Zt,t.memoizedState.cache),Ca();break;case 27:case 5:Yi(e);break;case 4:fe(e,e.stateNode.containerInfo);break;case 10:Pn(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,yu(e),null;break;case 13:var s=e.memoizedState;if(s!==null)return s.dehydrated!==null?(Zn(e),e.flags|=128,null):(a&e.child.childLanes)!==0?Km(t,e,a):(Zn(e),t=Cn(t,e,a),t!==null?t.sibling:null);Zn(e);break;case 19:var o=(t.flags&128)!==0;if(s=(a&e.childLanes)!==0,s||(ri(t,e,a,!1),s=(a&e.childLanes)!==0),o){if(s)return Zm(t,e,a);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),et(Kt,Kt.current),s)break;return null;case 22:return e.lanes=0,Hm(t,e,a,e.pendingProps);case 24:Pn(e,Zt,t.memoizedState.cache)}return Cn(t,e,a)}function $m(t,e,a){if(t!==null)if(t.memoizedProps!==e.pendingProps)Ft=!0;else{if(!Xu(t,a)&&(e.flags&128)===0)return Ft=!1,Fb(t,e,a);Ft=(t.flags&131072)!==0}else Ft=!1,St&&(e.flags&1048576)!==0&&Rh(e,as,e.index);switch(e.lanes=0,e.tag){case 16:t:{var s=e.pendingProps;if(t=Na(e.elementType),e.type=t,typeof t=="function")Fo(t)?(s=Oa(t,s),e.tag=1,e=Pm(null,e,t,s,a)):(e.tag=0,e=Vu(null,e,t,s,a));else{if(t!=null){var o=t.$$typeof;if(o===M){e.tag=11,e=Um(null,e,t,s,a);break t}else if(o===V){e.tag=14,e=Vm(null,e,t,s,a);break t}}throw e=pt(t)||t,Error(r(306,e,""))}}return e;case 0:return Vu(t,e,e.type,e.pendingProps,a);case 1:return s=e.type,o=Oa(s,e.pendingProps),Pm(t,e,s,o,a);case 3:t:{if(fe(e,e.stateNode.containerInfo),t===null)throw Error(r(387));s=e.pendingProps;var c=e.memoizedState;o=c.element,fu(t,e),fs(e,s,null,a);var y=e.memoizedState;if(s=y.cache,Pn(e,Zt,s),s!==c.cache&&su(e,[Zt],a,!0),cs(),s=y.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:y.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=Xm(t,e,s,a);break t}else if(s!==o){o=Ve(Error(r(424)),e),is(o),e=Xm(t,e,s,a);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Vt=qe(t.firstChild),ie=e,St=!0,Yn=null,Ge=!0,a=Hh(e,null,s,a),e.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ca(),s===o){e=Cn(t,e,a);break t}le(t,e,s,a)}e=e.child}return e;case 26:return Zl(t,e),t===null?(a=ly(e.type,null,e.pendingProps,null))?e.memoizedState=a:St||(a=e.type,t=e.pendingProps,s=fr(yt.current).createElement(a),s[ae]=e,s[ye]=t,re(s,a,t),ee(s),e.stateNode=s):e.memoizedState=ly(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Yi(e),t===null&&St&&(s=e.stateNode=ay(e.type,e.pendingProps,yt.current),ie=e,Ge=!0,o=Vt,aa(e.type)?(Ac=o,Vt=qe(s.firstChild)):Vt=o),le(t,e,e.pendingProps.children,a),Zl(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&St&&((o=s=Vt)&&(s=w1(s,e.type,e.pendingProps,Ge),s!==null?(e.stateNode=s,ie=e,Vt=qe(s.firstChild),Ge=!1,o=!0):o=!1),o||qn(e)),Yi(e),o=e.type,c=e.pendingProps,y=t!==null?t.memoizedProps:null,s=c.children,xc(o,c)?s=null:y!==null&&xc(o,y)&&(e.flags|=32),e.memoizedState!==null&&(o=vu(t,e,Gb,null,null,a),Ds._currentValue=o),Zl(t,e),le(t,e,s,a),e.child;case 6:return t===null&&St&&((t=a=Vt)&&(a=R1(a,e.pendingProps,Ge),a!==null?(e.stateNode=a,ie=e,Vt=null,t=!0):t=!1),t||qn(e)),null;case 13:return Km(t,e,a);case 4:return fe(e,e.stateNode.containerInfo),s=e.pendingProps,t===null?e.child=Da(e,null,s,a):le(t,e,s,a),e.child;case 11:return Um(t,e,e.type,e.pendingProps,a);case 7:return le(t,e,e.pendingProps,a),e.child;case 8:return le(t,e,e.pendingProps.children,a),e.child;case 12:return le(t,e,e.pendingProps.children,a),e.child;case 10:return s=e.pendingProps,Pn(e,e.type,s.value),le(t,e,s.children,a),e.child;case 9:return o=e.type._context,s=e.pendingProps.children,Ra(e),o=se(o),s=s(o),e.flags|=1,le(t,e,s,a),e.child;case 14:return Vm(t,e,e.type,e.pendingProps,a);case 15:return Bm(t,e,e.type,e.pendingProps,a);case 19:return Zm(t,e,a);case 31:return $b(t,e,a);case 22:return Hm(t,e,a,e.pendingProps);case 24:return Ra(e),s=se(Zt),t===null?(o=ou(),o===null&&(o=zt,c=lu(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=a),o=c),e.memoizedState={parent:s,cache:o},cu(e),Pn(e,Zt,o)):((t.lanes&a)!==0&&(fu(t,e),fs(e,null,null,a),cs()),o=t.memoizedState,c=e.memoizedState,o.parent!==s?(o={parent:s,cache:s},e.memoizedState=o,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=o),Pn(e,Zt,s)):(s=c.cache,Pn(e,Zt,s),s!==o.cache&&su(e,[Zt],a,!0))),le(t,e,e.pendingProps.children,a),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function wn(t){t.flags|=4}function Ku(t,e,a,s,o){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(o&335544128)===o)if(t.stateNode.complete)t.flags|=8192;else if(Tp())t.flags|=8192;else throw ja=Ol,uu}else t.flags&=-16777217}function Fm(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!fy(e))if(Tp())t.flags|=8192;else throw ja=Ol,uu}function Fl(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Nd():536870912,t.lanes|=e,xi|=e)}function gs(t,e){if(!St)switch(t.tailMode){case"hidden":e=t.tail;for(var a=null;e!==null;)e.alternate!==null&&(a=e),e=e.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function Bt(t){var e=t.alternate!==null&&t.alternate.child===t.child,a=0,s=0;if(e)for(var o=t.child;o!==null;)a|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)a|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=s,t.childLanes=a,e}function Jb(t,e,a){var s=e.pendingProps;switch(tu(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(e),null;case 1:return Bt(e),null;case 3:return a=e.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),e.memoizedState.cache!==s&&(e.flags|=2048),Tn(Zt),Xt(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(li(e)?wn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,nu())),Bt(e),null;case 26:var o=e.type,c=e.memoizedState;return t===null?(wn(e),c!==null?(Bt(e),Fm(e,c)):(Bt(e),Ku(e,o,null,s,a))):c?c!==t.memoizedState?(wn(e),Bt(e),Fm(e,c)):(Bt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==s&&wn(e),Bt(e),Ku(e,o,t,s,a)),null;case 27:if(rl(e),a=yt.current,o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&wn(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return Bt(e),null}t=it.current,li(e)?Nh(e):(t=ay(o,s,a),e.stateNode=t,wn(e))}return Bt(e),null;case 5:if(rl(e),o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&wn(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return Bt(e),null}if(c=it.current,li(e))Nh(e);else{var y=fr(yt.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?y.createElement(o,{is:s.is}):y.createElement(o)}}c[ae]=e,c[ye]=s;t:for(y=e.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===e)break t;for(;y.sibling===null;){if(y.return===null||y.return===e)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}e.stateNode=c;t:switch(re(c,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break t;case"img":s=!0;break t;default:s=!1}s&&wn(e)}}return Bt(e),Ku(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,a),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==s&&wn(e);else{if(typeof s!="string"&&e.stateNode===null)throw Error(r(166));if(t=yt.current,li(e)){if(t=e.stateNode,a=e.memoizedProps,s=null,o=ie,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}t[ae]=e,t=!!(t.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||Kp(t.nodeValue,a)),t||qn(e,!0)}else t=fr(t).createTextNode(s),t[ae]=e,e.stateNode=t}return Bt(e),null;case 31:if(a=e.memoizedState,t===null||t.memoizedState!==null){if(s=li(e),a!==null){if(t===null){if(!s)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[ae]=e}else Ca(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Bt(e),t=!1}else a=nu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return e.flags&256?(Ne(e),e):(Ne(e),null);if((e.flags&128)!==0)throw Error(r(558))}return Bt(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(o=li(e),s!==null&&s.dehydrated!==null){if(t===null){if(!o)throw Error(r(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[ae]=e}else Ca(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Bt(e),o=!1}else o=nu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),o=!0;if(!o)return e.flags&256?(Ne(e),e):(Ne(e),null)}return Ne(e),(e.flags&128)!==0?(e.lanes=a,e):(a=s!==null,t=t!==null&&t.memoizedState!==null,a&&(s=e.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==o&&(s.flags|=2048)),a!==t&&a&&(e.child.flags|=8192),Fl(e,e.updateQueue),Bt(e),null);case 4:return Xt(),t===null&&mc(e.stateNode.containerInfo),Bt(e),null;case 10:return Tn(e.type),Bt(e),null;case 19:if(K(Kt),s=e.memoizedState,s===null)return Bt(e),null;if(o=(e.flags&128)!==0,c=s.rendering,c===null)if(o)gs(s,!1);else{if(qt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=Ul(t),c!==null){for(e.flags|=128,gs(s,!1),t=c.updateQueue,e.updateQueue=t,Fl(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)Ah(a,t),a=a.sibling;return et(Kt,Kt.current&1|2),St&&bn(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&Ee()>er&&(e.flags|=128,o=!0,gs(s,!1),e.lanes=4194304)}else{if(!o)if(t=Ul(c),t!==null){if(e.flags|=128,o=!0,t=t.updateQueue,e.updateQueue=t,Fl(e,t),gs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!St)return Bt(e),null}else 2*Ee()-s.renderingStartTime>er&&a!==536870912&&(e.flags|=128,o=!0,gs(s,!1),e.lanes=4194304);s.isBackwards?(c.sibling=e.child,e.child=c):(t=s.last,t!==null?t.sibling=c:e.child=c,s.last=c)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ee(),t.sibling=null,a=Kt.current,et(Kt,o?a&1|2:a&1),St&&bn(e,s.treeForkCount),t):(Bt(e),null);case 22:case 23:return Ne(e),pu(),s=e.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(e.flags|=8192):s&&(e.flags|=8192),s?(a&536870912)!==0&&(e.flags&128)===0&&(Bt(e),e.subtreeFlags&6&&(e.flags|=8192)):Bt(e),a=e.updateQueue,a!==null&&Fl(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),s=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),s!==a&&(e.flags|=2048),t!==null&&K(_a),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Tn(Zt),Bt(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function Wb(t,e){switch(tu(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Tn(Zt),Xt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return rl(e),null;case 31:if(e.memoizedState!==null){if(Ne(e),e.alternate===null)throw Error(r(340));Ca()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Ne(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));Ca()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return K(Kt),null;case 4:return Xt(),null;case 10:return Tn(e.type),null;case 22:case 23:return Ne(e),pu(),t!==null&&K(_a),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Tn(Zt),null;case 25:return null;default:return null}}function Jm(t,e){switch(tu(e),e.tag){case 3:Tn(Zt),Xt();break;case 26:case 27:case 5:rl(e);break;case 4:Xt();break;case 31:e.memoizedState!==null&&Ne(e);break;case 13:Ne(e);break;case 19:K(Kt);break;case 10:Tn(e.type);break;case 22:case 23:Ne(e),pu(),t!==null&&K(_a);break;case 24:Tn(Zt)}}function vs(t,e){try{var a=e.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var o=s.next;a=o;do{if((a.tag&t)===t){s=void 0;var c=a.create,y=a.inst;s=c(),y.destroy=s}a=a.next}while(a!==o)}}catch(b){jt(e,e.return,b)}}function Fn(t,e,a){try{var s=e.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&t)===t){var y=s.inst,b=y.destroy;if(b!==void 0){y.destroy=void 0,o=e;var C=a,U=b;try{U()}catch(Y){jt(o,C,Y)}}}s=s.next}while(s!==c)}}catch(Y){jt(e,e.return,Y)}}function Wm(t){var e=t.updateQueue;if(e!==null){var a=t.stateNode;try{Yh(e,a)}catch(s){jt(t,t.return,s)}}}function Im(t,e,a){a.props=Oa(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(s){jt(t,e,s)}}function xs(t,e){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof a=="function"?t.refCleanup=a(s):a.current=s}}catch(o){jt(t,e,o)}}function un(t,e){var a=t.ref,s=t.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(o){jt(t,e,o)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){jt(t,e,o)}else a.current=null}function tp(t){var e=t.type,a=t.memoizedProps,s=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break t;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(o){jt(t,t.return,o)}}function Qu(t,e,a){try{var s=t.stateNode;b1(s,t.type,a,e),s[ye]=e}catch(o){jt(t,t.return,o)}}function ep(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&aa(t.type)||t.tag===4}function Zu(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||ep(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&aa(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function $u(t,e,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,e):(e=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,e.appendChild(t),a=a._reactRootContainer,a!=null||e.onclick!==null||(e.onclick=gn));else if(s!==4&&(s===27&&aa(t.type)&&(a=t.stateNode,e=null),t=t.child,t!==null))for($u(t,e,a),t=t.sibling;t!==null;)$u(t,e,a),t=t.sibling}function Jl(t,e,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?a.insertBefore(t,e):a.appendChild(t);else if(s!==4&&(s===27&&aa(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Jl(t,e,a),t=t.sibling;t!==null;)Jl(t,e,a),t=t.sibling}function np(t){var e=t.stateNode,a=t.memoizedProps;try{for(var s=t.type,o=e.attributes;o.length;)e.removeAttributeNode(o[0]);re(e,s,a),e[ae]=t,e[ye]=a}catch(c){jt(t,t.return,c)}}var Rn=!1,Jt=!1,Fu=!1,ap=typeof WeakSet=="function"?WeakSet:Set,ne=null;function Ib(t,e){if(t=t.containerInfo,gc=vr,t=ph(t),qo(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else t:{a=(a=t.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break t}var y=0,b=-1,C=-1,U=0,Y=0,X=t,B=null;e:for(;;){for(var G;X!==a||o!==0&&X.nodeType!==3||(b=y+o),X!==c||s!==0&&X.nodeType!==3||(C=y+s),X.nodeType===3&&(y+=X.nodeValue.length),(G=X.firstChild)!==null;)B=X,X=G;for(;;){if(X===t)break e;if(B===a&&++U===o&&(b=y),B===c&&++Y===s&&(C=y),(G=X.nextSibling)!==null)break;X=B,B=X.parentNode}X=G}a=b===-1||C===-1?null:{start:b,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(vc={focusedElem:t,selectionRange:a},vr=!1,ne=e;ne!==null;)if(e=ne,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ne=t;else for(;ne!==null;){switch(e=ne,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)o=t[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,a=e,o=c.memoizedProps,c=c.memoizedState,s=a.stateNode;try{var nt=Oa(a.type,o);t=s.getSnapshotBeforeUpdate(nt,c),s.__reactInternalSnapshotBeforeUpdate=t}catch(ot){jt(a,a.return,ot)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,a=t.nodeType,a===9)Sc(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Sc(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=e.sibling,t!==null){t.return=e.return,ne=t;break}ne=e.return}}function ip(t,e,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Nn(t,a),s&4&&vs(5,a);break;case 1:if(Nn(t,a),s&4)if(t=a.stateNode,e===null)try{t.componentDidMount()}catch(y){jt(a,a.return,y)}else{var o=Oa(a.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(o,e,t.__reactInternalSnapshotBeforeUpdate)}catch(y){jt(a,a.return,y)}}s&64&&Wm(a),s&512&&xs(a,a.return);break;case 3:if(Nn(t,a),s&64&&(t=a.updateQueue,t!==null)){if(e=null,a.child!==null)switch(a.child.tag){case 27:case 5:e=a.child.stateNode;break;case 1:e=a.child.stateNode}try{Yh(t,e)}catch(y){jt(a,a.return,y)}}break;case 27:e===null&&s&4&&np(a);case 26:case 5:Nn(t,a),e===null&&s&4&&tp(a),s&512&&xs(a,a.return);break;case 12:Nn(t,a);break;case 31:Nn(t,a),s&4&&rp(t,a);break;case 13:Nn(t,a),s&4&&op(t,a),s&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=o1.bind(null,a),_1(t,a))));break;case 22:if(s=a.memoizedState!==null||Rn,!s){e=e!==null&&e.memoizedState!==null||Jt,o=Rn;var c=Jt;Rn=s,(Jt=e)&&!c?jn(t,a,(a.subtreeFlags&8772)!==0):Nn(t,a),Rn=o,Jt=c}break;case 30:break;default:Nn(t,a)}}function sp(t){var e=t.alternate;e!==null&&(t.alternate=null,sp(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&wo(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Ht=null,ve=!1;function _n(t,e,a){for(a=a.child;a!==null;)lp(t,e,a),a=a.sibling}function lp(t,e,a){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(qi,a)}catch{}switch(a.tag){case 26:Jt||un(a,e),_n(t,e,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Jt||un(a,e);var s=Ht,o=ve;aa(a.type)&&(Ht=a.stateNode,ve=!1),_n(t,e,a),_s(a.stateNode),Ht=s,ve=o;break;case 5:Jt||un(a,e);case 6:if(s=Ht,o=ve,Ht=null,_n(t,e,a),Ht=s,ve=o,Ht!==null)if(ve)try{(Ht.nodeType===9?Ht.body:Ht.nodeName==="HTML"?Ht.ownerDocument.body:Ht).removeChild(a.stateNode)}catch(c){jt(a,e,c)}else try{Ht.removeChild(a.stateNode)}catch(c){jt(a,e,c)}break;case 18:Ht!==null&&(ve?(t=Ht,Wp(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Ri(t)):Wp(Ht,a.stateNode));break;case 4:s=Ht,o=ve,Ht=a.stateNode.containerInfo,ve=!0,_n(t,e,a),Ht=s,ve=o;break;case 0:case 11:case 14:case 15:Fn(2,a,e),Jt||Fn(4,a,e),_n(t,e,a);break;case 1:Jt||(un(a,e),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Im(a,e,s)),_n(t,e,a);break;case 21:_n(t,e,a);break;case 22:Jt=(s=Jt)||a.memoizedState!==null,_n(t,e,a),Jt=s;break;default:_n(t,e,a)}}function rp(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ri(t)}catch(a){jt(e,e.return,a)}}}function op(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ri(t)}catch(a){jt(e,e.return,a)}}function t1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new ap),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new ap),e;default:throw Error(r(435,t.tag))}}function Wl(t,e){var a=t1(t);e.forEach(function(s){if(!a.has(s)){a.add(s);var o=u1.bind(null,t,s);s.then(o,o)}})}function xe(t,e){var a=e.deletions;if(a!==null)for(var s=0;s<a.length;s++){var o=a[s],c=t,y=e,b=y;t:for(;b!==null;){switch(b.tag){case 27:if(aa(b.type)){Ht=b.stateNode,ve=!1;break t}break;case 5:Ht=b.stateNode,ve=!1;break t;case 3:case 4:Ht=b.stateNode.containerInfo,ve=!0;break t}b=b.return}if(Ht===null)throw Error(r(160));lp(c,y,o),Ht=null,ve=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)up(e,t),e=e.sibling}var Ze=null;function up(t,e){var a=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:xe(e,t),be(t),s&4&&(Fn(3,t,t.return),vs(3,t),Fn(5,t,t.return));break;case 1:xe(e,t),be(t),s&512&&(Jt||a===null||un(a,a.return)),s&64&&Rn&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var o=Ze;if(xe(e,t),be(t),s&512&&(Jt||a===null||un(a,a.return)),s&4){var c=a!==null?a.memoizedState:null;if(s=t.memoizedState,a===null)if(s===null)if(t.stateNode===null){t:{s=t.type,a=t.memoizedProps,o=o.ownerDocument||o;e:switch(s){case"title":c=o.getElementsByTagName("title")[0],(!c||c[Ki]||c[ae]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(s),o.head.insertBefore(c,o.querySelector("head > title"))),re(c,s,a),c[ae]=t,ee(c),s=c;break t;case"link":var y=uy("link","href",o).get(s+(a.href||""));if(y){for(var b=0;b<y.length;b++)if(c=y[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(b,1);break e}}c=o.createElement(s),re(c,s,a),o.head.appendChild(c);break;case"meta":if(y=uy("meta","content",o).get(s+(a.content||""))){for(b=0;b<y.length;b++)if(c=y[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(b,1);break e}}c=o.createElement(s),re(c,s,a),o.head.appendChild(c);break;default:throw Error(r(468,s))}c[ae]=t,ee(c),s=c}t.stateNode=s}else cy(o,t.type,t.stateNode);else t.stateNode=oy(o,s,t.memoizedProps);else c!==s?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,s===null?cy(o,t.type,t.stateNode):oy(o,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Qu(t,t.memoizedProps,a.memoizedProps)}break;case 27:xe(e,t),be(t),s&512&&(Jt||a===null||un(a,a.return)),a!==null&&s&4&&Qu(t,t.memoizedProps,a.memoizedProps);break;case 5:if(xe(e,t),be(t),s&512&&(Jt||a===null||un(a,a.return)),t.flags&32){o=t.stateNode;try{Fa(o,"")}catch(nt){jt(t,t.return,nt)}}s&4&&t.stateNode!=null&&(o=t.memoizedProps,Qu(t,o,a!==null?a.memoizedProps:o)),s&1024&&(Fu=!0);break;case 6:if(xe(e,t),be(t),s&4){if(t.stateNode===null)throw Error(r(162));s=t.memoizedProps,a=t.stateNode;try{a.nodeValue=s}catch(nt){jt(t,t.return,nt)}}break;case 3:if(mr=null,o=Ze,Ze=dr(e.containerInfo),xe(e,t),Ze=o,be(t),s&4&&a!==null&&a.memoizedState.isDehydrated)try{Ri(e.containerInfo)}catch(nt){jt(t,t.return,nt)}Fu&&(Fu=!1,cp(t));break;case 4:s=Ze,Ze=dr(t.stateNode.containerInfo),xe(e,t),be(t),Ze=s;break;case 12:xe(e,t),be(t);break;case 31:xe(e,t),be(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 13:xe(e,t),be(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(tr=Ee()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 22:o=t.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,U=Rn,Y=Jt;if(Rn=U||o,Jt=Y||C,xe(e,t),Jt=Y,Rn=U,be(t),s&8192)t:for(e=t.stateNode,e._visibility=o?e._visibility&-2:e._visibility|1,o&&(a===null||C||Rn||Jt||za(t)),a=null,e=t;;){if(e.tag===5||e.tag===26){if(a===null){C=a=e;try{if(c=C.stateNode,o)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{b=C.stateNode;var X=C.memoizedProps.style,B=X!=null&&X.hasOwnProperty("display")?X.display:null;b.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(nt){jt(C,C.return,nt)}}}else if(e.tag===6){if(a===null){C=e;try{C.stateNode.nodeValue=o?"":C.memoizedProps}catch(nt){jt(C,C.return,nt)}}}else if(e.tag===18){if(a===null){C=e;try{var G=C.stateNode;o?Ip(G,!0):Ip(C.stateNode,!1)}catch(nt){jt(C,C.return,nt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;a===e&&(a=null),e=e.return}a===e&&(a=null),e.sibling.return=e.return,e=e.sibling}s&4&&(s=t.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Wl(t,a))));break;case 19:xe(e,t),be(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 30:break;case 21:break;default:xe(e,t),be(t)}}function be(t){var e=t.flags;if(e&2){try{for(var a,s=t.return;s!==null;){if(ep(s)){a=s;break}s=s.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,c=Zu(t);Jl(t,c,o);break;case 5:var y=a.stateNode;a.flags&32&&(Fa(y,""),a.flags&=-33);var b=Zu(t);Jl(t,b,y);break;case 3:case 4:var C=a.stateNode.containerInfo,U=Zu(t);$u(t,U,C);break;default:throw Error(r(161))}}catch(Y){jt(t,t.return,Y)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function cp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;cp(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Nn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)ip(t,e.alternate,e),e=e.sibling}function za(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Fn(4,e,e.return),za(e);break;case 1:un(e,e.return);var a=e.stateNode;typeof a.componentWillUnmount=="function"&&Im(e,e.return,a),za(e);break;case 27:_s(e.stateNode);case 26:case 5:un(e,e.return),za(e);break;case 22:e.memoizedState===null&&za(e);break;case 30:za(e);break;default:za(e)}t=t.sibling}}function jn(t,e,a){for(a=a&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var s=e.alternate,o=t,c=e,y=c.flags;switch(c.tag){case 0:case 11:case 15:jn(o,c,a),vs(4,c);break;case 1:if(jn(o,c,a),s=c,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(U){jt(s,s.return,U)}if(s=c,o=s.updateQueue,o!==null){var b=s.stateNode;try{var C=o.shared.hiddenCallbacks;if(C!==null)for(o.shared.hiddenCallbacks=null,o=0;o<C.length;o++)Gh(C[o],b)}catch(U){jt(s,s.return,U)}}a&&y&64&&Wm(c),xs(c,c.return);break;case 27:np(c);case 26:case 5:jn(o,c,a),a&&s===null&&y&4&&tp(c),xs(c,c.return);break;case 12:jn(o,c,a);break;case 31:jn(o,c,a),a&&y&4&&rp(o,c);break;case 13:jn(o,c,a),a&&y&4&&op(o,c);break;case 22:c.memoizedState===null&&jn(o,c,a),xs(c,c.return);break;case 30:break;default:jn(o,c,a)}e=e.sibling}}function Ju(t,e){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&ss(a))}function Wu(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ss(t))}function $e(t,e,a,s){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fp(t,e,a,s),e=e.sibling}function fp(t,e,a,s){var o=e.flags;switch(e.tag){case 0:case 11:case 15:$e(t,e,a,s),o&2048&&vs(9,e);break;case 1:$e(t,e,a,s);break;case 3:$e(t,e,a,s),o&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ss(t)));break;case 12:if(o&2048){$e(t,e,a,s),t=e.stateNode;try{var c=e.memoizedProps,y=c.id,b=c.onPostCommit;typeof b=="function"&&b(y,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(C){jt(e,e.return,C)}}else $e(t,e,a,s);break;case 31:$e(t,e,a,s);break;case 13:$e(t,e,a,s);break;case 23:break;case 22:c=e.stateNode,y=e.alternate,e.memoizedState!==null?c._visibility&2?$e(t,e,a,s):bs(t,e):c._visibility&2?$e(t,e,a,s):(c._visibility|=2,yi(t,e,a,s,(e.subtreeFlags&10256)!==0||!1)),o&2048&&Ju(y,e);break;case 24:$e(t,e,a,s),o&2048&&Wu(e.alternate,e);break;default:$e(t,e,a,s)}}function yi(t,e,a,s,o){for(o=o&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,y=e,b=a,C=s,U=y.flags;switch(y.tag){case 0:case 11:case 15:yi(c,y,b,C,o),vs(8,y);break;case 23:break;case 22:var Y=y.stateNode;y.memoizedState!==null?Y._visibility&2?yi(c,y,b,C,o):bs(c,y):(Y._visibility|=2,yi(c,y,b,C,o)),o&&U&2048&&Ju(y.alternate,y);break;case 24:yi(c,y,b,C,o),o&&U&2048&&Wu(y.alternate,y);break;default:yi(c,y,b,C,o)}e=e.sibling}}function bs(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var a=t,s=e,o=s.flags;switch(s.tag){case 22:bs(a,s),o&2048&&Ju(s.alternate,s);break;case 24:bs(a,s),o&2048&&Wu(s.alternate,s);break;default:bs(a,s)}e=e.sibling}}var Ss=8192;function gi(t,e,a){if(t.subtreeFlags&Ss)for(t=t.child;t!==null;)dp(t,e,a),t=t.sibling}function dp(t,e,a){switch(t.tag){case 26:gi(t,e,a),t.flags&Ss&&t.memoizedState!==null&&H1(a,Ze,t.memoizedState,t.memoizedProps);break;case 5:gi(t,e,a);break;case 3:case 4:var s=Ze;Ze=dr(t.stateNode.containerInfo),gi(t,e,a),Ze=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Ss,Ss=16777216,gi(t,e,a),Ss=s):gi(t,e,a));break;default:gi(t,e,a)}}function hp(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Ts(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var s=e[a];ne=s,pp(s,t)}hp(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)mp(t),t=t.sibling}function mp(t){switch(t.tag){case 0:case 11:case 15:Ts(t),t.flags&2048&&Fn(9,t,t.return);break;case 3:Ts(t);break;case 12:Ts(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Il(t)):Ts(t);break;default:Ts(t)}}function Il(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var s=e[a];ne=s,pp(s,t)}hp(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Fn(8,e,e.return),Il(e);break;case 22:a=e.stateNode,a._visibility&2&&(a._visibility&=-3,Il(e));break;default:Il(e)}t=t.sibling}}function pp(t,e){for(;ne!==null;){var a=ne;switch(a.tag){case 0:case 11:case 15:Fn(8,a,e);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:ss(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,ne=s;else t:for(a=t;ne!==null;){s=ne;var o=s.sibling,c=s.return;if(sp(s),s===a){ne=null;break t}if(o!==null){o.return=c,ne=o;break t}ne=c}}}var e1={getCacheForType:function(t){var e=se(Zt),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a},cacheSignal:function(){return se(Zt).controller.signal}},n1=typeof WeakMap=="function"?WeakMap:Map,Ct=0,zt=null,gt=null,xt=0,Nt=0,je=null,Jn=!1,vi=!1,Iu=!1,Dn=0,qt=0,Wn=0,La=0,tc=0,De=0,xi=0,Es=null,Se=null,ec=!1,tr=0,yp=0,er=1/0,nr=null,In=null,It=0,ta=null,bi=null,Mn=0,nc=0,ac=null,gp=null,As=0,ic=null;function Me(){return(Ct&2)!==0&&xt!==0?xt&-xt:L.T!==null?cc():Od()}function vp(){if(De===0)if((xt&536870912)===0||St){var t=cl;cl<<=1,(cl&3932160)===0&&(cl=262144),De=t}else De=536870912;return t=_e.current,t!==null&&(t.flags|=32),De}function Te(t,e,a){(t===zt&&(Nt===2||Nt===9)||t.cancelPendingCommit!==null)&&(Si(t,0),ea(t,xt,De,!1)),Xi(t,a),((Ct&2)===0||t!==zt)&&(t===zt&&((Ct&2)===0&&(La|=a),qt===4&&ea(t,xt,De,!1)),cn(t))}function xp(t,e,a){if((Ct&6)!==0)throw Error(r(327));var s=!a&&(e&127)===0&&(e&t.expiredLanes)===0||Pi(t,e),o=s?s1(t,e):lc(t,e,!0),c=s;do{if(o===0){vi&&!s&&ea(t,e,0,!1);break}else{if(a=t.current.alternate,c&&!a1(a)){o=lc(t,e,!1),c=!1;continue}if(o===2){if(c=e,t.errorRecoveryDisabledLanes&c)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){e=y;t:{var b=t;o=Es;var C=b.current.memoizedState.isDehydrated;if(C&&(Si(b,y).flags|=256),y=lc(b,y,!1),y!==2){if(Iu&&!C){b.errorRecoveryDisabledLanes|=c,La|=c,o=4;break t}c=Se,Se=o,c!==null&&(Se===null?Se=c:Se.push.apply(Se,c))}o=y}if(c=!1,o!==2)continue}}if(o===1){Si(t,0),ea(t,e,0,!0);break}t:{switch(s=t,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((e&4194048)!==e)break;case 6:ea(s,e,De,!Jn);break t;case 2:Se=null;break;case 3:case 5:break;default:throw Error(r(329))}if((e&62914560)===e&&(o=tr+300-Ee(),10<o)){if(ea(s,e,De,!Jn),dl(s,0,!0)!==0)break t;Mn=e,s.timeoutHandle=Fp(bp.bind(null,s,a,Se,nr,ec,e,De,La,xi,Jn,c,"Throttled",-0,0),o);break t}bp(s,a,Se,nr,ec,e,De,La,xi,Jn,c,null,-0,0)}}break}while(!0);cn(t)}function bp(t,e,a,s,o,c,y,b,C,U,Y,X,B,G){if(t.timeoutHandle=-1,X=e.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},dp(e,c,X);var nt=(c&62914560)===c?tr-Ee():(c&4194048)===c?yp-Ee():0;if(nt=G1(X,nt),nt!==null){Mn=c,t.cancelPendingCommit=nt(_p.bind(null,t,e,c,a,s,o,y,b,C,Y,X,null,B,G)),ea(t,c,y,!U);return}}_p(t,e,c,a,s,o,y,b,C)}function a1(t){for(var e=t;;){var a=e.tag;if((a===0||a===11||a===15)&&e.flags&16384&&(a=e.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var o=a[s],c=o.getSnapshot;o=o.value;try{if(!we(c(),o))return!1}catch{return!1}}if(a=e.child,e.subtreeFlags&16384&&a!==null)a.return=e,e=a;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ea(t,e,a,s){e&=~tc,e&=~La,t.suspendedLanes|=e,t.pingedLanes&=~e,s&&(t.warmLanes|=e),s=t.expirationTimes;for(var o=e;0<o;){var c=31-Ce(o),y=1<<c;s[c]=-1,o&=~y}a!==0&&jd(t,a,e)}function ar(){return(Ct&6)===0?(Cs(0),!1):!0}function sc(){if(gt!==null){if(Nt===0)var t=gt.return;else t=gt,Sn=wa=null,Su(t),fi=null,rs=0,t=gt;for(;t!==null;)Jm(t.alternate,t),t=t.return;gt=null}}function Si(t,e){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,E1(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Mn=0,sc(),zt=t,gt=a=xn(t.current,null),xt=e,Nt=0,je=null,Jn=!1,vi=Pi(t,e),Iu=!1,xi=De=tc=La=Wn=qt=0,Se=Es=null,ec=!1,(e&8)!==0&&(e|=e&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=e;0<s;){var o=31-Ce(s),c=1<<o;e|=t[o],s&=~c}return Dn=e,Al(),a}function Sp(t,e){ht=null,L.H=ps,e===ci||e===Ml?(e=Uh(),Nt=3):e===uu?(e=Uh(),Nt=4):Nt=e===Uu?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,je=e,gt===null&&(qt=1,Kl(t,Ve(e,t.current)))}function Tp(){var t=_e.current;return t===null?!0:(xt&4194048)===xt?Ye===null:(xt&62914560)===xt||(xt&536870912)!==0?t===Ye:!1}function Ep(){var t=L.H;return L.H=ps,t===null?ps:t}function Ap(){var t=L.A;return L.A=e1,t}function ir(){qt=4,Jn||(xt&4194048)!==xt&&_e.current!==null||(vi=!0),(Wn&134217727)===0&&(La&134217727)===0||zt===null||ea(zt,xt,De,!1)}function lc(t,e,a){var s=Ct;Ct|=2;var o=Ep(),c=Ap();(zt!==t||xt!==e)&&(nr=null,Si(t,e)),e=!1;var y=qt;t:do try{if(Nt!==0&&gt!==null){var b=gt,C=je;switch(Nt){case 8:sc(),y=6;break t;case 3:case 2:case 9:case 6:_e.current===null&&(e=!0);var U=Nt;if(Nt=0,je=null,Ti(t,b,C,U),a&&vi){y=0;break t}break;default:U=Nt,Nt=0,je=null,Ti(t,b,C,U)}}i1(),y=qt;break}catch(Y){Sp(t,Y)}while(!0);return e&&t.shellSuspendCounter++,Sn=wa=null,Ct=s,L.H=o,L.A=c,gt===null&&(zt=null,xt=0,Al()),y}function i1(){for(;gt!==null;)Cp(gt)}function s1(t,e){var a=Ct;Ct|=2;var s=Ep(),o=Ap();zt!==t||xt!==e?(nr=null,er=Ee()+500,Si(t,e)):vi=Pi(t,e);t:do try{if(Nt!==0&&gt!==null){e=gt;var c=je;e:switch(Nt){case 1:Nt=0,je=null,Ti(t,e,c,1);break;case 2:case 9:if(Lh(c)){Nt=0,je=null,wp(e);break}e=function(){Nt!==2&&Nt!==9||zt!==t||(Nt=7),cn(t)},c.then(e,e);break t;case 3:Nt=7;break t;case 4:Nt=5;break t;case 7:Lh(c)?(Nt=0,je=null,wp(e)):(Nt=0,je=null,Ti(t,e,c,7));break;case 5:var y=null;switch(gt.tag){case 26:y=gt.memoizedState;case 5:case 27:var b=gt;if(y?fy(y):b.stateNode.complete){Nt=0,je=null;var C=b.sibling;if(C!==null)gt=C;else{var U=b.return;U!==null?(gt=U,sr(U)):gt=null}break e}}Nt=0,je=null,Ti(t,e,c,5);break;case 6:Nt=0,je=null,Ti(t,e,c,6);break;case 8:sc(),qt=6;break t;default:throw Error(r(462))}}l1();break}catch(Y){Sp(t,Y)}while(!0);return Sn=wa=null,L.H=s,L.A=o,Ct=a,gt!==null?0:(zt=null,xt=0,Al(),qt)}function l1(){for(;gt!==null&&!Nx();)Cp(gt)}function Cp(t){var e=$m(t.alternate,t,Dn);t.memoizedProps=t.pendingProps,e===null?sr(t):gt=e}function wp(t){var e=t,a=e.alternate;switch(e.tag){case 15:case 0:e=qm(a,e,e.pendingProps,e.type,void 0,xt);break;case 11:e=qm(a,e,e.pendingProps,e.type.render,e.ref,xt);break;case 5:Su(e);default:Jm(a,e),e=gt=Ah(e,Dn),e=$m(a,e,Dn)}t.memoizedProps=t.pendingProps,e===null?sr(t):gt=e}function Ti(t,e,a,s){Sn=wa=null,Su(e),fi=null,rs=0;var o=e.return;try{if(Zb(t,o,e,a,xt)){qt=1,Kl(t,Ve(a,t.current)),gt=null;return}}catch(c){if(o!==null)throw gt=o,c;qt=1,Kl(t,Ve(a,t.current)),gt=null;return}e.flags&32768?(St||s===1?t=!0:vi||(xt&536870912)!==0?t=!1:(Jn=t=!0,(s===2||s===9||s===3||s===6)&&(s=_e.current,s!==null&&s.tag===13&&(s.flags|=16384))),Rp(e,t)):sr(e)}function sr(t){var e=t;do{if((e.flags&32768)!==0){Rp(e,Jn);return}t=e.return;var a=Jb(e.alternate,e,Dn);if(a!==null){gt=a;return}if(e=e.sibling,e!==null){gt=e;return}gt=e=t}while(e!==null);qt===0&&(qt=5)}function Rp(t,e){do{var a=Wb(t.alternate,t);if(a!==null){a.flags&=32767,gt=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!e&&(t=t.sibling,t!==null)){gt=t;return}gt=t=a}while(t!==null);qt=6,gt=null}function _p(t,e,a,s,o,c,y,b,C){t.cancelPendingCommit=null;do lr();while(It!==0);if((Ct&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(c=e.lanes|e.childLanes,c|=Zo,Bx(t,a,c,y,b,C),t===zt&&(gt=zt=null,xt=0),bi=e,ta=t,Mn=a,nc=c,ac=o,gp=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,c1(ol,function(){return Op(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=L.T,L.T=null,o=J.p,J.p=2,y=Ct,Ct|=4;try{Ib(t,e,a)}finally{Ct=y,J.p=o,L.T=s}}It=1,Np(),jp(),Dp()}}function Np(){if(It===1){It=0;var t=ta,e=bi,a=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var s=J.p;J.p=2;var o=Ct;Ct|=4;try{up(e,t);var c=vc,y=ph(t.containerInfo),b=c.focusedElem,C=c.selectionRange;if(y!==b&&b&&b.ownerDocument&&mh(b.ownerDocument.documentElement,b)){if(C!==null&&qo(b)){var U=C.start,Y=C.end;if(Y===void 0&&(Y=U),"selectionStart"in b)b.selectionStart=U,b.selectionEnd=Math.min(Y,b.value.length);else{var X=b.ownerDocument||document,B=X&&X.defaultView||window;if(B.getSelection){var G=B.getSelection(),nt=b.textContent.length,ot=Math.min(C.start,nt),Ot=C.end===void 0?ot:Math.min(C.end,nt);!G.extend&&ot>Ot&&(y=Ot,Ot=ot,ot=y);var z=hh(b,ot),j=hh(b,Ot);if(z&&j&&(G.rangeCount!==1||G.anchorNode!==z.node||G.anchorOffset!==z.offset||G.focusNode!==j.node||G.focusOffset!==j.offset)){var k=X.createRange();k.setStart(z.node,z.offset),G.removeAllRanges(),ot>Ot?(G.addRange(k),G.extend(j.node,j.offset)):(k.setEnd(j.node,j.offset),G.addRange(k))}}}}for(X=[],G=b;G=G.parentNode;)G.nodeType===1&&X.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<X.length;b++){var P=X[b];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}vr=!!gc,vc=gc=null}finally{Ct=o,J.p=s,L.T=a}}t.current=e,It=2}}function jp(){if(It===2){It=0;var t=ta,e=bi,a=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var s=J.p;J.p=2;var o=Ct;Ct|=4;try{ip(t,e.alternate,e)}finally{Ct=o,J.p=s,L.T=a}}It=3}}function Dp(){if(It===4||It===3){It=0,jx();var t=ta,e=bi,a=Mn,s=gp;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?It=5:(It=0,bi=ta=null,Mp(t,t.pendingLanes));var o=t.pendingLanes;if(o===0&&(In=null),Ao(a),e=e.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(qi,e,void 0,(e.current.flags&128)===128)}catch{}if(s!==null){e=L.T,o=J.p,J.p=2,L.T=null;try{for(var c=t.onRecoverableError,y=0;y<s.length;y++){var b=s[y];c(b.value,{componentStack:b.stack})}}finally{L.T=e,J.p=o}}(Mn&3)!==0&&lr(),cn(t),o=t.pendingLanes,(a&261930)!==0&&(o&42)!==0?t===ic?As++:(As=0,ic=t):As=0,Cs(0)}}function Mp(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ss(e)))}function lr(){return Np(),jp(),Dp(),Op()}function Op(){if(It!==5)return!1;var t=ta,e=nc;nc=0;var a=Ao(Mn),s=L.T,o=J.p;try{J.p=32>a?32:a,L.T=null,a=ac,ac=null;var c=ta,y=Mn;if(It=0,bi=ta=null,Mn=0,(Ct&6)!==0)throw Error(r(331));var b=Ct;if(Ct|=4,mp(c.current),fp(c,c.current,y,a),Ct=b,Cs(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(qi,c)}catch{}return!0}finally{J.p=o,L.T=s,Mp(t,e)}}function zp(t,e,a){e=Ve(a,e),e=ku(t.stateNode,e,2),t=Qn(t,e,2),t!==null&&(Xi(t,2),cn(t))}function jt(t,e,a){if(t.tag===3)zp(t,t,a);else for(;e!==null;){if(e.tag===3){zp(e,t,a);break}else if(e.tag===1){var s=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(In===null||!In.has(s))){t=Ve(a,t),a=Lm(2),s=Qn(e,a,2),s!==null&&(km(a,s,e,t),Xi(s,2),cn(s));break}}e=e.return}}function rc(t,e,a){var s=t.pingCache;if(s===null){s=t.pingCache=new n1;var o=new Set;s.set(e,o)}else o=s.get(e),o===void 0&&(o=new Set,s.set(e,o));o.has(a)||(Iu=!0,o.add(a),t=r1.bind(null,t,e,a),e.then(t,t))}function r1(t,e,a){var s=t.pingCache;s!==null&&s.delete(e),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,zt===t&&(xt&a)===a&&(qt===4||qt===3&&(xt&62914560)===xt&&300>Ee()-tr?(Ct&2)===0&&Si(t,0):tc|=a,xi===xt&&(xi=0)),cn(t)}function Lp(t,e){e===0&&(e=Nd()),t=Ea(t,e),t!==null&&(Xi(t,e),cn(t))}function o1(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),Lp(t,a)}function u1(t,e){var a=0;switch(t.tag){case 31:case 13:var s=t.stateNode,o=t.memoizedState;o!==null&&(a=o.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(e),Lp(t,a)}function c1(t,e){return bo(t,e)}var rr=null,Ei=null,oc=!1,or=!1,uc=!1,na=0;function cn(t){t!==Ei&&t.next===null&&(Ei===null?rr=Ei=t:Ei=Ei.next=t),or=!0,oc||(oc=!0,d1())}function Cs(t,e){if(!uc&&or){uc=!0;do for(var a=!1,s=rr;s!==null;){if(t!==0){var o=s.pendingLanes;if(o===0)var c=0;else{var y=s.suspendedLanes,b=s.pingedLanes;c=(1<<31-Ce(42|t)+1)-1,c&=o&~(y&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Bp(s,c))}else c=xt,c=dl(s,s===zt?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||Pi(s,c)||(a=!0,Bp(s,c));s=s.next}while(a);uc=!1}}function f1(){kp()}function kp(){or=oc=!1;var t=0;na!==0&&T1()&&(t=na);for(var e=Ee(),a=null,s=rr;s!==null;){var o=s.next,c=Up(s,e);c===0?(s.next=null,a===null?rr=o:a.next=o,o===null&&(Ei=a)):(a=s,(t!==0||(c&3)!==0)&&(or=!0)),s=o}It!==0&&It!==5||Cs(t),na!==0&&(na=0)}function Up(t,e){for(var a=t.suspendedLanes,s=t.pingedLanes,o=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var y=31-Ce(c),b=1<<y,C=o[y];C===-1?((b&a)===0||(b&s)!==0)&&(o[y]=Vx(b,e)):C<=e&&(t.expiredLanes|=b),c&=~b}if(e=zt,a=xt,a=dl(t,t===e?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,a===0||t===e&&(Nt===2||Nt===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&So(s),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Pi(t,a)){if(e=a&-a,e===t.callbackPriority)return e;switch(s!==null&&So(s),Ao(a)){case 2:case 8:a=Rd;break;case 32:a=ol;break;case 268435456:a=_d;break;default:a=ol}return s=Vp.bind(null,t),a=bo(a,s),t.callbackPriority=e,t.callbackNode=a,e}return s!==null&&s!==null&&So(s),t.callbackPriority=2,t.callbackNode=null,2}function Vp(t,e){if(It!==0&&It!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(lr()&&t.callbackNode!==a)return null;var s=xt;return s=dl(t,t===zt?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(xp(t,s,e),Up(t,Ee()),t.callbackNode!=null&&t.callbackNode===a?Vp.bind(null,t):null)}function Bp(t,e){if(lr())return null;xp(t,e,!0)}function d1(){A1(function(){(Ct&6)!==0?bo(wd,f1):kp()})}function cc(){if(na===0){var t=oi;t===0&&(t=ul,ul<<=1,(ul&261888)===0&&(ul=256)),na=t}return na}function Hp(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:yl(""+t)}function Gp(t,e){var a=e.ownerDocument.createElement("input");return a.name=e.name,a.value=e.value,t.id&&a.setAttribute("form",t.id),e.parentNode.insertBefore(a,e),t=new FormData(t),a.parentNode.removeChild(a),t}function h1(t,e,a,s,o){if(e==="submit"&&a&&a.stateNode===o){var c=Hp((o[ye]||null).action),y=s.submitter;y&&(e=(e=y[ye]||null)?Hp(e.formAction):y.getAttribute("formAction"),e!==null&&(c=e,y=null));var b=new bl("action","action",null,s,o);t.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(na!==0){var C=y?Gp(o,y):new FormData(o);ju(a,{pending:!0,data:C,method:o.method,action:c},null,C)}}else typeof c=="function"&&(b.preventDefault(),C=y?Gp(o,y):new FormData(o),ju(a,{pending:!0,data:C,method:o.method,action:c},c,C))},currentTarget:o}]})}}for(var fc=0;fc<Qo.length;fc++){var dc=Qo[fc],m1=dc.toLowerCase(),p1=dc[0].toUpperCase()+dc.slice(1);Qe(m1,"on"+p1)}Qe(vh,"onAnimationEnd"),Qe(xh,"onAnimationIteration"),Qe(bh,"onAnimationStart"),Qe("dblclick","onDoubleClick"),Qe("focusin","onFocus"),Qe("focusout","onBlur"),Qe(Db,"onTransitionRun"),Qe(Mb,"onTransitionStart"),Qe(Ob,"onTransitionCancel"),Qe(Sh,"onTransitionEnd"),Za("onMouseEnter",["mouseout","mouseover"]),Za("onMouseLeave",["mouseout","mouseover"]),Za("onPointerEnter",["pointerout","pointerover"]),Za("onPointerLeave",["pointerout","pointerover"]),xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ws="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(" "),y1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ws));function Yp(t,e){e=(e&4)!==0;for(var a=0;a<t.length;a++){var s=t[a],o=s.event;s=s.listeners;t:{var c=void 0;if(e)for(var y=s.length-1;0<=y;y--){var b=s[y],C=b.instance,U=b.currentTarget;if(b=b.listener,C!==c&&o.isPropagationStopped())break t;c=b,o.currentTarget=U;try{c(o)}catch(Y){El(Y)}o.currentTarget=null,c=C}else for(y=0;y<s.length;y++){if(b=s[y],C=b.instance,U=b.currentTarget,b=b.listener,C!==c&&o.isPropagationStopped())break t;c=b,o.currentTarget=U;try{c(o)}catch(Y){El(Y)}o.currentTarget=null,c=C}}}}function vt(t,e){var a=e[Co];a===void 0&&(a=e[Co]=new Set);var s=t+"__bubble";a.has(s)||(qp(e,t,2,!1),a.add(s))}function hc(t,e,a){var s=0;e&&(s|=4),qp(a,t,s,e)}var ur="_reactListening"+Math.random().toString(36).slice(2);function mc(t){if(!t[ur]){t[ur]=!0,kd.forEach(function(a){a!=="selectionchange"&&(y1.has(a)||hc(a,!1,t),hc(a,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ur]||(e[ur]=!0,hc("selectionchange",!1,e))}}function qp(t,e,a,s){switch(vy(e)){case 2:var o=P1;break;case 8:o=X1;break;default:o=Nc}a=o.bind(null,e,a,t),o=void 0,!zo||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),s?o!==void 0?t.addEventListener(e,a,{capture:!0,passive:o}):t.addEventListener(e,a,!0):o!==void 0?t.addEventListener(e,a,{passive:o}):t.addEventListener(e,a,!1)}function pc(t,e,a,s,o){var c=s;if((e&1)===0&&(e&2)===0&&s!==null)t:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var b=s.stateNode.containerInfo;if(b===o)break;if(y===4)for(y=s.return;y!==null;){var C=y.tag;if((C===3||C===4)&&y.stateNode.containerInfo===o)return;y=y.return}for(;b!==null;){if(y=Xa(b),y===null)return;if(C=y.tag,C===5||C===6||C===26||C===27){s=c=y;continue t}b=b.parentNode}}s=s.return}Zd(function(){var U=c,Y=Mo(a),X=[];t:{var B=Th.get(t);if(B!==void 0){var G=bl,nt=t;switch(t){case"keypress":if(vl(a)===0)break t;case"keydown":case"keyup":G=ub;break;case"focusin":nt="focus",G=Vo;break;case"focusout":nt="blur",G=Vo;break;case"beforeblur":case"afterblur":G=Vo;break;case"click":if(a.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=Jd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=Jx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=db;break;case vh:case xh:case bh:G=tb;break;case Sh:G=mb;break;case"scroll":case"scrollend":G=$x;break;case"wheel":G=yb;break;case"copy":case"cut":case"paste":G=nb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=Id;break;case"toggle":case"beforetoggle":G=vb}var ot=(e&4)!==0,Ot=!ot&&(t==="scroll"||t==="scrollend"),z=ot?B!==null?B+"Capture":null:B;ot=[];for(var j=U,k;j!==null;){var P=j;if(k=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||k===null||z===null||(P=Zi(j,z),P!=null&&ot.push(Rs(j,P,k))),Ot)break;j=j.return}0<ot.length&&(B=new G(B,nt,null,a,Y),X.push({event:B,listeners:ot}))}}if((e&7)===0){t:{if(B=t==="mouseover"||t==="pointerover",G=t==="mouseout"||t==="pointerout",B&&a!==Do&&(nt=a.relatedTarget||a.fromElement)&&(Xa(nt)||nt[Pa]))break t;if((G||B)&&(B=Y.window===Y?Y:(B=Y.ownerDocument)?B.defaultView||B.parentWindow:window,G?(nt=a.relatedTarget||a.toElement,G=U,nt=nt?Xa(nt):null,nt!==null&&(Ot=d(nt),ot=nt.tag,nt!==Ot||ot!==5&&ot!==27&&ot!==6)&&(nt=null)):(G=null,nt=U),G!==nt)){if(ot=Jd,P="onMouseLeave",z="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(ot=Id,P="onPointerLeave",z="onPointerEnter",j="pointer"),Ot=G==null?B:Qi(G),k=nt==null?B:Qi(nt),B=new ot(P,j+"leave",G,a,Y),B.target=Ot,B.relatedTarget=k,P=null,Xa(Y)===U&&(ot=new ot(z,j+"enter",nt,a,Y),ot.target=k,ot.relatedTarget=Ot,P=ot),Ot=P,G&&nt)e:{for(ot=g1,z=G,j=nt,k=0,P=z;P;P=ot(P))k++;P=0;for(var rt=j;rt;rt=ot(rt))P++;for(;0<k-P;)z=ot(z),k--;for(;0<P-k;)j=ot(j),P--;for(;k--;){if(z===j||j!==null&&z===j.alternate){ot=z;break e}z=ot(z),j=ot(j)}ot=null}else ot=null;G!==null&&Pp(X,B,G,ot,!1),nt!==null&&Ot!==null&&Pp(X,Ot,nt,ot,!0)}}t:{if(B=U?Qi(U):window,G=B.nodeName&&B.nodeName.toLowerCase(),G==="select"||G==="input"&&B.type==="file")var Et=rh;else if(sh(B))if(oh)Et=_b;else{Et=wb;var st=Cb}else G=B.nodeName,!G||G.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?U&&jo(U.elementType)&&(Et=rh):Et=Rb;if(Et&&(Et=Et(t,U))){lh(X,Et,a,Y);break t}st&&st(t,B,U),t==="focusout"&&U&&B.type==="number"&&U.memoizedProps.value!=null&&No(B,"number",B.value)}switch(st=U?Qi(U):window,t){case"focusin":(sh(st)||st.contentEditable==="true")&&(ti=st,Po=U,ns=null);break;case"focusout":ns=Po=ti=null;break;case"mousedown":Xo=!0;break;case"contextmenu":case"mouseup":case"dragend":Xo=!1,yh(X,a,Y);break;case"selectionchange":if(jb)break;case"keydown":case"keyup":yh(X,a,Y)}var mt;if(Ho)t:{switch(t){case"compositionstart":var bt="onCompositionStart";break t;case"compositionend":bt="onCompositionEnd";break t;case"compositionupdate":bt="onCompositionUpdate";break t}bt=void 0}else Ia?ah(t,a)&&(bt="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(bt="onCompositionStart");bt&&(th&&a.locale!=="ko"&&(Ia||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Ia&&(mt=$d()):(Hn=Y,Lo="value"in Hn?Hn.value:Hn.textContent,Ia=!0)),st=cr(U,bt),0<st.length&&(bt=new Wd(bt,t,null,a,Y),X.push({event:bt,listeners:st}),mt?bt.data=mt:(mt=ih(a),mt!==null&&(bt.data=mt)))),(mt=bb?Sb(t,a):Tb(t,a))&&(bt=cr(U,"onBeforeInput"),0<bt.length&&(st=new Wd("onBeforeInput","beforeinput",null,a,Y),X.push({event:st,listeners:bt}),st.data=mt)),h1(X,t,U,a,Y)}Yp(X,e)})}function Rs(t,e,a){return{instance:t,listener:e,currentTarget:a}}function cr(t,e){for(var a=e+"Capture",s=[];t!==null;){var o=t,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=Zi(t,a),o!=null&&s.unshift(Rs(t,o,c)),o=Zi(t,e),o!=null&&s.push(Rs(t,o,c))),t.tag===3)return s;t=t.return}return[]}function g1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Pp(t,e,a,s,o){for(var c=e._reactName,y=[];a!==null&&a!==s;){var b=a,C=b.alternate,U=b.stateNode;if(b=b.tag,C!==null&&C===s)break;b!==5&&b!==26&&b!==27||U===null||(C=U,o?(U=Zi(a,c),U!=null&&y.unshift(Rs(a,U,C))):o||(U=Zi(a,c),U!=null&&y.push(Rs(a,U,C)))),a=a.return}y.length!==0&&t.push({event:e,listeners:y})}var v1=/\r\n?/g,x1=/\u0000|\uFFFD/g;function Xp(t){return(typeof t=="string"?t:""+t).replace(v1,`
`).replace(x1,"")}function Kp(t,e){return e=Xp(e),Xp(t)===e}function Mt(t,e,a,s,o,c){switch(a){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||Fa(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&Fa(t,""+s);break;case"className":ml(t,"class",s);break;case"tabIndex":ml(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ml(t,a,s);break;case"style":Kd(t,s,c);break;case"data":if(e!=="object"){ml(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||a!=="href")){t.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=yl(""+s),t.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(e!=="input"&&Mt(t,e,"name",o.name,o,null),Mt(t,e,"formEncType",o.formEncType,o,null),Mt(t,e,"formMethod",o.formMethod,o,null),Mt(t,e,"formTarget",o.formTarget,o,null)):(Mt(t,e,"encType",o.encType,o,null),Mt(t,e,"method",o.method,o,null),Mt(t,e,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=yl(""+s),t.setAttribute(a,s);break;case"onClick":s!=null&&(t.onclick=gn);break;case"onScroll":s!=null&&vt("scroll",t);break;case"onScrollEnd":s!=null&&vt("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(r(60));t.innerHTML=a}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}a=yl(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""+s):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":s===!0?t.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,s):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(a,s):t.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(a):t.setAttribute(a,s);break;case"popover":vt("beforetoggle",t),vt("toggle",t),hl(t,"popover",s);break;case"xlinkActuate":yn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":yn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":yn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":yn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":yn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":yn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":yn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":yn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":yn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":hl(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Qx.get(a)||a,hl(t,a,s))}}function yc(t,e,a,s,o,c){switch(a){case"style":Kd(t,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(r(60));t.innerHTML=a}}break;case"children":typeof s=="string"?Fa(t,s):(typeof s=="number"||typeof s=="bigint")&&Fa(t,""+s);break;case"onScroll":s!=null&&vt("scroll",t);break;case"onScrollEnd":s!=null&&vt("scrollend",t);break;case"onClick":s!=null&&(t.onclick=gn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ud.hasOwnProperty(a))t:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),e=a.slice(2,o?a.length-7:void 0),c=t[ye]||null,c=c!=null?c[a]:null,typeof c=="function"&&t.removeEventListener(e,c,o),typeof s=="function")){typeof c!="function"&&c!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(e,s,o);break t}a in t?t[a]=s:s===!0?t.setAttribute(a,""):hl(t,a,s)}}}function re(t,e,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vt("error",t),vt("load",t);var s=!1,o=!1,c;for(c in a)if(a.hasOwnProperty(c)){var y=a[c];if(y!=null)switch(c){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Mt(t,e,c,y,a,null)}}o&&Mt(t,e,"srcSet",a.srcSet,a,null),s&&Mt(t,e,"src",a.src,a,null);return;case"input":vt("invalid",t);var b=c=y=o=null,C=null,U=null;for(s in a)if(a.hasOwnProperty(s)){var Y=a[s];if(Y!=null)switch(s){case"name":o=Y;break;case"type":y=Y;break;case"checked":C=Y;break;case"defaultChecked":U=Y;break;case"value":c=Y;break;case"defaultValue":b=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,e));break;default:Mt(t,e,s,Y,a,null)}}Yd(t,c,b,C,U,y,o,!1);return;case"select":vt("invalid",t),s=y=c=null;for(o in a)if(a.hasOwnProperty(o)&&(b=a[o],b!=null))switch(o){case"value":c=b;break;case"defaultValue":y=b;break;case"multiple":s=b;default:Mt(t,e,o,b,a,null)}e=c,a=y,t.multiple=!!s,e!=null?$a(t,!!s,e,!1):a!=null&&$a(t,!!s,a,!0);return;case"textarea":vt("invalid",t),c=o=s=null;for(y in a)if(a.hasOwnProperty(y)&&(b=a[y],b!=null))switch(y){case"value":s=b;break;case"defaultValue":o=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Mt(t,e,y,b,a,null)}Pd(t,s,o,c);return;case"option":for(C in a)if(a.hasOwnProperty(C)&&(s=a[C],s!=null))switch(C){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Mt(t,e,C,s,a,null)}return;case"dialog":vt("beforetoggle",t),vt("toggle",t),vt("cancel",t),vt("close",t);break;case"iframe":case"object":vt("load",t);break;case"video":case"audio":for(s=0;s<ws.length;s++)vt(ws[s],t);break;case"image":vt("error",t),vt("load",t);break;case"details":vt("toggle",t);break;case"embed":case"source":case"link":vt("error",t),vt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in a)if(a.hasOwnProperty(U)&&(s=a[U],s!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Mt(t,e,U,s,a,null)}return;default:if(jo(e)){for(Y in a)a.hasOwnProperty(Y)&&(s=a[Y],s!==void 0&&yc(t,e,Y,s,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(s=a[b],s!=null&&Mt(t,e,b,s,a,null))}function b1(t,e,a,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,y=null,b=null,C=null,U=null,Y=null;for(G in a){var X=a[G];if(a.hasOwnProperty(G)&&X!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":C=X;default:s.hasOwnProperty(G)||Mt(t,e,G,null,s,X)}}for(var B in s){var G=s[B];if(X=a[B],s.hasOwnProperty(B)&&(G!=null||X!=null))switch(B){case"type":c=G;break;case"name":o=G;break;case"checked":U=G;break;case"defaultChecked":Y=G;break;case"value":y=G;break;case"defaultValue":b=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,e));break;default:G!==X&&Mt(t,e,B,G,s,X)}}_o(t,y,b,C,U,Y,c,o);return;case"select":G=y=b=B=null;for(c in a)if(C=a[c],a.hasOwnProperty(c)&&C!=null)switch(c){case"value":break;case"multiple":G=C;default:s.hasOwnProperty(c)||Mt(t,e,c,null,s,C)}for(o in s)if(c=s[o],C=a[o],s.hasOwnProperty(o)&&(c!=null||C!=null))switch(o){case"value":B=c;break;case"defaultValue":b=c;break;case"multiple":y=c;default:c!==C&&Mt(t,e,o,c,s,C)}e=b,a=y,s=G,B!=null?$a(t,!!a,B,!1):!!s!=!!a&&(e!=null?$a(t,!!a,e,!0):$a(t,!!a,a?[]:"",!1));return;case"textarea":G=B=null;for(b in a)if(o=a[b],a.hasOwnProperty(b)&&o!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Mt(t,e,b,null,s,o)}for(y in s)if(o=s[y],c=a[y],s.hasOwnProperty(y)&&(o!=null||c!=null))switch(y){case"value":B=o;break;case"defaultValue":G=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Mt(t,e,y,o,s,c)}qd(t,B,G);return;case"option":for(var nt in a)if(B=a[nt],a.hasOwnProperty(nt)&&B!=null&&!s.hasOwnProperty(nt))switch(nt){case"selected":t.selected=!1;break;default:Mt(t,e,nt,null,s,B)}for(C in s)if(B=s[C],G=a[C],s.hasOwnProperty(C)&&B!==G&&(B!=null||G!=null))switch(C){case"selected":t.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:Mt(t,e,C,B,s,G)}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 ot in a)B=a[ot],a.hasOwnProperty(ot)&&B!=null&&!s.hasOwnProperty(ot)&&Mt(t,e,ot,null,s,B);for(U in s)if(B=s[U],G=a[U],s.hasOwnProperty(U)&&B!==G&&(B!=null||G!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,e));break;default:Mt(t,e,U,B,s,G)}return;default:if(jo(e)){for(var Ot in a)B=a[Ot],a.hasOwnProperty(Ot)&&B!==void 0&&!s.hasOwnProperty(Ot)&&yc(t,e,Ot,void 0,s,B);for(Y in s)B=s[Y],G=a[Y],!s.hasOwnProperty(Y)||B===G||B===void 0&&G===void 0||yc(t,e,Y,B,s,G);return}}for(var z in a)B=a[z],a.hasOwnProperty(z)&&B!=null&&!s.hasOwnProperty(z)&&Mt(t,e,z,null,s,B);for(X in s)B=s[X],G=a[X],!s.hasOwnProperty(X)||B===G||B==null&&G==null||Mt(t,e,X,B,s,G)}function Qp(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function S1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var o=a[s],c=o.transferSize,y=o.initiatorType,b=o.duration;if(c&&b&&Qp(y)){for(y=0,b=o.responseEnd,s+=1;s<a.length;s++){var C=a[s],U=C.startTime;if(U>b)break;var Y=C.transferSize,X=C.initiatorType;Y&&Qp(X)&&(C=C.responseEnd,y+=Y*(C<b?1:(b-U)/(C-U)))}if(--s,e+=8*(c+y)/(o.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var gc=null,vc=null;function fr(t){return t.nodeType===9?t:t.ownerDocument}function Zp(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $p(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function xc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var bc=null;function T1(){var t=window.event;return t&&t.type==="popstate"?t===bc?!1:(bc=t,!0):(bc=null,!1)}var Fp=typeof setTimeout=="function"?setTimeout:void 0,E1=typeof clearTimeout=="function"?clearTimeout:void 0,Jp=typeof Promise=="function"?Promise:void 0,A1=typeof queueMicrotask=="function"?queueMicrotask:typeof Jp<"u"?function(t){return Jp.resolve(null).then(t).catch(C1)}:Fp;function C1(t){setTimeout(function(){throw t})}function aa(t){return t==="head"}function Wp(t,e){var a=e,s=0;do{var o=a.nextSibling;if(t.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(s===0){t.removeChild(o),Ri(e);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")_s(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,_s(a);for(var c=a.firstChild;c;){var y=c.nextSibling,b=c.nodeName;c[Ki]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=y}}else a==="body"&&_s(t.ownerDocument.body);a=o}while(a);Ri(e)}function Ip(t,e){var a=t;t=0;do{var s=a.nextSibling;if(a.nodeType===1?e?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(e?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=s}while(a)}function Sc(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var a=e;switch(e=e.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Sc(a),wo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function w1(t,e,a,s){for(;t.nodeType===1;){var o=a;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Ki])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==o.rel||t.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||t.getAttribute("title")!==(o.title==null?null:o.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(o.src==null?null:o.src)||t.getAttribute("type")!==(o.type==null?null:o.type)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=qe(t.nextSibling),t===null)break}return null}function R1(t,e,a){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=qe(t.nextSibling),t===null))return null;return t}function ty(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=qe(t.nextSibling),t===null))return null;return t}function Tc(t){return t.data==="$?"||t.data==="$~"}function Ec(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function _1(t,e){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||a.readyState!=="loading")e();else{var s=function(){e(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function qe(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Ac=null;function ey(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(e===0)return qe(t.nextSibling);e--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||e++}t=t.nextSibling}return null}function ny(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(e===0)return t;e--}else a!=="/$"&&a!=="/&"||e++}t=t.previousSibling}return null}function ay(t,e,a){switch(e=fr(a),t){case"html":if(t=e.documentElement,!t)throw Error(r(452));return t;case"head":if(t=e.head,!t)throw Error(r(453));return t;case"body":if(t=e.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function _s(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);wo(t)}var Pe=new Map,iy=new Set;function dr(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var On=J.d;J.d={f:N1,r:j1,D:D1,C:M1,L:O1,m:z1,X:k1,S:L1,M:U1};function N1(){var t=On.f(),e=ar();return t||e}function j1(t){var e=Ka(t);e!==null&&e.tag===5&&e.type==="form"?Sm(e):On.r(t)}var Ai=typeof document>"u"?null:document;function sy(t,e,a){var s=Ai;if(s&&typeof e=="string"&&e){var o=ke(e);o='link[rel="'+t+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),iy.has(o)||(iy.add(o),t={rel:t,crossOrigin:a,href:e},s.querySelector(o)===null&&(e=s.createElement("link"),re(e,"link",t),ee(e),s.head.appendChild(e)))}}function D1(t){On.D(t),sy("dns-prefetch",t,null)}function M1(t,e){On.C(t,e),sy("preconnect",t,e)}function O1(t,e,a){On.L(t,e,a);var s=Ai;if(s&&t&&e){var o='link[rel="preload"][as="'+ke(e)+'"]';e==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+ke(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+ke(a.imageSizes)+'"]')):o+='[href="'+ke(t)+'"]';var c=o;switch(e){case"style":c=Ci(t);break;case"script":c=wi(t)}Pe.has(c)||(t=x({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),Pe.set(c,t),s.querySelector(o)!==null||e==="style"&&s.querySelector(Ns(c))||e==="script"&&s.querySelector(js(c))||(e=s.createElement("link"),re(e,"link",t),ee(e),s.head.appendChild(e)))}}function z1(t,e){On.m(t,e);var a=Ai;if(a&&t){var s=e&&typeof e.as=="string"?e.as:"script",o='link[rel="modulepreload"][as="'+ke(s)+'"][href="'+ke(t)+'"]',c=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=wi(t)}if(!Pe.has(c)&&(t=x({rel:"modulepreload",href:t},e),Pe.set(c,t),a.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(js(c)))return}s=a.createElement("link"),re(s,"link",t),ee(s),a.head.appendChild(s)}}}function L1(t,e,a){On.S(t,e,a);var s=Ai;if(s&&t){var o=Qa(s).hoistableStyles,c=Ci(t);e=e||"default";var y=o.get(c);if(!y){var b={loading:0,preload:null};if(y=s.querySelector(Ns(c)))b.loading=5;else{t=x({rel:"stylesheet",href:t,"data-precedence":e},a),(a=Pe.get(c))&&Cc(t,a);var C=y=s.createElement("link");ee(C),re(C,"link",t),C._p=new Promise(function(U,Y){C.onload=U,C.onerror=Y}),C.addEventListener("load",function(){b.loading|=1}),C.addEventListener("error",function(){b.loading|=2}),b.loading|=4,hr(y,e,s)}y={type:"stylesheet",instance:y,count:1,state:b},o.set(c,y)}}}function k1(t,e){On.X(t,e);var a=Ai;if(a&&t){var s=Qa(a).hoistableScripts,o=wi(t),c=s.get(o);c||(c=a.querySelector(js(o)),c||(t=x({src:t,async:!0},e),(e=Pe.get(o))&&wc(t,e),c=a.createElement("script"),ee(c),re(c,"link",t),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function U1(t,e){On.M(t,e);var a=Ai;if(a&&t){var s=Qa(a).hoistableScripts,o=wi(t),c=s.get(o);c||(c=a.querySelector(js(o)),c||(t=x({src:t,async:!0,type:"module"},e),(e=Pe.get(o))&&wc(t,e),c=a.createElement("script"),ee(c),re(c,"link",t),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function ly(t,e,a,s){var o=(o=yt.current)?dr(o):null;if(!o)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(e=Ci(a.href),a=Qa(o).hoistableStyles,s=a.get(e),s||(s={type:"style",instance:null,count:0,state:null},a.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Ci(a.href);var c=Qa(o).hoistableStyles,y=c.get(t);if(y||(o=o.ownerDocument||o,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,y),(c=o.querySelector(Ns(t)))&&!c._p&&(y.instance=c,y.state.loading=5),Pe.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Pe.set(t,a),c||V1(o,t,a,y.state))),e&&s===null)throw Error(r(528,""));return y}if(e&&s!==null)throw Error(r(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=wi(a),a=Qa(o).hoistableScripts,s=a.get(e),s||(s={type:"script",instance:null,count:0,state:null},a.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Ci(t){return'href="'+ke(t)+'"'}function Ns(t){return'link[rel="stylesheet"]['+t+"]"}function ry(t){return x({},t,{"data-precedence":t.precedence,precedence:null})}function V1(t,e,a,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),re(e,"link",a),ee(e),t.head.appendChild(e))}function wi(t){return'[src="'+ke(t)+'"]'}function js(t){return"script[async]"+t}function oy(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+ke(a.href)+'"]');if(s)return e.instance=s,ee(s),s;var o=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),ee(s),re(s,"style",o),hr(s,a.precedence,t),e.instance=s;case"stylesheet":o=Ci(a.href);var c=t.querySelector(Ns(o));if(c)return e.state.loading|=4,e.instance=c,ee(c),c;s=ry(a),(o=Pe.get(o))&&Cc(s,o),c=(t.ownerDocument||t).createElement("link"),ee(c);var y=c;return y._p=new Promise(function(b,C){y.onload=b,y.onerror=C}),re(c,"link",s),e.state.loading|=4,hr(c,a.precedence,t),e.instance=c;case"script":return c=wi(a.src),(o=t.querySelector(js(c)))?(e.instance=o,ee(o),o):(s=a,(o=Pe.get(c))&&(s=x({},a),wc(s,o)),t=t.ownerDocument||t,o=t.createElement("script"),ee(o),re(o,"link",s),t.head.appendChild(o),e.instance=o);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,hr(s,a.precedence,t));return e.instance}function hr(t,e,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,c=o,y=0;y<s.length;y++){var b=s[y];if(b.dataset.precedence===e)c=b;else if(c!==o)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=a.nodeType===9?a.head:a,e.insertBefore(t,e.firstChild))}function Cc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function wc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var mr=null;function uy(t,e,a){if(mr===null){var s=new Map,o=mr=new Map;o.set(a,s)}else o=mr,s=o.get(a),s||(s=new Map,o.set(a,s));if(s.has(t))return s;for(s.set(t,null),a=a.getElementsByTagName(t),o=0;o<a.length;o++){var c=a[o];if(!(c[Ki]||c[ae]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(e)||"";y=t+y;var b=s.get(y);b?b.push(c):s.set(y,[c])}}return s}function cy(t,e,a){t=t.ownerDocument||t,t.head.insertBefore(a,e==="title"?t.querySelector("head > title"):null)}function B1(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function fy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function H1(t,e,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Ci(s.href),c=e.querySelector(Ns(o));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=pr.bind(t),e.then(t,t)),a.state.loading|=4,a.instance=c,ee(c);return}c=e.ownerDocument||e,s=ry(s),(o=Pe.get(o))&&Cc(s,o),c=c.createElement("link"),ee(c);var y=c;y._p=new Promise(function(b,C){y.onload=b,y.onerror=C}),re(c,"link",s),a.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=pr.bind(t),e.addEventListener("load",a),e.addEventListener("error",a))}}var Rc=0;function G1(t,e){return t.stylesheets&&t.count===0&&gr(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var s=setTimeout(function(){if(t.stylesheets&&gr(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&Rc===0&&(Rc=62500*S1());var o=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&gr(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>Rc?50:800)+e);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function pr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gr(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var yr=null;function gr(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,yr=new Map,e.forEach(Y1,t),yr=null,pr.call(t))}function Y1(t,e){if(!(e.state.loading&4)){var a=yr.get(t);if(a)var s=a.get(null);else{a=new Map,yr.set(t,a);for(var o=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var y=o[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),s=y)}s&&a.set(null,s)}o=e.instance,y=o.getAttribute("data-precedence"),c=a.get(y)||s,c===s&&a.set(null,o),a.set(y,o),this.count++,s=pr.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),c?c.parentNode.insertBefore(o,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(o,t.firstChild)),e.state.loading|=4}}var Ds={$$typeof:D,Provider:null,Consumer:null,_currentValue:tt,_currentValue2:tt,_threadCount:0};function q1(t,e,a,s,o,c,y,b,C){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=To(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=To(0),this.hiddenUpdates=To(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function dy(t,e,a,s,o,c,y,b,C,U,Y,X){return t=new q1(t,e,a,y,C,U,Y,X,b),e=1,c===!0&&(e|=24),c=Re(3,null,null,e),t.current=c,c.stateNode=t,e=lu(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:s,isDehydrated:a,cache:e},cu(c),t}function hy(t){return t?(t=ai,t):ai}function my(t,e,a,s,o,c){o=hy(o),s.context===null?s.context=o:s.pendingContext=o,s=Kn(e),s.payload={element:a},c=c===void 0?null:c,c!==null&&(s.callback=c),a=Qn(t,s,e),a!==null&&(Te(a,t,e),us(a,t,e))}function py(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<e?a:e}}function _c(t,e){py(t,e),(t=t.alternate)&&py(t,e)}function yy(t){if(t.tag===13||t.tag===31){var e=Ea(t,67108864);e!==null&&Te(e,t,67108864),_c(t,67108864)}}function gy(t){if(t.tag===13||t.tag===31){var e=Me();e=Eo(e);var a=Ea(t,e);a!==null&&Te(a,t,e),_c(t,e)}}var vr=!0;function P1(t,e,a,s){var o=L.T;L.T=null;var c=J.p;try{J.p=2,Nc(t,e,a,s)}finally{J.p=c,L.T=o}}function X1(t,e,a,s){var o=L.T;L.T=null;var c=J.p;try{J.p=8,Nc(t,e,a,s)}finally{J.p=c,L.T=o}}function Nc(t,e,a,s){if(vr){var o=jc(s);if(o===null)pc(t,e,s,xr,a),xy(t,s);else if(Q1(o,t,e,a,s))s.stopPropagation();else if(xy(t,s),e&4&&-1<K1.indexOf(t)){for(;o!==null;){var c=Ka(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=va(c.pendingLanes);if(y!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;y;){var C=1<<31-Ce(y);b.entanglements[1]|=C,y&=~C}cn(c),(Ct&6)===0&&(er=Ee()+500,Cs(0))}}break;case 31:case 13:b=Ea(c,2),b!==null&&Te(b,c,2),ar(),_c(c,2)}if(c=jc(s),c===null&&pc(t,e,s,xr,a),c===o)break;o=c}o!==null&&s.stopPropagation()}else pc(t,e,s,null,a)}}function jc(t){return t=Mo(t),Dc(t)}var xr=null;function Dc(t){if(xr=null,t=Xa(t),t!==null){var e=d(t);if(e===null)t=null;else{var a=e.tag;if(a===13){if(t=f(e),t!==null)return t;t=null}else if(a===31){if(t=h(e),t!==null)return t;t=null}else if(a===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return xr=t,null}function vy(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Dx()){case wd:return 2;case Rd:return 8;case ol:case Mx:return 32;case _d:return 268435456;default:return 32}default:return 32}}var Mc=!1,ia=null,sa=null,la=null,Ms=new Map,Os=new Map,ra=[],K1="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 xy(t,e){switch(t){case"focusin":case"focusout":ia=null;break;case"dragenter":case"dragleave":sa=null;break;case"mouseover":case"mouseout":la=null;break;case"pointerover":case"pointerout":Ms.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(e.pointerId)}}function zs(t,e,a,s,o,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:a,eventSystemFlags:s,nativeEvent:c,targetContainers:[o]},e!==null&&(e=Ka(e),e!==null&&yy(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function Q1(t,e,a,s,o){switch(e){case"focusin":return ia=zs(ia,t,e,a,s,o),!0;case"dragenter":return sa=zs(sa,t,e,a,s,o),!0;case"mouseover":return la=zs(la,t,e,a,s,o),!0;case"pointerover":var c=o.pointerId;return Ms.set(c,zs(Ms.get(c)||null,t,e,a,s,o)),!0;case"gotpointercapture":return c=o.pointerId,Os.set(c,zs(Os.get(c)||null,t,e,a,s,o)),!0}return!1}function by(t){var e=Xa(t.target);if(e!==null){var a=d(e);if(a!==null){if(e=a.tag,e===13){if(e=f(a),e!==null){t.blockedOn=e,zd(t.priority,function(){gy(a)});return}}else if(e===31){if(e=h(a),e!==null){t.blockedOn=e,zd(t.priority,function(){gy(a)});return}}else if(e===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function br(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var a=jc(t.nativeEvent);if(a===null){a=t.nativeEvent;var s=new a.constructor(a.type,a);Do=s,a.target.dispatchEvent(s),Do=null}else return e=Ka(a),e!==null&&yy(e),t.blockedOn=a,!1;e.shift()}return!0}function Sy(t,e,a){br(t)&&a.delete(e)}function Z1(){Mc=!1,ia!==null&&br(ia)&&(ia=null),sa!==null&&br(sa)&&(sa=null),la!==null&&br(la)&&(la=null),Ms.forEach(Sy),Os.forEach(Sy)}function Sr(t,e){t.blockedOn===e&&(t.blockedOn=null,Mc||(Mc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Z1)))}var Tr=null;function Ty(t){Tr!==t&&(Tr=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Tr===t&&(Tr=null);for(var e=0;e<t.length;e+=3){var a=t[e],s=t[e+1],o=t[e+2];if(typeof s!="function"){if(Dc(s||a)===null)continue;break}var c=Ka(a);c!==null&&(t.splice(e,3),e-=3,ju(c,{pending:!0,data:o,method:a.method,action:s},s,o))}}))}function Ri(t){function e(C){return Sr(C,t)}ia!==null&&Sr(ia,t),sa!==null&&Sr(sa,t),la!==null&&Sr(la,t),Ms.forEach(e),Os.forEach(e);for(var a=0;a<ra.length;a++){var s=ra[a];s.blockedOn===t&&(s.blockedOn=null)}for(;0<ra.length&&(a=ra[0],a.blockedOn===null);)by(a),a.blockedOn===null&&ra.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var o=a[s],c=a[s+1],y=o[ye]||null;if(typeof c=="function")y||Ty(a);else if(y){var b=null;if(c&&c.hasAttribute("formAction")){if(o=c,y=c[ye]||null)b=y.formAction;else if(Dc(o)!==null)continue}else b=y.action;typeof b=="function"?a[s+1]=b:(a.splice(s,3),s-=3),Ty(a)}}}function Ey(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return o=y})},focusReset:"manual",scroll:"manual"})}function e(){o!==null&&(o(),o=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),o!==null&&(o(),o=null)}}}function Oc(t){this._internalRoot=t}Er.prototype.render=Oc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var a=e.current,s=Me();my(a,s,t,e,null,null)},Er.prototype.unmount=Oc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;my(t.current,2,null,t,null,null),ar(),e[Pa]=null}};function Er(t){this._internalRoot=t}Er.prototype.unstable_scheduleHydration=function(t){if(t){var e=Od();t={blockedOn:null,target:t,priority:e};for(var a=0;a<ra.length&&e!==0&&e<ra[a].priority;a++);ra.splice(a,0,t),a===0&&by(t)}};var Ay=i.version;if(Ay!=="19.2.8")throw Error(r(527,Ay,"19.2.8"));J.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=p(e),t=t!==null?v(t):null,t=t===null?null:t.stateNode,t};var $1={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ar=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ar.isDisabled&&Ar.supportsFiber)try{qi=Ar.inject($1),Ae=Ar}catch{}}return ks.createRoot=function(t,e){if(!u(t))throw Error(r(299));var a=!1,s="",o=Dm,c=Mm,y=Om;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(o=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(y=e.onRecoverableError)),e=dy(t,1,!1,null,null,a,s,null,o,c,y,Ey),t[Pa]=e.current,mc(t),new Oc(e)},ks.hydrateRoot=function(t,e,a){if(!u(t))throw Error(r(299));var s=!1,o="",c=Dm,y=Mm,b=Om,C=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),e=dy(t,1,!0,e,a??null,s,o,C,c,y,b,Ey),e.context=hy(null),a=e.current,s=Me(),s=Eo(s),o=Kn(s),o.callback=null,Qn(a,o,s),a=s,e.current.lanes=a,Xi(e,a),cn(e),t[Pa]=e.current,mc(t),new Er(e)},ks.version="19.2.8",ks}var zy;function sS(){if(zy)return kc.exports;zy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),kc.exports=iS(),kc.exports}var lS=sS();const rS=mg(lS);/**
* react-router v7.18.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var Bf=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,pg=/^[\\/]{2}/;function oS(n,i){return i+n.replace(/\\/g,"/")}var Ly="popstate";function ky(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function uS(n={}){function i(r,u){var p;let d=(p=u.state)==null?void 0:p.masked,{pathname:f,search:h,hash:m}=d||r.location;return rf("",{pathname:f,search:h,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default",d?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function l(r,u){return typeof u=="string"?u:Xs(u)}return fS(i,l,null,n)}function Gt(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function an(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function cS(){return Math.random().toString(36).substring(2,10)}function Uy(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function rf(n,i,l=null,r,u){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?Li(i):i,state:l,key:i&&i.key||r||cS(),mask:u}}function Xs({pathname:n="/",search:i="",hash:l=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Li(n){let i={};if(n){let l=n.indexOf("#");l>=0&&(i.hash=n.substring(l),n=n.substring(0,l));let r=n.indexOf("?");r>=0&&(i.search=n.substring(r),n=n.substring(0,r)),n&&(i.pathname=n)}return i}function fS(n,i,l,r={}){let{window:u=document.defaultView,v5Compat:d=!1}=r,f=u.history,h="POP",m=null,p=v();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function v(){return(f.state||{idx:null}).idx}function x(){h="POP";let _=v(),R=_==null?null:_-p;p=_,m&&m({action:h,location:w.location,delta:R})}function S(_,R){h="PUSH";let O=ky(_)?_:rf(w.location,_,R);p=v()+1;let D=Uy(O,p),M=w.createHref(O.mask||O);try{f.pushState(D,"",M)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;u.location.assign(M)}d&&m&&m({action:h,location:w.location,delta:1})}function E(_,R){h="REPLACE";let O=ky(_)?_:rf(w.location,_,R);p=v();let D=Uy(O,p),M=w.createHref(O.mask||O);f.replaceState(D,"",M),d&&m&&m({action:h,location:w.location,delta:0})}function A(_){return dS(u,_)}let w={get action(){return h},get location(){return n(u,f)},listen(_){if(m)throw new Error("A history only accepts one active listener");return u.addEventListener(Ly,x),m=_,()=>{u.removeEventListener(Ly,x),m=null}},createHref(_){return i(u,_)},createURL:A,encodeLocation(_){let R=A(_);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:S,replace:E,go(_){return f.go(_)}};return w}function dS(n,i,l=!1){let r="http://localhost";n&&(r=n.location.origin!=="null"?n.location.origin:n.location.href),Gt(r,"No window.location.(origin|href) available to create URL");let u=typeof i=="string"?i:Xs(i);return u=u.replace(/ $/,"%20"),!l&&pg.test(u)&&(u=r+u),new URL(u,r)}function yg(n,i,l="/"){return hS(n,i,l,!1)}function hS(n,i,l,r,u){let d=typeof i=="string"?Li(i):i,f=kn(d.pathname||"/",l);if(f==null)return null;let h=mS(n),m=null,p=CS(f);for(let v=0;m==null&&v<h.length;++v)m=AS(h[v],p,r);return m}function mS(n){let i=gg(n);return pS(i),i}function gg(n,i=[],l=[],r="",u=!1){let d=(f,h,m=u,p)=>{let v={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(r)&&m)return;Gt(v.relativePath.startsWith(r),`Absolute route path "${v.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(r.length)}let x=tn([r,v.relativePath]),S=l.concat(v);f.children&&f.children.length>0&&(Gt(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),gg(f.children,i,S,x,m)),!(f.path==null&&!f.index)&&i.push({path:x,score:TS(x,f.index),routesMeta:S.map((E,A)=>{let[w,_]=bg(E.relativePath,E.caseSensitive,A===S.length-1);return{...E,matcher:w,compiledParams:_}})})};return n.forEach((f,h)=>{var m;if(f.path===""||!((m=f.path)!=null&&m.includes("?")))d(f,h);else for(let p of vg(f.path))d(f,h,!0,p)}),i}function vg(n){let i=n.split("/");if(i.length===0)return[];let[l,...r]=i,u=l.endsWith("?"),d=l.replace(/\?$/,"");if(r.length===0)return u?[d,""]:[d];let f=vg(r.join("/")),h=[];return h.push(...f.map(m=>m===""?d:[d,m].join("/"))),u&&h.push(...f),h.map(m=>n.startsWith("/")&&m===""?"/":m)}function pS(n){n.sort((i,l)=>i.score!==l.score?l.score-i.score:ES(i.routesMeta.map(r=>r.childrenIndex),l.routesMeta.map(r=>r.childrenIndex)))}var yS=/^:[\w-]+$/,gS=3,vS=2,xS=1,bS=10,SS=-2,Vy=n=>n==="*";function TS(n,i){let l=n.split("/"),r=l.length;return l.some(Vy)&&(r+=SS),i&&(r+=vS),l.filter(u=>!Vy(u)).reduce((u,d)=>u+(yS.test(d)?gS:d===""?xS:bS),r)}function ES(n,i){return n.length===i.length&&n.slice(0,-1).every((r,u)=>r===i[u])?n[n.length-1]-i[i.length-1]:0}function AS(n,i,l=!1){let{routesMeta:r}=n,u={},d="/",f=[];for(let h=0;h<r.length;++h){let m=r[h],p=h===r.length-1,v=d==="/"?i:i.slice(d.length)||"/",x={path:m.relativePath,caseSensitive:m.caseSensitive,end:p},S=m.matcher&&m.compiledParams?xg(x,v,m.matcher,m.compiledParams):Pr(x,v),E=m.route;if(!S&&p&&l&&!r[r.length-1].route.index&&(S=Pr({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!S)return null;Object.assign(u,S.params),f.push({params:u,pathname:tn([d,S.pathname]),pathnameBase:_S(tn([d,S.pathnameBase])),route:E}),S.pathnameBase!=="/"&&(d=tn([d,S.pathnameBase]))}return f}function Pr(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,r]=bg(n.path,n.caseSensitive,n.end);return xg(n,i,l,r)}function xg(n,i,l,r){let u=i.match(l);if(!u)return null;let d=u[0],f=d.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:r.reduce((p,{paramName:v,isOptional:x},S)=>{if(v==="*"){let A=h[S]||"";f=d.slice(0,d.length-A.length).replace(/(.)\/+$/,"$1")}const E=h[S];return x&&!E?p[v]=void 0:p[v]=(E||"").replace(/%2F/g,"/"),p},{}),pathname:d,pathnameBase:f,pattern:n}}function bg(n,i=!1,l=!0){an(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let r=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,m,p,v)=>{if(r.push({paramName:h,isOptional:m!=null}),m){let x=v.charAt(p+f.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(r.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,i?void 0:"i"),r]}function CS(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return an(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function kn(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let l=i.endsWith("/")?i.length-1:i.length,r=n.charAt(l);return r&&r!=="/"?null:n.slice(l)||"/"}function wS(n,i="/"){let{pathname:l,search:r="",hash:u=""}=typeof n=="string"?Li(n):n,d;return l?(l=Sg(l),l.startsWith("/")?d=By(l.substring(1),"/"):d=By(l,i)):d=i,{pathname:d,search:NS(r),hash:jS(u)}}function By(n,i){let l=Xr(i).split("/");return n.split("/").forEach(u=>{u===".."?l.length>1&&l.pop():u!=="."&&l.push(u)}),l.length>1?l.join("/"):"/"}function Hc(n,i,l,r){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function RS(n){return n.filter((i,l)=>l===0||i.route.path&&i.route.path.length>0)}function Hf(n){let i=RS(n);return i.map((l,r)=>r===i.length-1?l.pathname:l.pathnameBase)}function no(n,i,l,r=!1){let u;typeof n=="string"?u=Li(n):(u={...n},Gt(!u.pathname||!u.pathname.includes("?"),Hc("?","pathname","search",u)),Gt(!u.pathname||!u.pathname.includes("#"),Hc("#","pathname","hash",u)),Gt(!u.search||!u.search.includes("#"),Hc("#","search","hash",u)));let d=n===""||u.pathname==="",f=d?"/":u.pathname,h;if(f==null)h=l;else{let x=i.length-1;if(!r&&f.startsWith("..")){let S=f.split("/");for(;S[0]==="..";)S.shift(),x-=1;u.pathname=S.join("/")}h=x>=0?i[x]:"/"}let m=wS(u,h),p=f&&f!=="/"&&f.endsWith("/"),v=(d||f===".")&&l.endsWith("/");return!m.pathname.endsWith("/")&&(p||v)&&(m.pathname+="/"),m}var Sg=n=>n.replace(/[\\/]{2,}/g,"/"),tn=n=>Sg(n.join("/")),Xr=n=>n.replace(/\/+$/,""),_S=n=>Xr(n).replace(/^\/*/,"/"),NS=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,jS=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,DS=class{constructor(n,i,l,r=!1){this.status=n,this.statusText=i||"",this.internal=r,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function MS(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function OS(n){let i=n.map(l=>l.route.path).filter(Boolean);return tn(i)||"/"}var Tg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Eg(n,i){let l=n;if(typeof l!="string"||!Bf.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let r=l,u=!1;if(Tg)try{let d=new URL(window.location.href),f=pg.test(l)?new URL(oS(l,d.protocol)):new URL(l),h=kn(f.pathname,i);f.origin===d.origin&&h!=null?l=h+f.search+f.hash:u=!0}catch{an(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:u,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ag=["POST","PUT","PATCH","DELETE"];new Set(Ag);var zS=["GET",...Ag];new Set(zS);var LS=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function kS(n){try{return LS.includes(new URL(n).protocol)}catch{return!1}}var ki=T.createContext(null);ki.displayName="DataRouter";var ao=T.createContext(null);ao.displayName="DataRouterState";var Cg=T.createContext(!1);function US(){return T.useContext(Cg)}var wg=T.createContext({isTransitioning:!1});wg.displayName="ViewTransition";var VS=T.createContext(new Map);VS.displayName="Fetchers";var BS=T.createContext(null);BS.displayName="Await";var ze=T.createContext(null);ze.displayName="Navigation";var Is=T.createContext(null);Is.displayName="Location";var sn=T.createContext({outlet:null,matches:[],isDataRoute:!1});sn.displayName="Route";var Gf=T.createContext(null);Gf.displayName="RouteError";var Rg="REACT_ROUTER_ERROR",HS="REDIRECT",GS="ROUTE_ERROR_RESPONSE";function YS(n){if(n.startsWith(`${Rg}:${HS}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function qS(n){if(n.startsWith(`${Rg}:${GS}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new DS(i.status,i.statusText,i.data)}catch{}}function PS(n,{relative:i}={}){Gt(Ui(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:r}=T.useContext(ze),{hash:u,pathname:d,search:f}=tl(n,{relative:i}),h=d;return l!=="/"&&(h=d==="/"?l:tn([l,d])),r.createHref({pathname:h,search:f,hash:u})}function Ui(){return T.useContext(Is)!=null}function ln(){return Gt(Ui(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(Is).location}var _g="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ng(n){T.useContext(ze).static||T.useLayoutEffect(n)}function pa(){let{isDataRoute:n}=T.useContext(sn);return n?iT():XS()}function XS(){Gt(Ui(),"useNavigate() may be used only in the context of a <Router> component.");let n=T.useContext(ki),{basename:i,navigator:l}=T.useContext(ze),{matches:r}=T.useContext(sn),{pathname:u}=ln(),d=JSON.stringify(Hf(r)),f=T.useRef(!1);return Ng(()=>{f.current=!0}),T.useCallback((m,p={})=>{if(an(f.current,_g),!f.current)return;if(typeof m=="number"){l.go(m);return}let v=no(m,JSON.parse(d),u,p.relative==="path");n==null&&i!=="/"&&(v.pathname=v.pathname==="/"?i:tn([i,v.pathname])),(p.replace?l.replace:l.push)(v,p.state,p)},[i,l,d,u,n])}T.createContext(null);function KS(){let{matches:n}=T.useContext(sn),i=n[n.length-1];return(i==null?void 0:i.params)??{}}function tl(n,{relative:i}={}){let{matches:l}=T.useContext(sn),{pathname:r}=ln(),u=JSON.stringify(Hf(l));return T.useMemo(()=>no(n,JSON.parse(u),r,i==="path"),[n,u,r,i])}function QS(n,i){return jg(n,i)}function jg(n,i,l){var _;Gt(Ui(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=T.useContext(ze),{matches:u}=T.useContext(sn),d=u[u.length-1],f=d?d.params:{},h=d?d.pathname:"/",m=d?d.pathnameBase:"/",p=d&&d.route;{let R=p&&p.path||"";Mg(h,!p||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${R}">) 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.
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let v=ln(),x;if(i){let R=typeof i=="string"?Li(i):i;Gt(m==="/"||((_=R.pathname)==null?void 0:_.startsWith(m)),`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 "${m}" but pathname "${R.pathname}" was given in the \`location\` prop.`),x=R}else x=v;let S=x.pathname||"/",E=S;if(m!=="/"){let R=m.replace(/^\//,"").split("/");E="/"+S.replace(/^\//,"").split("/").slice(R.length).join("/")}let A=l&&l.state.matches.length?l.state.matches.map(R=>Object.assign(R,{route:l.manifest[R.route.id]||R.route})):yg(n,{pathname:E});an(p||A!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),an(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 w=WS(A&&A.map(R=>Object.assign({},R,{params:Object.assign({},f,R.params),pathname:tn([m,r.encodeLocation?r.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:tn([m,r.encodeLocation?r.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),u,l);return i&&w?T.createElement(Is.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},w):w}function ZS(){let n=aT(),i=MS(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,r="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:d},"ErrorBoundary")," or"," ",T.createElement("code",{style:d},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},i),l?T.createElement("pre",{style:u},l):null,f)}var $S=T.createElement(ZS,null),Dg=class extends T.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const l=qS(n.digest);l&&(n=l)}let i=n!==void 0?T.createElement(sn.Provider,{value:this.props.routeContext},T.createElement(Gf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?T.createElement(FS,{error:n},i):i}};Dg.contextType=Cg;var Gc=new WeakMap;function FS({children:n,error:i}){let{basename:l}=T.useContext(ze);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let r=YS(i.digest);if(r){let u=Gc.get(i);if(u)throw u;let d=Eg(r.location,l),f=d.absoluteURL||d.to;if(kS(f))throw new Error("Invalid redirect location");if(Tg&&!Gc.get(i))if(d.isExternal||r.reloadDocument)window.location.href=f;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:r.replace}));throw Gc.set(i,h),h}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f}`})}}return n}function JS({routeContext:n,match:i,children:l}){let r=T.useContext(ki);return r&&r.static&&r.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=i.route.id),T.createElement(sn.Provider,{value:n},l)}function WS(n,i=[],l){let r=l==null?void 0:l.state;if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(i.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let u=n,d=r==null?void 0:r.errors;if(d!=null){let v=u.findIndex(x=>x.route.id&&(d==null?void 0:d[x.route.id])!==void 0);Gt(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),u=u.slice(0,Math.min(u.length,v+1))}let f=!1,h=-1;if(l&&r){f=r.renderFallback;for(let v=0;v<u.length;v++){let x=u[v];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(h=v),x.route.id){let{loaderData:S,errors:E}=r,A=x.route.loader&&!S.hasOwnProperty(x.route.id)&&(!E||E[x.route.id]===void 0);if(x.route.lazy||A){l.isStatic&&(f=!0),h>=0?u=u.slice(0,h+1):u=[u[0]];break}}}}let m=l==null?void 0:l.onError,p=r&&m?(v,x)=>{var S,E;m(v,{location:r.location,params:((E=(S=r.matches)==null?void 0:S[0])==null?void 0:E.params)??{},pattern:OS(r.matches),errorInfo:x})}:void 0;return u.reduceRight((v,x,S)=>{let E,A=!1,w=null,_=null;r&&(E=d&&x.route.id?d[x.route.id]:void 0,w=x.route.errorElement||$S,f&&(h<0&&S===0?(Mg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,_=null):h===S&&(A=!0,_=x.route.hydrateFallbackElement||null)));let R=i.concat(u.slice(0,S+1)),O=()=>{let D;return E?D=w:A?D=_:x.route.Component?D=T.createElement(x.route.Component,null):x.route.element?D=x.route.element:D=v,T.createElement(JS,{match:x,routeContext:{outlet:v,matches:R,isDataRoute:r!=null},children:D})};return r&&(x.route.ErrorBoundary||x.route.errorElement||S===0)?T.createElement(Dg,{location:r.location,revalidation:r.revalidation,component:w,error:E,children:O(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:p}):O()},null)}function Yf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function IS(n){let i=T.useContext(ki);return Gt(i,Yf(n)),i}function tT(n){let i=T.useContext(ao);return Gt(i,Yf(n)),i}function eT(n){let i=T.useContext(sn);return Gt(i,Yf(n)),i}function qf(n){let i=eT(n),l=i.matches[i.matches.length-1];return Gt(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function nT(){return qf("useRouteId")}function aT(){var r;let n=T.useContext(Gf),i=tT("useRouteError"),l=qf("useRouteError");return n!==void 0?n:(r=i.errors)==null?void 0:r[l]}function iT(){let{router:n}=IS("useNavigate"),i=qf("useNavigate"),l=T.useRef(!1);return Ng(()=>{l.current=!0}),T.useCallback(async(u,d={})=>{an(l.current,_g),l.current&&(typeof u=="number"?await n.navigate(u):await n.navigate(u,{fromRouteId:i,...d}))},[n,i])}var Hy={};function Mg(n,i,l){!i&&!Hy[n]&&(Hy[n]=!0,an(!1,l))}T.memo(sT);function sT({routes:n,manifest:i,future:l,state:r,isStatic:u,onError:d}){return jg(n,void 0,{manifest:i,state:r,isStatic:u,onError:d})}function Gy({to:n,replace:i,state:l,relative:r}){Gt(Ui(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=T.useContext(ze);an(!u,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=T.useContext(sn),{pathname:f}=ln(),h=pa(),m=no(n,Hf(d),f,r==="path"),p=JSON.stringify(m);return T.useEffect(()=>{h(JSON.parse(p),{replace:i,state:l,relative:r})},[h,p,r,i,l]),null}function We(n){Gt(!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 lT({basename:n="/",children:i=null,location:l,navigationType:r="POP",navigator:u,static:d=!1,useTransitions:f}){Gt(!Ui(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),m=T.useMemo(()=>({basename:h,navigator:u,static:d,useTransitions:f,future:{}}),[h,u,d,f]);typeof l=="string"&&(l=Li(l));let{pathname:p="/",search:v="",hash:x="",state:S=null,key:E="default",mask:A}=l,w=T.useMemo(()=>{let _=kn(p,h);return _==null?null:{location:{pathname:_,search:v,hash:x,state:S,key:E,mask:A},navigationType:r}},[h,p,v,x,S,E,r,A]);return an(w!=null,`<Router basename="${h}"> is not able to match the URL "${p}${v}${x}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:T.createElement(ze.Provider,{value:m},T.createElement(Is.Provider,{children:i,value:w}))}function Yy({children:n,location:i}){return QS(of(n),i)}function of(n,i=[]){let l=[];return T.Children.forEach(n,(r,u)=>{if(!T.isValidElement(r))return;let d=[...i,u];if(r.type===T.Fragment){l.push.apply(l,of(r.props.children,d));return}Gt(r.type===We,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Gt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let f={id:r.props.id||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(f.children=of(r.props.children,d)),l.push(f)}),l}var zr="get",Lr="application/x-www-form-urlencoded";function io(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function rT(n){return io(n)&&n.tagName.toLowerCase()==="button"}function oT(n){return io(n)&&n.tagName.toLowerCase()==="form"}function uT(n){return io(n)&&n.tagName.toLowerCase()==="input"}function cT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function fT(n,i){return n.button===0&&(!i||i==="_self")&&!cT(n)}var Cr=null;function dT(){if(Cr===null)try{new FormData(document.createElement("form"),0),Cr=!1}catch{Cr=!0}return Cr}var hT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Yc(n){return n!=null&&!hT.has(n)?(an(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Lr}"`),null):n}function mT(n,i){let l,r,u,d,f;if(oT(n)){let h=n.getAttribute("action");r=h?kn(h,i):null,l=n.getAttribute("method")||zr,u=Yc(n.getAttribute("enctype"))||Lr,d=new FormData(n)}else if(rT(n)||uT(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=n.getAttribute("formaction")||h.getAttribute("action");if(r=m?kn(m,i):null,l=n.getAttribute("formmethod")||h.getAttribute("method")||zr,u=Yc(n.getAttribute("formenctype"))||Yc(h.getAttribute("enctype"))||Lr,d=new FormData(h,n),!dT()){let{name:p,type:v,value:x}=n;if(v==="image"){let S=p?`${p}.`:"";d.append(`${S}x`,"0"),d.append(`${S}y`,"0")}else p&&d.append(p,x)}}else{if(io(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=zr,r=null,u=Lr,f=n}return d&&u==="text/plain"&&(f=d,d=void 0),{action:r,method:l.toLowerCase(),encType:u,formData:d,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pf(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Og(n,i,l,r){let u=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${r}`:u.pathname=`${u.pathname}.${r}`:u.pathname==="/"?u.pathname=`_root.${r}`:i&&kn(u.pathname,i)==="/"?u.pathname=`${Xr(i)}/_root.${r}`:u.pathname=`${Xr(u.pathname)}.${r}`,u}async function pT(n,i){if(n.id in i)return i[n.id];try{let l=await import(n.module);return i[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function yT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function gT(n,i,l){let r=await Promise.all(n.map(async u=>{let d=i.routes[u.route.id];if(d){let f=await pT(d,l);return f.links?f.links():[]}return[]}));return ST(r.flat(1).filter(yT).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function qy(n,i,l,r,u,d){let f=(m,p)=>l[p]?m.route.id!==l[p].route.id:!0,h=(m,p)=>{var v;return l[p].pathname!==m.pathname||((v=l[p].route.path)==null?void 0:v.endsWith("*"))&&l[p].params["*"]!==m.params["*"]};return d==="assets"?i.filter((m,p)=>f(m,p)||h(m,p)):d==="data"?i.filter((m,p)=>{var x;let v=r.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(f(m,p)||h(m,p))return!0;if(m.route.shouldRevalidate){let S=m.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:((x=l[0])==null?void 0:x.params)||{},nextUrl:new URL(n,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function vT(n,i,{includeHydrateFallback:l}={}){return xT(n.map(r=>{let u=i.routes[r.route.id];if(!u)return[];let d=[u.module];return u.clientActionModule&&(d=d.concat(u.clientActionModule)),u.clientLoaderModule&&(d=d.concat(u.clientLoaderModule)),l&&u.hydrateFallbackModule&&(d=d.concat(u.hydrateFallbackModule)),u.imports&&(d=d.concat(u.imports)),d}).flat(1))}function xT(n){return[...new Set(n)]}function bT(n){let i={},l=Object.keys(n).sort();for(let r of l)i[r]=n[r];return i}function ST(n,i){let l=new Set;return new Set(i),n.reduce((r,u)=>{let d=JSON.stringify(bT(u));return l.has(d)||(l.add(d),r.push({key:d,link:u})),r},[])}function Xf(){let n=T.useContext(ki);return Pf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function TT(){let n=T.useContext(ao);return Pf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Kf=T.createContext(void 0);Kf.displayName="FrameworkContext";function so(){let n=T.useContext(Kf);return Pf(n,"You must render this element inside a <HydratedRouter> element"),n}function ET(n,i){let l=T.useContext(Kf),[r,u]=T.useState(!1),[d,f]=T.useState(!1),{onFocus:h,onBlur:m,onMouseEnter:p,onMouseLeave:v,onTouchStart:x}=i,S=T.useRef(null);T.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let w=R=>{R.forEach(O=>{f(O.isIntersecting)})},_=new IntersectionObserver(w,{threshold:.5});return S.current&&_.observe(S.current),()=>{_.disconnect()}}},[n]),T.useEffect(()=>{if(r){let w=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(w)}}},[r]);let E=()=>{u(!0)},A=()=>{u(!1),f(!1)};return l?n!=="intent"?[d,S,{}]:[d,S,{onFocus:Us(h,E),onBlur:Us(m,A),onMouseEnter:Us(p,E),onMouseLeave:Us(v,A),onTouchStart:Us(x,E)}]:[!1,S,{}]}function Us(n,i){return l=>{n&&n(l),l.defaultPrevented||i(l)}}function AT({page:n,...i}){let l=US(),{nonce:r}=so(),{router:u}=Xf(),d=T.useMemo(()=>yg(u.routes,n,u.basename),[u.routes,n,u.basename]);return d?(i.nonce==null&&r&&(i={...i,nonce:r}),l?T.createElement(wT,{page:n,matches:d,...i}):T.createElement(RT,{page:n,matches:d,...i})):null}function CT(n){let{manifest:i,routeModules:l}=so(),[r,u]=T.useState([]);return T.useEffect(()=>{let d=!1;return gT(n,i,l).then(f=>{d||u(f)}),()=>{d=!0}},[n,i,l]),r}function wT({page:n,matches:i,...l}){let r=ln(),{future:u}=so(),{basename:d}=Xf(),f=T.useMemo(()=>{if(n===r.pathname+r.search+r.hash)return[];let h=Og(n,d,u.v8_trailingSlashAwareDataRequests,"rsc"),m=!1,p=[];for(let v of i)typeof v.route.shouldRevalidate=="function"?m=!0:p.push(v.route.id);return m&&p.length>0&&h.searchParams.set("_routes",p.join(",")),[h.pathname+h.search]},[d,u.v8_trailingSlashAwareDataRequests,n,r,i]);return T.createElement(T.Fragment,null,f.map(h=>T.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...l})))}function RT({page:n,matches:i,...l}){let r=ln(),{future:u,manifest:d,routeModules:f}=so(),{basename:h}=Xf(),{loaderData:m,matches:p}=TT(),v=T.useMemo(()=>qy(n,i,p,d,r,"data"),[n,i,p,d,r]),x=T.useMemo(()=>qy(n,i,p,d,r,"assets"),[n,i,p,d,r]),S=T.useMemo(()=>{if(n===r.pathname+r.search+r.hash)return[];let w=new Set,_=!1;if(i.forEach(O=>{var M;let D=d.routes[O.route.id];!D||!D.hasLoader||(!v.some(H=>H.route.id===O.route.id)&&O.route.id in m&&((M=f[O.route.id])!=null&&M.shouldRevalidate)||D.hasClientLoader?_=!0:w.add(O.route.id))}),w.size===0)return[];let R=Og(n,h,u.v8_trailingSlashAwareDataRequests,"data");return _&&w.size>0&&R.searchParams.set("_routes",i.filter(O=>w.has(O.route.id)).map(O=>O.route.id).join(",")),[R.pathname+R.search]},[h,u.v8_trailingSlashAwareDataRequests,m,r,d,v,i,n,f]),E=T.useMemo(()=>vT(x,d),[x,d]),A=CT(x);return T.createElement(T.Fragment,null,S.map(w=>T.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...l})),E.map(w=>T.createElement("link",{key:w,rel:"modulepreload",href:w,...l})),A.map(({key:w,link:_})=>T.createElement("link",{key:w,nonce:l.nonce,..._,crossOrigin:_.crossOrigin??l.crossOrigin})))}function _T(...n){return i=>{n.forEach(l=>{typeof l=="function"?l(i):l!=null&&(l.current=i)})}}var NT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{NT&&(window.__reactRouterVersion="7.18.1")}catch{}function jT({basename:n,children:i,useTransitions:l,window:r}){let u=T.useRef();u.current==null&&(u.current=uS({window:r,v5Compat:!0}));let d=u.current,[f,h]=T.useState({action:d.action,location:d.location}),m=T.useCallback(p=>{l===!1?h(p):T.startTransition(()=>h(p))},[l]);return T.useLayoutEffect(()=>d.listen(m),[d,m]),T.createElement(lT,{basename:n,children:i,location:f.location,navigationType:f.action,navigator:d,useTransitions:l})}var en=T.forwardRef(function({onClick:i,discover:l="render",prefetch:r="none",relative:u,reloadDocument:d,replace:f,mask:h,state:m,target:p,to:v,preventScrollReset:x,viewTransition:S,defaultShouldRevalidate:E,...A},w){let{basename:_,navigator:R,useTransitions:O}=T.useContext(ze),D=typeof v=="string"&&Bf.test(v),M=Eg(v,_);v=M.to;let H=PS(v,{relative:u}),$=ln(),V=null;if(h){let Q=no(h,[],$.mask?$.mask.pathname:"/",!0);_!=="/"&&(Q.pathname=Q.pathname==="/"?_:tn([_,Q.pathname])),V=R.createHref(Q)}let[q,Z,F]=ET(r,A),I=zT(v,{replace:f,mask:h,state:m,target:p,preventScrollReset:x,relative:u,viewTransition:S,defaultShouldRevalidate:E,useTransitions:O});function ut(Q){i&&i(Q),Q.defaultPrevented||I(Q)}let Tt=!(M.isExternal||d),pt=T.createElement("a",{...A,...F,href:(Tt?V:void 0)||M.absoluteURL||H,onClick:Tt?ut:i,ref:_T(w,Z),target:p,"data-discover":!D&&l==="render"?"true":void 0});return q&&!D?T.createElement(T.Fragment,null,pt,T.createElement(AT,{page:H})):pt});en.displayName="Link";var DT=T.forwardRef(function({"aria-current":i="page",caseSensitive:l=!1,className:r="",end:u=!1,style:d,to:f,viewTransition:h,children:m,...p},v){let x=tl(f,{relative:p.relative}),S=ln(),E=T.useContext(ao),{navigator:A,basename:w}=T.useContext(ze),_=E!=null&&BT(x)&&h===!0,R=A.encodeLocation?A.encodeLocation(x).pathname:x.pathname,O=S.pathname,D=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;l||(O=O.toLowerCase(),D=D?D.toLowerCase():null,R=R.toLowerCase()),D&&w&&(D=kn(D,w)||D);const M=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let H=O===R||!u&&O.startsWith(R)&&O.charAt(M)==="/",$=D!=null&&(D===R||!u&&D.startsWith(R)&&D.charAt(R.length)==="/"),V={isActive:H,isPending:$,isTransitioning:_},q=H?i:void 0,Z;typeof r=="function"?Z=r(V):Z=[r,H?"active":null,$?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let F=typeof d=="function"?d(V):d;return T.createElement(en,{...p,"aria-current":q,className:Z,ref:v,style:F,to:f,viewTransition:h},typeof m=="function"?m(V):m)});DT.displayName="NavLink";var MT=T.forwardRef(({discover:n="render",fetcherKey:i,navigate:l,reloadDocument:r,replace:u,state:d,method:f=zr,action:h,onSubmit:m,relative:p,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:S,...E},A)=>{let{useTransitions:w}=T.useContext(ze),_=UT(),R=VT(h,{relative:p}),O=f.toLowerCase()==="get"?"get":"post",D=typeof h=="string"&&Bf.test(h),M=H=>{if(m&&m(H),H.defaultPrevented)return;H.preventDefault();let $=H.nativeEvent.submitter,V=($==null?void 0:$.getAttribute("formmethod"))||f,q=()=>_($||H.currentTarget,{fetcherKey:i,method:V,navigate:l,replace:u,state:d,relative:p,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:S});w&&l!==!1?T.startTransition(()=>q()):q()};return T.createElement("form",{ref:A,method:O,action:R,onSubmit:r?m:M,...E,"data-discover":!D&&n==="render"?"true":void 0})});MT.displayName="Form";function OT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zg(n){let i=T.useContext(ki);return Gt(i,OT(n)),i}function zT(n,{target:i,replace:l,mask:r,state:u,preventScrollReset:d,relative:f,viewTransition:h,defaultShouldRevalidate:m,useTransitions:p}={}){let v=pa(),x=ln(),S=tl(n,{relative:f});return T.useCallback(E=>{if(fT(E,i)){E.preventDefault();let A=l!==void 0?l:Xs(x)===Xs(S),w=()=>v(n,{replace:A,mask:r,state:u,preventScrollReset:d,relative:f,viewTransition:h,defaultShouldRevalidate:m});p?T.startTransition(()=>w()):w()}},[x,v,S,l,r,u,i,n,d,f,h,m,p])}var LT=0,kT=()=>`__${String(++LT)}__`;function UT(){let{router:n}=zg("useSubmit"),{basename:i}=T.useContext(ze),l=nT(),r=n.fetch,u=n.navigate;return T.useCallback(async(d,f={})=>{let{action:h,method:m,encType:p,formData:v,body:x}=mT(d,i);if(f.navigate===!1){let S=f.fetcherKey||kT();await r(S,l,f.action||h,{defaultShouldRevalidate:f.defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:v,body:x,formMethod:f.method||m,formEncType:f.encType||p,flushSync:f.flushSync})}else await u(f.action||h,{defaultShouldRevalidate:f.defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:v,body:x,formMethod:f.method||m,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:l,flushSync:f.flushSync,viewTransition:f.viewTransition})},[r,u,i,l])}function VT(n,{relative:i}={}){let{basename:l}=T.useContext(ze),r=T.useContext(sn);Gt(r,"useFormAction must be used inside a RouteContext");let[u]=r.matches.slice(-1),d={...tl(n||".",{relative:i})},f=ln();if(n==null){d.search=f.search;let h=new URLSearchParams(d.search),m=h.getAll("index");if(m.some(v=>v==="")){h.delete("index"),m.filter(x=>x).forEach(x=>h.append("index",x));let v=h.toString();d.search=v?`?${v}`:""}}return(!n||n===".")&&u.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(d.pathname=d.pathname==="/"?l:tn([l,d.pathname])),Xs(d)}function BT(n,{relative:i}={}){let l=T.useContext(wg);Gt(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=zg("useViewTransitionState"),u=tl(n,{relative:i});if(!l.isTransitioning)return!1;let d=kn(l.currentLocation.pathname,r)||l.currentLocation.pathname,f=kn(l.nextLocation.pathname,r)||l.nextLocation.pathname;return Pr(u.pathname,f)!=null||Pr(u.pathname,d)!=null}function Lg(n){var i,l,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(i=0;i<u;i++)n[i]&&(l=Lg(n[i]))&&(r&&(r+=" "),r+=l)}else for(l in n)n[l]&&(r&&(r+=" "),r+=l);return r}function Ha(){for(var n,i,l=0,r="",u=arguments.length;l<u;l++)(n=arguments[l])&&(i=Lg(n))&&(r&&(r+=" "),r+=i);return r}var el=n=>typeof n=="number"&&!isNaN(n),qa=n=>typeof n=="string",Un=n=>typeof n=="function",HT=n=>qa(n)||el(n),uf=n=>qa(n)||Un(n)?n:null,GT=(n,i)=>n===!1||el(n)&&n>0?n:i,cf=n=>T.isValidElement(n)||qa(n)||Un(n)||el(n);function YT(n,i,l=300){let{scrollHeight:r,style:u}=n;requestAnimationFrame(()=>{u.minHeight="initial",u.height=r+"px",u.transition=`all ${l}ms`,requestAnimationFrame(()=>{u.height="0",u.padding="0",u.margin="0",setTimeout(i,l)})})}function qT({enter:n,exit:i,appendPosition:l=!1,collapse:r=!0,collapseDuration:u=300}){return function({children:d,position:f,preventExitTransition:h,done:m,nodeRef:p,isIn:v,playToast:x}){let S=l?`${n}--${f}`:n,E=l?`${i}--${f}`:i,A=T.useRef(0);return T.useLayoutEffect(()=>{let w=p.current,_=S.split(" "),R=O=>{O.target===p.current&&(x(),w.removeEventListener("animationend",R),w.removeEventListener("animationcancel",R),A.current===0&&O.type!=="animationcancel"&&w.classList.remove(..._))};w.classList.add(..._),w.addEventListener("animationend",R),w.addEventListener("animationcancel",R)},[]),T.useEffect(()=>{let w=p.current,_=()=>{w.removeEventListener("animationend",_),r?YT(w,m,u):m()};v||(h?_():(A.current=1,w.className+=` ${E}`,w.addEventListener("animationend",_)))},[v]),_t.createElement(_t.Fragment,null,d)}}function Py(n,i){return{content:kg(n.content,n.props),containerId:n.props.containerId,id:n.props.toastId,theme:n.props.theme,type:n.props.type,data:n.props.data||{},isLoading:n.props.isLoading,icon:n.props.icon,reason:n.removalReason,status:i}}function kg(n,i,l=!1){return T.isValidElement(n)&&!qa(n.type)?T.cloneElement(n,{closeToast:i.closeToast,toastProps:i,data:i.data,isPaused:l}):Un(n)?n({closeToast:i.closeToast,toastProps:i,data:i.data,isPaused:l}):n}function PT({closeToast:n,theme:i,ariaLabel:l="close"}){return _t.createElement("button",{className:`Toastify__close-button Toastify__close-button--${i}`,type:"button",onClick:r=>{r.stopPropagation(),n(!0)},"aria-label":l},_t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},_t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function XT({delay:n,isRunning:i,closeToast:l,type:r="default",hide:u,className:d,controlledProgress:f,progress:h,rtl:m,isIn:p,theme:v}){let x=u||f&&h===0,S={animationDuration:`${n}ms`,animationPlayState:i?"running":"paused"};f&&(S.transform=`scaleX(${h})`);let E=Ha("Toastify__progress-bar",f?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${v}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":m}),A=Un(d)?d({rtl:m,type:r,defaultClassName:E}):Ha(E,d),w={[f&&h>=1?"onTransitionEnd":"onAnimationEnd"]:f&&h<1?null:()=>{p&&l()}};return _t.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},_t.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${v} Toastify__progress-bar--${r}`}),_t.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer","aria-valuenow":f?Math.round(h*100):void 0,"aria-valuemin":0,"aria-valuemax":100,className:A,style:S,...w}))}var KT=1,Ug=()=>`${KT++}`;function QT(n,i,l){let r=1,u=0,d=[],f=[],h=i,m=new Map,p=new Set,v=O=>(p.add(O),()=>p.delete(O)),x=()=>{f=Array.from(m.values()),p.forEach(O=>O())},S=({containerId:O,toastId:D,updateId:M})=>{let H=O?O!==n:n!==1,$=m.has(D)&&M==null;return H||$},E=(O,D)=>{m.forEach(M=>{var H;(D==null||D===M.props.toastId)&&((H=M.toggle)==null||H.call(M,O))})},A=O=>{var D,M;O.isActive&&((M=(D=O.props)==null?void 0:D.onClose)==null||M.call(D,O.removalReason),O.isActive=!1,l(Py(O,"removed")))},w=O=>{if(O==null)m.forEach(A);else{let D=m.get(O);D&&A(D)}x()},_=()=>{u-=d.length,d=[]},R=O=>{var D,M;let{toastId:H,updateId:$}=O.props,V=$==null;O.staleId&&m.delete(O.staleId),O.isActive=!0,m.set(H,O),x(),l(Py(O,V?"added":"updated")),V&&((M=(D=O.props).onOpen)==null||M.call(D))};return{id:n,props:h,observe:v,toggle:E,removeToast:w,toasts:m,clearQueue:_,buildToast:(O,D)=>{if(S(D))return;let{toastId:M,updateId:H,data:$,staleId:V,delay:q}=D,Z=H==null;Z&&u++;let F={...h,style:h.toastStyle,key:r++,...Object.fromEntries(Object.entries(D).filter(([ut,Tt])=>Tt!=null)),toastId:M,updateId:H,data:$,isIn:!1,className:uf(D.className||h.toastClassName),progressClassName:uf(D.progressClassName||h.progressClassName),autoClose:D.isLoading?!1:GT(D.autoClose,h.autoClose),closeToast(ut){let Tt=m.get(M);Tt&&(Tt.removalReason=ut,w(M))},deleteToast(){if(m.get(M)!=null){if(m.delete(M),u--,u<0&&(u=0),d.length>0){R(d.shift());return}x()}}};F.closeButton=h.closeButton,D.closeButton===!1||cf(D.closeButton)?F.closeButton=D.closeButton:D.closeButton===!0&&(F.closeButton=cf(h.closeButton)?h.closeButton:!0);let I={content:O,props:F,staleId:V};h.limit&&h.limit>0&&u>h.limit&&Z?d.push(I):el(q)?setTimeout(()=>{R(I)},q):R(I)},setProps(O){h=O},setToggle:(O,D)=>{let M=m.get(O);M&&(M.toggle=D)},isToastActive:O=>{var D;return(D=m.get(O))==null?void 0:D.isActive},getSnapshot:()=>f}}var he=new Map,Ks=[],ff=new Set,ZT=n=>ff.forEach(i=>i(n)),Vg=()=>he.size>0;function $T(){Ks.forEach(n=>Hg(n.content,n.options)),Ks=[]}var FT=(n,{containerId:i})=>{var l;return(l=he.get(i||1))==null?void 0:l.toasts.get(n)};function Bg(n,i){var l;if(i)return!!((l=he.get(i))!=null&&l.isToastActive(n));let r=!1;return he.forEach(u=>{u.isToastActive(n)&&(r=!0)}),r}function JT(n){if(!Vg()){Ks=Ks.filter(i=>n!=null&&i.options.toastId!==n);return}if(n==null||HT(n))he.forEach(i=>{i.removeToast(n)});else if(n&&("containerId"in n||"id"in n)){let i=he.get(n.containerId);i?i.removeToast(n.id):he.forEach(l=>{l.removeToast(n.id)})}}var WT=(n={})=>{he.forEach(i=>{i.props.limit&&(!n.containerId||i.id===n.containerId)&&i.clearQueue()})};function Hg(n,i){cf(n)&&(Vg()||Ks.push({content:n,options:i}),he.forEach(l=>{l.buildToast(n,i)}))}function IT(n){var i;(i=he.get(n.containerId||1))==null||i.setToggle(n.id,n.fn)}function Gg(n,i){he.forEach(l=>{(i==null||!(i!=null&&i.containerId)||(i==null?void 0:i.containerId)===l.id)&&l.toggle(n,i==null?void 0:i.id)})}function t2(n){let i=n.containerId||1;return{subscribe(l){let r=QT(i,n,ZT);he.set(i,r);let u=r.observe(l);return $T(),()=>{u(),he.delete(i)}},setProps(l){var r;(r=he.get(i))==null||r.setProps(l)},getSnapshot(){var l;return(l=he.get(i))==null?void 0:l.getSnapshot()}}}function e2(n){return ff.add(n),()=>{ff.delete(n)}}function n2(n){return n&&(qa(n.toastId)||el(n.toastId))?n.toastId:Ug()}function nl(n,i){return Hg(n,i),i.toastId}function lo(n,i){return{...i,type:i&&i.type||n,toastId:n2(i)}}function ro(n){return(i,l)=>nl(i,lo(n,l))}function lt(n,i){return nl(n,lo("default",i))}lt.loading=(n,i)=>nl(n,lo("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...i}));function a2(n,{pending:i,error:l,success:r},u){let d;i&&(d=qa(i)?lt.loading(i,u):lt.loading(i.render,{...u,...i}));let f={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},h=(p,v,x)=>{if(v==null){lt.dismiss(d);return}let S={type:p,...f,...u,data:x},E=qa(v)?{render:v}:v;return d?lt.update(d,{...S,...E}):lt(E.render,{...S,...E}),x},m=Un(n)?n():n;return m.then(p=>h("success",r,p)).catch(p=>h("error",l,p)),m}lt.promise=a2;lt.success=ro("success");lt.info=ro("info");lt.error=ro("error");lt.warning=ro("warning");lt.warn=lt.warning;lt.dark=(n,i)=>nl(n,lo("default",{theme:"dark",...i}));function i2(n){JT(n)}lt.dismiss=i2;lt.clearWaitingQueue=WT;lt.isActive=Bg;lt.update=(n,i={})=>{let l=FT(n,i);if(l){let{props:r,content:u}=l,d={delay:100,...r,...i,toastId:i.toastId||n,updateId:Ug()};d.toastId!==n&&(d.staleId=n);let f=d.render||u;delete d.render,nl(f,d)}};lt.done=n=>{lt.update(n,{progress:1})};lt.onChange=e2;lt.play=n=>Gg(!0,n);lt.pause=n=>Gg(!1,n);function s2(n){var i;let{subscribe:l,getSnapshot:r,setProps:u}=T.useRef(t2(n)).current;u(n);let d=(i=T.useSyncExternalStore(l,r,r))==null?void 0:i.slice();function f(h){if(!d)return[];let m=new Map;return n.newestOnTop&&d.reverse(),d.forEach(p=>{let{position:v}=p.props;m.has(v)||m.set(v,[]),m.get(v).push(p)}),Array.from(m,p=>h(p[0],p[1]))}return{getToastToRender:f,isToastActive:Bg,count:d==null?void 0:d.length}}function l2(n){let[i,l]=T.useState(!1),[r,u]=T.useState(!1),d=T.useRef(null),f=T.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:h,pauseOnHover:m,closeToast:p,onClick:v,closeOnClick:x}=n;IT({id:n.toastId,containerId:n.containerId,fn:l}),T.useEffect(()=>{if(n.pauseOnFocusLoss)return S(),()=>{E()}},[n.pauseOnFocusLoss]);function S(){document.hasFocus()||R(),window.addEventListener("focus",_),window.addEventListener("blur",R)}function E(){window.removeEventListener("focus",_),window.removeEventListener("blur",R)}function A(V){if(n.draggable===!0||n.draggable===V.pointerType){O();let q=d.current;f.canCloseOnClick=!0,f.canDrag=!0,q.style.transition="none",n.draggableDirection==="x"?(f.start=V.clientX,f.removalDistance=q.offsetWidth*(n.draggablePercent/100)):(f.start=V.clientY,f.removalDistance=q.offsetHeight*(n.draggablePercent===80?n.draggablePercent*1.5:n.draggablePercent)/100)}}function w(V){let{top:q,bottom:Z,left:F,right:I}=d.current.getBoundingClientRect();V.pointerType==="mouse"&&n.pauseOnHover&&V.clientX>=F&&V.clientX<=I&&V.clientY>=q&&V.clientY<=Z?R():_()}function _(){l(!0)}function R(){l(!1)}function O(){f.didMove=!1,document.addEventListener("pointermove",M),document.addEventListener("pointerup",H)}function D(){document.removeEventListener("pointermove",M),document.removeEventListener("pointerup",H)}function M(V){let q=d.current;if(f.canDrag&&q){f.didMove=!0,i&&R(),n.draggableDirection==="x"?f.delta=V.clientX-f.start:f.delta=V.clientY-f.start,f.start!==V.clientX&&(f.canCloseOnClick=!1);let Z=n.draggableDirection==="x"?`${f.delta}px, var(--y)`:`0, calc(${f.delta}px + var(--y))`;q.style.transform=`translate3d(${Z},0)`,q.style.opacity=`${1-Math.abs(f.delta/f.removalDistance)}`}}function H(){D();let V=d.current;if(f.canDrag&&f.didMove&&V){if(f.canDrag=!1,Math.abs(f.delta)>f.removalDistance){u(!0),n.closeToast(!0),n.collapseAll();return}V.style.transition="transform 0.2s, opacity 0.2s",V.style.removeProperty("transform"),V.style.removeProperty("opacity")}}let $={onPointerDown:A,onPointerUp:w};return h&&m&&($.onMouseEnter=R,n.stacked||($.onMouseLeave=_)),x&&($.onClick=V=>{v&&v(V),f.canCloseOnClick&&p(!0)}),{playToast:_,pauseToast:R,isRunning:i,preventExitTransition:r,toastRef:d,eventHandlers:$}}var Yg=typeof window<"u"?T.useLayoutEffect:T.useEffect,oo=({theme:n,type:i,isLoading:l,...r})=>_t.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:n==="colored"?"currentColor":`var(--toastify-icon-color-${i})`,...r});function r2(n){return _t.createElement(oo,{...n},_t.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function o2(n){return _t.createElement(oo,{...n},_t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function u2(n){return _t.createElement(oo,{...n},_t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function c2(n){return _t.createElement(oo,{...n},_t.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function f2(){return _t.createElement("div",{className:"Toastify__spinner"})}var df={info:o2,warning:r2,success:u2,error:c2,spinner:f2},d2=n=>n in df;function h2({theme:n,type:i,isLoading:l,icon:r}){let u=null,d={theme:n,type:i};return r===!1||(Un(r)?u=r({...d,isLoading:l}):T.isValidElement(r)?u=T.cloneElement(r,d):l?u=df.spinner():d2(i)&&(u=df[i](d))),u}var m2=n=>{let{isRunning:i,preventExitTransition:l,toastRef:r,eventHandlers:u,playToast:d}=l2(n),{closeButton:f,children:h,autoClose:m,onClick:p,type:v,hideProgressBar:x,closeToast:S,transition:E,position:A,className:w,style:_,progressClassName:R,updateId:O,role:D,progress:M,rtl:H,toastId:$,deleteToast:V,isIn:q,isLoading:Z,closeOnClick:F,theme:I,ariaLabel:ut}=n,Tt=Ha("Toastify__toast",`Toastify__toast-theme--${I}`,`Toastify__toast--${v}`,{"Toastify__toast--rtl":H},{"Toastify__toast--close-on-click":F}),pt=Un(w)?w({rtl:H,position:A,type:v,defaultClassName:Tt}):Ha(Tt,w),Q=h2(n),L=!!M||!m,J={closeToast:S,type:v,theme:I},tt=null;return f===!1||(Un(f)?tt=f(J):T.isValidElement(f)?tt=T.cloneElement(f,J):tt=PT(J)),_t.createElement(E,{isIn:q,done:V,position:A,preventExitTransition:l,nodeRef:r,playToast:d},_t.createElement("div",{id:$,tabIndex:0,onClick:p,"data-in":q,className:pt,...u,style:_,ref:r,...q&&{role:D,"aria-label":ut}},Q!=null&&_t.createElement("div",{className:Ha("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!Z})},Q),kg(h,n,!i),tt,!n.customProgressBar&&_t.createElement(XT,{...O&&!L?{key:`p-${O}`}:{},rtl:H,theme:I,delay:m,isRunning:i,isIn:q,closeToast:S,hide:x,type:v,className:R,controlledProgress:L,progress:M||0})))},p2=(n,i=!1)=>({enter:`Toastify--animate Toastify__${n}-enter`,exit:`Toastify--animate Toastify__${n}-exit`,appendPosition:i}),y2=qT(p2("bounce",!0)),g2={position:"top-right",transition:y2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:n=>n.altKey&&n.code==="KeyT"};function v2(n){let i={...g2,...n},l=n.stacked,[r,u]=T.useState(!0),d=T.useRef(null),{getToastToRender:f,isToastActive:h,count:m}=s2(i),{className:p,style:v,rtl:x,containerId:S,hotKeys:E}=i;function A(_){let R=Ha("Toastify__toast-container",`Toastify__toast-container--${_}`,{"Toastify__toast-container--rtl":x});return Un(p)?p({position:_,rtl:x,defaultClassName:R}):Ha(R,uf(p))}function w(){l&&(u(!0),lt.play())}return Yg(()=>{var _;if(l){let R=d.current.querySelectorAll('[data-in="true"]'),O=12,D=(_=i.position)==null?void 0:_.includes("top"),M=0,H=0;Array.from(R).reverse().forEach(($,V)=>{let q=$;q.classList.add("Toastify__toast--stacked"),V>0&&(q.dataset.collapsed=`${r}`),q.dataset.pos||(q.dataset.pos=D?"top":"bot");let Z=M*(r?.2:1)+(r?0:O*V),F=Math.max(.5,1-(r?H:0));q.style.setProperty("--y",`${D?Z:Z*-1}px`),q.style.setProperty("--g",`${O}`),q.style.setProperty("--s",`${F}`),M+=q.offsetHeight,H+=.025})}},[r,m,l]),T.useEffect(()=>{function _(R){var O;let D=d.current;E(R)&&((O=D==null?void 0:D.querySelector('[tabIndex="0"]'))==null||O.focus(),u(!1),lt.pause()),R.key==="Escape"&&(document.activeElement===D||D!=null&&D.contains(document.activeElement))&&(u(!0),lt.play())}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[E]),_t.createElement("section",{ref:d,className:"Toastify",id:S,onMouseEnter:()=>{l&&(u(!1),lt.pause())},onMouseLeave:w,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":i["aria-label"]},f((_,R)=>{let O=R.length?{...v}:{...v,pointerEvents:"none"};return _t.createElement("div",{tabIndex:-1,className:A(_),"data-stacked":l,style:O,key:`c-${_}`},R.map(({content:D,props:M})=>_t.createElement(m2,{...M,stacked:l,collapseAll:w,isIn:h(M.toastId,M.containerId),key:`t-${M.key}`},D)))}))}var x2=`:root {
--toastify-color-light: #fff;
--toastify-color-dark: #121212;
--toastify-color-info: #3498db;
--toastify-color-success: #07bc0c;
--toastify-color-warning: #f1c40f;
--toastify-color-error: hsl(6, 78%, 57%);
--toastify-color-transparent: rgba(255, 255, 255, 0.7);
--toastify-icon-color-info: var(--toastify-color-info);
--toastify-icon-color-success: var(--toastify-color-success);
--toastify-icon-color-warning: var(--toastify-color-warning);
--toastify-icon-color-error: var(--toastify-color-error);
--toastify-container-width: fit-content;
--toastify-toast-width: 320px;
--toastify-toast-offset: 16px;
--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));
--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));
--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));
--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));
--toastify-toast-background: #fff;
--toastify-toast-padding: 14px;
--toastify-toast-min-height: 64px;
--toastify-toast-max-height: 800px;
--toastify-toast-bd-radius: 6px;
--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
--toastify-font-family: sans-serif;
--toastify-z-index: 9999;
--toastify-text-color-light: #757575;
--toastify-text-color-dark: #fff;
/* Used only for colored theme */
--toastify-text-color-info: #fff;
--toastify-text-color-success: #fff;
--toastify-text-color-warning: #fff;
--toastify-text-color-error: #fff;
--toastify-spinner-color: #616161;
--toastify-spinner-color-empty-area: #e0e0e0;
--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);
--toastify-color-progress-dark: #bb86fc;
--toastify-color-progress-info: var(--toastify-color-info);
--toastify-color-progress-success: var(--toastify-color-success);
--toastify-color-progress-warning: var(--toastify-color-warning);
--toastify-color-progress-error: var(--toastify-color-error);
/* used to control the opacity of the progress trail */
--toastify-color-progress-bgo: 0.2;
}
.Toastify__toast-container {
z-index: var(--toastify-z-index);
-webkit-transform: translate3d(0, 0, var(--toastify-z-index));
position: fixed;
width: var(--toastify-container-width);
box-sizing: border-box;
color: #fff;
display: flex;
flex-direction: column;
}
.Toastify__toast-container--top-left {
top: var(--toastify-toast-top);
left: var(--toastify-toast-left);
}
.Toastify__toast-container--top-center {
top: var(--toastify-toast-top);
left: 50%;
transform: translateX(-50%);
align-items: center;
}
.Toastify__toast-container--top-right {
top: var(--toastify-toast-top);
right: var(--toastify-toast-right);
align-items: end;
}
.Toastify__toast-container--bottom-left {
bottom: var(--toastify-toast-bottom);
left: var(--toastify-toast-left);
}
.Toastify__toast-container--bottom-center {
bottom: var(--toastify-toast-bottom);
left: 50%;
transform: translateX(-50%);
align-items: center;
}
.Toastify__toast-container--bottom-right {
bottom: var(--toastify-toast-bottom);
right: var(--toastify-toast-right);
align-items: end;
}
.Toastify__toast {
--y: 0px;
position: relative;
touch-action: none;
width: var(--toastify-toast-width);
min-height: var(--toastify-toast-min-height);
box-sizing: border-box;
margin-bottom: 1rem;
padding: var(--toastify-toast-padding);
border-radius: var(--toastify-toast-bd-radius);
box-shadow: var(--toastify-toast-shadow);
max-height: var(--toastify-toast-max-height);
font-family: var(--toastify-font-family);
/* webkit only issue #791 */
z-index: 0;
/* inner swag */
display: flex;
flex: 1 auto;
align-items: center;
word-break: break-word;
}
@media only screen and (max-width: 480px) {
.Toastify__toast-container {
width: 100vw;
left: env(safe-area-inset-left);
margin: 0;
}
.Toastify__toast-container--top-left,
.Toastify__toast-container--top-center,
.Toastify__toast-container--top-right {
top: env(safe-area-inset-top);
transform: translateX(0);
}
.Toastify__toast-container--bottom-left,
.Toastify__toast-container--bottom-center,
.Toastify__toast-container--bottom-right {
bottom: env(safe-area-inset-bottom);
transform: translateX(0);
}
.Toastify__toast-container--rtl {
right: env(safe-area-inset-right);
left: initial;
}
.Toastify__toast {
--toastify-toast-width: 100%;
margin-bottom: 0;
border-radius: 0;
}
}
.Toastify__toast-container[data-stacked='true'] {
width: var(--toastify-toast-width);
}
@media only screen and (max-width: 480px) {
.Toastify__toast-container[data-stacked='true'] {
width: 100vw;
}
}
.Toastify__toast--stacked {
position: absolute;
width: 100%;
transform: translate3d(0, var(--y), 0) scale(var(--s));
transition: transform 0.3s;
}
.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,
.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {
transition: opacity 0.1s;
}
.Toastify__toast--stacked[data-collapsed='false'] {
overflow: visible;
}
.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {
opacity: 0;
}
.Toastify__toast--stacked:after {
content: '';
position: absolute;
left: 0;
right: 0;
height: calc(var(--g) * 1px);
bottom: 100%;
}
.Toastify__toast--stacked[data-pos='top'] {
top: 0;
}
.Toastify__toast--stacked[data-pos='bot'] {
bottom: 0;
}
.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {
transform-origin: top;
}
.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {
transform-origin: bottom;
}
.Toastify__toast--stacked:before {
content: '';
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 100%;
transform: scaleY(3);
z-index: -1;
}
.Toastify__toast--rtl {
direction: rtl;
}
.Toastify__toast--close-on-click {
cursor: pointer;
}
.Toastify__toast-icon {
margin-inline-end: 10px;
width: 22px;
flex-shrink: 0;
display: flex;
}
.Toastify--animate {
animation-fill-mode: both;
animation-duration: 0.5s;
}
.Toastify--animate-icon {
animation-fill-mode: both;
animation-duration: 0.3s;
}
.Toastify__toast-theme--dark {
background: var(--toastify-color-dark);
color: var(--toastify-text-color-dark);
}
.Toastify__toast-theme--light {
background: var(--toastify-color-light);
color: var(--toastify-text-color-light);
}
.Toastify__toast-theme--colored.Toastify__toast--default {
background: var(--toastify-color-light);
color: var(--toastify-text-color-light);
}
.Toastify__toast-theme--colored.Toastify__toast--info {
color: var(--toastify-text-color-info);
background: var(--toastify-color-info);
}
.Toastify__toast-theme--colored.Toastify__toast--success {
color: var(--toastify-text-color-success);
background: var(--toastify-color-success);
}
.Toastify__toast-theme--colored.Toastify__toast--warning {
color: var(--toastify-text-color-warning);
background: var(--toastify-color-warning);
}
.Toastify__toast-theme--colored.Toastify__toast--error {
color: var(--toastify-text-color-error);
background: var(--toastify-color-error);
}
.Toastify__progress-bar-theme--light {
background: var(--toastify-color-progress-light);
}
.Toastify__progress-bar-theme--dark {
background: var(--toastify-color-progress-dark);
}
.Toastify__progress-bar--info {
background: var(--toastify-color-progress-info);
}
.Toastify__progress-bar--success {
background: var(--toastify-color-progress-success);
}
.Toastify__progress-bar--warning {
background: var(--toastify-color-progress-warning);
}
.Toastify__progress-bar--error {
background: var(--toastify-color-progress-error);
}
.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,
.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,
.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,
.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {
background: var(--toastify-color-transparent);
}
.Toastify__close-button {
color: #fff;
position: absolute;
top: 6px;
right: 6px;
background: transparent;
outline: none;
border: none;
padding: 0;
cursor: pointer;
opacity: 0.7;
transition: 0.3s ease;
z-index: 1;
}
.Toastify__toast--rtl .Toastify__close-button {
left: 6px;
right: unset;
}
.Toastify__close-button--light {
color: #000;
opacity: 0.3;
}
.Toastify__close-button > svg {
fill: currentColor;
height: 16px;
width: 14px;
}
.Toastify__close-button:hover,
.Toastify__close-button:focus {
opacity: 1;
}
@keyframes Toastify__trackProgress {
0% {
transform: scaleX(1);
}
100% {
transform: scaleX(0);
}
}
.Toastify__progress-bar {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
opacity: 0.7;
transform-origin: left;
}
.Toastify__progress-bar--animated {
animation: Toastify__trackProgress linear 1 forwards;
}
.Toastify__progress-bar--controlled {
transition: transform 0.2s;
}
.Toastify__progress-bar--rtl {
right: 0;
left: initial;
transform-origin: right;
border-bottom-left-radius: initial;
}
.Toastify__progress-bar--wrp {
position: absolute;
overflow: hidden;
bottom: 0;
left: 0;
width: 100%;
height: 5px;
border-bottom-left-radius: var(--toastify-toast-bd-radius);
border-bottom-right-radius: var(--toastify-toast-bd-radius);
}
.Toastify__progress-bar--wrp[data-hidden='true'] {
opacity: 0;
}
.Toastify__progress-bar--bg {
opacity: var(--toastify-color-progress-bgo);
width: 100%;
height: 100%;
}
.Toastify__spinner {
width: 20px;
height: 20px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: var(--toastify-spinner-color-empty-area);
border-right-color: var(--toastify-spinner-color);
animation: Toastify__spin 0.65s linear infinite;
}
@keyframes Toastify__bounceInRight {
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {
opacity: 0;
transform: translate3d(3000px, 0, 0);
}
60% {
opacity: 1;
transform: translate3d(-25px, 0, 0);
}
75% {
transform: translate3d(10px, 0, 0);
}
90% {
transform: translate3d(-5px, 0, 0);
}
to {
transform: none;
}
}
@keyframes Toastify__bounceOutRight {
20% {
opacity: 1;
transform: translate3d(-20px, var(--y), 0);
}
to {
opacity: 0;
transform: translate3d(2000px, var(--y), 0);
}
}
@keyframes Toastify__bounceInLeft {
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
transform: translate3d(-3000px, 0, 0);
}
60% {
opacity: 1;
transform: translate3d(25px, 0, 0);
}
75% {
transform: translate3d(-10px, 0, 0);
}
90% {
transform: translate3d(5px, 0, 0);
}
to {
transform: none;
}
}
@keyframes Toastify__bounceOutLeft {
20% {
opacity: 1;
transform: translate3d(20px, var(--y), 0);
}
to {
opacity: 0;
transform: translate3d(-2000px, var(--y), 0);
}
}
@keyframes Toastify__bounceInUp {
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {
opacity: 0;
transform: translate3d(0, 3000px, 0);
}
60% {
opacity: 1;
transform: translate3d(0, -20px, 0);
}
75% {
transform: translate3d(0, 10px, 0);
}
90% {
transform: translate3d(0, -5px, 0);
}
to {
transform: translate3d(0, 0, 0);
}
}
@keyframes Toastify__bounceOutUp {
20% {
transform: translate3d(0, calc(var(--y) - 10px), 0);
}
40%,
45% {
opacity: 1;
transform: translate3d(0, calc(var(--y) + 20px), 0);
}
to {
opacity: 0;
transform: translate3d(0, -2000px, 0);
}
}
@keyframes Toastify__bounceInDown {
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
transform: translate3d(0, -3000px, 0);
}
60% {
opacity: 1;
transform: translate3d(0, 25px, 0);
}
75% {
transform: translate3d(0, -10px, 0);
}
90% {
transform: translate3d(0, 5px, 0);
}
to {
transform: none;
}
}
@keyframes Toastify__bounceOutDown {
20% {
transform: translate3d(0, calc(var(--y) - 10px), 0);
}
40%,
45% {
opacity: 1;
transform: translate3d(0, calc(var(--y) + 20px), 0);
}
to {
opacity: 0;
transform: translate3d(0, 2000px, 0);
}
}
.Toastify__bounce-enter--top-left,
.Toastify__bounce-enter--bottom-left {
animation-name: Toastify__bounceInLeft;
}
.Toastify__bounce-enter--top-right,
.Toastify__bounce-enter--bottom-right {
animation-name: Toastify__bounceInRight;
}
.Toastify__bounce-enter--top-center {
animation-name: Toastify__bounceInDown;
}
.Toastify__bounce-enter--bottom-center {
animation-name: Toastify__bounceInUp;
}
.Toastify__bounce-exit--top-left,
.Toastify__bounce-exit--bottom-left {
animation-name: Toastify__bounceOutLeft;
}
.Toastify__bounce-exit--top-right,
.Toastify__bounce-exit--bottom-right {
animation-name: Toastify__bounceOutRight;
}
.Toastify__bounce-exit--top-center {
animation-name: Toastify__bounceOutUp;
}
.Toastify__bounce-exit--bottom-center {
animation-name: Toastify__bounceOutDown;
}
@keyframes Toastify__zoomIn {
from {
opacity: 0;
transform: scale3d(0.3, 0.3, 0.3);
}
50% {
opacity: 1;
}
}
@keyframes Toastify__zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);
}
to {
opacity: 0;
}
}
.Toastify__zoom-enter {
animation-name: Toastify__zoomIn;
}
.Toastify__zoom-exit {
animation-name: Toastify__zoomOut;
}
@keyframes Toastify__flipIn {
from {
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
animation-timing-function: ease-in;
opacity: 0;
}
40% {
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
animation-timing-function: ease-in;
}
60% {
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
to {
transform: perspective(400px);
}
}
@keyframes Toastify__flipOut {
from {
transform: translate3d(0, var(--y), 0) perspective(400px);
}
30% {
transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);
opacity: 1;
}
to {
transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);
opacity: 0;
}
}
.Toastify__flip-enter {
animation-name: Toastify__flipIn;
}
.Toastify__flip-exit {
animation-name: Toastify__flipOut;
}
@keyframes Toastify__slideInRight {
from {
transform: translate3d(110%, 0, 0);
visibility: visible;
}
to {
transform: translate3d(0, var(--y), 0);
}
}
@keyframes Toastify__slideInLeft {
from {
transform: translate3d(-110%, 0, 0);
visibility: visible;
}
to {
transform: translate3d(0, var(--y), 0);
}
}
@keyframes Toastify__slideInUp {
from {
transform: translate3d(0, 110%, 0);
visibility: visible;
}
to {
transform: translate3d(0, var(--y), 0);
}
}
@keyframes Toastify__slideInDown {
from {
transform: translate3d(0, -110%, 0);
visibility: visible;
}
to {
transform: translate3d(0, var(--y), 0);
}
}
@keyframes Toastify__slideOutRight {
from {
transform: translate3d(0, var(--y), 0);
}
to {
visibility: hidden;
transform: translate3d(110%, var(--y), 0);
}
}
@keyframes Toastify__slideOutLeft {
from {
transform: translate3d(0, var(--y), 0);
}
to {
visibility: hidden;
transform: translate3d(-110%, var(--y), 0);
}
}
@keyframes Toastify__slideOutDown {
from {
transform: translate3d(0, var(--y), 0);
}
to {
visibility: hidden;
transform: translate3d(0, 500px, 0);
}
}
@keyframes Toastify__slideOutUp {
from {
transform: translate3d(0, var(--y), 0);
}
to {
visibility: hidden;
transform: translate3d(0, -500px, 0);
}
}
.Toastify__slide-enter--top-left,
.Toastify__slide-enter--bottom-left {
animation-name: Toastify__slideInLeft;
}
.Toastify__slide-enter--top-right,
.Toastify__slide-enter--bottom-right {
animation-name: Toastify__slideInRight;
}
.Toastify__slide-enter--top-center {
animation-name: Toastify__slideInDown;
}
.Toastify__slide-enter--bottom-center {
animation-name: Toastify__slideInUp;
}
.Toastify__slide-exit--top-left,
.Toastify__slide-exit--bottom-left {
animation-name: Toastify__slideOutLeft;
animation-timing-function: ease-in;
animation-duration: 0.3s;
}
.Toastify__slide-exit--top-right,
.Toastify__slide-exit--bottom-right {
animation-name: Toastify__slideOutRight;
animation-timing-function: ease-in;
animation-duration: 0.3s;
}
.Toastify__slide-exit--top-center {
animation-name: Toastify__slideOutUp;
animation-timing-function: ease-in;
animation-duration: 0.3s;
}
.Toastify__slide-exit--bottom-center {
animation-name: Toastify__slideOutDown;
animation-timing-function: ease-in;
animation-duration: 0.3s;
}
@keyframes Toastify__spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
`,Xy=new Map,b2=(n,i)=>{Yg(()=>{if(typeof document>"u")return;let l=document,r=Xy.get(l);if(r){i&&r.setAttribute("nonce",i);return}let u=l.createElement("style");u.textContent=n,i&&u.setAttribute("nonce",i),l.head.appendChild(u),Xy.set(l,u)},[i])};function S2(n){return b2(x2,n.nonce),_t.createElement(v2,{...n})}const T2="/api";async function Lt(n,i,l){const r=await fetch(`${T2}${i}`,{method:n,headers:l?{"Content-Type":"application/json"}:void 0,body:l?JSON.stringify(l):void 0,credentials:"include"});let u={};try{u=await r.json()}catch{}return{ok:r.ok,data:u.data,message:u.message,status:r.status}}const Rt={auth:{login:(n,i)=>Lt("POST","/auth/login",{username:n,password:i}),logout:()=>Lt("POST","/auth/logout"),me:()=>Lt("GET","/auth/me"),setupStatus:()=>Lt("GET","/auth/setup-status"),firstUser:(n,i)=>Lt("POST","/auth/first-user",{username:n,password:i})},user:{settings:()=>Lt("GET","/user/settings"),updateUsername:n=>Lt("PATCH","/user/username",{username:n}),updatePassword:(n,i)=>Lt("PATCH","/user/password",{currentPassword:n,newPassword:i}),updateGitea:n=>Lt("PUT","/user/gitea",n),updateAws:n=>Lt("PUT","/user/aws",n),getWebhookSecret:()=>Lt("GET","/user/webhook-secret"),regenerateWebhookSecret:()=>Lt("POST","/user/webhook-secret/regenerate")},repos:{list:()=>Lt("GET","/repos"),getConfig:(n,i)=>Lt("GET",`/repos/${n}/${i}/config`),saveConfig:n=>Lt("POST","/repos/config",n),toggle:(n,i,l)=>Lt("POST","/repos/toggle",{owner:n,repo:i,enabled:l})},previews:{list:()=>Lt("GET","/previews"),get:n=>Lt("GET",`/previews/${n}`),stop:n=>Lt("POST",`/previews/${n}/stop`)},admin:{listUsers:()=>Lt("GET","/admin/users"),createUser:(n,i)=>Lt("POST","/admin/users",{username:n,password:i}),updateUser:(n,i)=>Lt("PATCH",`/admin/users/${n}`,i),deleteUser:n=>Lt("DELETE",`/admin/users/${n}`),getSettings:()=>Lt("GET","/admin/settings"),updateSettings:n=>Lt("PUT","/admin/settings",n),listPreviews:()=>Lt("GET","/admin/previews"),stopPreview:n=>Lt("POST",`/admin/previews/${n}/stop`)}};function E2(n,i,l){const r=location.protocol==="https:"?"wss:":"ws:",u=new WebSocket(`${r}//${location.host}/api/previews/${n}/logs`);return u.onmessage=d=>{try{i(JSON.parse(d.data))}catch{}},u.onclose=(()=>{}),u}const uo=T.createContext({user:null,loading:!0,refresh:async()=>{}});function Vi(){return T.useContext(uo)}function A2(){const[n,i]=T.useState(null),[l,r]=T.useState(!0),u=async()=>{const d=await Rt.auth.me();d.ok&&d.data?i(d.data):i(null),r(!1)};return T.useEffect(()=>{u()},[]),{user:n,loading:l,refresh:u}}function qg(){const[n,i]=T.useState(()=>{const l=localStorage.getItem("pp-theme");return l?l==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches});return T.useEffect(()=>{document.documentElement.classList.toggle("dark",n),localStorage.setItem("pp-theme",n?"dark":"light")},[n]),{dark:n,toggle:()=>i(l=>!l)}}function Ky({children:n}){const{user:i,refresh:l}=Vi(),{dark:r,toggle:u}=qg(),d=ln(),f=pa(),h=async()=>{await Rt.auth.logout(),await l(),f("/login")},m=(p,v)=>g.jsx(en,{to:p,className:`px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.pathname===p||d.pathname.startsWith(p+"/")?"bg-blue-600 text-white":"text-gray-700 dark:text-slate-300 hover:bg-gray-100 dark:hover:bg-slate-800"}`,children:v});return g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsx("header",{className:"border-b border-gray-200 dark:border-slate-700 bg-white dark:bg-slate-900 sticky top-0 z-50",children:g.jsxs("div",{className:"max-w-7xl mx-auto px-4 h-14 flex items-center justify-between gap-4",children:[g.jsx("div",{className:"flex items-center gap-2",children:g.jsx(en,{to:"/",className:"font-bold text-lg text-blue-600 dark:text-blue-400 hover:opacity-80",children:"🚀 PR Previews"})}),i&&g.jsxs("nav",{className:"flex items-center gap-1 overflow-x-auto",children:[m("/","Previews"),m("/repos","Repos"),m("/settings","Settings"),i.isAdmin&&m("/admin","Admin")]}),g.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.jsx("button",{onClick:u,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-slate-800 text-lg",title:"Toggle theme",children:r?"☀️":"🌙"}),i&&g.jsx("button",{onClick:h,className:"text-sm px-3 py-1.5 rounded-md bg-gray-100 dark:bg-slate-800 hover:bg-gray-200 dark:hover:bg-slate-700 text-gray-700 dark:text-slate-300 transition-colors",children:"Logout"})]})]})}),g.jsx("main",{className:"flex-1 max-w-7xl mx-auto w-full px-4 py-6",children:n}),g.jsxs("footer",{className:"border-t border-gray-200 dark:border-slate-700 py-4 text-center text-xs text-gray-500 dark:text-slate-400",children:["PR Previews — self-hosted preview environments for every pull request."," ",g.jsx(en,{to:"/privacy",className:"underline hover:text-gray-700 dark:hover:text-slate-200",children:"Privacy Policy"})]})]})}const Qf=T.createContext({});function Zf(n){const i=T.useRef(null);return i.current===null&&(i.current=n()),i.current}const C2=typeof window<"u",$f=C2?T.useLayoutEffect:T.useEffect,co=T.createContext(null);function Ff(n,i){n.indexOf(i)===-1&&n.push(i)}function Kr(n,i){const l=n.indexOf(i);l>-1&&n.splice(l,1)}const pn=(n,i,l)=>l>i?i:l<n?n:l;let Jf=()=>{};const ha={},Pg=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),Xg=n=>typeof n=="object"&&n!==null,Kg=n=>/^0[^.\s]+$/u.test(n);function Qg(n){let i;return()=>(i===void 0&&(i=n()),i)}const Ke=n=>n,al=(...n)=>n.reduce((i,l)=>r=>l(i(r))),Qs=(n,i,l)=>{const r=i-n;return r?(l-n)/r:1};class Wf{constructor(){this.subscriptions=[]}add(i){return Ff(this.subscriptions,i),()=>Kr(this.subscriptions,i)}notify(i,l,r){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,r);else for(let d=0;d<u;d++){const f=this.subscriptions[d];f&&f(i,l,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Oe=n=>n*1e3,Xe=n=>n/1e3,Zg=(n,i)=>i?n*(1e3/i):0,$g=(n,i,l)=>(((1-3*l+3*i)*n+(3*l-6*i))*n+3*i)*n,w2=1e-7,R2=12;function _2(n,i,l,r,u){let d,f,h=0;do f=i+(l-i)/2,d=$g(f,r,u)-n,d>0?l=f:i=f;while(Math.abs(d)>w2&&++h<R2);return f}function il(n,i,l,r){if(n===i&&l===r)return Ke;const u=d=>_2(d,0,1,n,l);return d=>d===0||d===1?d:$g(u(d),i,r)}const Fg=n=>i=>i<=.5?n(2*i)/2:(2-n(2*(1-i)))/2,Jg=n=>i=>1-n(1-i),Wg=il(.33,1.53,.69,.99),If=Jg(Wg),Ig=Fg(If),tv=n=>n>=1?1:(n*=2)<1?.5*If(n):.5*(2-Math.pow(2,-10*(n-1))),td=n=>1-Math.sin(Math.acos(n)),ev=Jg(td),nv=Fg(td),N2=il(.42,0,1,1),j2=il(0,0,.58,1),av=il(.42,0,.58,1),D2=n=>Array.isArray(n)&&typeof n[0]!="number",iv=n=>Array.isArray(n)&&typeof n[0]=="number",M2={linear:Ke,easeIn:N2,easeInOut:av,easeOut:j2,circIn:td,circInOut:nv,circOut:ev,backIn:If,backInOut:Ig,backOut:Wg,anticipate:tv},O2=n=>typeof n=="string",Qy=n=>{if(iv(n)){Jf(n.length===4);const[i,l,r,u]=n;return il(i,l,r,u)}else if(O2(n))return M2[n];return n},wr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function z2(n){let i=new Set,l=new Set,r=!1,u=!1;const d=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function h(p){d.has(p)&&(m.schedule(p),n()),p(f)}const m={schedule:(p,v=!1,x=!1)=>{const E=x&&r?i:l;return v&&d.add(p),E.add(p),p},cancel:p=>{l.delete(p),d.delete(p)},process:p=>{if(f=p,r){u=!0;return}r=!0;const v=i;i=l,l=v,i.forEach(h),i.clear(),r=!1,u&&(u=!1,m.process(p))}};return m}const L2=40;function sv(n,i){let l=!1,r=!0;const u={delta:0,timestamp:0,isProcessing:!1},d=()=>l=!0,f=wr.reduce((D,M)=>(D[M]=z2(d),D),{}),{setup:h,read:m,resolveKeyframes:p,preUpdate:v,update:x,preRender:S,render:E,postRender:A}=f,w=()=>{const D=ha.useManualTiming,M=D?u.timestamp:performance.now();l=!1,D||(u.delta=r?1e3/60:Math.max(Math.min(M-u.timestamp,L2),1)),u.timestamp=M,u.isProcessing=!0,h.process(u),m.process(u),p.process(u),v.process(u),x.process(u),S.process(u),E.process(u),A.process(u),u.isProcessing=!1,l&&i&&(r=!1,n(w))},_=()=>{l=!0,r=!0,u.isProcessing||n(w)};return{schedule:wr.reduce((D,M)=>{const H=f[M];return D[M]=($,V=!1,q=!1)=>(l||_(),H.schedule($,V,q)),D},{}),cancel:D=>{for(let M=0;M<wr.length;M++)f[wr[M]].cancel(D)},state:u,steps:f}}const{schedule:Ut,cancel:ma,state:oe,steps:qc}=sv(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ke,!0);let kr;function k2(){kr=void 0}const me={now:()=>(kr===void 0&&me.set(oe.isProcessing||ha.useManualTiming?oe.timestamp:performance.now()),kr),set:n=>{kr=n,queueMicrotask(k2)}},lv=n=>i=>typeof i=="string"&&i.startsWith(n),rv=lv("--"),U2=lv("var(--"),ed=n=>U2(n)?V2.test(n.split("/*")[0].trim()):!1,V2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zy(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Bi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Zs={...Bi,transform:n=>pn(0,1,n)},Rr={...Bi,default:1},Gs=n=>Math.round(n*1e5)/1e5,nd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function B2(n){return n==null}const H2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ad=(n,i)=>l=>!!(typeof l=="string"&&H2.test(l)&&l.startsWith(n)||i&&!B2(l)&&Object.prototype.hasOwnProperty.call(l,i)),ov=(n,i,l)=>r=>{if(typeof r!="string")return r;const[u,d,f,h]=r.match(nd);return{[n]:parseFloat(u),[i]:parseFloat(d),[l]:parseFloat(f),alpha:h!==void 0?parseFloat(h):1}},G2=n=>pn(0,255,n),Pc={...Bi,transform:n=>Math.round(G2(n))},Va={test:ad("rgb","red"),parse:ov("red","green","blue"),transform:({red:n,green:i,blue:l,alpha:r=1})=>"rgba("+Pc.transform(n)+", "+Pc.transform(i)+", "+Pc.transform(l)+", "+Gs(Zs.transform(r))+")"};function Y2(n){let i="",l="",r="",u="";return n.length>5?(i=n.substring(1,3),l=n.substring(3,5),r=n.substring(5,7),u=n.substring(7,9)):(i=n.substring(1,2),l=n.substring(2,3),r=n.substring(3,4),u=n.substring(4,5),i+=i,l+=l,r+=r,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(r,16),alpha:u?parseInt(u,16)/255:1}}const hf={test:ad("#"),parse:Y2,transform:Va.transform},sl=n=>({test:i=>typeof i=="string"&&i.endsWith(n)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${n}`}),zn=sl("deg"),mn=sl("%"),at=sl("px"),q2=sl("vh"),P2=sl("vw"),$y={...mn,parse:n=>mn.parse(n)/100,transform:n=>mn.transform(n*100)},ji={test:ad("hsl","hue"),parse:ov("hue","saturation","lightness"),transform:({hue:n,saturation:i,lightness:l,alpha:r=1})=>"hsla("+Math.round(n)+", "+mn.transform(Gs(i))+", "+mn.transform(Gs(l))+", "+Gs(Zs.transform(r))+")"},Wt={test:n=>Va.test(n)||hf.test(n)||ji.test(n),parse:n=>Va.test(n)?Va.parse(n):ji.test(n)?ji.parse(n):hf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Va.transform(n):ji.transform(n),getAnimatableNone:n=>{const i=Wt.parse(n);return i.alpha=0,Wt.transform(i)}},X2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function K2(n){var i,l;return isNaN(n)&&typeof n=="string"&&(((i=n.match(nd))==null?void 0:i.length)||0)+(((l=n.match(X2))==null?void 0:l.length)||0)>0}const uv="number",cv="color",Q2="var",Z2="var(",Fy="${}",$2=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Oi(n){const i=n.toString(),l=[],r={color:[],number:[],var:[]},u=[];let d=0;const h=i.replace($2,m=>(Wt.test(m)?(r.color.push(d),u.push(cv),l.push(Wt.parse(m))):m.startsWith(Z2)?(r.var.push(d),u.push(Q2),l.push(m)):(r.number.push(d),u.push(uv),l.push(parseFloat(m))),++d,Fy)).split(Fy);return{values:l,split:h,indexes:r,types:u}}function F2(n){return Oi(n).values}function fv({split:n,types:i}){const l=n.length;return r=>{let u="";for(let d=0;d<l;d++)if(u+=n[d],r[d]!==void 0){const f=i[d];f===uv?u+=Gs(r[d]):f===cv?u+=Wt.transform(r[d]):u+=r[d]}return u}}function J2(n){return fv(Oi(n))}const W2=n=>typeof n=="number"?0:Wt.test(n)?Wt.getAnimatableNone(n):n,I2=(n,i)=>typeof n=="number"?i!=null&&i.trim().endsWith("/")?n:0:W2(n);function tE(n){const i=Oi(n);return fv(i)(i.values.map((r,u)=>I2(r,i.split[u])))}const nn={test:K2,parse:F2,createTransformer:J2,getAnimatableNone:tE};function Xc(n,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(i-n)*6*l:l<1/2?i:l<2/3?n+(i-n)*(2/3-l)*6:n}function eE({hue:n,saturation:i,lightness:l,alpha:r}){n/=360,i/=100,l/=100;let u=0,d=0,f=0;if(!i)u=d=f=l;else{const h=l<.5?l*(1+i):l+i-l*i,m=2*l-h;u=Xc(m,h,n+1/3),d=Xc(m,h,n),f=Xc(m,h,n-1/3)}return{red:Math.round(u*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:r}}function Qr(n,i){return l=>l>0?i:n}const kt=(n,i,l)=>n+(i-n)*l,Kc=(n,i,l)=>{const r=n*n,u=l*(i*i-r)+r;return u<0?0:Math.sqrt(u)},nE=[hf,Va,ji],aE=n=>nE.find(i=>i.test(n));function Jy(n){const i=aE(n);if(!i)return!1;let l=i.parse(n);return i===ji&&(l=eE(l)),l}const Wy=(n,i)=>{const l=Jy(n),r=Jy(i);if(!l||!r)return Qr(n,i);const u={...l};return d=>(u.red=Kc(l.red,r.red,d),u.green=Kc(l.green,r.green,d),u.blue=Kc(l.blue,r.blue,d),u.alpha=kt(l.alpha,r.alpha,d),Va.transform(u))},mf=new Set(["none","hidden"]);function iE(n,i){return mf.has(n)?l=>l<=0?n:i:l=>l>=1?i:n}function sE(n,i){return l=>kt(n,i,l)}function id(n){return typeof n=="number"?sE:typeof n=="string"?ed(n)?Qr:Wt.test(n)?Wy:oE:Array.isArray(n)?dv:typeof n=="object"?Wt.test(n)?Wy:lE:Qr}function dv(n,i){const l=[...n],r=l.length,u=n.map((d,f)=>id(d)(d,i[f]));return d=>{for(let f=0;f<r;f++)l[f]=u[f](d);return l}}function lE(n,i){const l={...n,...i},r={};for(const u in l)n[u]!==void 0&&i[u]!==void 0&&(r[u]=id(n[u])(n[u],i[u]));return u=>{for(const d in r)l[d]=r[d](u);return l}}function rE(n,i){const l=[],r={color:0,var:0,number:0};for(let u=0;u<i.values.length;u++){const d=i.types[u],f=n.indexes[d][r[d]],h=n.values[f]??0;l[u]=h,r[d]++}return l}const oE=(n,i)=>{const l=nn.createTransformer(i),r=Oi(n),u=Oi(i);return r.indexes.var.length===u.indexes.var.length&&r.indexes.color.length===u.indexes.color.length&&r.indexes.number.length>=u.indexes.number.length?mf.has(n)&&!u.values.length||mf.has(i)&&!r.values.length?iE(n,i):al(dv(rE(r,u),u.values),l):Qr(n,i)};function hv(n,i,l){return typeof n=="number"&&typeof i=="number"&&typeof l=="number"?kt(n,i,l):id(n)(n,i)}const uE=n=>{const i=({timestamp:l})=>n(l);return{start:(l=!0)=>Ut.update(i,l),stop:()=>ma(i),now:()=>oe.isProcessing?oe.timestamp:me.now()}},mv=(n,i,l=10)=>{let r="";const u=Math.max(Math.round(i/l),2);for(let d=0;d<u;d++)r+=Math.round(n(d/(u-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Zr=2e4;function sd(n){let i=0;const l=50;let r=n.next(i);for(;!r.done&&i<Zr;)i+=l,r=n.next(i);return i>=Zr?1/0:i}function cE(n,i=100,l){const r=l({...n,keyframes:[0,i]}),u=Math.min(sd(r),Zr);return{type:"keyframes",ease:d=>r.next(u*d).value/i,duration:Xe(u)}}const Pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function pf(n,i){return n*Math.sqrt(1-i*i)}const fE=12;function dE(n,i,l){let r=l;for(let u=1;u<fE;u++)r=r-n(r)/i(r);return r}const Qc=.001;function hE({duration:n=Pt.duration,bounce:i=Pt.bounce,velocity:l=Pt.velocity,mass:r=Pt.mass}){let u,d,f=1-i;f=pn(Pt.minDamping,Pt.maxDamping,f),n=pn(Pt.minDuration,Pt.maxDuration,Xe(n)),f<1?(u=p=>{const v=p*f,x=v*n,S=v-l,E=pf(p,f),A=Math.exp(-x);return Qc-S/E*A},d=p=>{const x=p*f*n,S=x*l+l,E=Math.pow(f,2)*Math.pow(p,2)*n,A=Math.exp(-x),w=pf(Math.pow(p,2),f);return(-u(p)+Qc>0?-1:1)*((S-E)*A)/w}):(u=p=>{const v=Math.exp(-p*n),x=(p-l)*n+1;return-Qc+v*x},d=p=>{const v=Math.exp(-p*n),x=(l-p)*(n*n);return v*x});const h=5/n,m=dE(u,d,h);if(n=Oe(n),isNaN(m))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:n};{const p=Math.pow(m,2)*r;return{stiffness:p,damping:f*2*Math.sqrt(r*p),duration:n}}}const mE=["duration","bounce"],pE=["stiffness","damping","mass"];function Iy(n,i){return i.some(l=>n[l]!==void 0)}function yE(n){let i={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...n};if(!Iy(n,pE)&&Iy(n,mE))if(i.velocity=0,n.visualDuration){const l=n.visualDuration,r=2*Math.PI/(l*1.2),u=r*r,d=2*pn(.05,1,1-(n.bounce||0))*Math.sqrt(u);i={...i,mass:Pt.mass,stiffness:u,damping:d}}else{const l=hE({...n,velocity:0});i={...i,...l,mass:Pt.mass},i.isResolvedFromDuration=!0}return i}function $r(n=Pt.visualDuration,i=Pt.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:i}:n;let{restSpeed:r,restDelta:u}=l;const d=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],h={done:!1,value:d},{stiffness:m,damping:p,mass:v,duration:x,velocity:S,isResolvedFromDuration:E}=yE({...l,velocity:-Xe(l.velocity||0)}),A=S||0,w=p/(2*Math.sqrt(m*v)),_=f-d,R=Xe(Math.sqrt(m/v)),O=Math.abs(_)<5;r||(r=O?Pt.restSpeed.granular:Pt.restSpeed.default),u||(u=O?Pt.restDelta.granular:Pt.restDelta.default);let D,M,H,$,V,q;if(w<1)H=pf(R,w),$=(A+w*R*_)/H,D=F=>{const I=Math.exp(-w*R*F);return f-I*($*Math.sin(H*F)+_*Math.cos(H*F))},V=w*R*$+_*H,q=w*R*_-$*H,M=F=>Math.exp(-w*R*F)*(V*Math.sin(H*F)+q*Math.cos(H*F));else if(w===1){D=I=>f-Math.exp(-R*I)*(_+(A+R*_)*I);const F=A+R*_;M=I=>Math.exp(-R*I)*(R*F*I-A)}else{const F=R*Math.sqrt(w*w-1);D=pt=>{const Q=Math.exp(-w*R*pt),L=Math.min(F*pt,300);return f-Q*((A+w*R*_)*Math.sinh(L)+F*_*Math.cosh(L))/F};const I=(A+w*R*_)/F,ut=w*R*I-_*F,Tt=w*R*_-I*F;M=pt=>{const Q=Math.exp(-w*R*pt),L=Math.min(F*pt,300);return Q*(ut*Math.sinh(L)+Tt*Math.cosh(L))}}const Z={calculatedDuration:E&&x||null,velocity:F=>Oe(M(F)),next:F=>{if(!E&&w<1){const ut=Math.exp(-w*R*F),Tt=Math.sin(H*F),pt=Math.cos(H*F),Q=f-ut*($*Tt+_*pt),L=Oe(ut*(V*Tt+q*pt));return h.done=Math.abs(L)<=r&&Math.abs(f-Q)<=u,h.value=h.done?f:Q,h}const I=D(F);if(E)h.done=F>=x;else{const ut=Oe(M(F));h.done=Math.abs(ut)<=r&&Math.abs(f-I)<=u}return h.value=h.done?f:I,h},toString:()=>{const F=Math.min(sd(Z),Zr),I=mv(ut=>Z.next(F*ut).value,F,30);return F+"ms "+I},toTransition:()=>{}};return Z}$r.applyToOptions=n=>{const i=cE(n,100,$r);return n.ease=i.ease,n.duration=Oe(i.duration),n.type="keyframes",n};const gE=5;function pv(n,i,l){const r=Math.max(i-gE,0);return Zg(l-n(r),i-r)}function yf({keyframes:n,velocity:i=0,power:l=.8,timeConstant:r=325,bounceDamping:u=10,bounceStiffness:d=500,modifyTarget:f,min:h,max:m,restDelta:p=.5,restSpeed:v}){const x=n[0],S={done:!1,value:x},E=q=>h!==void 0&&q<h||m!==void 0&&q>m,A=q=>h===void 0?m:m===void 0||Math.abs(h-q)<Math.abs(m-q)?h:m;let w=l*i;const _=x+w,R=f===void 0?_:f(_);R!==_&&(w=R-x);const O=q=>-w*Math.exp(-q/r),D=q=>R+O(q),M=q=>{const Z=O(q),F=D(q);S.done=Math.abs(Z)<=p,S.value=S.done?R:F};let H,$;const V=q=>{E(S.value)&&(H=q,$=$r({keyframes:[S.value,A(S.value)],velocity:pv(D,q,S.value),damping:u,stiffness:d,restDelta:p,restSpeed:v}))};return V(0),{calculatedDuration:null,next:q=>{let Z=!1;return!$&&H===void 0&&(Z=!0,M(q),V(q)),H!==void 0&&q>=H?$.next(q-H):(!Z&&M(q),S)}}}function vE(n,i,l){const r=[],u=l||ha.mix||hv,d=n.length-1;for(let f=0;f<d;f++){let h=u(n[f],n[f+1]);if(i){const m=Array.isArray(i)?i[f]||Ke:i;h=al(m,h)}r.push(h)}return r}function xE(n,i,{clamp:l=!0,ease:r,mixer:u}={}){const d=n.length;if(Jf(d===i.length),d===1)return()=>i[0];if(d===2&&i[0]===i[1])return()=>i[1];const f=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),i=[...i].reverse());const h=vE(i,r,u),m=h.length,p=v=>{if(f&&v<n[0])return i[0];let x=0;if(m>1)for(;x<n.length-2&&!(v<n[x+1]);x++);const S=Qs(n[x],n[x+1],v);return h[x](S)};return l?v=>p(pn(n[0],n[d-1],v)):p}function bE(n,i){const l=n[n.length-1];for(let r=1;r<=i;r++){const u=Qs(0,i,r);n.push(kt(l,1,u))}}function SE(n){const i=[0];return bE(i,n.length-1),i}function TE(n,i){return n.map(l=>l*i)}function EE(n,i){return n.map(()=>i||av).splice(0,n.length-1)}function Ys({duration:n=300,keyframes:i,times:l,ease:r="easeInOut"}){const u=D2(r)?r.map(Qy):Qy(r),d={done:!1,value:i[0]},f=TE(l&&l.length===i.length?l:SE(i),n),h=xE(f,i,{ease:Array.isArray(u)?u:EE(i,u)});return{calculatedDuration:n,next:m=>(d.value=h(m),d.done=m>=n,d)}}const AE=n=>n!==null;function fo(n,{repeat:i,repeatType:l="loop"},r,u=1){const d=n.filter(AE),h=u<0||i&&l!=="loop"&&i%2===1?0:d.length-1;return!h||r===void 0?d[h]:r}const CE={decay:yf,inertia:yf,tween:Ys,keyframes:Ys,spring:$r};function yv(n){typeof n.type=="string"&&(n.type=CE[n.type])}class ld{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(i=>{this.resolve=i})}notifyFinished(){this.resolve()}then(i,l){return this.finished.then(i,l)}}const wE=n=>n/100;class Fr extends ld{constructor(i){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,u;const{motionValue:l}=this.options;l&&l.updatedAt!==me.now()&&this.tick(me.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(u=(r=this.options).onStop)==null||u.call(r))},this.options=i,this.initAnimation(),this.play(),i.autoplay===!1&&this.pause()}initAnimation(){const{options:i}=this;yv(i);const{type:l=Ys,repeat:r=0,repeatDelay:u=0,repeatType:d,velocity:f=0}=i;let{keyframes:h}=i;const m=l||Ys;m!==Ys&&typeof h[0]!="number"&&(this.mixKeyframes=al(wE,hv(h[0],h[1])),h=[0,100]);const p=m({...i,keyframes:h});d==="mirror"&&(this.mirroredGenerator=m({...i,keyframes:[...h].reverse(),velocity:-f})),p.calculatedDuration===null&&(p.calculatedDuration=sd(p));const{calculatedDuration:v}=p;this.calculatedDuration=v,this.resolvedDuration=v+u,this.totalDuration=this.resolvedDuration*(r+1)-u,this.generator=p}updateTime(i){const l=Math.round(i-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=l}tick(i,l=!1){const{generator:r,totalDuration:u,mixKeyframes:d,mirroredGenerator:f,resolvedDuration:h,calculatedDuration:m}=this;if(this.startTime===null)return r.next(0);const{delay:p=0,keyframes:v,repeat:x,repeatType:S,repeatDelay:E,type:A,onUpdate:w,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-u/this.speed,this.startTime)),l?this.currentTime=i:this.updateTime(i);const R=this.currentTime-p*(this.playbackSpeed>=0?1:-1),O=this.playbackSpeed>=0?R<0:R>u;this.currentTime=Math.max(R,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let D=this.currentTime,M=r;if(x){const q=Math.min(this.currentTime,u)/h;let Z=Math.floor(q),F=q%1;!F&&q>=1&&(F=1),F===1&&Z--,Z=Math.min(Z,x+1),!!(Z%2)&&(S==="reverse"?(F=1-F,E&&(F-=E/h)):S==="mirror"&&(M=f)),D=pn(0,1,F)*h}let H;O?(this.delayState.value=v[0],H=this.delayState):H=M.next(D),d&&!O&&(H.value=d(H.value));let{done:$}=H;!O&&m!==null&&($=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return V&&A!==yf&&(H.value=fo(v,this.options,_,this.speed)),w&&w(H.value),V&&this.finish(),H}then(i,l){return this.finished.then(i,l)}get duration(){return Xe(this.calculatedDuration)}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+Xe(i)}get time(){return Xe(this.currentTime)}set time(i){i=Oe(i),this.currentTime=i,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=i,this.tick(i))}getGeneratorVelocity(){const i=this.currentTime;if(i<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(i);const l=this.generator.next(i).value;return pv(r=>this.generator.next(r).value,i,l)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;l&&this.driver&&this.updateTime(me.now()),this.playbackSpeed=i,l&&this.driver&&(this.time=Xe(this.currentTime))}play(){var u,d;if(this.isStopped)return;const{driver:i=uE,startTime:l}=this.options;this.driver||(this.driver=i(f=>this.tick(f))),(d=(u=this.options).onPlay)==null||d.call(u);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=l??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(me.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var i,l;this.notifyFinished(),this.teardown(),this.state="finished",(l=(i=this.options).onComplete)==null||l.call(i)}cancel(){var i,l;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(l=(i=this.options).onCancel)==null||l.call(i)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(i){return this.startTime=0,this.tick(i,!0)}attachTimeline(i){var l;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(l=this.driver)==null||l.stop(),i.observe(this)}}function RE(n){for(let i=1;i<n.length;i++)n[i]??(n[i]=n[i-1])}const Ba=n=>n*180/Math.PI,gf=n=>{const i=Ba(Math.atan2(n[1],n[0]));return vf(i)},_E={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:gf,rotateZ:gf,skewX:n=>Ba(Math.atan(n[1])),skewY:n=>Ba(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},vf=n=>(n=n%360,n<0&&(n+=360),n),t0=gf,e0=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),n0=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),NE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:e0,scaleY:n0,scale:n=>(e0(n)+n0(n))/2,rotateX:n=>vf(Ba(Math.atan2(n[6],n[5]))),rotateY:n=>vf(Ba(Math.atan2(-n[2],n[0]))),rotateZ:t0,rotate:t0,skewX:n=>Ba(Math.atan(n[4])),skewY:n=>Ba(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function xf(n){return n.includes("scale")?1:0}function bf(n,i){if(!n||n==="none")return xf(i);const l=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,u;if(l)r=NE,u=l;else{const h=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_E,u=h}if(!u)return xf(i);const d=r[i],f=u[1].split(",").map(DE);return typeof d=="function"?d(f):f[d]}const jE=(n,i)=>{const{transform:l="none"}=getComputedStyle(n);return bf(l,i)};function DE(n){return parseFloat(n.trim())}const Hi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gi=new Set([...Hi,"pathRotation"]),a0=n=>n===Bi||n===at,ME=new Set(["x","y","z"]),OE=Hi.filter(n=>!ME.has(n));function zE(n){const i=[];return OE.forEach(l=>{const r=n.getValue(l);r!==void 0&&(i.push([l,r.get()]),r.set(l.startsWith("scale")?1:0))}),i}const da={width:({x:n},{paddingLeft:i="0",paddingRight:l="0",boxSizing:r})=>{const u=n.max-n.min;return r==="border-box"?u:u-parseFloat(i)-parseFloat(l)},height:({y:n},{paddingTop:i="0",paddingBottom:l="0",boxSizing:r})=>{const u=n.max-n.min;return r==="border-box"?u:u-parseFloat(i)-parseFloat(l)},top:(n,{top:i})=>parseFloat(i),left:(n,{left:i})=>parseFloat(i),bottom:({y:n},{top:i})=>parseFloat(i)+(n.max-n.min),right:({x:n},{left:i})=>parseFloat(i)+(n.max-n.min),x:(n,{transform:i})=>bf(i,"x"),y:(n,{transform:i})=>bf(i,"y")};da.translateX=da.x;da.translateY=da.y;const Ga=new Set;let Sf=!1,Tf=!1,Ef=!1;function gv(){if(Tf){const n=Array.from(Ga).filter(r=>r.needsMeasurement),i=new Set(n.map(r=>r.element)),l=new Map;i.forEach(r=>{const u=zE(r);u.length&&(l.set(r,u),r.render())}),n.forEach(r=>r.measureInitialState()),i.forEach(r=>{r.render();const u=l.get(r);u&&u.forEach(([d,f])=>{var h;(h=r.getValue(d))==null||h.set(f)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Tf=!1,Sf=!1,Ga.forEach(n=>n.complete(Ef)),Ga.clear()}function vv(){Ga.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(Tf=!0)})}function LE(){Ef=!0,vv(),gv(),Ef=!1}class rd{constructor(i,l,r,u,d,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=r,this.motionValue=u,this.element=d,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Ga.add(this),Sf||(Sf=!0,Ut.read(vv),Ut.resolveKeyframes(gv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:r,motionValue:u}=this;if(i[0]===null){const d=u==null?void 0:u.get(),f=i[i.length-1];if(d!==void 0)i[0]=d;else if(r&&l){const h=r.readValue(l,f);h!=null&&(i[0]=h)}i[0]===void 0&&(i[0]=f),u&&d===void 0&&u.set(i[0])}RE(i)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(i=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,i),Ga.delete(this)}cancel(){this.state==="scheduled"&&(Ga.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kE=n=>n.startsWith("--");function xv(n,i,l){kE(i)?n.style.setProperty(i,l):n.style[i]=l}const UE={};function bv(n,i){const l=Qg(n);return()=>UE[i]??l()}const VE=bv(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Sv=bv(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hs=([n,i,l,r])=>`cubic-bezier(${n}, ${i}, ${l}, ${r})`,i0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hs([0,.65,.55,1]),circOut:Hs([.55,0,1,.45]),backIn:Hs([.31,.01,.66,-.59]),backOut:Hs([.33,1.53,.69,.99])};function Tv(n,i){if(n)return typeof n=="function"?Sv()?mv(n,i):"ease-out":iv(n)?Hs(n):Array.isArray(n)?n.map(l=>Tv(l,i)||i0.easeOut):i0[n]}function BE(n,i,l,{delay:r=0,duration:u=300,repeat:d=0,repeatType:f="loop",ease:h="easeOut",times:m}={},p=void 0){const v={[i]:l};m&&(v.offset=m);const x=Tv(h,u);Array.isArray(x)&&(v.easing=x);const S={delay:r,duration:u,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"};return p&&(S.pseudoElement=p),n.animate(v,S)}function Ev(n){return typeof n=="function"&&"applyToOptions"in n}function HE({type:n,...i}){return Ev(n)&&Sv()?n.applyToOptions(i):(i.duration??(i.duration=300),i.ease??(i.ease="easeOut"),i)}class Av extends ld{constructor(i){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!i)return;const{element:l,name:r,keyframes:u,pseudoElement:d,allowFlatten:f=!1,finalKeyframe:h,onComplete:m}=i;this.isPseudoElement=!!d,this.allowFlatten=f,this.options=i,Jf(typeof i.type!="string");const p=HE(i);this.animation=BE(l,r,u,p,d),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const v=fo(u,this.options,h,this.speed);this.updateMotionValue&&this.updateMotionValue(v),xv(l,r,v),this.animation.cancel()}m==null||m(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var i,l;(l=(i=this.animation).finish)==null||l.call(i)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;i==="idle"||i==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var l,r,u;const i=(l=this.options)==null?void 0:l.element;!this.isPseudoElement&&(i!=null&&i.isConnected)&&((u=(r=this.animation).commitStyles)==null||u.call(r))}get duration(){var l,r;const i=((r=(l=this.animation.effect)==null?void 0:l.getComputedTiming)==null?void 0:r.call(l).duration)||0;return Xe(Number(i))}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+Xe(i)}get time(){return Xe(Number(this.animation.currentTime)||0)}set time(i){const l=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Oe(i),l&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(i){this.manualStartTime=this.animation.startTime=i}attachTimeline({timeline:i,rangeStart:l,rangeEnd:r,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,i&&VE()?(this.animation.timeline=i,l&&(this.animation.rangeStart=l),r&&(this.animation.rangeEnd=r),Ke):u(this)}}const Cv={anticipate:tv,backInOut:Ig,circInOut:nv};function GE(n){return n in Cv}function YE(n){typeof n.ease=="string"&&GE(n.ease)&&(n.ease=Cv[n.ease])}const Zc=10;class qE extends Av{constructor(i){YE(i),yv(i),super(i),i.startTime!==void 0&&i.autoplay!==!1&&(this.startTime=i.startTime),this.options=i}updateMotionValue(i){const{motionValue:l,onUpdate:r,onComplete:u,element:d,...f}=this.options;if(!l)return;if(i!==void 0){l.set(i);return}const h=new Fr({...f,autoplay:!1}),m=Math.max(Zc,me.now()-this.startTime),p=pn(0,Zc,m-Zc),v=h.sample(m).value,{name:x}=this.options;d&&x&&xv(d,x,v),l.setWithVelocity(h.sample(Math.max(0,m-p)).value,v,p),h.stop()}}const s0=(n,i)=>i==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(nn.test(n)||n==="0")&&!n.startsWith("url("));function PE(n){const i=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==i)return!0}function XE(n,i,l,r){const u=n[0];if(u===null)return!1;if(i==="display"||i==="visibility")return!0;const d=n[n.length-1],f=s0(u,i),h=s0(d,i);return!f||!h?!1:PE(n)||(l==="spring"||Ev(l))&&r}function Af(n){n.duration=0,n.type="keyframes"}const wv=new Set(["opacity","clipPath","filter","transform"]),KE=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function QE(n){for(let i=0;i<n.length;i++)if(typeof n[i]=="string"&&KE.test(n[i]))return!0;return!1}const ZE=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),$E=Qg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function FE(n){var x;const{motionValue:i,name:l,repeatDelay:r,repeatType:u,damping:d,type:f,keyframes:h}=n;if(!(((x=i==null?void 0:i.owner)==null?void 0:x.current)instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:v}=i.owner.getProps();return $E()&&l&&(wv.has(l)||ZE.has(l)&&QE(h))&&(l!=="transform"||!v)&&!p&&!r&&u!=="mirror"&&d!==0&&f!=="inertia"}const JE=40;class WE extends ld{constructor({autoplay:i=!0,delay:l=0,type:r="keyframes",repeat:u=0,repeatDelay:d=0,repeatType:f="loop",keyframes:h,name:m,motionValue:p,element:v,...x}){var A;super(),this.stop=()=>{var w,_;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(_=this.keyframeResolver)==null||_.cancel()},this.createdAt=me.now();const S={autoplay:i,delay:l,type:r,repeat:u,repeatDelay:d,repeatType:f,name:m,motionValue:p,element:v,...x},E=(v==null?void 0:v.KeyframeResolver)||rd;this.keyframeResolver=new E(h,(w,_,R)=>this.onKeyframesResolved(w,_,S,!R),m,p,v),(A=this.keyframeResolver)==null||A.scheduleResolve()}onKeyframesResolved(i,l,r,u){var R,O;this.keyframeResolver=void 0;const{name:d,type:f,velocity:h,delay:m,isHandoff:p,onUpdate:v}=r;this.resolvedAt=me.now();let x=!0;XE(i,d,f,h)||(x=!1,(ha.instantAnimations||!m)&&(v==null||v(fo(i,r,l))),i[0]=i[i.length-1],Af(r),r.repeat=0);const E={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>JE?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:l,...r,keyframes:i},A=x&&!p&&FE(E),w=(O=(R=E.motionValue)==null?void 0:R.owner)==null?void 0:O.current;let _;if(A)try{_=new qE({...E,element:w})}catch{_=new Fr(E)}else _=new Fr(E);_.finished.then(()=>{this.notifyFinished()}).catch(Ke),this.pendingTimeline&&(this.stopTimeline=_.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=_}get finished(){return this._animation?this.animation.finished:this._finished}then(i,l){return this.finished.finally(i).then(()=>{})}get animation(){var i;return this._animation||((i=this.keyframeResolver)==null||i.resume(),LE()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(i){this.animation.time=i}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(i){this.animation.speed=i}get startTime(){return this.animation.startTime}attachTimeline(i){return this._animation?this.stopTimeline=this.animation.attachTimeline(i):this.pendingTimeline=i,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var i;this._animation&&this.animation.cancel(),(i=this.keyframeResolver)==null||i.cancel()}}function Rv(n,i,l,r=0,u=1){const d=Array.from(n).sort((p,v)=>p.sortNodePosition(v)).indexOf(i),f=n.size,h=(f-1)*r;return typeof l=="function"?l(d,f):u===1?d*r:h-d*r}const l0=30,IE=n=>!isNaN(parseFloat(n));class tA{constructor(i,l={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var d;const u=me.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((d=this.events.change)==null||d.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty()},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=me.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=IE(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new Wf);const r=this.events[i].add(l);return i==="change"?()=>{r(),Ut.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i){this.passiveEffect?this.passiveEffect(i,this.updateAndNotify):this.updateAndNotify(i)}setWithVelocity(i,l,r){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-r}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var i;(i=this.events.change)==null||i.notify(this.current)}addDependent(i){this.dependents||(this.dependents=new Set),this.dependents.add(i)}removeDependent(i){this.dependents&&this.dependents.delete(i)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=me.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>l0)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,l0);return Zg(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var i,l;(i=this.dependents)==null||i.clear(),(l=this.events.destroy)==null||l.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zi(n,i){return new tA(n,i)}function _v(n,i){if(n!=null&&n.inherit&&i){const{inherit:l,...r}=n;return{...i,...r}}return n}function od(n,i){const l=(n==null?void 0:n[i])??(n==null?void 0:n.default)??n;return l!==n?_v(l,n):l}const eA={type:"spring",stiffness:500,damping:25,restSpeed:10},nA=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),aA={type:"keyframes",duration:.8},iA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sA=(n,{keyframes:i})=>i.length>2?aA:Gi.has(n)?n.startsWith("scale")?nA(i[1]):eA:iA,lA=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function rA(n){for(const i in n)if(!lA.has(i))return!0;return!1}const ud=(n,i,l,r={},u,d)=>f=>{const h=od(r,n)||{},m=h.delay||r.delay||0;let{elapsed:p=0}=r;p=p-Oe(m);const v={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...h,delay:-p,onUpdate:S=>{i.set(S),h.onUpdate&&h.onUpdate(S)},onComplete:()=>{f(),h.onComplete&&h.onComplete()},name:n,motionValue:i,element:d?void 0:u};rA(h)||Object.assign(v,sA(n,v)),v.duration&&(v.duration=Oe(v.duration)),v.repeatDelay&&(v.repeatDelay=Oe(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let x=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(Af(v),v.delay===0&&(x=!0)),(ha.instantAnimations||ha.skipAnimations||u!=null&&u.shouldSkipAnimations||h.skipAnimations)&&(x=!0,Af(v),v.delay=0),v.allowFlatten=!h.type&&!h.ease,x&&!d&&i.get()!==void 0){const S=fo(v.keyframes,h);if(S!==void 0){Ut.update(()=>{v.onUpdate(S),v.onComplete()});return}}return h.isSync?new Fr(v):new WE(v)},oA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uA(n){const i=oA.exec(n);if(!i)return[,];const[,l,r,u]=i;return[`--${l??r}`,u]}function Nv(n,i,l=1){const[r,u]=uA(n);if(!r)return;const d=window.getComputedStyle(i).getPropertyValue(r);if(d){const f=d.trim();return Pg(f)?parseFloat(f):f}return ed(u)?Nv(u,i,l+1):u}function r0(n){const i=[{},{}];return n==null||n.values.forEach((l,r)=>{i[0][r]=l.get(),i[1][r]=l.getVelocity()}),i}function cd(n,i,l,r){if(typeof i=="function"){const[u,d]=r0(r);i=i(l!==void 0?l:n.custom,u,d)}if(typeof i=="string"&&(i=n.variants&&n.variants[i]),typeof i=="function"){const[u,d]=r0(r);i=i(l!==void 0?l:n.custom,u,d)}return i}function Ya(n,i,l){const r=n.getProps();return cd(r,i,l!==void 0?l:r.custom,n)}const jv=new Set(["width","height","top","left","right","bottom",...Hi]),Cf=n=>Array.isArray(n);function cA(n,i,l){n.hasValue(i)?n.getValue(i).set(l):n.addValue(i,zi(l))}function fA(n){return Cf(n)?n[n.length-1]||0:n}function dA(n,i){const l=Ya(n,i);let{transitionEnd:r={},transition:u={},...d}=l||{};d={...d,...r};for(const f in d){const h=fA(d[f]);cA(n,f,h)}}const ue=n=>!!(n&&n.getVelocity);function hA(n){return!!(ue(n)&&n.add)}function wf(n,i){const l=n.getValue("willChange");if(hA(l))return l.add(i);if(!l&&ha.WillChange){const r=new ha.WillChange("auto");n.addValue("willChange",r),r.add(i)}}function fd(n){return n.replace(/([A-Z])/g,i=>`-${i.toLowerCase()}`)}const mA="framerAppearId",Dv="data-"+fd(mA);function Mv(n){return n.props[Dv]}function pA({protectedKeys:n,needsAnimating:i},l){const r=n.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,r}function Ov(n,i,{delay:l=0,transitionOverride:r,type:u}={}){let{transition:d,transitionEnd:f,...h}=i;const m=n.getDefaultTransition();d=d?_v(d,m):m;const p=d==null?void 0:d.reduceMotion,v=d==null?void 0:d.skipAnimations;r&&(d=r);const x=[],S=u&&n.animationState&&n.animationState.getState()[u],E=d==null?void 0:d.path;E&&E.animateVisualElement(n,h,d,l,x);for(const A in h){const w=n.getValue(A,n.latestValues[A]??null),_=h[A];if(_===void 0||S&&pA(S,A))continue;const R={delay:l,...od(d||{},A)};v&&(R.skipAnimations=!0);const O=w.get();if(O!==void 0&&!w.isAnimating()&&!Array.isArray(_)&&_===O&&!R.velocity){Ut.update(()=>w.set(_));continue}let D=!1;if(window.MotionHandoffAnimation){const $=Mv(n);if($){const V=window.MotionHandoffAnimation($,A,Ut);V!==null&&(R.startTime=V,D=!0)}}wf(n,A);const M=p??n.shouldReduceMotion;w.start(ud(A,w,_,M&&jv.has(A)?{type:!1}:R,n,D));const H=w.animation;H&&x.push(H)}if(f){const A=()=>Ut.update(()=>{f&&dA(n,f)});x.length?Promise.all(x).then(A):A()}return x}function Rf(n,i,l={}){var m;const r=Ya(n,i,l.type==="exit"?(m=n.presenceContext)==null?void 0:m.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};l.transitionOverride&&(u=l.transitionOverride);const d=r?()=>Promise.all(Ov(n,r,l)):()=>Promise.resolve(),f=n.variantChildren&&n.variantChildren.size?(p=0)=>{const{delayChildren:v=0,staggerChildren:x,staggerDirection:S}=u;return yA(n,i,p,v,x,S,l)}:()=>Promise.resolve(),{when:h}=u;if(h){const[p,v]=h==="beforeChildren"?[d,f]:[f,d];return p().then(()=>v())}else return Promise.all([d(),f(l.delay)])}function yA(n,i,l=0,r=0,u=0,d=1,f){const h=[];for(const m of n.variantChildren)m.notify("AnimationStart",i),h.push(Rf(m,i,{...f,delay:l+(typeof r=="function"?0:r)+Rv(n.variantChildren,m,r,u,d)}).then(()=>m.notify("AnimationComplete",i)));return Promise.all(h)}function gA(n,i,l={}){n.notify("AnimationStart",i);let r;if(Array.isArray(i)){const u=i.map(d=>Rf(n,d,l));r=Promise.all(u)}else if(typeof i=="string")r=Rf(n,i,l);else{const u=typeof i=="function"?Ya(n,i,l.custom):i;r=Promise.all(Ov(n,u,l))}return r.then(()=>{n.notify("AnimationComplete",i)})}const vA={test:n=>n==="auto",parse:n=>n},zv=n=>i=>i.test(n),Lv=[Bi,at,mn,zn,P2,q2,vA],o0=n=>Lv.find(zv(n));function xA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Kg(n):!0}const bA=new Set(["brightness","contrast","saturate","opacity"]);function SA(n){const[i,l]=n.slice(0,-1).split("(");if(i==="drop-shadow")return n;const[r]=l.match(nd)||[];if(!r)return n;const u=l.replace(r,"");let d=bA.has(i)?1:0;return r!==l&&(d*=100),i+"("+d+u+")"}const TA=/\b([a-z-]*)\(.*?\)/gu,_f={...nn,getAnimatableNone:n=>{const i=n.match(TA);return i?i.map(SA).join(" "):n}},Nf={...nn,getAnimatableNone:n=>{const i=nn.parse(n);return nn.createTransformer(n)(i.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},u0={...Bi,transform:Math.round},EA={rotate:zn,pathRotation:zn,rotateX:zn,rotateY:zn,rotateZ:zn,scale:Rr,scaleX:Rr,scaleY:Rr,scaleZ:Rr,skew:zn,skewX:zn,skewY:zn,distance:at,translateX:at,translateY:at,translateZ:at,x:at,y:at,z:at,perspective:at,transformPerspective:at,opacity:Zs,originX:$y,originY:$y,originZ:at},Jr={borderWidth:at,borderTopWidth:at,borderRightWidth:at,borderBottomWidth:at,borderLeftWidth:at,borderRadius:at,borderTopLeftRadius:at,borderTopRightRadius:at,borderBottomRightRadius:at,borderBottomLeftRadius:at,width:at,maxWidth:at,height:at,maxHeight:at,top:at,right:at,bottom:at,left:at,inset:at,insetBlock:at,insetBlockStart:at,insetBlockEnd:at,insetInline:at,insetInlineStart:at,insetInlineEnd:at,padding:at,paddingTop:at,paddingRight:at,paddingBottom:at,paddingLeft:at,paddingBlock:at,paddingBlockStart:at,paddingBlockEnd:at,paddingInline:at,paddingInlineStart:at,paddingInlineEnd:at,margin:at,marginTop:at,marginRight:at,marginBottom:at,marginLeft:at,marginBlock:at,marginBlockStart:at,marginBlockEnd:at,marginInline:at,marginInlineStart:at,marginInlineEnd:at,fontSize:at,backgroundPositionX:at,backgroundPositionY:at,...EA,zIndex:u0,fillOpacity:Zs,strokeOpacity:Zs,numOctaves:u0},AA={...Jr,color:Wt,backgroundColor:Wt,outlineColor:Wt,fill:Wt,stroke:Wt,borderColor:Wt,borderTopColor:Wt,borderRightColor:Wt,borderBottomColor:Wt,borderLeftColor:Wt,filter:_f,WebkitFilter:_f,mask:Nf,WebkitMask:Nf},kv=n=>AA[n],CA=new Set([_f,Nf]);function Uv(n,i){let l=kv(n);return CA.has(l)||(l=nn),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const wA=new Set(["auto","none","0"]);function RA(n,i,l){let r=0,u;for(;r<n.length&&!u;){const d=n[r];typeof d=="string"&&!wA.has(d)&&Oi(d).values.length&&(u=n[r]),r++}if(u&&l)for(const d of i)n[d]=Uv(l,u)}class _A extends rd{constructor(i,l,r,u,d){super(i,l,r,u,d,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:r}=this;if(!l||!l.current)return;super.readKeyframes();for(let v=0;v<i.length;v++){let x=i[v];if(typeof x=="string"&&(x=x.trim(),ed(x))){const S=Nv(x,l.current);S!==void 0&&(i[v]=S),v===i.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!jv.has(r)||i.length!==2)return;const[u,d]=i,f=o0(u),h=o0(d),m=Zy(u),p=Zy(d);if(m!==p&&da[r]){this.needsMeasurement=!0;return}if(f!==h)if(a0(f)&&a0(h))for(let v=0;v<i.length;v++){const x=i[v];typeof x=="string"&&(i[v]=parseFloat(x))}else da[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,r=[];for(let u=0;u<i.length;u++)(i[u]===null||xA(i[u]))&&r.push(u);r.length&&RA(i,r,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:r}=this;if(!i||!i.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=da[r](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(r,u).jump(u,!1)}measureEndState(){var h;const{element:i,name:l,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const u=i.getValue(l);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,f=r[d];r[d]=da[l](i.measureViewportBox(),window.getComputedStyle(i.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),(h=this.removedTransforms)!=null&&h.length&&this.removedTransforms.forEach(([m,p])=>{i.getValue(m).set(p)}),this.resolveNoneKeyframes()}}const dd=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Vv(n,i,l){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let r=document;const u=(l==null?void 0:l[n])??r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n).filter(r=>r!=null)}const jf=(n,i)=>i&&typeof n=="number"?i.transform(n):n;function Ur(n){return Xg(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:hd}=sv(queueMicrotask,!1),Ie={x:!1,y:!1};function Bv(){return Ie.x||Ie.y}function NA(n){return n==="x"||n==="y"?Ie[n]?null:(Ie[n]=!0,()=>{Ie[n]=!1}):Ie.x||Ie.y?null:(Ie.x=Ie.y=!0,()=>{Ie.x=Ie.y=!1})}function Hv(n,i){const l=Vv(n),r=new AbortController,u={passive:!0,...i,signal:r.signal};return[l,u,()=>r.abort()]}function jA(n){return!(n.pointerType==="touch"||Bv())}function DA(n,i,l={}){const[r,u,d]=Hv(n,l);return r.forEach(f=>{let h=!1,m=!1,p;const v=()=>{f.removeEventListener("pointerleave",A)},x=_=>{p&&(p(_),p=void 0),v()},S=_=>{h=!1,window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),m&&(m=!1,x(_))},E=()=>{h=!0,window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",S,u)},A=_=>{if(_.pointerType!=="touch"){if(h){m=!0;return}x(_)}},w=_=>{if(!jA(_))return;m=!1;const R=i(f,_);typeof R=="function"&&(p=R,f.addEventListener("pointerleave",A,u))};f.addEventListener("pointerenter",w,u),f.addEventListener("pointerdown",E,u)}),d}const Gv=(n,i)=>i?n===i?!0:Gv(n,i.parentElement):!1,md=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,MA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function OA(n){return MA.has(n.tagName)||n.isContentEditable===!0}const zA=new Set(["INPUT","SELECT","TEXTAREA"]);function LA(n){return zA.has(n.tagName)||n.isContentEditable===!0}const Vr=new WeakSet;function c0(n){return i=>{i.key==="Enter"&&n(i)}}function $c(n,i){n.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const kA=(n,i)=>{const l=n.currentTarget;if(!l)return;const r=c0(()=>{if(Vr.has(l))return;$c(l,"down");const u=c0(()=>{$c(l,"up")}),d=()=>$c(l,"cancel");l.addEventListener("keyup",u,i),l.addEventListener("blur",d,i)});l.addEventListener("keydown",r,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",r),i)};function f0(n){return md(n)&&!Bv()}const d0=new WeakSet;function UA(n,i,l={}){const[r,u,d]=Hv(n,l),f=h=>{const m=h.currentTarget;if(!f0(h)||d0.has(h))return;Vr.add(m),l.stopPropagation&&d0.add(h);const p=i(m,h),v={...u,capture:!0},x=(A,w)=>{window.removeEventListener("pointerup",S,v),window.removeEventListener("pointercancel",E,v),Vr.has(m)&&Vr.delete(m),f0(A)&&typeof p=="function"&&p(A,{success:w})},S=A=>{x(A,m===window||m===document||l.useGlobalTarget||Gv(m,A.target))},E=A=>{x(A,!1)};window.addEventListener("pointerup",S,v),window.addEventListener("pointercancel",E,v)};return r.forEach(h=>{(l.useGlobalTarget?window:h).addEventListener("pointerdown",f,u),Ur(h)&&(h.addEventListener("focus",p=>kA(p,u)),!OA(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),d}function pd(n){return Xg(n)&&"ownerSVGElement"in n}const Br=new WeakMap;let fa;const Yv=(n,i,l)=>(r,u)=>u&&u[0]?u[0][n+"Size"]:pd(r)&&"getBBox"in r?r.getBBox()[i]:r[l],VA=Yv("inline","width","offsetWidth"),BA=Yv("block","height","offsetHeight");function HA({target:n,borderBoxSize:i}){var l;(l=Br.get(n))==null||l.forEach(r=>{r(n,{get width(){return VA(n,i)},get height(){return BA(n,i)}})})}function GA(n){n.forEach(HA)}function YA(){typeof ResizeObserver>"u"||(fa=new ResizeObserver(GA))}function qA(n,i){fa||YA();const l=Vv(n);return l.forEach(r=>{let u=Br.get(r);u||(u=new Set,Br.set(r,u)),u.add(i),fa==null||fa.observe(r)}),()=>{l.forEach(r=>{const u=Br.get(r);u==null||u.delete(i),u!=null&&u.size||fa==null||fa.unobserve(r)})}}const Hr=new Set;let Di;function PA(){Di=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};Hr.forEach(i=>i(n))},window.addEventListener("resize",Di)}function XA(n){return Hr.add(n),Di||PA(),()=>{Hr.delete(n),!Hr.size&&typeof Di=="function"&&(window.removeEventListener("resize",Di),Di=void 0)}}function h0(n,i){return typeof n=="function"?XA(n):qA(n,i)}function KA(n){return pd(n)&&n.tagName==="svg"}const QA=[...Lv,Wt,nn],ZA=n=>QA.find(zv(n)),m0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mi=()=>({x:m0(),y:m0()}),p0=()=>({min:0,max:0}),te=()=>({x:p0(),y:p0()}),$A=new WeakMap;function ho(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function $s(n){return typeof n=="string"||Array.isArray(n)}const yd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gd=["initial",...yd];function mo(n){return ho(n.animate)||gd.some(i=>$s(n[i]))}function qv(n){return!!(mo(n)||n.variants)}function FA(n,i,l){for(const r in i){const u=i[r],d=l[r];if(ue(u))n.addValue(r,u);else if(ue(d))n.addValue(r,zi(u,{owner:n}));else if(d!==u)if(n.hasValue(r)){const f=n.getValue(r);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=n.getStaticValue(r);n.addValue(r,zi(f!==void 0?f:u,{owner:n}))}}for(const r in l)i[r]===void 0&&n.removeValue(r);return i}const Df={current:null},Pv={current:!1},JA=typeof window<"u";function WA(){if(Pv.current=!0,!!JA)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),i=()=>Df.current=n.matches;n.addEventListener("change",i),i()}else Df.current=!1}const y0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Wr={};function Xv(n){Wr=n}function IA(){return Wr}class tC{scrapeMotionValuesFromProps(i,l,r){return{}}constructor({parent:i,props:l,presenceContext:r,reducedMotionConfig:u,skipAnimations:d,blockInitialAnimation:f,visualState:h},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=rd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=me.now();this.renderScheduledAt<E&&(this.renderScheduledAt=E,Ut.render(this.render,!1,!0))};const{latestValues:p,renderState:v}=h;this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=v,this.parent=i,this.props=l,this.presenceContext=r,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=d,this.options=m,this.blockInitialAnimation=!!f,this.isControllingVariants=mo(l),this.isVariantNode=qv(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:x,...S}=this.scrapeMotionValuesFromProps(l,{},this);for(const E in S){const A=S[E];p[E]!==void 0&&ue(A)&&A.set(p[E])}}mount(i){var l,r;if(this.hasBeenMounted)for(const u in this.initialValues)(l=this.values.get(u))==null||l.jump(this.initialValues[u]),this.latestValues[u]=this.initialValues[u];this.current=i,$A.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((u,d)=>this.bindToMotionValue(d,u)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Pv.current||WA(),this.shouldReduceMotion=Df.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var i;this.projection&&this.projection.unmount(),ma(this.notifyUpdate),ma(this.render),this.valueSubscriptions.forEach(l=>l()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(i=this.parent)==null||i.removeChild(this);for(const l in this.events)this.events[l].clear();for(const l in this.features){const r=this.features[l];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(i){this.children.add(i),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(i)}removeChild(i){this.children.delete(i),this.enteringChildren&&this.enteringChildren.delete(i)}bindToMotionValue(i,l){if(this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)(),l.accelerate&&wv.has(i)&&this.current instanceof HTMLElement){const{factory:f,keyframes:h,times:m,ease:p,duration:v}=l.accelerate,x=new Av({element:this.current,name:i,keyframes:h,times:m,ease:p,duration:Oe(v)}),S=f(x);this.valueSubscriptions.set(i,()=>{S(),x.cancel()});return}const r=Gi.has(i);r&&this.onBindTransform&&this.onBindTransform();const u=l.on("change",f=>{this.latestValues[i]=f,this.props.onUpdate&&Ut.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{u(),d&&d()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in Wr){const l=Wr[i];if(!l)continue;const{isEnabled:r,Feature:u}=l;if(!this.features[i]&&u&&r(this.props)&&(this.features[i]=new u(this)),this.features[i]){const d=this.features[i];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):te()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let r=0;r<y0.length;r++){const u=y0[r];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const d="on"+u,f=i[d];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=FA(this,this.scrapeMotionValuesFromProps(i,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const r=this.values.get(i);l!==r&&(r&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let r=this.values.get(i);return r===void 0&&l!==void 0&&(r=zi(l===null?void 0:l,{owner:this}),this.addValue(i,r)),r}readValue(i,l){let r=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:this.getBaseTargetFromProps(this.props,i)??this.readValueFromInstance(this.current,i,this.options);return r!=null&&(typeof r=="string"&&(Pg(r)||Kg(r))?r=parseFloat(r):!ZA(r)&&nn.test(l)&&(r=Uv(i,l)),this.setBaseTarget(i,ue(r)?r.get():r)),ue(r)?r.get():r}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){var d;const{initial:l}=this.props;let r;if(typeof l=="string"||typeof l=="object"){const f=cd(this.props,l,(d=this.presenceContext)==null?void 0:d.custom);f&&(r=f[i])}if(l&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,i);return u!==void 0&&!ue(u)?u:this.initialValues[i]!==void 0&&r===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new Wf),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}scheduleRenderMicrotask(){hd.render(this.render)}}class Kv extends tC{constructor(){super(...arguments),this.KeyframeResolver=_A}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){const r=i.style;return r?r[l]:void 0}removeValueFromRenderState(i,{vars:l,style:r}){delete l[i],delete r[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;ue(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}class ya{constructor(i){this.isMounted=!1,this.node=i}update(){}}function Qv({top:n,left:i,right:l,bottom:r}){return{x:{min:i,max:l},y:{min:n,max:r}}}function eC({x:n,y:i}){return{top:i.min,right:n.max,bottom:i.max,left:n.min}}function nC(n,i){if(!i)return n;const l=i({x:n.left,y:n.top}),r=i({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:r.y,right:r.x}}function Fc(n){return n===void 0||n===1}function Mf({scale:n,scaleX:i,scaleY:l}){return!Fc(n)||!Fc(i)||!Fc(l)}function Ua(n){return Mf(n)||Zv(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Zv(n){return g0(n.x)||g0(n.y)}function g0(n){return n&&n!=="0%"}function Ir(n,i,l){const r=n-l,u=i*r;return l+u}function v0(n,i,l,r,u){return u!==void 0&&(n=Ir(n,u,r)),Ir(n,l,r)+i}function Of(n,i=0,l=1,r,u){n.min=v0(n.min,i,l,r,u),n.max=v0(n.max,i,l,r,u)}function $v(n,{x:i,y:l}){Of(n.x,i.translate,i.scale,i.originPoint),Of(n.y,l.translate,l.scale,l.originPoint)}const x0=.999999999999,b0=1.0000000000001;function aC(n,i,l,r=!1){var h;const u=l.length;if(!u)return;i.x=i.y=1;let d,f;for(let m=0;m<u;m++){d=l[m],f=d.projectionDelta;const{visualElement:p}=d.options;p&&p.props.style&&p.props.style.display==="contents"||(r&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(hn(n.x,-d.scroll.offset.x),hn(n.y,-d.scroll.offset.y)),f&&(i.x*=f.x.scale,i.y*=f.y.scale,$v(n,f)),r&&Ua(d.latestValues)&&Gr(n,d.latestValues,(h=d.layout)==null?void 0:h.layoutBox))}i.x<b0&&i.x>x0&&(i.x=1),i.y<b0&&i.y>x0&&(i.y=1)}function hn(n,i){n.min+=i,n.max+=i}function S0(n,i,l,r,u=.5){const d=kt(n.min,n.max,u);Of(n,i,l,d,r)}function T0(n,i){return typeof n=="string"?parseFloat(n)/100*(i.max-i.min):n}function Gr(n,i,l){const r=l??n;S0(n.x,T0(i.x,r.x),i.scaleX,i.scale,i.originX),S0(n.y,T0(i.y,r.y),i.scaleY,i.scale,i.originY)}function Fv(n,i){return Qv(nC(n.getBoundingClientRect(),i))}function iC(n,i,l){const r=Fv(n,l),{scroll:u}=i;return u&&(hn(r.x,u.offset.x),hn(r.y,u.offset.y)),r}const sC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lC=Hi.length;function rC(n,i,l){let r="",u=!0;for(let f=0;f<lC;f++){const h=Hi[f],m=n[h];if(m===void 0)continue;let p=!0;if(typeof m=="number")p=m===(h.startsWith("scale")?1:0);else{const v=parseFloat(m);p=h.startsWith("scale")?v===1:v===0}if(!p||l){const v=jf(m,Jr[h]);if(!p){u=!1;const x=sC[h]||h;r+=`${x}(${v}) `}l&&(i[h]=v)}}const d=n.pathRotation;return d&&(u=!1,r+=`rotate(${jf(d,Jr.pathRotation)}) `),r=r.trim(),l?r=l(i,u?"":r):u&&(r="none"),r}function vd(n,i,l){const{style:r,vars:u,transformOrigin:d}=n;let f=!1,h=!1;for(const m in i){const p=i[m];if(Gi.has(m)){f=!0;continue}else if(rv(m)){u[m]=p;continue}else{const v=jf(p,Jr[m]);m.startsWith("origin")?(h=!0,d[m]=v):r[m]=v}}if(i.transform||(f||l?r.transform=rC(i,n.transform,l):r.transform&&(r.transform="none")),h){const{originX:m="50%",originY:p="50%",originZ:v=0}=d;r.transformOrigin=`${m} ${p} ${v}`}}function Jv(n,{style:i,vars:l},r,u){const d=n.style;let f;for(f in i)d[f]=i[f];u==null||u.applyProjectionStyles(d,r);for(f in l)d.setProperty(f,l[f])}function E0(n,i){return i.max===i.min?0:n/(i.max-i.min)*100}const Vs={correct:(n,i)=>{if(!i.target)return n;if(typeof n=="string")if(at.test(n))n=parseFloat(n);else return n;const l=E0(n,i.target.x),r=E0(n,i.target.y);return`${l}% ${r}%`}},oC={correct:(n,{treeScale:i,projectionDelta:l})=>{const r=n,u=nn.parse(n);if(u.length>5)return r;const d=nn.createTransformer(n),f=typeof u[0]!="number"?1:0,h=l.x.scale*i.x,m=l.y.scale*i.y;u[0+f]/=h,u[1+f]/=m;const p=kt(h,m,.5);return typeof u[2+f]=="number"&&(u[2+f]/=p),typeof u[3+f]=="number"&&(u[3+f]/=p),d(u)}},zf={borderRadius:{...Vs,applyTo:[...dd]},borderTopLeftRadius:Vs,borderTopRightRadius:Vs,borderBottomLeftRadius:Vs,borderBottomRightRadius:Vs,boxShadow:oC};function Wv(n,{layout:i,layoutId:l}){return Gi.has(n)||n.startsWith("origin")||(i||l!==void 0)&&(!!zf[n]||n==="opacity")}function xd(n,i,l){var f;const r=n.style,u=i==null?void 0:i.style,d={};if(!r)return d;for(const h in r)(ue(r[h])||u&&ue(u[h])||Wv(h,n)||((f=l==null?void 0:l.getValue(h))==null?void 0:f.liveStyle)!==void 0)&&(d[h]=r[h]);return d}function uC(n){return window.getComputedStyle(n)}class cC extends Kv{constructor(){super(...arguments),this.type="html",this.renderInstance=Jv}readValueFromInstance(i,l){var r;if(Gi.has(l))return(r=this.projection)!=null&&r.isProjecting?xf(l):jE(i,l);{const u=uC(i),d=(rv(l)?u.getPropertyValue(l):u[l])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(i,{transformPagePoint:l}){return Fv(i,l)}build(i,l,r){vd(i,l,r.transformTemplate)}scrapeMotionValuesFromProps(i,l,r){return xd(i,l,r)}}const fC={offset:"stroke-dashoffset",array:"stroke-dasharray"},dC={offset:"strokeDashoffset",array:"strokeDasharray"};function hC(n,i,l=1,r=0,u=!0){n.pathLength=1;const d=u?fC:dC;n[d.offset]=`${-r}`,n[d.array]=`${i} ${l}`}const mC=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Iv(n,{attrX:i,attrY:l,attrScale:r,pathLength:u,pathSpacing:d=1,pathOffset:f=0,...h},m,p,v){if(vd(n,h,p),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:S}=n;x.transform&&(S.transform=x.transform,delete x.transform),(S.transform||x.transformOrigin)&&(S.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),S.transform&&(S.transformBox=(v==null?void 0:v.transformBox)??"fill-box",delete x.transformBox);for(const E of mC)x[E]!==void 0&&(S[E]=x[E],delete x[E]);i!==void 0&&(x.x=i),l!==void 0&&(x.y=l),r!==void 0&&(x.scale=r),u!==void 0&&hC(x,u,d,f,!1)}const tx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ex=n=>typeof n=="string"&&n.toLowerCase()==="svg";function pC(n,i,l,r){Jv(n,i,void 0,r);for(const u in i.attrs)n.setAttribute(tx.has(u)?u:fd(u),i.attrs[u])}function nx(n,i,l){const r=xd(n,i,l);for(const u in n)if(ue(n[u])||ue(i[u])){const d=Hi.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;r[d]=n[u]}return r}class yC extends Kv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=te}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(Gi.has(l)){const r=kv(l);return r&&r.default||0}return l=tx.has(l)?l:fd(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,r){return nx(i,l,r)}build(i,l,r){Iv(i,l,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(i,l,r,u){pC(i,l,r,u)}mount(i){this.isSVGTag=ex(i.tagName),super.mount(i)}}const gC=gd.length;function ax(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?ax(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const i={};for(let l=0;l<gC;l++){const r=gd[l],u=n.props[r];($s(u)||u===!1)&&(i[r]=u)}return i}function ix(n,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==n.length)return!1;for(let r=0;r<l;r++)if(i[r]!==n[r])return!1;return!0}const vC=[...yd].reverse(),xC=yd.length;function bC(n){return i=>Promise.all(i.map(({animation:l,options:r})=>gA(n,l,r)))}function SC(n){let i=bC(n),l=A0(),r=!0,u=!1;const d=p=>(v,x)=>{var E;const S=Ya(n,x,p==="exit"?(E=n.presenceContext)==null?void 0:E.custom:void 0);if(S){const{transition:A,transitionEnd:w,..._}=S;v={...v,..._,...w}}return v};function f(p){i=p(n)}function h(p){const{props:v}=n,x=ax(n.parent)||{},S=[],E=new Set;let A={},w=1/0;for(let R=0;R<xC;R++){const O=vC[R],D=l[O],M=v[O]!==void 0?v[O]:x[O],H=$s(M),$=O===p?D.isActive:null;$===!1&&(w=R);let V=M===x[O]&&M!==v[O]&&H;if(V&&(r||u)&&n.manuallyAnimateOnMount&&(V=!1),D.protectedKeys={...A},!D.isActive&&$===null||!M&&!D.prevProp||ho(M)||typeof M=="boolean")continue;if(O==="exit"&&D.isActive&&$!==!0){D.prevResolvedValues&&(A={...A,...D.prevResolvedValues});continue}const q=TC(D.prevProp,M);let Z=q||O===p&&D.isActive&&!V&&H||R>w&&H,F=!1;const I=Array.isArray(M)?M:[M];let ut=I.reduce(d(O),{});$===!1&&(ut={});const{prevResolvedValues:Tt={}}=D,pt={...Tt,...ut},Q=tt=>{Z=!0,E.has(tt)&&(F=!0,E.delete(tt)),D.needsAnimating[tt]=!0;const W=n.getValue(tt);W&&(W.liveStyle=!1)};for(const tt in pt){const W=ut[tt],ct=Tt[tt];if(A.hasOwnProperty(tt))continue;let N=!1;Cf(W)&&Cf(ct)?N=!ix(W,ct)||q:N=W!==ct,N?W!=null?Q(tt):E.add(tt):W!==void 0&&E.has(tt)?Q(tt):D.protectedKeys[tt]=!0}D.prevProp=M,D.prevResolvedValues=ut,D.isActive&&(A={...A,...ut}),(r||u)&&n.blockInitialAnimation&&(Z=!1);const L=V&&q;Z&&(!L||F)&&S.push(...I.map(tt=>{const W={type:O};if(typeof tt=="string"&&(r||u)&&!L&&n.manuallyAnimateOnMount&&n.parent){const{parent:ct}=n,N=Ya(ct,tt);if(ct.enteringChildren&&N){const{delayChildren:K}=N.transition||{};W.delay=Rv(ct.enteringChildren,n,K)}}return{animation:tt,options:W}}))}if(E.size){const R={};if(typeof v.initial!="boolean"){const O=Ya(n,Array.isArray(v.initial)?v.initial[0]:v.initial);O&&O.transition&&(R.transition=O.transition)}E.forEach(O=>{const D=n.getBaseTarget(O),M=n.getValue(O);M&&(M.liveStyle=!0),R[O]=D??null}),S.push({animation:R})}let _=!!S.length;return r&&(v.initial===!1||v.initial===v.animate)&&!n.manuallyAnimateOnMount&&(_=!1),r=!1,u=!1,_?i(S):Promise.resolve()}function m(p,v){var S;if(l[p].isActive===v)return Promise.resolve();(S=n.variantChildren)==null||S.forEach(E=>{var A;return(A=E.animationState)==null?void 0:A.setActive(p,v)}),l[p].isActive=v;const x=h(p);for(const E in l)l[E].protectedKeys={};return x}return{animateChanges:h,setActive:m,setAnimateFunction:f,getState:()=>l,reset:()=>{l=A0(),u=!0}}}function TC(n,i){return typeof i=="string"?i!==n:Array.isArray(i)?!ix(i,n):!1}function ka(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function A0(){return{animate:ka(!0),whileInView:ka(),whileHover:ka(),whileTap:ka(),whileDrag:ka(),whileFocus:ka(),exit:ka()}}function Lf(n,i){n.min=i.min,n.max=i.max}function Fe(n,i){Lf(n.x,i.x),Lf(n.y,i.y)}function C0(n,i){n.translate=i.translate,n.scale=i.scale,n.originPoint=i.originPoint,n.origin=i.origin}const sx=1e-4,EC=1-sx,AC=1+sx,lx=.01,CC=0-lx,wC=0+lx;function pe(n){return n.max-n.min}function RC(n,i,l){return Math.abs(n-i)<=l}function w0(n,i,l,r=.5){n.origin=r,n.originPoint=kt(i.min,i.max,n.origin),n.scale=pe(l)/pe(i),n.translate=kt(l.min,l.max,n.origin)-n.originPoint,(n.scale>=EC&&n.scale<=AC||isNaN(n.scale))&&(n.scale=1),(n.translate>=CC&&n.translate<=wC||isNaN(n.translate))&&(n.translate=0)}function qs(n,i,l,r){w0(n.x,i.x,l.x,r?r.originX:void 0),w0(n.y,i.y,l.y,r?r.originY:void 0)}function R0(n,i,l,r=0){const u=r?kt(l.min,l.max,r):l.min;n.min=u+i.min,n.max=n.min+pe(i)}function _C(n,i,l,r){R0(n.x,i.x,l.x,r==null?void 0:r.x),R0(n.y,i.y,l.y,r==null?void 0:r.y)}function _0(n,i,l,r=0){const u=r?kt(l.min,l.max,r):l.min;n.min=i.min-u,n.max=n.min+pe(i)}function to(n,i,l,r){_0(n.x,i.x,l.x,r==null?void 0:r.x),_0(n.y,i.y,l.y,r==null?void 0:r.y)}function N0(n,i,l,r,u){return n-=i,n=Ir(n,1/l,r),u!==void 0&&(n=Ir(n,1/u,r)),n}function NC(n,i=0,l=1,r=.5,u,d=n,f=n){if(mn.test(i)&&(i=parseFloat(i),i=kt(f.min,f.max,i/100)-f.min),typeof i!="number")return;let h=kt(d.min,d.max,r);n===d&&(h-=i),n.min=N0(n.min,i,l,h,u),n.max=N0(n.max,i,l,h,u)}function j0(n,i,[l,r,u],d,f){NC(n,i[l],i[r],i[u],i.scale,d,f)}const jC=["x","scaleX","originX"],DC=["y","scaleY","originY"];function D0(n,i,l,r){j0(n.x,i,jC,l?l.x:void 0,r?r.x:void 0),j0(n.y,i,DC,l?l.y:void 0,r?r.y:void 0)}function M0(n){return n.translate===0&&n.scale===1}function rx(n){return M0(n.x)&&M0(n.y)}function O0(n,i){return n.min===i.min&&n.max===i.max}function MC(n,i){return O0(n.x,i.x)&&O0(n.y,i.y)}function z0(n,i){return Math.round(n.min)===Math.round(i.min)&&Math.round(n.max)===Math.round(i.max)}function ox(n,i){return z0(n.x,i.x)&&z0(n.y,i.y)}function L0(n){return pe(n.x)/pe(n.y)}function k0(n,i){return n.translate===i.translate&&n.scale===i.scale&&n.originPoint===i.originPoint}function fn(n){return[n("x"),n("y")]}function OC(n,i,l){let r="";const u=n.x.translate/i.x,d=n.y.translate/i.y,f=(l==null?void 0:l.z)||0;if((u||d||f)&&(r=`translate3d(${u}px, ${d}px, ${f}px) `),(i.x!==1||i.y!==1)&&(r+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:p,rotate:v,pathRotation:x,rotateX:S,rotateY:E,skewX:A,skewY:w}=l;p&&(r=`perspective(${p}px) ${r}`),v&&(r+=`rotate(${v}deg) `),x&&(r+=`rotate(${x}deg) `),S&&(r+=`rotateX(${S}deg) `),E&&(r+=`rotateY(${E}deg) `),A&&(r+=`skewX(${A}deg) `),w&&(r+=`skewY(${w}deg) `)}const h=n.x.scale*i.x,m=n.y.scale*i.y;return(h!==1||m!==1)&&(r+=`scale(${h}, ${m})`),r||"none"}const zC=dd.length,U0=n=>typeof n=="string"?parseFloat(n):n,V0=n=>typeof n=="number"||at.test(n);function LC(n,i,l,r,u,d){u?(n.opacity=kt(0,l.opacity??1,kC(r)),n.opacityExit=kt(i.opacity??1,0,UC(r))):d&&(n.opacity=kt(i.opacity??1,l.opacity??1,r));for(let f=0;f<zC;f++){const h=dd[f];let m=B0(i,h),p=B0(l,h);if(m===void 0&&p===void 0)continue;m||(m=0),p||(p=0),m===0||p===0||V0(m)===V0(p)?(n[h]=Math.max(kt(U0(m),U0(p),r),0),(mn.test(p)||mn.test(m))&&(n[h]+="%")):n[h]=p}(i.rotate||l.rotate)&&(n.rotate=kt(i.rotate||0,l.rotate||0,r))}function B0(n,i){return n[i]!==void 0?n[i]:n.borderRadius}const kC=ux(0,.5,ev),UC=ux(.5,.95,Ke);function ux(n,i,l){return r=>r<n?0:r>i?1:l(Qs(n,i,r))}function VC(n,i,l){const r=ue(n)?n:zi(n);return r.start(ud("",r,i,l)),r.animation}function Fs(n,i,l,r={passive:!0}){return n.addEventListener(i,l,r),()=>n.removeEventListener(i,l,r)}const BC=(n,i)=>n.depth-i.depth;class HC{constructor(){this.children=[],this.isDirty=!1}add(i){Ff(this.children,i),this.isDirty=!0}remove(i){Kr(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(BC),this.isDirty=!1,this.children.forEach(i)}}function GC(n,i){const l=me.now(),r=({timestamp:u})=>{const d=u-l;d>=i&&(ma(r),n(d-i))};return Ut.setup(r,!0),()=>ma(r)}function Yr(n){return ue(n)?n.get():n}class YC{constructor(){this.members=[]}add(i){Ff(this.members,i);for(let l=this.members.length-1;l>=0;l--){const r=this.members[l];if(r===i||r===this.lead||r===this.prevLead)continue;const u=r.instance;(!u||u.isConnected===!1)&&!r.snapshot&&(Kr(this.members,r),r.unmount())}i.scheduleRender()}remove(i){if(Kr(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){var l;for(let r=this.members.indexOf(i)-1;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1&&((l=u.instance)==null?void 0:l.isConnected)!==!1)return this.promote(u),!0}return!1}promote(i,l){var u;const r=this.lead;if(i!==r&&(this.prevLead=r,this.lead=i,i.show(),r)){r.updateSnapshot(),i.scheduleRender();const{layoutDependency:d}=r.options,{layoutDependency:f}=i.options;(d===void 0||d!==f)&&(i.resumeFrom=r,l&&(r.preserveOpacity=!0),r.snapshot&&(i.snapshot=r.snapshot,i.snapshot.latestValues=r.animationValues||r.latestValues),(u=i.root)!=null&&u.isUpdating&&(i.isLayoutDirty=!0)),i.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(i=>{var l,r,u,d,f;(r=(l=i.options).onExitComplete)==null||r.call(l),(f=(u=i.resumingFrom)==null?void 0:(d=u.options).onExitComplete)==null||f.call(d)})}scheduleRender(){this.members.forEach(i=>i.instance&&i.scheduleRender(!1))}removeLeadSnapshot(){var i;(i=this.lead)!=null&&i.snapshot&&(this.lead.snapshot=void 0)}}const qr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Jc=["","X","Y","Z"],qC=1e3;let PC=0;function Wc(n,i,l,r){const{latestValues:u}=i;u[n]&&(l[n]=u[n],i.setStaticValue(n,0),r&&(r[n]=0))}function cx(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:i}=n.options;if(!i)return;const l=Mv(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",Ut,!(u||d))}const{parent:r}=n;r&&!r.hasCheckedOptimisedAppear&&cx(r)}function fx({attachResizeListener:n,defaultParent:i,measureScroll:l,checkIsScrollRoot:r,resetTransform:u}){return class{constructor(f={},h=i==null?void 0:i()){this.id=PC++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QC),this.nodes.forEach(IC),this.nodes.forEach(tw),this.nodes.forEach(ZC)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new HC)}addEventListener(f,h){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Wf),this.eventHandlers.get(f).add(h)}notifyListeners(f,...h){const m=this.eventHandlers.get(f);m&&m.notify(...h)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=pd(f)&&!KA(f),this.instance=f;const{layoutId:h,layout:m,visualElement:p}=this.options;if(p&&!p.current&&p.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||h)&&(this.isLayoutDirty=!0),n){let v,x=0;const S=()=>this.root.updateBlockedByResize=!1;Ut.read(()=>{x=window.innerWidth}),n(f,()=>{const E=window.innerWidth;E!==x&&(x=E,this.root.updateBlockedByResize=!0,v&&v(),v=GC(S,250),qr.hasAnimatedSinceResize&&(qr.hasAnimatedSinceResize=!1,this.nodes.forEach(Y0)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&p&&(h||m)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:x,hasRelativeLayoutChanged:S,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||p.getDefaultTransition()||sw,{onLayoutAnimationStart:w,onLayoutAnimationComplete:_}=p.getProps(),R=!this.targetLayout||!ox(this.targetLayout,E),O=!x&&S;if(this.options.layoutRoot||this.resumeFrom||O||x&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const D={...od(A,"layout"),onPlay:w,onComplete:_};(p.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D),this.setAnimationOrigin(v,O,D.path)}else x||Y0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ma(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ew),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const x=this.path[v];x.shouldResetTransform=!0,(typeof x.latestValues.x=="string"||typeof x.latestValues.y=="string")&&(x.isLayoutDirty=!0),x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:h,layout:m}=this.options;if(h===void 0&&!m)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const m=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),m&&this.nodes.forEach(FC),this.nodes.forEach(H0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(G0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(JC),this.nodes.forEach(WC),this.nodes.forEach(XC),this.nodes.forEach(KC)):this.nodes.forEach(G0),this.clearAllSnapshots();const h=me.now();oe.delta=pn(0,1e3/60,h-oe.timestamp),oe.timestamp=h,oe.isProcessing=!0,qc.update.process(oe),qc.preRender.process(oe),qc.render.process(oe),oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($C),this.sharedNodes.forEach(nw)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ut.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ut.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pe(this.snapshot.measuredBox.x)&&!pe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=te()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(h=!1),h&&this.instance){const m=r(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:m,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!rx(this.projectionDelta),m=this.getTransformTemplate(),p=m?m(this.latestValues,""):void 0,v=p!==this.prevTransformTemplateValue;f&&this.instance&&(h||Ua(this.latestValues)||v)&&(u(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const h=this.measurePageBox();let m=this.removeElementScroll(h);return f&&(m=this.removeTransform(m)),lw(m),{animationId:this.root.animationId,measuredBox:h,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var p;const{visualElement:f}=this.options;if(!f)return te();const h=f.measureViewportBox();if(!(((p=this.scroll)==null?void 0:p.wasRoot)||this.path.some(rw))){const{scroll:v}=this.root;v&&(hn(h.x,v.offset.x),hn(h.y,v.offset.y))}return h}removeElementScroll(f){var m;const h=te();if(Fe(h,f),(m=this.scroll)!=null&&m.wasRoot)return h;for(let p=0;p<this.path.length;p++){const v=this.path[p],{scroll:x,options:S}=v;v!==this.root&&x&&S.layoutScroll&&(x.wasRoot&&Fe(h,f),hn(h.x,x.offset.x),hn(h.y,x.offset.y))}return h}applyTransform(f,h=!1,m){var v,x;const p=m||te();Fe(p,f);for(let S=0;S<this.path.length;S++){const E=this.path[S];!h&&E.options.layoutScroll&&E.scroll&&E!==E.root&&(hn(p.x,-E.scroll.offset.x),hn(p.y,-E.scroll.offset.y)),Ua(E.latestValues)&&Gr(p,E.latestValues,(v=E.layout)==null?void 0:v.layoutBox)}return Ua(this.latestValues)&&Gr(p,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),p}removeTransform(f){var m;const h=te();Fe(h,f);for(let p=0;p<this.path.length;p++){const v=this.path[p];if(!Ua(v.latestValues))continue;let x;v.instance&&(Mf(v.latestValues)&&v.updateSnapshot(),x=te(),Fe(x,v.measurePageBox())),D0(h,v.latestValues,(m=v.snapshot)==null?void 0:m.layoutBox,x)}return Ua(this.latestValues)&&D0(h,this.latestValues),h}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var E;const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==h;if(!(f||m&&this.isSharedProjectionDirty||this.isProjectionDirty||(E=this.parent)!=null&&E.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:v,layoutId:x}=this.options;if(!this.layout||!(v||x))return;this.resolvedRelativeTargetAt=oe.timestamp;const S=this.getClosestProjectingParent();S&&this.linkedParentVersion!==S.layoutVersion&&!S.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&S&&S.layout?this.createRelativeTarget(S,this.layout.layoutBox,S.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=te(),this.targetWithTransforms=te()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_C(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Fe(this.target,this.layout.layoutBox),$v(this.target,this.targetDelta)):Fe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?this.createRelativeTarget(S,this.target,S.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Mf(this.parent.latestValues)||Zv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,h,m){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=te(),this.relativeTargetOrigin=te(),to(this.relativeTargetOrigin,h,m,this.options.layoutAnchor||void 0),Fe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var A;const f=this.getLead(),h=!!this.resumingFrom||this!==f;let m=!0;if((this.isProjectionDirty||(A=this.parent)!=null&&A.isProjectionDirty)&&(m=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===oe.timestamp&&(m=!1),m)return;const{layout:p,layoutId:v}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||v))return;Fe(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,S=this.treeScale.y;aC(this.layoutCorrected,this.treeScale,this.path,h),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=te());const{target:E}=f;if(!E){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(C0(this.prevProjectionDelta.x,this.projectionDelta.x),C0(this.prevProjectionDelta.y,this.projectionDelta.y)),qs(this.projectionDelta,this.layoutCorrected,E,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==S||!k0(this.projectionDelta.x,this.prevProjectionDelta.x)||!k0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var h;if((h=this.options.visualElement)==null||h.scheduleRender(),f){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mi(),this.projectionDelta=Mi(),this.projectionDeltaWithTransform=Mi()}setAnimationOrigin(f,h=!1,m){const p=this.snapshot,v=p?p.latestValues:{},x={...this.latestValues},S=Mi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const E=te(),A=p?p.source:void 0,w=this.layout?this.layout.source:void 0,_=A!==w,R=this.getStack(),O=!R||R.members.length<=1,D=!!(_&&!O&&this.options.crossfade===!0&&!this.path.some(iw));this.animationProgress=0;let M;const H=m==null?void 0:m.interpolateProjection(f);this.mixTargetDelta=$=>{const V=$/1e3,q=H==null?void 0:H(V);q?(S.x.translate=q.x,S.x.scale=kt(f.x.scale,1,V),S.x.origin=f.x.origin,S.x.originPoint=f.x.originPoint,S.y.translate=q.y,S.y.scale=kt(f.y.scale,1,V),S.y.origin=f.y.origin,S.y.originPoint=f.y.originPoint):(q0(S.x,f.x,V),q0(S.y,f.y,V)),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(to(E,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),aw(this.relativeTarget,this.relativeTargetOrigin,E,V),M&&MC(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=te()),Fe(M,this.relativeTarget)),_&&(this.animationValues=x,LC(x,v,this.latestValues,V,D,O)),q&&q.rotate!==void 0&&(this.animationValues||(this.animationValues=x),this.animationValues.pathRotation=q.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){var h,m,p;this.notifyListeners("animationStart"),(h=this.currentAnimation)==null||h.stop(),(p=(m=this.resumingFrom)==null?void 0:m.currentAnimation)==null||p.stop(),this.pendingAnimation&&(ma(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ut.update(()=>{qr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zi(0)),this.motionValue.jump(0,!1),this.currentAnimation=VC(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:v=>{this.mixTargetDelta(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:h,target:m,layout:p,latestValues:v}=f;if(!(!h||!m||!p)){if(this!==f&&this.layout&&p&&dx(this.options.animationType,this.layout.layoutBox,p.layoutBox)){m=this.target||te();const x=pe(this.layout.layoutBox.x);m.x.min=f.target.x.min,m.x.max=m.x.min+x;const S=pe(this.layout.layoutBox.y);m.y.min=f.target.y.min,m.y.max=m.y.min+S}Fe(h,m),Gr(h,v),qs(this.projectionDeltaWithTransform,this.layoutCorrected,h,v)}}registerSharedNode(f,h){this.sharedNodes.has(f)||this.sharedNodes.set(f,new YC),this.sharedNodes.get(f).add(h);const p=h.options.initialPromotionConfig;h.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(h):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var h;const{layoutId:f}=this.options;return f?((h=this.getStack())==null?void 0:h.lead)||this:this}getPrevLead(){var h;const{layoutId:f}=this.options;return f?(h=this.getStack())==null?void 0:h.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:h,preserveFollowOpacity:m}={}){const p=this.getStack();p&&p.promote(this,m),f&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let h=!1;const{latestValues:m}=f;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(h=!0),!h)return;const p={};m.z&&Wc("z",f,p,this.animationValues);for(let v=0;v<Jc.length;v++)Wc(`rotate${Jc[v]}`,f,p,this.animationValues),Wc(`skew${Jc[v]}`,f,p,this.animationValues);f.render();for(const v in p)f.setStaticValue(v,p[v]),this.animationValues&&(this.animationValues[v]=p[v]);f.scheduleRender()}applyProjectionStyles(f,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=Yr(h==null?void 0:h.pointerEvents)||"",f.transform=m?m(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Yr(h==null?void 0:h.pointerEvents)||""),this.hasProjected&&!Ua(this.latestValues)&&(f.transform=m?m({},""):"none",this.hasProjected=!1);return}f.visibility="";const v=p.animationValues||p.latestValues;this.applyTransformsToTarget();let x=OC(this.projectionDeltaWithTransform,this.treeScale,v);m&&(x=m(v,x)),f.transform=x;const{x:S,y:E}=this.projectionDelta;f.transformOrigin=`${S.origin*100}% ${E.origin*100}% 0`,p.animationValues?f.opacity=p===this?v.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:f.opacity=p===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const A in zf){if(v[A]===void 0)continue;const{correct:w,applyTo:_,isCSSVariable:R}=zf[A],O=x==="none"?v[A]:w(v[A],p);if(_){const D=_.length;for(let M=0;M<D;M++)f[_[M]]=O}else R?this.options.visualElement.renderState.vars[A]=O:f[A]=O}this.options.layoutId&&(f.pointerEvents=p===this?Yr(h==null?void 0:h.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var h;return(h=f.currentAnimation)==null?void 0:h.stop()}),this.root.nodes.forEach(H0),this.root.sharedNodes.clear()}}}function XC(n){n.updateLayout()}function KC(n){var l;const i=((l=n.resumeFrom)==null?void 0:l.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&i&&n.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:u}=n.layout,{animationType:d}=n.options,f=i.source!==n.layout.source;if(d==="size")fn(x=>{const S=f?i.measuredBox[x]:i.layoutBox[x],E=pe(S);S.min=r[x].min,S.max=S.min+E});else if(d==="x"||d==="y"){const x=d==="x"?"y":"x";Lf(f?i.measuredBox[x]:i.layoutBox[x],r[x])}else dx(d,i.layoutBox,r)&&fn(x=>{const S=f?i.measuredBox[x]:i.layoutBox[x],E=pe(r[x]);S.max=S.min+E,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[x].max=n.relativeTarget[x].min+E)});const h=Mi();qs(h,r,i.layoutBox);const m=Mi();f?qs(m,n.applyTransform(u,!0),i.measuredBox):qs(m,r,i.layoutBox);const p=!rx(h);let v=!1;if(!n.resumeFrom){const x=n.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:S,layout:E}=x;if(S&&E){const A=n.options.layoutAnchor||void 0,w=te();to(w,i.layoutBox,S.layoutBox,A);const _=te();to(_,r,E.layoutBox,A),ox(w,_)||(v=!0),x.options.layoutRoot&&(n.relativeTarget=_,n.relativeTargetOrigin=w,n.relativeParent=x)}}}n.notifyListeners("didUpdate",{layout:r,snapshot:i,delta:m,layoutDelta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:v})}else if(n.isLead()){const{onExitComplete:r}=n.options;r&&r()}n.options.transition=void 0}function QC(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function ZC(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function $C(n){n.clearSnapshot()}function H0(n){n.clearMeasurements()}function FC(n){n.isLayoutDirty=!0,n.updateLayout()}function G0(n){n.isLayoutDirty=!1}function JC(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function WC(n){const{visualElement:i}=n.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),n.resetTransform()}function Y0(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function IC(n){n.resolveTargetDelta()}function tw(n){n.calcProjection()}function ew(n){n.resetSkewAndRotation()}function nw(n){n.removeLeadSnapshot()}function q0(n,i,l){n.translate=kt(i.translate,0,l),n.scale=kt(i.scale,1,l),n.origin=i.origin,n.originPoint=i.originPoint}function P0(n,i,l,r){n.min=kt(i.min,l.min,r),n.max=kt(i.max,l.max,r)}function aw(n,i,l,r){P0(n.x,i.x,l.x,r),P0(n.y,i.y,l.y,r)}function iw(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const sw={duration:.45,ease:[.4,0,.1,1]},X0=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),K0=X0("applewebkit/")&&!X0("chrome/")?Math.round:Ke;function Q0(n){n.min=K0(n.min),n.max=K0(n.max)}function lw(n){Q0(n.x),Q0(n.y)}function dx(n,i,l){return n==="position"||n==="preserve-aspect"&&!RC(L0(i),L0(l),.2)}function rw(n){var i;return n!==n.root&&((i=n.scroll)==null?void 0:i.wasRoot)}const ow=fx({attachResizeListener:(n,i)=>Fs(n,"resize",i),measureScroll:()=>{var n,i;return{x:document.documentElement.scrollLeft||((n=document.body)==null?void 0:n.scrollLeft)||0,y:document.documentElement.scrollTop||((i=document.body)==null?void 0:i.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Ic={current:void 0},hx=fx({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Ic.current){const n=new ow({});n.mount(window),n.setOptions({layoutScroll:!0}),Ic.current=n}return Ic.current},resetTransform:(n,i)=>{n.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),bd=T.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function Z0(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function uw(...n){return i=>{let l=!1;const r=n.map(u=>{const d=Z0(u,i);return!l&&typeof d=="function"&&(l=!0),d});if(l)return()=>{for(let u=0;u<r.length;u++){const d=r[u];typeof d=="function"?d():Z0(n[u],null)}}}}function cw(...n){return T.useCallback(uw(...n),n)}class fw extends T.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(Ur(l)&&i.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=l.offsetParent,u=Ur(r)&&r.offsetWidth||0,d=Ur(r)&&r.offsetHeight||0,f=getComputedStyle(l),h=this.props.sizeRef.current;h.height=parseFloat(f.height),h.width=parseFloat(f.width),h.top=l.offsetTop,h.left=l.offsetLeft,h.right=u-h.width-h.left,h.bottom=d-h.height-h.top,h.direction=f.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function dw({children:n,isPresent:i,anchorX:l,anchorY:r,root:u,pop:d}){var S;const f=T.useId(),h=T.useRef(null),m=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:p}=T.useContext(bd),v=((S=n.props)==null?void 0:S.ref)??(n==null?void 0:n.ref),x=cw(h,v);return T.useInsertionEffect(()=>{const{width:E,height:A,top:w,left:_,right:R,bottom:O,direction:D}=m.current;if(i||d===!1||!h.current||!E||!A)return;const M=D==="rtl",H=l==="left"?M?`right: ${R}`:`left: ${_}`:M?`left: ${_}`:`right: ${R}`,$=r==="bottom"?`bottom: ${O}`:`top: ${w}`;h.current.dataset.motionPopId=f;const V=document.createElement("style");p&&(V.nonce=p);const q=u??document.head;return q.appendChild(V),V.sheet&&V.sheet.insertRule(`
[data-motion-pop-id="${f}"] {
position: absolute !important;
width: ${E}px !important;
height: ${A}px !important;
${H}px !important;
${$}px !important;
}
`),()=>{var Z;(Z=h.current)==null||Z.removeAttribute("data-motion-pop-id"),q.contains(V)&&q.removeChild(V)}},[i]),g.jsx(fw,{isPresent:i,childRef:h,sizeRef:m,pop:d,children:d===!1?n:T.cloneElement(n,{ref:x})})}const hw=({children:n,initial:i,isPresent:l,onExitComplete:r,custom:u,presenceAffectsLayout:d,mode:f,anchorX:h,anchorY:m,root:p})=>{const v=Zf(mw),x=T.useId(),S=T.useRef(l),E=T.useRef(r);$f(()=>{S.current=l,E.current=r});let A=!0,w=T.useMemo(()=>(A=!1,{id:x,initial:i,isPresent:l,custom:u,onExitComplete:_=>{v.set(_,!0);for(const R of v.values())if(!R)return;r&&r()},register:_=>(v.set(_,!1),()=>{var R;v.delete(_),!S.current&&!v.size&&((R=E.current)==null||R.call(E))})}),[l,v,r]);return d&&A&&(w={...w}),T.useMemo(()=>{v.forEach((_,R)=>v.set(R,!1))},[l]),T.useEffect(()=>{!l&&!v.size&&r&&r()},[l]),n=g.jsx(dw,{pop:f==="popLayout",isPresent:l,anchorX:h,anchorY:m,root:p,children:n}),g.jsx(co.Provider,{value:w,children:n})};function mw(){return new Map}function mx(n=!0){const i=T.useContext(co);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:r,register:u}=i,d=T.useId();T.useEffect(()=>{if(n)return u(d)},[n]);const f=T.useCallback(()=>n&&r&&r(d),[d,r,n]);return!l&&r?[!1,f]:[!0]}const _r=n=>n.key||"";function $0(n){const i=[];return T.Children.forEach(n,l=>{T.isValidElement(l)&&i.push(l)}),i}const px=({children:n,custom:i,initial:l=!0,onExitComplete:r,presenceAffectsLayout:u=!0,mode:d="sync",propagate:f=!1,anchorX:h="left",anchorY:m="top",root:p})=>{const[v,x]=mx(f),S=T.useMemo(()=>$0(n),[n]),E=f&&!v?[]:S.map(_r),A=T.useRef(!0),w=T.useRef(S),_=Zf(()=>new Map),R=T.useRef(new Set),[O,D]=T.useState(S),[M,H]=T.useState(S);$f(()=>{A.current=!1,w.current=S;for(let q=0;q<M.length;q++){const Z=_r(M[q]);E.includes(Z)?(_.delete(Z),R.current.delete(Z)):_.get(Z)!==!0&&_.set(Z,!1)}},[M,E.length,E.join("-")]);const $=[];if(S!==O){let q=[...S];for(let Z=0;Z<M.length;Z++){const F=M[Z],I=_r(F);E.includes(I)||(q.splice(Z,0,F),$.push(F))}return d==="wait"&&$.length&&(q=$),H($0(q)),D(S),null}const{forceRender:V}=T.useContext(Qf);return g.jsx(g.Fragment,{children:M.map(q=>{const Z=_r(q),F=f&&!v?!1:S===M||E.includes(Z),I=()=>{if(R.current.has(Z))return;if(_.has(Z))R.current.add(Z),_.set(Z,!0);else return;let ut=!0;_.forEach(Tt=>{Tt||(ut=!1)}),ut&&(V==null||V(),H(w.current),f&&(x==null||x()),r&&r())};return g.jsx(hw,{isPresent:F,initial:!A.current||l?void 0:!1,custom:i,presenceAffectsLayout:u,mode:d,root:p,onExitComplete:F?void 0:I,anchorX:h,anchorY:m,children:q},Z)})})},yx=T.createContext({strict:!1}),F0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let J0=!1;function pw(){if(J0)return;const n={};for(const i in F0)n[i]={isEnabled:l=>F0[i].some(r=>!!l[r])};Xv(n),J0=!0}function gx(){return pw(),IA()}function yw(n){const i=gx();for(const l in n)i[l]={...i[l],...n[l]};Xv(i)}const gw=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function eo(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||gw.has(n)}let vx=n=>!eo(n);function vw(n){typeof n=="function"&&(vx=i=>i.startsWith("on")?!eo(i):n(i))}try{vw(require("@emotion/is-prop-valid").default)}catch{}function xw(n,i,l){const r={};for(const u in n)u==="values"&&typeof n.values=="object"||ue(n[u])||(vx(u)||l===!0&&eo(u)||!i&&!eo(u)||n.draggable&&u.startsWith("onDrag"))&&(r[u]=n[u]);return r}const po=T.createContext({});function bw(n,i){if(mo(n)){const{initial:l,animate:r}=n;return{initial:l===!1||$s(l)?l:void 0,animate:$s(r)?r:void 0}}return n.inherit!==!1?i:{}}function Sw(n){const{initial:i,animate:l}=bw(n,T.useContext(po));return T.useMemo(()=>({initial:i,animate:l}),[W0(i),W0(l)])}function W0(n){return Array.isArray(n)?n.join(" "):n}const Sd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xx(n,i,l){for(const r in i)!ue(i[r])&&!Wv(r,l)&&(n[r]=i[r])}function Tw({transformTemplate:n},i){return T.useMemo(()=>{const l=Sd();return vd(l,i,n),Object.assign({},l.vars,l.style)},[i])}function Ew(n,i){const l=n.style||{},r={};return xx(r,l,n),Object.assign(r,Tw(n,i)),r}function Aw(n,i){const l={},r=Ew(n,i);return n.drag&&n.dragListener!==!1&&(l.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(l.tabIndex=0),l.style=r,l}const bx=()=>({...Sd(),attrs:{}});function Cw(n,i,l,r){const u=T.useMemo(()=>{const d=bx();return Iv(d,i,ex(r),n.transformTemplate,n.style),{...d.attrs,style:{...d.style}}},[i]);if(n.style){const d={};xx(d,n.style,n),u.style={...d,...u.style}}return u}const ww=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Td(n){return typeof n!="string"||n.includes("-")?!1:!!(ww.indexOf(n)>-1||/[A-Z]/u.test(n))}function Rw(n,i,l,{latestValues:r},u,d=!1,f){const m=(f??Td(n)?Cw:Aw)(i,r,u,n),p=xw(i,typeof n=="string",d),v=n!==T.Fragment?{...p,...m,ref:l}:{},{children:x}=i,S=T.useMemo(()=>ue(x)?x.get():x,[x]);return T.createElement(n,{...v,children:S})}function _w({scrapeMotionValuesFromProps:n,createRenderState:i},l,r,u){return{latestValues:Nw(l,r,u,n),renderState:i()}}function Nw(n,i,l,r){const u={},d=r(n,{});for(const S in d)u[S]=Yr(d[S]);let{initial:f,animate:h}=n;const m=mo(n),p=qv(n);i&&p&&!m&&n.inherit!==!1&&(f===void 0&&(f=i.initial),h===void 0&&(h=i.animate));let v=l?l.initial===!1:!1;v=v||f===!1;const x=v?h:f;if(x&&typeof x!="boolean"&&!ho(x)){const S=Array.isArray(x)?x:[x];for(let E=0;E<S.length;E++){const A=cd(n,S[E]);if(A){const{transitionEnd:w,transition:_,...R}=A;for(const O in R){let D=R[O];if(Array.isArray(D)){const M=v?D.length-1:0;D=D[M]}D!==null&&(u[O]=D)}for(const O in w)u[O]=w[O]}}}return u}const Sx=n=>(i,l)=>{const r=T.useContext(po),u=T.useContext(co),d=()=>_w(n,i,r,u);return l?d():Zf(d)},jw=Sx({scrapeMotionValuesFromProps:xd,createRenderState:Sd}),Dw=Sx({scrapeMotionValuesFromProps:nx,createRenderState:bx}),Mw=Symbol.for("motionComponentSymbol");function Ow(n,i,l){const r=T.useRef(l);T.useInsertionEffect(()=>{r.current=l});const u=T.useRef(null);return T.useCallback(d=>{var h;d&&((h=n.onMount)==null||h.call(n,d)),i&&(d?i.mount(d):i.unmount());const f=r.current;if(typeof f=="function")if(d){const m=f(d);typeof m=="function"&&(u.current=m)}else u.current?(u.current(),u.current=null):f(d);else f&&(f.current=d)},[i])}const Tx=T.createContext({});function Ni(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function zw(n,i,l,r,u,d){var D,M;const{visualElement:f}=T.useContext(po),h=T.useContext(yx),m=T.useContext(co),p=T.useContext(bd),v=p.reducedMotion,x=p.skipAnimations,S=T.useRef(null),E=T.useRef(!1);r=r||h.renderer,!S.current&&r&&(S.current=r(n,{visualState:i,parent:f,props:l,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:v,skipAnimations:x,isSVG:d}),E.current&&S.current&&(S.current.manuallyAnimateOnMount=!0));const A=S.current,w=T.useContext(Tx);A&&!A.projection&&u&&(A.type==="html"||A.type==="svg")&&Lw(S.current,l,u,w);const _=T.useRef(!1);T.useInsertionEffect(()=>{A&&_.current&&A.update(l,m)});const R=l[Dv],O=T.useRef(!!R&&typeof window<"u"&&!((D=window.MotionHandoffIsComplete)!=null&&D.call(window,R))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,R)));return $f(()=>{E.current=!0,A&&(_.current=!0,window.MotionIsMounted=!0,A.updateFeatures(),A.scheduleRenderMicrotask(),O.current&&A.animationState&&A.animationState.animateChanges())}),T.useEffect(()=>{A&&(!O.current&&A.animationState&&A.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{var H;(H=window.MotionHandoffMarkAsComplete)==null||H.call(window,R)}),O.current=!1),A.enteringChildren=void 0)}),A}function Lw(n,i,l,r){const{layoutId:u,layout:d,drag:f,dragConstraints:h,layoutScroll:m,layoutRoot:p,layoutAnchor:v,layoutCrossfade:x}=i;n.projection=new l(n.latestValues,i["data-framer-portal-id"]?void 0:Ex(n.parent)),n.projection.setOptions({layoutId:u,layout:d,alwaysMeasureLayout:!!f||h&&Ni(h),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:r,crossfade:x,layoutScroll:m,layoutRoot:p,layoutAnchor:v})}function Ex(n){if(n)return n.options.allowProjection!==!1?n.projection:Ex(n.parent)}function tf(n,{forwardMotionProps:i=!1,type:l}={},r,u){r&&yw(r);const d=l?l==="svg":Td(n),f=d?Dw:jw;function h(p,v){let x;const S={...T.useContext(bd),...p,layoutId:kw(p)},{isStatic:E}=S,A=Sw(p),w=f(p,E);if(!E&&typeof window<"u"){Uw();const _=Vw(S);x=_.MeasureLayout,A.visualElement=zw(n,w,S,u,_.ProjectionNode,d)}return g.jsxs(po.Provider,{value:A,children:[x&&A.visualElement?g.jsx(x,{visualElement:A.visualElement,...S}):null,Rw(n,p,Ow(w,A.visualElement,v),w,E,i,d)]})}h.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=T.forwardRef(h);return m[Mw]=n,m}function kw({layoutId:n}){const i=T.useContext(Qf).id;return i&&n!==void 0?i+"-"+n:n}function Uw(n,i){T.useContext(yx).strict}function Vw(n){const i=gx(),{drag:l,layout:r}=i;if(!l&&!r)return{};const u={...l,...r};return{MeasureLayout:l!=null&&l.isEnabled(n)||r!=null&&r.isEnabled(n)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function Bw(n,i){if(typeof Proxy>"u")return tf;const l=new Map,r=(d,f)=>tf(d,f,n,i),u=(d,f)=>r(d,f);return new Proxy(u,{get:(d,f)=>f==="create"?r:(l.has(f)||l.set(f,tf(f,void 0,n,i)),l.get(f))})}const Hw=(n,i)=>i.isSVG??Td(n)?new yC(i):new cC(i,{allowProjection:n!==T.Fragment});class Gw extends ya{constructor(i){super(i),i.animationState||(i.animationState=SC(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();ho(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)==null||i.call(this)}}let Yw=0;class qw extends ya{constructor(){super(...arguments),this.id=Yw++,this.isExitComplete=!1}update(){var d;if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===r)return;if(i&&r===!1){if(this.isExitComplete){const{initial:f,custom:h}=this.node.getProps();if(typeof f=="string"||typeof f=="object"&&f!==null&&!Array.isArray(f)){const m=Ya(this.node,f,h);if(m){const{transition:p,transitionEnd:v,...x}=m;for(const S in x)(d=this.node.getValue(S))==null||d.jump(x[S])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const u=this.node.animationState.setActive("exit",!i);l&&!i&&u.then(()=>{this.isExitComplete=!0,l(this.id)})}mount(){const{register:i,onExitComplete:l}=this.node.presenceContext||{};l&&l(this.id),i&&(this.unmount=i(this.id))}unmount(){}}const Pw={animation:{Feature:Gw},exit:{Feature:qw}};function ll(n){return{point:{x:n.pageX,y:n.pageY}}}const Xw=n=>i=>md(i)&&n(i,ll(i));function Ps(n,i,l,r){return Fs(n,i,Xw(l),r)}const Ax=({current:n})=>n?n.ownerDocument.defaultView:null,I0=(n,i)=>Math.abs(n-i);function Kw(n,i){const l=I0(n.x,i.x),r=I0(n.y,i.y);return Math.sqrt(l**2+r**2)}const tg=new Set(["auto","scroll"]);class Cx{constructor(i,l,{transformPagePoint:r,contextWindow:u=window,dragSnapToOrigin:d=!1,distanceThreshold:f=3,element:h}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=A=>{this.handleScroll(A.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Nr(this.lastRawMoveEventInfo,this.transformPagePoint));const A=ef(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,_=Kw(A.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!_)return;const{point:R}=A,{timestamp:O}=oe;this.history.push({...R,timestamp:O});const{onStart:D,onMove:M}=this.handlers;w||(D&&D(this.lastMoveEvent,A),this.startEvent=this.lastMoveEvent),M&&M(this.lastMoveEvent,A)},this.handlePointerMove=(A,w)=>{this.lastMoveEvent=A,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=Nr(w,this.transformPagePoint),Ut.update(this.updatePoint,!0)},this.handlePointerUp=(A,w)=>{this.end();const{onEnd:_,onSessionEnd:R,resumeAnimation:O}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=ef(A.type==="pointercancel"?this.lastMoveEventInfo:Nr(w,this.transformPagePoint),this.history);this.startEvent&&_&&_(A,D),R&&R(A,D)},!md(i))return;this.dragSnapToOrigin=d,this.handlers=l,this.transformPagePoint=r,this.distanceThreshold=f,this.contextWindow=u||window;const m=ll(i),p=Nr(m,this.transformPagePoint),{point:v}=p,{timestamp:x}=oe;this.history=[{...v,timestamp:x}];const{onSessionStart:S}=l;S&&S(i,ef(p,this.history));const E={passive:!0,capture:!0};this.removeListeners=al(Ps(this.contextWindow,"pointermove",this.handlePointerMove,E),Ps(this.contextWindow,"pointerup",this.handlePointerUp,E),Ps(this.contextWindow,"pointercancel",this.handlePointerUp,E)),h&&this.startScrollTracking(h)}startScrollTracking(i){let l=i.parentElement;for(;l;){const r=getComputedStyle(l);(tg.has(r.overflowX)||tg.has(r.overflowY))&&this.scrollPositions.set(l,{x:l.scrollLeft,y:l.scrollTop}),l=l.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(i){const l=this.scrollPositions.get(i);if(!l)return;const r=i===window,u=r?{x:window.scrollX,y:window.scrollY}:{x:i.scrollLeft,y:i.scrollTop},d={x:u.x-l.x,y:u.y-l.y};d.x===0&&d.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=d.x,this.lastMoveEventInfo.point.y+=d.y):this.history.length>0&&(this.history[0].x-=d.x,this.history[0].y-=d.y),this.scrollPositions.set(i,u),Ut.update(this.updatePoint,!0))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ma(this.updatePoint)}}function Nr(n,i){return i?{point:i(n.point)}:n}function eg(n,i){return{x:n.x-i.x,y:n.y-i.y}}function ef({point:n},i){return{point:n,delta:eg(n,wx(i)),offset:eg(n,Qw(i)),velocity:Zw(i,.1)}}function Qw(n){return n[0]}function wx(n){return n[n.length-1]}function Zw(n,i){if(n.length<2)return{x:0,y:0};let l=n.length-1,r=null;const u=wx(n);for(;l>=0&&(r=n[l],!(u.timestamp-r.timestamp>Oe(i)));)l--;if(!r)return{x:0,y:0};r===n[0]&&n.length>2&&u.timestamp-r.timestamp>Oe(i)*2&&(r=n[1]);const d=Xe(u.timestamp-r.timestamp);if(d===0)return{x:0,y:0};const f={x:(u.x-r.x)/d,y:(u.y-r.y)/d};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function $w(n,{min:i,max:l},r){return i!==void 0&&n<i?n=r?kt(i,n,r.min):Math.max(n,i):l!==void 0&&n>l&&(n=r?kt(l,n,r.max):Math.min(n,l)),n}function ng(n,i,l){return{min:i!==void 0?n.min+i:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function Fw(n,{top:i,left:l,bottom:r,right:u}){return{x:ng(n.x,l,u),y:ng(n.y,i,r)}}function ag(n,i){let l=i.min-n.min,r=i.max-n.max;return i.max-i.min<n.max-n.min&&([l,r]=[r,l]),{min:l,max:r}}function Jw(n,i){return{x:ag(n.x,i.x),y:ag(n.y,i.y)}}function Ww(n,i){let l=.5;const r=pe(n),u=pe(i);return u>r?l=Qs(i.min,i.max-r,n.min):r>u&&(l=Qs(n.min,n.max-u,i.min)),pn(0,1,l)}function Iw(n,i){const l={};return i.min!==void 0&&(l.min=i.min-n.min),i.max!==void 0&&(l.max=i.max-n.min),l}const kf=.35;function t3(n=kf){return n===!1?n=0:n===!0&&(n=kf),{x:ig(n,"left","right"),y:ig(n,"top","bottom")}}function ig(n,i,l){return{min:sg(n,i),max:sg(n,l)}}function sg(n,i){return typeof n=="number"?n:n[i]||0}const e3=new WeakMap;class n3{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=te(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=i}start(i,{snapToCursor:l=!1,distanceThreshold:r}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const d=x=>{l&&this.snapToCursor(ll(x).point),this.stopAnimation()},f=(x,S)=>{const{drag:E,dragPropagation:A,onDragStart:w}=this.getProps();if(E&&!A&&(this.openDragLock&&this.openDragLock(),this.openDragLock=NA(E),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=S,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fn(R=>{let O=this.getAxisMotionValue(R).get()||0;if(mn.test(O)){const{projection:D}=this.visualElement;if(D&&D.layout){const M=D.layout.layoutBox[R];M&&(O=pe(M)*(parseFloat(O)/100))}}this.originPoint[R]=O}),w&&Ut.update(()=>w(x,S),!1,!0),wf(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},h=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S;const{dragPropagation:E,dragDirectionLock:A,onDirectionLock:w,onDrag:_}=this.getProps();if(!E&&!this.openDragLock)return;const{offset:R}=S;if(A&&this.currentDirection===null){this.currentDirection=i3(R),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",S.point,R),this.updateAxis("y",S.point,R),this.visualElement.render(),_&&Ut.update(()=>_(x,S),!1,!0)},m=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S,this.stop(x,S),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:v}=this.getProps();this.panSession=new Cx(i,{onSessionStart:d,onStart:f,onMove:h,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,distanceThreshold:r,contextWindow:Ax(this.visualElement),element:this.visualElement.current})}stop(i,l){const r=i||this.latestPointerEvent,u=l||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!u||!r)return;const{velocity:f}=u;this.startAnimation(f);const{onDragEnd:h}=this.getProps();h&&Ut.postRender(()=>h(r,u))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(i,l,r){const{drag:u}=this.getProps();if(!r||!jr(i,u,this.currentDirection))return;const d=this.getAxisMotionValue(i);let f=this.originPoint[i]+r[i];this.constraints&&this.constraints[i]&&(f=$w(f,this.constraints[i],this.elastic[i])),d.set(f)}resolveConstraints(){var d;const{dragConstraints:i,dragElastic:l}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(d=this.visualElement.projection)==null?void 0:d.layout,u=this.constraints;i&&Ni(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=Fw(r.layoutBox,i):this.constraints=!1,this.elastic=t3(l),u!==this.constraints&&!Ni(i)&&r&&this.constraints&&!this.hasMutatedConstraints&&fn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=Iw(r.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!Ni(i))return!1;const r=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;u.root&&(u.root.scroll=void 0,u.root.updateScroll());const d=iC(r,u.root,this.visualElement.getTransformPagePoint());let f=Jw(u.layout.layoutBox,d);if(l){const h=l(eC(f));this.hasMutatedConstraints=!!h,h&&(f=Qv(h))}return f}startAnimation(i){const{drag:l,dragMomentum:r,dragElastic:u,dragTransition:d,dragSnapToOrigin:f,onDragTransitionEnd:h}=this.getProps(),m=this.constraints||{},p=fn(v=>{if(!jr(v,l,this.currentDirection))return;let x=m&&m[v]||{};(f===!0||f===v)&&(x={min:0,max:0});const S=u?200:1e6,E=u?40:1e7,A={type:"inertia",velocity:r?i[v]:0,bounceStiffness:S,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...d,...x};return this.startAxisValueAnimation(v,A)});return Promise.all(p).then(h)}startAxisValueAnimation(i,l){const r=this.getAxisMotionValue(i);return wf(this.visualElement,i),r.start(ud(i,r,0,l,this.visualElement,!1))}stopAnimation(){fn(i=>this.getAxisMotionValue(i).stop())}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,u=this.visualElement.getProps()[l];return u||this.visualElement.getValue(i,this.visualElement.latestValues[i]??0)}snapToCursor(i){fn(l=>{const{drag:r}=this.getProps();if(!jr(l,r,this.currentDirection))return;const{projection:u}=this.visualElement,d=this.getAxisMotionValue(l);if(u&&u.layout){const{min:f,max:h}=u.layout.layoutBox[l],m=d.get()||0;d.set(i[l]-kt(f,h,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:r}=this.visualElement;if(!Ni(l)||!r||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};fn(f=>{const h=this.getAxisMotionValue(f);if(h&&this.constraints!==!1){const m=h.get();u[f]=Ww({min:m,max:m},this.constraints[f])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),fn(f=>{if(!jr(f,i,null))return;const h=this.getAxisMotionValue(f),{min:m,max:p}=this.constraints[f];h.set(kt(m,p,u[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;e3.set(this.visualElement,this);const i=this.visualElement.current,l=Ps(i,"pointerdown",p=>{const{drag:v,dragListener:x=!0}=this.getProps(),S=p.target,E=S!==i&&LA(S);v&&x&&!E&&this.start(p)});let r;const u=()=>{const{dragConstraints:p}=this.getProps();Ni(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),r||(r=a3(i,p.current,()=>this.scalePositionWithinConstraints())))},{projection:d}=this.visualElement,f=d.addEventListener("measure",u);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),Ut.read(u);const h=Fs(window,"resize",()=>this.scalePositionWithinConstraints()),m=d.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:v})=>{this.isDragging&&v&&(fn(x=>{const S=this.getAxisMotionValue(x);S&&(this.originPoint[x]+=p[x].translate,S.set(S.get()+p[x].translate))}),this.visualElement.render())}));return()=>{h(),l(),f(),m&&m(),r&&r()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:r=!1,dragPropagation:u=!1,dragConstraints:d=!1,dragElastic:f=kf,dragMomentum:h=!0}=i;return{...i,drag:l,dragDirectionLock:r,dragPropagation:u,dragConstraints:d,dragElastic:f,dragMomentum:h}}}function lg(n){let i=!0;return()=>{if(i){i=!1;return}n()}}function a3(n,i,l){const r=h0(n,lg(l)),u=h0(i,lg(l));return()=>{r(),u()}}function jr(n,i,l){return(i===!0||i===n)&&(l===null||l===n)}function i3(n,i=10){let l=null;return Math.abs(n.y)>i?l="y":Math.abs(n.x)>i&&(l="x"),l}class s3 extends ya{constructor(i){super(i),this.removeGroupControls=Ke,this.removeListeners=Ke,this.controls=new n3(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ke}update(){const{dragControls:i}=this.node.getProps(),{dragControls:l}=this.node.prevProps||{};i!==l&&(this.removeGroupControls(),i&&(this.removeGroupControls=i.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const nf=n=>(i,l)=>{n&&Ut.update(()=>n(i,l),!1,!0)};class l3 extends ya{constructor(){super(...arguments),this.removePointerDownListener=Ke}onPointerDown(i){this.session=new Cx(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ax(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:r,onPanEnd:u}=this.node.getProps();return{onSessionStart:nf(i),onStart:nf(l),onMove:nf(r),onEnd:(d,f)=>{delete this.session,u&&Ut.postRender(()=>u(d,f))}}}mount(){this.removePointerDownListener=Ps(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let af=!1;class r3 extends T.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r,layoutId:u}=this.props,{projection:d}=i;d&&(l.group&&l.group.add(d),r&&r.register&&u&&r.register(d),af&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),qr.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:r,drag:u,isPresent:d}=this.props,{projection:f}=r;return f&&(f.isPresent=d,i.layoutDependency!==l&&f.setOptions({...f.options,layoutDependency:l}),af=!0,u||i.layoutDependency!==l||l===void 0||i.isPresent!==d?f.willUpdate():this.safeToRemove(),i.isPresent!==d&&(d?f.promote():f.relegate()||Ut.postRender(()=>{const h=f.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:i,layoutAnchor:l}=this.props,{projection:r}=i;r&&(r.options.layoutAnchor=l,r.root.didUpdate(),hd.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r}=this.props,{projection:u}=i;af=!0,u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),r&&r.deregister&&r.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function Rx(n){const[i,l]=mx(),r=T.useContext(Qf);return g.jsx(r3,{...n,layoutGroup:r,switchLayoutGroup:T.useContext(Tx),isPresent:i,safeToRemove:l})}const o3={pan:{Feature:l3},drag:{Feature:s3,ProjectionNode:hx,MeasureLayout:Rx}};function rg(n,i,l){const{props:r}=n;n.animationState&&r.whileHover&&n.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,d=r[u];d&&Ut.postRender(()=>d(i,ll(i)))}class u3 extends ya{mount(){const{current:i}=this.node;i&&(this.unmount=DA(i,(l,r)=>(rg(this.node,r,"Start"),u=>rg(this.node,u,"End"))))}unmount(){}}class c3 extends ya{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=al(Fs(this.node.current,"focus",()=>this.onFocus()),Fs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function og(n,i,l){const{props:r}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&r.whileTap&&n.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),d=r[u];d&&Ut.postRender(()=>d(i,ll(i)))}class f3 extends ya{mount(){const{current:i}=this.node;if(!i)return;const{globalTapTarget:l,propagate:r}=this.node.props;this.unmount=UA(i,(u,d)=>(og(this.node,d,"Start"),(f,{success:h})=>og(this.node,f,h?"End":"Cancel")),{useGlobalTarget:l,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Uf=new WeakMap,sf=new WeakMap,d3=n=>{const i=Uf.get(n.target);i&&i(n)},h3=n=>{n.forEach(d3)};function m3({root:n,...i}){const l=n||document;sf.has(l)||sf.set(l,{});const r=sf.get(l),u=JSON.stringify(i);return r[u]||(r[u]=new IntersectionObserver(h3,{root:n,...i})),r[u]}function p3(n,i,l){const r=m3(i);return Uf.set(n,l),r.observe(n),()=>{Uf.delete(n),r.unobserve(n)}}const y3={some:0,all:1};class g3 extends ya{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var m;(m=this.stopObserver)==null||m.call(this);const{viewport:i={}}=this.node.getProps(),{root:l,margin:r,amount:u="some",once:d}=i,f={root:l?l.current:void 0,rootMargin:r,threshold:typeof u=="number"?u:y3[u]},h=p=>{const{isIntersecting:v}=p;if(this.isInView===v||(this.isInView=v,d&&!v&&this.hasEnteredView))return;v&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",v);const{onViewportEnter:x,onViewportLeave:S}=this.node.getProps(),E=v?x:S;E&&E(p)};this.stopObserver=p3(this.node.current,f,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(v3(i,l))&&this.startObserver()}unmount(){var i;(i=this.stopObserver)==null||i.call(this),this.hasEnteredView=!1,this.isInView=!1}}function v3({viewport:n={}},{viewport:i={}}={}){return l=>n[l]!==i[l]}const x3={inView:{Feature:g3},tap:{Feature:f3},focus:{Feature:c3},hover:{Feature:u3}},b3={layout:{ProjectionNode:hx,MeasureLayout:Rx}},S3={...Pw,...x3,...o3,...b3},T3=Bw(S3,Hw),Js=T3;function E3(){const[n,i]=T.useState(""),[l,r]=T.useState(""),[u,d]=T.useState(""),[f,h]=T.useState(!1),[m,p]=T.useState(null),{refresh:v}=Vi(),x=pa();T.useEffect(()=>{Rt.auth.setupStatus().then(E=>{var A;p(E.ok?(A=E.data)==null?void 0:A.needsSetup:!1)})},[]);const S=async E=>{if(E.preventDefault(),m&&l!==u){lt.error("Passwords do not match");return}h(!0);let A;m?A=await Rt.auth.firstUser(n,l):A=await Rt.auth.login(n,l),h(!1),A.ok?(await v(),x("/")):lt.error(A.message||(m?"Failed to create account":"Login failed"))};return m===null?g.jsx("div",{className:"min-h-screen flex items-center justify-center",children:g.jsx("div",{className:"text-2xl animate-spin",children:"⚙️"})}):g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-slate-900 px-4",children:g.jsxs(Js.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white dark:bg-slate-800 shadow-xl rounded-2xl p-8 w-full max-w-sm",children:[g.jsxs("div",{className:"text-center mb-6",children:[g.jsx("div",{className:"text-4xl mb-2",children:"🚀"}),g.jsx("h1",{className:"text-2xl font-bold",children:"PR Previews"}),m?g.jsx("p",{className:"text-sm text-blue-600 dark:text-blue-400 mt-1 font-medium",children:"Create your admin account"}):g.jsx("p",{className:"text-sm text-gray-500 dark:text-slate-400 mt-1",children:"Sign in to manage your previews"})]}),m&&g.jsx("div",{className:"mb-4 p-3 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg text-xs text-blue-700 dark:text-blue-300",children:"This is the first time setup. Create the founder admin account."}),g.jsxs("form",{onSubmit:S,className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-1",children:"Username"}),g.jsx("input",{type:"text",value:n,onChange:E=>i(E.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,autoFocus:!0})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-1",children:"Password"}),g.jsx("input",{type:"password",value:l,onChange:E=>r(E.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,minLength:m?8:void 0})]}),m&&g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-1",children:"Confirm Password"}),g.jsx("input",{type:"password",value:u,onChange:E=>d(E.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),g.jsx("button",{type:"submit",disabled:f,className:"w-full py-2 rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-medium text-sm transition-colors disabled:opacity-50",children:f?m?"Creating...":"Signing in...":m?"Create Admin Account":"Sign in"})]})]})})}const ug={PROVISIONING:{label:"Provisioning",icon:"🟡",cls:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/40 dark:text-yellow-300"},BUILDING:{label:"Building",icon:"🟡",cls:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/40 dark:text-yellow-300"},RUNNING:{label:"Running",icon:"🟢",cls:"bg-green-100 text-green-800 dark:bg-green-900/40 dark:text-green-300"},FAILED:{label:"Failed",icon:"🔴",cls:"bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-300"},STOPPED:{label:"Stopped",icon:"⚫",cls:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"},IGNORED:{label:"Ignored",icon:"⚫",cls:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"}};function Ed({status:n}){const i=ug[n]||ug.STOPPED;return g.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${i.cls}`,children:[g.jsx("span",{children:i.icon})," ",i.label]})}function A3(){const[n,i]=T.useState([]),[l,r]=T.useState(!0),{user:u}=Vi(),d=async()=>{const f=await Rt.previews.list();f.ok&&i(f.data||[]),r(!1)};return T.useEffect(()=>{d()},[]),T.useEffect(()=>{const f=setInterval(d,1e4);return()=>clearInterval(f)},[]),!(u!=null&&u.setupComplete)&&!l?g.jsxs("div",{className:"text-center py-20",children:[g.jsx("div",{className:"text-5xl mb-4",children:"⚙️"}),g.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Setup Required"}),g.jsx("p",{className:"text-gray-600 dark:text-slate-400 mb-6",children:"Configure your Gitea and AWS credentials to get started."}),g.jsx(en,{to:"/settings",className:"inline-flex px-6 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors",children:"Go to Settings"})]}):g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-6",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Previews"}),g.jsx("button",{onClick:d,className:"text-sm text-blue-600 dark:text-blue-400 hover:underline",children:"↻ Refresh"})]}),l?g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(3)].map((f,h)=>g.jsx("div",{className:"h-40 bg-gray-100 dark:bg-slate-800 rounded-xl animate-pulse"},h))}):n.length===0?g.jsxs("div",{className:"text-center py-20",children:[g.jsx("div",{className:"text-5xl mb-4",children:"🔍"}),g.jsx("h2",{className:"text-xl font-semibold mb-2",children:"No previews yet"}),g.jsx("p",{className:"text-gray-500 dark:text-slate-400 mb-4",children:"Enable a repo and open a pull request to create your first preview."}),g.jsx(en,{to:"/repos",className:"text-blue-600 dark:text-blue-400 hover:underline",children:"Configure repos →"})]}):g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map((f,h)=>g.jsx(Js.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:h*.04},children:g.jsxs(en,{to:`/previews/${f.id}`,className:"block bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-xl p-4 hover:shadow-md hover:border-blue-300 dark:hover:border-blue-600 transition-all",children:[g.jsxs("div",{className:"flex items-start justify-between mb-2",children:[g.jsxs("div",{children:[g.jsxs("p",{className:"text-xs text-gray-500 dark:text-slate-400",children:[f.repoOwner,"/",f.repoName]}),g.jsxs("p",{className:"font-semibold text-sm mt-0.5 line-clamp-1",children:["PR #",f.prNumber,": ",f.prTitle]})]}),g.jsx(Ed,{status:f.status})]}),g.jsxs("p",{className:"text-xs text-gray-500 dark:text-slate-400 mb-2",children:["Commit: ",g.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:f.commitSha.slice(0,8)})]}),f.status==="RUNNING"&&f.instanceIp&&g.jsxs("a",{href:`http://${f.instanceIp}:${f.port}`,target:"_blank",rel:"noreferrer",onClick:m=>m.stopPropagation(),className:"inline-flex items-center gap-1 text-xs text-green-600 dark:text-green-400 hover:underline",children:["🟢 http://",f.instanceIp,":",f.port]}),g.jsxs("p",{className:"text-xs text-gray-400 dark:text-slate-500 mt-2",children:["Updated ",new Date(f.updatedAt).toLocaleString()]})]})},f.id))})]})}function C3(n){return n.replace(/\x1B\[[\d;]*[mGKHFJsu]/g,"").replace(/\x1B\][^\x07]*\x07/g,"")}function w3(n,i){return n.startsWith("--- ")&&(n.includes("Redeploy")||n.includes("truncated"))?g.jsx("span",{className:"text-slate-400 dark:text-slate-500 italic block",children:n},i):g.jsx("span",{className:"block",children:C3(n)},i)}function R3({logs:n,autoScroll:i=!0,maxHeight:l="500px"}){const r=T.useRef(null),[u,d]=T.useState(i);T.useEffect(()=>{u&&r.current&&r.current.scrollIntoView({behavior:"smooth"})},[n,u]);const f=n.split(`
`);return g.jsxs("div",{className:"relative",children:[g.jsxs("div",{className:"log-viewer bg-gray-950 dark:bg-black text-green-400 rounded-lg p-4 overflow-auto border border-gray-800",style:{maxHeight:l},onScroll:h=>{const m=h.currentTarget,p=m.scrollHeight-m.scrollTop-m.clientHeight<50;d(p)},children:[g.jsx("pre",{className:"ansi-stripped text-xs",children:f.map((h,m)=>w3(h,m))}),g.jsx("div",{ref:r})]}),!u&&g.jsx("button",{onClick:()=>{var h;d(!0),(h=r.current)==null||h.scrollIntoView({behavior:"smooth"})},className:"absolute bottom-4 right-4 text-xs bg-blue-600 text-white px-2 py-1 rounded shadow hover:bg-blue-700",children:"↓ Jump to bottom"})]})}function Ws({open:n,title:i,message:l,confirmLabel:r="Confirm",cancelLabel:u="Cancel",onConfirm:d,onCancel:f,danger:h}){return g.jsx(px,{children:n&&g.jsx(Js.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:f,children:g.jsxs(Js.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"bg-white dark:bg-slate-800 rounded-xl shadow-xl p-6 max-w-md w-full",onClick:m=>m.stopPropagation(),children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:i}),g.jsx("p",{className:"text-gray-600 dark:text-slate-300 text-sm mb-6",children:l}),g.jsxs("div",{className:"flex gap-3 justify-end",children:[g.jsx("button",{onClick:f,className:"px-4 py-2 rounded-lg text-sm bg-gray-100 dark:bg-slate-700 hover:bg-gray-200 dark:hover:bg-slate-600 transition-colors",children:u}),g.jsx("button",{onClick:d,className:`px-4 py-2 rounded-lg text-sm text-white font-medium transition-colors ${h?"bg-red-600 hover:bg-red-700":"bg-blue-600 hover:bg-blue-700"}`,children:r})]})]})})})}function _3(){const{id:n}=KS(),i=parseInt(n||"0",10),l=pa(),[r,u]=T.useState(null),[d,f]=T.useState(""),[h,m]=T.useState(!0),[p,v]=T.useState(!1),[x,S]=T.useState(!1),E=T.useCallback(async()=>{const w=await Rt.previews.get(i);w.ok&&w.data?(u(w.data),f(w.data.logs||"")):w.status===404&&l("/"),m(!1)},[i,l]);T.useEffect(()=>{E();const w=setInterval(E,5e3);return()=>clearInterval(w)},[E]),T.useEffect(()=>{if(!r||r.status!=="RUNNING"&&r.status!=="BUILDING"&&r.status!=="PROVISIONING")return;const w=E2(i,_=>{_.type==="init"?f(_.logs||""):_.type==="append"&&f(R=>R+_.text)});return()=>{try{w.close()}catch{}}},[r==null?void 0:r.status,i]);const A=async()=>{S(!0);const w=await Rt.previews.stop(i);S(!1),v(!1),w.ok?lt.success("Stop job enqueued"):lt.error(w.message||"Failed to enqueue stop"),await E()};return h?g.jsxs("div",{className:"space-y-4 animate-pulse",children:[g.jsx("div",{className:"h-8 bg-gray-200 dark:bg-slate-700 rounded w-64"}),g.jsx("div",{className:"h-4 bg-gray-200 dark:bg-slate-700 rounded w-96"}),g.jsx("div",{className:"h-96 bg-gray-200 dark:bg-slate-700 rounded"})]}):r?g.jsxs("div",{className:"space-y-6",children:[g.jsx(Ws,{open:p,title:"Stop Preview",message:"Are you sure you want to stop this preview? The EC2 instance will be terminated.",confirmLabel:"Stop Preview",onConfirm:A,onCancel:()=>v(!1),danger:!0}),g.jsxs("div",{children:[g.jsx(en,{to:"/",className:"text-sm text-blue-600 dark:text-blue-400 hover:underline mb-2 inline-block",children:"← Back to Previews"}),g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{children:[g.jsxs("h1",{className:"text-2xl font-bold",children:[r.repoOwner,"/",r.repoName," — PR #",r.prNumber]}),g.jsx("p",{className:"text-gray-600 dark:text-slate-300 mt-1",children:r.prTitle})]}),g.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.jsx(Ed,{status:r.status}),r.status!=="STOPPED"&&r.status!=="IGNORED"&&g.jsx("button",{onClick:()=>v(!0),disabled:x,className:"px-3 py-1.5 text-sm bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300 hover:bg-red-200 dark:hover:bg-red-900/60 rounded-lg transition-colors disabled:opacity-50",children:"Stop"})]})]})]}),g.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[g.jsx(Dr,{label:"Commit",value:r.commitSha.slice(0,8),mono:!0}),g.jsx(Dr,{label:"Port",value:String(r.port)}),g.jsx(Dr,{label:"Created",value:new Date(r.createdAt).toLocaleDateString()}),g.jsx(Dr,{label:"Last Activity",value:new Date(r.lastActivityAt).toLocaleString()})]}),r.status==="RUNNING"&&r.instanceIp&&g.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-xl p-4",children:[g.jsx("p",{className:"text-sm font-medium text-green-800 dark:text-green-300 mb-1",children:"🟢 Preview Live"}),g.jsxs("a",{href:`http://${r.instanceIp}:${r.port}`,target:"_blank",rel:"noreferrer",className:"text-green-700 dark:text-green-400 hover:underline font-mono text-sm",children:["http://",r.instanceIp,":",r.port]})]}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Logs"}),g.jsx(R3,{logs:d,autoScroll:!0,maxHeight:"600px"})]}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Job History"}),g.jsx("div",{className:"space-y-2",children:r.jobs.length===0?g.jsx("p",{className:"text-sm text-gray-500 dark:text-slate-400",children:"No jobs yet."}):r.jobs.map(w=>g.jsxs("div",{className:"flex items-center gap-3 bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg p-3",children:[g.jsx("span",{className:"text-xs font-mono bg-gray-100 dark:bg-slate-700 px-2 py-0.5 rounded",children:w.type}),g.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${w.status==="DONE"?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300":w.status==="FAILED"?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300":w.status==="RUNNING"?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-300":"bg-gray-100 text-gray-600 dark:bg-slate-700 dark:text-slate-300"}`,children:w.status}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-slate-400",children:new Date(w.createdAt).toLocaleString()}),w.error&&g.jsx("span",{className:"text-xs text-red-600 dark:text-red-400 truncate max-w-xs",title:w.error,children:w.error})]},w.id))})]})]}):null}function Dr({label:n,value:i,mono:l}){return g.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-lg p-3",children:[g.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400 mb-1",children:n}),g.jsx("p",{className:`text-sm font-medium truncate ${l?"font-mono":""}`,children:i})]})}const N3=["us-east-1","us-east-2","us-west-1","us-west-2","eu-west-1","eu-west-2","eu-west-3","eu-central-1","eu-north-1","ap-southeast-1","ap-southeast-2","ap-northeast-1","ap-northeast-2","ap-south-1","sa-east-1","ca-central-1","me-south-1","af-south-1"];function j3(){const{user:n,refresh:i}=Vi(),[l,r]=T.useState(null),[u,d]=T.useState(!0),[f,h]=T.useState(""),[m,p]=T.useState(""),[v,x]=T.useState(""),[S,E]=T.useState(""),[A,w]=T.useState(""),[_,R]=T.useState(""),[O,D]=T.useState(""),[M,H]=T.useState(""),[$,V]=T.useState("us-east-1"),[q,Z]=T.useState(""),[F,I]=T.useState(""),[ut,Tt]=T.useState(!1),[pt,Q]=T.useState(null);T.useEffect(()=>{Rt.user.settings().then(W=>{if(W.ok&&W.data){const ct=W.data;r(ct),h(ct.username||""),E(ct.giteaInstanceUrl||""),w(ct.giteaUsername||""),Z(ct.webhookUrl||"")}}),Rt.user.getWebhookSecret().then(W=>{W.ok&&W.data&&I(W.data.token)}),d(!1)},[]);const L=async(W,ct)=>{Q(W);const N=await ct();Q(null),N.ok?(lt.success(N.message||"Saved"),i()):lt.error(N.message||"Failed to save")},J=async()=>{Tt(!1),Q("rotate");const W=await Rt.user.regenerateWebhookSecret();Q(null),W.ok&&W.data?(I(W.data.token),lt.success(W.message||"Secret regenerated")):lt.error(W.message||"Failed to regenerate")},tt=(W,ct)=>{navigator.clipboard.writeText(W),lt.info(`${ct} copied to clipboard`)};return u?g.jsx("div",{className:"animate-pulse h-96 bg-gray-100 dark:bg-slate-800 rounded-xl"}):g.jsxs("div",{className:"max-w-2xl space-y-8",children:[g.jsx(Ws,{open:ut,title:"Regenerate Webhook Secret",message:"This will generate a new secret and update all registered Gitea webhooks. The old secret will become invalid immediately.",confirmLabel:"Regenerate",onConfirm:J,onCancel:()=>Tt(!1),danger:!0}),g.jsx("h1",{className:"text-2xl font-bold",children:"Account Settings"}),g.jsx(Bs,{title:"Username",children:g.jsxs("div",{className:"flex gap-2",children:[g.jsx("input",{type:"text",value:f,onChange:W=>h(W.target.value),className:Je,placeholder:"Username"}),g.jsx("button",{onClick:()=>L("username",()=>Rt.user.updateUsername(f)),disabled:pt==="username",className:Mr,children:pt==="username"?"Saving...":"Save"})]})}),g.jsx(Bs,{title:"Change Password",children:g.jsxs("div",{className:"space-y-2",children:[g.jsx("input",{type:"password",value:m,onChange:W=>p(W.target.value),className:Je,placeholder:"Current password"}),g.jsx("input",{type:"password",value:v,onChange:W=>x(W.target.value),className:Je,placeholder:"New password"}),g.jsx("button",{onClick:()=>L("password",()=>Rt.user.updatePassword(m,v)),disabled:pt==="password",className:Mr,children:pt==="password"?"Saving...":"Update Password"})]})}),g.jsxs(Bs,{title:"Gitea Connection",children:[g.jsxs("p",{className:"text-xs text-gray-500 dark:text-slate-400 mb-3",children:["PP will post PR comments as your Gitea account (@",A||"username","). Make sure your PAT has 'issue' write permission."]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("input",{type:"url",value:S,onChange:W=>E(W.target.value),className:Je,placeholder:"https://gitea.example.com"}),g.jsx("input",{type:"text",value:A,onChange:W=>w(W.target.value),className:Je,placeholder:"Gitea username"}),g.jsxs("div",{className:"relative",children:[g.jsx("input",{type:"password",value:_,onChange:W=>R(W.target.value),className:Je,placeholder:l!=null&&l.giteaPatSet?"•••••••• (set — enter new value to update)":"Personal Access Token"}),g.jsxs("p",{className:"text-xs text-gray-400 dark:text-slate-500 mt-1",children:["Required PAT scopes: ",g.jsx("code",{children:"repository"})," (read), ",g.jsx("code",{children:"issue"})," (write), ",g.jsx("code",{children:"admin:repo_hook"})]})]}),g.jsx("button",{onClick:()=>L("gitea",()=>Rt.user.updateGitea({giteaInstanceUrl:S,giteaUsername:A,giteaPAT:_||void 0})),disabled:pt==="gitea",className:Mr,children:pt==="gitea"?"Connecting...":"Save & Validate"})]})]}),g.jsx(Bs,{title:"AWS Credentials",children:g.jsxs("div",{className:"space-y-2",children:[g.jsx("input",{type:"text",value:O,onChange:W=>D(W.target.value),className:Je,placeholder:l!=null&&l.awsAccessKeyId?`${l.awsAccessKeyId} (set)`:"AWS Access Key ID"}),g.jsx("input",{type:"password",value:M,onChange:W=>H(W.target.value),className:Je,placeholder:"AWS Secret Access Key"}),g.jsx("select",{value:$,onChange:W=>V(W.target.value),className:Je,children:N3.map(W=>g.jsx("option",{value:W,children:W},W))}),g.jsxs("div",{className:"bg-gray-50 dark:bg-slate-700/50 rounded-lg p-3",children:[g.jsx("p",{className:"text-xs font-medium mb-2",children:"Required IAM Permissions:"}),g.jsx("pre",{className:"text-xs text-gray-600 dark:text-slate-300 overflow-auto",children:fg}),g.jsx("button",{onClick:()=>tt(fg,"IAM policy"),className:"text-xs text-blue-600 dark:text-blue-400 mt-1 hover:underline",children:"Copy IAM policy"})]}),g.jsx("button",{onClick:()=>L("aws",()=>Rt.user.updateAws({awsAccessKeyId:O,awsSecretAccessKey:M,awsRegion:$})),disabled:pt==="aws",className:Mr,children:pt==="aws"?"Validating...":"Save & Validate"})]})}),g.jsx(Bs,{title:"Webhook",children:g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{children:[g.jsx("label",{className:"text-xs text-gray-500 dark:text-slate-400 block mb-1",children:"Webhook URL (Target URL in Gitea)"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("input",{type:"text",readOnly:!0,value:q,className:`${Je} bg-gray-50 dark:bg-slate-700/50 font-mono text-xs`}),g.jsx("button",{onClick:()=>tt(q,"Webhook URL"),className:cg,children:"Copy"})]})]}),g.jsxs("div",{children:[g.jsx("label",{className:"text-xs text-gray-500 dark:text-slate-400 block mb-1",children:"Webhook Secret"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("input",{type:"text",readOnly:!0,value:F,className:`${Je} bg-gray-50 dark:bg-slate-700/50 font-mono text-xs`}),g.jsx("button",{onClick:()=>tt(F,"Webhook secret"),className:cg,children:"Copy"}),g.jsx("button",{onClick:()=>Tt(!0),disabled:pt==="rotate",className:"px-3 py-2 text-sm rounded-lg bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300 hover:bg-yellow-200 transition-colors",children:"Rotate"})]})]}),g.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400",children:"PP auto-registers per-repo webhooks when you enable a repo. These credentials are for reference only."})]})})]})}function Bs({title:n,children:i}){return g.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-xl p-5",children:[g.jsx("h2",{className:"text-base font-semibold mb-4",children:n}),i]})}const Je="w-full px-3 py-2 text-sm border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-700 focus:outline-none focus:ring-2 focus:ring-blue-500",Mr="px-4 py-2 text-sm rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-medium transition-colors disabled:opacity-50",cg="px-3 py-2 text-sm rounded-lg bg-gray-100 dark:bg-slate-700 hover:bg-gray-200 dark:hover:bg-slate-600 text-gray-700 dark:text-slate-300 transition-colors shrink-0",fg=`{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"ec2:RunInstances",
"ec2:TerminateInstances",
"ec2:DescribeInstances",
"ec2:CreateSecurityGroup",
"ec2:DeleteSecurityGroup",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:DescribeSecurityGroups",
"ec2:ImportKeyPair",
"ec2:DeleteKeyPair",
"ec2:CreateTags",
"sts:GetCallerIdentity"
],
"Resource": "*"
}]
}`,D3=[{value:"t2.micro",label:"t2.micro",cost:"$0.012/hr"},{value:"t2.medium",label:"t2.medium",cost:"$0.046/hr"},{value:"t3.medium",label:"t3.medium",cost:"$0.042/hr"},{value:"t3.large",label:"t3.large",cost:"$0.083/hr"},{value:"m5.large",label:"m5.large",cost:"$0.096/hr"},{value:"c5.large",label:"c5.large",cost:"$0.085/hr"}];function M3(){const[n,i]=T.useState([]),[l,r]=T.useState(!0),[u,d]=T.useState(null),[f,h]=T.useState({}),[m,p]=T.useState(null),[v,x]=T.useState(null),[S,E]=T.useState(null),A=async()=>{r(!0);const M=await Rt.repos.list();if(M.ok){const H=M.data||[];i(H);const $={};H.forEach(V=>{const q=`${V.owner}/${V.name}`;$[q]=V.config||w()}),h($)}else lt.error(M.message||"Failed to load repos");r(!1)};T.useEffect(()=>{A()},[]);function w(){return{instanceType:"t2.medium",inactivityHours:12,port:3e3,denyList:[],envVars:{},useDockerCompose:!1,composeFilePath:"docker-compose.yml",aptPackages:[],setupCommands:[],buildCommands:[],postBuildCommands:[],runCommand:""}}const _=async M=>{const H=`${M.owner}/${M.name}`;if(M.isEnabled){p({owner:M.owner,repo:M.name});return}x(H);const $=await Rt.repos.toggle(M.owner,M.name,!0);x(null),$.ok?(lt.success("Repo enabled"),A()):lt.error($.message||"Failed to enable repo")},R=async()=>{if(!m)return;const M=`${m.owner}/${m.repo}`;p(null),x(M);const H=await Rt.repos.toggle(m.owner,m.repo,!1);x(null),H.ok?(lt.success("Repo disabled"),A()):lt.error(H.message||"Failed to disable repo")},O=async(M,H)=>{const $=`${M}/${H}`;E($);const V=f[$]||w(),q=await Rt.repos.saveConfig({owner:M,repo:H,...V});E(null),q.ok?lt.success("Config saved"):lt.error(q.message||"Failed to save config")},D=(M,H,$)=>{h(V=>({...V,[M]:{...V[M]||w(),[H]:$}}))};return l?g.jsx("div",{className:"space-y-3",children:[...Array(4)].map((M,H)=>g.jsx("div",{className:"h-16 bg-gray-100 dark:bg-slate-800 rounded-xl animate-pulse"},H))}):g.jsxs("div",{className:"max-w-3xl space-y-4",children:[g.jsx(Ws,{open:!!m,title:"Disable Repo",message:`Disabling "${m==null?void 0:m.owner}/${m==null?void 0:m.repo}" will delete the Gitea webhook. PR preview events will no longer be received.`,confirmLabel:"Disable & Delete Webhook",onConfirm:R,onCancel:()=>p(null),danger:!0}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Repo Configuration"}),g.jsx("button",{onClick:A,className:"text-sm text-blue-600 dark:text-blue-400 hover:underline",children:"↻ Refresh"})]}),n.length===0&&g.jsxs("div",{className:"text-center py-16",children:[g.jsx("div",{className:"text-5xl mb-4",children:"🔗"}),g.jsx("h2",{className:"text-lg font-semibold mb-2",children:"No repos found"}),g.jsx("p",{className:"text-gray-500 dark:text-slate-400",children:"Configure your Gitea credentials in Settings first."})]}),n.map(M=>{const H=`${M.owner}/${M.name}`,$=u===H,V=f[H]||w(),q=v===H;return g.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-xl overflow-hidden",children:[g.jsxs("div",{className:"p-4 flex items-center gap-3",children:[g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("p",{className:"font-medium text-sm",children:M.fullName}),M.claimedByOther&&g.jsx("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:"🔒 Claimed by another user"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[!M.claimedByOther&&g.jsx("button",{onClick:()=>_(M),disabled:q,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${M.isEnabled?"bg-blue-600":"bg-gray-300 dark:bg-slate-600"} disabled:opacity-50`,title:M.isEnabled?"Disable previews":"Enable previews",children:g.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${M.isEnabled?"translate-x-6":"translate-x-1"}`})}),M.isEnabled&&!M.claimedByOther&&g.jsx("button",{onClick:()=>d($?null:H),className:"text-sm text-blue-600 dark:text-blue-400 hover:underline",children:$?"▲ Hide":"▼ Config"})]})]}),$&&g.jsxs("div",{className:"border-t border-gray-200 dark:border-slate-700 p-4 space-y-4",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:Ln,children:"Instance Type"}),g.jsxs("select",{value:V.instanceType,onChange:Z=>D(H,"instanceType",Z.target.value),className:dn,children:[D3.map(Z=>g.jsxs("option",{value:Z.value,children:[Z.label," — ",Z.cost]},Z.value)),g.jsx("option",{value:"custom",children:"Custom..."})]}),V.instanceType==="custom"&&g.jsx("input",{type:"text",placeholder:"Custom instance type",className:`${dn} mt-1`,onChange:Z=>D(H,"instanceType",Z.target.value)})]}),g.jsxs("div",{children:[g.jsx("label",{className:Ln,children:"App Port (default: 3000)"}),g.jsx("input",{type:"number",value:V.port,onChange:Z=>D(H,"port",Number(Z.target.value)),className:dn,min:1,max:65535})]})]}),g.jsxs("div",{children:[g.jsxs("label",{className:Ln,children:["Inactivity Kill Timer: ",V.inactivityHours,"h"]}),g.jsx("input",{type:"range",min:.5,max:72,step:.5,value:V.inactivityHours,onChange:Z=>D(H,"inactivityHours",Number(Z.target.value)),className:"w-full mt-1"}),g.jsxs("div",{className:"flex justify-between text-xs text-gray-400 mt-1",children:[g.jsx("span",{children:"0.5h"}),g.jsx("span",{children:"12h"}),g.jsx("span",{children:"72h"})]})]}),g.jsxs("div",{children:[g.jsx("label",{className:Ln,children:"Deny List (comma-separated usernames)"}),g.jsx("input",{type:"text",value:V.denyList.join(", "),onChange:Z=>D(H,"denyList",Z.target.value.split(",").map(F=>F.trim()).filter(Boolean)),className:dn,placeholder:"dependabot, renovate-bot"})]}),g.jsxs("div",{children:[g.jsx("label",{className:Ln,children:"Apt Packages (space-separated)"}),g.jsx("input",{type:"text",value:V.aptPackages.join(" "),onChange:Z=>D(H,"aptPackages",Z.target.value.split(" ").filter(Boolean)),className:dn,placeholder:"python3 ffmpeg"})]}),g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[g.jsx("input",{type:"checkbox",id:`compose-${H}`,checked:V.useDockerCompose,onChange:Z=>D(H,"useDockerCompose",Z.target.checked),className:"rounded"}),g.jsx("label",{htmlFor:`compose-${H}`,className:"text-sm font-medium",children:"Use Docker Compose"})]}),V.useDockerCompose?g.jsxs("div",{children:[g.jsx("label",{className:Ln,children:"Compose File Path"}),g.jsx("input",{type:"text",value:V.composeFilePath||"docker-compose.yml",onChange:Z=>D(H,"composeFilePath",Z.target.value),className:dn,placeholder:"docker-compose.yml"})]}):g.jsxs("div",{className:"space-y-3",children:[g.jsx(lf,{label:"Build Commands",value:V.buildCommands,onChange:Z=>D(H,"buildCommands",Z)}),g.jsx(lf,{label:"Post-Build Commands (optional)",value:V.postBuildCommands,onChange:Z=>D(H,"postBuildCommands",Z)}),g.jsxs("div",{children:[g.jsx("label",{className:Ln,children:"Run Command"}),g.jsx("input",{type:"text",value:V.runCommand||"",onChange:Z=>D(H,"runCommand",Z.target.value),className:dn,placeholder:"node dist/index.js"})]})]})]}),g.jsx(lf,{label:"Setup Commands (run once on first provision)",value:V.setupCommands,onChange:Z=>D(H,"setupCommands",Z)}),g.jsx(O3,{value:V.envVars||{},onChange:Z=>D(H,"envVars",Z)}),g.jsx("div",{className:"flex justify-end",children:g.jsx("button",{onClick:()=>O(M.owner,M.name),disabled:S===H,className:"px-5 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors disabled:opacity-50",children:S===H?"Saving...":"Save Config"})})]})]},H)})]})}function lf({label:n,value:i,onChange:l}){return g.jsxs("div",{children:[g.jsx("label",{className:Ln,children:n}),g.jsxs("div",{className:"space-y-1",children:[i.map((r,u)=>g.jsxs("div",{className:"flex gap-2",children:[g.jsx("input",{type:"text",value:r,onChange:d=>{const f=[...i];f[u]=d.target.value,l(f)},className:dn,placeholder:"npm run build"}),g.jsx("button",{onClick:()=>l(i.filter((d,f)=>f!==u)),className:"text-red-500 hover:text-red-700 px-2",children:"✕"})]},u)),g.jsx("button",{onClick:()=>l([...i,""]),className:"text-sm text-blue-600 dark:text-blue-400 hover:underline",children:"+ Add command"})]})]})}function O3({value:n,onChange:i}){const l=Object.entries(n),r=()=>i({...n,"":""}),u=(f,h,m)=>{const p={};for(const[v,x]of Object.entries(n))v===f?p[h]=m:p[v]=x;i(p)},d=f=>{const h={...n};delete h[f],i(h)};return g.jsxs("div",{children:[g.jsx("label",{className:Ln,children:"Environment Variables"}),g.jsxs("div",{className:"space-y-1",children:[l.map(([f,h],m)=>g.jsxs("div",{className:"flex gap-2",children:[g.jsx("input",{type:"text",value:f,placeholder:"KEY",onChange:p=>u(f,p.target.value,h),className:`${dn} w-1/3 font-mono text-xs`}),g.jsx("input",{type:"password",value:h,placeholder:"value",onChange:p=>u(f,f,p.target.value),className:`${dn} flex-1 font-mono text-xs`}),g.jsx("button",{onClick:()=>d(f),className:"text-red-500 hover:text-red-700 px-2",children:"✕"})]},m)),g.jsx("button",{onClick:r,className:"text-sm text-blue-600 dark:text-blue-400 hover:underline",children:"+ Add variable"})]})]})}const Ln="block text-xs font-medium text-gray-600 dark:text-slate-300 mb-1",dn="w-full px-3 py-2 text-sm border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-700 focus:outline-none focus:ring-2 focus:ring-blue-500";function z3(){var pt;const{user:n}=Vi(),[i,l]=T.useState("users"),[r,u]=T.useState([]),[d,f]=T.useState(null),[h,m]=T.useState([]),[p,v]=T.useState(!1),[x,S]=T.useState(""),[E,A]=T.useState(""),[w,_]=T.useState(null),[R,O]=T.useState(null),[D,M]=T.useState(null),[H,$]=T.useState(!1),V=async()=>{const Q=await Rt.admin.listUsers();Q.ok&&u(Q.data||[])},q=async()=>{const Q=await Rt.admin.getSettings();Q.ok&&f(Q.data)},Z=async()=>{const Q=await Rt.admin.listPreviews();Q.ok&&m(Q.data||[])};if(T.useEffect(()=>{n!=null&&n.isAdmin&&(v(!0),Promise.all([V(),q(),Z()]).finally(()=>v(!1)))},[n]),!(n!=null&&n.isAdmin))return g.jsxs("div",{className:"text-center py-20",children:[g.jsx("div",{className:"text-5xl mb-4",children:"🚫"}),g.jsx("h2",{className:"text-xl font-semibold",children:"Access Denied"})]});const F=async Q=>{Q.preventDefault(),$(!0);const L=await Rt.admin.createUser(x,E);$(!1),L.ok?(lt.success("User created"),S(""),A(""),V()):lt.error(L.message||"Failed to create user")},I=async()=>{if(!R)return;const Q=await Rt.admin.deleteUser(R.id);O(null),Q.ok?(lt.success("User deleted"),V()):lt.error(Q.message||"Failed to delete user")},ut=async Q=>{Q.preventDefault(),$(!0);const L=await Rt.admin.updateSettings(d);$(!1),L.ok?lt.success("Settings saved"):lt.error(L.message||"Failed to save settings")},Tt=async()=>{if(!D)return;const Q=await Rt.admin.stopPreview(D.id);M(null),Q.ok?(lt.success("Stop job enqueued"),Z()):lt.error(Q.message||"Failed to stop preview")};return g.jsxs("div",{className:"max-w-5xl",children:[g.jsx(Ws,{open:!!R,title:"Delete User",message:`Delete user "${R==null?void 0:R.username}"? All their data will be removed.`,confirmLabel:"Delete User",onConfirm:I,onCancel:()=>O(null),danger:!0}),g.jsx(Ws,{open:!!D,title:"Stop Preview",message:`Stop preview #${D==null?void 0:D.id} for ${(pt=D==null?void 0:D.user)==null?void 0:pt.username}?`,confirmLabel:"Stop",onConfirm:Tt,onCancel:()=>M(null),danger:!0}),g.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Admin Panel"}),g.jsx("div",{className:"flex gap-2 mb-6 border-b border-gray-200 dark:border-slate-700",children:["users","settings","previews"].map(Q=>g.jsx("button",{onClick:()=>l(Q),className:`px-4 py-2 text-sm font-medium capitalize border-b-2 transition-colors ${i===Q?"border-blue-600 text-blue-600 dark:text-blue-400":"border-transparent text-gray-600 dark:text-slate-400 hover:text-gray-900 dark:hover:text-slate-200"}`,children:Q},Q))}),i==="users"&&g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-xl p-5",children:[g.jsx("h2",{className:"font-semibold mb-4",children:"Create User"}),g.jsxs("form",{onSubmit:F,className:"flex gap-3",children:[g.jsx("input",{type:"text",value:x,onChange:Q=>S(Q.target.value),placeholder:"Username",className:ua,required:!0}),g.jsx("input",{type:"password",value:E,onChange:Q=>A(Q.target.value),placeholder:"Password",className:ua,required:!0}),g.jsx("button",{type:"submit",disabled:H,className:dg,children:"Create"})]})]}),g.jsx("div",{className:"bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-xl overflow-hidden",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-gray-200 dark:border-slate-700 text-xs uppercase text-gray-500 dark:text-slate-400",children:[g.jsx("th",{className:"px-4 py-3 text-left",children:"Username"}),g.jsx("th",{className:"px-4 py-3 text-left",children:"Role"}),g.jsx("th",{className:"px-4 py-3 text-left",children:"Created"}),g.jsx("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),g.jsx("tbody",{children:r.map(Q=>g.jsxs("tr",{className:"border-b border-gray-100 dark:border-slate-700 hover:bg-gray-50 dark:hover:bg-slate-700/50",children:[g.jsxs("td",{className:"px-4 py-3 font-medium",children:[Q.username,Q.isFounder&&g.jsx("span",{className:"ml-2 text-xs bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-300 px-1.5 py-0.5 rounded-full",children:"Founder"})]}),g.jsx("td",{className:"px-4 py-3",children:g.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${Q.isAdmin?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300":"bg-gray-100 text-gray-600 dark:bg-slate-700 dark:text-slate-300"}`,children:Q.isAdmin?"Admin":"User"})}),g.jsx("td",{className:"px-4 py-3 text-gray-500 dark:text-slate-400",children:new Date(Q.createdAt).toLocaleDateString()}),g.jsx("td",{className:"px-4 py-3 text-right",children:g.jsx("div",{className:"flex gap-2 justify-end",children:!Q.isFounder&&Q.id!==n.id&&g.jsxs(g.Fragment,{children:[g.jsx("button",{onClick:async()=>{const L=await Rt.admin.updateUser(Q.id,{isAdmin:!Q.isAdmin});L.ok?(lt.success(`User ${Q.isAdmin?"demoted":"promoted"}`),V()):lt.error(L.message||"Failed")},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:Q.isAdmin?"Demote":"Promote"}),g.jsx("button",{onClick:()=>O(Q),className:"text-xs text-red-600 dark:text-red-400 hover:underline",children:"Delete"})]})})})]},Q.id))})]})})]}),i==="settings"&&d&&g.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-xl p-5",children:[g.jsx("h2",{className:"font-semibold mb-4",children:"Global Settings"}),g.jsxs("form",{onSubmit:ut,className:"space-y-4",children:[g.jsx(_i,{label:"Default EC2 Instance Type",children:g.jsx("input",{type:"text",value:d.defaultInstanceType,onChange:Q=>f(L=>({...L,defaultInstanceType:Q.target.value})),className:ua})}),g.jsx(_i,{label:"Max Concurrent Instances Per User",children:g.jsx("input",{type:"number",value:d.maxConcurrentInstancesPerUser,onChange:Q=>f(L=>({...L,maxConcurrentInstancesPerUser:Number(Q.target.value)})),className:ua,min:1,max:50})}),g.jsx(_i,{label:"Webhook Rate Limit (per minute per user)",children:g.jsx("input",{type:"number",value:d.webhookRateLimitPerMinute,onChange:Q=>f(L=>({...L,webhookRateLimitPerMinute:Number(Q.target.value)})),className:ua,min:1})}),g.jsx(_i,{label:"Log Size Limit (bytes)",children:g.jsx("input",{type:"number",value:d.logSizeLimitBytes,onChange:Q=>f(L=>({...L,logSizeLimitBytes:Number(Q.target.value)})),className:ua,min:1024})}),g.jsx(_i,{label:"Preview Retention (days)",children:g.jsx("input",{type:"number",value:d.previewRetentionDays,onChange:Q=>f(L=>({...L,previewRetentionDays:Number(Q.target.value)})),className:ua,min:1})}),g.jsx(_i,{label:"Contact Email",children:g.jsx("input",{type:"email",value:d.contactEmail,onChange:Q=>f(L=>({...L,contactEmail:Q.target.value})),className:ua,placeholder:"admin@example.com"})}),g.jsx("button",{type:"submit",disabled:H,className:dg,children:H?"Saving...":"Save Settings"})]})]}),i==="previews"&&g.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-xl overflow-hidden",children:[g.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-slate-700 flex items-center justify-between",children:[g.jsx("h2",{className:"font-semibold",children:"All Previews"}),g.jsx("button",{onClick:Z,className:"text-sm text-blue-600 dark:text-blue-400 hover:underline",children:"↻ Refresh"})]}),g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-gray-200 dark:border-slate-700 text-xs uppercase text-gray-500 dark:text-slate-400",children:[g.jsx("th",{className:"px-4 py-3 text-left",children:"Repo / PR"}),g.jsx("th",{className:"px-4 py-3 text-left",children:"User"}),g.jsx("th",{className:"px-4 py-3 text-left",children:"Status"}),g.jsx("th",{className:"px-4 py-3 text-left",children:"IP"}),g.jsx("th",{className:"px-4 py-3 text-left",children:"Created"}),g.jsx("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),g.jsx("tbody",{children:h.map(Q=>{var L;return g.jsxs("tr",{className:"border-b border-gray-100 dark:border-slate-700 hover:bg-gray-50 dark:hover:bg-slate-700/50",children:[g.jsxs("td",{className:"px-4 py-3",children:[g.jsxs("p",{className:"text-xs text-gray-500 dark:text-slate-400",children:[Q.repoOwner,"/",Q.repoName]}),g.jsxs(en,{to:`/previews/${Q.id}`,className:"font-medium hover:text-blue-600 dark:hover:text-blue-400",children:["PR #",Q.prNumber]})]}),g.jsx("td",{className:"px-4 py-3 text-gray-600 dark:text-slate-300",children:(L=Q.user)==null?void 0:L.username}),g.jsx("td",{className:"px-4 py-3",children:g.jsx(Ed,{status:Q.status})}),g.jsx("td",{className:"px-4 py-3",children:Q.instanceIp?g.jsxs("a",{href:`http://${Q.instanceIp}:${Q.port}`,target:"_blank",rel:"noreferrer",className:"text-xs font-mono text-blue-600 dark:text-blue-400 hover:underline",children:[Q.instanceIp,":",Q.port]}):"—"}),g.jsx("td",{className:"px-4 py-3 text-gray-500 dark:text-slate-400",children:new Date(Q.createdAt).toLocaleDateString()}),g.jsx("td",{className:"px-4 py-3 text-right",children:Q.status!=="STOPPED"&&Q.status!=="IGNORED"&&g.jsx("button",{onClick:()=>M(Q),className:"text-xs text-red-600 dark:text-red-400 hover:underline",children:"Stop"})})]},Q.id)})})]})})]})]})}function _i({label:n,children:i}){return g.jsxs("div",{children:[g.jsx("label",{className:"block text-xs font-medium text-gray-600 dark:text-slate-300 mb-1",children:n}),i]})}const ua="w-full px-3 py-2 text-sm border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-700 focus:outline-none focus:ring-2 focus:ring-blue-500",dg="px-4 py-2 text-sm rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-medium transition-colors disabled:opacity-50",Or=["Welcome","Gitea Connection","AWS Setup","Your Webhook","Enable a Repo","Done"],L3=["us-east-1","us-east-2","us-west-1","us-west-2","eu-west-1","eu-west-2","eu-central-1","ap-southeast-1","ap-southeast-2","ap-northeast-1"];function k3(){const[n,i]=T.useState(0),{user:l,refresh:r}=Vi(),u=pa(),[d,f]=T.useState((l==null?void 0:l.giteaInstanceUrl)||""),[h,m]=T.useState((l==null?void 0:l.giteaUsername)||""),[p,v]=T.useState(""),[x,S]=T.useState(""),[E,A]=T.useState(""),[w,_]=T.useState("us-east-1"),[R,O]=T.useState(!1),[D,M]=T.useState(""),[H,$]=T.useState(""),V=()=>i(I=>Math.min(I+1,Or.length-1)),q=()=>u("/"),Z=async()=>{O(!0);const I=await Rt.user.updateGitea({giteaInstanceUrl:d,giteaUsername:h,giteaPAT:p});O(!1),I.ok?(lt.success("Gitea connected!"),r(),V()):lt.error(I.message||"Failed to connect Gitea")},F=async()=>{O(!0);const I=await Rt.user.updateAws({awsAccessKeyId:x,awsSecretAccessKey:E,awsRegion:w});if(O(!1),I.ok){lt.success("AWS connected!"),r();const ut=await Rt.user.getWebhookSecret();ut.ok&&ut.data&&(M(`${window.location.origin}/webhook/${l==null?void 0:l.id}`),$(ut.data.token)),V()}else lt.error(I.message||"Failed to connect AWS")};return g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-slate-900 px-4",children:g.jsxs("div",{className:"bg-white dark:bg-slate-800 shadow-xl rounded-2xl p-8 w-full max-w-lg",children:[g.jsxs("div",{className:"mb-8",children:[g.jsx("div",{className:"flex items-center gap-1",children:Or.map((I,ut)=>g.jsx(_t.Fragment,{children:g.jsx("div",{className:`h-1.5 flex-1 rounded-full transition-colors ${ut<=n?"bg-blue-600":"bg-gray-200 dark:bg-slate-600"}`})},ut))}),g.jsxs("p",{className:"text-xs text-gray-500 dark:text-slate-400 mt-2",children:["Step ",n+1," of ",Or.length,": ",Or[n]]})]}),g.jsx(px,{mode:"wait",children:g.jsxs(Js.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},children:[n===0&&g.jsxs("div",{className:"text-center space-y-4",children:[g.jsx("div",{className:"text-5xl",children:"🚀"}),g.jsx("h2",{className:"text-2xl font-bold",children:"Welcome to PR Previews"}),g.jsx("p",{className:"text-gray-600 dark:text-slate-300 text-sm",children:"PP automatically provisions EC2 instances, builds your code, and posts live preview URLs on every pull request."}),g.jsx("p",{className:"text-sm text-gray-500 dark:text-slate-400",children:"Let's get you set up in a few steps."}),g.jsxs("div",{className:"flex gap-3 justify-center mt-4",children:[g.jsx("button",{onClick:V,className:"px-6 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors",children:"Get Started →"}),g.jsx("button",{onClick:q,className:"px-4 py-2.5 text-sm text-gray-500 dark:text-slate-400 hover:underline",children:"Skip wizard"})]})]}),n===1&&g.jsxs("div",{className:"space-y-4",children:[g.jsx("h2",{className:"text-xl font-bold",children:"Gitea Connection"}),g.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-300",children:"Connect to your Gitea instance so PP can register webhooks and post comments."}),g.jsx("input",{type:"url",value:d,onChange:I=>f(I.target.value),className:ca,placeholder:"https://gitea.example.com"}),g.jsx("input",{type:"text",value:h,onChange:I=>m(I.target.value),className:ca,placeholder:"Gitea username"}),g.jsx("input",{type:"password",value:p,onChange:I=>v(I.target.value),className:ca,placeholder:"Personal Access Token"}),g.jsxs("p",{className:"text-xs text-gray-400 dark:text-slate-500",children:["Required PAT scopes: ",g.jsx("code",{children:"repository"}),", ",g.jsx("code",{children:"issue"}),", ",g.jsx("code",{children:"admin:repo_hook"})]}),g.jsxs("div",{className:"flex gap-3",children:[g.jsx("button",{onClick:Z,disabled:R||!d||!h||!p,className:"flex-1 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors disabled:opacity-50",children:R?"Validating...":"Connect & Next →"}),g.jsx("button",{onClick:V,className:"text-sm text-gray-500 dark:text-slate-400 hover:underline px-2",children:"Skip"})]})]}),n===2&&g.jsxs("div",{className:"space-y-4",children:[g.jsx("h2",{className:"text-xl font-bold",children:"AWS Setup"}),g.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-300",children:"PP will launch EC2 instances in your AWS account to host previews."}),g.jsx("input",{type:"text",value:x,onChange:I=>S(I.target.value),className:ca,placeholder:"AWS Access Key ID"}),g.jsx("input",{type:"password",value:E,onChange:I=>A(I.target.value),className:ca,placeholder:"AWS Secret Access Key"}),g.jsx("select",{value:w,onChange:I=>_(I.target.value),className:ca,children:L3.map(I=>g.jsx("option",{value:I,children:I},I))}),g.jsxs("details",{className:"text-xs",children:[g.jsx("summary",{className:"cursor-pointer text-blue-600 dark:text-blue-400",children:"View required IAM permissions"}),g.jsx("pre",{className:"mt-2 bg-gray-50 dark:bg-slate-700 rounded p-3 overflow-auto text-gray-700 dark:text-slate-300",children:`{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["ec2:RunInstances","ec2:TerminateInstances",
"ec2:DescribeInstances","ec2:CreateSecurityGroup",
"ec2:DeleteSecurityGroup","ec2:AuthorizeSecurityGroupIngress",
"ec2:DescribeSecurityGroups","ec2:ImportKeyPair",
"ec2:DeleteKeyPair","ec2:CreateTags","sts:GetCallerIdentity"],
"Resource": "*"
}]
}`})]}),g.jsxs("div",{className:"flex gap-3",children:[g.jsx("button",{onClick:F,disabled:R||!x||!E,className:"flex-1 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors disabled:opacity-50",children:R?"Validating...":"Connect & Next →"}),g.jsx("button",{onClick:V,className:"text-sm text-gray-500 dark:text-slate-400 hover:underline px-2",children:"Skip"})]})]}),n===3&&g.jsxs("div",{className:"space-y-4",children:[g.jsx("h2",{className:"text-xl font-bold",children:"Your Webhook"}),g.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-300",children:"PP auto-registers webhooks when you enable a repo. These are for reference:"}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{children:[g.jsx("label",{className:"text-xs text-gray-500 block mb-1",children:"Webhook URL (Target URL in Gitea)"}),g.jsx("input",{type:"text",readOnly:!0,value:D||`${window.location.origin}/webhook/${l==null?void 0:l.id}`,className:`${ca} font-mono text-xs bg-gray-50 dark:bg-slate-700/50`})]}),g.jsxs("div",{children:[g.jsx("label",{className:"text-xs text-gray-500 block mb-1",children:"Webhook Secret"}),g.jsx("input",{type:"text",readOnly:!0,value:H||"(loading...)",className:`${ca} font-mono text-xs bg-gray-50 dark:bg-slate-700/50`})]})]}),g.jsx("button",{onClick:V,className:"w-full py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors",children:"Next →"})]}),n===4&&g.jsxs("div",{className:"space-y-4",children:[g.jsx("h2",{className:"text-xl font-bold",children:"Enable Your First Repo"}),g.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-300",children:"Go to the Repos page to enable previews for a repository. PP will automatically register the webhook."}),g.jsxs("div",{className:"flex gap-3",children:[g.jsx("a",{href:"/repos",className:"flex-1 py-2.5 text-center bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors",children:"Go to Repos →"}),g.jsx("button",{onClick:V,className:"text-sm text-gray-500 dark:text-slate-400 hover:underline px-2",children:"Skip"})]})]}),n===5&&g.jsxs("div",{className:"text-center space-y-4",children:[g.jsx("div",{className:"text-5xl",children:"🎉"}),g.jsx("h2",{className:"text-2xl font-bold",children:"You're all set!"}),g.jsx("p",{className:"text-gray-600 dark:text-slate-300 text-sm",children:"Open a pull request on an enabled repo and PP will provision a preview automatically."}),g.jsx("button",{onClick:()=>u("/"),className:"px-6 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors",children:"Go to Dashboard →"})]})]},n)})]})})}const ca="w-full px-3 py-2 text-sm border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-700 focus:outline-none focus:ring-2 focus:ring-blue-500";function U3(){return g.jsxs("div",{className:"max-w-2xl prose dark:prose-invert",children:[g.jsx(en,{to:"/",className:"text-sm text-blue-600 dark:text-blue-400 hover:underline mb-4 inline-block",children:"← Back"}),g.jsx("h1",{children:"Privacy Policy"}),g.jsx("p",{children:"This is a self-hosted instance of PR Previews (PP). The following describes what data PP stores and how it is used."}),g.jsx("h2",{children:"What We Store"}),g.jsxs("ul",{children:[g.jsx("li",{children:"Your username and hashed password."}),g.jsx("li",{children:"Your Gitea Personal Access Token (PAT), encrypted at rest with AES-256."}),g.jsx("li",{children:"Your AWS Access Key ID and Secret Access Key, encrypted at rest with AES-256."}),g.jsx("li",{children:"Preview logs, PR metadata (PR number, title, commit SHA), and EC2 instance details."}),g.jsx("li",{children:"SSH private keys (ephemeral per launch, encrypted at rest, deleted on instance termination)."})]}),g.jsx("h2",{children:"How We Use Your Data"}),g.jsxs("ul",{children:[g.jsx("li",{children:"Your Gitea PAT is used solely to register webhooks, clone repositories, and post preview status comments on PRs."}),g.jsx("li",{children:"Your AWS credentials are used solely to provision EC2 instances for previews in your own AWS account."}),g.jsx("li",{children:"PP does not have access to data on EC2 instances beyond what it deploys."}),g.jsx("li",{children:"No data is shared with third parties."})]}),g.jsx("h2",{children:"Data Retention"}),g.jsx("p",{children:"Preview records are retained for the number of days configured by the administrator (default: 30 days after a preview is stopped or failed). You can view this setting in the admin panel."}),g.jsx("h2",{children:"EC2 Instances"}),g.jsx("p",{children:"Preview instances are launched in your own AWS account. PP terminates them on PR close, inactivity timeout, or manual stop. PP does not retain any data from inside EC2 instances."}),g.jsx("h2",{children:"Analytics & Tracking"}),g.jsx("p",{children:"No analytics, no tracking, no external data sharing. PP is fully self-contained."}),g.jsx("h2",{children:"Contact"}),g.jsx("p",{children:"For questions or concerns, contact the instance administrator."})]})}function hg({children:n}){const{user:i,loading:l}=_t.useContext(uo),r=pa();return T.useEffect(()=>{!l&&!i&&r("/login")},[i,l,r]),l?g.jsx("div",{className:"min-h-screen flex items-center justify-center",children:g.jsx("div",{className:"text-2xl animate-spin",children:"⚙️"})}):i?g.jsx(g.Fragment,{children:n}):null}function V3({children:n}){const{user:i}=_t.useContext(uo),l=pa();return T.useEffect(()=>{if(i&&!i.setupComplete){const r=window.location.pathname;r!=="/setup"&&r!=="/settings"&&r!=="/privacy"&&l("/setup")}},[i,l]),g.jsx(g.Fragment,{children:n})}function B3(){const n=A2();return qg(),g.jsxs(uo.Provider,{value:n,children:[g.jsx(S2,{position:"top-right",autoClose:4e3,hideProgressBar:!1,newestOnTop:!0,closeOnClick:!0,theme:"colored"}),g.jsxs(Yy,{children:[g.jsx(We,{path:"/login",element:n.user?g.jsx(Gy,{to:"/",replace:!0}):g.jsx(E3,{})}),g.jsx(We,{path:"/privacy",element:g.jsx(Ky,{children:g.jsx(U3,{})})}),g.jsx(We,{path:"/setup",element:g.jsx(hg,{children:g.jsx(k3,{})})}),g.jsx(We,{path:"/*",element:g.jsx(hg,{children:g.jsx(V3,{children:g.jsx(Ky,{children:g.jsxs(Yy,{children:[g.jsx(We,{path:"/",element:g.jsx(A3,{})}),g.jsx(We,{path:"/previews/:id",element:g.jsx(_3,{})}),g.jsx(We,{path:"/repos",element:g.jsx(M3,{})}),g.jsx(We,{path:"/settings",element:g.jsx(j3,{})}),g.jsx(We,{path:"/admin",element:g.jsx(z3,{})}),g.jsx(We,{path:"*",element:g.jsx(Gy,{to:"/",replace:!0})})]})})})})})]})]})}rS.createRoot(document.getElementById("root")).render(g.jsx(_t.StrictMode,{children:g.jsx(jT,{children:g.jsx(B3,{})})}));