jukebox-media-server 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/bin/jukebox-media-server.js +2 -1
- package/dist/client/assets/{Watch-C2gUX-4m.js → Watch-kJkUCvFd.js} +31 -31
- package/dist/client/assets/index-1v1BzSVv.js +56 -0
- package/dist/client/assets/index-FPcl2l8F.css +1 -0
- package/dist/client/assets/workbox-window.prod.es5-BIl4cyR9.js +2 -0
- package/dist/client/index.html +24 -4
- package/dist/client/{images/site.webmanifest → manifest.webmanifest} +9 -6
- package/dist/client/offline.html +107 -0
- package/dist/client/sw.js +1 -0
- package/dist/client/workbox-d3da0cfa.js +1 -0
- package/dist/server/index.js +1258 -39
- package/drizzle/0001_steady_puma.sql +65 -65
- package/drizzle/0002_sloppy_betty_ross.sql +8 -8
- package/drizzle/0003_public_speedball.sql +42 -0
- package/drizzle/0004_motionless_bug.sql +13 -0
- package/drizzle/meta/0002_snapshot.json +591 -591
- package/drizzle/meta/0003_snapshot.json +804 -0
- package/drizzle/meta/0004_snapshot.json +880 -0
- package/drizzle/meta/_journal.json +41 -27
- package/package.json +32 -2
- package/dist/client/assets/index-D_um8N7Q.js +0 -52
- package/dist/client/assets/index-DfXUcX5G.css +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Watch-kJkUCvFd.js","assets/Watch-BIOwxQGH.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
function HS(n,r){for(var l=0;l<r.length;l++){const i=r[l];if(typeof i!="string"&&!Array.isArray(i)){for(const u in i)if(u!=="default"&&!(u in n)){const c=Object.getOwnPropertyDescriptor(i,u);c&&Object.defineProperty(n,u,c.get?c:{enumerable:!0,get:()=>i[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const c of u)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function l(u){const c={};return u.integrity&&(c.integrity=u.integrity),u.referrerPolicy&&(c.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?c.credentials="include":u.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(u){if(u.ep)return;u.ep=!0;const c=l(u);fetch(u.href,c)}})();const PS="modulepreload",qS=function(n){return"/"+n},Jg={},dy=function(r,l,i){let u=Promise.resolve();if(l&&l.length>0){let v=function(m){return Promise.all(m.map(x=>Promise.resolve(x).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),h=d?.nonce||d?.getAttribute("nonce");u=v(l.map(m=>{if(m=qS(m),m in Jg)return;Jg[m]=!0;const x=m.endsWith(".css"),p=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${p}`))return;const S=document.createElement("link");if(S.rel=x?"stylesheet":PS,x||(S.as="script"),S.crossOrigin="",S.href=m,h&&S.setAttribute("nonce",h),document.head.appendChild(S),x)return new Promise((R,C)=>{S.addEventListener("load",R),S.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return u.then(d=>{for(const h of d||[])h.status==="rejected"&&c(h.reason);return r().catch(c)})};var sj=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function uj(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var r=n.default;if(typeof r=="function"){var l=function i(){var u=!1;try{u=this instanceof i}catch{}return u?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};l.prototype=r.prototype}else l={};return Object.defineProperty(l,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var u=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(l,i,u.get?u:{enumerable:!0,get:function(){return n[i]}})}),l}var Nf={exports:{}},zo={};var Wg;function GS(){if(Wg)return zo;Wg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(i,u,c){var d=null;if(c!==void 0&&(d=""+c),u.key!==void 0&&(d=""+u.key),"key"in u){c={};for(var h in u)h!=="key"&&(c[h]=u[h])}else c=u;return u=c.ref,{$$typeof:n,type:i,key:d,ref:u!==void 0?u:null,props:c}}return zo.Fragment=r,zo.jsx=l,zo.jsxs=l,zo}var ev;function VS(){return ev||(ev=1,Nf.exports=GS()),Nf.exports}var y=VS(),Mf={exports:{}},we={};var tv;function YS(){if(tv)return we;tv=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),S=Symbol.iterator;function R(O){return O===null||typeof O!="object"?null:(O=S&&O[S]||O["@@iterator"],typeof O=="function"?O:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function A(O,F,Q){this.props=O,this.context=F,this.refs=T,this.updater=Q||C}A.prototype.isReactComponent={},A.prototype.setState=function(O,F){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,F,"setState")},A.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function N(){}N.prototype=A.prototype;function _(O,F,Q){this.props=O,this.context=F,this.refs=T,this.updater=Q||C}var H=_.prototype=new N;H.constructor=_,E(H,A.prototype),H.isPureReactComponent=!0;var V=Array.isArray;function W(){}var B={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function ne(O,F,Q){var Z=Q.ref;return{$$typeof:n,type:O,key:F,ref:Z!==void 0?Z:null,props:Q}}function re(O,F){return ne(O.type,F,O.props)}function de(O){return typeof O=="object"&&O!==null&&O.$$typeof===n}function fe(O){var F={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(Q){return F[Q]})}var me=/\/+/g;function pe(O,F){return typeof O=="object"&&O!==null&&O.key!=null?fe(""+O.key):F.toString(36)}function ve(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(W,W):(O.status="pending",O.then(function(F){O.status==="pending"&&(O.status="fulfilled",O.value=F)},function(F){O.status==="pending"&&(O.status="rejected",O.reason=F)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function j(O,F,Q,Z,te){var le=typeof O;(le==="undefined"||le==="boolean")&&(O=null);var X=!1;if(O===null)X=!0;else switch(le){case"bigint":case"string":case"number":X=!0;break;case"object":switch(O.$$typeof){case n:case r:X=!0;break;case x:return X=O._init,j(X(O._payload),F,Q,Z,te)}}if(X)return te=te(O),X=Z===""?"."+pe(O,0):Z,V(te)?(Q="",X!=null&&(Q=X.replace(me,"$&/")+"/"),j(te,F,Q,"",function(Ee){return Ee})):te!=null&&(de(te)&&(te=re(te,Q+(te.key==null||O&&O.key===te.key?"":(""+te.key).replace(me,"$&/")+"/")+X)),F.push(te)),1;X=0;var ae=Z===""?".":Z+":";if(V(O))for(var be=0;be<O.length;be++)Z=O[be],le=ae+pe(Z,be),X+=j(Z,F,Q,le,te);else if(be=R(O),typeof be=="function")for(O=be.call(O),be=0;!(Z=O.next()).done;)Z=Z.value,le=ae+pe(Z,be++),X+=j(Z,F,Q,le,te);else if(le==="object"){if(typeof O.then=="function")return j(ve(O),F,Q,Z,te);throw F=String(O),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return X}function Y(O,F,Q){if(O==null)return O;var Z=[],te=0;return j(O,Z,"","",function(le){return F.call(Q,le,te++)}),Z}function k(O){if(O._status===-1){var F=O._result;F=F(),F.then(function(Q){(O._status===0||O._status===-1)&&(O._status=1,O._result=Q)},function(Q){(O._status===0||O._status===-1)&&(O._status=2,O._result=Q)}),O._status===-1&&(O._status=0,O._result=F)}if(O._status===1)return O._result.default;throw O._result}var J=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},ie={map:Y,forEach:function(O,F,Q){Y(O,function(){F.apply(this,arguments)},Q)},count:function(O){var F=0;return Y(O,function(){F++}),F},toArray:function(O){return Y(O,function(F){return F})||[]},only:function(O){if(!de(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return we.Activity=p,we.Children=ie,we.Component=A,we.Fragment=l,we.Profiler=u,we.PureComponent=_,we.StrictMode=i,we.Suspense=v,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,we.__COMPILER_RUNTIME={__proto__:null,c:function(O){return B.H.useMemoCache(O)}},we.cache=function(O){return function(){return O.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(O,F,Q){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var Z=E({},O.props),te=O.key;if(F!=null)for(le in F.key!==void 0&&(te=""+F.key),F)!G.call(F,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&F.ref===void 0||(Z[le]=F[le]);var le=arguments.length-2;if(le===1)Z.children=Q;else if(1<le){for(var X=Array(le),ae=0;ae<le;ae++)X[ae]=arguments[ae+2];Z.children=X}return ne(O.type,te,Z)},we.createContext=function(O){return O={$$typeof:d,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},we.createElement=function(O,F,Q){var Z,te={},le=null;if(F!=null)for(Z in F.key!==void 0&&(le=""+F.key),F)G.call(F,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(te[Z]=F[Z]);var X=arguments.length-2;if(X===1)te.children=Q;else if(1<X){for(var ae=Array(X),be=0;be<X;be++)ae[be]=arguments[be+2];te.children=ae}if(O&&O.defaultProps)for(Z in X=O.defaultProps,X)te[Z]===void 0&&(te[Z]=X[Z]);return ne(O,le,te)},we.createRef=function(){return{current:null}},we.forwardRef=function(O){return{$$typeof:h,render:O}},we.isValidElement=de,we.lazy=function(O){return{$$typeof:x,_payload:{_status:-1,_result:O},_init:k}},we.memo=function(O,F){return{$$typeof:m,type:O,compare:F===void 0?null:F}},we.startTransition=function(O){var F=B.T,Q={};B.T=Q;try{var Z=O(),te=B.S;te!==null&&te(Q,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(W,J)}catch(le){J(le)}finally{F!==null&&Q.types!==null&&(F.types=Q.types),B.T=F}},we.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},we.use=function(O){return B.H.use(O)},we.useActionState=function(O,F,Q){return B.H.useActionState(O,F,Q)},we.useCallback=function(O,F){return B.H.useCallback(O,F)},we.useContext=function(O){return B.H.useContext(O)},we.useDebugValue=function(){},we.useDeferredValue=function(O,F){return B.H.useDeferredValue(O,F)},we.useEffect=function(O,F){return B.H.useEffect(O,F)},we.useEffectEvent=function(O){return B.H.useEffectEvent(O)},we.useId=function(){return B.H.useId()},we.useImperativeHandle=function(O,F,Q){return B.H.useImperativeHandle(O,F,Q)},we.useInsertionEffect=function(O,F){return B.H.useInsertionEffect(O,F)},we.useLayoutEffect=function(O,F){return B.H.useLayoutEffect(O,F)},we.useMemo=function(O,F){return B.H.useMemo(O,F)},we.useOptimistic=function(O,F){return B.H.useOptimistic(O,F)},we.useReducer=function(O,F,Q){return B.H.useReducer(O,F,Q)},we.useRef=function(O){return B.H.useRef(O)},we.useState=function(O){return B.H.useState(O)},we.useSyncExternalStore=function(O,F,Q){return B.H.useSyncExternalStore(O,F,Q)},we.useTransition=function(){return B.H.useTransition()},we.version="19.2.3",we}var nv;function wd(){return nv||(nv=1,Mf.exports=YS()),Mf.exports}var g=wd();const ee=hy(g),Sd=HS({__proto__:null,default:ee},[g]);var Of={exports:{}},Lo={},_f={exports:{}},jf={};var av;function QS(){return av||(av=1,(function(n){function r(j,Y){var k=j.length;j.push(Y);e:for(;0<k;){var J=k-1>>>1,ie=j[J];if(0<u(ie,Y))j[J]=Y,j[k]=ie,k=J;else break e}}function l(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var Y=j[0],k=j.pop();if(k!==Y){j[0]=k;e:for(var J=0,ie=j.length,O=ie>>>1;J<O;){var F=2*(J+1)-1,Q=j[F],Z=F+1,te=j[Z];if(0>u(Q,k))Z<ie&&0>u(te,Q)?(j[J]=te,j[Z]=k,J=Z):(j[J]=Q,j[F]=k,J=F);else if(Z<ie&&0>u(te,k))j[J]=te,j[Z]=k,J=Z;else break e}}return Y}function u(j,Y){var k=j.sortIndex-Y.sortIndex;return k!==0?k:j.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var v=[],m=[],x=1,p=null,S=3,R=!1,C=!1,E=!1,T=!1,A=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function H(j){for(var Y=l(m);Y!==null;){if(Y.callback===null)i(m);else if(Y.startTime<=j)i(m),Y.sortIndex=Y.expirationTime,r(v,Y);else break;Y=l(m)}}function V(j){if(E=!1,H(j),!C)if(l(v)!==null)C=!0,W||(W=!0,fe());else{var Y=l(m);Y!==null&&ve(V,Y.startTime-j)}}var W=!1,B=-1,G=5,ne=-1;function re(){return T?!0:!(n.unstable_now()-ne<G)}function de(){if(T=!1,W){var j=n.unstable_now();ne=j;var Y=!0;try{e:{C=!1,E&&(E=!1,N(B),B=-1),R=!0;var k=S;try{t:{for(H(j),p=l(v);p!==null&&!(p.expirationTime>j&&re());){var J=p.callback;if(typeof J=="function"){p.callback=null,S=p.priorityLevel;var ie=J(p.expirationTime<=j);if(j=n.unstable_now(),typeof ie=="function"){p.callback=ie,H(j),Y=!0;break t}p===l(v)&&i(v),H(j)}else i(v);p=l(v)}if(p!==null)Y=!0;else{var O=l(m);O!==null&&ve(V,O.startTime-j),Y=!1}}break e}finally{p=null,S=k,R=!1}Y=void 0}}finally{Y?fe():W=!1}}}var fe;if(typeof _=="function")fe=function(){_(de)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,pe=me.port2;me.port1.onmessage=de,fe=function(){pe.postMessage(null)}}else fe=function(){A(de,0)};function ve(j,Y){B=A(function(){j(n.unstable_now())},Y)}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(j){j.callback=null},n.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<j?Math.floor(1e3/j):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(j){switch(S){case 1:case 2:case 3:var Y=3;break;default:Y=S}var k=S;S=Y;try{return j()}finally{S=k}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(j,Y){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var k=S;S=j;try{return Y()}finally{S=k}},n.unstable_scheduleCallback=function(j,Y,k){var J=n.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?J+k:J):k=J,j){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=k+ie,j={id:x++,callback:Y,priorityLevel:j,startTime:k,expirationTime:ie,sortIndex:-1},k>J?(j.sortIndex=k,r(m,j),l(v)===null&&j===l(m)&&(E?(N(B),B=-1):E=!0,ve(V,k-J))):(j.sortIndex=ie,r(v,j),C||R||(C=!0,W||(W=!0,fe()))),j},n.unstable_shouldYield=re,n.unstable_wrapCallback=function(j){var Y=S;return function(){var k=S;S=Y;try{return j.apply(this,arguments)}finally{S=k}}}})(jf)),jf}var rv;function FS(){return rv||(rv=1,_f.exports=QS()),_f.exports}var Df={exports:{}},xt={};var lv;function KS(){if(lv)return xt;lv=1;var n=wd();function r(v){var m="https://react.dev/errors/"+v;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)m+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+v+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(r(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 c(v,m,x){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:p==null?null:""+p,children:v,containerInfo:m,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(v,m){if(v==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,xt.createPortal=function(v,m){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(r(299));return c(v,m,null,x)},xt.flushSync=function(v){var m=d.T,x=i.p;try{if(d.T=null,i.p=2,v)return v()}finally{d.T=m,i.p=x,i.d.f()}},xt.preconnect=function(v,m){typeof v=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(v,m))},xt.prefetchDNS=function(v){typeof v=="string"&&i.d.D(v)},xt.preinit=function(v,m){if(typeof v=="string"&&m&&typeof m.as=="string"){var x=m.as,p=h(x,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,R=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;x==="style"?i.d.S(v,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:S,fetchPriority:R}):x==="script"&&i.d.X(v,{crossOrigin:p,integrity:S,fetchPriority:R,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},xt.preinitModule=function(v,m){if(typeof v=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var x=h(m.as,m.crossOrigin);i.d.M(v,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(v)},xt.preload=function(v,m){if(typeof v=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var x=m.as,p=h(x,m.crossOrigin);i.d.L(v,x,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},xt.preloadModule=function(v,m){if(typeof v=="string")if(m){var x=h(m.as,m.crossOrigin);i.d.m(v,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(v)},xt.requestFormReset=function(v){i.d.r(v)},xt.unstable_batchedUpdates=function(v,m){return v(m)},xt.useFormState=function(v,m,x){return d.H.useFormState(v,m,x)},xt.useFormStatus=function(){return d.H.useHostTransitionStatus()},xt.version="19.2.3",xt}var ov;function my(){if(ov)return Df.exports;ov=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(r){console.error(r)}}return n(),Df.exports=KS(),Df.exports}var iv;function IS(){if(iv)return Lo;iv=1;var n=FS(),r=wd(),l=my();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(c(e)!==e)throw Error(i(188))}function m(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,o=t;;){var s=a.return;if(s===null)break;var f=s.alternate;if(f===null){if(o=s.return,o!==null){a=o;continue}break}if(s.child===f.child){for(f=s.child;f;){if(f===a)return v(s),e;if(f===o)return v(s),t;f=f.sibling}throw Error(i(188))}if(a.return!==o.return)a=s,o=f;else{for(var b=!1,w=s.child;w;){if(w===a){b=!0,a=s,o=f;break}if(w===o){b=!0,o=s,a=f;break}w=w.sibling}if(!b){for(w=f.child;w;){if(w===a){b=!0,a=f,o=s;break}if(w===o){b=!0,o=f,a=s;break}w=w.sibling}if(!b)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,S=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),_=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function fe(e){return e===null||typeof e!="object"?null:(e=de&&e[de]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function pe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case A:return"Profiler";case T:return"StrictMode";case V:return"Suspense";case W:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case _:return e.displayName||"Context";case N:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case G:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var ve=Array.isArray,j=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k={pending:!1,data:null,method:null,action:null},J=[],ie=-1;function O(e){return{current:e}}function F(e){0>ie||(e.current=J[ie],J[ie]=null,ie--)}function Q(e,t){ie++,J[ie]=e.current,e.current=t}var Z=O(null),te=O(null),le=O(null),X=O(null);function ae(e,t){switch(Q(le,t),Q(te,e),Q(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wg(t),e=Sg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(Z),Q(Z,e)}function be(){F(Z),F(te),F(le)}function Ee(e){e.memoizedState!==null&&Q(X,e);var t=Z.current,a=Sg(t,e.type);t!==a&&(Q(te,e),Q(Z,a))}function Te(e){te.current===e&&(F(Z),F(te)),X.current===e&&(F(X),Oo._currentValue=k)}var Me,dt;function rt(e){if(Me===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Me=t&&t[1]||"",dt=-1<a.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+Me+e+dt}var Vn=!1;function Nn(e,t){if(!e||Vn)return"";Vn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(q){var P=q}Reflect.construct(e,[],$)}else{try{$.call()}catch(q){P=q}e.call($.prototype)}}else{try{throw Error()}catch(q){P=q}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(q){if(q&&P&&typeof q.stack=="string")return[q.stack,P.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),b=f[0],w=f[1];if(b&&w){var M=b.split(`
|
|
5
|
+
`),U=w.split(`
|
|
6
|
+
`);for(s=o=0;o<M.length&&!M[o].includes("DetermineComponentFrameRoot");)o++;for(;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;if(o===M.length||s===U.length)for(o=M.length-1,s=U.length-1;1<=o&&0<=s&&M[o]!==U[s];)s--;for(;1<=o&&0<=s;o--,s--)if(M[o]!==U[s]){if(o!==1||s!==1)do if(o--,s--,0>s||M[o]!==U[s]){var K=`
|
|
7
|
+
`+M[o].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),K}while(1<=o&&0<=s);break}}}finally{Vn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?rt(a):""}function yn(e,t){switch(e.tag){case 26:case 27:case 5:return rt(e.type);case 16:return rt("Lazy");case 13:return e.child!==t&&t!==null?rt("Suspense Fallback"):rt("Suspense");case 19:return rt("SuspenseList");case 0:case 15:return Nn(e.type,!1);case 11:return Nn(e.type.render,!1);case 1:return Nn(e.type,!0);case 31:return rt("Activity");default:return""}}function Hl(e){try{var t="",a=null;do t+=yn(e,a),a=e,e=e.return;while(e);return t}catch(o){return`
|
|
8
|
+
Error generating stack: `+o.message+`
|
|
9
|
+
`+o.stack}}var Yt=Object.prototype.hasOwnProperty,Pl=n.unstable_scheduleCallback,ql=n.unstable_cancelCallback,St=n.unstable_shouldYield,va=n.unstable_requestPaint,Et=n.unstable_now,pu=n.unstable_getCurrentPriorityLevel,er=n.unstable_ImmediatePriority,ti=n.unstable_UserBlockingPriority,tr=n.unstable_NormalPriority,Gl=n.unstable_LowPriority,Yn=n.unstable_IdlePriority,ni=n.log,ya=n.unstable_setDisableYieldValue,nr=null,Ct=null;function bn(e){if(typeof ni=="function"&&ya(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(nr,e)}catch{}}var yt=Math.clz32?Math.clz32:Mn,gu=Math.log,Vl=Math.LN2;function Mn(e){return e>>>=0,e===0?32:31-(gu(e)/Vl|0)|0}var zr=256,Lr=262144,ar=4194304;function On(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function xe(e,t,a){var o=e.pendingLanes;if(o===0)return 0;var s=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var w=o&134217727;return w!==0?(o=w&~f,o!==0?s=On(o):(b&=w,b!==0?s=On(b):a||(a=w&~e,a!==0&&(s=On(a))))):(w=o&~f,w!==0?s=On(w):b!==0?s=On(b):a||(a=o&~e,a!==0&&(s=On(a)))),s===0?0:t!==0&&t!==s&&(t&f)===0&&(f=s&-s,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:s}function Fe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ut(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 bt(){var e=ar;return ar<<=1,(ar&62914560)===0&&(ar=4194304),e}function ba(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _t(e,t,a,o,s,f){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,M=e.expirationTimes,U=e.hiddenUpdates;for(a=b&~a;0<a;){var K=31-yt(a),$=1<<K;w[K]=0,M[K]=-1;var P=U[K];if(P!==null)for(U[K]=null,K=0;K<P.length;K++){var q=P[K];q!==null&&(q.lane&=-536870913)}a&=~$}o!==0&&rr(e,o,0),f!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function rr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-yt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|a&261930}function jt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var o=31-yt(a),s=1<<o;s&t|e[o]&t&&(e[o]|=t),a&=~s}}function Dt(e,t){var a=t&-t;return a=(a&42)!==0?1:Ur(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ur(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function xn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vu(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Qg(e.type))}function ih(e,t){var a=Y.p;try{return Y.p=e,t()}finally{Y.p=a}}var xa=Math.random().toString(36).slice(2),ht="__reactFiber$"+xa,zt="__reactProps$"+xa,kr="__reactContainer$"+xa,yu="__reactEvents$"+xa,Nx="__reactListeners$"+xa,Mx="__reactHandles$"+xa,sh="__reactResources$"+xa,Yl="__reactMarker$"+xa;function bu(e){delete e[ht],delete e[zt],delete e[yu],delete e[Nx],delete e[Mx]}function Br(e){var t=e[ht];if(t)return t;for(var a=e.parentNode;a;){if(t=a[kr]||a[ht]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Mg(e);e!==null;){if(a=e[ht])return a;e=Mg(e)}return t}e=a,a=e.parentNode}return null}function Hr(e){if(e=e[ht]||e[kr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ql(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pr(e){var t=e[sh];return t||(t=e[sh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[Yl]=!0}var uh=new Set,ch={};function lr(e,t){qr(e,t),qr(e+"Capture",t)}function qr(e,t){for(ch[e]=t,e=0;e<t.length;e++)uh.add(t[e])}var Ox=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]*$"),fh={},dh={};function _x(e){return Yt.call(dh,e)?!0:Yt.call(fh,e)?!1:Ox.test(e)?dh[e]=!0:(fh[e]=!0,!1)}function ai(e,t,a){if(_x(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ri(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Qn(e,t,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+o)}}function nn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jx(e,t,a){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var s=o.get,f=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(b){a=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xu(e){if(!e._valueTracker){var t=hh(e)?"checked":"value";e._valueTracker=jx(e,t,""+e[t])}}function mh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),o="";return e&&(o=hh(e)?e.checked?"true":"false":e.value),e=o,e!==a?(t.setValue(e),!0):!1}function li(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Dx=/[\n"\\]/g;function an(e){return e.replace(Dx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function wu(e,t,a,o,s,f,b,w){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+nn(t)):e.value!==""+nn(t)&&(e.value=""+nn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?Su(e,b,nn(t)):a!=null?Su(e,b,nn(a)):o!=null&&e.removeAttribute("value"),s==null&&f!=null&&(e.defaultChecked=!!f),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+nn(w):e.removeAttribute("name")}function ph(e,t,a,o,s,f,b,w){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){xu(e);return}a=a!=null?""+nn(a):"",t=t!=null?""+nn(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}o=o??s,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=w?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),xu(e)}function Su(e,t,a){t==="number"&&li(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Gr(e,t,a,o){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&o&&(e[a].defaultSelected=!0)}else{for(a=""+nn(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,o&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function gh(e,t,a){if(t!=null&&(t=""+nn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+nn(a):""}function vh(e,t,a,o){if(t==null){if(o!=null){if(a!=null)throw Error(i(92));if(ve(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),t=a}a=nn(t),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o),xu(e)}function Vr(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var zx=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 yh(e,t,a){var o=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,a):typeof a!="number"||a===0||zx.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function bh(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var s in t)o=t[s],t.hasOwnProperty(s)&&a[s]!==o&&yh(e,s,o)}else for(var f in t)t.hasOwnProperty(f)&&yh(e,f,t[f])}function Eu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lx=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"]]),Ux=/^[\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 oi(e){return Ux.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Fn(){}var Cu=null;function Ru(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yr=null,Qr=null;function xh(e){var t=Hr(e);if(t&&(e=t.stateNode)){var a=e[zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(wu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+an(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var o=a[t];if(o!==e&&o.form===e.form){var s=o[zt]||null;if(!s)throw Error(i(90));wu(o,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)o=a[t],o.form===e.form&&mh(o)}break e;case"textarea":gh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Gr(e,!!a.multiple,t,!1)}}}var Tu=!1;function wh(e,t,a){if(Tu)return e(t,a);Tu=!0;try{var o=e(t);return o}finally{if(Tu=!1,(Yr!==null||Qr!==null)&&(Ki(),Yr&&(t=Yr,e=Qr,Qr=Yr=null,xh(t),e)))for(t=0;t<e.length;t++)xh(e[t])}}function Fl(e,t){var a=e.stateNode;if(a===null)return null;var o=a[zt]||null;if(o===null)return null;a=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var Kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Au=!1;if(Kn)try{var Kl={};Object.defineProperty(Kl,"passive",{get:function(){Au=!0}}),window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{Au=!1}var wa=null,Nu=null,ii=null;function Sh(){if(ii)return ii;var e,t=Nu,a=t.length,o,s="value"in wa?wa.value:wa.textContent,f=s.length;for(e=0;e<a&&t[e]===s[e];e++);var b=a-e;for(o=1;o<=b&&t[a-o]===s[f-o];o++);return ii=s.slice(e,1<o?1-o:void 0)}function si(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ui(){return!0}function Eh(){return!1}function Lt(e){function t(a,o,s,f,b){this._reactName=a,this._targetInst=s,this.type=o,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ui:Eh,this.isPropagationStopped=Eh,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ui)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ui)},persist:function(){},isPersistent:ui}),t}var or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ci=Lt(or),Il=p({},or,{view:0,detail:0}),kx=Lt(Il),Mu,Ou,Xl,fi=p({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ju,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Xl&&(Xl&&e.type==="mousemove"?(Mu=e.screenX-Xl.screenX,Ou=e.screenY-Xl.screenY):Ou=Mu=0,Xl=e),Mu)},movementY:function(e){return"movementY"in e?e.movementY:Ou}}),Ch=Lt(fi),Bx=p({},fi,{dataTransfer:0}),Hx=Lt(Bx),Px=p({},Il,{relatedTarget:0}),_u=Lt(Px),qx=p({},or,{animationName:0,elapsedTime:0,pseudoElement:0}),Gx=Lt(qx),Vx=p({},or,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yx=Lt(Vx),Qx=p({},or,{data:0}),Rh=Lt(Qx),Fx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kx={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"},Ix={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ix[e])?!!t[e]:!1}function ju(){return Xx}var $x=p({},Il,{key:function(e){if(e.key){var t=Fx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Kx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ju,charCode:function(e){return e.type==="keypress"?si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zx=Lt($x),Jx=p({},fi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=Lt(Jx),Wx=p({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ju}),ew=Lt(Wx),tw=p({},or,{propertyName:0,elapsedTime:0,pseudoElement:0}),nw=Lt(tw),aw=p({},fi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),rw=Lt(aw),lw=p({},or,{newState:0,oldState:0}),ow=Lt(lw),iw=[9,13,27,32],Du=Kn&&"CompositionEvent"in window,$l=null;Kn&&"documentMode"in document&&($l=document.documentMode);var sw=Kn&&"TextEvent"in window&&!$l,Ah=Kn&&(!Du||$l&&8<$l&&11>=$l),Nh=" ",Mh=!1;function Oh(e,t){switch(e){case"keyup":return iw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _h(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function uw(e,t){switch(e){case"compositionend":return _h(t);case"keypress":return t.which!==32?null:(Mh=!0,Nh);case"textInput":return e=t.data,e===Nh&&Mh?null:e;default:return null}}function cw(e,t){if(Fr)return e==="compositionend"||!Du&&Oh(e,t)?(e=Sh(),ii=Nu=wa=null,Fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ah&&t.locale!=="ko"?null:t.data;default:return null}}var fw={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 jh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fw[e.type]:t==="textarea"}function Dh(e,t,a,o){Yr?Qr?Qr.push(o):Qr=[o]:Yr=o,t=es(t,"onChange"),0<t.length&&(a=new ci("onChange","change",null,a,o),e.push({event:a,listeners:t}))}var Zl=null,Jl=null;function dw(e){pg(e,0)}function di(e){var t=Ql(e);if(mh(t))return e}function zh(e,t){if(e==="change")return t}var Lh=!1;if(Kn){var zu;if(Kn){var Lu="oninput"in document;if(!Lu){var Uh=document.createElement("div");Uh.setAttribute("oninput","return;"),Lu=typeof Uh.oninput=="function"}zu=Lu}else zu=!1;Lh=zu&&(!document.documentMode||9<document.documentMode)}function kh(){Zl&&(Zl.detachEvent("onpropertychange",Bh),Jl=Zl=null)}function Bh(e){if(e.propertyName==="value"&&di(Jl)){var t=[];Dh(t,Jl,e,Ru(e)),wh(dw,t)}}function hw(e,t,a){e==="focusin"?(kh(),Zl=t,Jl=a,Zl.attachEvent("onpropertychange",Bh)):e==="focusout"&&kh()}function mw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return di(Jl)}function pw(e,t){if(e==="click")return di(t)}function gw(e,t){if(e==="input"||e==="change")return di(t)}function vw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qt=typeof Object.is=="function"?Object.is:vw;function Wl(e,t){if(Qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var s=a[o];if(!Yt.call(t,s)||!Qt(e[s],t[s]))return!1}return!0}function Hh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ph(e,t){var a=Hh(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=t&&o>=t)return{node:a,offset:t-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Hh(a)}}function qh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=li(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=li(e.document)}return t}function Uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var yw=Kn&&"documentMode"in document&&11>=document.documentMode,Kr=null,ku=null,eo=null,Bu=!1;function Vh(e,t,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Bu||Kr==null||Kr!==li(o)||(o=Kr,"selectionStart"in o&&Uu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),eo&&Wl(eo,o)||(eo=o,o=es(ku,"onSelect"),0<o.length&&(t=new ci("onSelect","select",null,t,a),e.push({event:t,listeners:o}),t.target=Kr)))}function ir(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ir={animationend:ir("Animation","AnimationEnd"),animationiteration:ir("Animation","AnimationIteration"),animationstart:ir("Animation","AnimationStart"),transitionrun:ir("Transition","TransitionRun"),transitionstart:ir("Transition","TransitionStart"),transitioncancel:ir("Transition","TransitionCancel"),transitionend:ir("Transition","TransitionEnd")},Hu={},Yh={};Kn&&(Yh=document.createElement("div").style,"AnimationEvent"in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),"TransitionEvent"in window||delete Ir.transitionend.transition);function sr(e){if(Hu[e])return Hu[e];if(!Ir[e])return e;var t=Ir[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Yh)return Hu[e]=t[a];return e}var Qh=sr("animationend"),Fh=sr("animationiteration"),Kh=sr("animationstart"),bw=sr("transitionrun"),xw=sr("transitionstart"),ww=sr("transitioncancel"),Ih=sr("transitionend"),Xh=new Map,Pu="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(" ");Pu.push("scrollEnd");function wn(e,t){Xh.set(e,t),lr(t,[e])}var hi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},rn=[],Xr=0,qu=0;function mi(){for(var e=Xr,t=qu=Xr=0;t<e;){var a=rn[t];rn[t++]=null;var o=rn[t];rn[t++]=null;var s=rn[t];rn[t++]=null;var f=rn[t];if(rn[t++]=null,o!==null&&s!==null){var b=o.pending;b===null?s.next=s:(s.next=b.next,b.next=s),o.pending=s}f!==0&&$h(a,s,f)}}function pi(e,t,a,o){rn[Xr++]=e,rn[Xr++]=t,rn[Xr++]=a,rn[Xr++]=o,qu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Gu(e,t,a,o){return pi(e,t,a,o),gi(e)}function ur(e,t){return pi(e,null,null,t),gi(e)}function $h(e,t,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var s=!1,f=e.return;f!==null;)f.childLanes|=a,o=f.alternate,o!==null&&(o.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(s=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,s&&t!==null&&(s=31-yt(a),e=f.hiddenUpdates,o=e[s],o===null?e[s]=[t]:o.push(t),t.lane=a|536870912),f):null}function gi(e){if(50<Eo)throw Eo=0,Zc=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $r={};function Sw(e,t,a,o){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,t,a,o){return new Sw(e,t,a,o)}function Vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var a=e.alternate;return a===null?(a=Ft(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Zh(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vi(e,t,a,o,s,f){var b=0;if(o=e,typeof e=="function")Vu(e)&&(b=1);else if(typeof e=="string")b=AS(e,a,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=Ft(31,a,t,s),e.elementType=ne,e.lanes=f,e;case E:return cr(a.children,s,f,t);case T:b=8,s|=24;break;case A:return e=Ft(12,a,t,s|2),e.elementType=A,e.lanes=f,e;case V:return e=Ft(13,a,t,s),e.elementType=V,e.lanes=f,e;case W:return e=Ft(19,a,t,s),e.elementType=W,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:b=10;break e;case N:b=9;break e;case H:b=11;break e;case B:b=14;break e;case G:b=16,o=null;break e}b=29,a=Error(i(130,e===null?"null":typeof e,"")),o=null}return t=Ft(b,a,t,s),t.elementType=e,t.type=o,t.lanes=f,t}function cr(e,t,a,o){return e=Ft(7,e,o,t),e.lanes=a,e}function Yu(e,t,a){return e=Ft(6,e,null,t),e.lanes=a,e}function Jh(e){var t=Ft(18,null,null,0);return t.stateNode=e,t}function Qu(e,t,a){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wh=new WeakMap;function ln(e,t){if(typeof e=="object"&&e!==null){var a=Wh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Hl(t)},Wh.set(e,t),t)}return{value:e,source:t,stack:Hl(t)}}var Zr=[],Jr=0,yi=null,to=0,on=[],sn=0,Sa=null,_n=1,jn="";function Xn(e,t){Zr[Jr++]=to,Zr[Jr++]=yi,yi=e,to=t}function em(e,t,a){on[sn++]=_n,on[sn++]=jn,on[sn++]=Sa,Sa=e;var o=_n;e=jn;var s=32-yt(o)-1;o&=~(1<<s),a+=1;var f=32-yt(t)+s;if(30<f){var b=s-s%5;f=(o&(1<<b)-1).toString(32),o>>=b,s-=b,_n=1<<32-yt(t)+s|a<<s|o,jn=f+e}else _n=1<<f|a<<s|o,jn=e}function Fu(e){e.return!==null&&(Xn(e,1),em(e,1,0))}function Ku(e){for(;e===yi;)yi=Zr[--Jr],Zr[Jr]=null,to=Zr[--Jr],Zr[Jr]=null;for(;e===Sa;)Sa=on[--sn],on[sn]=null,jn=on[--sn],on[sn]=null,_n=on[--sn],on[sn]=null}function tm(e,t){on[sn++]=_n,on[sn++]=jn,on[sn++]=Sa,_n=t.id,jn=t.overflow,Sa=e}var mt=null,Ye=null,je=!1,Ea=null,un=!1,Iu=Error(i(519));function Ca(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw no(ln(t,e)),Iu}function nm(e){var t=e.stateNode,a=e.type,o=e.memoizedProps;switch(t[ht]=e,t[zt]=o,a){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(a=0;a<Ro.length;a++)Ne(Ro[a],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),ph(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),vh(t,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||o.suppressHydrationWarning===!0||bg(t.textContent,a)?(o.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),o.onScroll!=null&&Ne("scroll",t),o.onScrollEnd!=null&&Ne("scrollend",t),o.onClick!=null&&(t.onclick=Fn),t=!0):t=!1,t||Ca(e,!0)}function am(e){for(mt=e.return;mt;)switch(mt.tag){case 5:case 31:case 13:un=!1;return;case 27:case 3:un=!0;return;default:mt=mt.return}}function Wr(e){if(e!==mt)return!1;if(!je)return am(e),je=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||hf(e.type,e.memoizedProps)),a=!a),a&&Ye&&Ca(e),am(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ye=Ng(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ye=Ng(e)}else t===27?(t=Ye,Ba(e.type)?(e=yf,yf=null,Ye=e):Ye=t):Ye=mt?fn(e.stateNode.nextSibling):null;return!0}function fr(){Ye=mt=null,je=!1}function Xu(){var e=Ea;return e!==null&&(Ht===null?Ht=e:Ht.push.apply(Ht,e),Ea=null),e}function no(e){Ea===null?Ea=[e]:Ea.push(e)}var $u=O(null),dr=null,$n=null;function Ra(e,t,a){Q($u,t._currentValue),t._currentValue=a}function Zn(e){e._currentValue=$u.current,F($u)}function Zu(e,t,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===a)break;e=e.return}}function Ju(e,t,a,o){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var f=s.dependencies;if(f!==null){var b=s.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=s;for(var M=0;M<t.length;M++)if(w.context===t[M]){f.lanes|=a,w=f.alternate,w!==null&&(w.lanes|=a),Zu(f.return,a,e),o||(b=null);break e}f=w.next}}else if(s.tag===18){if(b=s.return,b===null)throw Error(i(341));b.lanes|=a,f=b.alternate,f!==null&&(f.lanes|=a),Zu(b,a,e),b=null}else b=s.child;if(b!==null)b.return=s;else for(b=s;b!==null;){if(b===e){b=null;break}if(s=b.sibling,s!==null){s.return=b.return,b=s;break}b=b.return}s=b}}function el(e,t,a,o){e=null;for(var s=t,f=!1;s!==null;){if(!f){if((s.flags&524288)!==0)f=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var b=s.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var w=s.type;Qt(s.pendingProps.value,b.value)||(e!==null?e.push(w):e=[w])}}else if(s===X.current){if(b=s.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Oo):e=[Oo])}s=s.return}e!==null&&Ju(t,e,a,o),t.flags|=262144}function bi(e){for(e=e.firstContext;e!==null;){if(!Qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hr(e){dr=e,$n=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pt(e){return rm(dr,e)}function xi(e,t){return dr===null&&hr(e),rm(e,t)}function rm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},$n===null){if(e===null)throw Error(i(308));$n=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $n=$n.next=t;return a}var Ew=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Cw=n.unstable_scheduleCallback,Rw=n.unstable_NormalPriority,et={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wu(){return{controller:new Ew,data:new Map,refCount:0}}function ao(e){e.refCount--,e.refCount===0&&Cw(Rw,function(){e.controller.abort()})}var ro=null,ec=0,tl=0,nl=null;function Tw(e,t){if(ro===null){var a=ro=[];ec=0,tl=af(),nl={status:"pending",value:void 0,then:function(o){a.push(o)}}}return ec++,t.then(lm,lm),t}function lm(){if(--ec===0&&ro!==null){nl!==null&&(nl.status="fulfilled");var e=ro;ro=null,tl=0,nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Aw(e,t){var a=[],o={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(o.status="rejected",o.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),o}var om=j.S;j.S=function(e,t){Vp=Et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Tw(e,t),om!==null&&om(e,t)};var mr=O(null);function tc(){var e=mr.current;return e!==null?e:Ge.pooledCache}function wi(e,t){t===null?Q(mr,mr.current):Q(mr,t.pool)}function im(){var e=tc();return e===null?null:{parent:et._currentValue,pool:e}}var al=Error(i(460)),nc=Error(i(474)),Si=Error(i(542)),Ei={then:function(){}};function sm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function um(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Fn,Fn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fm(e),e;default:if(typeof t.status=="string")t.then(Fn,Fn);else{if(e=Ge,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=o}},function(o){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fm(e),e}throw gr=t,al}}function pr(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(gr=a,al):a}}var gr=null;function cm(){if(gr===null)throw Error(i(459));var e=gr;return gr=null,e}function fm(e){if(e===al||e===Si)throw Error(i(483))}var rl=null,lo=0;function Ci(e){var t=lo;return lo+=1,rl===null&&(rl=[]),um(rl,e,t)}function oo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ri(e,t){throw t.$$typeof===S?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function dm(e){function t(z,D){if(e){var L=z.deletions;L===null?(z.deletions=[D],z.flags|=16):L.push(D)}}function a(z,D){if(!e)return null;for(;D!==null;)t(z,D),D=D.sibling;return null}function o(z){for(var D=new Map;z!==null;)z.key!==null?D.set(z.key,z):D.set(z.index,z),z=z.sibling;return D}function s(z,D){return z=In(z,D),z.index=0,z.sibling=null,z}function f(z,D,L){return z.index=L,e?(L=z.alternate,L!==null?(L=L.index,L<D?(z.flags|=67108866,D):L):(z.flags|=67108866,D)):(z.flags|=1048576,D)}function b(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function w(z,D,L,I){return D===null||D.tag!==6?(D=Yu(L,z.mode,I),D.return=z,D):(D=s(D,L),D.return=z,D)}function M(z,D,L,I){var ge=L.type;return ge===E?K(z,D,L.props.children,I,L.key):D!==null&&(D.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===G&&pr(ge)===D.type)?(D=s(D,L.props),oo(D,L),D.return=z,D):(D=vi(L.type,L.key,L.props,null,z.mode,I),oo(D,L),D.return=z,D)}function U(z,D,L,I){return D===null||D.tag!==4||D.stateNode.containerInfo!==L.containerInfo||D.stateNode.implementation!==L.implementation?(D=Qu(L,z.mode,I),D.return=z,D):(D=s(D,L.children||[]),D.return=z,D)}function K(z,D,L,I,ge){return D===null||D.tag!==7?(D=cr(L,z.mode,I,ge),D.return=z,D):(D=s(D,L),D.return=z,D)}function $(z,D,L){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Yu(""+D,z.mode,L),D.return=z,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case R:return L=vi(D.type,D.key,D.props,null,z.mode,L),oo(L,D),L.return=z,L;case C:return D=Qu(D,z.mode,L),D.return=z,D;case G:return D=pr(D),$(z,D,L)}if(ve(D)||fe(D))return D=cr(D,z.mode,L,null),D.return=z,D;if(typeof D.then=="function")return $(z,Ci(D),L);if(D.$$typeof===_)return $(z,xi(z,D),L);Ri(z,D)}return null}function P(z,D,L,I){var ge=D!==null?D.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ge!==null?null:w(z,D,""+L,I);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case R:return L.key===ge?M(z,D,L,I):null;case C:return L.key===ge?U(z,D,L,I):null;case G:return L=pr(L),P(z,D,L,I)}if(ve(L)||fe(L))return ge!==null?null:K(z,D,L,I,null);if(typeof L.then=="function")return P(z,D,Ci(L),I);if(L.$$typeof===_)return P(z,D,xi(z,L),I);Ri(z,L)}return null}function q(z,D,L,I,ge){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return z=z.get(L)||null,w(D,z,""+I,ge);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case R:return z=z.get(I.key===null?L:I.key)||null,M(D,z,I,ge);case C:return z=z.get(I.key===null?L:I.key)||null,U(D,z,I,ge);case G:return I=pr(I),q(z,D,L,I,ge)}if(ve(I)||fe(I))return z=z.get(L)||null,K(D,z,I,ge,null);if(typeof I.then=="function")return q(z,D,L,Ci(I),ge);if(I.$$typeof===_)return q(z,D,L,xi(D,I),ge);Ri(D,I)}return null}function oe(z,D,L,I){for(var ge=null,ze=null,ce=D,Ce=D=0,_e=null;ce!==null&&Ce<L.length;Ce++){ce.index>Ce?(_e=ce,ce=null):_e=ce.sibling;var Le=P(z,ce,L[Ce],I);if(Le===null){ce===null&&(ce=_e);break}e&&ce&&Le.alternate===null&&t(z,ce),D=f(Le,D,Ce),ze===null?ge=Le:ze.sibling=Le,ze=Le,ce=_e}if(Ce===L.length)return a(z,ce),je&&Xn(z,Ce),ge;if(ce===null){for(;Ce<L.length;Ce++)ce=$(z,L[Ce],I),ce!==null&&(D=f(ce,D,Ce),ze===null?ge=ce:ze.sibling=ce,ze=ce);return je&&Xn(z,Ce),ge}for(ce=o(ce);Ce<L.length;Ce++)_e=q(ce,z,Ce,L[Ce],I),_e!==null&&(e&&_e.alternate!==null&&ce.delete(_e.key===null?Ce:_e.key),D=f(_e,D,Ce),ze===null?ge=_e:ze.sibling=_e,ze=_e);return e&&ce.forEach(function(Va){return t(z,Va)}),je&&Xn(z,Ce),ge}function ye(z,D,L,I){if(L==null)throw Error(i(151));for(var ge=null,ze=null,ce=D,Ce=D=0,_e=null,Le=L.next();ce!==null&&!Le.done;Ce++,Le=L.next()){ce.index>Ce?(_e=ce,ce=null):_e=ce.sibling;var Va=P(z,ce,Le.value,I);if(Va===null){ce===null&&(ce=_e);break}e&&ce&&Va.alternate===null&&t(z,ce),D=f(Va,D,Ce),ze===null?ge=Va:ze.sibling=Va,ze=Va,ce=_e}if(Le.done)return a(z,ce),je&&Xn(z,Ce),ge;if(ce===null){for(;!Le.done;Ce++,Le=L.next())Le=$(z,Le.value,I),Le!==null&&(D=f(Le,D,Ce),ze===null?ge=Le:ze.sibling=Le,ze=Le);return je&&Xn(z,Ce),ge}for(ce=o(ce);!Le.done;Ce++,Le=L.next())Le=q(ce,z,Ce,Le.value,I),Le!==null&&(e&&Le.alternate!==null&&ce.delete(Le.key===null?Ce:Le.key),D=f(Le,D,Ce),ze===null?ge=Le:ze.sibling=Le,ze=Le);return e&&ce.forEach(function(BS){return t(z,BS)}),je&&Xn(z,Ce),ge}function qe(z,D,L,I){if(typeof L=="object"&&L!==null&&L.type===E&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case R:e:{for(var ge=L.key;D!==null;){if(D.key===ge){if(ge=L.type,ge===E){if(D.tag===7){a(z,D.sibling),I=s(D,L.props.children),I.return=z,z=I;break e}}else if(D.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===G&&pr(ge)===D.type){a(z,D.sibling),I=s(D,L.props),oo(I,L),I.return=z,z=I;break e}a(z,D);break}else t(z,D);D=D.sibling}L.type===E?(I=cr(L.props.children,z.mode,I,L.key),I.return=z,z=I):(I=vi(L.type,L.key,L.props,null,z.mode,I),oo(I,L),I.return=z,z=I)}return b(z);case C:e:{for(ge=L.key;D!==null;){if(D.key===ge)if(D.tag===4&&D.stateNode.containerInfo===L.containerInfo&&D.stateNode.implementation===L.implementation){a(z,D.sibling),I=s(D,L.children||[]),I.return=z,z=I;break e}else{a(z,D);break}else t(z,D);D=D.sibling}I=Qu(L,z.mode,I),I.return=z,z=I}return b(z);case G:return L=pr(L),qe(z,D,L,I)}if(ve(L))return oe(z,D,L,I);if(fe(L)){if(ge=fe(L),typeof ge!="function")throw Error(i(150));return L=ge.call(L),ye(z,D,L,I)}if(typeof L.then=="function")return qe(z,D,Ci(L),I);if(L.$$typeof===_)return qe(z,D,xi(z,L),I);Ri(z,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,D!==null&&D.tag===6?(a(z,D.sibling),I=s(D,L),I.return=z,z=I):(a(z,D),I=Yu(L,z.mode,I),I.return=z,z=I),b(z)):a(z,D)}return function(z,D,L,I){try{lo=0;var ge=qe(z,D,L,I);return rl=null,ge}catch(ce){if(ce===al||ce===Si)throw ce;var ze=Ft(29,ce,null,z.mode);return ze.lanes=I,ze.return=z,ze}}}var vr=dm(!0),hm=dm(!1),Ta=!1;function ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Aa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Na(e,t,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ue&2)!==0){var s=o.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),o.pending=t,t=gi(e),$h(e,null,a),t}return pi(e,o,t,a),gi(e)}function io(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,a|=o,t.lanes=a,jt(e,a)}}function lc(e,t){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var s=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?s=f=b:f=f.next=b,a=a.next}while(a!==null);f===null?s=f=t:f=f.next=t}else s=f=t;a={baseState:o.baseState,firstBaseUpdate:s,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var oc=!1;function so(){if(oc){var e=nl;if(e!==null)throw e}}function uo(e,t,a,o){oc=!1;var s=e.updateQueue;Ta=!1;var f=s.firstBaseUpdate,b=s.lastBaseUpdate,w=s.shared.pending;if(w!==null){s.shared.pending=null;var M=w,U=M.next;M.next=null,b===null?f=U:b.next=U,b=M;var K=e.alternate;K!==null&&(K=K.updateQueue,w=K.lastBaseUpdate,w!==b&&(w===null?K.firstBaseUpdate=U:w.next=U,K.lastBaseUpdate=M))}if(f!==null){var $=s.baseState;b=0,K=U=M=null,w=f;do{var P=w.lane&-536870913,q=P!==w.lane;if(q?(Oe&P)===P:(o&P)===P){P!==0&&P===tl&&(oc=!0),K!==null&&(K=K.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var oe=e,ye=w;P=t;var qe=a;switch(ye.tag){case 1:if(oe=ye.payload,typeof oe=="function"){$=oe.call(qe,$,P);break e}$=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=ye.payload,P=typeof oe=="function"?oe.call(qe,$,P):oe,P==null)break e;$=p({},$,P);break e;case 2:Ta=!0}}P=w.callback,P!==null&&(e.flags|=64,q&&(e.flags|=8192),q=s.callbacks,q===null?s.callbacks=[P]:q.push(P))}else q={lane:P,tag:w.tag,payload:w.payload,callback:w.callback,next:null},K===null?(U=K=q,M=$):K=K.next=q,b|=P;if(w=w.next,w===null){if(w=s.shared.pending,w===null)break;q=w,w=q.next,q.next=null,s.lastBaseUpdate=q,s.shared.pending=null}}while(!0);K===null&&(M=$),s.baseState=M,s.firstBaseUpdate=U,s.lastBaseUpdate=K,f===null&&(s.shared.lanes=0),Da|=b,e.lanes=b,e.memoizedState=$}}function mm(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function pm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mm(a[e],t)}var ll=O(null),Ti=O(0);function gm(e,t){e=oa,Q(Ti,e),Q(ll,t),oa=e|t.baseLanes}function ic(){Q(Ti,oa),Q(ll,ll.current)}function sc(){oa=Ti.current,F(ll),F(Ti)}var Kt=O(null),cn=null;function Ma(e){var t=e.alternate;Q(Je,Je.current&1),Q(Kt,e),cn===null&&(t===null||ll.current!==null||t.memoizedState!==null)&&(cn=e)}function uc(e){Q(Je,Je.current),Q(Kt,e),cn===null&&(cn=e)}function vm(e){e.tag===22?(Q(Je,Je.current),Q(Kt,e),cn===null&&(cn=e)):Oa()}function Oa(){Q(Je,Je.current),Q(Kt,Kt.current)}function It(e){F(Kt),cn===e&&(cn=null),F(Je)}var Je=O(0);function Ai(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||gf(a)||vf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jn=0,Se=null,He=null,tt=null,Ni=!1,ol=!1,yr=!1,Mi=0,co=0,il=null,Nw=0;function $e(){throw Error(i(321))}function cc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Qt(e[a],t[a]))return!1;return!0}function fc(e,t,a,o,s,f){return Jn=f,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?ep:Tc,yr=!1,f=a(o,s),yr=!1,ol&&(f=bm(t,a,o,s)),ym(e),f}function ym(e){j.H=mo;var t=He!==null&&He.next!==null;if(Jn=0,tt=He=Se=null,Ni=!1,co=0,il=null,t)throw Error(i(300));e===null||nt||(e=e.dependencies,e!==null&&bi(e)&&(nt=!0))}function bm(e,t,a,o){Se=e;var s=0;do{if(ol&&(il=null),co=0,ol=!1,25<=s)throw Error(i(301));if(s+=1,tt=He=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}j.H=tp,f=t(a,o)}while(ol);return f}function Mw(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?fo(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(Se.flags|=1024),t}function dc(){var e=Mi!==0;return Mi=0,e}function hc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function mc(e){if(Ni){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ni=!1}Jn=0,tt=He=Se=null,ol=!1,co=Mi=0,il=null}function Rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?Se.memoizedState=tt=e:tt=tt.next=e,tt}function We(){if(He===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=tt===null?Se.memoizedState:tt.next;if(t!==null)tt=t,He=e;else{if(e===null)throw Se.alternate===null?Error(i(467)):Error(i(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},tt===null?Se.memoizedState=tt=e:tt=tt.next=e}return tt}function Oi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fo(e){var t=co;return co+=1,il===null&&(il=[]),e=um(il,e,t),t=Se,(tt===null?t.memoizedState:tt.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?ep:Tc),e}function _i(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return fo(e);if(e.$$typeof===_)return pt(e)}throw Error(i(438,String(e)))}function pc(e){var t=null,a=Se.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var o=Se.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Oi(),Se.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),o=0;o<e;o++)a[o]=re;return t.index++,a}function Wn(e,t){return typeof t=="function"?t(e):t}function ji(e){var t=We();return gc(t,He,e)}function gc(e,t,a){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var s=e.baseQueue,f=o.pending;if(f!==null){if(s!==null){var b=s.next;s.next=f.next,f.next=b}t.baseQueue=s=f,o.pending=null}if(f=e.baseState,s===null)e.memoizedState=f;else{t=s.next;var w=b=null,M=null,U=t,K=!1;do{var $=U.lane&-536870913;if($!==U.lane?(Oe&$)===$:(Jn&$)===$){var P=U.revertLane;if(P===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),$===tl&&(K=!0);else if((Jn&P)===P){U=U.next,P===tl&&(K=!0);continue}else $={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},M===null?(w=M=$,b=f):M=M.next=$,Se.lanes|=P,Da|=P;$=U.action,yr&&a(f,$),f=U.hasEagerState?U.eagerState:a(f,$)}else P={lane:$,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},M===null?(w=M=P,b=f):M=M.next=P,Se.lanes|=$,Da|=$;U=U.next}while(U!==null&&U!==t);if(M===null?b=f:M.next=w,!Qt(f,e.memoizedState)&&(nt=!0,K&&(a=nl,a!==null)))throw a;e.memoizedState=f,e.baseState=b,e.baseQueue=M,o.lastRenderedState=f}return s===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function vc(e){var t=We(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var o=a.dispatch,s=a.pending,f=t.memoizedState;if(s!==null){a.pending=null;var b=s=s.next;do f=e(f,b.action),b=b.next;while(b!==s);Qt(f,t.memoizedState)||(nt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,o]}function xm(e,t,a){var o=Se,s=We(),f=je;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var b=!Qt((He||s).memoizedState,a);if(b&&(s.memoizedState=a,nt=!0),s=s.queue,xc(Em.bind(null,o,s,e),[e]),s.getSnapshot!==t||b||tt!==null&&tt.memoizedState.tag&1){if(o.flags|=2048,sl(9,{destroy:void 0},Sm.bind(null,o,s,a,t),null),Ge===null)throw Error(i(349));f||(Jn&127)!==0||wm(o,t,a)}return a}function wm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Se.updateQueue,t===null?(t=Oi(),Se.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Sm(e,t,a,o){t.value=a,t.getSnapshot=o,Cm(t)&&Rm(e)}function Em(e,t,a){return a(function(){Cm(t)&&Rm(e)})}function Cm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Qt(e,a)}catch{return!0}}function Rm(e){var t=ur(e,2);t!==null&&Pt(t,e,2)}function yc(e){var t=Rt();if(typeof e=="function"){var a=e;if(e=a(),yr){bn(!0);try{a()}finally{bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function Tm(e,t,a,o){return e.baseState=a,gc(e,He,typeof o=="function"?o:Wn)}function Ow(e,t,a,o,s){if(Li(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};j.T!==null?a(!0):f.isTransition=!1,o(f),a=t.pending,a===null?(f.next=t.pending=f,Am(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Am(e,t){var a=t.action,o=t.payload,s=e.state;if(t.isTransition){var f=j.T,b={};j.T=b;try{var w=a(s,o),M=j.S;M!==null&&M(b,w),Nm(e,t,w)}catch(U){bc(e,t,U)}finally{f!==null&&b.types!==null&&(f.types=b.types),j.T=f}}else try{f=a(s,o),Nm(e,t,f)}catch(U){bc(e,t,U)}}function Nm(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){Mm(e,t,o)},function(o){return bc(e,t,o)}):Mm(e,t,a)}function Mm(e,t,a){t.status="fulfilled",t.value=a,Om(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Am(e,a)))}function bc(e,t,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=a,Om(t),t=t.next;while(t!==o)}e.action=null}function Om(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _m(e,t){return t}function jm(e,t){if(je){var a=Ge.formState;if(a!==null){e:{var o=Se;if(je){if(Ye){t:{for(var s=Ye,f=un;s.nodeType!==8;){if(!f){s=null;break t}if(s=fn(s.nextSibling),s===null){s=null;break t}}f=s.data,s=f==="F!"||f==="F"?s:null}if(s){Ye=fn(s.nextSibling),o=s.data==="F!";break e}}Ca(o)}o=!1}o&&(t=a[0])}}return a=Rt(),a.memoizedState=a.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_m,lastRenderedState:t},a.queue=o,a=Zm.bind(null,Se,o),o.dispatch=a,o=yc(!1),f=Rc.bind(null,Se,!1,o.queue),o=Rt(),s={state:t,dispatch:null,action:e,pending:null},o.queue=s,a=Ow.bind(null,Se,s,f,a),s.dispatch=a,o.memoizedState=e,[t,a,!1]}function Dm(e){var t=We();return zm(t,He,e)}function zm(e,t,a){if(t=gc(e,t,_m)[0],e=ji(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=fo(t)}catch(b){throw b===al?Si:b}else o=t;t=We();var s=t.queue,f=s.dispatch;return a!==t.memoizedState&&(Se.flags|=2048,sl(9,{destroy:void 0},_w.bind(null,s,a),null)),[o,f,e]}function _w(e,t){e.action=t}function Lm(e){var t=We(),a=He;if(a!==null)return zm(t,a,e);We(),t=t.memoizedState,a=We();var o=a.queue.dispatch;return a.memoizedState=e,[t,o,!1]}function sl(e,t,a,o){return e={tag:e,create:a,deps:o,inst:t,next:null},t=Se.updateQueue,t===null&&(t=Oi(),Se.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,t.lastEffect=e),e}function Um(){return We().memoizedState}function Di(e,t,a,o){var s=Rt();Se.flags|=e,s.memoizedState=sl(1|t,{destroy:void 0},a,o===void 0?null:o)}function zi(e,t,a,o){var s=We();o=o===void 0?null:o;var f=s.memoizedState.inst;He!==null&&o!==null&&cc(o,He.memoizedState.deps)?s.memoizedState=sl(t,f,a,o):(Se.flags|=e,s.memoizedState=sl(1|t,f,a,o))}function km(e,t){Di(8390656,8,e,t)}function xc(e,t){zi(2048,8,e,t)}function jw(e){Se.flags|=4;var t=Se.updateQueue;if(t===null)t=Oi(),Se.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Bm(e){var t=We().memoizedState;return jw({ref:t,nextImpl:e}),function(){if((Ue&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Hm(e,t){return zi(4,2,e,t)}function Pm(e,t){return zi(4,4,e,t)}function qm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gm(e,t,a){a=a!=null?a.concat([e]):null,zi(4,4,qm.bind(null,t,e),a)}function wc(){}function Vm(e,t){var a=We();t=t===void 0?null:t;var o=a.memoizedState;return t!==null&&cc(t,o[1])?o[0]:(a.memoizedState=[e,t],e)}function Ym(e,t){var a=We();t=t===void 0?null:t;var o=a.memoizedState;if(t!==null&&cc(t,o[1]))return o[0];if(o=e(),yr){bn(!0);try{e()}finally{bn(!1)}}return a.memoizedState=[o,t],o}function Sc(e,t,a){return a===void 0||(Jn&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Qp(),Se.lanes|=e,Da|=e,a)}function Qm(e,t,a,o){return Qt(a,t)?a:ll.current!==null?(e=Sc(e,a,o),Qt(e,t)||(nt=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(Oe&261930)===0?(nt=!0,e.memoizedState=a):(e=Qp(),Se.lanes|=e,Da|=e,t)}function Fm(e,t,a,o,s){var f=Y.p;Y.p=f!==0&&8>f?f:8;var b=j.T,w={};j.T=w,Rc(e,!1,t,a);try{var M=s(),U=j.S;if(U!==null&&U(w,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var K=Aw(M,o);ho(e,t,K,Zt(e))}else ho(e,t,o,Zt(e))}catch($){ho(e,t,{then:function(){},status:"rejected",reason:$},Zt())}finally{Y.p=f,b!==null&&w.types!==null&&(b.types=w.types),j.T=b}}function Dw(){}function Ec(e,t,a,o){if(e.tag!==5)throw Error(i(476));var s=Km(e).queue;Fm(e,s,t,k,a===null?Dw:function(){return Im(e),a(o)})}function Km(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:k,baseState:k,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:k},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Im(e){var t=Km(e);t.next===null&&(t=e.alternate.memoizedState),ho(e,t.next.queue,{},Zt())}function Cc(){return pt(Oo)}function Xm(){return We().memoizedState}function $m(){return We().memoizedState}function zw(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Zt();e=Aa(a);var o=Na(t,e,a);o!==null&&(Pt(o,t,a),io(o,t,a)),t={cache:Wu()},e.payload=t;return}t=t.return}}function Lw(e,t,a){var o=Zt();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Li(e)?Jm(t,a):(a=Gu(e,t,a,o),a!==null&&(Pt(a,e,o),Wm(a,t,o)))}function Zm(e,t,a){var o=Zt();ho(e,t,a,o)}function ho(e,t,a,o){var s={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Li(e))Jm(t,s);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,w=f(b,a);if(s.hasEagerState=!0,s.eagerState=w,Qt(w,b))return pi(e,t,s,0),Ge===null&&mi(),!1}catch{}if(a=Gu(e,t,s,o),a!==null)return Pt(a,e,o),Wm(a,t,o),!0}return!1}function Rc(e,t,a,o){if(o={lane:2,revertLane:af(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Li(e)){if(t)throw Error(i(479))}else t=Gu(e,a,o,2),t!==null&&Pt(t,e,2)}function Li(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Jm(e,t){ol=Ni=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wm(e,t,a){if((a&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,a|=o,t.lanes=a,jt(e,a)}}var mo={readContext:pt,use:_i,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};mo.useEffectEvent=$e;var ep={readContext:pt,use:_i,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:pt,useEffect:km,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Di(4194308,4,qm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Di(4194308,4,e,t)},useInsertionEffect:function(e,t){Di(4,2,e,t)},useMemo:function(e,t){var a=Rt();t=t===void 0?null:t;var o=e();if(yr){bn(!0);try{e()}finally{bn(!1)}}return a.memoizedState=[o,t],o},useReducer:function(e,t,a){var o=Rt();if(a!==void 0){var s=a(t);if(yr){bn(!0);try{a(t)}finally{bn(!1)}}}else s=t;return o.memoizedState=o.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},o.queue=e,e=e.dispatch=Lw.bind(null,Se,e),[o.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:function(e){e=yc(e);var t=e.queue,a=Zm.bind(null,Se,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:wc,useDeferredValue:function(e,t){var a=Rt();return Sc(a,e,t)},useTransition:function(){var e=yc(!1);return e=Fm.bind(null,Se,e.queue,!0,!1),Rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var o=Se,s=Rt();if(je){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),Ge===null)throw Error(i(349));(Oe&127)!==0||wm(o,t,a)}s.memoizedState=a;var f={value:a,getSnapshot:t};return s.queue=f,km(Em.bind(null,o,f,e),[e]),o.flags|=2048,sl(9,{destroy:void 0},Sm.bind(null,o,f,a,t),null),a},useId:function(){var e=Rt(),t=Ge.identifierPrefix;if(je){var a=jn,o=_n;a=(o&~(1<<32-yt(o)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Mi++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Nw++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cc,useFormState:jm,useActionState:jm,useOptimistic:function(e){var t=Rt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Rc.bind(null,Se,!0,a),a.dispatch=t,[e,t]},useMemoCache:pc,useCacheRefresh:function(){return Rt().memoizedState=zw.bind(null,Se)},useEffectEvent:function(e){var t=Rt(),a={impl:e};return t.memoizedState=a,function(){if((Ue&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Tc={readContext:pt,use:_i,useCallback:Vm,useContext:pt,useEffect:xc,useImperativeHandle:Gm,useInsertionEffect:Hm,useLayoutEffect:Pm,useMemo:Ym,useReducer:ji,useRef:Um,useState:function(){return ji(Wn)},useDebugValue:wc,useDeferredValue:function(e,t){var a=We();return Qm(a,He.memoizedState,e,t)},useTransition:function(){var e=ji(Wn)[0],t=We().memoizedState;return[typeof e=="boolean"?e:fo(e),t]},useSyncExternalStore:xm,useId:Xm,useHostTransitionStatus:Cc,useFormState:Dm,useActionState:Dm,useOptimistic:function(e,t){var a=We();return Tm(a,He,e,t)},useMemoCache:pc,useCacheRefresh:$m};Tc.useEffectEvent=Bm;var tp={readContext:pt,use:_i,useCallback:Vm,useContext:pt,useEffect:xc,useImperativeHandle:Gm,useInsertionEffect:Hm,useLayoutEffect:Pm,useMemo:Ym,useReducer:vc,useRef:Um,useState:function(){return vc(Wn)},useDebugValue:wc,useDeferredValue:function(e,t){var a=We();return He===null?Sc(a,e,t):Qm(a,He.memoizedState,e,t)},useTransition:function(){var e=vc(Wn)[0],t=We().memoizedState;return[typeof e=="boolean"?e:fo(e),t]},useSyncExternalStore:xm,useId:Xm,useHostTransitionStatus:Cc,useFormState:Lm,useActionState:Lm,useOptimistic:function(e,t){var a=We();return He!==null?Tm(a,He,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:pc,useCacheRefresh:$m};tp.useEffectEvent=Bm;function Ac(e,t,a,o){t=e.memoizedState,a=a(o,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Nc={enqueueSetState:function(e,t,a){e=e._reactInternals;var o=Zt(),s=Aa(o);s.payload=t,a!=null&&(s.callback=a),t=Na(e,s,o),t!==null&&(Pt(t,e,o),io(t,e,o))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var o=Zt(),s=Aa(o);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=Na(e,s,o),t!==null&&(Pt(t,e,o),io(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Zt(),o=Aa(a);o.tag=2,t!=null&&(o.callback=t),t=Na(e,o,a),t!==null&&(Pt(t,e,a),io(t,e,a))}};function np(e,t,a,o,s,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,b):t.prototype&&t.prototype.isPureReactComponent?!Wl(a,o)||!Wl(s,f):!0}function ap(e,t,a,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,o),t.state!==e&&Nc.enqueueReplaceState(t,t.state,null)}function br(e,t){var a=t;if("ref"in t){a={};for(var o in t)o!=="ref"&&(a[o]=t[o])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function rp(e){hi(e)}function lp(e){console.error(e)}function op(e){hi(e)}function Ui(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function ip(e,t,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Mc(e,t,a){return a=Aa(a),a.tag=3,a.payload={element:null},a.callback=function(){Ui(e,t)},a}function sp(e){return e=Aa(e),e.tag=3,e}function up(e,t,a,o){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var f=o.value;e.payload=function(){return s(f)},e.callback=function(){ip(t,a,o)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){ip(t,a,o),typeof s!="function"&&(za===null?za=new Set([this]):za.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function Uw(e,t,a,o,s){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=a.alternate,t!==null&&el(t,a,s,!0),a=Kt.current,a!==null){switch(a.tag){case 31:case 13:return cn===null?Ii():a.alternate===null&&Ze===0&&(Ze=3),a.flags&=-257,a.flags|=65536,a.lanes=s,o===Ei?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([o]):t.add(o),ef(e,o,s)),!1;case 22:return a.flags|=65536,o===Ei?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([o]):a.add(o)),ef(e,o,s)),!1}throw Error(i(435,a.tag))}return ef(e,o,s),Ii(),!1}if(je)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,o!==Iu&&(e=Error(i(422),{cause:o}),no(ln(e,a)))):(o!==Iu&&(t=Error(i(423),{cause:o}),no(ln(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,o=ln(o,a),s=Mc(e.stateNode,o,s),lc(e,s),Ze!==4&&(Ze=2)),!1;var f=Error(i(520),{cause:o});if(f=ln(f,a),So===null?So=[f]:So.push(f),Ze!==4&&(Ze=2),t===null)return!0;o=ln(o,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Mc(a.stateNode,o,e),lc(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(za===null||!za.has(f))))return a.flags|=65536,s&=-s,a.lanes|=s,s=sp(s),up(s,e,a,o),lc(a,s),!1}a=a.return}while(a!==null);return!1}var Oc=Error(i(461)),nt=!1;function gt(e,t,a,o){t.child=e===null?hm(t,null,a,o):vr(t,e.child,a,o)}function cp(e,t,a,o,s){a=a.render;var f=t.ref;if("ref"in o){var b={};for(var w in o)w!=="ref"&&(b[w]=o[w])}else b=o;return hr(t),o=fc(e,t,a,b,f,s),w=dc(),e!==null&&!nt?(hc(e,t,s),ea(e,t,s)):(je&&w&&Fu(t),t.flags|=1,gt(e,t,o,s),t.child)}function fp(e,t,a,o,s){if(e===null){var f=a.type;return typeof f=="function"&&!Vu(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,dp(e,t,f,o,s)):(e=vi(a.type,null,o,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Bc(e,s)){var b=f.memoizedProps;if(a=a.compare,a=a!==null?a:Wl,a(b,o)&&e.ref===t.ref)return ea(e,t,s)}return t.flags|=1,e=In(f,o),e.ref=t.ref,e.return=t,t.child=e}function dp(e,t,a,o,s){if(e!==null){var f=e.memoizedProps;if(Wl(f,o)&&e.ref===t.ref)if(nt=!1,t.pendingProps=o=f,Bc(e,s))(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,ea(e,t,s)}return _c(e,t,a,o,s)}function hp(e,t,a,o){var s=o.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(o=t.child=e.child,s=0;o!==null;)s=s|o.lanes|o.childLanes,o=o.sibling;o=s&~f}else o=0,t.child=null;return mp(e,t,f,a,o)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wi(t,f!==null?f.cachePool:null),f!==null?gm(t,f):ic(),vm(t);else return o=t.lanes=536870912,mp(e,t,f!==null?f.baseLanes|a:a,a,o)}else f!==null?(wi(t,f.cachePool),gm(t,f),Oa(),t.memoizedState=null):(e!==null&&wi(t,null),ic(),Oa());return gt(e,t,s,a),t.child}function po(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mp(e,t,a,o,s){var f=tc();return f=f===null?null:{parent:et._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&wi(t,null),ic(),vm(t),e!==null&&el(e,t,o,!0),t.childLanes=s,null}function ki(e,t){return t=Hi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pp(e,t,a){return vr(t,e.child,null,a),e=ki(t,t.pendingProps),e.flags|=2,It(t),t.memoizedState=null,e}function kw(e,t,a){var o=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(je){if(o.mode==="hidden")return e=ki(t,o),t.lanes=536870912,po(null,e);if(uc(t),(e=Ye)?(e=Ag(e,un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sa!==null?{id:_n,overflow:jn}:null,retryLane:536870912,hydrationErrors:null},a=Jh(e),a.return=t,t.child=a,mt=t,Ye=null)):e=null,e===null)throw Ca(t);return t.lanes=536870912,null}return ki(t,o)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(uc(t),s)if(t.flags&256)t.flags&=-257,t=pp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(nt||el(e,t,a,!1),s=(a&e.childLanes)!==0,nt||s){if(o=Ge,o!==null&&(b=Dt(o,a),b!==0&&b!==f.retryLane))throw f.retryLane=b,ur(e,b),Pt(o,e,b),Oc;Ii(),t=pp(e,t,a)}else e=f.treeContext,Ye=fn(b.nextSibling),mt=t,je=!0,Ea=null,un=!1,e!==null&&tm(t,e),t=ki(t,o),t.flags|=4096;return t}return e=In(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bi(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function _c(e,t,a,o,s){return hr(t),a=fc(e,t,a,o,void 0,s),o=dc(),e!==null&&!nt?(hc(e,t,s),ea(e,t,s)):(je&&o&&Fu(t),t.flags|=1,gt(e,t,a,s),t.child)}function gp(e,t,a,o,s,f){return hr(t),t.updateQueue=null,a=bm(t,o,a,s),ym(e),o=dc(),e!==null&&!nt?(hc(e,t,f),ea(e,t,f)):(je&&o&&Fu(t),t.flags|=1,gt(e,t,a,f),t.child)}function vp(e,t,a,o,s){if(hr(t),t.stateNode===null){var f=$r,b=a.contextType;typeof b=="object"&&b!==null&&(f=pt(b)),f=new a(o,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Nc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=o,f.state=t.memoizedState,f.refs={},ac(t),b=a.contextType,f.context=typeof b=="object"&&b!==null?pt(b):$r,f.state=t.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(Ac(t,a,b,o),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&Nc.enqueueReplaceState(f,f.state,null),uo(t,o,f,s),so(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){f=t.stateNode;var w=t.memoizedProps,M=br(a,w);f.props=M;var U=f.context,K=a.contextType;b=$r,typeof K=="object"&&K!==null&&(b=pt(K));var $=a.getDerivedStateFromProps;K=typeof $=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,K||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||U!==b)&&ap(t,f,o,b),Ta=!1;var P=t.memoizedState;f.state=P,uo(t,o,f,s),so(),U=t.memoizedState,w||P!==U||Ta?(typeof $=="function"&&(Ac(t,a,$,o),U=t.memoizedState),(M=Ta||np(t,a,M,o,P,U,b))?(K||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=U),f.props=o,f.state=U,f.context=b,o=M):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{f=t.stateNode,rc(e,t),b=t.memoizedProps,K=br(a,b),f.props=K,$=t.pendingProps,P=f.context,U=a.contextType,M=$r,typeof U=="object"&&U!==null&&(M=pt(U)),w=a.getDerivedStateFromProps,(U=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==$||P!==M)&&ap(t,f,o,M),Ta=!1,P=t.memoizedState,f.state=P,uo(t,o,f,s),so();var q=t.memoizedState;b!==$||P!==q||Ta||e!==null&&e.dependencies!==null&&bi(e.dependencies)?(typeof w=="function"&&(Ac(t,a,w,o),q=t.memoizedState),(K=Ta||np(t,a,K,o,P,q,M)||e!==null&&e.dependencies!==null&&bi(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,q,M),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,q,M)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=q),f.props=o,f.state=q,f.context=M,o=K):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),o=!1)}return f=o,Bi(e,t),o=(t.flags&128)!==0,f||o?(f=t.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&o?(t.child=vr(t,e.child,null,s),t.child=vr(t,null,a,s)):gt(e,t,a,s),t.memoizedState=f.state,e=t.child):e=ea(e,t,s),e}function yp(e,t,a,o){return fr(),t.flags|=256,gt(e,t,a,o),t.child}var jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dc(e){return{baseLanes:e,cachePool:im()}}function zc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=$t),e}function bp(e,t,a){var o=t.pendingProps,s=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(Je.current&2)!==0),b&&(s=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(je){if(s?Ma(t):Oa(),(e=Ye)?(e=Ag(e,un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sa!==null?{id:_n,overflow:jn}:null,retryLane:536870912,hydrationErrors:null},a=Jh(e),a.return=t,t.child=a,mt=t,Ye=null)):e=null,e===null)throw Ca(t);return vf(e)?t.lanes=32:t.lanes=536870912,null}var w=o.children;return o=o.fallback,s?(Oa(),s=t.mode,w=Hi({mode:"hidden",children:w},s),o=cr(o,s,a,null),w.return=t,o.return=t,w.sibling=o,t.child=w,o=t.child,o.memoizedState=Dc(a),o.childLanes=zc(e,b,a),t.memoizedState=jc,po(null,o)):(Ma(t),Lc(t,w))}var M=e.memoizedState;if(M!==null&&(w=M.dehydrated,w!==null)){if(f)t.flags&256?(Ma(t),t.flags&=-257,t=Uc(e,t,a)):t.memoizedState!==null?(Oa(),t.child=e.child,t.flags|=128,t=null):(Oa(),w=o.fallback,s=t.mode,o=Hi({mode:"visible",children:o.children},s),w=cr(w,s,a,null),w.flags|=2,o.return=t,w.return=t,o.sibling=w,t.child=o,vr(t,e.child,null,a),o=t.child,o.memoizedState=Dc(a),o.childLanes=zc(e,b,a),t.memoizedState=jc,t=po(null,o));else if(Ma(t),vf(w)){if(b=w.nextSibling&&w.nextSibling.dataset,b)var U=b.dgst;b=U,o=Error(i(419)),o.stack="",o.digest=b,no({value:o,source:null,stack:null}),t=Uc(e,t,a)}else if(nt||el(e,t,a,!1),b=(a&e.childLanes)!==0,nt||b){if(b=Ge,b!==null&&(o=Dt(b,a),o!==0&&o!==M.retryLane))throw M.retryLane=o,ur(e,o),Pt(b,e,o),Oc;gf(w)||Ii(),t=Uc(e,t,a)}else gf(w)?(t.flags|=192,t.child=e.child,t=null):(e=M.treeContext,Ye=fn(w.nextSibling),mt=t,je=!0,Ea=null,un=!1,e!==null&&tm(t,e),t=Lc(t,o.children),t.flags|=4096);return t}return s?(Oa(),w=o.fallback,s=t.mode,M=e.child,U=M.sibling,o=In(M,{mode:"hidden",children:o.children}),o.subtreeFlags=M.subtreeFlags&65011712,U!==null?w=In(U,w):(w=cr(w,s,a,null),w.flags|=2),w.return=t,o.return=t,o.sibling=w,t.child=o,po(null,o),o=t.child,w=e.child.memoizedState,w===null?w=Dc(a):(s=w.cachePool,s!==null?(M=et._currentValue,s=s.parent!==M?{parent:M,pool:M}:s):s=im(),w={baseLanes:w.baseLanes|a,cachePool:s}),o.memoizedState=w,o.childLanes=zc(e,b,a),t.memoizedState=jc,po(e.child,o)):(Ma(t),a=e.child,e=a.sibling,a=In(a,{mode:"visible",children:o.children}),a.return=t,a.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=a,t.memoizedState=null,a)}function Lc(e,t){return t=Hi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hi(e,t){return e=Ft(22,e,null,t),e.lanes=0,e}function Uc(e,t,a){return vr(t,e.child,null,a),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xp(e,t,a){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Zu(e.return,t,a)}function kc(e,t,a,o,s,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:s,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=a,b.tailMode=s,b.treeForkCount=f)}function wp(e,t,a){var o=t.pendingProps,s=o.revealOrder,f=o.tail;o=o.children;var b=Je.current,w=(b&2)!==0;if(w?(b=b&1|2,t.flags|=128):b&=1,Q(Je,b),gt(e,t,o,a),o=je?to:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xp(e,a,t);else if(e.tag===19)xp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&Ai(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),kc(t,!1,s,a,f,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ai(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}kc(t,!0,a,null,f,o);break;case"together":kc(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function ea(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Da|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(el(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=In(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=In(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Bc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bi(e)))}function Bw(e,t,a){switch(t.tag){case 3:ae(t,t.stateNode.containerInfo),Ra(t,et,e.memoizedState.cache),fr();break;case 27:case 5:Ee(t);break;case 4:ae(t,t.stateNode.containerInfo);break;case 10:Ra(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uc(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Ma(t),t.flags|=128,null):(a&t.child.childLanes)!==0?bp(e,t,a):(Ma(t),e=ea(e,t,a),e!==null?e.sibling:null);Ma(t);break;case 19:var s=(e.flags&128)!==0;if(o=(a&t.childLanes)!==0,o||(el(e,t,a,!1),o=(a&t.childLanes)!==0),s){if(o)return wp(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Q(Je,Je.current),o)break;return null;case 22:return t.lanes=0,hp(e,t,a,t.pendingProps);case 24:Ra(t,et,e.memoizedState.cache)}return ea(e,t,a)}function Sp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)nt=!0;else{if(!Bc(e,a)&&(t.flags&128)===0)return nt=!1,Bw(e,t,a);nt=(e.flags&131072)!==0}else nt=!1,je&&(t.flags&1048576)!==0&&em(t,to,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=pr(t.elementType),t.type=e,typeof e=="function")Vu(e)?(o=br(e,o),t.tag=1,t=vp(null,t,e,o,a)):(t.tag=0,t=_c(null,t,e,o,a));else{if(e!=null){var s=e.$$typeof;if(s===H){t.tag=11,t=cp(null,t,e,o,a);break e}else if(s===B){t.tag=14,t=fp(null,t,e,o,a);break e}}throw t=pe(e)||e,Error(i(306,t,""))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,a);case 1:return o=t.type,s=br(o,t.pendingProps),vp(e,t,o,s,a);case 3:e:{if(ae(t,t.stateNode.containerInfo),e===null)throw Error(i(387));o=t.pendingProps;var f=t.memoizedState;s=f.element,rc(e,t),uo(t,o,null,a);var b=t.memoizedState;if(o=b.cache,Ra(t,et,o),o!==f.cache&&Ju(t,[et],a,!0),so(),o=b.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=yp(e,t,o,a);break e}else if(o!==s){s=ln(Error(i(424)),t),no(s),t=yp(e,t,o,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ye=fn(e.firstChild),mt=t,je=!0,Ea=null,un=!0,a=hm(t,null,o,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(fr(),o===s){t=ea(e,t,a);break e}gt(e,t,o,a)}t=t.child}return t;case 26:return Bi(e,t),e===null?(a=Dg(t.type,null,t.pendingProps,null))?t.memoizedState=a:je||(a=t.type,e=t.pendingProps,o=ts(le.current).createElement(a),o[ht]=t,o[zt]=e,vt(o,a,e),ct(o),t.stateNode=o):t.memoizedState=Dg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&je&&(o=t.stateNode=Og(t.type,t.pendingProps,le.current),mt=t,un=!0,s=Ye,Ba(t.type)?(yf=s,Ye=fn(o.firstChild)):Ye=s),gt(e,t,t.pendingProps.children,a),Bi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&je&&((s=o=Ye)&&(o=mS(o,t.type,t.pendingProps,un),o!==null?(t.stateNode=o,mt=t,Ye=fn(o.firstChild),un=!1,s=!0):s=!1),s||Ca(t)),Ee(t),s=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,o=f.children,hf(s,f)?o=null:b!==null&&hf(s,b)&&(t.flags|=32),t.memoizedState!==null&&(s=fc(e,t,Mw,null,null,a),Oo._currentValue=s),Bi(e,t),gt(e,t,o,a),t.child;case 6:return e===null&&je&&((e=a=Ye)&&(a=pS(a,t.pendingProps,un),a!==null?(t.stateNode=a,mt=t,Ye=null,e=!0):e=!1),e||Ca(t)),null;case 13:return bp(e,t,a);case 4:return ae(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=vr(t,null,o,a):gt(e,t,o,a),t.child;case 11:return cp(e,t,t.type,t.pendingProps,a);case 7:return gt(e,t,t.pendingProps,a),t.child;case 8:return gt(e,t,t.pendingProps.children,a),t.child;case 12:return gt(e,t,t.pendingProps.children,a),t.child;case 10:return o=t.pendingProps,Ra(t,t.type,o.value),gt(e,t,o.children,a),t.child;case 9:return s=t.type._context,o=t.pendingProps.children,hr(t),s=pt(s),o=o(s),t.flags|=1,gt(e,t,o,a),t.child;case 14:return fp(e,t,t.type,t.pendingProps,a);case 15:return dp(e,t,t.type,t.pendingProps,a);case 19:return wp(e,t,a);case 31:return kw(e,t,a);case 22:return hp(e,t,a,t.pendingProps);case 24:return hr(t),o=pt(et),e===null?(s=tc(),s===null&&(s=Ge,f=Wu(),s.pooledCache=f,f.refCount++,f!==null&&(s.pooledCacheLanes|=a),s=f),t.memoizedState={parent:o,cache:s},ac(t),Ra(t,et,s)):((e.lanes&a)!==0&&(rc(e,t),uo(t,null,null,a),so()),s=e.memoizedState,f=t.memoizedState,s.parent!==o?(s={parent:o,cache:o},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Ra(t,et,o)):(o=f.cache,Ra(t,et,o),o!==s.cache&&Ju(t,[et],a,!0))),gt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ta(e){e.flags|=4}function Hc(e,t,a,o,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Xp())e.flags|=8192;else throw gr=Ei,nc}else e.flags&=-16777217}function Ep(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Bg(t))if(Xp())e.flags|=8192;else throw gr=Ei,nc}function Pi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?bt():536870912,e.lanes|=t,dl|=t)}function go(e,t){if(!je)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,o|=s.subtreeFlags&65011712,o|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,o|=s.subtreeFlags,o|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=o,e.childLanes=a,t}function Hw(e,t,a){var o=t.pendingProps;switch(Ku(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return Qe(t),null;case 3:return a=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Zn(et),be(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Wr(t)?ta(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xu())),Qe(t),null;case 26:var s=t.type,f=t.memoizedState;return e===null?(ta(t),f!==null?(Qe(t),Ep(t,f)):(Qe(t),Hc(t,s,null,o,a))):f?f!==e.memoizedState?(ta(t),Qe(t),Ep(t,f)):(Qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&ta(t),Qe(t),Hc(t,s,e,o,a)),null;case 27:if(Te(t),a=le.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&ta(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return Qe(t),null}e=Z.current,Wr(t)?nm(t):(e=Og(s,o,a),t.stateNode=e,ta(t))}return Qe(t),null;case 5:if(Te(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&ta(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return Qe(t),null}if(f=Z.current,Wr(t))nm(t);else{var b=ts(le.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?b.createElement(s,{is:o.is}):b.createElement(s)}}f[ht]=t,f[zt]=o;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(vt(f,s,o),s){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ta(t)}}return Qe(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&ta(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(e=le.current,Wr(t)){if(e=t.stateNode,a=t.memoizedProps,o=null,s=mt,s!==null)switch(s.tag){case 27:case 5:o=s.memoizedProps}e[ht]=t,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||bg(e.nodeValue,a)),e||Ca(t,!0)}else e=ts(e).createTextNode(o),e[ht]=t,t.stateNode=e}return Qe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(o=Wr(t),a!==null){if(e===null){if(!o)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[ht]=t}else fr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),e=!1}else a=Xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(It(t),t):(It(t),null);if((t.flags&128)!==0)throw Error(i(558))}return Qe(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Wr(t),o!==null&&o.dehydrated!==null){if(e===null){if(!s)throw Error(i(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(317));s[ht]=t}else fr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),s=!1}else s=Xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(It(t),t):(It(t),null)}return It(t),(t.flags&128)!==0?(t.lanes=a,t):(a=o!==null,e=e!==null&&e.memoizedState!==null,a&&(o=t.child,s=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(s=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==s&&(o.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Pi(t,t.updateQueue),Qe(t),null);case 4:return be(),e===null&&sf(t.stateNode.containerInfo),Qe(t),null;case 10:return Zn(t.type),Qe(t),null;case 19:if(F(Je),o=t.memoizedState,o===null)return Qe(t),null;if(s=(t.flags&128)!==0,f=o.rendering,f===null)if(s)go(o,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ai(e),f!==null){for(t.flags|=128,go(o,!1),e=f.updateQueue,t.updateQueue=e,Pi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Zh(a,e),a=a.sibling;return Q(Je,Je.current&1|2),je&&Xn(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Et()>Qi&&(t.flags|=128,s=!0,go(o,!1),t.lanes=4194304)}else{if(!s)if(e=Ai(f),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Pi(t,e),go(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!je)return Qe(t),null}else 2*Et()-o.renderingStartTime>Qi&&a!==536870912&&(t.flags|=128,s=!0,go(o,!1),t.lanes=4194304);o.isBackwards?(f.sibling=t.child,t.child=f):(e=o.last,e!==null?e.sibling=f:t.child=f,o.last=f)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Et(),e.sibling=null,a=Je.current,Q(Je,s?a&1|2:a&1),je&&Xn(t,o.treeForkCount),e):(Qe(t),null);case 22:case 23:return It(t),sc(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(a&536870912)!==0&&(t.flags&128)===0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),a=t.updateQueue,a!==null&&Pi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==a&&(t.flags|=2048),e!==null&&F(mr),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Zn(et),Qe(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Pw(e,t){switch(Ku(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zn(et),be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Te(t),null;case 31:if(t.memoizedState!==null){if(It(t),t.alternate===null)throw Error(i(340));fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(It(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(Je),null;case 4:return be(),null;case 10:return Zn(t.type),null;case 22:case 23:return It(t),sc(),e!==null&&F(mr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zn(et),null;case 25:return null;default:return null}}function Cp(e,t){switch(Ku(t),t.tag){case 3:Zn(et),be();break;case 26:case 27:case 5:Te(t);break;case 4:be();break;case 31:t.memoizedState!==null&&It(t);break;case 13:It(t);break;case 19:F(Je);break;case 10:Zn(t.type);break;case 22:case 23:It(t),sc(),e!==null&&F(mr);break;case 24:Zn(et)}}function vo(e,t){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var s=o.next;a=s;do{if((a.tag&e)===e){o=void 0;var f=a.create,b=a.inst;o=f(),b.destroy=o}a=a.next}while(a!==s)}}catch(w){Be(t,t.return,w)}}function _a(e,t,a){try{var o=t.updateQueue,s=o!==null?o.lastEffect:null;if(s!==null){var f=s.next;o=f;do{if((o.tag&e)===e){var b=o.inst,w=b.destroy;if(w!==void 0){b.destroy=void 0,s=t;var M=a,U=w;try{U()}catch(K){Be(s,M,K)}}}o=o.next}while(o!==f)}}catch(K){Be(t,t.return,K)}}function Rp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{pm(t,a)}catch(o){Be(e,e.return,o)}}}function Tp(e,t,a){a.props=br(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){Be(e,t,o)}}function yo(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(s){Be(e,t,s)}}function Dn(e,t){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(s){Be(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){Be(e,t,s)}else a.current=null}function Ap(e){var t=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(s){Be(e,e.return,s)}}function Pc(e,t,a){try{var o=e.stateNode;sS(o,e.type,a,t),o[zt]=t}catch(s){Be(e,e.return,s)}}function Np(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ba(e.type)||e.tag===4}function qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Np(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ba(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gc(e,t,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Fn));else if(o!==4&&(o===27&&Ba(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,a),e=e.sibling;e!==null;)Gc(e,t,a),e=e.sibling}function qi(e,t,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(o!==4&&(o===27&&Ba(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(qi(e,t,a),e=e.sibling;e!==null;)qi(e,t,a),e=e.sibling}function Mp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);vt(t,o,a),t[ht]=e,t[zt]=a}catch(f){Be(e,e.return,f)}}var na=!1,at=!1,Vc=!1,Op=typeof WeakSet=="function"?WeakSet:Set,ft=null;function qw(e,t){if(e=e.containerInfo,ff=ss,e=Gh(e),Uu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var s=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var b=0,w=-1,M=-1,U=0,K=0,$=e,P=null;t:for(;;){for(var q;$!==a||s!==0&&$.nodeType!==3||(w=b+s),$!==f||o!==0&&$.nodeType!==3||(M=b+o),$.nodeType===3&&(b+=$.nodeValue.length),(q=$.firstChild)!==null;)P=$,$=q;for(;;){if($===e)break t;if(P===a&&++U===s&&(w=b),P===f&&++K===o&&(M=b),(q=$.nextSibling)!==null)break;$=P,P=$.parentNode}$=q}a=w===-1||M===-1?null:{start:w,end:M}}else a=null}a=a||{start:0,end:0}}else a=null;for(df={focusedElem:e,selectionRange:a},ss=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,s=f.memoizedProps,f=f.memoizedState,o=a.stateNode;try{var oe=br(a.type,s);e=o.getSnapshotBeforeUpdate(oe,f),o.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Be(a,a.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)pf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ft=e;break}ft=t.return}}function _p(e,t,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:ra(e,a),o&4&&vo(5,a);break;case 1:if(ra(e,a),o&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(b){Be(a,a.return,b)}else{var s=br(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Be(a,a.return,b)}}o&64&&Rp(a),o&512&&yo(a,a.return);break;case 3:if(ra(e,a),o&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{pm(e,t)}catch(b){Be(a,a.return,b)}}break;case 27:t===null&&o&4&&Mp(a);case 26:case 5:ra(e,a),t===null&&o&4&&Ap(a),o&512&&yo(a,a.return);break;case 12:ra(e,a);break;case 31:ra(e,a),o&4&&zp(e,a);break;case 13:ra(e,a),o&4&&Lp(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=$w.bind(null,a),gS(e,a))));break;case 22:if(o=a.memoizedState!==null||na,!o){t=t!==null&&t.memoizedState!==null||at,s=na;var f=at;na=o,(at=t)&&!f?la(e,a,(a.subtreeFlags&8772)!==0):ra(e,a),na=s,at=f}break;case 30:break;default:ra(e,a)}}function jp(e){var t=e.alternate;t!==null&&(e.alternate=null,jp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,Ut=!1;function aa(e,t,a){for(a=a.child;a!==null;)Dp(e,t,a),a=a.sibling}function Dp(e,t,a){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(nr,a)}catch{}switch(a.tag){case 26:at||Dn(a,t),aa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:at||Dn(a,t);var o=Ke,s=Ut;Ba(a.type)&&(Ke=a.stateNode,Ut=!1),aa(e,t,a),Ao(a.stateNode),Ke=o,Ut=s;break;case 5:at||Dn(a,t);case 6:if(o=Ke,s=Ut,Ke=null,aa(e,t,a),Ke=o,Ut=s,Ke!==null)if(Ut)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(a.stateNode)}catch(f){Be(a,t,f)}else try{Ke.removeChild(a.stateNode)}catch(f){Be(a,t,f)}break;case 18:Ke!==null&&(Ut?(e=Ke,Rg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),xl(e)):Rg(Ke,a.stateNode));break;case 4:o=Ke,s=Ut,Ke=a.stateNode.containerInfo,Ut=!0,aa(e,t,a),Ke=o,Ut=s;break;case 0:case 11:case 14:case 15:_a(2,a,t),at||_a(4,a,t),aa(e,t,a);break;case 1:at||(Dn(a,t),o=a.stateNode,typeof o.componentWillUnmount=="function"&&Tp(a,t,o)),aa(e,t,a);break;case 21:aa(e,t,a);break;case 22:at=(o=at)||a.memoizedState!==null,aa(e,t,a),at=o;break;default:aa(e,t,a)}}function zp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{xl(e)}catch(a){Be(t,t.return,a)}}}function Lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{xl(e)}catch(a){Be(t,t.return,a)}}function Gw(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Op),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Op),t;default:throw Error(i(435,e.tag))}}function Gi(e,t){var a=Gw(e);t.forEach(function(o){if(!a.has(o)){a.add(o);var s=Zw.bind(null,e,o);o.then(s,s)}})}function kt(e,t){var a=t.deletions;if(a!==null)for(var o=0;o<a.length;o++){var s=a[o],f=e,b=t,w=b;e:for(;w!==null;){switch(w.tag){case 27:if(Ba(w.type)){Ke=w.stateNode,Ut=!1;break e}break;case 5:Ke=w.stateNode,Ut=!1;break e;case 3:case 4:Ke=w.stateNode.containerInfo,Ut=!0;break e}w=w.return}if(Ke===null)throw Error(i(160));Dp(f,b,s),Ke=null,Ut=!1,f=s.alternate,f!==null&&(f.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Up(t,e),t=t.sibling}var Sn=null;function Up(e,t){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:kt(t,e),Bt(e),o&4&&(_a(3,e,e.return),vo(3,e),_a(5,e,e.return));break;case 1:kt(t,e),Bt(e),o&512&&(at||a===null||Dn(a,a.return)),o&64&&na&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var s=Sn;if(kt(t,e),Bt(e),o&512&&(at||a===null||Dn(a,a.return)),o&4){var f=a!==null?a.memoizedState:null;if(o=e.memoizedState,a===null)if(o===null)if(e.stateNode===null){e:{o=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(o){case"title":f=s.getElementsByTagName("title")[0],(!f||f[Yl]||f[ht]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=s.createElement(o),s.head.insertBefore(f,s.querySelector("head > title"))),vt(f,o,a),f[ht]=e,ct(f),o=f;break e;case"link":var b=Ug("link","href",s).get(o+(a.href||""));if(b){for(var w=0;w<b.length;w++)if(f=b[w],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(w,1);break t}}f=s.createElement(o),vt(f,o,a),s.head.appendChild(f);break;case"meta":if(b=Ug("meta","content",s).get(o+(a.content||""))){for(w=0;w<b.length;w++)if(f=b[w],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(w,1);break t}}f=s.createElement(o),vt(f,o,a),s.head.appendChild(f);break;default:throw Error(i(468,o))}f[ht]=e,ct(f),o=f}e.stateNode=o}else kg(s,e.type,e.stateNode);else e.stateNode=Lg(s,o,e.memoizedProps);else f!==o?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,o===null?kg(s,e.type,e.stateNode):Lg(s,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Pc(e,e.memoizedProps,a.memoizedProps)}break;case 27:kt(t,e),Bt(e),o&512&&(at||a===null||Dn(a,a.return)),a!==null&&o&4&&Pc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(kt(t,e),Bt(e),o&512&&(at||a===null||Dn(a,a.return)),e.flags&32){s=e.stateNode;try{Vr(s,"")}catch(oe){Be(e,e.return,oe)}}o&4&&e.stateNode!=null&&(s=e.memoizedProps,Pc(e,s,a!==null?a.memoizedProps:s)),o&1024&&(Vc=!0);break;case 6:if(kt(t,e),Bt(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,a=e.stateNode;try{a.nodeValue=o}catch(oe){Be(e,e.return,oe)}}break;case 3:if(rs=null,s=Sn,Sn=ns(t.containerInfo),kt(t,e),Sn=s,Bt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{xl(t.containerInfo)}catch(oe){Be(e,e.return,oe)}Vc&&(Vc=!1,kp(e));break;case 4:o=Sn,Sn=ns(e.stateNode.containerInfo),kt(t,e),Bt(e),Sn=o;break;case 12:kt(t,e),Bt(e);break;case 31:kt(t,e),Bt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Gi(e,o)));break;case 13:kt(t,e),Bt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Yi=Et()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Gi(e,o)));break;case 22:s=e.memoizedState!==null;var M=a!==null&&a.memoizedState!==null,U=na,K=at;if(na=U||s,at=K||M,kt(t,e),at=K,na=U,Bt(e),o&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||M||na||at||xr(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){M=a=t;try{if(f=M.stateNode,s)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{w=M.stateNode;var $=M.memoizedProps.style,P=$!=null&&$.hasOwnProperty("display")?$.display:null;w.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(oe){Be(M,M.return,oe)}}}else if(t.tag===6){if(a===null){M=t;try{M.stateNode.nodeValue=s?"":M.memoizedProps}catch(oe){Be(M,M.return,oe)}}}else if(t.tag===18){if(a===null){M=t;try{var q=M.stateNode;s?Tg(q,!0):Tg(M.stateNode,!1)}catch(oe){Be(M,M.return,oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Gi(e,a))));break;case 19:kt(t,e),Bt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Gi(e,o)));break;case 30:break;case 21:break;default:kt(t,e),Bt(e)}}function Bt(e){var t=e.flags;if(t&2){try{for(var a,o=e.return;o!==null;){if(Np(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var s=a.stateNode,f=qc(e);qi(e,f,s);break;case 5:var b=a.stateNode;a.flags&32&&(Vr(b,""),a.flags&=-33);var w=qc(e);qi(e,w,b);break;case 3:case 4:var M=a.stateNode.containerInfo,U=qc(e);Gc(e,U,M);break;default:throw Error(i(161))}}catch(K){Be(e,e.return,K)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;kp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ra(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_p(e,t.alternate,t),t=t.sibling}function xr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_a(4,t,t.return),xr(t);break;case 1:Dn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Tp(t,t.return,a),xr(t);break;case 27:Ao(t.stateNode);case 26:case 5:Dn(t,t.return),xr(t);break;case 22:t.memoizedState===null&&xr(t);break;case 30:xr(t);break;default:xr(t)}e=e.sibling}}function la(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,s=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:la(s,f,a),vo(4,f);break;case 1:if(la(s,f,a),o=f,s=o.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(U){Be(o,o.return,U)}if(o=f,s=o.updateQueue,s!==null){var w=o.stateNode;try{var M=s.shared.hiddenCallbacks;if(M!==null)for(s.shared.hiddenCallbacks=null,s=0;s<M.length;s++)mm(M[s],w)}catch(U){Be(o,o.return,U)}}a&&b&64&&Rp(f),yo(f,f.return);break;case 27:Mp(f);case 26:case 5:la(s,f,a),a&&o===null&&b&4&&Ap(f),yo(f,f.return);break;case 12:la(s,f,a);break;case 31:la(s,f,a),a&&b&4&&zp(s,f);break;case 13:la(s,f,a),a&&b&4&&Lp(s,f);break;case 22:f.memoizedState===null&&la(s,f,a),yo(f,f.return);break;case 30:break;default:la(s,f,a)}t=t.sibling}}function Yc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ao(a))}function Qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ao(e))}function En(e,t,a,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Bp(e,t,a,o),t=t.sibling}function Bp(e,t,a,o){var s=t.flags;switch(t.tag){case 0:case 11:case 15:En(e,t,a,o),s&2048&&vo(9,t);break;case 1:En(e,t,a,o);break;case 3:En(e,t,a,o),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ao(e)));break;case 12:if(s&2048){En(e,t,a,o),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,w=f.onPostCommit;typeof w=="function"&&w(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){Be(t,t.return,M)}}else En(e,t,a,o);break;case 31:En(e,t,a,o);break;case 13:En(e,t,a,o);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?En(e,t,a,o):bo(e,t):f._visibility&2?En(e,t,a,o):(f._visibility|=2,ul(e,t,a,o,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Yc(b,t);break;case 24:En(e,t,a,o),s&2048&&Qc(t.alternate,t);break;default:En(e,t,a,o)}}function ul(e,t,a,o,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,w=a,M=o,U=b.flags;switch(b.tag){case 0:case 11:case 15:ul(f,b,w,M,s),vo(8,b);break;case 23:break;case 22:var K=b.stateNode;b.memoizedState!==null?K._visibility&2?ul(f,b,w,M,s):bo(f,b):(K._visibility|=2,ul(f,b,w,M,s)),s&&U&2048&&Yc(b.alternate,b);break;case 24:ul(f,b,w,M,s),s&&U&2048&&Qc(b.alternate,b);break;default:ul(f,b,w,M,s)}t=t.sibling}}function bo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,o=t,s=o.flags;switch(o.tag){case 22:bo(a,o),s&2048&&Yc(o.alternate,o);break;case 24:bo(a,o),s&2048&&Qc(o.alternate,o);break;default:bo(a,o)}t=t.sibling}}var xo=8192;function cl(e,t,a){if(e.subtreeFlags&xo)for(e=e.child;e!==null;)Hp(e,t,a),e=e.sibling}function Hp(e,t,a){switch(e.tag){case 26:cl(e,t,a),e.flags&xo&&e.memoizedState!==null&&NS(a,Sn,e.memoizedState,e.memoizedProps);break;case 5:cl(e,t,a);break;case 3:case 4:var o=Sn;Sn=ns(e.stateNode.containerInfo),cl(e,t,a),Sn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=xo,xo=16777216,cl(e,t,a),xo=o):cl(e,t,a));break;default:cl(e,t,a)}}function Pp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function wo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var o=t[a];ft=o,Gp(o,e)}Pp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qp(e),e=e.sibling}function qp(e){switch(e.tag){case 0:case 11:case 15:wo(e),e.flags&2048&&_a(9,e,e.return);break;case 3:wo(e);break;case 12:wo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vi(e)):wo(e);break;default:wo(e)}}function Vi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var o=t[a];ft=o,Gp(o,e)}Pp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_a(8,t,t.return),Vi(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Vi(t));break;default:Vi(t)}e=e.sibling}}function Gp(e,t){for(;ft!==null;){var a=ft;switch(a.tag){case 0:case 11:case 15:_a(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ao(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,ft=o;else e:for(a=e;ft!==null;){o=ft;var s=o.sibling,f=o.return;if(jp(o),o===a){ft=null;break e}if(s!==null){s.return=f,ft=s;break e}ft=f}}}var Vw={getCacheForType:function(e){var t=pt(et),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return pt(et).controller.signal}},Yw=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Ge=null,Ae=null,Oe=0,ke=0,Xt=null,ja=!1,fl=!1,Fc=!1,oa=0,Ze=0,Da=0,wr=0,Kc=0,$t=0,dl=0,So=null,Ht=null,Ic=!1,Yi=0,Vp=0,Qi=1/0,Fi=null,za=null,lt=0,La=null,hl=null,ia=0,Xc=0,$c=null,Yp=null,Eo=0,Zc=null;function Zt(){return(Ue&2)!==0&&Oe!==0?Oe&-Oe:j.T!==null?af():vu()}function Qp(){if($t===0)if((Oe&536870912)===0||je){var e=Lr;Lr<<=1,(Lr&3932160)===0&&(Lr=262144),$t=e}else $t=536870912;return e=Kt.current,e!==null&&(e.flags|=32),$t}function Pt(e,t,a){(e===Ge&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(ml(e,0),Ua(e,Oe,$t,!1)),Xe(e,a),((Ue&2)===0||e!==Ge)&&(e===Ge&&((Ue&2)===0&&(wr|=a),Ze===4&&Ua(e,Oe,$t,!1)),zn(e))}function Fp(e,t,a){if((Ue&6)!==0)throw Error(i(327));var o=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Fe(e,t),s=o?Kw(e,t):Wc(e,t,!0),f=o;do{if(s===0){fl&&!o&&Ua(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!Qw(a)){s=Wc(e,t,!1),f=!1;continue}if(s===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var w=e;s=So;var M=w.current.memoizedState.isDehydrated;if(M&&(ml(w,b).flags|=256),b=Wc(w,b,!1),b!==2){if(Fc&&!M){w.errorRecoveryDisabledLanes|=f,wr|=f,s=4;break e}f=Ht,Ht=s,f!==null&&(Ht===null?Ht=f:Ht.push.apply(Ht,f))}s=b}if(f=!1,s!==2)continue}}if(s===1){ml(e,0),Ua(e,t,0,!0);break}e:{switch(o=e,f=s,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ua(o,t,$t,!ja);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(s=Yi+300-Et(),10<s)){if(Ua(o,t,$t,!ja),xe(o,0,!0)!==0)break e;ia=t,o.timeoutHandle=Eg(Kp.bind(null,o,a,Ht,Fi,Ic,t,$t,wr,dl,ja,f,"Throttled",-0,0),s);break e}Kp(o,a,Ht,Fi,Ic,t,$t,wr,dl,ja,f,null,-0,0)}}break}while(!0);zn(e)}function Kp(e,t,a,o,s,f,b,w,M,U,K,$,P,q){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},Hp(t,f,$);var oe=(f&62914560)===f?Yi-Et():(f&4194048)===f?Vp-Et():0;if(oe=MS($,oe),oe!==null){ia=f,e.cancelPendingCommit=oe(tg.bind(null,e,t,f,a,o,s,b,w,M,K,$,null,P,q)),Ua(e,f,b,!U);return}}tg(e,t,f,a,o,s,b,w,M)}function Qw(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var s=a[o],f=s.getSnapshot;s=s.value;try{if(!Qt(f(),s))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ua(e,t,a,o){t&=~Kc,t&=~wr,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var s=t;0<s;){var f=31-yt(s),b=1<<f;o[f]=-1,s&=~b}a!==0&&rr(e,a,t)}function Ki(){return(Ue&6)===0?(Co(0),!1):!0}function Jc(){if(Ae!==null){if(ke===0)var e=Ae.return;else e=Ae,$n=dr=null,mc(e),rl=null,lo=0,e=Ae;for(;e!==null;)Cp(e.alternate,e),e=e.return;Ae=null}}function ml(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,fS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ia=0,Jc(),Ge=e,Ae=a=In(e.current,null),Oe=t,ke=0,Xt=null,ja=!1,fl=Fe(e,t),Fc=!1,dl=$t=Kc=wr=Da=Ze=0,Ht=So=null,Ic=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var s=31-yt(o),f=1<<s;t|=e[s],o&=~f}return oa=t,mi(),a}function Ip(e,t){Se=null,j.H=mo,t===al||t===Si?(t=cm(),ke=3):t===nc?(t=cm(),ke=4):ke=t===Oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Xt=t,Ae===null&&(Ze=1,Ui(e,ln(t,e.current)))}function Xp(){var e=Kt.current;return e===null?!0:(Oe&4194048)===Oe?cn===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===cn:!1}function $p(){var e=j.H;return j.H=mo,e===null?mo:e}function Zp(){var e=j.A;return j.A=Vw,e}function Ii(){Ze=4,ja||(Oe&4194048)!==Oe&&Kt.current!==null||(fl=!0),(Da&134217727)===0&&(wr&134217727)===0||Ge===null||Ua(Ge,Oe,$t,!1)}function Wc(e,t,a){var o=Ue;Ue|=2;var s=$p(),f=Zp();(Ge!==e||Oe!==t)&&(Fi=null,ml(e,t)),t=!1;var b=Ze;e:do try{if(ke!==0&&Ae!==null){var w=Ae,M=Xt;switch(ke){case 8:Jc(),b=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(t=!0);var U=ke;if(ke=0,Xt=null,pl(e,w,M,U),a&&fl){b=0;break e}break;default:U=ke,ke=0,Xt=null,pl(e,w,M,U)}}Fw(),b=Ze;break}catch(K){Ip(e,K)}while(!0);return t&&e.shellSuspendCounter++,$n=dr=null,Ue=o,j.H=s,j.A=f,Ae===null&&(Ge=null,Oe=0,mi()),b}function Fw(){for(;Ae!==null;)Jp(Ae)}function Kw(e,t){var a=Ue;Ue|=2;var o=$p(),s=Zp();Ge!==e||Oe!==t?(Fi=null,Qi=Et()+500,ml(e,t)):fl=Fe(e,t);e:do try{if(ke!==0&&Ae!==null){t=Ae;var f=Xt;t:switch(ke){case 1:ke=0,Xt=null,pl(e,t,f,1);break;case 2:case 9:if(sm(f)){ke=0,Xt=null,Wp(t);break}t=function(){ke!==2&&ke!==9||Ge!==e||(ke=7),zn(e)},f.then(t,t);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:sm(f)?(ke=0,Xt=null,Wp(t)):(ke=0,Xt=null,pl(e,t,f,7));break;case 5:var b=null;switch(Ae.tag){case 26:b=Ae.memoizedState;case 5:case 27:var w=Ae;if(b?Bg(b):w.stateNode.complete){ke=0,Xt=null;var M=w.sibling;if(M!==null)Ae=M;else{var U=w.return;U!==null?(Ae=U,Xi(U)):Ae=null}break t}}ke=0,Xt=null,pl(e,t,f,5);break;case 6:ke=0,Xt=null,pl(e,t,f,6);break;case 8:Jc(),Ze=6;break e;default:throw Error(i(462))}}Iw();break}catch(K){Ip(e,K)}while(!0);return $n=dr=null,j.H=o,j.A=s,Ue=a,Ae!==null?0:(Ge=null,Oe=0,mi(),Ze)}function Iw(){for(;Ae!==null&&!St();)Jp(Ae)}function Jp(e){var t=Sp(e.alternate,e,oa);e.memoizedProps=e.pendingProps,t===null?Xi(e):Ae=t}function Wp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=gp(a,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=gp(a,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:mc(t);default:Cp(a,t),t=Ae=Zh(t,oa),t=Sp(a,t,oa)}e.memoizedProps=e.pendingProps,t===null?Xi(e):Ae=t}function pl(e,t,a,o){$n=dr=null,mc(t),rl=null,lo=0;var s=t.return;try{if(Uw(e,s,t,a,Oe)){Ze=1,Ui(e,ln(a,e.current)),Ae=null;return}}catch(f){if(s!==null)throw Ae=s,f;Ze=1,Ui(e,ln(a,e.current)),Ae=null;return}t.flags&32768?(je||o===1?e=!0:fl||(Oe&536870912)!==0?e=!1:(ja=e=!0,(o===2||o===9||o===3||o===6)&&(o=Kt.current,o!==null&&o.tag===13&&(o.flags|=16384))),eg(t,e)):Xi(t)}function Xi(e){var t=e;do{if((t.flags&32768)!==0){eg(t,ja);return}e=t.return;var a=Hw(t.alternate,t,oa);if(a!==null){Ae=a;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);Ze===0&&(Ze=5)}function eg(e,t){do{var a=Pw(e.alternate,e);if(a!==null){a.flags&=32767,Ae=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=a}while(e!==null);Ze=6,Ae=null}function tg(e,t,a,o,s,f,b,w,M){e.cancelPendingCommit=null;do $i();while(lt!==0);if((Ue&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=qu,_t(e,a,f,b,w,M),e===Ge&&(Ae=Ge=null,Oe=0),hl=t,La=e,ia=a,Xc=f,$c=s,Yp=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Jw(tr,function(){return og(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=j.T,j.T=null,s=Y.p,Y.p=2,b=Ue,Ue|=4;try{qw(e,t,a)}finally{Ue=b,Y.p=s,j.T=o}}lt=1,ng(),ag(),rg()}}function ng(){if(lt===1){lt=0;var e=La,t=hl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=j.T,j.T=null;var o=Y.p;Y.p=2;var s=Ue;Ue|=4;try{Up(t,e);var f=df,b=Gh(e.containerInfo),w=f.focusedElem,M=f.selectionRange;if(b!==w&&w&&w.ownerDocument&&qh(w.ownerDocument.documentElement,w)){if(M!==null&&Uu(w)){var U=M.start,K=M.end;if(K===void 0&&(K=U),"selectionStart"in w)w.selectionStart=U,w.selectionEnd=Math.min(K,w.value.length);else{var $=w.ownerDocument||document,P=$&&$.defaultView||window;if(P.getSelection){var q=P.getSelection(),oe=w.textContent.length,ye=Math.min(M.start,oe),qe=M.end===void 0?ye:Math.min(M.end,oe);!q.extend&&ye>qe&&(b=qe,qe=ye,ye=b);var z=Ph(w,ye),D=Ph(w,qe);if(z&&D&&(q.rangeCount!==1||q.anchorNode!==z.node||q.anchorOffset!==z.offset||q.focusNode!==D.node||q.focusOffset!==D.offset)){var L=$.createRange();L.setStart(z.node,z.offset),q.removeAllRanges(),ye>qe?(q.addRange(L),q.extend(D.node,D.offset)):(L.setEnd(D.node,D.offset),q.addRange(L))}}}}for($=[],q=w;q=q.parentNode;)q.nodeType===1&&$.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<$.length;w++){var I=$[w];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}ss=!!ff,df=ff=null}finally{Ue=s,Y.p=o,j.T=a}}e.current=t,lt=2}}function ag(){if(lt===2){lt=0;var e=La,t=hl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=j.T,j.T=null;var o=Y.p;Y.p=2;var s=Ue;Ue|=4;try{_p(e,t.alternate,t)}finally{Ue=s,Y.p=o,j.T=a}}lt=3}}function rg(){if(lt===4||lt===3){lt=0,va();var e=La,t=hl,a=ia,o=Yp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?lt=5:(lt=0,hl=La=null,lg(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(za=null),xn(a),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(nr,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=j.T,s=Y.p,Y.p=2,j.T=null;try{for(var f=e.onRecoverableError,b=0;b<o.length;b++){var w=o[b];f(w.value,{componentStack:w.stack})}}finally{j.T=t,Y.p=s}}(ia&3)!==0&&$i(),zn(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===Zc?Eo++:(Eo=0,Zc=e):Eo=0,Co(0)}}function lg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ao(t)))}function $i(){return ng(),ag(),rg(),og()}function og(){if(lt!==5)return!1;var e=La,t=Xc;Xc=0;var a=xn(ia),o=j.T,s=Y.p;try{Y.p=32>a?32:a,j.T=null,a=$c,$c=null;var f=La,b=ia;if(lt=0,hl=La=null,ia=0,(Ue&6)!==0)throw Error(i(331));var w=Ue;if(Ue|=4,qp(f.current),Bp(f,f.current,b,a),Ue=w,Co(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(nr,f)}catch{}return!0}finally{Y.p=s,j.T=o,lg(e,t)}}function ig(e,t,a){t=ln(a,t),t=Mc(e.stateNode,t,2),e=Na(e,t,2),e!==null&&(Xe(e,2),zn(e))}function Be(e,t,a){if(e.tag===3)ig(e,e,a);else for(;t!==null;){if(t.tag===3){ig(t,e,a);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(za===null||!za.has(o))){e=ln(a,e),a=sp(2),o=Na(t,a,2),o!==null&&(up(a,o,t,e),Xe(o,2),zn(o));break}}t=t.return}}function ef(e,t,a){var o=e.pingCache;if(o===null){o=e.pingCache=new Yw;var s=new Set;o.set(t,s)}else s=o.get(t),s===void 0&&(s=new Set,o.set(t,s));s.has(a)||(Fc=!0,s.add(a),e=Xw.bind(null,e,t,a),t.then(e,e))}function Xw(e,t,a){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ge===e&&(Oe&a)===a&&(Ze===4||Ze===3&&(Oe&62914560)===Oe&&300>Et()-Yi?(Ue&2)===0&&ml(e,0):Kc|=a,dl===Oe&&(dl=0)),zn(e)}function sg(e,t){t===0&&(t=bt()),e=ur(e,t),e!==null&&(Xe(e,t),zn(e))}function $w(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),sg(e,a)}function Zw(e,t){var a=0;switch(e.tag){case 31:case 13:var o=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(t),sg(e,a)}function Jw(e,t){return Pl(e,t)}var Zi=null,gl=null,tf=!1,Ji=!1,nf=!1,ka=0;function zn(e){e!==gl&&e.next===null&&(gl===null?Zi=gl=e:gl=gl.next=e),Ji=!0,tf||(tf=!0,eS())}function Co(e,t){if(!nf&&Ji){nf=!0;do for(var a=!1,o=Zi;o!==null;){if(e!==0){var s=o.pendingLanes;if(s===0)var f=0;else{var b=o.suspendedLanes,w=o.pingedLanes;f=(1<<31-yt(42|e)+1)-1,f&=s&~(b&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,dg(o,f))}else f=Oe,f=xe(o,o===Ge?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Fe(o,f)||(a=!0,dg(o,f));o=o.next}while(a);nf=!1}}function Ww(){ug()}function ug(){Ji=tf=!1;var e=0;ka!==0&&cS()&&(e=ka);for(var t=Et(),a=null,o=Zi;o!==null;){var s=o.next,f=cg(o,t);f===0?(o.next=null,a===null?Zi=s:a.next=s,s===null&&(gl=a)):(a=o,(e!==0||(f&3)!==0)&&(Ji=!0)),o=s}lt!==0&<!==5||Co(e),ka!==0&&(ka=0)}function cg(e,t){for(var a=e.suspendedLanes,o=e.pingedLanes,s=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-yt(f),w=1<<b,M=s[b];M===-1?((w&a)===0||(w&o)!==0)&&(s[b]=ut(w,t)):M<=t&&(e.expiredLanes|=w),f&=~w}if(t=Ge,a=Oe,a=xe(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===t&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&ql(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Fe(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(o!==null&&ql(o),xn(a)){case 2:case 8:a=ti;break;case 32:a=tr;break;case 268435456:a=Yn;break;default:a=tr}return o=fg.bind(null,e),a=Pl(a,o),e.callbackPriority=t,e.callbackNode=a,t}return o!==null&&o!==null&&ql(o),e.callbackPriority=2,e.callbackNode=null,2}function fg(e,t){if(lt!==0&<!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if($i()&&e.callbackNode!==a)return null;var o=Oe;return o=xe(e,e===Ge?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Fp(e,o,t),cg(e,Et()),e.callbackNode!=null&&e.callbackNode===a?fg.bind(null,e):null)}function dg(e,t){if($i())return null;Fp(e,t,!0)}function eS(){dS(function(){(Ue&6)!==0?Pl(er,Ww):ug()})}function af(){if(ka===0){var e=tl;e===0&&(e=zr,zr<<=1,(zr&261888)===0&&(zr=256)),ka=e}return ka}function hg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oi(""+e)}function mg(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function tS(e,t,a,o,s){if(t==="submit"&&a&&a.stateNode===s){var f=hg((s[zt]||null).action),b=o.submitter;b&&(t=(t=b[zt]||null)?hg(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var w=new ci("action","action",null,o,s);e.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(ka!==0){var M=b?mg(s,b):new FormData(s);Ec(a,{pending:!0,data:M,method:s.method,action:f},null,M)}}else typeof f=="function"&&(w.preventDefault(),M=b?mg(s,b):new FormData(s),Ec(a,{pending:!0,data:M,method:s.method,action:f},f,M))},currentTarget:s}]})}}for(var rf=0;rf<Pu.length;rf++){var lf=Pu[rf],nS=lf.toLowerCase(),aS=lf[0].toUpperCase()+lf.slice(1);wn(nS,"on"+aS)}wn(Qh,"onAnimationEnd"),wn(Fh,"onAnimationIteration"),wn(Kh,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(bw,"onTransitionRun"),wn(xw,"onTransitionStart"),wn(ww,"onTransitionCancel"),wn(Ih,"onTransitionEnd"),qr("onMouseEnter",["mouseout","mouseover"]),qr("onMouseLeave",["mouseout","mouseover"]),qr("onPointerEnter",["pointerout","pointerover"]),qr("onPointerLeave",["pointerout","pointerover"]),lr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),lr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),lr("onBeforeInput",["compositionend","keypress","textInput","paste"]),lr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),lr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),lr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="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(" "),rS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ro));function pg(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],s=o.event;o=o.listeners;e:{var f=void 0;if(t)for(var b=o.length-1;0<=b;b--){var w=o[b],M=w.instance,U=w.currentTarget;if(w=w.listener,M!==f&&s.isPropagationStopped())break e;f=w,s.currentTarget=U;try{f(s)}catch(K){hi(K)}s.currentTarget=null,f=M}else for(b=0;b<o.length;b++){if(w=o[b],M=w.instance,U=w.currentTarget,w=w.listener,M!==f&&s.isPropagationStopped())break e;f=w,s.currentTarget=U;try{f(s)}catch(K){hi(K)}s.currentTarget=null,f=M}}}}function Ne(e,t){var a=t[yu];a===void 0&&(a=t[yu]=new Set);var o=e+"__bubble";a.has(o)||(gg(t,e,2,!1),a.add(o))}function of(e,t,a){var o=0;t&&(o|=4),gg(a,e,o,t)}var Wi="_reactListening"+Math.random().toString(36).slice(2);function sf(e){if(!e[Wi]){e[Wi]=!0,uh.forEach(function(a){a!=="selectionchange"&&(rS.has(a)||of(a,!1,e),of(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wi]||(t[Wi]=!0,of("selectionchange",!1,t))}}function gg(e,t,a,o){switch(Qg(t)){case 2:var s=jS;break;case 8:s=DS;break;default:s=Ef}a=s.bind(null,t,a,e),s=void 0,!Au||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),o?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function uf(e,t,a,o,s){var f=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var w=o.stateNode.containerInfo;if(w===s)break;if(b===4)for(b=o.return;b!==null;){var M=b.tag;if((M===3||M===4)&&b.stateNode.containerInfo===s)return;b=b.return}for(;w!==null;){if(b=Br(w),b===null)return;if(M=b.tag,M===5||M===6||M===26||M===27){o=f=b;continue e}w=w.parentNode}}o=o.return}wh(function(){var U=f,K=Ru(a),$=[];e:{var P=Xh.get(e);if(P!==void 0){var q=ci,oe=e;switch(e){case"keypress":if(si(a)===0)break e;case"keydown":case"keyup":q=Zx;break;case"focusin":oe="focus",q=_u;break;case"focusout":oe="blur",q=_u;break;case"beforeblur":case"afterblur":q=_u;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Hx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=ew;break;case Qh:case Fh:case Kh:q=Gx;break;case Ih:q=nw;break;case"scroll":case"scrollend":q=kx;break;case"wheel":q=rw;break;case"copy":case"cut":case"paste":q=Yx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Th;break;case"toggle":case"beforetoggle":q=ow}var ye=(t&4)!==0,qe=!ye&&(e==="scroll"||e==="scrollend"),z=ye?P!==null?P+"Capture":null:P;ye=[];for(var D=U,L;D!==null;){var I=D;if(L=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||L===null||z===null||(I=Fl(D,z),I!=null&&ye.push(To(D,I,L))),qe)break;D=D.return}0<ye.length&&(P=new q(P,oe,null,a,K),$.push({event:P,listeners:ye}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",P&&a!==Cu&&(oe=a.relatedTarget||a.fromElement)&&(Br(oe)||oe[kr]))break e;if((q||P)&&(P=K.window===K?K:(P=K.ownerDocument)?P.defaultView||P.parentWindow:window,q?(oe=a.relatedTarget||a.toElement,q=U,oe=oe?Br(oe):null,oe!==null&&(qe=c(oe),ye=oe.tag,oe!==qe||ye!==5&&ye!==27&&ye!==6)&&(oe=null)):(q=null,oe=U),q!==oe)){if(ye=Ch,I="onMouseLeave",z="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Th,I="onPointerLeave",z="onPointerEnter",D="pointer"),qe=q==null?P:Ql(q),L=oe==null?P:Ql(oe),P=new ye(I,D+"leave",q,a,K),P.target=qe,P.relatedTarget=L,I=null,Br(K)===U&&(ye=new ye(z,D+"enter",oe,a,K),ye.target=L,ye.relatedTarget=qe,I=ye),qe=I,q&&oe)t:{for(ye=lS,z=q,D=oe,L=0,I=z;I;I=ye(I))L++;I=0;for(var ge=D;ge;ge=ye(ge))I++;for(;0<L-I;)z=ye(z),L--;for(;0<I-L;)D=ye(D),I--;for(;L--;){if(z===D||D!==null&&z===D.alternate){ye=z;break t}z=ye(z),D=ye(D)}ye=null}else ye=null;q!==null&&vg($,P,q,ye,!1),oe!==null&&qe!==null&&vg($,qe,oe,ye,!0)}}e:{if(P=U?Ql(U):window,q=P.nodeName&&P.nodeName.toLowerCase(),q==="select"||q==="input"&&P.type==="file")var ze=zh;else if(jh(P))if(Lh)ze=gw;else{ze=mw;var ce=hw}else q=P.nodeName,!q||q.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?U&&Eu(U.elementType)&&(ze=zh):ze=pw;if(ze&&(ze=ze(e,U))){Dh($,ze,a,K);break e}ce&&ce(e,P,U),e==="focusout"&&U&&P.type==="number"&&U.memoizedProps.value!=null&&Su(P,"number",P.value)}switch(ce=U?Ql(U):window,e){case"focusin":(jh(ce)||ce.contentEditable==="true")&&(Kr=ce,ku=U,eo=null);break;case"focusout":eo=ku=Kr=null;break;case"mousedown":Bu=!0;break;case"contextmenu":case"mouseup":case"dragend":Bu=!1,Vh($,a,K);break;case"selectionchange":if(yw)break;case"keydown":case"keyup":Vh($,a,K)}var Ce;if(Du)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Fr?Oh(e,a)&&(_e="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_e="onCompositionStart");_e&&(Ah&&a.locale!=="ko"&&(Fr||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Fr&&(Ce=Sh()):(wa=K,Nu="value"in wa?wa.value:wa.textContent,Fr=!0)),ce=es(U,_e),0<ce.length&&(_e=new Rh(_e,e,null,a,K),$.push({event:_e,listeners:ce}),Ce?_e.data=Ce:(Ce=_h(a),Ce!==null&&(_e.data=Ce)))),(Ce=sw?uw(e,a):cw(e,a))&&(_e=es(U,"onBeforeInput"),0<_e.length&&(ce=new Rh("onBeforeInput","beforeinput",null,a,K),$.push({event:ce,listeners:_e}),ce.data=Ce)),tS($,e,U,a,K)}pg($,t)})}function To(e,t,a){return{instance:e,listener:t,currentTarget:a}}function es(e,t){for(var a=t+"Capture",o=[];e!==null;){var s=e,f=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||f===null||(s=Fl(e,a),s!=null&&o.unshift(To(e,s,f)),s=Fl(e,t),s!=null&&o.push(To(e,s,f))),e.tag===3)return o;e=e.return}return[]}function lS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function vg(e,t,a,o,s){for(var f=t._reactName,b=[];a!==null&&a!==o;){var w=a,M=w.alternate,U=w.stateNode;if(w=w.tag,M!==null&&M===o)break;w!==5&&w!==26&&w!==27||U===null||(M=U,s?(U=Fl(a,f),U!=null&&b.unshift(To(a,U,M))):s||(U=Fl(a,f),U!=null&&b.push(To(a,U,M)))),a=a.return}b.length!==0&&e.push({event:t,listeners:b})}var oS=/\r\n?/g,iS=/\u0000|\uFFFD/g;function yg(e){return(typeof e=="string"?e:""+e).replace(oS,`
|
|
10
|
+
`).replace(iS,"")}function bg(e,t){return t=yg(t),yg(e)===t}function Pe(e,t,a,o,s,f){switch(a){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Vr(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Vr(e,""+o);break;case"className":ri(e,"class",o);break;case"tabIndex":ri(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ri(e,a,o);break;case"style":bh(e,o,f);break;case"data":if(t!=="object"){ri(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=oi(""+o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&Pe(e,t,"name",s.name,s,null),Pe(e,t,"formEncType",s.formEncType,s,null),Pe(e,t,"formMethod",s.formMethod,s,null),Pe(e,t,"formTarget",s.formTarget,s,null)):(Pe(e,t,"encType",s.encType,s,null),Pe(e,t,"method",s.method,s,null),Pe(e,t,"target",s.target,s,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=oi(""+o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=Fn);break;case"onScroll":o!=null&&Ne("scroll",e);break;case"onScrollEnd":o!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=oi(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""+o):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),ai(e,"popover",o);break;case"xlinkActuate":Qn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Qn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Qn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Qn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Qn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Qn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ai(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Lx.get(a)||a,ai(e,a,o))}}function cf(e,t,a,o,s,f){switch(a){case"style":bh(e,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof o=="string"?Vr(e,o):(typeof o=="number"||typeof o=="bigint")&&Vr(e,""+o);break;case"onScroll":o!=null&&Ne("scroll",e);break;case"onScrollEnd":o!=null&&Ne("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Fn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ch.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),f=e[zt]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,s),typeof o=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,o,s);break e}a in e?e[a]=o:o===!0?e.setAttribute(a,""):ai(e,a,o)}}}function vt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var o=!1,s=!1,f;for(f in a)if(a.hasOwnProperty(f)){var b=a[f];if(b!=null)switch(f){case"src":o=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Pe(e,t,f,b,a,null)}}s&&Pe(e,t,"srcSet",a.srcSet,a,null),o&&Pe(e,t,"src",a.src,a,null);return;case"input":Ne("invalid",e);var w=f=b=s=null,M=null,U=null;for(o in a)if(a.hasOwnProperty(o)){var K=a[o];if(K!=null)switch(o){case"name":s=K;break;case"type":b=K;break;case"checked":M=K;break;case"defaultChecked":U=K;break;case"value":f=K;break;case"defaultValue":w=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(137,t));break;default:Pe(e,t,o,K,a,null)}}ph(e,f,w,M,U,b,s,!1);return;case"select":Ne("invalid",e),o=b=f=null;for(s in a)if(a.hasOwnProperty(s)&&(w=a[s],w!=null))switch(s){case"value":f=w;break;case"defaultValue":b=w;break;case"multiple":o=w;default:Pe(e,t,s,w,a,null)}t=f,a=b,e.multiple=!!o,t!=null?Gr(e,!!o,t,!1):a!=null&&Gr(e,!!o,a,!0);return;case"textarea":Ne("invalid",e),f=s=o=null;for(b in a)if(a.hasOwnProperty(b)&&(w=a[b],w!=null))switch(b){case"value":o=w;break;case"defaultValue":s=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:Pe(e,t,b,w,a,null)}vh(e,o,s,f);return;case"option":for(M in a)a.hasOwnProperty(M)&&(o=a[M],o!=null)&&(M==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Pe(e,t,M,o,a,null));return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(o=0;o<Ro.length;o++)Ne(Ro[o],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in a)if(a.hasOwnProperty(U)&&(o=a[U],o!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Pe(e,t,U,o,a,null)}return;default:if(Eu(t)){for(K in a)a.hasOwnProperty(K)&&(o=a[K],o!==void 0&&cf(e,t,K,o,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(o=a[w],o!=null&&Pe(e,t,w,o,a,null))}function sS(e,t,a,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,f=null,b=null,w=null,M=null,U=null,K=null;for(q in a){var $=a[q];if(a.hasOwnProperty(q)&&$!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":M=$;default:o.hasOwnProperty(q)||Pe(e,t,q,null,o,$)}}for(var P in o){var q=o[P];if($=a[P],o.hasOwnProperty(P)&&(q!=null||$!=null))switch(P){case"type":f=q;break;case"name":s=q;break;case"checked":U=q;break;case"defaultChecked":K=q;break;case"value":b=q;break;case"defaultValue":w=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(i(137,t));break;default:q!==$&&Pe(e,t,P,q,o,$)}}wu(e,b,w,M,U,K,f,s);return;case"select":q=b=w=P=null;for(f in a)if(M=a[f],a.hasOwnProperty(f)&&M!=null)switch(f){case"value":break;case"multiple":q=M;default:o.hasOwnProperty(f)||Pe(e,t,f,null,o,M)}for(s in o)if(f=o[s],M=a[s],o.hasOwnProperty(s)&&(f!=null||M!=null))switch(s){case"value":P=f;break;case"defaultValue":w=f;break;case"multiple":b=f;default:f!==M&&Pe(e,t,s,f,o,M)}t=w,a=b,o=q,P!=null?Gr(e,!!a,P,!1):!!o!=!!a&&(t!=null?Gr(e,!!a,t,!0):Gr(e,!!a,a?[]:"",!1));return;case"textarea":q=P=null;for(w in a)if(s=a[w],a.hasOwnProperty(w)&&s!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Pe(e,t,w,null,o,s)}for(b in o)if(s=o[b],f=a[b],o.hasOwnProperty(b)&&(s!=null||f!=null))switch(b){case"value":P=s;break;case"defaultValue":q=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(i(91));break;default:s!==f&&Pe(e,t,b,s,o,f)}gh(e,P,q);return;case"option":for(var oe in a)P=a[oe],a.hasOwnProperty(oe)&&P!=null&&!o.hasOwnProperty(oe)&&(oe==="selected"?e.selected=!1:Pe(e,t,oe,null,o,P));for(M in o)P=o[M],q=a[M],o.hasOwnProperty(M)&&P!==q&&(P!=null||q!=null)&&(M==="selected"?e.selected=P&&typeof P!="function"&&typeof P!="symbol":Pe(e,t,M,P,o,q));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 ye in a)P=a[ye],a.hasOwnProperty(ye)&&P!=null&&!o.hasOwnProperty(ye)&&Pe(e,t,ye,null,o,P);for(U in o)if(P=o[U],q=a[U],o.hasOwnProperty(U)&&P!==q&&(P!=null||q!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(137,t));break;default:Pe(e,t,U,P,o,q)}return;default:if(Eu(t)){for(var qe in a)P=a[qe],a.hasOwnProperty(qe)&&P!==void 0&&!o.hasOwnProperty(qe)&&cf(e,t,qe,void 0,o,P);for(K in o)P=o[K],q=a[K],!o.hasOwnProperty(K)||P===q||P===void 0&&q===void 0||cf(e,t,K,P,o,q);return}}for(var z in a)P=a[z],a.hasOwnProperty(z)&&P!=null&&!o.hasOwnProperty(z)&&Pe(e,t,z,null,o,P);for($ in o)P=o[$],q=a[$],!o.hasOwnProperty($)||P===q||P==null&&q==null||Pe(e,t,$,P,o,q)}function xg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var s=a[o],f=s.transferSize,b=s.initiatorType,w=s.duration;if(f&&w&&xg(b)){for(b=0,w=s.responseEnd,o+=1;o<a.length;o++){var M=a[o],U=M.startTime;if(U>w)break;var K=M.transferSize,$=M.initiatorType;K&&xg($)&&(M=M.responseEnd,b+=K*(M<w?1:(w-U)/(M-U)))}if(--o,t+=8*(f+b)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ff=null,df=null;function ts(e){return e.nodeType===9?e:e.ownerDocument}function wg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Sg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function hf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mf=null;function cS(){var e=window.event;return e&&e.type==="popstate"?e===mf?!1:(mf=e,!0):(mf=null,!1)}var Eg=typeof setTimeout=="function"?setTimeout:void 0,fS=typeof clearTimeout=="function"?clearTimeout:void 0,Cg=typeof Promise=="function"?Promise:void 0,dS=typeof queueMicrotask=="function"?queueMicrotask:typeof Cg<"u"?function(e){return Cg.resolve(null).then(e).catch(hS)}:Eg;function hS(e){setTimeout(function(){throw e})}function Ba(e){return e==="head"}function Rg(e,t){var a=t,o=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(o===0){e.removeChild(s),xl(t);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")Ao(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ao(a);for(var f=a.firstChild;f;){var b=f.nextSibling,w=f.nodeName;f[Yl]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=b}}else a==="body"&&Ao(e.ownerDocument.body);a=s}while(a);xl(t)}function Tg(e,t){var a=e;e=0;do{var o=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=o}while(a)}function pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":pf(a),bu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function mS(e,t,a,o){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Yl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=fn(e.nextSibling),e===null)break}return null}function pS(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=fn(e.nextSibling),e===null))return null;return e}function Ag(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=fn(e.nextSibling),e===null))return null;return e}function gf(e){return e.data==="$?"||e.data==="$~"}function vf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function gS(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var o=function(){t(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function fn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var yf=null;function Ng(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return fn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Mg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Og(e,t,a){switch(t=ts(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ao(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bu(e)}var dn=new Map,_g=new Set;function ns(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var sa=Y.d;Y.d={f:vS,r:yS,D:bS,C:xS,L:wS,m:SS,X:CS,S:ES,M:RS};function vS(){var e=sa.f(),t=Ki();return e||t}function yS(e){var t=Hr(e);t!==null&&t.tag===5&&t.type==="form"?Im(t):sa.r(e)}var vl=typeof document>"u"?null:document;function jg(e,t,a){var o=vl;if(o&&typeof t=="string"&&t){var s=an(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),_g.has(s)||(_g.add(s),e={rel:e,crossOrigin:a,href:t},o.querySelector(s)===null&&(t=o.createElement("link"),vt(t,"link",e),ct(t),o.head.appendChild(t)))}}function bS(e){sa.D(e),jg("dns-prefetch",e,null)}function xS(e,t){sa.C(e,t),jg("preconnect",e,t)}function wS(e,t,a){sa.L(e,t,a);var o=vl;if(o&&e&&t){var s='link[rel="preload"][as="'+an(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+an(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+an(a.imageSizes)+'"]')):s+='[href="'+an(e)+'"]';var f=s;switch(t){case"style":f=yl(e);break;case"script":f=bl(e)}dn.has(f)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),dn.set(f,e),o.querySelector(s)!==null||t==="style"&&o.querySelector(No(f))||t==="script"&&o.querySelector(Mo(f))||(t=o.createElement("link"),vt(t,"link",e),ct(t),o.head.appendChild(t)))}}function SS(e,t){sa.m(e,t);var a=vl;if(a&&e){var o=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+an(o)+'"][href="'+an(e)+'"]',f=s;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=bl(e)}if(!dn.has(f)&&(e=p({rel:"modulepreload",href:e},t),dn.set(f,e),a.querySelector(s)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Mo(f)))return}o=a.createElement("link"),vt(o,"link",e),ct(o),a.head.appendChild(o)}}}function ES(e,t,a){sa.S(e,t,a);var o=vl;if(o&&e){var s=Pr(o).hoistableStyles,f=yl(e);t=t||"default";var b=s.get(f);if(!b){var w={loading:0,preload:null};if(b=o.querySelector(No(f)))w.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=dn.get(f))&&bf(e,a);var M=b=o.createElement("link");ct(M),vt(M,"link",e),M._p=new Promise(function(U,K){M.onload=U,M.onerror=K}),M.addEventListener("load",function(){w.loading|=1}),M.addEventListener("error",function(){w.loading|=2}),w.loading|=4,as(b,t,o)}b={type:"stylesheet",instance:b,count:1,state:w},s.set(f,b)}}}function CS(e,t){sa.X(e,t);var a=vl;if(a&&e){var o=Pr(a).hoistableScripts,s=bl(e),f=o.get(s);f||(f=a.querySelector(Mo(s)),f||(e=p({src:e,async:!0},t),(t=dn.get(s))&&xf(e,t),f=a.createElement("script"),ct(f),vt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(s,f))}}function RS(e,t){sa.M(e,t);var a=vl;if(a&&e){var o=Pr(a).hoistableScripts,s=bl(e),f=o.get(s);f||(f=a.querySelector(Mo(s)),f||(e=p({src:e,async:!0,type:"module"},t),(t=dn.get(s))&&xf(e,t),f=a.createElement("script"),ct(f),vt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(s,f))}}function Dg(e,t,a,o){var s=(s=le.current)?ns(s):null;if(!s)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=yl(a.href),a=Pr(s).hoistableStyles,o=a.get(t),o||(o={type:"style",instance:null,count:0,state:null},a.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=yl(a.href);var f=Pr(s).hoistableStyles,b=f.get(e);if(b||(s=s.ownerDocument||s,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=s.querySelector(No(e)))&&!f._p&&(b.instance=f,b.state.loading=5),dn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},dn.set(e,a),f||TS(s,e,a,b.state))),t&&o===null)throw Error(i(528,""));return b}if(t&&o!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=bl(a),a=Pr(s).hoistableScripts,o=a.get(t),o||(o={type:"script",instance:null,count:0,state:null},a.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function yl(e){return'href="'+an(e)+'"'}function No(e){return'link[rel="stylesheet"]['+e+"]"}function zg(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function TS(e,t,a,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),vt(t,"link",a),ct(t),e.head.appendChild(t))}function bl(e){return'[src="'+an(e)+'"]'}function Mo(e){return"script[async]"+e}function Lg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+an(a.href)+'"]');if(o)return t.instance=o,ct(o),o;var s=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),ct(o),vt(o,"style",s),as(o,a.precedence,e),t.instance=o;case"stylesheet":s=yl(a.href);var f=e.querySelector(No(s));if(f)return t.state.loading|=4,t.instance=f,ct(f),f;o=zg(a),(s=dn.get(s))&&bf(o,s),f=(e.ownerDocument||e).createElement("link"),ct(f);var b=f;return b._p=new Promise(function(w,M){b.onload=w,b.onerror=M}),vt(f,"link",o),t.state.loading|=4,as(f,a.precedence,e),t.instance=f;case"script":return f=bl(a.src),(s=e.querySelector(Mo(f)))?(t.instance=s,ct(s),s):(o=a,(s=dn.get(f))&&(o=p({},a),xf(o,s)),e=e.ownerDocument||e,s=e.createElement("script"),ct(s),vt(s,"link",o),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,as(o,a.precedence,e));return t.instance}function as(e,t,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=o.length?o[o.length-1]:null,f=s,b=0;b<o.length;b++){var w=o[b];if(w.dataset.precedence===t)f=w;else if(f!==s)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function bf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var rs=null;function Ug(e,t,a){if(rs===null){var o=new Map,s=rs=new Map;s.set(a,o)}else s=rs,o=s.get(a),o||(o=new Map,s.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var f=a[s];if(!(f[Yl]||f[ht]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var w=o.get(b);w?w.push(f):o.set(b,[f])}}return o}function kg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function AS(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Bg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function NS(e,t,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=yl(o.href),f=t.querySelector(No(s));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ls.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,ct(f);return}f=t.ownerDocument||t,o=zg(o),(s=dn.get(s))&&bf(o,s),f=f.createElement("link"),ct(f);var b=f;b._p=new Promise(function(w,M){b.onload=w,b.onerror=M}),vt(f,"link",o),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ls.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var wf=0;function MS(e,t){return e.stylesheets&&e.count===0&&is(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var o=setTimeout(function(){if(e.stylesheets&&is(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&wf===0&&(wf=62500*uS());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&is(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>wf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(s)}}:null}function ls(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)is(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var os=null;function is(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,os=new Map,t.forEach(OS,e),os=null,ls.call(e))}function OS(e,t){if(!(t.state.loading&4)){var a=os.get(e);if(a)var o=a.get(null);else{a=new Map,os.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<s.length;f++){var b=s[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),o=b)}o&&a.set(null,o)}s=t.instance,b=s.getAttribute("data-precedence"),f=a.get(b)||o,f===o&&a.set(null,s),a.set(b,s),this.count++,o=ls.bind(this),s.addEventListener("load",o),s.addEventListener("error",o),f?f.parentNode.insertBefore(s,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Oo={$$typeof:_,Provider:null,Consumer:null,_currentValue:k,_currentValue2:k,_threadCount:0};function _S(e,t,a,o,s,f,b,w,M){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ba(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ba(0),this.hiddenUpdates=ba(null),this.identifierPrefix=o,this.onUncaughtError=s,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Hg(e,t,a,o,s,f,b,w,M,U,K,$){return e=new _S(e,t,a,b,M,U,K,$,w),t=1,f===!0&&(t|=24),f=Ft(3,null,null,t),e.current=f,f.stateNode=e,t=Wu(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:o,isDehydrated:a,cache:t},ac(f),e}function Pg(e){return e?(e=$r,e):$r}function qg(e,t,a,o,s,f){s=Pg(s),o.context===null?o.context=s:o.pendingContext=s,o=Aa(t),o.payload={element:a},f=f===void 0?null:f,f!==null&&(o.callback=f),a=Na(e,o,t),a!==null&&(Pt(a,e,t),io(a,e,t))}function Gg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Sf(e,t){Gg(e,t),(e=e.alternate)&&Gg(e,t)}function Vg(e){if(e.tag===13||e.tag===31){var t=ur(e,67108864);t!==null&&Pt(t,e,67108864),Sf(e,67108864)}}function Yg(e){if(e.tag===13||e.tag===31){var t=Zt();t=Ur(t);var a=ur(e,t);a!==null&&Pt(a,e,t),Sf(e,t)}}var ss=!0;function jS(e,t,a,o){var s=j.T;j.T=null;var f=Y.p;try{Y.p=2,Ef(e,t,a,o)}finally{Y.p=f,j.T=s}}function DS(e,t,a,o){var s=j.T;j.T=null;var f=Y.p;try{Y.p=8,Ef(e,t,a,o)}finally{Y.p=f,j.T=s}}function Ef(e,t,a,o){if(ss){var s=Cf(o);if(s===null)uf(e,t,o,us,a),Fg(e,o);else if(LS(s,e,t,a,o))o.stopPropagation();else if(Fg(e,o),t&4&&-1<zS.indexOf(e)){for(;s!==null;){var f=Hr(s);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=On(f.pendingLanes);if(b!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;b;){var M=1<<31-yt(b);w.entanglements[1]|=M,b&=~M}zn(f),(Ue&6)===0&&(Qi=Et()+500,Co(0))}}break;case 31:case 13:w=ur(f,2),w!==null&&Pt(w,f,2),Ki(),Sf(f,2)}if(f=Cf(o),f===null&&uf(e,t,o,us,a),f===s)break;s=f}s!==null&&o.stopPropagation()}else uf(e,t,o,null,a)}}function Cf(e){return e=Ru(e),Rf(e)}var us=null;function Rf(e){if(us=null,e=Br(e),e!==null){var t=c(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=h(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return us=e,null}function Qg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(pu()){case er:return 2;case ti:return 8;case tr:case Gl:return 32;case Yn:return 268435456;default:return 32}default:return 32}}var Tf=!1,Ha=null,Pa=null,qa=null,_o=new Map,jo=new Map,Ga=[],zS="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 Fg(e,t){switch(e){case"focusin":case"focusout":Ha=null;break;case"dragenter":case"dragleave":Pa=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":_o.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jo.delete(t.pointerId)}}function Do(e,t,a,o,s,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:o,nativeEvent:f,targetContainers:[s]},t!==null&&(t=Hr(t),t!==null&&Vg(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function LS(e,t,a,o,s){switch(t){case"focusin":return Ha=Do(Ha,e,t,a,o,s),!0;case"dragenter":return Pa=Do(Pa,e,t,a,o,s),!0;case"mouseover":return qa=Do(qa,e,t,a,o,s),!0;case"pointerover":var f=s.pointerId;return _o.set(f,Do(_o.get(f)||null,e,t,a,o,s)),!0;case"gotpointercapture":return f=s.pointerId,jo.set(f,Do(jo.get(f)||null,e,t,a,o,s)),!0}return!1}function Kg(e){var t=Br(e.target);if(t!==null){var a=c(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,ih(e.priority,function(){Yg(a)});return}}else if(t===31){if(t=h(a),t!==null){e.blockedOn=t,ih(e.priority,function(){Yg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Cf(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);Cu=o,a.target.dispatchEvent(o),Cu=null}else return t=Hr(a),t!==null&&Vg(t),e.blockedOn=a,!1;t.shift()}return!0}function Ig(e,t,a){cs(e)&&a.delete(t)}function US(){Tf=!1,Ha!==null&&cs(Ha)&&(Ha=null),Pa!==null&&cs(Pa)&&(Pa=null),qa!==null&&cs(qa)&&(qa=null),_o.forEach(Ig),jo.forEach(Ig)}function fs(e,t){e.blockedOn===t&&(e.blockedOn=null,Tf||(Tf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,US)))}var ds=null;function Xg(e){ds!==e&&(ds=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ds===e&&(ds=null);for(var t=0;t<e.length;t+=3){var a=e[t],o=e[t+1],s=e[t+2];if(typeof o!="function"){if(Rf(o||a)===null)continue;break}var f=Hr(a);f!==null&&(e.splice(t,3),t-=3,Ec(f,{pending:!0,data:s,method:a.method,action:o},o,s))}}))}function xl(e){function t(M){return fs(M,e)}Ha!==null&&fs(Ha,e),Pa!==null&&fs(Pa,e),qa!==null&&fs(qa,e),_o.forEach(t),jo.forEach(t);for(var a=0;a<Ga.length;a++){var o=Ga[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ga.length&&(a=Ga[0],a.blockedOn===null);)Kg(a),a.blockedOn===null&&Ga.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var s=a[o],f=a[o+1],b=s[zt]||null;if(typeof f=="function")b||Xg(a);else if(b){var w=null;if(f&&f.hasAttribute("formAction")){if(s=f,b=f[zt]||null)w=b.formAction;else if(Rf(s)!==null)continue}else w=b.action;typeof w=="function"?a[o+1]=w:(a.splice(o,3),o-=3),Xg(a)}}}function $g(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return s=b})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Af(e){this._internalRoot=e}hs.prototype.render=Af.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,o=Zt();qg(a,o,e,t,null,null)},hs.prototype.unmount=Af.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qg(e.current,2,null,e,null,null),Ki(),t[kr]=null}};function hs(e){this._internalRoot=e}hs.prototype.unstable_scheduleHydration=function(e){if(e){var t=vu();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ga.length&&t!==0&&t<Ga[a].priority;a++);Ga.splice(a,0,e),a===0&&Kg(e)}};var Zg=r.version;if(Zg!=="19.2.3")throw Error(i(527,Zg,"19.2.3"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=m(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var kS={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ms=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ms.isDisabled&&ms.supportsFiber)try{nr=ms.inject(kS),Ct=ms}catch{}}return Lo.createRoot=function(e,t){if(!u(e))throw Error(i(299));var a=!1,o="",s=rp,f=lp,b=op;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=Hg(e,1,!1,null,null,a,o,null,s,f,b,$g),e[kr]=t.current,sf(e),new Af(t)},Lo.hydrateRoot=function(e,t,a){if(!u(e))throw Error(i(299));var o=!1,s="",f=rp,b=lp,w=op,M=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(M=a.formState)),t=Hg(e,1,!0,t,a??null,o,s,M,f,b,w,$g),t.context=Pg(null),a=t.current,o=Zt(),o=Ur(o),s=Aa(o),s.callback=null,Na(a,s,o),a=o,t.current.lanes=a,Xe(t,a),zn(t),e[kr]=t.current,sf(e),new hs(t)},Lo.version="19.2.3",Lo}var sv;function XS(){if(sv)return Of.exports;sv=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(r){console.error(r)}}return n(),Of.exports=IS(),Of.exports}var $S=XS(),Nl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ZS={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},JS=class{#e=ZS;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,r){return this.#e.setTimeout(n,r)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,r){return this.#e.setInterval(n,r)}clearInterval(n){this.#e.clearInterval(n)}},Er=new JS;function WS(n){setTimeout(n,0)}var Rr=typeof window>"u"||"Deno"in globalThis;function At(){}function e1(n,r){return typeof n=="function"?n(r):n}function Zf(n){return typeof n=="number"&&n>=0&&n!==1/0}function py(n,r){return Math.max(n+(r||0)-Date.now(),0)}function Fa(n,r){return typeof n=="function"?n(r):n}function hn(n,r){return typeof n=="function"?n(r):n}function uv(n,r){const{type:l="all",exact:i,fetchStatus:u,predicate:c,queryKey:d,stale:h}=n;if(d){if(i){if(r.queryHash!==Ed(d,r.options))return!1}else if(!Po(r.queryKey,d))return!1}if(l!=="all"){const v=r.isActive();if(l==="active"&&!v||l==="inactive"&&v)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||u&&u!==r.state.fetchStatus||c&&!c(r))}function cv(n,r){const{exact:l,status:i,predicate:u,mutationKey:c}=n;if(c){if(!r.options.mutationKey)return!1;if(l){if(Tr(r.options.mutationKey)!==Tr(c))return!1}else if(!Po(r.options.mutationKey,c))return!1}return!(i&&r.state.status!==i||u&&!u(r))}function Ed(n,r){return(r?.queryKeyHashFn||Tr)(n)}function Tr(n){return JSON.stringify(n,(r,l)=>Jf(l)?Object.keys(l).sort().reduce((i,u)=>(i[u]=l[u],i),{}):l)}function Po(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(l=>Po(n[l],r[l])):!1}var t1=Object.prototype.hasOwnProperty;function gy(n,r){if(n===r)return n;const l=fv(n)&&fv(r);if(!l&&!(Jf(n)&&Jf(r)))return r;const u=(l?n:Object.keys(n)).length,c=l?r:Object.keys(r),d=c.length,h=l?new Array(d):{};let v=0;for(let m=0;m<d;m++){const x=l?m:c[m],p=n[x],S=r[x];if(p===S){h[x]=p,(l?m<u:t1.call(n,x))&&v++;continue}if(p===null||S===null||typeof p!="object"||typeof S!="object"){h[x]=S;continue}const R=gy(p,S);h[x]=R,R===p&&v++}return u===d&&v===u?n:h}function js(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const l in n)if(n[l]!==r[l])return!1;return!0}function fv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Jf(n){if(!dv(n))return!1;const r=n.constructor;if(r===void 0)return!0;const l=r.prototype;return!(!dv(l)||!l.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function dv(n){return Object.prototype.toString.call(n)==="[object Object]"}function n1(n){return new Promise(r=>{Er.setTimeout(r,n)})}function Wf(n,r,l){return typeof l.structuralSharing=="function"?l.structuralSharing(n,r):l.structuralSharing!==!1?gy(n,r):r}function cj(n){return n}function a1(n,r,l=0){const i=[...n,r];return l&&i.length>l?i.slice(1):i}function r1(n,r,l=0){const i=[r,...n];return l&&i.length>l?i.slice(0,-1):i}var Cd=Symbol();function vy(n,r){return!n.queryFn&&r?.initialPromise?()=>r.initialPromise:!n.queryFn||n.queryFn===Cd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function yy(n,r){return typeof n=="function"?n(...r):!!n}function l1(n,r,l){let i=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??=r(),i||(i=!0,u.aborted?l():u.addEventListener("abort",l,{once:!0})),u)}),n}var o1=class extends Nl{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Rr&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(r=>{r(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Rd=new o1;function ed(){let n,r;const l=new Promise((u,c)=>{n=u,r=c});l.status="pending",l.catch(()=>{});function i(u){Object.assign(l,u),delete l.resolve,delete l.reject}return l.resolve=u=>{i({status:"fulfilled",value:u}),n(u)},l.reject=u=>{i({status:"rejected",reason:u}),r(u)},l}var i1=WS;function s1(){let n=[],r=0,l=h=>{h()},i=h=>{h()},u=i1;const c=h=>{r?n.push(h):u(()=>{l(h)})},d=()=>{const h=n;n=[],h.length&&u(()=>{i(()=>{h.forEach(v=>{l(v)})})})};return{batch:h=>{let v;r++;try{v=h()}finally{r--,r||d()}return v},batchCalls:h=>(...v)=>{c(()=>{h(...v)})},schedule:c,setNotifyFunction:h=>{l=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{u=h}}}var it=s1(),u1=class extends Nl{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Rr&&window.addEventListener){const r=()=>n(!0),l=()=>n(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",l,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",l)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(l=>{l(n)}))}isOnline(){return this.#e}},Ds=new u1;function c1(n){return Math.min(1e3*2**n,3e4)}function by(n){return(n??"online")==="online"?Ds.isOnline():!0}var td=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function xy(n){let r=!1,l=0,i;const u=ed(),c=()=>u.status!=="pending",d=E=>{if(!c()){const T=new td(E);S(T),n.onCancel?.(T)}},h=()=>{r=!0},v=()=>{r=!1},m=()=>Rd.isFocused()&&(n.networkMode==="always"||Ds.isOnline())&&n.canRun(),x=()=>by(n.networkMode)&&n.canRun(),p=E=>{c()||(i?.(),u.resolve(E))},S=E=>{c()||(i?.(),u.reject(E))},R=()=>new Promise(E=>{i=T=>{(c()||m())&&E(T)},n.onPause?.()}).then(()=>{i=void 0,c()||n.onContinue?.()}),C=()=>{if(c())return;let E;const T=l===0?n.initialPromise:void 0;try{E=T??n.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(p).catch(A=>{if(c())return;const N=n.retry??(Rr?0:3),_=n.retryDelay??c1,H=typeof _=="function"?_(l,A):_,V=N===!0||typeof N=="number"&&l<N||typeof N=="function"&&N(l,A);if(r||!V){S(A);return}l++,n.onFail?.(l,A),n1(H).then(()=>m()?void 0:R()).then(()=>{r?S(A):C()})})};return{promise:u,status:()=>u.status,cancel:d,continue:()=>(i?.(),u),cancelRetry:h,continueRetry:v,canStart:x,start:()=>(x()?C():R().then(C),u)}}var wy=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zf(this.gcTime)&&(this.#e=Er.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Rr?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Er.clearTimeout(this.#e),this.#e=void 0)}},f1=class extends wy{#e;#t;#n;#r;#a;#o;#i;constructor(n){super(),this.#i=!1,this.#o=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#r=n.client,this.#n=this.#r.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=mv(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(n){if(this.options={...this.#o,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=mv(this.options);r.data!==void 0&&(this.setState(hv(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,r){const l=Wf(this.state.data,n,this.options);return this.#l({data:l,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),l}setState(n,r){this.#l({type:"setState",state:n,setStateOptions:r})}cancel(n){const r=this.#a?.promise;return this.#a?.cancel(n),r?r.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>hn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Cd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Fa(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!py(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(r=>r!==n),this.observers.length||(this.#a&&(this.#i?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(n,r){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(n&&this.setOptions(n),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}const l=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#i=!0,l.signal)})},u=()=>{const h=vy(this.options,r),m=(()=>{const x={client:this.#r,queryKey:this.queryKey,meta:this.meta};return i(x),x})();return this.#i=!1,this.options.persister?this.options.persister(h,m,this):h(m)},d=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:u};return i(h),h})();this.options.behavior?.onFetch(d,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta}),this.#a=xy({initialPromise:r?.initialPromise,fn:d.fetchFn,onCancel:h=>{h instanceof td&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),l.abort()},onFail:(h,v)=>{this.#l({type:"failed",failureCount:h,error:v})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const h=await this.#a.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof td){if(h.silent)return this.#a.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#l({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#l(n){const r=l=>{switch(n.type){case"failed":return{...l,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...l,fetchStatus:"paused"};case"continue":return{...l,fetchStatus:"fetching"};case"fetch":return{...l,...Sy(l.data,this.options),fetchMeta:n.meta??null};case"success":const i={...l,...hv(n.data,n.dataUpdatedAt),dataUpdateCount:l.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?i:void 0,i;case"error":const u=n.error;return{...l,error:u,errorUpdateCount:l.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:l.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...l,isInvalidated:!0};case"setState":return{...l,...n.state}}};this.state=r(this.state),it.batch(()=>{this.observers.forEach(l=>{l.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function Sy(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:by(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function hv(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mv(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,l=r!==void 0,i=l?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:l?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:l?"success":"pending",fetchStatus:"idle"}}var d1=class extends Nl{constructor(n,r){super(),this.options=r,this.#e=n,this.#l=null,this.#i=ed(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#o;#i;#l;#p;#d;#h;#u;#c;#s;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),pv(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(n){const r=this.options,l=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),r._defaulted&&!js(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&gv(this.#t,l,this.options,r)&&this.#f(),this.updateResult(),i&&(this.#t!==l||hn(this.options.enabled,this.#t)!==hn(r.enabled,this.#t)||Fa(this.options.staleTime,this.#t)!==Fa(r.staleTime,this.#t))&&this.#g();const u=this.#v();i&&(this.#t!==l||hn(this.options.enabled,this.#t)!==hn(r.enabled,this.#t)||u!==this.#s)&&this.#y(u)}getOptimisticResult(n){const r=this.#e.getQueryCache().build(this.#e,n),l=this.createResult(r,n);return m1(this,l)&&(this.#r=l,this.#o=this.options,this.#a=this.#t.state),l}getCurrentResult(){return this.#r}trackResult(n,r){return new Proxy(n,{get:(l,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(l,i))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const r=this.#e.defaultQueryOptions(n),l=this.#e.getQueryCache().build(this.#e,r);return l.fetch().then(()=>this.createResult(l,r))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(n){this.#S();let r=this.#t.fetch(this.options,n);return n?.throwOnError||(r=r.catch(At)),r}#g(){this.#x();const n=Fa(this.options.staleTime,this.#t);if(Rr||this.#r.isStale||!Zf(n))return;const l=py(this.#r.dataUpdatedAt,n)+1;this.#u=Er.setTimeout(()=>{this.#r.isStale||this.updateResult()},l)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(n){this.#w(),this.#s=n,!(Rr||hn(this.options.enabled,this.#t)===!1||!Zf(this.#s)||this.#s===0)&&(this.#c=Er.setInterval(()=>{(this.options.refetchIntervalInBackground||Rd.isFocused())&&this.#f()},this.#s))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#u&&(Er.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(Er.clearInterval(this.#c),this.#c=void 0)}createResult(n,r){const l=this.#t,i=this.options,u=this.#r,c=this.#a,d=this.#o,v=n!==l?n.state:this.#n,{state:m}=n;let x={...m},p=!1,S;if(r._optimisticResults){const G=this.hasListeners(),ne=!G&&pv(n,r),re=G&&gv(n,l,r,i);(ne||re)&&(x={...x,...Sy(m.data,n.options)}),r._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:R,errorUpdatedAt:C,status:E}=x;S=x.data;let T=!1;if(r.placeholderData!==void 0&&S===void 0&&E==="pending"){let G;u?.isPlaceholderData&&r.placeholderData===d?.placeholderData?(G=u.data,T=!0):G=typeof r.placeholderData=="function"?r.placeholderData(this.#h?.state.data,this.#h):r.placeholderData,G!==void 0&&(E="success",S=Wf(u?.data,G,r),p=!0)}if(r.select&&S!==void 0&&!T)if(u&&S===c?.data&&r.select===this.#p)S=this.#d;else try{this.#p=r.select,S=r.select(S),S=Wf(u?.data,S,r),this.#d=S,this.#l=null}catch(G){this.#l=G}this.#l&&(R=this.#l,S=this.#d,C=Date.now(),E="error");const A=x.fetchStatus==="fetching",N=E==="pending",_=E==="error",H=N&&A,V=S!==void 0,B={status:E,fetchStatus:x.fetchStatus,isPending:N,isSuccess:E==="success",isError:_,isInitialLoading:H,isLoading:H,data:S,dataUpdatedAt:x.dataUpdatedAt,error:R,errorUpdatedAt:C,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>v.dataUpdateCount||x.errorUpdateCount>v.errorUpdateCount,isFetching:A,isRefetching:A&&!N,isLoadingError:_&&!V,isPaused:x.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:_&&V,isStale:Td(n,r),refetch:this.refetch,promise:this.#i,isEnabled:hn(r.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const G=de=>{B.status==="error"?de.reject(B.error):B.data!==void 0&&de.resolve(B.data)},ne=()=>{const de=this.#i=B.promise=ed();G(de)},re=this.#i;switch(re.status){case"pending":n.queryHash===l.queryHash&&G(re);break;case"fulfilled":(B.status==="error"||B.data!==re.value)&&ne();break;case"rejected":(B.status!=="error"||B.error!==re.reason)&&ne();break}}return B}updateResult(){const n=this.#r,r=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),js(r,n))return;this.#r=r;const l=()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,u=typeof i=="function"?i():i;if(u==="all"||!u&&!this.#m.size)return!0;const c=new Set(u??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(d=>{const h=d;return this.#r[h]!==n[h]&&c.has(h)})};this.#E({listeners:l()})}#S(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const r=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(r?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(n){it.batch(()=>{n.listeners&&this.listeners.forEach(r=>{r(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function h1(n,r){return hn(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&r.retryOnMount===!1)}function pv(n,r){return h1(n,r)||n.state.data!==void 0&&nd(n,r,r.refetchOnMount)}function nd(n,r,l){if(hn(r.enabled,n)!==!1&&Fa(r.staleTime,n)!=="static"){const i=typeof l=="function"?l(n):l;return i==="always"||i!==!1&&Td(n,r)}return!1}function gv(n,r,l,i){return(n!==r||hn(i.enabled,n)===!1)&&(!l.suspense||n.state.status!=="error")&&Td(n,l)}function Td(n,r){return hn(r.enabled,n)!==!1&&n.isStaleByTime(Fa(r.staleTime,n))}function m1(n,r){return!js(n.getCurrentResult(),r)}function vv(n){return{onFetch:(r,l)=>{const i=r.options,u=r.fetchOptions?.meta?.fetchMore?.direction,c=r.state.data?.pages||[],d=r.state.data?.pageParams||[];let h={pages:[],pageParams:[]},v=0;const m=async()=>{let x=!1;const p=C=>{l1(C,()=>r.signal,()=>x=!0)},S=vy(r.options,r.fetchOptions),R=async(C,E,T)=>{if(x)return Promise.reject();if(E==null&&C.pages.length)return Promise.resolve(C);const N=(()=>{const W={client:r.client,queryKey:r.queryKey,pageParam:E,direction:T?"backward":"forward",meta:r.options.meta};return p(W),W})(),_=await S(N),{maxPages:H}=r.options,V=T?r1:a1;return{pages:V(C.pages,_,H),pageParams:V(C.pageParams,E,H)}};if(u&&c.length){const C=u==="backward",E=C?p1:yv,T={pages:c,pageParams:d},A=E(i,T);h=await R(T,A,C)}else{const C=n??c.length;do{const E=v===0?d[0]??i.initialPageParam:yv(i,h);if(v>0&&E==null)break;h=await R(h,E),v++}while(v<C)}return h};r.options.persister?r.fetchFn=()=>r.options.persister?.(m,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},l):r.fetchFn=m}}}function yv(n,{pages:r,pageParams:l}){const i=r.length-1;return r.length>0?n.getNextPageParam(r[i],r,l[i],l):void 0}function p1(n,{pages:r,pageParams:l}){return r.length>0?n.getPreviousPageParam?.(r[0],r,l[0],l):void 0}var g1=class extends wy{#e;#t;#n;#r;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||Ey(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(r=>r!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(n){const r=()=>{this.#a({type:"continue"})},l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=xy({fn:()=>this.options.mutationFn?this.options.mutationFn(n,l):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#a({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",u=!this.#r.canStart();try{if(i)r();else{this.#a({type:"pending",variables:n,isPaused:u}),await this.#n.config.onMutate?.(n,this,l);const d=await this.options.onMutate?.(n,l);d!==this.state.context&&this.#a({type:"pending",context:d,variables:n,isPaused:u})}const c=await this.#r.start();return await this.#n.config.onSuccess?.(c,n,this.state.context,this,l),await this.options.onSuccess?.(c,n,this.state.context,l),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,l),await this.options.onSettled?.(c,null,n,this.state.context,l),this.#a({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,n,this.state.context,this,l)}catch(d){Promise.reject(d)}try{await this.options.onError?.(c,n,this.state.context,l)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,l)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,c,n,this.state.context,l)}catch(d){Promise.reject(d)}throw this.#a({type:"error",error:c}),c}finally{this.#n.runNext(this)}}#a(n){const r=l=>{switch(n.type){case"failed":return{...l,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...l,isPaused:!0};case"continue":return{...l,isPaused:!1};case"pending":return{...l,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...l,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...l,data:void 0,error:n.error,failureCount:l.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=r(this.state),it.batch(()=>{this.#t.forEach(l=>{l.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function Ey(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var v1=class extends Nl{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,r,l){const i=new g1({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(r),state:l});return this.add(i),i}add(n){this.#e.add(n);const r=ps(n);if(typeof r=="string"){const l=this.#t.get(r);l?l.push(n):this.#t.set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const r=ps(n);if(typeof r=="string"){const l=this.#t.get(r);if(l)if(l.length>1){const i=l.indexOf(n);i!==-1&&l.splice(i,1)}else l[0]===n&&this.#t.delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=ps(n);if(typeof r=="string"){const i=this.#t.get(r)?.find(u=>u.state.status==="pending");return!i||i===n}else return!0}runNext(n){const r=ps(n);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==n&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){it.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const r={exact:!0,...n};return this.getAll().find(l=>cv(r,l))}findAll(n={}){return this.getAll().filter(r=>cv(n,r))}notify(n){it.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return it.batch(()=>Promise.all(n.map(r=>r.continue().catch(At))))}};function ps(n){return n.options.scope?.id}var y1=class extends Nl{#e;#t=void 0;#n;#r;constructor(r,l){super(),this.#e=r,this.setOptions(l),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const l=this.options;this.options=this.#e.defaultMutationOptions(r),js(this.options,l)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),l?.mutationKey&&this.options.mutationKey&&Tr(l.mutationKey)!==Tr(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#a(),this.#o(r)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#o()}mutate(r,l){return this.#r=l,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(r)}#a(){const r=this.#n?.state??Ey();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#o(r){it.batch(()=>{if(this.#r&&this.hasListeners()){const l=this.#t.variables,i=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#r.onSuccess?.(r.data,l,i,u)}catch(c){Promise.reject(c)}try{this.#r.onSettled?.(r.data,null,l,i,u)}catch(c){Promise.reject(c)}}else if(r?.type==="error"){try{this.#r.onError?.(r.error,l,i,u)}catch(c){Promise.reject(c)}try{this.#r.onSettled?.(void 0,r.error,l,i,u)}catch(c){Promise.reject(c)}}}this.listeners.forEach(l=>{l(this.#t)})})}},b1=class extends Nl{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,r,l){const i=r.queryKey,u=r.queryHash??Ed(i,r);let c=this.get(u);return c||(c=new f1({client:n,queryKey:i,queryHash:u,options:n.defaultQueryOptions(r),state:l,defaultOptions:n.getQueryDefaults(i)}),this.add(c)),c}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=this.#e.get(n.queryHash);r&&(n.destroy(),r===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){it.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const r={exact:!0,...n};return this.getAll().find(l=>uv(r,l))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(l=>uv(n,l)):r}notify(n){it.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){it.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},x1=class{#e;#t;#n;#r;#a;#o;#i;#l;constructor(n={}){this.#e=n.queryCache||new b1,this.#t=n.mutationCache||new v1,this.#n=n.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=Rd.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Ds.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),l=this.#e.build(this,r),i=l.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&l.isStaleByTime(Fa(r.staleTime,l))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:r,state:l})=>{const i=l.data;return[r,i]})}setQueryData(n,r,l){const i=this.defaultQueryOptions({queryKey:n}),c=this.#e.get(i.queryHash)?.state.data,d=e1(r,c);if(d!==void 0)return this.#e.build(this,i).setData(d,{...l,manual:!0})}setQueriesData(n,r,l){return it.batch(()=>this.#e.findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,r,l)]))}getQueryState(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state}removeQueries(n){const r=this.#e;it.batch(()=>{r.findAll(n).forEach(l=>{r.remove(l)})})}resetQueries(n,r){const l=this.#e;return it.batch(()=>(l.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const l={revert:!0,...r},i=it.batch(()=>this.#e.findAll(n).map(u=>u.cancel(l)));return Promise.all(i).then(At).catch(At)}invalidateQueries(n,r={}){return it.batch(()=>(this.#e.findAll(n).forEach(l=>{l.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},r)))}refetchQueries(n,r={}){const l={...r,cancelRefetch:r.cancelRefetch??!0},i=it.batch(()=>this.#e.findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let c=u.fetch(void 0,l);return l.throwOnError||(c=c.catch(At)),u.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(i).then(At)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const l=this.#e.build(this,r);return l.isStaleByTime(Fa(r.staleTime,l))?l.fetch(r):Promise.resolve(l.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(At).catch(At)}fetchInfiniteQuery(n){return n.behavior=vv(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(At).catch(At)}ensureInfiniteQueryData(n){return n.behavior=vv(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ds.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,r){this.#r.set(Tr(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...this.#r.values()],l={};return r.forEach(i=>{Po(n,i.queryKey)&&Object.assign(l,i.defaultOptions)}),l}setMutationDefaults(n,r){this.#a.set(Tr(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...this.#a.values()],l={};return r.forEach(i=>{Po(n,i.mutationKey)&&Object.assign(l,i.defaultOptions)}),l}defaultQueryOptions(n){if(n._defaulted)return n;const r={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=Ed(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Cd&&(r.enabled=!1),r}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Cy=g.createContext(void 0),qn=n=>{const r=g.useContext(Cy);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},w1=({client:n,children:r})=>(g.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),y.jsx(Cy.Provider,{value:n,children:r})),Ry=g.createContext(!1),S1=()=>g.useContext(Ry);Ry.Provider;function E1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var C1=g.createContext(E1()),R1=()=>g.useContext(C1),T1=(n,r)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(r.isReset()||(n.retryOnMount=!1))},A1=n=>{g.useEffect(()=>{n.clearReset()},[n])},N1=({result:n,errorResetBoundary:r,throwOnError:l,query:i,suspense:u})=>n.isError&&!r.isReset()&&!n.isFetching&&i&&(u&&n.data===void 0||yy(l,[n.error,i])),M1=n=>{if(n.suspense){const l=u=>u==="static"?u:Math.max(u??1e3,1e3),i=n.staleTime;n.staleTime=typeof i=="function"?(...u)=>l(i(...u)):l(i),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},O1=(n,r)=>n.isLoading&&n.isFetching&&!r,_1=(n,r)=>n?.suspense&&r.isPending,bv=(n,r,l)=>r.fetchOptimistic(n).catch(()=>{l.clearReset()});function j1(n,r,l){const i=S1(),u=R1(),c=qn(),d=c.defaultQueryOptions(n);c.getDefaultOptions().queries?._experimental_beforeQuery?.(d),d._optimisticResults=i?"isRestoring":"optimistic",M1(d),T1(d,u),A1(u);const h=!c.getQueryCache().get(d.queryHash),[v]=g.useState(()=>new r(c,d)),m=v.getOptimisticResult(d),x=!i&&n.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(p=>{const S=x?v.subscribe(it.batchCalls(p)):At;return v.updateResult(),S},[v,x]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),g.useEffect(()=>{v.setOptions(d)},[d,v]),_1(d,m))throw bv(d,v,u);if(N1({result:m,errorResetBoundary:u,throwOnError:d.throwOnError,query:c.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw m.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(d,m),d.experimental_prefetchInRender&&!Rr&&O1(m,i)&&(h?bv(d,v,u):c.getQueryCache().get(d.queryHash)?.promise)?.catch(At).finally(()=>{v.updateResult()}),d.notifyOnChangeProps?m:v.trackResult(m)}function gn(n,r){return j1(n,d1)}function Xa(n,r){const l=qn(),[i]=g.useState(()=>new y1(l,n));g.useEffect(()=>{i.setOptions(n)},[i,n]);const u=g.useSyncExternalStore(g.useCallback(d=>i.subscribe(it.batchCalls(d)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),c=g.useCallback((d,h)=>{i.mutate(d,h).catch(At)},[i]);if(u.error&&yy(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:c,mutateAsync:u.mutate}}var xv="popstate";function D1(n={}){function r(i,u){let{pathname:c,search:d,hash:h}=i.location;return ad("",{pathname:c,search:d,hash:h},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function l(i,u){return typeof u=="string"?u:qo(u)}return L1(r,l,null,n)}function Ie(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function pn(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function z1(){return Math.random().toString(36).substring(2,10)}function wv(n,r){return{usr:n.state,key:n.key,idx:r}}function ad(n,r,l=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Ml(r):r,state:l,key:r&&r.key||i||z1()}}function qo({pathname:n="/",search:r="",hash:l=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Ml(n){let r={};if(n){let l=n.indexOf("#");l>=0&&(r.hash=n.substring(l),n=n.substring(0,l));let i=n.indexOf("?");i>=0&&(r.search=n.substring(i),n=n.substring(0,i)),n&&(r.pathname=n)}return r}function L1(n,r,l,i={}){let{window:u=document.defaultView,v5Compat:c=!1}=i,d=u.history,h="POP",v=null,m=x();m==null&&(m=0,d.replaceState({...d.state,idx:m},""));function x(){return(d.state||{idx:null}).idx}function p(){h="POP";let T=x(),A=T==null?null:T-m;m=T,v&&v({action:h,location:E.location,delta:A})}function S(T,A){h="PUSH";let N=ad(E.location,T,A);m=x()+1;let _=wv(N,m),H=E.createHref(N);try{d.pushState(_,"",H)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;u.location.assign(H)}c&&v&&v({action:h,location:E.location,delta:1})}function R(T,A){h="REPLACE";let N=ad(E.location,T,A);m=x();let _=wv(N,m),H=E.createHref(N);d.replaceState(_,"",H),c&&v&&v({action:h,location:E.location,delta:0})}function C(T){return U1(T)}let E={get action(){return h},get location(){return n(u,d)},listen(T){if(v)throw new Error("A history only accepts one active listener");return u.addEventListener(xv,p),v=T,()=>{u.removeEventListener(xv,p),v=null}},createHref(T){return r(u,T)},createURL:C,encodeLocation(T){let A=C(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:S,replace:R,go(T){return d.go(T)}};return E}function U1(n,r=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Ie(l,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:qo(n);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=l+i),new URL(i,l)}function Ty(n,r,l="/"){return k1(n,r,l,!1)}function k1(n,r,l,i){let u=typeof r=="string"?Ml(r):r,c=da(u.pathname||"/",l);if(c==null)return null;let d=Ay(n);B1(d);let h=null;for(let v=0;h==null&&v<d.length;++v){let m=X1(c);h=K1(d[v],m,i)}return h}function Ay(n,r=[],l=[],i="",u=!1){let c=(d,h,v=u,m)=>{let x={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(i)&&v)return;Ie(x.relativePath.startsWith(i),`Absolute route path "${x.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(i.length)}let p=ca([i,x.relativePath]),S=l.concat(x);d.children&&d.children.length>0&&(Ie(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Ay(d.children,r,S,p,v)),!(d.path==null&&!d.index)&&r.push({path:p,score:Q1(p,d.index),routesMeta:S})};return n.forEach((d,h)=>{if(d.path===""||!d.path?.includes("?"))c(d,h);else for(let v of Ny(d.path))c(d,h,!0,v)}),r}function Ny(n){let r=n.split("/");if(r.length===0)return[];let[l,...i]=r,u=l.endsWith("?"),c=l.replace(/\?$/,"");if(i.length===0)return u?[c,""]:[c];let d=Ny(i.join("/")),h=[];return h.push(...d.map(v=>v===""?c:[c,v].join("/"))),u&&h.push(...d),h.map(v=>n.startsWith("/")&&v===""?"/":v)}function B1(n){n.sort((r,l)=>r.score!==l.score?l.score-r.score:F1(r.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}var H1=/^:[\w-]+$/,P1=3,q1=2,G1=1,V1=10,Y1=-2,Sv=n=>n==="*";function Q1(n,r){let l=n.split("/"),i=l.length;return l.some(Sv)&&(i+=Y1),r&&(i+=q1),l.filter(u=>!Sv(u)).reduce((u,c)=>u+(H1.test(c)?P1:c===""?G1:V1),i)}function F1(n,r){return n.length===r.length&&n.slice(0,-1).every((i,u)=>i===r[u])?n[n.length-1]-r[r.length-1]:0}function K1(n,r,l=!1){let{routesMeta:i}=n,u={},c="/",d=[];for(let h=0;h<i.length;++h){let v=i[h],m=h===i.length-1,x=c==="/"?r:r.slice(c.length)||"/",p=zs({path:v.relativePath,caseSensitive:v.caseSensitive,end:m},x),S=v.route;if(!p&&m&&l&&!i[i.length-1].route.index&&(p=zs({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},x)),!p)return null;Object.assign(u,p.params),d.push({params:u,pathname:ca([c,p.pathname]),pathnameBase:W1(ca([c,p.pathnameBase])),route:S}),p.pathnameBase!=="/"&&(c=ca([c,p.pathnameBase]))}return d}function zs(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,i]=I1(n.path,n.caseSensitive,n.end),u=r.match(l);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:i.reduce((m,{paramName:x,isOptional:p},S)=>{if(x==="*"){let C=h[S]||"";d=c.slice(0,c.length-C.length).replace(/(.)\/+$/,"$1")}const R=h[S];return p&&!R?m[x]=void 0:m[x]=(R||"").replace(/%2F/g,"/"),m},{}),pathname:c,pathnameBase:d,pattern:n}}function I1(n,r=!1,l=!0){pn(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 i=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,v)=>(i.push({paramName:h,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,r?void 0:"i"),i]}function X1(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return pn(!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 (${r}).`),n}}function da(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let l=r.endsWith("/")?r.length-1:r.length,i=n.charAt(l);return i&&i!=="/"?null:n.slice(l)||"/"}var My=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$1=n=>My.test(n);function Z1(n,r="/"){let{pathname:l,search:i="",hash:u=""}=typeof n=="string"?Ml(n):n,c;if(l)if($1(l))c=l;else{if(l.includes("//")){let d=l;l=l.replace(/\/\/+/g,"/"),pn(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${l}`)}l.startsWith("/")?c=Ev(l.substring(1),"/"):c=Ev(l,r)}else c=r;return{pathname:c,search:eE(i),hash:tE(u)}}function Ev(n,r){let l=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?l.length>1&&l.pop():u!=="."&&l.push(u)}),l.length>1?l.join("/"):"/"}function zf(n,r,l,i){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(i)}]. 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 J1(n){return n.filter((r,l)=>l===0||r.route.path&&r.route.path.length>0)}function Ad(n){let r=J1(n);return r.map((l,i)=>i===r.length-1?l.pathname:l.pathnameBase)}function Nd(n,r,l,i=!1){let u;typeof n=="string"?u=Ml(n):(u={...n},Ie(!u.pathname||!u.pathname.includes("?"),zf("?","pathname","search",u)),Ie(!u.pathname||!u.pathname.includes("#"),zf("#","pathname","hash",u)),Ie(!u.search||!u.search.includes("#"),zf("#","search","hash",u)));let c=n===""||u.pathname==="",d=c?"/":u.pathname,h;if(d==null)h=l;else{let p=r.length-1;if(!i&&d.startsWith("..")){let S=d.split("/");for(;S[0]==="..";)S.shift(),p-=1;u.pathname=S.join("/")}h=p>=0?r[p]:"/"}let v=Z1(u,h),m=d&&d!=="/"&&d.endsWith("/"),x=(c||d===".")&&l.endsWith("/");return!v.pathname.endsWith("/")&&(m||x)&&(v.pathname+="/"),v}var ca=n=>n.join("/").replace(/\/\/+/g,"/"),W1=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),eE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,tE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,nE=class{constructor(n,r,l,i=!1){this.status=n,this.statusText=r||"",this.internal=i,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function aE(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function rE(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Oy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _y(n,r){let l=n;if(typeof l!="string"||!My.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let i=l,u=!1;if(Oy)try{let c=new URL(window.location.href),d=l.startsWith("//")?new URL(c.protocol+l):new URL(l),h=da(d.pathname,r);d.origin===c.origin&&h!=null?l=h+d.search+d.hash:u=!0}catch{pn(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:u,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var jy=["POST","PUT","PATCH","DELETE"];new Set(jy);var lE=["GET",...jy];new Set(lE);var Ol=g.createContext(null);Ol.displayName="DataRouter";var Fs=g.createContext(null);Fs.displayName="DataRouterState";var oE=g.createContext(!1),Dy=g.createContext({isTransitioning:!1});Dy.displayName="ViewTransition";var iE=g.createContext(new Map);iE.displayName="Fetchers";var sE=g.createContext(null);sE.displayName="Await";var tn=g.createContext(null);tn.displayName="Navigation";var Io=g.createContext(null);Io.displayName="Location";var vn=g.createContext({outlet:null,matches:[],isDataRoute:!1});vn.displayName="Route";var Md=g.createContext(null);Md.displayName="RouteError";var zy="REACT_ROUTER_ERROR",uE="REDIRECT",cE="ROUTE_ERROR_RESPONSE";function fE(n){if(n.startsWith(`${zy}:${uE}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function dE(n){if(n.startsWith(`${zy}:${cE}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new nE(r.status,r.statusText,r.data)}catch{}}function hE(n,{relative:r}={}){Ie(_l(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:i}=g.useContext(tn),{hash:u,pathname:c,search:d}=Xo(n,{relative:r}),h=c;return l!=="/"&&(h=c==="/"?l:ca([l,c])),i.createHref({pathname:h,search:d,hash:u})}function _l(){return g.useContext(Io)!=null}function $a(){return Ie(_l(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Io).location}var Ly="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Uy(n){g.useContext(tn).static||g.useLayoutEffect(n)}function jl(){let{isDataRoute:n}=g.useContext(vn);return n?ME():mE()}function mE(){Ie(_l(),"useNavigate() may be used only in the context of a <Router> component.");let n=g.useContext(Ol),{basename:r,navigator:l}=g.useContext(tn),{matches:i}=g.useContext(vn),{pathname:u}=$a(),c=JSON.stringify(Ad(i)),d=g.useRef(!1);return Uy(()=>{d.current=!0}),g.useCallback((v,m={})=>{if(pn(d.current,Ly),!d.current)return;if(typeof v=="number"){l.go(v);return}let x=Nd(v,JSON.parse(c),u,m.relative==="path");n==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:ca([r,x.pathname])),(m.replace?l.replace:l.push)(x,m.state,m)},[r,l,c,u,n])}var pE=g.createContext(null);function gE(n){let r=g.useContext(vn).outlet;return g.useMemo(()=>r&&g.createElement(pE.Provider,{value:n},r),[r,n])}function vE(){let{matches:n}=g.useContext(vn),r=n[n.length-1];return r?r.params:{}}function Xo(n,{relative:r}={}){let{matches:l}=g.useContext(vn),{pathname:i}=$a(),u=JSON.stringify(Ad(l));return g.useMemo(()=>Nd(n,JSON.parse(u),i,r==="path"),[n,u,i,r])}function yE(n,r){return ky(n,r)}function ky(n,r,l,i,u){Ie(_l(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=g.useContext(tn),{matches:d}=g.useContext(vn),h=d[d.length-1],v=h?h.params:{},m=h?h.pathname:"/",x=h?h.pathnameBase:"/",p=h&&h.route;{let N=p&&p.path||"";Hy(m,!p||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${N}">) 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.
|
|
11
|
+
|
|
12
|
+
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let S=$a(),R;if(r){let N=typeof r=="string"?Ml(r):r;Ie(x==="/"||N.pathname?.startsWith(x),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${x}" but pathname "${N.pathname}" was given in the \`location\` prop.`),R=N}else R=S;let C=R.pathname||"/",E=C;if(x!=="/"){let N=x.replace(/^\//,"").split("/");E="/"+C.replace(/^\//,"").split("/").slice(N.length).join("/")}let T=Ty(n,{pathname:E});pn(p||T!=null,`No routes matched location "${R.pathname}${R.search}${R.hash}" `),pn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${R.pathname}${R.search}${R.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=EE(T&&T.map(N=>Object.assign({},N,{params:Object.assign({},v,N.params),pathname:ca([x,c.encodeLocation?c.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?x:ca([x,c.encodeLocation?c.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),d,l,i,u);return r&&A?g.createElement(Io.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...R},navigationType:"POP"}},A):A}function bE(){let n=NE(),r=aE(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:i},c={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:c},"ErrorBoundary")," or"," ",g.createElement("code",{style:c},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},r),l?g.createElement("pre",{style:u},l):null,d)}var xE=g.createElement(bE,null),By=class extends g.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,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):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=dE(n.digest);l&&(n=l)}let r=n!==void 0?g.createElement(vn.Provider,{value:this.props.routeContext},g.createElement(Md.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?g.createElement(wE,{error:n},r):r}};By.contextType=oE;var Lf=new WeakMap;function wE({children:n,error:r}){let{basename:l}=g.useContext(tn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let i=fE(r.digest);if(i){let u=Lf.get(r);if(u)throw u;let c=_y(i.location,l);if(Oy&&!Lf.get(r))if(c.isExternal||i.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:i.replace}));throw Lf.set(r,d),d}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return n}function SE({routeContext:n,match:r,children:l}){let i=g.useContext(Ol);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(vn.Provider,{value:n},l)}function EE(n,r=[],l=null,i=null,u=null){if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(r.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let c=n,d=l?.errors;if(d!=null){let x=c.findIndex(p=>p.route.id&&d?.[p.route.id]!==void 0);Ie(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,x+1))}let h=!1,v=-1;if(l)for(let x=0;x<c.length;x++){let p=c[x];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(v=x),p.route.id){let{loaderData:S,errors:R}=l,C=p.route.loader&&!S.hasOwnProperty(p.route.id)&&(!R||R[p.route.id]===void 0);if(p.route.lazy||C){h=!0,v>=0?c=c.slice(0,v+1):c=[c[0]];break}}}let m=l&&i?(x,p)=>{i(x,{location:l.location,params:l.matches?.[0]?.params??{},unstable_pattern:rE(l.matches),errorInfo:p})}:void 0;return c.reduceRight((x,p,S)=>{let R,C=!1,E=null,T=null;l&&(R=d&&p.route.id?d[p.route.id]:void 0,E=p.route.errorElement||xE,h&&(v<0&&S===0?(Hy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,T=null):v===S&&(C=!0,T=p.route.hydrateFallbackElement||null)));let A=r.concat(c.slice(0,S+1)),N=()=>{let _;return R?_=E:C?_=T:p.route.Component?_=g.createElement(p.route.Component,null):p.route.element?_=p.route.element:_=x,g.createElement(SE,{match:p,routeContext:{outlet:x,matches:A,isDataRoute:l!=null},children:_})};return l&&(p.route.ErrorBoundary||p.route.errorElement||S===0)?g.createElement(By,{location:l.location,revalidation:l.revalidation,component:E,error:R,children:N(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:m}):N()},null)}function Od(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function CE(n){let r=g.useContext(Ol);return Ie(r,Od(n)),r}function RE(n){let r=g.useContext(Fs);return Ie(r,Od(n)),r}function TE(n){let r=g.useContext(vn);return Ie(r,Od(n)),r}function _d(n){let r=TE(n),l=r.matches[r.matches.length-1];return Ie(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function AE(){return _d("useRouteId")}function NE(){let n=g.useContext(Md),r=RE("useRouteError"),l=_d("useRouteError");return n!==void 0?n:r.errors?.[l]}function ME(){let{router:n}=CE("useNavigate"),r=_d("useNavigate"),l=g.useRef(!1);return Uy(()=>{l.current=!0}),g.useCallback(async(u,c={})=>{pn(l.current,Ly),l.current&&(typeof u=="number"?await n.navigate(u):await n.navigate(u,{fromRouteId:r,...c}))},[n,r])}var Cv={};function Hy(n,r,l){!r&&!Cv[n]&&(Cv[n]=!0,pn(!1,l))}g.memo(OE);function OE({routes:n,future:r,state:l,onError:i}){return ky(n,void 0,l,i,r)}function Ks({to:n,replace:r,state:l,relative:i}){Ie(_l(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=g.useContext(tn);pn(!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:c}=g.useContext(vn),{pathname:d}=$a(),h=jl(),v=Nd(n,Ad(c),d,i==="path"),m=JSON.stringify(v);return g.useEffect(()=>{h(JSON.parse(m),{replace:r,state:l,relative:i})},[h,m,i,r,l]),null}function Py(n){return gE(n.context)}function Tt(n){Ie(!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 _E({basename:n="/",children:r=null,location:l,navigationType:i="POP",navigator:u,static:c=!1,unstable_useTransitions:d}){Ie(!_l(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),v=g.useMemo(()=>({basename:h,navigator:u,static:c,unstable_useTransitions:d,future:{}}),[h,u,c,d]);typeof l=="string"&&(l=Ml(l));let{pathname:m="/",search:x="",hash:p="",state:S=null,key:R="default"}=l,C=g.useMemo(()=>{let E=da(m,h);return E==null?null:{location:{pathname:E,search:x,hash:p,state:S,key:R},navigationType:i}},[h,m,x,p,S,R,i]);return pn(C!=null,`<Router basename="${h}"> is not able to match the URL "${m}${x}${p}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:g.createElement(tn.Provider,{value:v},g.createElement(Io.Provider,{children:r,value:C}))}function jE({children:n,location:r}){return yE(rd(n),r)}function rd(n,r=[]){let l=[];return g.Children.forEach(n,(i,u)=>{if(!g.isValidElement(i))return;let c=[...r,u];if(i.type===g.Fragment){l.push.apply(l,rd(i.props.children,c));return}Ie(i.type===Tt,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ie(!i.props.index||!i.props.children,"An index route cannot have child routes.");let d={id:i.props.id||c.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=rd(i.props.children,c)),l.push(d)}),l}var Ts="get",As="application/x-www-form-urlencoded";function Is(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function DE(n){return Is(n)&&n.tagName.toLowerCase()==="button"}function zE(n){return Is(n)&&n.tagName.toLowerCase()==="form"}function LE(n){return Is(n)&&n.tagName.toLowerCase()==="input"}function UE(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function kE(n,r){return n.button===0&&(!r||r==="_self")&&!UE(n)}var gs=null;function BE(){if(gs===null)try{new FormData(document.createElement("form"),0),gs=!1}catch{gs=!0}return gs}var HE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Uf(n){return n!=null&&!HE.has(n)?(pn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${As}"`),null):n}function PE(n,r){let l,i,u,c,d;if(zE(n)){let h=n.getAttribute("action");i=h?da(h,r):null,l=n.getAttribute("method")||Ts,u=Uf(n.getAttribute("enctype"))||As,c=new FormData(n)}else if(DE(n)||LE(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 v=n.getAttribute("formaction")||h.getAttribute("action");if(i=v?da(v,r):null,l=n.getAttribute("formmethod")||h.getAttribute("method")||Ts,u=Uf(n.getAttribute("formenctype"))||Uf(h.getAttribute("enctype"))||As,c=new FormData(h,n),!BE()){let{name:m,type:x,value:p}=n;if(x==="image"){let S=m?`${m}.`:"";c.append(`${S}x`,"0"),c.append(`${S}y`,"0")}else m&&c.append(m,p)}}else{if(Is(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Ts,i=null,u=As,d=n}return c&&u==="text/plain"&&(d=c,c=void 0),{action:i,method:l.toLowerCase(),encType:u,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function jd(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function qE(n,r,l){let i=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i.pathname==="/"?i.pathname=`_root.${l}`:r&&da(i.pathname,r)==="/"?i.pathname=`${r.replace(/\/$/,"")}/_root.${l}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${l}`,i}async function GE(n,r){if(n.id in r)return r[n.id];try{let l=await import(n.module);return r[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 VE(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 YE(n,r,l){let i=await Promise.all(n.map(async u=>{let c=r.routes[u.route.id];if(c){let d=await GE(c,l);return d.links?d.links():[]}return[]}));return IE(i.flat(1).filter(VE).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function Rv(n,r,l,i,u,c){let d=(v,m)=>l[m]?v.route.id!==l[m].route.id:!0,h=(v,m)=>l[m].pathname!==v.pathname||l[m].route.path?.endsWith("*")&&l[m].params["*"]!==v.params["*"];return c==="assets"?r.filter((v,m)=>d(v,m)||h(v,m)):c==="data"?r.filter((v,m)=>{let x=i.routes[v.route.id];if(!x||!x.hasLoader)return!1;if(d(v,m)||h(v,m))return!0;if(v.route.shouldRevalidate){let p=v.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function QE(n,r,{includeHydrateFallback:l}={}){return FE(n.map(i=>{let u=r.routes[i.route.id];if(!u)return[];let c=[u.module];return u.clientActionModule&&(c=c.concat(u.clientActionModule)),u.clientLoaderModule&&(c=c.concat(u.clientLoaderModule)),l&&u.hydrateFallbackModule&&(c=c.concat(u.hydrateFallbackModule)),u.imports&&(c=c.concat(u.imports)),c}).flat(1))}function FE(n){return[...new Set(n)]}function KE(n){let r={},l=Object.keys(n).sort();for(let i of l)r[i]=n[i];return r}function IE(n,r){let l=new Set;return new Set(r),n.reduce((i,u)=>{let c=JSON.stringify(KE(u));return l.has(c)||(l.add(c),i.push({key:c,link:u})),i},[])}function qy(){let n=g.useContext(Ol);return jd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function XE(){let n=g.useContext(Fs);return jd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Dd=g.createContext(void 0);Dd.displayName="FrameworkContext";function Gy(){let n=g.useContext(Dd);return jd(n,"You must render this element inside a <HydratedRouter> element"),n}function $E(n,r){let l=g.useContext(Dd),[i,u]=g.useState(!1),[c,d]=g.useState(!1),{onFocus:h,onBlur:v,onMouseEnter:m,onMouseLeave:x,onTouchStart:p}=r,S=g.useRef(null);g.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let E=A=>{A.forEach(N=>{d(N.isIntersecting)})},T=new IntersectionObserver(E,{threshold:.5});return S.current&&T.observe(S.current),()=>{T.disconnect()}}},[n]),g.useEffect(()=>{if(i){let E=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(E)}}},[i]);let R=()=>{u(!0)},C=()=>{u(!1),d(!1)};return l?n!=="intent"?[c,S,{}]:[c,S,{onFocus:Uo(h,R),onBlur:Uo(v,C),onMouseEnter:Uo(m,R),onMouseLeave:Uo(x,C),onTouchStart:Uo(p,R)}]:[!1,S,{}]}function Uo(n,r){return l=>{n&&n(l),l.defaultPrevented||r(l)}}function ZE({page:n,...r}){let{router:l}=qy(),i=g.useMemo(()=>Ty(l.routes,n,l.basename),[l.routes,n,l.basename]);return i?g.createElement(WE,{page:n,matches:i,...r}):null}function JE(n){let{manifest:r,routeModules:l}=Gy(),[i,u]=g.useState([]);return g.useEffect(()=>{let c=!1;return YE(n,r,l).then(d=>{c||u(d)}),()=>{c=!0}},[n,r,l]),i}function WE({page:n,matches:r,...l}){let i=$a(),{manifest:u,routeModules:c}=Gy(),{basename:d}=qy(),{loaderData:h,matches:v}=XE(),m=g.useMemo(()=>Rv(n,r,v,u,i,"data"),[n,r,v,u,i]),x=g.useMemo(()=>Rv(n,r,v,u,i,"assets"),[n,r,v,u,i]),p=g.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let C=new Set,E=!1;if(r.forEach(A=>{let N=u.routes[A.route.id];!N||!N.hasLoader||(!m.some(_=>_.route.id===A.route.id)&&A.route.id in h&&c[A.route.id]?.shouldRevalidate||N.hasClientLoader?E=!0:C.add(A.route.id))}),C.size===0)return[];let T=qE(n,d,"data");return E&&C.size>0&&T.searchParams.set("_routes",r.filter(A=>C.has(A.route.id)).map(A=>A.route.id).join(",")),[T.pathname+T.search]},[d,h,i,u,m,r,n,c]),S=g.useMemo(()=>QE(x,u),[x,u]),R=JE(x);return g.createElement(g.Fragment,null,p.map(C=>g.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...l})),S.map(C=>g.createElement("link",{key:C,rel:"modulepreload",href:C,...l})),R.map(({key:C,link:E})=>g.createElement("link",{key:C,nonce:l.nonce,...E})))}function eC(...n){return r=>{n.forEach(l=>{typeof l=="function"?l(r):l!=null&&(l.current=r)})}}var tC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{tC&&(window.__reactRouterVersion="7.11.0")}catch{}function nC({basename:n,children:r,unstable_useTransitions:l,window:i}){let u=g.useRef();u.current==null&&(u.current=D1({window:i,v5Compat:!0}));let c=u.current,[d,h]=g.useState({action:c.action,location:c.location}),v=g.useCallback(m=>{l===!1?h(m):g.startTransition(()=>h(m))},[l]);return g.useLayoutEffect(()=>c.listen(v),[c,v]),g.createElement(_E,{basename:n,children:r,location:d.location,navigationType:d.action,navigator:c,unstable_useTransitions:l})}var Vy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pa=g.forwardRef(function({onClick:r,discover:l="render",prefetch:i="none",relative:u,reloadDocument:c,replace:d,state:h,target:v,to:m,preventScrollReset:x,viewTransition:p,unstable_defaultShouldRevalidate:S,...R},C){let{basename:E,unstable_useTransitions:T}=g.useContext(tn),A=typeof m=="string"&&Vy.test(m),N=_y(m,E);m=N.to;let _=hE(m,{relative:u}),[H,V,W]=$E(i,R),B=lC(m,{replace:d,state:h,target:v,preventScrollReset:x,relative:u,viewTransition:p,unstable_defaultShouldRevalidate:S,unstable_useTransitions:T});function G(re){r&&r(re),re.defaultPrevented||B(re)}let ne=g.createElement("a",{...R,...W,href:N.absoluteURL||_,onClick:N.isExternal||c?r:G,ref:eC(C,V),target:v,"data-discover":!A&&l==="render"?"true":void 0});return H&&!A?g.createElement(g.Fragment,null,ne,g.createElement(ZE,{page:_})):ne});pa.displayName="Link";var Ls=g.forwardRef(function({"aria-current":r="page",caseSensitive:l=!1,className:i="",end:u=!1,style:c,to:d,viewTransition:h,children:v,...m},x){let p=Xo(d,{relative:m.relative}),S=$a(),R=g.useContext(Fs),{navigator:C,basename:E}=g.useContext(tn),T=R!=null&&cC(p)&&h===!0,A=C.encodeLocation?C.encodeLocation(p).pathname:p.pathname,N=S.pathname,_=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;l||(N=N.toLowerCase(),_=_?_.toLowerCase():null,A=A.toLowerCase()),_&&E&&(_=da(_,E)||_);const H=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let V=N===A||!u&&N.startsWith(A)&&N.charAt(H)==="/",W=_!=null&&(_===A||!u&&_.startsWith(A)&&_.charAt(A.length)==="/"),B={isActive:V,isPending:W,isTransitioning:T},G=V?r:void 0,ne;typeof i=="function"?ne=i(B):ne=[i,V?"active":null,W?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let re=typeof c=="function"?c(B):c;return g.createElement(pa,{...m,"aria-current":G,className:ne,ref:x,style:re,to:d,viewTransition:h},typeof v=="function"?v(B):v)});Ls.displayName="NavLink";var aC=g.forwardRef(({discover:n="render",fetcherKey:r,navigate:l,reloadDocument:i,replace:u,state:c,method:d=Ts,action:h,onSubmit:v,relative:m,preventScrollReset:x,viewTransition:p,unstable_defaultShouldRevalidate:S,...R},C)=>{let{unstable_useTransitions:E}=g.useContext(tn),T=sC(),A=uC(h,{relative:m}),N=d.toLowerCase()==="get"?"get":"post",_=typeof h=="string"&&Vy.test(h),H=V=>{if(v&&v(V),V.defaultPrevented)return;V.preventDefault();let W=V.nativeEvent.submitter,B=W?.getAttribute("formmethod")||d,G=()=>T(W||V.currentTarget,{fetcherKey:r,method:B,navigate:l,replace:u,state:c,relative:m,preventScrollReset:x,viewTransition:p,unstable_defaultShouldRevalidate:S});E&&l!==!1?g.startTransition(()=>G()):G()};return g.createElement("form",{ref:C,method:N,action:A,onSubmit:i?v:H,...R,"data-discover":!_&&n==="render"?"true":void 0})});aC.displayName="Form";function rC(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yy(n){let r=g.useContext(Ol);return Ie(r,rC(n)),r}function lC(n,{target:r,replace:l,state:i,preventScrollReset:u,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:v}={}){let m=jl(),x=$a(),p=Xo(n,{relative:c});return g.useCallback(S=>{if(kE(S,r)){S.preventDefault();let R=l!==void 0?l:qo(x)===qo(p),C=()=>m(n,{replace:R,state:i,preventScrollReset:u,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:h});v?g.startTransition(()=>C()):C()}},[x,m,p,l,i,r,n,u,c,d,h,v])}var oC=0,iC=()=>`__${String(++oC)}__`;function sC(){let{router:n}=Yy("useSubmit"),{basename:r}=g.useContext(tn),l=AE(),i=n.fetch,u=n.navigate;return g.useCallback(async(c,d={})=>{let{action:h,method:v,encType:m,formData:x,body:p}=PE(c,r);if(d.navigate===!1){let S=d.fetcherKey||iC();await i(S,l,d.action||h,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:p,formMethod:d.method||v,formEncType:d.encType||m,flushSync:d.flushSync})}else await u(d.action||h,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:p,formMethod:d.method||v,formEncType:d.encType||m,replace:d.replace,state:d.state,fromRouteId:l,flushSync:d.flushSync,viewTransition:d.viewTransition})},[i,u,r,l])}function uC(n,{relative:r}={}){let{basename:l}=g.useContext(tn),i=g.useContext(vn);Ie(i,"useFormAction must be used inside a RouteContext");let[u]=i.matches.slice(-1),c={...Xo(n||".",{relative:r})},d=$a();if(n==null){c.search=d.search;let h=new URLSearchParams(c.search),v=h.getAll("index");if(v.some(x=>x==="")){h.delete("index"),v.filter(p=>p).forEach(p=>h.append("index",p));let x=h.toString();c.search=x?`?${x}`:""}}return(!n||n===".")&&u.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(c.pathname=c.pathname==="/"?l:ca([l,c.pathname])),qo(c)}function cC(n,{relative:r}={}){let l=g.useContext(Dy);Ie(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Yy("useViewTransitionState"),u=Xo(n,{relative:r});if(!l.isTransitioning)return!1;let c=da(l.currentLocation.pathname,i)||l.currentLocation.pathname,d=da(l.nextLocation.pathname,i)||l.nextLocation.pathname;return zs(u.pathname,d)!=null||zs(u.pathname,c)!=null}var $o=my();const Qy=hy($o);function fC(n){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",r.appendChild(l),l.styleSheet?l.styleSheet.cssText=n:l.appendChild(document.createTextNode(n))}const dC=n=>{switch(n){case"success":return pC;case"info":return vC;case"warning":return gC;case"error":return yC;default:return null}},hC=Array(12).fill(0),mC=({visible:n,className:r})=>ee.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":n},ee.createElement("div",{className:"sonner-spinner"},hC.map((l,i)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),pC=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gC=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),vC=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),yC=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),bC=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xC=()=>{const[n,r]=ee.useState(document.hidden);return ee.useEffect(()=>{const l=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",l),()=>window.removeEventListener("visibilitychange",l)},[]),n};let ld=1;class wC{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const l=this.subscribers.indexOf(r);this.subscribers.splice(l,1)}),this.publish=r=>{this.subscribers.forEach(l=>l(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var l;const{message:i,...u}=r,c=typeof r?.id=="number"||((l=r.id)==null?void 0:l.length)>0?r.id:ld++,d=this.toasts.find(v=>v.id===c),h=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),d?this.toasts=this.toasts.map(v=>v.id===c?(this.publish({...v,...r,id:c,title:i}),{...v,...r,id:c,dismissible:h,title:i}):v):this.addToast({title:i,...u,dismissible:h,id:c}),c},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(l=>l({id:r,dismiss:!0})))):this.toasts.forEach(l=>{this.subscribers.forEach(i=>i({id:l.id,dismiss:!0}))}),r),this.message=(r,l)=>this.create({...l,message:r}),this.error=(r,l)=>this.create({...l,message:r,type:"error"}),this.success=(r,l)=>this.create({...l,type:"success",message:r}),this.info=(r,l)=>this.create({...l,type:"info",message:r}),this.warning=(r,l)=>this.create({...l,type:"warning",message:r}),this.loading=(r,l)=>this.create({...l,type:"loading",message:r}),this.promise=(r,l)=>{if(!l)return;let i;l.loading!==void 0&&(i=this.create({...l,promise:r,type:"loading",message:l.loading,description:typeof l.description!="function"?l.description:void 0}));const u=Promise.resolve(r instanceof Function?r():r);let c=i!==void 0,d;const h=u.then(async m=>{if(d=["resolve",m],ee.isValidElement(m))c=!1,this.create({id:i,type:"default",message:m});else if(EC(m)&&!m.ok){c=!1;const p=typeof l.error=="function"?await l.error(`HTTP error! status: ${m.status}`):l.error,S=typeof l.description=="function"?await l.description(`HTTP error! status: ${m.status}`):l.description,C=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...C})}else if(m instanceof Error){c=!1;const p=typeof l.error=="function"?await l.error(m):l.error,S=typeof l.description=="function"?await l.description(m):l.description,C=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...C})}else if(l.success!==void 0){c=!1;const p=typeof l.success=="function"?await l.success(m):l.success,S=typeof l.description=="function"?await l.description(m):l.description,C=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:S,...C})}}).catch(async m=>{if(d=["reject",m],l.error!==void 0){c=!1;const x=typeof l.error=="function"?await l.error(m):l.error,p=typeof l.description=="function"?await l.description(m):l.description,R=typeof x=="object"&&!ee.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:p,...R})}}).finally(()=>{c&&(this.dismiss(i),i=void 0),l.finally==null||l.finally.call(l)}),v=()=>new Promise((m,x)=>h.then(()=>d[0]==="reject"?x(d[1]):m(d[1])).catch(x));return typeof i!="string"&&typeof i!="number"?{unwrap:v}:Object.assign(i,{unwrap:v})},this.custom=(r,l)=>{const i=l?.id||ld++;return this.create({jsx:r(i),id:i,...l}),i},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const qt=new wC,SC=(n,r)=>{const l=r?.id||ld++;return qt.addToast({title:n,...r,id:l}),l},EC=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",CC=SC,RC=()=>qt.toasts,TC=()=>qt.getActiveToasts(),Gt=Object.assign(CC,{success:qt.success,info:qt.info,warning:qt.warning,error:qt.error,custom:qt.custom,message:qt.message,promise:qt.promise,dismiss:qt.dismiss,loading:qt.loading},{getHistory:RC,getToasts:TC});fC("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function vs(n){return n.label!==void 0}const AC=3,NC="24px",MC="16px",Tv=4e3,OC=356,_C=14,jC=45,DC=200;function Ln(...n){return n.filter(Boolean).join(" ")}function zC(n){const[r,l]=n.split("-"),i=[];return r&&i.push(r),l&&i.push(l),i}const LC=n=>{var r,l,i,u,c,d,h,v,m;const{invert:x,toast:p,unstyled:S,interacting:R,setHeights:C,visibleToasts:E,heights:T,index:A,toasts:N,expanded:_,removeToast:H,defaultRichColors:V,closeButton:W,style:B,cancelButtonStyle:G,actionButtonStyle:ne,className:re="",descriptionClassName:de="",duration:fe,position:me,gap:pe,expandByDefault:ve,classNames:j,icons:Y,closeButtonAriaLabel:k="Close toast"}=n,[J,ie]=ee.useState(null),[O,F]=ee.useState(null),[Q,Z]=ee.useState(!1),[te,le]=ee.useState(!1),[X,ae]=ee.useState(!1),[be,Ee]=ee.useState(!1),[Te,Me]=ee.useState(!1),[dt,rt]=ee.useState(0),[Vn,Nn]=ee.useState(0),yn=ee.useRef(p.duration||fe||Tv),Hl=ee.useRef(null),Yt=ee.useRef(null),Pl=A===0,ql=A+1<=E,St=p.type,va=p.dismissible!==!1,Et=p.className||"",pu=p.descriptionClassName||"",er=ee.useMemo(()=>T.findIndex(xe=>xe.toastId===p.id)||0,[T,p.id]),ti=ee.useMemo(()=>{var xe;return(xe=p.closeButton)!=null?xe:W},[p.closeButton,W]),tr=ee.useMemo(()=>p.duration||fe||Tv,[p.duration,fe]),Gl=ee.useRef(0),Yn=ee.useRef(0),ni=ee.useRef(0),ya=ee.useRef(null),[nr,Ct]=me.split("-"),bn=ee.useMemo(()=>T.reduce((xe,Fe,ut)=>ut>=er?xe:xe+Fe.height,0),[T,er]),yt=xC(),gu=p.invert||x,Vl=St==="loading";Yn.current=ee.useMemo(()=>er*pe+bn,[er,bn]),ee.useEffect(()=>{yn.current=tr},[tr]),ee.useEffect(()=>{Z(!0)},[]),ee.useEffect(()=>{const xe=Yt.current;if(xe){const Fe=xe.getBoundingClientRect().height;return Nn(Fe),C(ut=>[{toastId:p.id,height:Fe,position:p.position},...ut]),()=>C(ut=>ut.filter(bt=>bt.toastId!==p.id))}},[C,p.id]),ee.useLayoutEffect(()=>{if(!Q)return;const xe=Yt.current,Fe=xe.style.height;xe.style.height="auto";const ut=xe.getBoundingClientRect().height;xe.style.height=Fe,Nn(ut),C(bt=>bt.find(Xe=>Xe.toastId===p.id)?bt.map(Xe=>Xe.toastId===p.id?{...Xe,height:ut}:Xe):[{toastId:p.id,height:ut,position:p.position},...bt])},[Q,p.title,p.description,C,p.id,p.jsx,p.action,p.cancel]);const Mn=ee.useCallback(()=>{le(!0),rt(Yn.current),C(xe=>xe.filter(Fe=>Fe.toastId!==p.id)),setTimeout(()=>{H(p)},DC)},[p,H,C,Yn]);ee.useEffect(()=>{if(p.promise&&St==="loading"||p.duration===1/0||p.type==="loading")return;let xe;return _||R||yt?(()=>{if(ni.current<Gl.current){const bt=new Date().getTime()-Gl.current;yn.current=yn.current-bt}ni.current=new Date().getTime()})():yn.current!==1/0&&(Gl.current=new Date().getTime(),xe=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Mn()},yn.current)),()=>clearTimeout(xe)},[_,R,p,St,yt,Mn]),ee.useEffect(()=>{p.delete&&(Mn(),p.onDismiss==null||p.onDismiss.call(p,p))},[Mn,p.delete]);function zr(){var xe;if(Y?.loading){var Fe;return ee.createElement("div",{className:Ln(j?.loader,p==null||(Fe=p.classNames)==null?void 0:Fe.loader,"sonner-loader"),"data-visible":St==="loading"},Y.loading)}return ee.createElement(mC,{className:Ln(j?.loader,p==null||(xe=p.classNames)==null?void 0:xe.loader),visible:St==="loading"})}const Lr=p.icon||Y?.[St]||dC(St);var ar,On;return ee.createElement("li",{tabIndex:0,ref:Yt,className:Ln(re,Et,j?.toast,p==null||(r=p.classNames)==null?void 0:r.toast,j?.default,j?.[St],p==null||(l=p.classNames)==null?void 0:l[St]),"data-sonner-toast":"","data-rich-colors":(ar=p.richColors)!=null?ar:V,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":Q,"data-promise":!!p.promise,"data-swiped":Te,"data-removed":te,"data-visible":ql,"data-y-position":nr,"data-x-position":Ct,"data-index":A,"data-front":Pl,"data-swiping":X,"data-dismissible":va,"data-type":St,"data-invert":gu,"data-swipe-out":be,"data-swipe-direction":O,"data-expanded":!!(_||ve&&Q),"data-testid":p.testId,style:{"--index":A,"--toasts-before":A,"--z-index":N.length-A,"--offset":`${te?dt:Yn.current}px`,"--initial-height":ve?"auto":`${Vn}px`,...B,...p.style},onDragEnd:()=>{ae(!1),ie(null),ya.current=null},onPointerDown:xe=>{xe.button!==2&&(Vl||!va||(Hl.current=new Date,rt(Yn.current),xe.target.setPointerCapture(xe.pointerId),xe.target.tagName!=="BUTTON"&&(ae(!0),ya.current={x:xe.clientX,y:xe.clientY})))},onPointerUp:()=>{var xe,Fe,ut;if(be||!va)return;ya.current=null;const bt=Number(((xe=Yt.current)==null?void 0:xe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ba=Number(((Fe=Yt.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xe=new Date().getTime()-((ut=Hl.current)==null?void 0:ut.getTime()),_t=J==="x"?bt:ba,rr=Math.abs(_t)/Xe;if(Math.abs(_t)>=jC||rr>.11){rt(Yn.current),p.onDismiss==null||p.onDismiss.call(p,p),F(J==="x"?bt>0?"right":"left":ba>0?"down":"up"),Mn(),Ee(!0);return}else{var jt,Dt;(jt=Yt.current)==null||jt.style.setProperty("--swipe-amount-x","0px"),(Dt=Yt.current)==null||Dt.style.setProperty("--swipe-amount-y","0px")}Me(!1),ae(!1),ie(null)},onPointerMove:xe=>{var Fe,ut,bt;if(!ya.current||!va||((Fe=window.getSelection())==null?void 0:Fe.toString().length)>0)return;const Xe=xe.clientY-ya.current.y,_t=xe.clientX-ya.current.x;var rr;const jt=(rr=n.swipeDirections)!=null?rr:zC(me);!J&&(Math.abs(_t)>1||Math.abs(Xe)>1)&&ie(Math.abs(_t)>Math.abs(Xe)?"x":"y");let Dt={x:0,y:0};const Ur=xn=>1/(1.5+Math.abs(xn)/20);if(J==="y"){if(jt.includes("top")||jt.includes("bottom"))if(jt.includes("top")&&Xe<0||jt.includes("bottom")&&Xe>0)Dt.y=Xe;else{const xn=Xe*Ur(Xe);Dt.y=Math.abs(xn)<Math.abs(Xe)?xn:Xe}}else if(J==="x"&&(jt.includes("left")||jt.includes("right")))if(jt.includes("left")&&_t<0||jt.includes("right")&&_t>0)Dt.x=_t;else{const xn=_t*Ur(_t);Dt.x=Math.abs(xn)<Math.abs(_t)?xn:_t}(Math.abs(Dt.x)>0||Math.abs(Dt.y)>0)&&Me(!0),(ut=Yt.current)==null||ut.style.setProperty("--swipe-amount-x",`${Dt.x}px`),(bt=Yt.current)==null||bt.style.setProperty("--swipe-amount-y",`${Dt.y}px`)}},ti&&!p.jsx&&St!=="loading"?ee.createElement("button",{"aria-label":k,"data-disabled":Vl,"data-close-button":!0,onClick:Vl||!va?()=>{}:()=>{Mn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Ln(j?.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(On=Y?.close)!=null?On:bC):null,(St||p.icon||p.promise)&&p.icon!==null&&(Y?.[St]!==null||p.icon)?ee.createElement("div",{"data-icon":"",className:Ln(j?.icon,p==null||(u=p.classNames)==null?void 0:u.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||zr():null,p.type!=="loading"?Lr:null):null,ee.createElement("div",{"data-content":"",className:Ln(j?.content,p==null||(c=p.classNames)==null?void 0:c.content)},ee.createElement("div",{"data-title":"",className:Ln(j?.title,p==null||(d=p.classNames)==null?void 0:d.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ee.createElement("div",{"data-description":"",className:Ln(de,pu,j?.description,p==null||(h=p.classNames)==null?void 0:h.description)},typeof p.description=="function"?p.description():p.description):null),ee.isValidElement(p.cancel)?p.cancel:p.cancel&&vs(p.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||G,onClick:xe=>{vs(p.cancel)&&va&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,xe),Mn())},className:Ln(j?.cancelButton,p==null||(v=p.classNames)==null?void 0:v.cancelButton)},p.cancel.label):null,ee.isValidElement(p.action)?p.action:p.action&&vs(p.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||ne,onClick:xe=>{vs(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,xe),!xe.defaultPrevented&&Mn())},className:Ln(j?.actionButton,p==null||(m=p.classNames)==null?void 0:m.actionButton)},p.action.label):null)};function Av(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function UC(n,r){const l={};return[n,r].forEach((i,u)=>{const c=u===1,d=c?"--mobile-offset":"--offset",h=c?MC:NC;function v(m){["top","right","bottom","left"].forEach(x=>{l[`${d}-${x}`]=typeof m=="number"?`${m}px`:m})}typeof i=="number"||typeof i=="string"?v(i):typeof i=="object"?["top","right","bottom","left"].forEach(m=>{i[m]===void 0?l[`${d}-${m}`]=h:l[`${d}-${m}`]=typeof i[m]=="number"?`${i[m]}px`:i[m]}):v(h)}),l}const kC=ee.forwardRef(function(r,l){const{id:i,invert:u,position:c="bottom-right",hotkey:d=["altKey","KeyT"],expand:h,closeButton:v,className:m,offset:x,mobileOffset:p,theme:S="light",richColors:R,duration:C,style:E,visibleToasts:T=AC,toastOptions:A,dir:N=Av(),gap:_=_C,icons:H,containerAriaLabel:V="Notifications"}=r,[W,B]=ee.useState([]),G=ee.useMemo(()=>i?W.filter(Q=>Q.toasterId===i):W.filter(Q=>!Q.toasterId),[W,i]),ne=ee.useMemo(()=>Array.from(new Set([c].concat(G.filter(Q=>Q.position).map(Q=>Q.position)))),[G,c]),[re,de]=ee.useState([]),[fe,me]=ee.useState(!1),[pe,ve]=ee.useState(!1),[j,Y]=ee.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),k=ee.useRef(null),J=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),ie=ee.useRef(null),O=ee.useRef(!1),F=ee.useCallback(Q=>{B(Z=>{var te;return(te=Z.find(le=>le.id===Q.id))!=null&&te.delete||qt.dismiss(Q.id),Z.filter(({id:le})=>le!==Q.id)})},[]);return ee.useEffect(()=>qt.subscribe(Q=>{if(Q.dismiss){requestAnimationFrame(()=>{B(Z=>Z.map(te=>te.id===Q.id?{...te,delete:!0}:te))});return}setTimeout(()=>{Qy.flushSync(()=>{B(Z=>{const te=Z.findIndex(le=>le.id===Q.id);return te!==-1?[...Z.slice(0,te),{...Z[te],...Q},...Z.slice(te+1)]:[Q,...Z]})})})}),[W]),ee.useEffect(()=>{if(S!=="system"){Y(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:Z})=>{Y(Z?"dark":"light")})}catch{Q.addListener(({matches:te})=>{try{Y(te?"dark":"light")}catch(le){console.error(le)}})}},[S]),ee.useEffect(()=>{W.length<=1&&me(!1)},[W]),ee.useEffect(()=>{const Q=Z=>{var te;if(d.every(ae=>Z[ae]||Z.code===ae)){var X;me(!0),(X=k.current)==null||X.focus()}Z.code==="Escape"&&(document.activeElement===k.current||(te=k.current)!=null&&te.contains(document.activeElement))&&me(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[d]),ee.useEffect(()=>{if(k.current)return()=>{ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null,O.current=!1)}},[k.current]),ee.createElement("section",{ref:l,"aria-label":`${V} ${J}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ne.map((Q,Z)=>{var te;const[le,X]=Q.split("-");return G.length?ee.createElement("ol",{key:Q,dir:N==="auto"?Av():N,tabIndex:-1,ref:k,className:m,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":le,"data-x-position":X,style:{"--front-toast-height":`${((te=re[0])==null?void 0:te.height)||0}px`,"--width":`${OC}px`,"--gap":`${_}px`,...E,...UC(x,p)},onBlur:ae=>{O.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(O.current=!1,ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||O.current||(O.current=!0,ie.current=ae.relatedTarget)},onMouseEnter:()=>me(!0),onMouseMove:()=>me(!0),onMouseLeave:()=>{pe||me(!1)},onDragEnd:()=>me(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||ve(!0)},onPointerUp:()=>ve(!1)},G.filter(ae=>!ae.position&&Z===0||ae.position===Q).map((ae,be)=>{var Ee,Te;return ee.createElement(LC,{key:ae.id,icons:H,index:be,toast:ae,defaultRichColors:R,duration:(Ee=A?.duration)!=null?Ee:C,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:u,visibleToasts:T,closeButton:(Te=A?.closeButton)!=null?Te:v,interacting:pe,position:Q,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:F,toasts:G.filter(Me=>Me.position==ae.position),heights:re.filter(Me=>Me.position==ae.position),setHeights:de,expandByDefault:h,gap:_,expanded:fe,swipeDirections:r.swipeDirections})})):null}))});function BC(n={}){const{immediate:r=!1,onNeedRefresh:l,onOfflineReady:i,onRegistered:u,onRegisteredSW:c,onRegisterError:d}=n;let h,v;const m=async(p=!0)=>{await v};async function x(){if("serviceWorker"in navigator){if(h=await dy(async()=>{const{Workbox:p}=await import("./workbox-window.prod.es5-BIl4cyR9.js");return{Workbox:p}},[]).then(({Workbox:p})=>new p("/sw.js",{scope:"/",type:"classic"})).catch(p=>{d?.(p)}),!h)return;h.addEventListener("activated",p=>{(p.isUpdate||p.isExternal)&&window.location.reload()}),h.addEventListener("installed",p=>{p.isUpdate||i?.()}),h.register({immediate:r}).then(p=>{c?c("/sw.js",p):u?.(p)}).catch(p=>{d?.(p)})}}return v=x(),m}async function Xs(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function HC(){try{const n=await fetch("/api/auth/status");if(!n.ok)throw new Error(await Xs(n));return await n.json()}catch{throw new Error("Couldn't reach server. Check your connection.")}}function zd(){return gn({queryKey:["auth-status"],queryFn:HC,staleTime:3e4})}function PC(){const n=qn();return Xa({mutationFn:async r=>{let l;try{l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:r})})}catch{throw new Error("Couldn't reach server. Check your connection.")}if(!l.ok)throw new Error(await Xs(l))},onSuccess:()=>{n.invalidateQueries({queryKey:["auth-status"]})}})}function qC(){const n=qn();return Xa({mutationFn:async()=>{let r;try{r=await fetch("/api/auth/logout",{method:"POST"})}catch{throw new Error("Couldn't reach server. Check your connection.")}if(!r.ok)throw new Error(await Xs(r))},onSuccess:()=>{n.invalidateQueries({queryKey:["auth-status"]})}})}function GC(){const n=qn();return Xa({mutationFn:async r=>{let l;try{l=await fetch("/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}catch{throw new Error("Couldn't reach server. Check your connection.")}if(!l.ok)throw new Error(await Xs(l));return await l.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["auth-status"]})}})}async function VC(){const n=await fetch("/api/setup");if(!n.ok)throw new Error("Failed to check setup status");return await n.json()}function YC(){return gn({queryKey:["setupStatus"],queryFn:VC})}const QC=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),FC=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,l,i)=>i?i.toUpperCase():l.toLowerCase()),Nv=n=>{const r=FC(n);return r.charAt(0).toUpperCase()+r.slice(1)},Fy=(...n)=>n.filter((r,l,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===l).join(" ").trim(),KC=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var IC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const XC=g.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:u="",children:c,iconNode:d,...h},v)=>g.createElement("svg",{ref:v,...IC,width:r,height:r,stroke:n,strokeWidth:i?Number(l)*24/Number(r):l,className:Fy("lucide",u),...!c&&!KC(h)&&{"aria-hidden":"true"},...h},[...d.map(([m,x])=>g.createElement(m,x)),...Array.isArray(c)?c:[c]]));const Mt=(n,r)=>{const l=g.forwardRef(({className:i,...u},c)=>g.createElement(XC,{ref:c,iconNode:r,className:Fy(`lucide-${QC(Nv(n))}`,`lucide-${n}`,i),...u}));return l.displayName=Nv(n),l};const $C=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ky=Mt("check",$C);const ZC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Iy=Mt("chevron-down",ZC);const JC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],WC=Mt("chevron-up",JC);const eR=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],tR=Mt("circle-check-big",eR);const nR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aR=Mt("circle-x",nR);const rR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lR=Mt("circle",rR);const oR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],$s=Mt("film",oR);const iR=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],sR=Mt("heart",iR);const uR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Xy=Mt("loader-circle",uR);const cR=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],fR=Mt("pencil",cR);const dR=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],hR=Mt("play",dR);const mR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],od=Mt("plus",mR);const pR=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],gR=Mt("settings",pR);const vR=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],$y=Mt("trash-2",vR);const yR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],bR=Mt("x",yR);function Mv(n,r){if(typeof n=="function")return n(r);n!=null&&(n.current=r)}function ga(...n){return r=>{let l=!1;const i=n.map(u=>{const c=Mv(u,r);return!l&&typeof c=="function"&&(l=!0),c});if(l)return()=>{for(let u=0;u<i.length;u++){const c=i[u];typeof c=="function"?c():Mv(n[u],null)}}}}function Ve(...n){return g.useCallback(ga(...n),n)}var xR=Symbol.for("react.lazy"),Us=Sd[" use ".trim().toString()];function wR(n){return typeof n=="object"&&n!==null&&"then"in n}function Zy(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===xR&&"_payload"in n&&wR(n._payload)}function Jy(n){const r=ER(n),l=g.forwardRef((i,u)=>{let{children:c,...d}=i;Zy(c)&&typeof Us=="function"&&(c=Us(c._payload));const h=g.Children.toArray(c),v=h.find(RR);if(v){const m=v.props.children,x=h.map(p=>p===v?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:p);return y.jsx(r,{...d,ref:u,children:g.isValidElement(m)?g.cloneElement(m,void 0,x):null})}return y.jsx(r,{...d,ref:u,children:c})});return l.displayName=`${n}.Slot`,l}var SR=Jy("Slot");function ER(n){const r=g.forwardRef((l,i)=>{let{children:u,...c}=l;if(Zy(u)&&typeof Us=="function"&&(u=Us(u._payload)),g.isValidElement(u)){const d=AR(u),h=TR(c,u.props);return u.type!==g.Fragment&&(h.ref=i?ga(i,d):d),g.cloneElement(u,h)}return g.Children.count(u)>1?g.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var CR=Symbol("radix.slottable");function RR(n){return g.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===CR}function TR(n,r){const l={...r};for(const i in r){const u=n[i],c=r[i];/^on[A-Z]/.test(i)?u&&c?l[i]=(...h)=>{const v=c(...h);return u(...h),v}:u&&(l[i]=u):i==="style"?l[i]={...u,...c}:i==="className"&&(l[i]=[u,c].filter(Boolean).join(" "))}return{...n,...l}}function AR(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}function Wy(n){var r,l,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(r=0;r<u;r++)n[r]&&(l=Wy(n[r]))&&(i&&(i+=" "),i+=l)}else for(l in n)n[l]&&(i&&(i+=" "),i+=l);return i}function eb(){for(var n,r,l=0,i="",u=arguments.length;l<u;l++)(n=arguments[l])&&(r=Wy(n))&&(i&&(i+=" "),i+=r);return i}const Ov=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,_v=eb,NR=(n,r)=>l=>{var i;if(r?.variants==null)return _v(n,l?.class,l?.className);const{variants:u,defaultVariants:c}=r,d=Object.keys(u).map(m=>{const x=l?.[m],p=c?.[m];if(x===null)return null;const S=Ov(x)||Ov(p);return u[m][S]}),h=l&&Object.entries(l).reduce((m,x)=>{let[p,S]=x;return S===void 0||(m[p]=S),m},{}),v=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((m,x)=>{let{class:p,className:S,...R}=x;return Object.entries(R).every(C=>{let[E,T]=C;return Array.isArray(T)?T.includes({...c,...h}[E]):{...c,...h}[E]===T})?[...m,p,S]:m},[]);return _v(n,d,v,l?.class,l?.className)},MR=(n,r)=>{const l=new Array(n.length+r.length);for(let i=0;i<n.length;i++)l[i]=n[i];for(let i=0;i<r.length;i++)l[n.length+i]=r[i];return l},OR=(n,r)=>({classGroupId:n,validator:r}),tb=(n=new Map,r=null,l)=>({nextPart:n,validators:r,classGroupId:l}),ks="-",jv=[],_R="arbitrary..",jR=n=>{const r=zR(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return DR(d);const h=d.split(ks),v=h[0]===""&&h.length>1?1:0;return nb(h,v,r)},getConflictingClassGroupIds:(d,h)=>{if(h){const v=i[d],m=l[d];return v?m?MR(m,v):v:m||jv}return l[d]||jv}}},nb=(n,r,l)=>{if(n.length-r===0)return l.classGroupId;const u=n[r],c=l.nextPart.get(u);if(c){const m=nb(n,r+1,c);if(m)return m}const d=l.validators;if(d===null)return;const h=r===0?n.join(ks):n.slice(r).join(ks),v=d.length;for(let m=0;m<v;m++){const x=d[m];if(x.validator(h))return x.classGroupId}},DR=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),l=r.indexOf(":"),i=r.slice(0,l);return i?_R+i:void 0})(),zR=n=>{const{theme:r,classGroups:l}=n;return LR(l,r)},LR=(n,r)=>{const l=tb();for(const i in n){const u=n[i];Ld(u,l,i,r)}return l},Ld=(n,r,l,i)=>{const u=n.length;for(let c=0;c<u;c++){const d=n[c];UR(d,r,l,i)}},UR=(n,r,l,i)=>{if(typeof n=="string"){kR(n,r,l);return}if(typeof n=="function"){BR(n,r,l,i);return}HR(n,r,l,i)},kR=(n,r,l)=>{const i=n===""?r:ab(r,n);i.classGroupId=l},BR=(n,r,l,i)=>{if(PR(n)){Ld(n(i),r,l,i);return}r.validators===null&&(r.validators=[]),r.validators.push(OR(l,n))},HR=(n,r,l,i)=>{const u=Object.entries(n),c=u.length;for(let d=0;d<c;d++){const[h,v]=u[d];Ld(v,ab(r,h),l,i)}},ab=(n,r)=>{let l=n;const i=r.split(ks),u=i.length;for(let c=0;c<u;c++){const d=i[c];let h=l.nextPart.get(d);h||(h=tb(),l.nextPart.set(d,h)),l=h}return l},PR=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,qR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,l=Object.create(null),i=Object.create(null);const u=(c,d)=>{l[c]=d,r++,r>n&&(r=0,i=l,l=Object.create(null))};return{get(c){let d=l[c];if(d!==void 0)return d;if((d=i[c])!==void 0)return u(c,d),d},set(c,d){c in l?l[c]=d:u(c,d)}}},id="!",Dv=":",GR=[],zv=(n,r,l,i,u)=>({modifiers:n,hasImportantModifier:r,baseClassName:l,maybePostfixModifierPosition:i,isExternal:u}),VR=n=>{const{prefix:r,experimentalParseClassName:l}=n;let i=u=>{const c=[];let d=0,h=0,v=0,m;const x=u.length;for(let E=0;E<x;E++){const T=u[E];if(d===0&&h===0){if(T===Dv){c.push(u.slice(v,E)),v=E+1;continue}if(T==="/"){m=E;continue}}T==="["?d++:T==="]"?d--:T==="("?h++:T===")"&&h--}const p=c.length===0?u:u.slice(v);let S=p,R=!1;p.endsWith(id)?(S=p.slice(0,-1),R=!0):p.startsWith(id)&&(S=p.slice(1),R=!0);const C=m&&m>v?m-v:void 0;return zv(c,R,S,C)};if(r){const u=r+Dv,c=i;i=d=>d.startsWith(u)?c(d.slice(u.length)):zv(GR,!1,d,void 0,!0)}if(l){const u=i;i=c=>l({className:c,parseClassName:u})}return i},YR=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((l,i)=>{r.set(l,1e6+i)}),l=>{const i=[];let u=[];for(let c=0;c<l.length;c++){const d=l[c],h=d[0]==="[",v=r.has(d);h||v?(u.length>0&&(u.sort(),i.push(...u),u=[]),i.push(d)):u.push(d)}return u.length>0&&(u.sort(),i.push(...u)),i}},QR=n=>({cache:qR(n.cacheSize),parseClassName:VR(n),sortModifiers:YR(n),...jR(n)}),FR=/\s+/,KR=(n,r)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:u,sortModifiers:c}=r,d=[],h=n.trim().split(FR);let v="";for(let m=h.length-1;m>=0;m-=1){const x=h[m],{isExternal:p,modifiers:S,hasImportantModifier:R,baseClassName:C,maybePostfixModifierPosition:E}=l(x);if(p){v=x+(v.length>0?" "+v:v);continue}let T=!!E,A=i(T?C.substring(0,E):C);if(!A){if(!T){v=x+(v.length>0?" "+v:v);continue}if(A=i(C),!A){v=x+(v.length>0?" "+v:v);continue}T=!1}const N=S.length===0?"":S.length===1?S[0]:c(S).join(":"),_=R?N+id:N,H=_+A;if(d.indexOf(H)>-1)continue;d.push(H);const V=u(A,T);for(let W=0;W<V.length;++W){const B=V[W];d.push(_+B)}v=x+(v.length>0?" "+v:v)}return v},IR=(...n)=>{let r=0,l,i,u="";for(;r<n.length;)(l=n[r++])&&(i=rb(l))&&(u&&(u+=" "),u+=i);return u},rb=n=>{if(typeof n=="string")return n;let r,l="";for(let i=0;i<n.length;i++)n[i]&&(r=rb(n[i]))&&(l&&(l+=" "),l+=r);return l},XR=(n,...r)=>{let l,i,u,c;const d=v=>{const m=r.reduce((x,p)=>p(x),n());return l=QR(m),i=l.cache.get,u=l.cache.set,c=h,h(v)},h=v=>{const m=i(v);if(m)return m;const x=KR(v,l);return u(v,x),x};return c=d,(...v)=>c(IR(...v))},$R=[],ot=n=>{const r=l=>l[n]||$R;return r.isThemeGetter=!0,r},lb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ob=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZR=/^\d+\/\d+$/,JR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,e2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,t2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wl=n=>ZR.test(n),Re=n=>!!n&&!Number.isNaN(Number(n)),Ya=n=>!!n&&Number.isInteger(Number(n)),kf=n=>n.endsWith("%")&&Re(n.slice(0,-1)),ua=n=>JR.test(n),a2=()=>!0,r2=n=>WR.test(n)&&!e2.test(n),ib=()=>!1,l2=n=>t2.test(n),o2=n=>n2.test(n),i2=n=>!se(n)&&!ue(n),s2=n=>Dl(n,cb,ib),se=n=>lb.test(n),Sr=n=>Dl(n,fb,r2),Bf=n=>Dl(n,h2,Re),Lv=n=>Dl(n,sb,ib),u2=n=>Dl(n,ub,o2),ys=n=>Dl(n,db,l2),ue=n=>ob.test(n),ko=n=>zl(n,fb),c2=n=>zl(n,m2),Uv=n=>zl(n,sb),f2=n=>zl(n,cb),d2=n=>zl(n,ub),bs=n=>zl(n,db,!0),Dl=(n,r,l)=>{const i=lb.exec(n);return i?i[1]?r(i[1]):l(i[2]):!1},zl=(n,r,l=!1)=>{const i=ob.exec(n);return i?i[1]?r(i[1]):l:!1},sb=n=>n==="position"||n==="percentage",ub=n=>n==="image"||n==="url",cb=n=>n==="length"||n==="size"||n==="bg-size",fb=n=>n==="length",h2=n=>n==="number",m2=n=>n==="family-name",db=n=>n==="shadow",p2=()=>{const n=ot("color"),r=ot("font"),l=ot("text"),i=ot("font-weight"),u=ot("tracking"),c=ot("leading"),d=ot("breakpoint"),h=ot("container"),v=ot("spacing"),m=ot("radius"),x=ot("shadow"),p=ot("inset-shadow"),S=ot("text-shadow"),R=ot("drop-shadow"),C=ot("blur"),E=ot("perspective"),T=ot("aspect"),A=ot("ease"),N=ot("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...H(),ue,se],W=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],G=()=>[ue,se,v],ne=()=>[wl,"full","auto",...G()],re=()=>[Ya,"none","subgrid",ue,se],de=()=>["auto",{span:["full",Ya,ue,se]},Ya,ue,se],fe=()=>[Ya,"auto",ue,se],me=()=>["auto","min","max","fr",ue,se],pe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ve=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...G()],Y=()=>[wl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],k=()=>[n,ue,se],J=()=>[...H(),Uv,Lv,{position:[ue,se]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",f2,s2,{size:[ue,se]}],F=()=>[kf,ko,Sr],Q=()=>["","none","full",m,ue,se],Z=()=>["",Re,ko,Sr],te=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Re,kf,Uv,Lv],ae=()=>["","none",C,ue,se],be=()=>["none",Re,ue,se],Ee=()=>["none",Re,ue,se],Te=()=>[Re,ue,se],Me=()=>[wl,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ua],breakpoint:[ua],color:[a2],container:[ua],"drop-shadow":[ua],ease:["in","out","in-out"],font:[i2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ua],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ua],shadow:[ua],spacing:["px",Re],text:[ua],"text-shadow":[ua],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wl,se,ue,T]}],container:["container"],columns:[{columns:[Re,se,ue,h]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{start:ne()}],end:[{end:ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[Ya,"auto",ue,se]}],basis:[{basis:[wl,"full","auto",h,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,wl,"auto","initial","none",se]}],grow:[{grow:["",Re,ue,se]}],shrink:[{shrink:["",Re,ue,se]}],order:[{order:[Ya,"first","last","none",ue,se]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:de()}],"col-start":[{"col-start":fe()}],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:de()}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":me()}],"auto-rows":[{"auto-rows":me()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...pe(),"normal"]}],"justify-items":[{"justify-items":[...ve(),"normal"]}],"justify-self":[{"justify-self":["auto",...ve()]}],"align-content":[{content:["normal",...pe()]}],"align-items":[{items:[...ve(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ve(),{baseline:["","last"]}]}],"place-content":[{"place-content":pe()}],"place-items":[{"place-items":[...ve(),"baseline"]}],"place-self":[{"place-self":["auto",...ve()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[h,"screen",...Y()]}],"min-w":[{"min-w":[h,"screen","none",...Y()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",l,ko,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ue,Bf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kf,se]}],"font-family":[{font:[c2,se,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,ue,se]}],"line-clamp":[{"line-clamp":[Re,"none",ue,Bf]}],leading:[{leading:[c,...G()]}],"list-image":[{"list-image":["none",ue,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ue,Sr]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Re,"auto",ue,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ya,ue,se],radial:["",ue,se],conic:[Ya,ue,se]},d2,u2]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ue,se]}],"outline-w":[{outline:["",Re,ko,Sr]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",x,bs,ys]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",p,bs,ys]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Re,Sr]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",S,bs,ys]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Re,ue,se]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[ue,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":H()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,se]}],filter:[{filter:["","none",ue,se]}],blur:[{blur:ae()}],brightness:[{brightness:[Re,ue,se]}],contrast:[{contrast:[Re,ue,se]}],"drop-shadow":[{"drop-shadow":["","none",R,bs,ys]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",Re,ue,se]}],"hue-rotate":[{"hue-rotate":[Re,ue,se]}],invert:[{invert:["",Re,ue,se]}],saturate:[{saturate:[Re,ue,se]}],sepia:[{sepia:["",Re,ue,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,se]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ue,se]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ue,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ue,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ue,se]}],"backdrop-invert":[{"backdrop-invert":["",Re,ue,se]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ue,se]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ue,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ue,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ue,se]}],ease:[{ease:["linear","initial",A,ue,se]}],delay:[{delay:[Re,ue,se]}],animate:[{animate:["none",N,ue,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ue,se]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[ue,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Me()}],"translate-x":[{"translate-x":Me()}],"translate-y":[{"translate-y":Me()}],"translate-z":[{"translate-z":Me()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue,se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue,se]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[Re,ko,Sr,Bf]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},g2=XR(p2);function st(...n){return g2(eb(n))}const v2=NR("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Nt({className:n,variant:r,size:l,asChild:i=!1,...u}){const c=i?SR:"button";return y.jsx(c,{"data-slot":"button",className:st(v2({variant:r,size:l,className:n})),...u})}const y2="https://image.tmdb.org/t/p";function Zs({path:n,alt:r,title:l,size:i="w500",className:u}){return n?y.jsx("img",{alt:r,className:u,loading:"lazy",src:`${y2}/${i}${n}`}):y.jsxs("div",{className:st("bg-zinc-800 flex flex-col items-center justify-center aspect-[2/3] p-4 gap-3",u),children:[y.jsx($s,{className:"size-12 text-zinc-600"}),y.jsx("span",{className:"text-zinc-400 text-sm text-center line-clamp-3",children:l})]})}function b2({items:n}){return n.length===0?null:y.jsxs("section",{className:"px-4 py-4 sm:px-6",children:[y.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:"Continue Watching"}),y.jsx("div",{className:"flex gap-2 overflow-x-auto scroll-smooth pb-2 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:n.map(r=>{const l=r.type==="movie",i=l?`movie-${r.movie.id}`:`episode-${r.episode.id}`,u=l?`/watch/${r.movie.id}`:`/watch/episode/${r.episode.id}`,c=l?r.movie.title:r.show.title,d=l?null:`S${r.episode.seasonNumber} E${r.episode.episodeNumber}`,h=l?r.movie.posterPath:r.show.posterPath,v=r.duration?Math.min(r.currentTime/r.duration*100,100):0;return y.jsxs(pa,{className:"flex-shrink-0 w-32 md:w-40 group",to:u,children:[y.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm",children:[y.jsx(Zs,{alt:c,className:"w-full transition-transform duration-200 group-hover:scale-105",path:h,size:"w342",title:c}),y.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-muted/50",children:y.jsx("div",{className:"h-full bg-red-600 transition-all",style:{width:`${v}%`}})})]}),y.jsx("p",{className:"text-xs text-muted-foreground truncate mt-1.5 px-0.5",children:c}),d&&y.jsx("p",{className:"text-xs text-muted-foreground/70 truncate px-0.5",children:d})]},i)})})]})}async function Ud(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function x2(){const n=await fetch("/api/favorites");if(!n.ok)throw new Error(await Ud(n));return await n.json()}function w2(){return gn({queryKey:["favorites"],queryFn:x2})}function S2(n){return n.kind==="movie"?`/api/favorites/status?movieId=${n.movieId}`:`/api/favorites/status?showId=${n.showId}`}function hb(n){return n.kind==="movie"?["favorite-status","movie",n.movieId]:["favorite-status","show",n.showId]}function E2(n){return gn({queryKey:hb(n),queryFn:async()=>{const r=await fetch(S2(n));if(!r.ok)throw new Error(await Ud(r));return(await r.json()).favorite}})}function C2(){const n=qn();return Xa({mutationFn:async r=>{const l=r.target.kind==="movie"?{movieId:r.target.movieId}:{showId:r.target.showId},i=await fetch("/api/favorites",{method:r.favorite?"POST":"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await Ud(i))},onSuccess:(r,l)=>{n.invalidateQueries({queryKey:hb(l.target)}),n.invalidateQueries({queryKey:["favorites"]})}})}function R2({className:n,target:r}){const{data:l}=E2(r),i=C2();function u(d){d.preventDefault(),d.stopPropagation(),i.mutate({target:r,favorite:!l},{onError:h=>{Gt.error(h instanceof Error?h.message:"Failed to update favorite")}})}const c=!!l;return y.jsx("button",{"aria-label":c?"Remove from favorites":"Add to favorites","aria-pressed":c,className:st("flex size-8 items-center justify-center rounded-full bg-black/50 text-white opacity-0 transition-opacity hover:bg-black/70 group-hover:opacity-100 focus:opacity-100",c&&"opacity-100",n),onClick:u,type:"button",children:y.jsx(sR,{className:st("size-4 transition-colors",c?"fill-red-500 stroke-red-500":"stroke-white")})})}function Go({items:n,title:r}){return n.length===0?null:y.jsxs("section",{className:"px-4 py-4 sm:px-6",children:[y.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:r}),y.jsx("div",{className:"flex gap-2 overflow-x-auto scroll-smooth pb-2 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:n.map(l=>{const i=l.type==="movie"?`movie-${l.item.id}`:`show-${l.item.id}`,u=l.type==="movie"?`/watch/${l.item.id}`:`/shows/${l.item.id}`;return y.jsxs(pa,{className:"flex-shrink-0 w-32 md:w-40 group",to:u,children:[y.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm",children:[y.jsx(Zs,{alt:l.item.title,className:"w-full transition-transform duration-200 group-hover:scale-105",path:l.item.posterPath,size:"w342",title:l.item.title}),y.jsx(R2,{className:"absolute right-2 top-2",target:l.type==="movie"?{kind:"movie",movieId:l.item.id}:{kind:"show",showId:l.item.id}})]}),y.jsx("p",{className:"text-xs text-muted-foreground truncate mt-1.5 px-0.5",children:l.item.title})]},i)})})]})}function T2(){const{data:n}=w2(),r=g.useMemo(()=>n?n.map(l=>l.type==="movie"?{type:"movie",item:l.movie}:{type:"show",item:l.show}):[],[n]);return r.length===0?null:y.jsx(Go,{items:r,title:"Favorites"})}function he(n,r,{checkForDefaultPrevented:l=!0}={}){return function(u){if(n?.(u),l===!1||!u.defaultPrevented)return r?.(u)}}function A2(n,r){const l=g.createContext(r),i=c=>{const{children:d,...h}=c,v=g.useMemo(()=>h,Object.values(h));return y.jsx(l.Provider,{value:v,children:d})};i.displayName=n+"Provider";function u(c){const d=g.useContext(l);if(d)return d;if(r!==void 0)return r;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[i,u]}function _r(n,r=[]){let l=[];function i(c,d){const h=g.createContext(d),v=l.length;l=[...l,d];const m=p=>{const{scope:S,children:R,...C}=p,E=S?.[n]?.[v]||h,T=g.useMemo(()=>C,Object.values(C));return y.jsx(E.Provider,{value:T,children:R})};m.displayName=c+"Provider";function x(p,S){const R=S?.[n]?.[v]||h,C=g.useContext(R);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[m,x]}const u=()=>{const c=l.map(d=>g.createContext(d));return function(h){const v=h?.[n]||c;return g.useMemo(()=>({[`__scope${n}`]:{...h,[n]:v}}),[h,v])}};return u.scopeName=n,[i,N2(u,...r)]}function N2(...n){const r=n[0];if(n.length===1)return r;const l=()=>{const i=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(c){const d=i.reduce((h,{useScope:v,scopeName:m})=>{const p=v(c)[`__scope${m}`];return{...h,...p}},{});return g.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return l.scopeName=r.scopeName,l}var wt=globalThis?.document?g.useLayoutEffect:()=>{},M2=Sd[" useInsertionEffect ".trim().toString()]||wt;function Vo({prop:n,defaultProp:r,onChange:l=()=>{},caller:i}){const[u,c,d]=O2({defaultProp:r,onChange:l}),h=n!==void 0,v=h?n:u;{const x=g.useRef(n!==void 0);g.useEffect(()=>{const p=x.current;p!==h&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=h},[h,i])}const m=g.useCallback(x=>{if(h){const p=_2(x)?x(n):x;p!==n&&d.current?.(p)}else c(x)},[h,n,c,d]);return[v,m]}function O2({defaultProp:n,onChange:r}){const[l,i]=g.useState(n),u=g.useRef(l),c=g.useRef(r);return M2(()=>{c.current=r},[r]),g.useEffect(()=>{u.current!==l&&(c.current?.(l),u.current=l)},[l,u]),[l,i,c]}function _2(n){return typeof n=="function"}function j2(n){const r=D2(n),l=g.forwardRef((i,u)=>{const{children:c,...d}=i,h=g.Children.toArray(c),v=h.find(L2);if(v){const m=v.props.children,x=h.map(p=>p===v?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:p);return y.jsx(r,{...d,ref:u,children:g.isValidElement(m)?g.cloneElement(m,void 0,x):null})}return y.jsx(r,{...d,ref:u,children:c})});return l.displayName=`${n}.Slot`,l}function D2(n){const r=g.forwardRef((l,i)=>{const{children:u,...c}=l;if(g.isValidElement(u)){const d=k2(u),h=U2(c,u.props);return u.type!==g.Fragment&&(h.ref=i?ga(i,d):d),g.cloneElement(u,h)}return g.Children.count(u)>1?g.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var z2=Symbol("radix.slottable");function L2(n){return g.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===z2}function U2(n,r){const l={...r};for(const i in r){const u=n[i],c=r[i];/^on[A-Z]/.test(i)?u&&c?l[i]=(...h)=>{const v=c(...h);return u(...h),v}:u&&(l[i]=u):i==="style"?l[i]={...u,...c}:i==="className"&&(l[i]=[u,c].filter(Boolean).join(" "))}return{...n,...l}}function k2(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var B2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],De=B2.reduce((n,r)=>{const l=j2(`Primitive.${r}`),i=g.forwardRef((u,c)=>{const{asChild:d,...h}=u,v=d?l:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(v,{...h,ref:c})});return i.displayName=`Primitive.${r}`,{...n,[r]:i}},{});function mb(n,r){n&&$o.flushSync(()=>n.dispatchEvent(r))}function kv(n){const r=H2(n),l=g.forwardRef((i,u)=>{const{children:c,...d}=i,h=g.Children.toArray(c),v=h.find(q2);if(v){const m=v.props.children,x=h.map(p=>p===v?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:p);return y.jsx(r,{...d,ref:u,children:g.isValidElement(m)?g.cloneElement(m,void 0,x):null})}return y.jsx(r,{...d,ref:u,children:c})});return l.displayName=`${n}.Slot`,l}function H2(n){const r=g.forwardRef((l,i)=>{const{children:u,...c}=l;if(g.isValidElement(u)){const d=V2(u),h=G2(c,u.props);return u.type!==g.Fragment&&(h.ref=i?ga(i,d):d),g.cloneElement(u,h)}return g.Children.count(u)>1?g.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var P2=Symbol("radix.slottable");function q2(n){return g.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===P2}function G2(n,r){const l={...r};for(const i in r){const u=n[i],c=r[i];/^on[A-Z]/.test(i)?u&&c?l[i]=(...h)=>{const v=c(...h);return u(...h),v}:u&&(l[i]=u):i==="style"?l[i]={...u,...c}:i==="className"&&(l[i]=[u,c].filter(Boolean).join(" "))}return{...n,...l}}function V2(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}function kd(n){const r=n+"CollectionProvider",[l,i]=_r(r),[u,c]=l(r,{collectionRef:{current:null},itemMap:new Map}),d=E=>{const{scope:T,children:A}=E,N=ee.useRef(null),_=ee.useRef(new Map).current;return y.jsx(u,{scope:T,itemMap:_,collectionRef:N,children:A})};d.displayName=r;const h=n+"CollectionSlot",v=kv(h),m=ee.forwardRef((E,T)=>{const{scope:A,children:N}=E,_=c(h,A),H=Ve(T,_.collectionRef);return y.jsx(v,{ref:H,children:N})});m.displayName=h;const x=n+"CollectionItemSlot",p="data-radix-collection-item",S=kv(x),R=ee.forwardRef((E,T)=>{const{scope:A,children:N,..._}=E,H=ee.useRef(null),V=Ve(T,H),W=c(x,A);return ee.useEffect(()=>(W.itemMap.set(H,{ref:H,..._}),()=>{W.itemMap.delete(H)})),y.jsx(S,{[p]:"",ref:V,children:N})});R.displayName=x;function C(E){const T=c(n+"CollectionConsumer",E);return ee.useCallback(()=>{const N=T.collectionRef.current;if(!N)return[];const _=Array.from(N.querySelectorAll(`[${p}]`));return Array.from(T.itemMap.values()).sort((W,B)=>_.indexOf(W.ref.current)-_.indexOf(B.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:d,Slot:m,ItemSlot:R},C,i]}var Y2=g.createContext(void 0);function Bd(n){const r=g.useContext(Y2);return n||r||"ltr"}function Hn(n){const r=g.useRef(n);return g.useEffect(()=>{r.current=n}),g.useMemo(()=>(...l)=>r.current?.(...l),[])}function Q2(n,r=globalThis?.document){const l=Hn(n);g.useEffect(()=>{const i=u=>{u.key==="Escape"&&l(u)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[l,r])}var F2="DismissableLayer",sd="dismissableLayer.update",K2="dismissableLayer.pointerDownOutside",I2="dismissableLayer.focusOutside",Bv,pb=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Js=g.forwardRef((n,r)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,onDismiss:h,...v}=n,m=g.useContext(pb),[x,p]=g.useState(null),S=x?.ownerDocument??globalThis?.document,[,R]=g.useState({}),C=Ve(r,B=>p(B)),E=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),A=E.indexOf(T),N=x?E.indexOf(x):-1,_=m.layersWithOutsidePointerEventsDisabled.size>0,H=N>=A,V=Z2(B=>{const G=B.target,ne=[...m.branches].some(re=>re.contains(G));!H||ne||(u?.(B),d?.(B),B.defaultPrevented||h?.())},S),W=J2(B=>{const G=B.target;[...m.branches].some(re=>re.contains(G))||(c?.(B),d?.(B),B.defaultPrevented||h?.())},S);return Q2(B=>{N===m.layers.size-1&&(i?.(B),!B.defaultPrevented&&h&&(B.preventDefault(),h()))},S),g.useEffect(()=>{if(x)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Bv=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(x)),m.layers.add(x),Hv(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Bv)}},[x,S,l,m]),g.useEffect(()=>()=>{x&&(m.layers.delete(x),m.layersWithOutsidePointerEventsDisabled.delete(x),Hv())},[x,m]),g.useEffect(()=>{const B=()=>R({});return document.addEventListener(sd,B),()=>document.removeEventListener(sd,B)},[]),y.jsx(De.div,{...v,ref:C,style:{pointerEvents:_?H?"auto":"none":void 0,...n.style},onFocusCapture:he(n.onFocusCapture,W.onFocusCapture),onBlurCapture:he(n.onBlurCapture,W.onBlurCapture),onPointerDownCapture:he(n.onPointerDownCapture,V.onPointerDownCapture)})});Js.displayName=F2;var X2="DismissableLayerBranch",$2=g.forwardRef((n,r)=>{const l=g.useContext(pb),i=g.useRef(null),u=Ve(r,i);return g.useEffect(()=>{const c=i.current;if(c)return l.branches.add(c),()=>{l.branches.delete(c)}},[l.branches]),y.jsx(De.div,{...n,ref:u})});$2.displayName=X2;function Z2(n,r=globalThis?.document){const l=Hn(n),i=g.useRef(!1),u=g.useRef(()=>{});return g.useEffect(()=>{const c=h=>{if(h.target&&!i.current){let v=function(){gb(K2,l,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",u.current),u.current=v,r.addEventListener("click",u.current,{once:!0})):v()}else r.removeEventListener("click",u.current);i.current=!1},d=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(d),r.removeEventListener("pointerdown",c),r.removeEventListener("click",u.current)}},[r,l]),{onPointerDownCapture:()=>i.current=!0}}function J2(n,r=globalThis?.document){const l=Hn(n),i=g.useRef(!1);return g.useEffect(()=>{const u=c=>{c.target&&!i.current&&gb(I2,l,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",u),()=>r.removeEventListener("focusin",u)},[r,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Hv(){const n=new CustomEvent(sd);document.dispatchEvent(n)}function gb(n,r,l,{discrete:i}){const u=l.originalEvent.target,c=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:l});r&&u.addEventListener(n,r,{once:!0}),i?mb(u,c):u.dispatchEvent(c)}var Hf=0;function Hd(){g.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Pv()),document.body.insertAdjacentElement("beforeend",n[1]??Pv()),Hf++,()=>{Hf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Hf--}},[])}function Pv(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Pf="focusScope.autoFocusOnMount",qf="focusScope.autoFocusOnUnmount",qv={bubbles:!1,cancelable:!0},W2="FocusScope",Ws=g.forwardRef((n,r)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:c,...d}=n,[h,v]=g.useState(null),m=Hn(u),x=Hn(c),p=g.useRef(null),S=Ve(r,E=>v(E)),R=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(i){let E=function(_){if(R.paused||!h)return;const H=_.target;h.contains(H)?p.current=H:Qa(p.current,{select:!0})},T=function(_){if(R.paused||!h)return;const H=_.relatedTarget;H!==null&&(h.contains(H)||Qa(p.current,{select:!0}))},A=function(_){if(document.activeElement===document.body)for(const V of _)V.removedNodes.length>0&&Qa(h)};document.addEventListener("focusin",E),document.addEventListener("focusout",T);const N=new MutationObserver(A);return h&&N.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",T),N.disconnect()}}},[i,h,R.paused]),g.useEffect(()=>{if(h){Vv.add(R);const E=document.activeElement;if(!h.contains(E)){const A=new CustomEvent(Pf,qv);h.addEventListener(Pf,m),h.dispatchEvent(A),A.defaultPrevented||(eT(lT(vb(h)),{select:!0}),document.activeElement===E&&Qa(h))}return()=>{h.removeEventListener(Pf,m),setTimeout(()=>{const A=new CustomEvent(qf,qv);h.addEventListener(qf,x),h.dispatchEvent(A),A.defaultPrevented||Qa(E??document.body,{select:!0}),h.removeEventListener(qf,x),Vv.remove(R)},0)}}},[h,m,x,R]);const C=g.useCallback(E=>{if(!l&&!i||R.paused)return;const T=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,A=document.activeElement;if(T&&A){const N=E.currentTarget,[_,H]=tT(N);_&&H?!E.shiftKey&&A===H?(E.preventDefault(),l&&Qa(_,{select:!0})):E.shiftKey&&A===_&&(E.preventDefault(),l&&Qa(H,{select:!0})):A===N&&E.preventDefault()}},[l,i,R.paused]);return y.jsx(De.div,{tabIndex:-1,...d,ref:S,onKeyDown:C})});Ws.displayName=W2;function eT(n,{select:r=!1}={}){const l=document.activeElement;for(const i of n)if(Qa(i,{select:r}),document.activeElement!==l)return}function tT(n){const r=vb(n),l=Gv(r,n),i=Gv(r.reverse(),n);return[l,i]}function vb(n){const r=[],l=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)r.push(l.currentNode);return r}function Gv(n,r){for(const l of n)if(!nT(l,{upTo:r}))return l}function nT(n,{upTo:r}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(r!==void 0&&n===r)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function aT(n){return n instanceof HTMLInputElement&&"select"in n}function Qa(n,{select:r=!1}={}){if(n&&n.focus){const l=document.activeElement;n.focus({preventScroll:!0}),n!==l&&aT(n)&&r&&n.select()}}var Vv=rT();function rT(){let n=[];return{add(r){const l=n[0];r!==l&&l?.pause(),n=Yv(n,r),n.unshift(r)},remove(r){n=Yv(n,r),n[0]?.resume()}}}function Yv(n,r){const l=[...n],i=l.indexOf(r);return i!==-1&&l.splice(i,1),l}function lT(n){return n.filter(r=>r.tagName!=="A")}var oT=Sd[" useId ".trim().toString()]||(()=>{}),iT=0;function fa(n){const[r,l]=g.useState(oT());return wt(()=>{l(i=>i??String(iT++))},[n]),n||(r?`radix-${r}`:"")}const sT=["top","right","bottom","left"],Ka=Math.min,Jt=Math.max,Bs=Math.round,xs=Math.floor,Bn=n=>({x:n,y:n}),uT={left:"right",right:"left",bottom:"top",top:"bottom"},cT={start:"end",end:"start"};function ud(n,r,l){return Jt(n,Ka(r,l))}function ha(n,r){return typeof n=="function"?n(r):n}function ma(n){return n.split("-")[0]}function Ll(n){return n.split("-")[1]}function Pd(n){return n==="x"?"y":"x"}function qd(n){return n==="y"?"height":"width"}const fT=new Set(["top","bottom"]);function kn(n){return fT.has(ma(n))?"y":"x"}function Gd(n){return Pd(kn(n))}function dT(n,r,l){l===void 0&&(l=!1);const i=Ll(n),u=Gd(n),c=qd(u);let d=u==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(d=Hs(d)),[d,Hs(d)]}function hT(n){const r=Hs(n);return[cd(n),r,cd(r)]}function cd(n){return n.replace(/start|end/g,r=>cT[r])}const Qv=["left","right"],Fv=["right","left"],mT=["top","bottom"],pT=["bottom","top"];function gT(n,r,l){switch(n){case"top":case"bottom":return l?r?Fv:Qv:r?Qv:Fv;case"left":case"right":return r?mT:pT;default:return[]}}function vT(n,r,l,i){const u=Ll(n);let c=gT(ma(n),l==="start",i);return u&&(c=c.map(d=>d+"-"+u),r&&(c=c.concat(c.map(cd)))),c}function Hs(n){return n.replace(/left|right|bottom|top/g,r=>uT[r])}function yT(n){return{top:0,right:0,bottom:0,left:0,...n}}function yb(n){return typeof n!="number"?yT(n):{top:n,right:n,bottom:n,left:n}}function Ps(n){const{x:r,y:l,width:i,height:u}=n;return{width:i,height:u,top:l,left:r,right:r+i,bottom:l+u,x:r,y:l}}function Kv(n,r,l){let{reference:i,floating:u}=n;const c=kn(r),d=Gd(r),h=qd(d),v=ma(r),m=c==="y",x=i.x+i.width/2-u.width/2,p=i.y+i.height/2-u.height/2,S=i[h]/2-u[h]/2;let R;switch(v){case"top":R={x,y:i.y-u.height};break;case"bottom":R={x,y:i.y+i.height};break;case"right":R={x:i.x+i.width,y:p};break;case"left":R={x:i.x-u.width,y:p};break;default:R={x:i.x,y:i.y}}switch(Ll(r)){case"start":R[d]-=S*(l&&m?-1:1);break;case"end":R[d]+=S*(l&&m?-1:1);break}return R}const bT=async(n,r,l)=>{const{placement:i="bottom",strategy:u="absolute",middleware:c=[],platform:d}=l,h=c.filter(Boolean),v=await(d.isRTL==null?void 0:d.isRTL(r));let m=await d.getElementRects({reference:n,floating:r,strategy:u}),{x,y:p}=Kv(m,i,v),S=i,R={},C=0;for(let E=0;E<h.length;E++){const{name:T,fn:A}=h[E],{x:N,y:_,data:H,reset:V}=await A({x,y:p,initialPlacement:i,placement:S,strategy:u,middlewareData:R,rects:m,platform:d,elements:{reference:n,floating:r}});x=N??x,p=_??p,R={...R,[T]:{...R[T],...H}},V&&C<=50&&(C++,typeof V=="object"&&(V.placement&&(S=V.placement),V.rects&&(m=V.rects===!0?await d.getElementRects({reference:n,floating:r,strategy:u}):V.rects),{x,y:p}=Kv(m,S,v)),E=-1)}return{x,y:p,placement:S,strategy:u,middlewareData:R}};async function Yo(n,r){var l;r===void 0&&(r={});const{x:i,y:u,platform:c,rects:d,elements:h,strategy:v}=n,{boundary:m="clippingAncestors",rootBoundary:x="viewport",elementContext:p="floating",altBoundary:S=!1,padding:R=0}=ha(r,n),C=yb(R),T=h[S?p==="floating"?"reference":"floating":p],A=Ps(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(T)))==null||l?T:T.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:m,rootBoundary:x,strategy:v})),N=p==="floating"?{x:i,y:u,width:d.floating.width,height:d.floating.height}:d.reference,_=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),H=await(c.isElement==null?void 0:c.isElement(_))?await(c.getScale==null?void 0:c.getScale(_))||{x:1,y:1}:{x:1,y:1},V=Ps(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:N,offsetParent:_,strategy:v}):N);return{top:(A.top-V.top+C.top)/H.y,bottom:(V.bottom-A.bottom+C.bottom)/H.y,left:(A.left-V.left+C.left)/H.x,right:(V.right-A.right+C.right)/H.x}}const xT=n=>({name:"arrow",options:n,async fn(r){const{x:l,y:i,placement:u,rects:c,platform:d,elements:h,middlewareData:v}=r,{element:m,padding:x=0}=ha(n,r)||{};if(m==null)return{};const p=yb(x),S={x:l,y:i},R=Gd(u),C=qd(R),E=await d.getDimensions(m),T=R==="y",A=T?"top":"left",N=T?"bottom":"right",_=T?"clientHeight":"clientWidth",H=c.reference[C]+c.reference[R]-S[R]-c.floating[C],V=S[R]-c.reference[R],W=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m));let B=W?W[_]:0;(!B||!await(d.isElement==null?void 0:d.isElement(W)))&&(B=h.floating[_]||c.floating[C]);const G=H/2-V/2,ne=B/2-E[C]/2-1,re=Ka(p[A],ne),de=Ka(p[N],ne),fe=re,me=B-E[C]-de,pe=B/2-E[C]/2+G,ve=ud(fe,pe,me),j=!v.arrow&&Ll(u)!=null&&pe!==ve&&c.reference[C]/2-(pe<fe?re:de)-E[C]/2<0,Y=j?pe<fe?pe-fe:pe-me:0;return{[R]:S[R]+Y,data:{[R]:ve,centerOffset:pe-ve-Y,...j&&{alignmentOffset:Y}},reset:j}}}),wT=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var l,i;const{placement:u,middlewareData:c,rects:d,initialPlacement:h,platform:v,elements:m}=r,{mainAxis:x=!0,crossAxis:p=!0,fallbackPlacements:S,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:E=!0,...T}=ha(n,r);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const A=ma(u),N=kn(h),_=ma(h)===h,H=await(v.isRTL==null?void 0:v.isRTL(m.floating)),V=S||(_||!E?[Hs(h)]:hT(h)),W=C!=="none";!S&&W&&V.push(...vT(h,E,C,H));const B=[h,...V],G=await Yo(r,T),ne=[];let re=((i=c.flip)==null?void 0:i.overflows)||[];if(x&&ne.push(G[A]),p){const pe=dT(u,d,H);ne.push(G[pe[0]],G[pe[1]])}if(re=[...re,{placement:u,overflows:ne}],!ne.every(pe=>pe<=0)){var de,fe;const pe=(((de=c.flip)==null?void 0:de.index)||0)+1,ve=B[pe];if(ve&&(!(p==="alignment"?N!==kn(ve):!1)||re.every(k=>kn(k.placement)===N?k.overflows[0]>0:!0)))return{data:{index:pe,overflows:re},reset:{placement:ve}};let j=(fe=re.filter(Y=>Y.overflows[0]<=0).sort((Y,k)=>Y.overflows[1]-k.overflows[1])[0])==null?void 0:fe.placement;if(!j)switch(R){case"bestFit":{var me;const Y=(me=re.filter(k=>{if(W){const J=kn(k.placement);return J===N||J==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((k,J)=>k[1]-J[1])[0])==null?void 0:me[0];Y&&(j=Y);break}case"initialPlacement":j=h;break}if(u!==j)return{reset:{placement:j}}}return{}}}};function Iv(n,r){return{top:n.top-r.height,right:n.right-r.width,bottom:n.bottom-r.height,left:n.left-r.width}}function Xv(n){return sT.some(r=>n[r]>=0)}const ST=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(r){const{rects:l}=r,{strategy:i="referenceHidden",...u}=ha(n,r);switch(i){case"referenceHidden":{const c=await Yo(r,{...u,elementContext:"reference"}),d=Iv(c,l.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Xv(d)}}}case"escaped":{const c=await Yo(r,{...u,altBoundary:!0}),d=Iv(c,l.floating);return{data:{escapedOffsets:d,escaped:Xv(d)}}}default:return{}}}}},bb=new Set(["left","top"]);async function ET(n,r){const{placement:l,platform:i,elements:u}=n,c=await(i.isRTL==null?void 0:i.isRTL(u.floating)),d=ma(l),h=Ll(l),v=kn(l)==="y",m=bb.has(d)?-1:1,x=c&&v?-1:1,p=ha(r,n);let{mainAxis:S,crossAxis:R,alignmentAxis:C}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return h&&typeof C=="number"&&(R=h==="end"?C*-1:C),v?{x:R*x,y:S*m}:{x:S*m,y:R*x}}const CT=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var l,i;const{x:u,y:c,placement:d,middlewareData:h}=r,v=await ET(r,n);return d===((l=h.offset)==null?void 0:l.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:u+v.x,y:c+v.y,data:{...v,placement:d}}}}},RT=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:l,y:i,placement:u}=r,{mainAxis:c=!0,crossAxis:d=!1,limiter:h={fn:T=>{let{x:A,y:N}=T;return{x:A,y:N}}},...v}=ha(n,r),m={x:l,y:i},x=await Yo(r,v),p=kn(ma(u)),S=Pd(p);let R=m[S],C=m[p];if(c){const T=S==="y"?"top":"left",A=S==="y"?"bottom":"right",N=R+x[T],_=R-x[A];R=ud(N,R,_)}if(d){const T=p==="y"?"top":"left",A=p==="y"?"bottom":"right",N=C+x[T],_=C-x[A];C=ud(N,C,_)}const E=h.fn({...r,[S]:R,[p]:C});return{...E,data:{x:E.x-l,y:E.y-i,enabled:{[S]:c,[p]:d}}}}}},TT=function(n){return n===void 0&&(n={}),{options:n,fn(r){const{x:l,y:i,placement:u,rects:c,middlewareData:d}=r,{offset:h=0,mainAxis:v=!0,crossAxis:m=!0}=ha(n,r),x={x:l,y:i},p=kn(u),S=Pd(p);let R=x[S],C=x[p];const E=ha(h,r),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(v){const _=S==="y"?"height":"width",H=c.reference[S]-c.floating[_]+T.mainAxis,V=c.reference[S]+c.reference[_]-T.mainAxis;R<H?R=H:R>V&&(R=V)}if(m){var A,N;const _=S==="y"?"width":"height",H=bb.has(ma(u)),V=c.reference[p]-c.floating[_]+(H&&((A=d.offset)==null?void 0:A[p])||0)+(H?0:T.crossAxis),W=c.reference[p]+c.reference[_]+(H?0:((N=d.offset)==null?void 0:N[p])||0)-(H?T.crossAxis:0);C<V?C=V:C>W&&(C=W)}return{[S]:R,[p]:C}}}},AT=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var l,i;const{placement:u,rects:c,platform:d,elements:h}=r,{apply:v=()=>{},...m}=ha(n,r),x=await Yo(r,m),p=ma(u),S=Ll(u),R=kn(u)==="y",{width:C,height:E}=c.floating;let T,A;p==="top"||p==="bottom"?(T=p,A=S===(await(d.isRTL==null?void 0:d.isRTL(h.floating))?"start":"end")?"left":"right"):(A=p,T=S==="end"?"top":"bottom");const N=E-x.top-x.bottom,_=C-x.left-x.right,H=Ka(E-x[T],N),V=Ka(C-x[A],_),W=!r.middlewareData.shift;let B=H,G=V;if((l=r.middlewareData.shift)!=null&&l.enabled.x&&(G=_),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(B=N),W&&!S){const re=Jt(x.left,0),de=Jt(x.right,0),fe=Jt(x.top,0),me=Jt(x.bottom,0);R?G=C-2*(re!==0||de!==0?re+de:Jt(x.left,x.right)):B=E-2*(fe!==0||me!==0?fe+me:Jt(x.top,x.bottom))}await v({...r,availableWidth:G,availableHeight:B});const ne=await d.getDimensions(h.floating);return C!==ne.width||E!==ne.height?{reset:{rects:!0}}:{}}}};function eu(){return typeof window<"u"}function Ul(n){return xb(n)?(n.nodeName||"").toLowerCase():"#document"}function Wt(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function Gn(n){var r;return(r=(xb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function xb(n){return eu()?n instanceof Node||n instanceof Wt(n).Node:!1}function Rn(n){return eu()?n instanceof Element||n instanceof Wt(n).Element:!1}function Pn(n){return eu()?n instanceof HTMLElement||n instanceof Wt(n).HTMLElement:!1}function $v(n){return!eu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Wt(n).ShadowRoot}const NT=new Set(["inline","contents"]);function Zo(n){const{overflow:r,overflowX:l,overflowY:i,display:u}=Tn(n);return/auto|scroll|overlay|hidden|clip/.test(r+i+l)&&!NT.has(u)}const MT=new Set(["table","td","th"]);function OT(n){return MT.has(Ul(n))}const _T=[":popover-open",":modal"];function tu(n){return _T.some(r=>{try{return n.matches(r)}catch{return!1}})}const jT=["transform","translate","scale","rotate","perspective"],DT=["transform","translate","scale","rotate","perspective","filter"],zT=["paint","layout","strict","content"];function Vd(n){const r=Yd(),l=Rn(n)?Tn(n):n;return jT.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!r&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!r&&(l.filter?l.filter!=="none":!1)||DT.some(i=>(l.willChange||"").includes(i))||zT.some(i=>(l.contain||"").includes(i))}function LT(n){let r=Ia(n);for(;Pn(r)&&!Al(r);){if(Vd(r))return r;if(tu(r))return null;r=Ia(r)}return null}function Yd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const UT=new Set(["html","body","#document"]);function Al(n){return UT.has(Ul(n))}function Tn(n){return Wt(n).getComputedStyle(n)}function nu(n){return Rn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Ia(n){if(Ul(n)==="html")return n;const r=n.assignedSlot||n.parentNode||$v(n)&&n.host||Gn(n);return $v(r)?r.host:r}function wb(n){const r=Ia(n);return Al(r)?n.ownerDocument?n.ownerDocument.body:n.body:Pn(r)&&Zo(r)?r:wb(r)}function Qo(n,r,l){var i;r===void 0&&(r=[]),l===void 0&&(l=!0);const u=wb(n),c=u===((i=n.ownerDocument)==null?void 0:i.body),d=Wt(u);if(c){const h=fd(d);return r.concat(d,d.visualViewport||[],Zo(u)?u:[],h&&l?Qo(h):[])}return r.concat(u,Qo(u,[],l))}function fd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Sb(n){const r=Tn(n);let l=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const u=Pn(n),c=u?n.offsetWidth:l,d=u?n.offsetHeight:i,h=Bs(l)!==c||Bs(i)!==d;return h&&(l=c,i=d),{width:l,height:i,$:h}}function Qd(n){return Rn(n)?n:n.contextElement}function Rl(n){const r=Qd(n);if(!Pn(r))return Bn(1);const l=r.getBoundingClientRect(),{width:i,height:u,$:c}=Sb(r);let d=(c?Bs(l.width):l.width)/i,h=(c?Bs(l.height):l.height)/u;return(!d||!Number.isFinite(d))&&(d=1),(!h||!Number.isFinite(h))&&(h=1),{x:d,y:h}}const kT=Bn(0);function Eb(n){const r=Wt(n);return!Yd()||!r.visualViewport?kT:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function BT(n,r,l){return r===void 0&&(r=!1),!l||r&&l!==Wt(n)?!1:r}function Ar(n,r,l,i){r===void 0&&(r=!1),l===void 0&&(l=!1);const u=n.getBoundingClientRect(),c=Qd(n);let d=Bn(1);r&&(i?Rn(i)&&(d=Rl(i)):d=Rl(n));const h=BT(c,l,i)?Eb(c):Bn(0);let v=(u.left+h.x)/d.x,m=(u.top+h.y)/d.y,x=u.width/d.x,p=u.height/d.y;if(c){const S=Wt(c),R=i&&Rn(i)?Wt(i):i;let C=S,E=fd(C);for(;E&&i&&R!==C;){const T=Rl(E),A=E.getBoundingClientRect(),N=Tn(E),_=A.left+(E.clientLeft+parseFloat(N.paddingLeft))*T.x,H=A.top+(E.clientTop+parseFloat(N.paddingTop))*T.y;v*=T.x,m*=T.y,x*=T.x,p*=T.y,v+=_,m+=H,C=Wt(E),E=fd(C)}}return Ps({width:x,height:p,x:v,y:m})}function au(n,r){const l=nu(n).scrollLeft;return r?r.left+l:Ar(Gn(n)).left+l}function Cb(n,r){const l=n.getBoundingClientRect(),i=l.left+r.scrollLeft-au(n,l),u=l.top+r.scrollTop;return{x:i,y:u}}function HT(n){let{elements:r,rect:l,offsetParent:i,strategy:u}=n;const c=u==="fixed",d=Gn(i),h=r?tu(r.floating):!1;if(i===d||h&&c)return l;let v={scrollLeft:0,scrollTop:0},m=Bn(1);const x=Bn(0),p=Pn(i);if((p||!p&&!c)&&((Ul(i)!=="body"||Zo(d))&&(v=nu(i)),Pn(i))){const R=Ar(i);m=Rl(i),x.x=R.x+i.clientLeft,x.y=R.y+i.clientTop}const S=d&&!p&&!c?Cb(d,v):Bn(0);return{width:l.width*m.x,height:l.height*m.y,x:l.x*m.x-v.scrollLeft*m.x+x.x+S.x,y:l.y*m.y-v.scrollTop*m.y+x.y+S.y}}function PT(n){return Array.from(n.getClientRects())}function qT(n){const r=Gn(n),l=nu(n),i=n.ownerDocument.body,u=Jt(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),c=Jt(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let d=-l.scrollLeft+au(n);const h=-l.scrollTop;return Tn(i).direction==="rtl"&&(d+=Jt(r.clientWidth,i.clientWidth)-u),{width:u,height:c,x:d,y:h}}const Zv=25;function GT(n,r){const l=Wt(n),i=Gn(n),u=l.visualViewport;let c=i.clientWidth,d=i.clientHeight,h=0,v=0;if(u){c=u.width,d=u.height;const x=Yd();(!x||x&&r==="fixed")&&(h=u.offsetLeft,v=u.offsetTop)}const m=au(i);if(m<=0){const x=i.ownerDocument,p=x.body,S=getComputedStyle(p),R=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(i.clientWidth-p.clientWidth-R);C<=Zv&&(c-=C)}else m<=Zv&&(c+=m);return{width:c,height:d,x:h,y:v}}const VT=new Set(["absolute","fixed"]);function YT(n,r){const l=Ar(n,!0,r==="fixed"),i=l.top+n.clientTop,u=l.left+n.clientLeft,c=Pn(n)?Rl(n):Bn(1),d=n.clientWidth*c.x,h=n.clientHeight*c.y,v=u*c.x,m=i*c.y;return{width:d,height:h,x:v,y:m}}function Jv(n,r,l){let i;if(r==="viewport")i=GT(n,l);else if(r==="document")i=qT(Gn(n));else if(Rn(r))i=YT(r,l);else{const u=Eb(n);i={x:r.x-u.x,y:r.y-u.y,width:r.width,height:r.height}}return Ps(i)}function Rb(n,r){const l=Ia(n);return l===r||!Rn(l)||Al(l)?!1:Tn(l).position==="fixed"||Rb(l,r)}function QT(n,r){const l=r.get(n);if(l)return l;let i=Qo(n,[],!1).filter(h=>Rn(h)&&Ul(h)!=="body"),u=null;const c=Tn(n).position==="fixed";let d=c?Ia(n):n;for(;Rn(d)&&!Al(d);){const h=Tn(d),v=Vd(d);!v&&h.position==="fixed"&&(u=null),(c?!v&&!u:!v&&h.position==="static"&&!!u&&VT.has(u.position)||Zo(d)&&!v&&Rb(n,d))?i=i.filter(x=>x!==d):u=h,d=Ia(d)}return r.set(n,i),i}function FT(n){let{element:r,boundary:l,rootBoundary:i,strategy:u}=n;const d=[...l==="clippingAncestors"?tu(r)?[]:QT(r,this._c):[].concat(l),i],h=d[0],v=d.reduce((m,x)=>{const p=Jv(r,x,u);return m.top=Jt(p.top,m.top),m.right=Ka(p.right,m.right),m.bottom=Ka(p.bottom,m.bottom),m.left=Jt(p.left,m.left),m},Jv(r,h,u));return{width:v.right-v.left,height:v.bottom-v.top,x:v.left,y:v.top}}function KT(n){const{width:r,height:l}=Sb(n);return{width:r,height:l}}function IT(n,r,l){const i=Pn(r),u=Gn(r),c=l==="fixed",d=Ar(n,!0,c,r);let h={scrollLeft:0,scrollTop:0};const v=Bn(0);function m(){v.x=au(u)}if(i||!i&&!c)if((Ul(r)!=="body"||Zo(u))&&(h=nu(r)),i){const R=Ar(r,!0,c,r);v.x=R.x+r.clientLeft,v.y=R.y+r.clientTop}else u&&m();c&&!i&&u&&m();const x=u&&!i&&!c?Cb(u,h):Bn(0),p=d.left+h.scrollLeft-v.x-x.x,S=d.top+h.scrollTop-v.y-x.y;return{x:p,y:S,width:d.width,height:d.height}}function Gf(n){return Tn(n).position==="static"}function Wv(n,r){if(!Pn(n)||Tn(n).position==="fixed")return null;if(r)return r(n);let l=n.offsetParent;return Gn(n)===l&&(l=l.ownerDocument.body),l}function Tb(n,r){const l=Wt(n);if(tu(n))return l;if(!Pn(n)){let u=Ia(n);for(;u&&!Al(u);){if(Rn(u)&&!Gf(u))return u;u=Ia(u)}return l}let i=Wv(n,r);for(;i&&OT(i)&&Gf(i);)i=Wv(i,r);return i&&Al(i)&&Gf(i)&&!Vd(i)?l:i||LT(n)||l}const XT=async function(n){const r=this.getOffsetParent||Tb,l=this.getDimensions,i=await l(n.floating);return{reference:IT(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function $T(n){return Tn(n).direction==="rtl"}const ZT={convertOffsetParentRelativeRectToViewportRelativeRect:HT,getDocumentElement:Gn,getClippingRect:FT,getOffsetParent:Tb,getElementRects:XT,getClientRects:PT,getDimensions:KT,getScale:Rl,isElement:Rn,isRTL:$T};function Ab(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function JT(n,r){let l=null,i;const u=Gn(n);function c(){var h;clearTimeout(i),(h=l)==null||h.disconnect(),l=null}function d(h,v){h===void 0&&(h=!1),v===void 0&&(v=1),c();const m=n.getBoundingClientRect(),{left:x,top:p,width:S,height:R}=m;if(h||r(),!S||!R)return;const C=xs(p),E=xs(u.clientWidth-(x+S)),T=xs(u.clientHeight-(p+R)),A=xs(x),_={rootMargin:-C+"px "+-E+"px "+-T+"px "+-A+"px",threshold:Jt(0,Ka(1,v))||1};let H=!0;function V(W){const B=W[0].intersectionRatio;if(B!==v){if(!H)return d();B?d(!1,B):i=setTimeout(()=>{d(!1,1e-7)},1e3)}B===1&&!Ab(m,n.getBoundingClientRect())&&d(),H=!1}try{l=new IntersectionObserver(V,{..._,root:u.ownerDocument})}catch{l=new IntersectionObserver(V,_)}l.observe(n)}return d(!0),c}function WT(n,r,l,i){i===void 0&&(i={});const{ancestorScroll:u=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:v=!1}=i,m=Qd(n),x=u||c?[...m?Qo(m):[],...Qo(r)]:[];x.forEach(A=>{u&&A.addEventListener("scroll",l,{passive:!0}),c&&A.addEventListener("resize",l)});const p=m&&h?JT(m,l):null;let S=-1,R=null;d&&(R=new ResizeObserver(A=>{let[N]=A;N&&N.target===m&&R&&(R.unobserve(r),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var _;(_=R)==null||_.observe(r)})),l()}),m&&!v&&R.observe(m),R.observe(r));let C,E=v?Ar(n):null;v&&T();function T(){const A=Ar(n);E&&!Ab(E,A)&&l(),E=A,C=requestAnimationFrame(T)}return l(),()=>{var A;x.forEach(N=>{u&&N.removeEventListener("scroll",l),c&&N.removeEventListener("resize",l)}),p?.(),(A=R)==null||A.disconnect(),R=null,v&&cancelAnimationFrame(C)}}const eA=CT,tA=RT,nA=wT,aA=AT,rA=ST,ey=xT,lA=TT,oA=(n,r,l)=>{const i=new Map,u={platform:ZT,...l},c={...u.platform,_c:i};return bT(n,r,{...u,platform:c})};var iA=typeof document<"u",sA=function(){},Ns=iA?g.useLayoutEffect:sA;function qs(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let l,i,u;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(l=n.length,l!==r.length)return!1;for(i=l;i--!==0;)if(!qs(n[i],r[i]))return!1;return!0}if(u=Object.keys(n),l=u.length,l!==Object.keys(r).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(r,u[i]))return!1;for(i=l;i--!==0;){const c=u[i];if(!(c==="_owner"&&n.$$typeof)&&!qs(n[c],r[c]))return!1}return!0}return n!==n&&r!==r}function Nb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function ty(n,r){const l=Nb(n);return Math.round(r*l)/l}function Vf(n){const r=g.useRef(n);return Ns(()=>{r.current=n}),r}function uA(n){n===void 0&&(n={});const{placement:r="bottom",strategy:l="absolute",middleware:i=[],platform:u,elements:{reference:c,floating:d}={},transform:h=!0,whileElementsMounted:v,open:m}=n,[x,p]=g.useState({x:0,y:0,strategy:l,placement:r,middlewareData:{},isPositioned:!1}),[S,R]=g.useState(i);qs(S,i)||R(i);const[C,E]=g.useState(null),[T,A]=g.useState(null),N=g.useCallback(k=>{k!==W.current&&(W.current=k,E(k))},[]),_=g.useCallback(k=>{k!==B.current&&(B.current=k,A(k))},[]),H=c||C,V=d||T,W=g.useRef(null),B=g.useRef(null),G=g.useRef(x),ne=v!=null,re=Vf(v),de=Vf(u),fe=Vf(m),me=g.useCallback(()=>{if(!W.current||!B.current)return;const k={placement:r,strategy:l,middleware:S};de.current&&(k.platform=de.current),oA(W.current,B.current,k).then(J=>{const ie={...J,isPositioned:fe.current!==!1};pe.current&&!qs(G.current,ie)&&(G.current=ie,$o.flushSync(()=>{p(ie)}))})},[S,r,l,de,fe]);Ns(()=>{m===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,p(k=>({...k,isPositioned:!1})))},[m]);const pe=g.useRef(!1);Ns(()=>(pe.current=!0,()=>{pe.current=!1}),[]),Ns(()=>{if(H&&(W.current=H),V&&(B.current=V),H&&V){if(re.current)return re.current(H,V,me);me()}},[H,V,me,re,ne]);const ve=g.useMemo(()=>({reference:W,floating:B,setReference:N,setFloating:_}),[N,_]),j=g.useMemo(()=>({reference:H,floating:V}),[H,V]),Y=g.useMemo(()=>{const k={position:l,left:0,top:0};if(!j.floating)return k;const J=ty(j.floating,x.x),ie=ty(j.floating,x.y);return h?{...k,transform:"translate("+J+"px, "+ie+"px)",...Nb(j.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:J,top:ie}},[l,h,j.floating,x.x,x.y]);return g.useMemo(()=>({...x,update:me,refs:ve,elements:j,floatingStyles:Y}),[x,me,ve,j,Y])}const cA=n=>{function r(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:n,fn(l){const{element:i,padding:u}=typeof n=="function"?n(l):n;return i&&r(i)?i.current!=null?ey({element:i.current,padding:u}).fn(l):{}:i?ey({element:i,padding:u}).fn(l):{}}}},fA=(n,r)=>({...eA(n),options:[n,r]}),dA=(n,r)=>({...tA(n),options:[n,r]}),hA=(n,r)=>({...lA(n),options:[n,r]}),mA=(n,r)=>({...nA(n),options:[n,r]}),pA=(n,r)=>({...aA(n),options:[n,r]}),gA=(n,r)=>({...rA(n),options:[n,r]}),vA=(n,r)=>({...cA(n),options:[n,r]});var yA="Arrow",Mb=g.forwardRef((n,r)=>{const{children:l,width:i=10,height:u=5,...c}=n;return y.jsx(De.svg,{...c,ref:r,width:i,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?l:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Mb.displayName=yA;var bA=Mb;function xA(n){const[r,l]=g.useState(void 0);return wt(()=>{if(n){l({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const c=u[0];let d,h;if("borderBoxSize"in c){const v=c.borderBoxSize,m=Array.isArray(v)?v[0]:v;d=m.inlineSize,h=m.blockSize}else d=n.offsetWidth,h=n.offsetHeight;l({width:d,height:h})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else l(void 0)},[n]),r}var Fd="Popper",[Ob,ru]=_r(Fd),[wA,_b]=Ob(Fd),jb=n=>{const{__scopePopper:r,children:l}=n,[i,u]=g.useState(null);return y.jsx(wA,{scope:r,anchor:i,onAnchorChange:u,children:l})};jb.displayName=Fd;var Db="PopperAnchor",zb=g.forwardRef((n,r)=>{const{__scopePopper:l,virtualRef:i,...u}=n,c=_b(Db,l),d=g.useRef(null),h=Ve(r,d),v=g.useRef(null);return g.useEffect(()=>{const m=v.current;v.current=i?.current||d.current,m!==v.current&&c.onAnchorChange(v.current)}),i?null:y.jsx(De.div,{...u,ref:h})});zb.displayName=Db;var Kd="PopperContent",[SA,EA]=Ob(Kd),Lb=g.forwardRef((n,r)=>{const{__scopePopper:l,side:i="bottom",sideOffset:u=0,align:c="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:v=!0,collisionBoundary:m=[],collisionPadding:x=0,sticky:p="partial",hideWhenDetached:S=!1,updatePositionStrategy:R="optimized",onPlaced:C,...E}=n,T=_b(Kd,l),[A,N]=g.useState(null),_=Ve(r,X=>N(X)),[H,V]=g.useState(null),W=xA(H),B=W?.width??0,G=W?.height??0,ne=i+(c!=="center"?"-"+c:""),re=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},de=Array.isArray(m)?m:[m],fe=de.length>0,me={padding:re,boundary:de.filter(RA),altBoundary:fe},{refs:pe,floatingStyles:ve,placement:j,isPositioned:Y,middlewareData:k}=uA({strategy:"fixed",placement:ne,whileElementsMounted:(...X)=>WT(...X,{animationFrame:R==="always"}),elements:{reference:T.anchor},middleware:[fA({mainAxis:u+G,alignmentAxis:d}),v&&dA({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?hA():void 0,...me}),v&&mA({...me}),pA({...me,apply:({elements:X,rects:ae,availableWidth:be,availableHeight:Ee})=>{const{width:Te,height:Me}=ae.reference,dt=X.floating.style;dt.setProperty("--radix-popper-available-width",`${be}px`),dt.setProperty("--radix-popper-available-height",`${Ee}px`),dt.setProperty("--radix-popper-anchor-width",`${Te}px`),dt.setProperty("--radix-popper-anchor-height",`${Me}px`)}}),H&&vA({element:H,padding:h}),TA({arrowWidth:B,arrowHeight:G}),S&&gA({strategy:"referenceHidden",...me})]}),[J,ie]=Bb(j),O=Hn(C);wt(()=>{Y&&O?.()},[Y,O]);const F=k.arrow?.x,Q=k.arrow?.y,Z=k.arrow?.centerOffset!==0,[te,le]=g.useState();return wt(()=>{A&&le(window.getComputedStyle(A).zIndex)},[A]),y.jsx("div",{ref:pe.setFloating,"data-radix-popper-content-wrapper":"",style:{...ve,transform:Y?ve.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[k.transformOrigin?.x,k.transformOrigin?.y].join(" "),...k.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:y.jsx(SA,{scope:l,placedSide:J,onArrowChange:V,arrowX:F,arrowY:Q,shouldHideArrow:Z,children:y.jsx(De.div,{"data-side":J,"data-align":ie,...E,ref:_,style:{...E.style,animation:Y?void 0:"none"}})})})});Lb.displayName=Kd;var Ub="PopperArrow",CA={top:"bottom",right:"left",bottom:"top",left:"right"},kb=g.forwardRef(function(r,l){const{__scopePopper:i,...u}=r,c=EA(Ub,i),d=CA[c.placedSide];return y.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:y.jsx(bA,{...u,ref:l,style:{...u.style,display:"block"}})})});kb.displayName=Ub;function RA(n){return n!==null}var TA=n=>({name:"transformOrigin",options:n,fn(r){const{placement:l,rects:i,middlewareData:u}=r,d=u.arrow?.centerOffset!==0,h=d?0:n.arrowWidth,v=d?0:n.arrowHeight,[m,x]=Bb(l),p={start:"0%",center:"50%",end:"100%"}[x],S=(u.arrow?.x??0)+h/2,R=(u.arrow?.y??0)+v/2;let C="",E="";return m==="bottom"?(C=d?p:`${S}px`,E=`${-v}px`):m==="top"?(C=d?p:`${S}px`,E=`${i.floating.height+v}px`):m==="right"?(C=`${-v}px`,E=d?p:`${R}px`):m==="left"&&(C=`${i.floating.width+v}px`,E=d?p:`${R}px`),{data:{x:C,y:E}}}});function Bb(n){const[r,l="center"]=n.split("-");return[r,l]}var Hb=jb,Pb=zb,qb=Lb,Gb=kb,AA="Portal",lu=g.forwardRef((n,r)=>{const{container:l,...i}=n,[u,c]=g.useState(!1);wt(()=>c(!0),[]);const d=l||u&&globalThis?.document?.body;return d?Qy.createPortal(y.jsx(De.div,{...i,ref:r}),d):null});lu.displayName=AA;function NA(n,r){return g.useReducer((l,i)=>r[l][i]??l,n)}var Za=n=>{const{present:r,children:l}=n,i=MA(r),u=typeof l=="function"?l({present:i.isPresent}):g.Children.only(l),c=Ve(i.ref,OA(u));return typeof l=="function"||i.isPresent?g.cloneElement(u,{ref:c}):null};Za.displayName="Presence";function MA(n){const[r,l]=g.useState(),i=g.useRef(null),u=g.useRef(n),c=g.useRef("none"),d=n?"mounted":"unmounted",[h,v]=NA(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const m=ws(i.current);c.current=h==="mounted"?m:"none"},[h]),wt(()=>{const m=i.current,x=u.current;if(x!==n){const S=c.current,R=ws(m);n?v("MOUNT"):R==="none"||m?.display==="none"?v("UNMOUNT"):v(x&&S!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,v]),wt(()=>{if(r){let m;const x=r.ownerDocument.defaultView??window,p=R=>{const E=ws(i.current).includes(CSS.escape(R.animationName));if(R.target===r&&E&&(v("ANIMATION_END"),!u.current)){const T=r.style.animationFillMode;r.style.animationFillMode="forwards",m=x.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=T)})}},S=R=>{R.target===r&&(c.current=ws(i.current))};return r.addEventListener("animationstart",S),r.addEventListener("animationcancel",p),r.addEventListener("animationend",p),()=>{x.clearTimeout(m),r.removeEventListener("animationstart",S),r.removeEventListener("animationcancel",p),r.removeEventListener("animationend",p)}}else v("ANIMATION_END")},[r,v]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:g.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function ws(n){return n?.animationName||"none"}function OA(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var Yf="rovingFocusGroup.onEntryFocus",_A={bubbles:!1,cancelable:!0},Jo="RovingFocusGroup",[dd,Vb,jA]=kd(Jo),[DA,Yb]=_r(Jo,[jA]),[zA,LA]=DA(Jo),Qb=g.forwardRef((n,r)=>y.jsx(dd.Provider,{scope:n.__scopeRovingFocusGroup,children:y.jsx(dd.Slot,{scope:n.__scopeRovingFocusGroup,children:y.jsx(UA,{...n,ref:r})})}));Qb.displayName=Jo;var UA=g.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:l,orientation:i,loop:u=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:v,onEntryFocus:m,preventScrollOnEntryFocus:x=!1,...p}=n,S=g.useRef(null),R=Ve(r,S),C=Bd(c),[E,T]=Vo({prop:d,defaultProp:h??null,onChange:v,caller:Jo}),[A,N]=g.useState(!1),_=Hn(m),H=Vb(l),V=g.useRef(!1),[W,B]=g.useState(0);return g.useEffect(()=>{const G=S.current;if(G)return G.addEventListener(Yf,_),()=>G.removeEventListener(Yf,_)},[_]),y.jsx(zA,{scope:l,orientation:i,dir:C,loop:u,currentTabStopId:E,onItemFocus:g.useCallback(G=>T(G),[T]),onItemShiftTab:g.useCallback(()=>N(!0),[]),onFocusableItemAdd:g.useCallback(()=>B(G=>G+1),[]),onFocusableItemRemove:g.useCallback(()=>B(G=>G-1),[]),children:y.jsx(De.div,{tabIndex:A||W===0?-1:0,"data-orientation":i,...p,ref:R,style:{outline:"none",...n.style},onMouseDown:he(n.onMouseDown,()=>{V.current=!0}),onFocus:he(n.onFocus,G=>{const ne=!V.current;if(G.target===G.currentTarget&&ne&&!A){const re=new CustomEvent(Yf,_A);if(G.currentTarget.dispatchEvent(re),!re.defaultPrevented){const de=H().filter(j=>j.focusable),fe=de.find(j=>j.active),me=de.find(j=>j.id===E),ve=[fe,me,...de].filter(Boolean).map(j=>j.ref.current);Ib(ve,x)}}V.current=!1}),onBlur:he(n.onBlur,()=>N(!1))})})}),Fb="RovingFocusGroupItem",Kb=g.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:l,focusable:i=!0,active:u=!1,tabStopId:c,children:d,...h}=n,v=fa(),m=c||v,x=LA(Fb,l),p=x.currentTabStopId===m,S=Vb(l),{onFocusableItemAdd:R,onFocusableItemRemove:C,currentTabStopId:E}=x;return g.useEffect(()=>{if(i)return R(),()=>C()},[i,R,C]),y.jsx(dd.ItemSlot,{scope:l,id:m,focusable:i,active:u,children:y.jsx(De.span,{tabIndex:p?0:-1,"data-orientation":x.orientation,...h,ref:r,onMouseDown:he(n.onMouseDown,T=>{i?x.onItemFocus(m):T.preventDefault()}),onFocus:he(n.onFocus,()=>x.onItemFocus(m)),onKeyDown:he(n.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){x.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const A=HA(T,x.orientation,x.dir);if(A!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let _=S().filter(H=>H.focusable).map(H=>H.ref.current);if(A==="last")_.reverse();else if(A==="prev"||A==="next"){A==="prev"&&_.reverse();const H=_.indexOf(T.currentTarget);_=x.loop?PA(_,H+1):_.slice(H+1)}setTimeout(()=>Ib(_))}}),children:typeof d=="function"?d({isCurrentTabStop:p,hasTabStop:E!=null}):d})})});Kb.displayName=Fb;var kA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function BA(n,r){return r!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function HA(n,r,l){const i=BA(n.key,l);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return kA[i]}function Ib(n,r=!1){const l=document.activeElement;for(const i of n)if(i===l||(i.focus({preventScroll:r}),document.activeElement!==l))return}function PA(n,r){return n.map((l,i)=>n[(r+i)%n.length])}var qA=Qb,GA=Kb;function VA(n){const r=YA(n),l=g.forwardRef((i,u)=>{const{children:c,...d}=i,h=g.Children.toArray(c),v=h.find(FA);if(v){const m=v.props.children,x=h.map(p=>p===v?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:p);return y.jsx(r,{...d,ref:u,children:g.isValidElement(m)?g.cloneElement(m,void 0,x):null})}return y.jsx(r,{...d,ref:u,children:c})});return l.displayName=`${n}.Slot`,l}function YA(n){const r=g.forwardRef((l,i)=>{const{children:u,...c}=l;if(g.isValidElement(u)){const d=IA(u),h=KA(c,u.props);return u.type!==g.Fragment&&(h.ref=i?ga(i,d):d),g.cloneElement(u,h)}return g.Children.count(u)>1?g.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var QA=Symbol("radix.slottable");function FA(n){return g.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===QA}function KA(n,r){const l={...r};for(const i in r){const u=n[i],c=r[i];/^on[A-Z]/.test(i)?u&&c?l[i]=(...h)=>{const v=c(...h);return u(...h),v}:u&&(l[i]=u):i==="style"?l[i]={...u,...c}:i==="className"&&(l[i]=[u,c].filter(Boolean).join(" "))}return{...n,...l}}function IA(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var XA=function(n){if(typeof document>"u")return null;var r=Array.isArray(n)?n[0]:n;return r.ownerDocument.body},Sl=new WeakMap,Ss=new WeakMap,Es={},Qf=0,Xb=function(n){return n&&(n.host||Xb(n.parentNode))},$A=function(n,r){return r.map(function(l){if(n.contains(l))return l;var i=Xb(l);return i&&n.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",n,". Doing nothing"),null)}).filter(function(l){return!!l})},ZA=function(n,r,l,i){var u=$A(r,Array.isArray(n)?n:[n]);Es[l]||(Es[l]=new WeakMap);var c=Es[l],d=[],h=new Set,v=new Set(u),m=function(p){!p||h.has(p)||(h.add(p),m(p.parentNode))};u.forEach(m);var x=function(p){!p||v.has(p)||Array.prototype.forEach.call(p.children,function(S){if(h.has(S))x(S);else try{var R=S.getAttribute(i),C=R!==null&&R!=="false",E=(Sl.get(S)||0)+1,T=(c.get(S)||0)+1;Sl.set(S,E),c.set(S,T),d.push(S),E===1&&C&&Ss.set(S,!0),T===1&&S.setAttribute(l,"true"),C||S.setAttribute(i,"true")}catch(A){console.error("aria-hidden: cannot operate on ",S,A)}})};return x(r),h.clear(),Qf++,function(){d.forEach(function(p){var S=Sl.get(p)-1,R=c.get(p)-1;Sl.set(p,S),c.set(p,R),S||(Ss.has(p)||p.removeAttribute(i),Ss.delete(p)),R||p.removeAttribute(l)}),Qf--,Qf||(Sl=new WeakMap,Sl=new WeakMap,Ss=new WeakMap,Es={})}},Id=function(n,r,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),u=XA(n);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),ZA(i,u,l,"aria-hidden")):function(){return null}},Un=function(){return Un=Object.assign||function(r){for(var l,i=1,u=arguments.length;i<u;i++){l=arguments[i];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(r[c]=l[c])}return r},Un.apply(this,arguments)};function $b(n,r){var l={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.indexOf(i)<0&&(l[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,i=Object.getOwnPropertySymbols(n);u<i.length;u++)r.indexOf(i[u])<0&&Object.prototype.propertyIsEnumerable.call(n,i[u])&&(l[i[u]]=n[i[u]]);return l}function JA(n,r,l){if(l||arguments.length===2)for(var i=0,u=r.length,c;i<u;i++)(c||!(i in r))&&(c||(c=Array.prototype.slice.call(r,0,i)),c[i]=r[i]);return n.concat(c||Array.prototype.slice.call(r))}var Ms="right-scroll-bar-position",Os="width-before-scroll-bar",WA="with-scroll-bars-hidden",eN="--removed-body-scroll-bar-size";function Ff(n,r){return typeof n=="function"?n(r):n&&(n.current=r),n}function tN(n,r){var l=g.useState(function(){return{value:n,callback:r,facade:{get current(){return l.value},set current(i){var u=l.value;u!==i&&(l.value=i,l.callback(i,u))}}}})[0];return l.callback=r,l.facade}var nN=typeof window<"u"?g.useLayoutEffect:g.useEffect,ny=new WeakMap;function aN(n,r){var l=tN(null,function(i){return n.forEach(function(u){return Ff(u,i)})});return nN(function(){var i=ny.get(l);if(i){var u=new Set(i),c=new Set(n),d=l.current;u.forEach(function(h){c.has(h)||Ff(h,null)}),c.forEach(function(h){u.has(h)||Ff(h,d)})}ny.set(l,n)},[n]),l}function rN(n){return n}function lN(n,r){r===void 0&&(r=rN);var l=[],i=!1,u={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:n},useMedium:function(c){var d=r(c,i);return l.push(d),function(){l=l.filter(function(h){return h!==d})}},assignSyncMedium:function(c){for(i=!0;l.length;){var d=l;l=[],d.forEach(c)}l={push:function(h){return c(h)},filter:function(){return l}}},assignMedium:function(c){i=!0;var d=[];if(l.length){var h=l;l=[],h.forEach(c),d=l}var v=function(){var x=d;d=[],x.forEach(c)},m=function(){return Promise.resolve().then(v)};m(),l={push:function(x){d.push(x),m()},filter:function(x){return d=d.filter(x),l}}}};return u}function oN(n){n===void 0&&(n={});var r=lN(null);return r.options=Un({async:!0,ssr:!1},n),r}var Zb=function(n){var r=n.sideCar,l=$b(n,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return g.createElement(i,Un({},l))};Zb.isSideCarExport=!0;function iN(n,r){return n.useMedium(r),Zb}var Jb=oN(),Kf=function(){},ou=g.forwardRef(function(n,r){var l=g.useRef(null),i=g.useState({onScrollCapture:Kf,onWheelCapture:Kf,onTouchMoveCapture:Kf}),u=i[0],c=i[1],d=n.forwardProps,h=n.children,v=n.className,m=n.removeScrollBar,x=n.enabled,p=n.shards,S=n.sideCar,R=n.noRelative,C=n.noIsolation,E=n.inert,T=n.allowPinchZoom,A=n.as,N=A===void 0?"div":A,_=n.gapMode,H=$b(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),V=S,W=aN([l,r]),B=Un(Un({},H),u);return g.createElement(g.Fragment,null,x&&g.createElement(V,{sideCar:Jb,removeScrollBar:m,shards:p,noRelative:R,noIsolation:C,inert:E,setCallbacks:c,allowPinchZoom:!!T,lockRef:l,gapMode:_}),d?g.cloneElement(g.Children.only(h),Un(Un({},B),{ref:W})):g.createElement(N,Un({},B,{className:v,ref:W}),h))});ou.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ou.classNames={fullWidth:Os,zeroRight:Ms};var sN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uN(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var r=sN();return r&&n.setAttribute("nonce",r),n}function cN(n,r){n.styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r))}function fN(n){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(n)}var dN=function(){var n=0,r=null;return{add:function(l){n==0&&(r=uN())&&(cN(r,l),fN(r)),n++},remove:function(){n--,!n&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},hN=function(){var n=dN();return function(r,l){g.useEffect(function(){return n.add(r),function(){n.remove()}},[r&&l])}},Wb=function(){var n=hN(),r=function(l){var i=l.styles,u=l.dynamic;return n(i,u),null};return r},mN={left:0,top:0,right:0,gap:0},If=function(n){return parseInt(n||"",10)||0},pN=function(n){var r=window.getComputedStyle(document.body),l=r[n==="padding"?"paddingLeft":"marginLeft"],i=r[n==="padding"?"paddingTop":"marginTop"],u=r[n==="padding"?"paddingRight":"marginRight"];return[If(l),If(i),If(u)]},gN=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return mN;var r=pN(n),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-l+r[2]-r[0])}},vN=Wb(),Tl="data-scroll-locked",yN=function(n,r,l,i){var u=n.left,c=n.top,d=n.right,h=n.gap;return l===void 0&&(l="margin"),`
|
|
13
|
+
.`.concat(WA,` {
|
|
14
|
+
overflow: hidden `).concat(i,`;
|
|
15
|
+
padding-right: `).concat(h,"px ").concat(i,`;
|
|
16
|
+
}
|
|
17
|
+
body[`).concat(Tl,`] {
|
|
18
|
+
overflow: hidden `).concat(i,`;
|
|
19
|
+
overscroll-behavior: contain;
|
|
20
|
+
`).concat([r&&"position: relative ".concat(i,";"),l==="margin"&&`
|
|
21
|
+
padding-left: `.concat(u,`px;
|
|
22
|
+
padding-top: `).concat(c,`px;
|
|
23
|
+
padding-right: `).concat(d,`px;
|
|
24
|
+
margin-left:0;
|
|
25
|
+
margin-top:0;
|
|
26
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
27
|
+
`),l==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(Ms,` {
|
|
31
|
+
right: `).concat(h,"px ").concat(i,`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(Os,` {
|
|
35
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.`).concat(Ms," .").concat(Ms,` {
|
|
39
|
+
right: 0 `).concat(i,`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.`).concat(Os," .").concat(Os,` {
|
|
43
|
+
margin-right: 0 `).concat(i,`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
body[`).concat(Tl,`] {
|
|
47
|
+
`).concat(eN,": ").concat(h,`px;
|
|
48
|
+
}
|
|
49
|
+
`)},ay=function(){var n=parseInt(document.body.getAttribute(Tl)||"0",10);return isFinite(n)?n:0},bN=function(){g.useEffect(function(){return document.body.setAttribute(Tl,(ay()+1).toString()),function(){var n=ay()-1;n<=0?document.body.removeAttribute(Tl):document.body.setAttribute(Tl,n.toString())}},[])},xN=function(n){var r=n.noRelative,l=n.noImportant,i=n.gapMode,u=i===void 0?"margin":i;bN();var c=g.useMemo(function(){return gN(u)},[u]);return g.createElement(vN,{styles:yN(c,!r,u,l?"":"!important")})},hd=!1;if(typeof window<"u")try{var Cs=Object.defineProperty({},"passive",{get:function(){return hd=!0,!0}});window.addEventListener("test",Cs,Cs),window.removeEventListener("test",Cs,Cs)}catch{hd=!1}var El=hd?{passive:!1}:!1,wN=function(n){return n.tagName==="TEXTAREA"},e0=function(n,r){if(!(n instanceof Element))return!1;var l=window.getComputedStyle(n);return l[r]!=="hidden"&&!(l.overflowY===l.overflowX&&!wN(n)&&l[r]==="visible")},SN=function(n){return e0(n,"overflowY")},EN=function(n){return e0(n,"overflowX")},ry=function(n,r){var l=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=t0(n,i);if(u){var c=n0(n,i),d=c[1],h=c[2];if(d>h)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},CN=function(n){var r=n.scrollTop,l=n.scrollHeight,i=n.clientHeight;return[r,l,i]},RN=function(n){var r=n.scrollLeft,l=n.scrollWidth,i=n.clientWidth;return[r,l,i]},t0=function(n,r){return n==="v"?SN(r):EN(r)},n0=function(n,r){return n==="v"?CN(r):RN(r)},TN=function(n,r){return n==="h"&&r==="rtl"?-1:1},AN=function(n,r,l,i,u){var c=TN(n,window.getComputedStyle(r).direction),d=c*i,h=l.target,v=r.contains(h),m=!1,x=d>0,p=0,S=0;do{if(!h)break;var R=n0(n,h),C=R[0],E=R[1],T=R[2],A=E-T-c*C;(C||A)&&t0(n,h)&&(p+=A,S+=C);var N=h.parentNode;h=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!v&&h!==document.body||v&&(r.contains(h)||r===h));return(x&&Math.abs(p)<1||!x&&Math.abs(S)<1)&&(m=!0),m},Rs=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},ly=function(n){return[n.deltaX,n.deltaY]},oy=function(n){return n&&"current"in n?n.current:n},NN=function(n,r){return n[0]===r[0]&&n[1]===r[1]},MN=function(n){return`
|
|
50
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
51
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
52
|
+
`)},ON=0,Cl=[];function _N(n){var r=g.useRef([]),l=g.useRef([0,0]),i=g.useRef(),u=g.useState(ON++)[0],c=g.useState(Wb)[0],d=g.useRef(n);g.useEffect(function(){d.current=n},[n]),g.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(u));var E=JA([n.lockRef.current],(n.shards||[]).map(oy),!0).filter(Boolean);return E.forEach(function(T){return T.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),E.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(u))})}}},[n.inert,n.lockRef.current,n.shards]);var h=g.useCallback(function(E,T){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!d.current.allowPinchZoom;var A=Rs(E),N=l.current,_="deltaX"in E?E.deltaX:N[0]-A[0],H="deltaY"in E?E.deltaY:N[1]-A[1],V,W=E.target,B=Math.abs(_)>Math.abs(H)?"h":"v";if("touches"in E&&B==="h"&&W.type==="range")return!1;var G=window.getSelection(),ne=G&&G.anchorNode,re=ne?ne===W||ne.contains(W):!1;if(re)return!1;var de=ry(B,W);if(!de)return!0;if(de?V=B:(V=B==="v"?"h":"v",de=ry(B,W)),!de)return!1;if(!i.current&&"changedTouches"in E&&(_||H)&&(i.current=V),!V)return!0;var fe=i.current||V;return AN(fe,T,E,fe==="h"?_:H)},[]),v=g.useCallback(function(E){var T=E;if(!(!Cl.length||Cl[Cl.length-1]!==c)){var A="deltaY"in T?ly(T):Rs(T),N=r.current.filter(function(V){return V.name===T.type&&(V.target===T.target||T.target===V.shadowParent)&&NN(V.delta,A)})[0];if(N&&N.should){T.cancelable&&T.preventDefault();return}if(!N){var _=(d.current.shards||[]).map(oy).filter(Boolean).filter(function(V){return V.contains(T.target)}),H=_.length>0?h(T,_[0]):!d.current.noIsolation;H&&T.cancelable&&T.preventDefault()}}},[]),m=g.useCallback(function(E,T,A,N){var _={name:E,delta:T,target:A,should:N,shadowParent:jN(A)};r.current.push(_),setTimeout(function(){r.current=r.current.filter(function(H){return H!==_})},1)},[]),x=g.useCallback(function(E){l.current=Rs(E),i.current=void 0},[]),p=g.useCallback(function(E){m(E.type,ly(E),E.target,h(E,n.lockRef.current))},[]),S=g.useCallback(function(E){m(E.type,Rs(E),E.target,h(E,n.lockRef.current))},[]);g.useEffect(function(){return Cl.push(c),n.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:S}),document.addEventListener("wheel",v,El),document.addEventListener("touchmove",v,El),document.addEventListener("touchstart",x,El),function(){Cl=Cl.filter(function(E){return E!==c}),document.removeEventListener("wheel",v,El),document.removeEventListener("touchmove",v,El),document.removeEventListener("touchstart",x,El)}},[]);var R=n.removeScrollBar,C=n.inert;return g.createElement(g.Fragment,null,C?g.createElement(c,{styles:MN(u)}):null,R?g.createElement(xN,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function jN(n){for(var r=null;n!==null;)n instanceof ShadowRoot&&(r=n.host,n=n.host),n=n.parentNode;return r}const DN=iN(Jb,_N);var iu=g.forwardRef(function(n,r){return g.createElement(ou,Un({},n,{ref:r,sideCar:DN}))});iu.classNames=ou.classNames;var md=["Enter"," "],zN=["ArrowDown","PageUp","Home"],a0=["ArrowUp","PageDown","End"],LN=[...zN,...a0],UN={ltr:[...md,"ArrowRight"],rtl:[...md,"ArrowLeft"]},kN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wo="Menu",[Fo,BN,HN]=kd(Wo),[jr,r0]=_r(Wo,[HN,ru,Yb]),su=ru(),l0=Yb(),[PN,Dr]=jr(Wo),[qN,ei]=jr(Wo),o0=n=>{const{__scopeMenu:r,open:l=!1,children:i,dir:u,onOpenChange:c,modal:d=!0}=n,h=su(r),[v,m]=g.useState(null),x=g.useRef(!1),p=Hn(c),S=Bd(u);return g.useEffect(()=>{const R=()=>{x.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>x.current=!1;return document.addEventListener("keydown",R,{capture:!0}),()=>{document.removeEventListener("keydown",R,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),y.jsx(Hb,{...h,children:y.jsx(PN,{scope:r,open:l,onOpenChange:p,content:v,onContentChange:m,children:y.jsx(qN,{scope:r,onClose:g.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:x,dir:S,modal:d,children:i})})})};o0.displayName=Wo;var GN="MenuAnchor",Xd=g.forwardRef((n,r)=>{const{__scopeMenu:l,...i}=n,u=su(l);return y.jsx(Pb,{...u,...i,ref:r})});Xd.displayName=GN;var $d="MenuPortal",[VN,i0]=jr($d,{forceMount:void 0}),s0=n=>{const{__scopeMenu:r,forceMount:l,children:i,container:u}=n,c=Dr($d,r);return y.jsx(VN,{scope:r,forceMount:l,children:y.jsx(Za,{present:l||c.open,children:y.jsx(lu,{asChild:!0,container:u,children:i})})})};s0.displayName=$d;var mn="MenuContent",[YN,Zd]=jr(mn),u0=g.forwardRef((n,r)=>{const l=i0(mn,n.__scopeMenu),{forceMount:i=l.forceMount,...u}=n,c=Dr(mn,n.__scopeMenu),d=ei(mn,n.__scopeMenu);return y.jsx(Fo.Provider,{scope:n.__scopeMenu,children:y.jsx(Za,{present:i||c.open,children:y.jsx(Fo.Slot,{scope:n.__scopeMenu,children:d.modal?y.jsx(QN,{...u,ref:r}):y.jsx(FN,{...u,ref:r})})})})}),QN=g.forwardRef((n,r)=>{const l=Dr(mn,n.__scopeMenu),i=g.useRef(null),u=Ve(r,i);return g.useEffect(()=>{const c=i.current;if(c)return Id(c)},[]),y.jsx(Jd,{...n,ref:u,trapFocus:l.open,disableOutsidePointerEvents:l.open,disableOutsideScroll:!0,onFocusOutside:he(n.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>l.onOpenChange(!1)})}),FN=g.forwardRef((n,r)=>{const l=Dr(mn,n.__scopeMenu);return y.jsx(Jd,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>l.onOpenChange(!1)})}),KN=VA("MenuContent.ScrollLock"),Jd=g.forwardRef((n,r)=>{const{__scopeMenu:l,loop:i=!1,trapFocus:u,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:h,onEntryFocus:v,onEscapeKeyDown:m,onPointerDownOutside:x,onFocusOutside:p,onInteractOutside:S,onDismiss:R,disableOutsideScroll:C,...E}=n,T=Dr(mn,l),A=ei(mn,l),N=su(l),_=l0(l),H=BN(l),[V,W]=g.useState(null),B=g.useRef(null),G=Ve(r,B,T.onContentChange),ne=g.useRef(0),re=g.useRef(""),de=g.useRef(0),fe=g.useRef(null),me=g.useRef("right"),pe=g.useRef(0),ve=C?iu:g.Fragment,j=C?{as:KN,allowPinchZoom:!0}:void 0,Y=J=>{const ie=re.current+J,O=H().filter(X=>!X.disabled),F=document.activeElement,Q=O.find(X=>X.ref.current===F)?.textValue,Z=O.map(X=>X.textValue),te=lM(Z,ie,Q),le=O.find(X=>X.textValue===te)?.ref.current;(function X(ae){re.current=ae,window.clearTimeout(ne.current),ae!==""&&(ne.current=window.setTimeout(()=>X(""),1e3))})(ie),le&&setTimeout(()=>le.focus())};g.useEffect(()=>()=>window.clearTimeout(ne.current),[]),Hd();const k=g.useCallback(J=>me.current===fe.current?.side&&iM(J,fe.current?.area),[]);return y.jsx(YN,{scope:l,searchRef:re,onItemEnter:g.useCallback(J=>{k(J)&&J.preventDefault()},[k]),onItemLeave:g.useCallback(J=>{k(J)||(B.current?.focus(),W(null))},[k]),onTriggerLeave:g.useCallback(J=>{k(J)&&J.preventDefault()},[k]),pointerGraceTimerRef:de,onPointerGraceIntentChange:g.useCallback(J=>{fe.current=J},[]),children:y.jsx(ve,{...j,children:y.jsx(Ws,{asChild:!0,trapped:u,onMountAutoFocus:he(c,J=>{J.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:y.jsx(Js,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:m,onPointerDownOutside:x,onFocusOutside:p,onInteractOutside:S,onDismiss:R,children:y.jsx(qA,{asChild:!0,..._,dir:A.dir,orientation:"vertical",loop:i,currentTabStopId:V,onCurrentTabStopIdChange:W,onEntryFocus:he(v,J=>{A.isUsingKeyboardRef.current||J.preventDefault()}),preventScrollOnEntryFocus:!0,children:y.jsx(qb,{role:"menu","aria-orientation":"vertical","data-state":R0(T.open),"data-radix-menu-content":"",dir:A.dir,...N,...E,ref:G,style:{outline:"none",...E.style},onKeyDown:he(E.onKeyDown,J=>{const O=J.target.closest("[data-radix-menu-content]")===J.currentTarget,F=J.ctrlKey||J.altKey||J.metaKey,Q=J.key.length===1;O&&(J.key==="Tab"&&J.preventDefault(),!F&&Q&&Y(J.key));const Z=B.current;if(J.target!==Z||!LN.includes(J.key))return;J.preventDefault();const le=H().filter(X=>!X.disabled).map(X=>X.ref.current);a0.includes(J.key)&&le.reverse(),aM(le)}),onBlur:he(n.onBlur,J=>{J.currentTarget.contains(J.target)||(window.clearTimeout(ne.current),re.current="")}),onPointerMove:he(n.onPointerMove,Ko(J=>{const ie=J.target,O=pe.current!==J.clientX;if(J.currentTarget.contains(ie)&&O){const F=J.clientX>pe.current?"right":"left";me.current=F,pe.current=J.clientX}}))})})})})})})});u0.displayName=mn;var IN="MenuGroup",Wd=g.forwardRef((n,r)=>{const{__scopeMenu:l,...i}=n;return y.jsx(De.div,{role:"group",...i,ref:r})});Wd.displayName=IN;var XN="MenuLabel",c0=g.forwardRef((n,r)=>{const{__scopeMenu:l,...i}=n;return y.jsx(De.div,{...i,ref:r})});c0.displayName=XN;var Gs="MenuItem",iy="menu.itemSelect",uu=g.forwardRef((n,r)=>{const{disabled:l=!1,onSelect:i,...u}=n,c=g.useRef(null),d=ei(Gs,n.__scopeMenu),h=Zd(Gs,n.__scopeMenu),v=Ve(r,c),m=g.useRef(!1),x=()=>{const p=c.current;if(!l&&p){const S=new CustomEvent(iy,{bubbles:!0,cancelable:!0});p.addEventListener(iy,R=>i?.(R),{once:!0}),mb(p,S),S.defaultPrevented?m.current=!1:d.onClose()}};return y.jsx(f0,{...u,ref:v,disabled:l,onClick:he(n.onClick,x),onPointerDown:p=>{n.onPointerDown?.(p),m.current=!0},onPointerUp:he(n.onPointerUp,p=>{m.current||p.currentTarget?.click()}),onKeyDown:he(n.onKeyDown,p=>{const S=h.searchRef.current!=="";l||S&&p.key===" "||md.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});uu.displayName=Gs;var f0=g.forwardRef((n,r)=>{const{__scopeMenu:l,disabled:i=!1,textValue:u,...c}=n,d=Zd(Gs,l),h=l0(l),v=g.useRef(null),m=Ve(r,v),[x,p]=g.useState(!1),[S,R]=g.useState("");return g.useEffect(()=>{const C=v.current;C&&R((C.textContent??"").trim())},[c.children]),y.jsx(Fo.ItemSlot,{scope:l,disabled:i,textValue:u??S,children:y.jsx(GA,{asChild:!0,...h,focusable:!i,children:y.jsx(De.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...c,ref:m,onPointerMove:he(n.onPointerMove,Ko(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:he(n.onPointerLeave,Ko(C=>d.onItemLeave(C))),onFocus:he(n.onFocus,()=>p(!0)),onBlur:he(n.onBlur,()=>p(!1))})})})}),$N="MenuCheckboxItem",d0=g.forwardRef((n,r)=>{const{checked:l=!1,onCheckedChange:i,...u}=n;return y.jsx(v0,{scope:n.__scopeMenu,checked:l,children:y.jsx(uu,{role:"menuitemcheckbox","aria-checked":Vs(l)?"mixed":l,...u,ref:r,"data-state":th(l),onSelect:he(u.onSelect,()=>i?.(Vs(l)?!0:!l),{checkForDefaultPrevented:!1})})})});d0.displayName=$N;var h0="MenuRadioGroup",[ZN,JN]=jr(h0,{value:void 0,onValueChange:()=>{}}),m0=g.forwardRef((n,r)=>{const{value:l,onValueChange:i,...u}=n,c=Hn(i);return y.jsx(ZN,{scope:n.__scopeMenu,value:l,onValueChange:c,children:y.jsx(Wd,{...u,ref:r})})});m0.displayName=h0;var p0="MenuRadioItem",g0=g.forwardRef((n,r)=>{const{value:l,...i}=n,u=JN(p0,n.__scopeMenu),c=l===u.value;return y.jsx(v0,{scope:n.__scopeMenu,checked:c,children:y.jsx(uu,{role:"menuitemradio","aria-checked":c,...i,ref:r,"data-state":th(c),onSelect:he(i.onSelect,()=>u.onValueChange?.(l),{checkForDefaultPrevented:!1})})})});g0.displayName=p0;var eh="MenuItemIndicator",[v0,WN]=jr(eh,{checked:!1}),y0=g.forwardRef((n,r)=>{const{__scopeMenu:l,forceMount:i,...u}=n,c=WN(eh,l);return y.jsx(Za,{present:i||Vs(c.checked)||c.checked===!0,children:y.jsx(De.span,{...u,ref:r,"data-state":th(c.checked)})})});y0.displayName=eh;var eM="MenuSeparator",b0=g.forwardRef((n,r)=>{const{__scopeMenu:l,...i}=n;return y.jsx(De.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});b0.displayName=eM;var tM="MenuArrow",x0=g.forwardRef((n,r)=>{const{__scopeMenu:l,...i}=n,u=su(l);return y.jsx(Gb,{...u,...i,ref:r})});x0.displayName=tM;var nM="MenuSub",[dj,w0]=jr(nM),Bo="MenuSubTrigger",S0=g.forwardRef((n,r)=>{const l=Dr(Bo,n.__scopeMenu),i=ei(Bo,n.__scopeMenu),u=w0(Bo,n.__scopeMenu),c=Zd(Bo,n.__scopeMenu),d=g.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:v}=c,m={__scopeMenu:n.__scopeMenu},x=g.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return g.useEffect(()=>x,[x]),g.useEffect(()=>{const p=h.current;return()=>{window.clearTimeout(p),v(null)}},[h,v]),y.jsx(Xd,{asChild:!0,...m,children:y.jsx(f0,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":u.contentId,"data-state":R0(l.open),...n,ref:ga(r,u.onTriggerChange),onClick:p=>{n.onClick?.(p),!(n.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),l.open||l.onOpenChange(!0))},onPointerMove:he(n.onPointerMove,Ko(p=>{c.onItemEnter(p),!p.defaultPrevented&&!n.disabled&&!l.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{l.onOpenChange(!0),x()},100))})),onPointerLeave:he(n.onPointerLeave,Ko(p=>{x();const S=l.content?.getBoundingClientRect();if(S){const R=l.content?.dataset.side,C=R==="right",E=C?-5:5,T=S[C?"left":"right"],A=S[C?"right":"left"];c.onPointerGraceIntentChange({area:[{x:p.clientX+E,y:p.clientY},{x:T,y:S.top},{x:A,y:S.top},{x:A,y:S.bottom},{x:T,y:S.bottom}],side:R}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(p),p.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:he(n.onKeyDown,p=>{const S=c.searchRef.current!=="";n.disabled||S&&p.key===" "||UN[i.dir].includes(p.key)&&(l.onOpenChange(!0),l.content?.focus(),p.preventDefault())})})})});S0.displayName=Bo;var E0="MenuSubContent",C0=g.forwardRef((n,r)=>{const l=i0(mn,n.__scopeMenu),{forceMount:i=l.forceMount,...u}=n,c=Dr(mn,n.__scopeMenu),d=ei(mn,n.__scopeMenu),h=w0(E0,n.__scopeMenu),v=g.useRef(null),m=Ve(r,v);return y.jsx(Fo.Provider,{scope:n.__scopeMenu,children:y.jsx(Za,{present:i||c.open,children:y.jsx(Fo.Slot,{scope:n.__scopeMenu,children:y.jsx(Jd,{id:h.contentId,"aria-labelledby":h.triggerId,...u,ref:m,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{d.isUsingKeyboardRef.current&&v.current?.focus(),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:he(n.onFocusOutside,x=>{x.target!==h.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:he(n.onEscapeKeyDown,x=>{d.onClose(),x.preventDefault()}),onKeyDown:he(n.onKeyDown,x=>{const p=x.currentTarget.contains(x.target),S=kN[d.dir].includes(x.key);p&&S&&(c.onOpenChange(!1),h.trigger?.focus(),x.preventDefault())})})})})})});C0.displayName=E0;function R0(n){return n?"open":"closed"}function Vs(n){return n==="indeterminate"}function th(n){return Vs(n)?"indeterminate":n?"checked":"unchecked"}function aM(n){const r=document.activeElement;for(const l of n)if(l===r||(l.focus(),document.activeElement!==r))return}function rM(n,r){return n.map((l,i)=>n[(r+i)%n.length])}function lM(n,r,l){const u=r.length>1&&Array.from(r).every(m=>m===r[0])?r[0]:r,c=l?n.indexOf(l):-1;let d=rM(n,Math.max(c,0));u.length===1&&(d=d.filter(m=>m!==l));const v=d.find(m=>m.toLowerCase().startsWith(u.toLowerCase()));return v!==l?v:void 0}function oM(n,r){const{x:l,y:i}=n;let u=!1;for(let c=0,d=r.length-1;c<r.length;d=c++){const h=r[c],v=r[d],m=h.x,x=h.y,p=v.x,S=v.y;x>i!=S>i&&l<(p-m)*(i-x)/(S-x)+m&&(u=!u)}return u}function iM(n,r){if(!r)return!1;const l={x:n.clientX,y:n.clientY};return oM(l,r)}function Ko(n){return r=>r.pointerType==="mouse"?n(r):void 0}var sM=o0,uM=Xd,cM=s0,fM=u0,dM=Wd,hM=c0,mM=uu,pM=d0,gM=m0,vM=g0,yM=y0,bM=b0,xM=x0,wM=S0,SM=C0,cu="DropdownMenu",[EM]=_r(cu,[r0]),Ot=r0(),[CM,T0]=EM(cu),A0=n=>{const{__scopeDropdownMenu:r,children:l,dir:i,open:u,defaultOpen:c,onOpenChange:d,modal:h=!0}=n,v=Ot(r),m=g.useRef(null),[x,p]=Vo({prop:u,defaultProp:c??!1,onChange:d,caller:cu});return y.jsx(CM,{scope:r,triggerId:fa(),triggerRef:m,contentId:fa(),open:x,onOpenChange:p,onOpenToggle:g.useCallback(()=>p(S=>!S),[p]),modal:h,children:y.jsx(sM,{...v,open:x,onOpenChange:p,dir:i,modal:h,children:l})})};A0.displayName=cu;var N0="DropdownMenuTrigger",M0=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,disabled:i=!1,...u}=n,c=T0(N0,l),d=Ot(l);return y.jsx(uM,{asChild:!0,...d,children:y.jsx(De.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...u,ref:ga(r,c.triggerRef),onPointerDown:he(n.onPointerDown,h=>{!i&&h.button===0&&h.ctrlKey===!1&&(c.onOpenToggle(),c.open||h.preventDefault())}),onKeyDown:he(n.onKeyDown,h=>{i||(["Enter"," "].includes(h.key)&&c.onOpenToggle(),h.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});M0.displayName=N0;var RM="DropdownMenuPortal",O0=n=>{const{__scopeDropdownMenu:r,...l}=n,i=Ot(r);return y.jsx(cM,{...i,...l})};O0.displayName=RM;var _0="DropdownMenuContent",j0=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=T0(_0,l),c=Ot(l),d=g.useRef(!1);return y.jsx(fM,{id:u.contentId,"aria-labelledby":u.triggerId,...c,...i,ref:r,onCloseAutoFocus:he(n.onCloseAutoFocus,h=>{d.current||u.triggerRef.current?.focus(),d.current=!1,h.preventDefault()}),onInteractOutside:he(n.onInteractOutside,h=>{const v=h.detail.originalEvent,m=v.button===0&&v.ctrlKey===!0,x=v.button===2||m;(!u.modal||x)&&(d.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});j0.displayName=_0;var TM="DropdownMenuGroup",AM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(dM,{...u,...i,ref:r})});AM.displayName=TM;var NM="DropdownMenuLabel",MM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(hM,{...u,...i,ref:r})});MM.displayName=NM;var OM="DropdownMenuItem",D0=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(mM,{...u,...i,ref:r})});D0.displayName=OM;var _M="DropdownMenuCheckboxItem",jM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(pM,{...u,...i,ref:r})});jM.displayName=_M;var DM="DropdownMenuRadioGroup",zM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(gM,{...u,...i,ref:r})});zM.displayName=DM;var LM="DropdownMenuRadioItem",UM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(vM,{...u,...i,ref:r})});UM.displayName=LM;var kM="DropdownMenuItemIndicator",BM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(yM,{...u,...i,ref:r})});BM.displayName=kM;var HM="DropdownMenuSeparator",z0=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(bM,{...u,...i,ref:r})});z0.displayName=HM;var PM="DropdownMenuArrow",qM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(xM,{...u,...i,ref:r})});qM.displayName=PM;var GM="DropdownMenuSubTrigger",VM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(wM,{...u,...i,ref:r})});VM.displayName=GM;var YM="DropdownMenuSubContent",QM=g.forwardRef((n,r)=>{const{__scopeDropdownMenu:l,...i}=n,u=Ot(l);return y.jsx(SM,{...u,...i,ref:r,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});QM.displayName=YM;var FM=A0,KM=M0,IM=O0,XM=j0,sy=D0,$M=z0;async function kl(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function ZM(){const n=await fetch("/api/profiles");if(!n.ok)throw new Error(await kl(n));return await n.json()}async function JM(){const n=await fetch("/api/profiles/active");if(!n.ok)throw new Error(await kl(n));return await n.json()}function L0(){return gn({queryKey:["profiles"],queryFn:ZM})}function WM(){return gn({queryKey:["active-profile"],queryFn:JM})}function U0(n){n.invalidateQueries({queryKey:["profiles"]}),n.invalidateQueries({queryKey:["active-profile"]}),n.invalidateQueries({queryKey:["continue-watching"]}),n.invalidateQueries({queryKey:["favorites"]}),n.invalidateQueries({queryKey:["favorite-status"]}),n.invalidateQueries({queryKey:["progress"]}),n.invalidateQueries({queryKey:["episode-progress"]})}function eO(){const n=qn();return Xa({mutationFn:async r=>{const l=await fetch("/api/profiles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!l.ok)throw new Error(await kl(l));return await l.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]})}})}function tO(){const n=qn();return Xa({mutationFn:async r=>{const{id:l,...i}=r,u=await fetch(`/api/profiles/${l}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!u.ok)throw new Error(await kl(u));return await u.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),n.invalidateQueries({queryKey:["active-profile"]})}})}function nO(){const n=qn();return Xa({mutationFn:async r=>{const l=await fetch(`/api/profiles/${r}`,{method:"DELETE"});if(!l.ok)throw new Error(await kl(l))},onSuccess:()=>{U0(n)}})}function aO(){const n=qn();return Xa({mutationFn:async r=>{const l=await fetch(`/api/profiles/${r}/activate`,{method:"POST"});if(!l.ok)throw new Error(await kl(l));return await l.json()},onSuccess:()=>{U0(n)}})}function rO(){const{data:n}=WM(),{data:r}=L0(),l=aO();return n?y.jsxs(FM,{children:[y.jsx(KM,{asChild:!0,children:y.jsx("button",{"aria-label":`Switch profile, current: ${n.name}`,className:"flex size-9 items-center justify-center rounded-full bg-muted text-lg transition-transform hover:scale-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",type:"button",children:y.jsx("span",{"aria-hidden":!0,children:n.emoji})})}),y.jsx(IM,{children:y.jsxs(XM,{align:"end",className:"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",sideOffset:8,children:[r?.map(i=>{const u=i.id===n.id;return y.jsxs(sy,{className:st("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground",u&&"font-medium"),onSelect:c=>{u||(c.preventDefault(),l.mutate(i.id,{onError:d=>{Gt.error(d instanceof Error?d.message:"Failed to switch profile")}}))},children:[y.jsx("span",{"aria-hidden":!0,className:"text-base",children:i.emoji}),y.jsx("span",{className:"flex-1 truncate",children:i.name}),u?y.jsx(Ky,{className:"size-4 text-muted-foreground"}):null]},i.id)}),y.jsx($M,{className:"my-1 h-px bg-border"}),y.jsx(sy,{asChild:!0,children:y.jsxs(pa,{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground",to:"/settings/profiles",children:[y.jsx(gR,{className:"size-4"}),"Manage profiles"]})})]})})]}):null}function en(){const[n,r]=g.useState(0);g.useEffect(function(){function u(){r(window.scrollY)}return u(),window.addEventListener("scroll",u),()=>{window.removeEventListener("scroll",u)}},[]);const l=n>=16;return y.jsx("header",{className:st("sticky top-0 z-10 w-full transition-all duration-300",l?"bg-background/80 backdrop-blur-md shadow-sm":"bg-transparent"),children:y.jsxs("nav",{className:"flex items-center gap-3 px-4 py-2 sm:gap-6 sm:px-6 sm:py-4",children:[y.jsxs(pa,{className:"flex min-h-11 items-center gap-2 text-lg font-bold tracking-tight text-primary sm:text-xl",tabIndex:-1,to:"/",children:[y.jsx("img",{alt:"",className:"size-7",src:"/images/jukebox-icon-28.png"}),y.jsx("span",{className:"hidden xs:inline sm:inline",children:"Jukebox"})]}),y.jsxs("div",{className:"flex items-center gap-0.5 text-sm sm:gap-1",children:[y.jsx(Ls,{className:({isActive:i})=>st("flex min-h-11 items-center rounded-md px-3 transition-colors",i?"text-foreground":"text-muted-foreground hover:text-foreground"),to:"/movies",children:"Movies"}),y.jsxs(Ls,{className:({isActive:i})=>st("flex min-h-11 items-center rounded-md px-3 transition-colors",i?"text-foreground":"text-muted-foreground hover:text-foreground"),to:"/shows",children:[y.jsx("span",{className:"hidden sm:inline",children:"TV Shows"}),y.jsx("span",{className:"sm:hidden",children:"Shows"})]})]}),y.jsx("div",{className:"ml-auto flex items-center",children:y.jsx(rO,{})})]})})}function Vt(){const n=Array.from({length:8},(r,l)=>l);return y.jsxs("div",{className:"px-6 py-4",children:[y.jsx("div",{className:"h-5 w-32 bg-muted rounded animate-pulse mb-3"}),y.jsx("div",{className:"flex gap-2 overflow-hidden",children:n.map(r=>y.jsxs("div",{className:"flex-shrink-0 w-32 md:w-40",children:[y.jsx("div",{className:"w-full aspect-[2/3] bg-muted rounded-sm animate-pulse"}),y.jsx("div",{className:"h-3 w-3/4 bg-muted rounded animate-pulse mt-1.5"})]},r))})]})}function lO({items:n}){return n.length===0?null:y.jsxs("section",{className:"px-6 py-4",children:[y.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:"Up Next"}),y.jsx("div",{className:"flex gap-2 overflow-x-auto scroll-smooth pb-2 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:n.map(r=>{const l=`Next: S${r.episode.seasonNumber} E${r.episode.episodeNumber} — ${r.episode.title}`;return y.jsxs(pa,{className:"flex-shrink-0 w-32 md:w-40 group",to:`/watch/episode/${r.episode.id}`,children:[y.jsx("div",{className:"relative w-full overflow-hidden rounded-sm",children:y.jsx(Zs,{alt:r.show.title,className:"w-full transition-transform duration-200 group-hover:scale-105",path:r.show.posterPath,size:"w342",title:r.show.title})}),y.jsx("p",{className:"text-xs text-muted-foreground truncate mt-1.5 px-0.5",children:r.show.title}),y.jsx("p",{className:"text-xs text-muted-foreground/70 truncate px-0.5",children:l})]},`up-next-${r.show.id}-${r.episode.id}`)})})]})}async function oO(){const n=await fetch("/api/progress/continue-watching");if(!n.ok)throw new Error("Failed to fetch continue watching");return await n.json()}function iO(){return gn({queryKey:["continue-watching"],queryFn:oO})}async function sO(){const n=await fetch("/api/library/movies");if(!n.ok)throw new Error("Failed to fetch movies");return await n.json()}function k0(){return gn({queryKey:["movies"],queryFn:sO})}async function uO(){const n=await fetch("/api/library/shows");if(!n.ok)throw new Error("Failed to fetch shows");return await n.json()}function B0(){return gn({queryKey:["shows"],queryFn:uO})}async function cO(){const n=await fetch("/api/library/up-next");if(!n.ok)throw new Error("Failed to fetch Up Next");return await n.json()}function fO(){return gn({queryKey:["up-next"],queryFn:cO})}function nh(n,r,l=2){const i=new Map;for(const c of n){const d=dO(c);for(const h of d){const v=i.get(h)??[];v.push(c),i.set(h,v)}}const u=Array.from(i.entries()).filter(([,c])=>c.length>=l).sort((c,d)=>d[1].length-c[1].length).map(([c,d])=>({genre:c,items:d}));return r?u.slice(0,r):u}function dO(n){const r=n.item.genres;return hO(r)}function hO(n){if(!n)return[];try{const r=JSON.parse(n);return Array.isArray(r)?r.filter(l=>typeof l=="string"):[]}catch{return[]}}function mO(n,r){return[...n.map(i=>({type:"movie",item:i})),...r.map(i=>({type:"show",item:i}))]}const pO=6,gO=20;function vO(){const{data:n,isLoading:r}=k0(),{data:l,isLoading:i}=B0(),{data:u,isLoading:c}=iO(),{data:d,isLoading:h}=fO(),v=r||i||c||h,m=g.useMemo(()=>mO(n??[],l??[]),[n,l]),x=g.useMemo(()=>m.length===0?[]:nh(m,pO),[m]),p=g.useMemo(()=>m.length===0?[]:[...m].sort((S,R)=>new Date(R.item.createdAt).getTime()-new Date(S.item.createdAt).getTime()).slice(0,gO),[m]);return v?y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"pt-4",children:[y.jsx(Vt,{}),y.jsx(Vt,{}),y.jsx(Vt,{}),y.jsx(Vt,{})]})]}):m.length===0?y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] gap-4 text-center px-6",children:[y.jsx($s,{className:"size-16 text-muted-foreground"}),y.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"No media in your library"}),y.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:"Your libraries are configured but no media was found. Check that your library paths are correct, or run a scan."}),y.jsx(Nt,{asChild:!0,variant:"outline",children:y.jsx(pa,{to:"/setup",children:"Go to Setup"})})]})]}):y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"pt-2 pb-8",children:[u&&u.length>0&&y.jsx(b2,{items:u}),d&&d.length>0&&y.jsx(lO,{items:d}),y.jsx(T2,{}),x.map(({genre:S,items:R})=>y.jsx(Go,{items:R,title:S},S)),y.jsx(Go,{items:p,title:"Recently Added"})]})]})}function Cr({className:n,type:r,...l}){return y.jsx("input",{type:r,"data-slot":"input",className:st("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n),...l})}var yO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bO=yO.reduce((n,r)=>{const l=Jy(`Primitive.${r}`),i=g.forwardRef((u,c)=>{const{asChild:d,...h}=u,v=d?l:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(v,{...h,ref:c})});return i.displayName=`Primitive.${r}`,{...n,[r]:i}},{}),xO="Label",H0=g.forwardRef((n,r)=>y.jsx(bO.label,{...n,ref:r,onMouseDown:l=>{l.target.closest("button, input, select, textarea")||(n.onMouseDown?.(l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));H0.displayName=xO;var wO=H0;function _s({className:n,...r}){return y.jsx(wO,{"data-slot":"label",className:st("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),...r})}function SO(){const n=jl(),{data:r,isLoading:l}=zd(),i=PC(),[u,c]=g.useState(""),[d,h]=g.useState(null);if(l)return y.jsx("div",{className:"flex min-h-screen items-center justify-center text-muted-foreground",children:"Loading…"});if(r&&(!r.enabled||r.authenticated))return y.jsx(Ks,{to:"/",replace:!0});async function v(m){m.preventDefault(),h(null);try{await i.mutateAsync(u),n("/",{replace:!0})}catch(x){h(x instanceof Error?x.message:"Something went wrong. Please try again.")}}return y.jsx("div",{className:"flex min-h-screen items-center justify-center px-6",children:y.jsxs("form",{className:"w-full max-w-sm rounded-lg border bg-card p-6 shadow-sm",onSubmit:m=>{v(m)},children:[y.jsx("h1",{className:"text-xl font-semibold",children:"Sign in to Jukebox"}),y.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Enter the shared password to continue."}),y.jsxs("div",{className:"mt-6 grid gap-2",children:[y.jsx(_s,{htmlFor:"password",children:"Password"}),y.jsx(Cr,{autoComplete:"current-password",autoFocus:!0,id:"password",onChange:m=>c(m.target.value),required:!0,type:"password",value:u})]}),d?y.jsx("p",{className:"mt-3 text-sm text-destructive",role:"alert",children:d}):null,y.jsx(Nt,{className:"mt-6 w-full",disabled:i.isPending||u.length===0,type:"submit",children:i.isPending?"Signing in…":"Sign in"})]})})}function EO(){const{data:n,isLoading:r}=k0(),l=g.useMemo(()=>n?n.map(u=>({type:"movie",item:u})):[],[n]),i=g.useMemo(()=>l.length===0?[]:nh(l),[l]);return r?y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"pt-4",children:[y.jsx(Vt,{}),y.jsx(Vt,{}),y.jsx(Vt,{}),y.jsx(Vt,{}),y.jsx(Vt,{})]})]}):l.length===0?y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] gap-4 text-center px-6",children:[y.jsx($s,{className:"size-16 text-muted-foreground"}),y.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"No movies in your library"}),y.jsxs("p",{className:"text-sm text-muted-foreground max-w-md",children:["Run"," ",y.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs font-mono",children:"bun run scan /path/to/movies"})," ","to add your collection."]})]})]}):y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsx("div",{className:"pt-2 pb-8",children:i.map(({genre:u,items:c})=>y.jsx(Go,{items:c,title:u},u))})]})}function Xf({className:n,...r}){return y.jsx("div",{"data-slot":"skeleton",className:st("bg-muted animate-pulse rounded-md",n),...r})}async function CO(){const n=await fetch("/api/scan/libraries");if(!n.ok)throw new Error("Failed to fetch libraries");return await n.json()}function RO(){const n=jl(),[r,l]=g.useState(null),[i,u]=g.useState(!0),c=g.useRef(!1),d=g.useMemo(()=>r?r.reduce((m,x)=>({added:m.added+x.progress.added,found:m.found+x.progress.total,updated:m.updated+x.progress.updated}),{added:0,found:0,updated:0}):{added:0,found:0,updated:0},[r]),h=g.useCallback(async()=>{const x=(await CO()).map(p=>({name:p.name,progress:{added:0,total:0,updated:0},status:"pending",type:p.type}));l(x),v()},[]);g.useEffect(()=>{c.current||(c.current=!0,h())},[h]);function v(){const m=new EventSource("/api/scan/stream");m.addEventListener("library-start",x=>{const p=JSON.parse(x.data);l(S=>S?.map((R,C)=>C===p.index?{...R,status:"scanning"}:R)??null)}),m.addEventListener("file-scanned",x=>{const p=JSON.parse(x.data);l(S=>S?.map((R,C)=>C===p.index?{...R,progress:{added:p.added,total:p.total,updated:p.updated}}:R)??null)}),m.addEventListener("library-complete",x=>{const p=JSON.parse(x.data);l(S=>S?.map((R,C)=>C===p.index?{...R,progress:{added:p.added,total:p.total,updated:p.updated},status:"complete"}:R)??null)}),m.addEventListener("library-error",x=>{const p=JSON.parse(x.data);l(S=>S?.map((R,C)=>C===p.index?{...R,error:p.error,status:"error"}:R)??null)}),m.addEventListener("scan-complete",()=>{u(!1),m.close()}),m.onerror=()=>{u(!1),m.close()}}return y.jsx("div",{className:"flex min-h-screen items-center justify-center px-6 py-16",children:y.jsxs("div",{className:"w-full max-w-md",children:[y.jsxs("div",{className:"mb-10 animate-fade-up",children:[y.jsx("h1",{className:"text-3xl font-bold tracking-tight text-foreground",children:i?"Scanning your libraries...":"Your library is ready"}),!i&&y.jsxs("p",{className:"mt-2 text-muted-foreground",children:[d.found," movies and episodes found."]})]}),y.jsx("div",{className:"animate-fade-up animate-delay-1",children:r===null?y.jsx("div",{className:"space-y-4",children:[1,2].map(m=>y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Xf,{className:"size-4 rounded-full"}),y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx(Xf,{className:"h-3.5 w-32"}),y.jsx(Xf,{className:"h-3 w-20"})]})]},m))}):y.jsx("div",{className:"space-y-4",children:r.map((m,x)=>y.jsxs("div",{className:"flex items-center gap-3",children:[m.status==="pending"&&y.jsx(lR,{className:"size-4 shrink-0 text-muted-foreground/20"}),m.status==="scanning"&&y.jsx(Xy,{className:"size-4 shrink-0 animate-spin text-foreground"}),m.status==="complete"&&y.jsx(tR,{className:"size-4 shrink-0 text-foreground"}),m.status==="error"&&y.jsx(aR,{className:"size-4 shrink-0 text-destructive"}),y.jsxs("div",{className:"flex-1",children:[y.jsx("p",{className:"text-sm text-foreground",children:m.name}),m.status==="pending"&&y.jsx("p",{className:"text-xs text-muted-foreground/50",children:"Waiting"}),(m.status==="scanning"||m.status==="complete")&&y.jsx("p",{className:"text-xs text-muted-foreground",children:m.progress.total>0?y.jsxs(y.Fragment,{children:[m.progress.total," files",m.progress.added>0&&` · ${m.progress.added} new`,m.progress.updated>0&&` · ${m.progress.updated} updated`]}):"Scanning..."}),m.status==="error"&&y.jsx("p",{className:"text-xs text-destructive",children:m.error})]})]},x))})}),!i&&y.jsx("div",{className:"mt-12 animate-fade-up animate-delay-2",children:y.jsx(Nt,{onClick:()=>{n("/")},size:"lg",children:"Start Watching"})})]})})}const TO=[{to:"/settings/profiles",label:"Profiles"},{to:"/settings/auth",label:"Auth"}];function pd({children:n}){return y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"mx-auto grid w-full max-w-5xl gap-8 px-6 py-8 md:grid-cols-[12rem_1fr]",children:[y.jsxs("aside",{children:[y.jsx("h1",{className:"mb-4 text-lg font-semibold",children:"Settings"}),y.jsx("nav",{className:"flex flex-col gap-1 text-sm",children:TO.map(r=>y.jsx(Ls,{className:({isActive:l})=>st("rounded-md px-3 py-2 transition-colors",l?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),to:r.to,children:r.label},r.to))})]}),y.jsx("main",{children:n})]})]})}function AO(){const{data:n,isLoading:r}=zd(),l=GC(),i=qC(),[u,c]=g.useState(""),[d,h]=g.useState(""),[v,m]=g.useState(""),[x,p]=g.useState(null),S=n?.enabled??!1;async function R(T){if(T.preventDefault(),p(null),d!==v){p("Passwords do not match.");return}if(d.length<8){p("Choose a password of at least 8 characters.");return}try{const A=await l.mutateAsync({currentPassword:S?u:void 0,newPassword:d});Gt.success(A.enabled?"Password updated.":"Password disabled."),c(""),h(""),m("")}catch(A){p(A instanceof Error?A.message:"Something went wrong. Please try again.")}}async function C(){if(window.confirm("Disable the shared password? Anyone on your network will be able to use Jukebox.")){p(null);try{await l.mutateAsync({currentPassword:u,newPassword:""}),Gt.success("Password disabled."),c("")}catch(A){p(A instanceof Error?A.message:"Something went wrong. Please try again.")}}}async function E(){try{await i.mutateAsync(),Gt.success("Signed out.")}catch(T){Gt.error(T instanceof Error?T.message:"Failed to sign out.")}}return r?y.jsx(pd,{children:y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"})}):y.jsxs(pd,{children:[y.jsxs("div",{children:[y.jsx("h2",{className:"text-xl font-semibold",children:"Authentication"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"Protect Jukebox with a shared password. Everyone uses the same password to sign in."})]}),y.jsxs("div",{className:"mt-6 rounded-lg border bg-card p-4",children:[y.jsx("p",{className:"text-sm font-medium",children:S?"Auth is on":"Auth is off"}),y.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:S?"Visitors must sign in with the shared password.":"Anyone who can reach this server can use it."})]}),y.jsxs("form",{className:"mt-6 grid max-w-md gap-4",onSubmit:T=>{R(T)},children:[S?y.jsxs("div",{className:"grid gap-2",children:[y.jsx(_s,{htmlFor:"current-password",children:"Current password"}),y.jsx(Cr,{autoComplete:"current-password",id:"current-password",onChange:T=>c(T.target.value),required:!0,type:"password",value:u})]}):null,y.jsxs("div",{className:"grid gap-2",children:[y.jsx(_s,{htmlFor:"new-password",children:S?"New password":"Password"}),y.jsx(Cr,{autoComplete:"new-password",id:"new-password",minLength:8,onChange:T=>h(T.target.value),required:!0,type:"password",value:d}),y.jsx("p",{className:"text-xs text-muted-foreground",children:"At least 8 characters."})]}),y.jsxs("div",{className:"grid gap-2",children:[y.jsx(_s,{htmlFor:"confirm-password",children:"Confirm password"}),y.jsx(Cr,{autoComplete:"new-password",id:"confirm-password",minLength:8,onChange:T=>m(T.target.value),required:!0,type:"password",value:v})]}),x?y.jsx("p",{className:"text-sm text-destructive",role:"alert",children:x}):null,y.jsxs("div",{className:"flex flex-wrap gap-2",children:[y.jsx(Nt,{disabled:l.isPending,type:"submit",children:S?"Change password":"Enable and set password"}),S?y.jsxs(y.Fragment,{children:[y.jsx(Nt,{disabled:l.isPending||u.length===0,onClick:()=>{C()},type:"button",variant:"destructive",children:"Disable"}),y.jsx(Nt,{disabled:i.isPending,onClick:()=>{E()},type:"button",variant:"outline",children:"Sign out"})]}):null]})]})]})}function NO(n){const r=MO(n),l=g.forwardRef((i,u)=>{const{children:c,...d}=i,h=g.Children.toArray(c),v=h.find(_O);if(v){const m=v.props.children,x=h.map(p=>p===v?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:p);return y.jsx(r,{...d,ref:u,children:g.isValidElement(m)?g.cloneElement(m,void 0,x):null})}return y.jsx(r,{...d,ref:u,children:c})});return l.displayName=`${n}.Slot`,l}function MO(n){const r=g.forwardRef((l,i)=>{const{children:u,...c}=l;if(g.isValidElement(u)){const d=DO(u),h=jO(c,u.props);return u.type!==g.Fragment&&(h.ref=i?ga(i,d):d),g.cloneElement(u,h)}return g.Children.count(u)>1?g.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var OO=Symbol("radix.slottable");function _O(n){return g.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===OO}function jO(n,r){const l={...r};for(const i in r){const u=n[i],c=r[i];/^on[A-Z]/.test(i)?u&&c?l[i]=(...h)=>{const v=c(...h);return u(...h),v}:u&&(l[i]=u):i==="style"?l[i]={...u,...c}:i==="className"&&(l[i]=[u,c].filter(Boolean).join(" "))}return{...n,...l}}function DO(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var fu="Dialog",[P0]=_r(fu),[zO,An]=P0(fu),q0=n=>{const{__scopeDialog:r,children:l,open:i,defaultOpen:u,onOpenChange:c,modal:d=!0}=n,h=g.useRef(null),v=g.useRef(null),[m,x]=Vo({prop:i,defaultProp:u??!1,onChange:c,caller:fu});return y.jsx(zO,{scope:r,triggerRef:h,contentRef:v,contentId:fa(),titleId:fa(),descriptionId:fa(),open:m,onOpenChange:x,onOpenToggle:g.useCallback(()=>x(p=>!p),[x]),modal:d,children:l})};q0.displayName=fu;var G0="DialogTrigger",LO=g.forwardRef((n,r)=>{const{__scopeDialog:l,...i}=n,u=An(G0,l),c=Ve(r,u.triggerRef);return y.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.contentId,"data-state":lh(u.open),...i,ref:c,onClick:he(n.onClick,u.onOpenToggle)})});LO.displayName=G0;var ah="DialogPortal",[UO,V0]=P0(ah,{forceMount:void 0}),Y0=n=>{const{__scopeDialog:r,forceMount:l,children:i,container:u}=n,c=An(ah,r);return y.jsx(UO,{scope:r,forceMount:l,children:g.Children.map(i,d=>y.jsx(Za,{present:l||c.open,children:y.jsx(lu,{asChild:!0,container:u,children:d})}))})};Y0.displayName=ah;var Ys="DialogOverlay",Q0=g.forwardRef((n,r)=>{const l=V0(Ys,n.__scopeDialog),{forceMount:i=l.forceMount,...u}=n,c=An(Ys,n.__scopeDialog);return c.modal?y.jsx(Za,{present:i||c.open,children:y.jsx(BO,{...u,ref:r})}):null});Q0.displayName=Ys;var kO=NO("DialogOverlay.RemoveScroll"),BO=g.forwardRef((n,r)=>{const{__scopeDialog:l,...i}=n,u=An(Ys,l);return y.jsx(iu,{as:kO,allowPinchZoom:!0,shards:[u.contentRef],children:y.jsx(De.div,{"data-state":lh(u.open),...i,ref:r,style:{pointerEvents:"auto",...i.style}})})}),Nr="DialogContent",F0=g.forwardRef((n,r)=>{const l=V0(Nr,n.__scopeDialog),{forceMount:i=l.forceMount,...u}=n,c=An(Nr,n.__scopeDialog);return y.jsx(Za,{present:i||c.open,children:c.modal?y.jsx(HO,{...u,ref:r}):y.jsx(PO,{...u,ref:r})})});F0.displayName=Nr;var HO=g.forwardRef((n,r)=>{const l=An(Nr,n.__scopeDialog),i=g.useRef(null),u=Ve(r,l.contentRef,i);return g.useEffect(()=>{const c=i.current;if(c)return Id(c)},[]),y.jsx(K0,{...n,ref:u,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(n.onCloseAutoFocus,c=>{c.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:he(n.onPointerDownOutside,c=>{const d=c.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0;(d.button===2||h)&&c.preventDefault()}),onFocusOutside:he(n.onFocusOutside,c=>c.preventDefault())})}),PO=g.forwardRef((n,r)=>{const l=An(Nr,n.__scopeDialog),i=g.useRef(!1),u=g.useRef(!1);return y.jsx(K0,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{n.onCloseAutoFocus?.(c),c.defaultPrevented||(i.current||l.triggerRef.current?.focus(),c.preventDefault()),i.current=!1,u.current=!1},onInteractOutside:c=>{n.onInteractOutside?.(c),c.defaultPrevented||(i.current=!0,c.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const d=c.target;l.triggerRef.current?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&u.current&&c.preventDefault()}})}),K0=g.forwardRef((n,r)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:u,onCloseAutoFocus:c,...d}=n,h=An(Nr,l),v=g.useRef(null),m=Ve(r,v);return Hd(),y.jsxs(y.Fragment,{children:[y.jsx(Ws,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:u,onUnmountAutoFocus:c,children:y.jsx(Js,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":lh(h.open),...d,ref:m,onDismiss:()=>h.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(GO,{titleId:h.titleId}),y.jsx(YO,{contentRef:v,descriptionId:h.descriptionId})]})]})}),rh="DialogTitle",I0=g.forwardRef((n,r)=>{const{__scopeDialog:l,...i}=n,u=An(rh,l);return y.jsx(De.h2,{id:u.titleId,...i,ref:r})});I0.displayName=rh;var X0="DialogDescription",qO=g.forwardRef((n,r)=>{const{__scopeDialog:l,...i}=n,u=An(X0,l);return y.jsx(De.p,{id:u.descriptionId,...i,ref:r})});qO.displayName=X0;var $0="DialogClose",Z0=g.forwardRef((n,r)=>{const{__scopeDialog:l,...i}=n,u=An($0,l);return y.jsx(De.button,{type:"button",...i,ref:r,onClick:he(n.onClick,()=>u.onOpenChange(!1))})});Z0.displayName=$0;function lh(n){return n?"open":"closed"}var J0="DialogTitleWarning",[hj,W0]=A2(J0,{contentName:Nr,titleName:rh,docsSlug:"dialog"}),GO=({titleId:n})=>{const r=W0(J0),l=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
53
|
+
|
|
54
|
+
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
55
|
+
|
|
56
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return g.useEffect(()=>{n&&(document.getElementById(n)||console.error(l))},[l,n]),null},VO="DialogDescriptionWarning",YO=({contentRef:n,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${W0(VO).contentName}}.`;return g.useEffect(()=>{const u=n.current?.getAttribute("aria-describedby");r&&u&&(document.getElementById(r)||console.warn(i))},[i,n,r]),null},QO=q0,FO=Y0,KO=Q0,IO=F0,XO=I0,$O=Z0;const $f=["🍿","🎬","🎥","📺","🎞️","🎭","🚀","🌟","🌈","🔥","🌙","🌊","🐱","🐶","🦊","🦁","🐼","🐧","🦄","🐙","🍕","🍣","🍩","🍔","🎮","🎸","⚽","🏀","⛺","🏝️"];function ZO({initialValues:n,onOpenChange:r,onSubmit:l,open:i,submitting:u,title:c}){const[d,h]=g.useState(n?.name??""),[v,m]=g.useState(n?.emoji??$f[0]);g.useEffect(function(){i&&(h(n?.name??""),m(n?.emoji??$f[0]))},[n?.emoji,n?.name,i]);function x(p){p.preventDefault();const S=d.trim();S&&Promise.resolve(l({name:S,emoji:v}))}return y.jsx(QO,{onOpenChange:r,open:i,children:y.jsxs(FO,{children:[y.jsx(KO,{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),y.jsxs(IO,{className:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg",children:[y.jsxs("div",{className:"flex items-start justify-between",children:[y.jsx(XO,{className:"text-lg font-semibold",children:c}),y.jsx($O,{"aria-label":"Close",className:"rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none",children:y.jsx(bR,{className:"size-4"})})]}),y.jsxs("form",{className:"grid gap-4",onSubmit:x,children:[y.jsxs("div",{className:"grid gap-2",children:[y.jsx("label",{className:"text-sm font-medium",htmlFor:"profile-name",children:"Name"}),y.jsx(Cr,{autoFocus:!0,id:"profile-name",maxLength:40,onChange:p=>h(p.target.value),placeholder:"e.g. Ada",value:d})]}),y.jsxs("div",{className:"grid gap-2",children:[y.jsx("span",{className:"text-sm font-medium",children:"Emoji"}),y.jsx("div",{className:"grid grid-cols-6 gap-2",children:$f.map(p=>{const S=p===v;return y.jsx("button",{"aria-pressed":S,className:st("flex size-10 items-center justify-center rounded-md border text-xl transition-colors",S?"border-primary bg-primary/10":"border-border hover:bg-accent"),onClick:()=>m(p),type:"button",children:y.jsx("span",{"aria-hidden":!0,children:p})},p)})})]}),y.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[y.jsx(Nt,{onClick:()=>r(!1),type:"button",variant:"ghost",children:"Cancel"}),y.jsx(Nt,{disabled:(u??!1)||!d.trim(),type:"submit",children:"Save"})]})]})]})]})})}function JO(){const{data:n,isLoading:r}=L0(),l=eO(),i=tO(),u=nO(),[c,d]=g.useState({kind:"closed"});function h(){d({kind:"closed"})}async function v(p){try{c.kind==="create"?(await l.mutateAsync(p),Gt.success(`Created ${p.name}`)):c.kind==="edit"&&(await i.mutateAsync({id:c.profile.id,...p}),Gt.success(`Updated ${p.name}`)),h()}catch(S){Gt.error(S instanceof Error?S.message:"Failed to save")}}async function m(p){if(window.confirm(`Delete profile "${p.name}"? Their watch progress and favorites will be removed.`))try{await u.mutateAsync(p.id),Gt.success(`Deleted ${p.name}`)}catch(R){Gt.error(R instanceof Error?R.message:"Failed to delete")}}const x=(n?.length??0)>1;return y.jsxs(pd,{children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("h2",{className:"text-xl font-semibold",children:"Profiles"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"Each profile has its own watch progress and favorites."})]}),y.jsxs(Nt,{onClick:()=>d({kind:"create"}),type:"button",children:[y.jsx(od,{className:"size-4"}),"Add profile"]})]}),y.jsx("div",{className:"mt-6 grid gap-3 sm:grid-cols-2",children:r?y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):n?.map(p=>y.jsxs("div",{className:"flex items-center gap-3 rounded-lg border bg-card p-4",children:[y.jsx("span",{"aria-hidden":!0,className:"flex size-12 items-center justify-center rounded-full bg-muted text-2xl",children:p.emoji}),y.jsx("div",{className:"flex-1 truncate",children:y.jsx("p",{className:"truncate font-medium",children:p.name})}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(Nt,{"aria-label":`Edit ${p.name}`,onClick:()=>d({kind:"edit",profile:p}),size:"icon",type:"button",variant:"ghost",children:y.jsx(fR,{className:"size-4"})}),y.jsx(Nt,{"aria-label":`Delete ${p.name}`,disabled:!x,onClick:()=>{m(p)},size:"icon",type:"button",variant:"ghost",children:y.jsx($y,{className:"size-4"})})]})]},p.id))}),y.jsx(ZO,{initialValues:c.kind==="edit"?{name:c.profile.name,emoji:c.profile.emoji}:void 0,onOpenChange:p=>{p||h()},onSubmit:v,open:c.kind!=="closed",submitting:l.isPending||i.isPending,title:c.kind==="edit"?"Edit profile":"New profile"})]})}function uy(n,[r,l]){return Math.min(l,Math.max(r,n))}function WO(n){const r=e_(n),l=g.forwardRef((i,u)=>{const{children:c,...d}=i,h=g.Children.toArray(c),v=h.find(n_);if(v){const m=v.props.children,x=h.map(p=>p===v?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:p);return y.jsx(r,{...d,ref:u,children:g.isValidElement(m)?g.cloneElement(m,void 0,x):null})}return y.jsx(r,{...d,ref:u,children:c})});return l.displayName=`${n}.Slot`,l}function e_(n){const r=g.forwardRef((l,i)=>{const{children:u,...c}=l;if(g.isValidElement(u)){const d=r_(u),h=a_(c,u.props);return u.type!==g.Fragment&&(h.ref=i?ga(i,d):d),g.cloneElement(u,h)}return g.Children.count(u)>1?g.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var t_=Symbol("radix.slottable");function n_(n){return g.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===t_}function a_(n,r){const l={...r};for(const i in r){const u=n[i],c=r[i];/^on[A-Z]/.test(i)?u&&c?l[i]=(...h)=>{const v=c(...h);return u(...h),v}:u&&(l[i]=u):i==="style"?l[i]={...u,...c}:i==="className"&&(l[i]=[u,c].filter(Boolean).join(" "))}return{...n,...l}}function r_(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}function l_(n){const r=g.useRef({value:n,previous:n});return g.useMemo(()=>(r.current.value!==n&&(r.current.previous=r.current.value,r.current.value=n),r.current.previous),[n])}var ex=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o_="VisuallyHidden",i_=g.forwardRef((n,r)=>y.jsx(De.span,{...n,ref:r,style:{...ex,...n.style}}));i_.displayName=o_;var s_=[" ","Enter","ArrowUp","ArrowDown"],u_=[" ","Enter"],Mr="Select",[du,hu,c_]=kd(Mr),[Bl]=_r(Mr,[c_,ru]),mu=ru(),[f_,Ja]=Bl(Mr),[d_,h_]=Bl(Mr),tx=n=>{const{__scopeSelect:r,children:l,open:i,defaultOpen:u,onOpenChange:c,value:d,defaultValue:h,onValueChange:v,dir:m,name:x,autoComplete:p,disabled:S,required:R,form:C}=n,E=mu(r),[T,A]=g.useState(null),[N,_]=g.useState(null),[H,V]=g.useState(!1),W=Bd(m),[B,G]=Vo({prop:i,defaultProp:u??!1,onChange:c,caller:Mr}),[ne,re]=Vo({prop:d,defaultProp:h,onChange:v,caller:Mr}),de=g.useRef(null),fe=T?C||!!T.closest("form"):!0,[me,pe]=g.useState(new Set),ve=Array.from(me).map(j=>j.props.value).join(";");return y.jsx(Hb,{...E,children:y.jsxs(f_,{required:R,scope:r,trigger:T,onTriggerChange:A,valueNode:N,onValueNodeChange:_,valueNodeHasChildren:H,onValueNodeHasChildrenChange:V,contentId:fa(),value:ne,onValueChange:re,open:B,onOpenChange:G,dir:W,triggerPointerDownPosRef:de,disabled:S,children:[y.jsx(du.Provider,{scope:r,children:y.jsx(d_,{scope:n.__scopeSelect,onNativeOptionAdd:g.useCallback(j=>{pe(Y=>new Set(Y).add(j))},[]),onNativeOptionRemove:g.useCallback(j=>{pe(Y=>{const k=new Set(Y);return k.delete(j),k})},[]),children:l})}),fe?y.jsxs(Ex,{"aria-hidden":!0,required:R,tabIndex:-1,name:x,autoComplete:p,value:ne,onChange:j=>re(j.target.value),disabled:S,form:C,children:[ne===void 0?y.jsx("option",{value:""}):null,Array.from(me)]},ve):null]})})};tx.displayName=Mr;var nx="SelectTrigger",ax=g.forwardRef((n,r)=>{const{__scopeSelect:l,disabled:i=!1,...u}=n,c=mu(l),d=Ja(nx,l),h=d.disabled||i,v=Ve(r,d.onTriggerChange),m=hu(l),x=g.useRef("touch"),[p,S,R]=Rx(E=>{const T=m().filter(_=>!_.disabled),A=T.find(_=>_.value===d.value),N=Tx(T,E,A);N!==void 0&&d.onValueChange(N.value)}),C=E=>{h||(d.onOpenChange(!0),R()),E&&(d.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return y.jsx(Pb,{asChild:!0,...c,children:y.jsx(De.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":Cx(d.value)?"":void 0,...u,ref:v,onClick:he(u.onClick,E=>{E.currentTarget.focus(),x.current!=="mouse"&&C(E)}),onPointerDown:he(u.onPointerDown,E=>{x.current=E.pointerType;const T=E.target;T.hasPointerCapture(E.pointerId)&&T.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(C(E),E.preventDefault())}),onKeyDown:he(u.onKeyDown,E=>{const T=p.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&S(E.key),!(T&&E.key===" ")&&s_.includes(E.key)&&(C(),E.preventDefault())})})})});ax.displayName=nx;var rx="SelectValue",lx=g.forwardRef((n,r)=>{const{__scopeSelect:l,className:i,style:u,children:c,placeholder:d="",...h}=n,v=Ja(rx,l),{onValueNodeHasChildrenChange:m}=v,x=c!==void 0,p=Ve(r,v.onValueNodeChange);return wt(()=>{m(x)},[m,x]),y.jsx(De.span,{...h,ref:p,style:{pointerEvents:"none"},children:Cx(v.value)?y.jsx(y.Fragment,{children:d}):c})});lx.displayName=rx;var m_="SelectIcon",ox=g.forwardRef((n,r)=>{const{__scopeSelect:l,children:i,...u}=n;return y.jsx(De.span,{"aria-hidden":!0,...u,ref:r,children:i||"▼"})});ox.displayName=m_;var p_="SelectPortal",ix=n=>y.jsx(lu,{asChild:!0,...n});ix.displayName=p_;var Or="SelectContent",sx=g.forwardRef((n,r)=>{const l=Ja(Or,n.__scopeSelect),[i,u]=g.useState();if(wt(()=>{u(new DocumentFragment)},[]),!l.open){const c=i;return c?$o.createPortal(y.jsx(ux,{scope:n.__scopeSelect,children:y.jsx(du.Slot,{scope:n.__scopeSelect,children:y.jsx("div",{children:n.children})})}),c):null}return y.jsx(cx,{...n,ref:r})});sx.displayName=Or;var Cn=10,[ux,Wa]=Bl(Or),g_="SelectContentImpl",v_=WO("SelectContent.RemoveScroll"),cx=g.forwardRef((n,r)=>{const{__scopeSelect:l,position:i="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:c,onPointerDownOutside:d,side:h,sideOffset:v,align:m,alignOffset:x,arrowPadding:p,collisionBoundary:S,collisionPadding:R,sticky:C,hideWhenDetached:E,avoidCollisions:T,...A}=n,N=Ja(Or,l),[_,H]=g.useState(null),[V,W]=g.useState(null),B=Ve(r,X=>H(X)),[G,ne]=g.useState(null),[re,de]=g.useState(null),fe=hu(l),[me,pe]=g.useState(!1),ve=g.useRef(!1);g.useEffect(()=>{if(_)return Id(_)},[_]),Hd();const j=g.useCallback(X=>{const[ae,...be]=fe().map(Me=>Me.ref.current),[Ee]=be.slice(-1),Te=document.activeElement;for(const Me of X)if(Me===Te||(Me?.scrollIntoView({block:"nearest"}),Me===ae&&V&&(V.scrollTop=0),Me===Ee&&V&&(V.scrollTop=V.scrollHeight),Me?.focus(),document.activeElement!==Te))return},[fe,V]),Y=g.useCallback(()=>j([G,_]),[j,G,_]);g.useEffect(()=>{me&&Y()},[me,Y]);const{onOpenChange:k,triggerPointerDownPosRef:J}=N;g.useEffect(()=>{if(_){let X={x:0,y:0};const ae=Ee=>{X={x:Math.abs(Math.round(Ee.pageX)-(J.current?.x??0)),y:Math.abs(Math.round(Ee.pageY)-(J.current?.y??0))}},be=Ee=>{X.x<=10&&X.y<=10?Ee.preventDefault():_.contains(Ee.target)||k(!1),document.removeEventListener("pointermove",ae),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",be,{capture:!0})}}},[_,k,J]),g.useEffect(()=>{const X=()=>k(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[k]);const[ie,O]=Rx(X=>{const ae=fe().filter(Te=>!Te.disabled),be=ae.find(Te=>Te.ref.current===document.activeElement),Ee=Tx(ae,X,be);Ee&&setTimeout(()=>Ee.ref.current.focus())}),F=g.useCallback((X,ae,be)=>{const Ee=!ve.current&&!be;(N.value!==void 0&&N.value===ae||Ee)&&(ne(X),Ee&&(ve.current=!0))},[N.value]),Q=g.useCallback(()=>_?.focus(),[_]),Z=g.useCallback((X,ae,be)=>{const Ee=!ve.current&&!be;(N.value!==void 0&&N.value===ae||Ee)&&de(X)},[N.value]),te=i==="popper"?gd:fx,le=te===gd?{side:h,sideOffset:v,align:m,alignOffset:x,arrowPadding:p,collisionBoundary:S,collisionPadding:R,sticky:C,hideWhenDetached:E,avoidCollisions:T}:{};return y.jsx(ux,{scope:l,content:_,viewport:V,onViewportChange:W,itemRefCallback:F,selectedItem:G,onItemLeave:Q,itemTextRefCallback:Z,focusSelectedItem:Y,selectedItemText:re,position:i,isPositioned:me,searchRef:ie,children:y.jsx(iu,{as:v_,allowPinchZoom:!0,children:y.jsx(Ws,{asChild:!0,trapped:N.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:he(u,X=>{N.trigger?.focus({preventScroll:!0}),X.preventDefault()}),children:y.jsx(Js,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:y.jsx(te,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:X=>X.preventDefault(),...A,...le,onPlaced:()=>pe(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:he(A.onKeyDown,X=>{const ae=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!ae&&X.key.length===1&&O(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let Ee=fe().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(X.key)&&(Ee=Ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const Te=X.target,Me=Ee.indexOf(Te);Ee=Ee.slice(Me+1)}setTimeout(()=>j(Ee)),X.preventDefault()}})})})})})})});cx.displayName=g_;var y_="SelectItemAlignedPosition",fx=g.forwardRef((n,r)=>{const{__scopeSelect:l,onPlaced:i,...u}=n,c=Ja(Or,l),d=Wa(Or,l),[h,v]=g.useState(null),[m,x]=g.useState(null),p=Ve(r,B=>x(B)),S=hu(l),R=g.useRef(!1),C=g.useRef(!0),{viewport:E,selectedItem:T,selectedItemText:A,focusSelectedItem:N}=d,_=g.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&m&&E&&T&&A){const B=c.trigger.getBoundingClientRect(),G=m.getBoundingClientRect(),ne=c.valueNode.getBoundingClientRect(),re=A.getBoundingClientRect();if(c.dir!=="rtl"){const Te=re.left-G.left,Me=ne.left-Te,dt=B.left-Me,rt=B.width+dt,Vn=Math.max(rt,G.width),Nn=window.innerWidth-Cn,yn=uy(Me,[Cn,Math.max(Cn,Nn-Vn)]);h.style.minWidth=rt+"px",h.style.left=yn+"px"}else{const Te=G.right-re.right,Me=window.innerWidth-ne.right-Te,dt=window.innerWidth-B.right-Me,rt=B.width+dt,Vn=Math.max(rt,G.width),Nn=window.innerWidth-Cn,yn=uy(Me,[Cn,Math.max(Cn,Nn-Vn)]);h.style.minWidth=rt+"px",h.style.right=yn+"px"}const de=S(),fe=window.innerHeight-Cn*2,me=E.scrollHeight,pe=window.getComputedStyle(m),ve=parseInt(pe.borderTopWidth,10),j=parseInt(pe.paddingTop,10),Y=parseInt(pe.borderBottomWidth,10),k=parseInt(pe.paddingBottom,10),J=ve+j+me+k+Y,ie=Math.min(T.offsetHeight*5,J),O=window.getComputedStyle(E),F=parseInt(O.paddingTop,10),Q=parseInt(O.paddingBottom,10),Z=B.top+B.height/2-Cn,te=fe-Z,le=T.offsetHeight/2,X=T.offsetTop+le,ae=ve+j+X,be=J-ae;if(ae<=Z){const Te=de.length>0&&T===de[de.length-1].ref.current;h.style.bottom="0px";const Me=m.clientHeight-E.offsetTop-E.offsetHeight,dt=Math.max(te,le+(Te?Q:0)+Me+Y),rt=ae+dt;h.style.height=rt+"px"}else{const Te=de.length>0&&T===de[0].ref.current;h.style.top="0px";const dt=Math.max(Z,ve+E.offsetTop+(Te?F:0)+le)+be;h.style.height=dt+"px",E.scrollTop=ae-Z+E.offsetTop}h.style.margin=`${Cn}px 0`,h.style.minHeight=ie+"px",h.style.maxHeight=fe+"px",i?.(),requestAnimationFrame(()=>R.current=!0)}},[S,c.trigger,c.valueNode,h,m,E,T,A,c.dir,i]);wt(()=>_(),[_]);const[H,V]=g.useState();wt(()=>{m&&V(window.getComputedStyle(m).zIndex)},[m]);const W=g.useCallback(B=>{B&&C.current===!0&&(_(),N?.(),C.current=!1)},[_,N]);return y.jsx(x_,{scope:l,contentWrapper:h,shouldExpandOnScrollRef:R,onScrollButtonChange:W,children:y.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:H},children:y.jsx(De.div,{...u,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})});fx.displayName=y_;var b_="SelectPopperPosition",gd=g.forwardRef((n,r)=>{const{__scopeSelect:l,align:i="start",collisionPadding:u=Cn,...c}=n,d=mu(l);return y.jsx(qb,{...d,...c,ref:r,align:i,collisionPadding:u,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});gd.displayName=b_;var[x_,oh]=Bl(Or,{}),vd="SelectViewport",dx=g.forwardRef((n,r)=>{const{__scopeSelect:l,nonce:i,...u}=n,c=Wa(vd,l),d=oh(vd,l),h=Ve(r,c.onViewportChange),v=g.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),y.jsx(du.Slot,{scope:l,children:y.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:he(u.onScroll,m=>{const x=m.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:S}=d;if(S?.current&&p){const R=Math.abs(v.current-x.scrollTop);if(R>0){const C=window.innerHeight-Cn*2,E=parseFloat(p.style.minHeight),T=parseFloat(p.style.height),A=Math.max(E,T);if(A<C){const N=A+R,_=Math.min(C,N),H=N-_;p.style.height=_+"px",p.style.bottom==="0px"&&(x.scrollTop=H>0?H:0,p.style.justifyContent="flex-end")}}}v.current=x.scrollTop})})})]})});dx.displayName=vd;var hx="SelectGroup",[w_,S_]=Bl(hx),E_=g.forwardRef((n,r)=>{const{__scopeSelect:l,...i}=n,u=fa();return y.jsx(w_,{scope:l,id:u,children:y.jsx(De.div,{role:"group","aria-labelledby":u,...i,ref:r})})});E_.displayName=hx;var mx="SelectLabel",C_=g.forwardRef((n,r)=>{const{__scopeSelect:l,...i}=n,u=S_(mx,l);return y.jsx(De.div,{id:u.id,...i,ref:r})});C_.displayName=mx;var Qs="SelectItem",[R_,px]=Bl(Qs),gx=g.forwardRef((n,r)=>{const{__scopeSelect:l,value:i,disabled:u=!1,textValue:c,...d}=n,h=Ja(Qs,l),v=Wa(Qs,l),m=h.value===i,[x,p]=g.useState(c??""),[S,R]=g.useState(!1),C=Ve(r,N=>v.itemRefCallback?.(N,i,u)),E=fa(),T=g.useRef("touch"),A=()=>{u||(h.onValueChange(i),h.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(R_,{scope:l,value:i,disabled:u,textId:E,isSelected:m,onItemTextChange:g.useCallback(N=>{p(_=>_||(N?.textContent??"").trim())},[]),children:y.jsx(du.ItemSlot,{scope:l,value:i,disabled:u,textValue:x,children:y.jsx(De.div,{role:"option","aria-labelledby":E,"data-highlighted":S?"":void 0,"aria-selected":m&&S,"data-state":m?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...d,ref:C,onFocus:he(d.onFocus,()=>R(!0)),onBlur:he(d.onBlur,()=>R(!1)),onClick:he(d.onClick,()=>{T.current!=="mouse"&&A()}),onPointerUp:he(d.onPointerUp,()=>{T.current==="mouse"&&A()}),onPointerDown:he(d.onPointerDown,N=>{T.current=N.pointerType}),onPointerMove:he(d.onPointerMove,N=>{T.current=N.pointerType,u?v.onItemLeave?.():T.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:he(d.onPointerLeave,N=>{N.currentTarget===document.activeElement&&v.onItemLeave?.()}),onKeyDown:he(d.onKeyDown,N=>{v.searchRef?.current!==""&&N.key===" "||(u_.includes(N.key)&&A(),N.key===" "&&N.preventDefault())})})})})});gx.displayName=Qs;var Ho="SelectItemText",vx=g.forwardRef((n,r)=>{const{__scopeSelect:l,className:i,style:u,...c}=n,d=Ja(Ho,l),h=Wa(Ho,l),v=px(Ho,l),m=h_(Ho,l),[x,p]=g.useState(null),S=Ve(r,A=>p(A),v.onItemTextChange,A=>h.itemTextRefCallback?.(A,v.value,v.disabled)),R=x?.textContent,C=g.useMemo(()=>y.jsx("option",{value:v.value,disabled:v.disabled,children:R},v.value),[v.disabled,v.value,R]),{onNativeOptionAdd:E,onNativeOptionRemove:T}=m;return wt(()=>(E(C),()=>T(C)),[E,T,C]),y.jsxs(y.Fragment,{children:[y.jsx(De.span,{id:v.textId,...c,ref:S}),v.isSelected&&d.valueNode&&!d.valueNodeHasChildren?$o.createPortal(c.children,d.valueNode):null]})});vx.displayName=Ho;var yx="SelectItemIndicator",bx=g.forwardRef((n,r)=>{const{__scopeSelect:l,...i}=n;return px(yx,l).isSelected?y.jsx(De.span,{"aria-hidden":!0,...i,ref:r}):null});bx.displayName=yx;var yd="SelectScrollUpButton",xx=g.forwardRef((n,r)=>{const l=Wa(yd,n.__scopeSelect),i=oh(yd,n.__scopeSelect),[u,c]=g.useState(!1),d=Ve(r,i.onScrollButtonChange);return wt(()=>{if(l.viewport&&l.isPositioned){let h=function(){const m=v.scrollTop>0;c(m)};const v=l.viewport;return h(),v.addEventListener("scroll",h),()=>v.removeEventListener("scroll",h)}},[l.viewport,l.isPositioned]),u?y.jsx(Sx,{...n,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:v}=l;h&&v&&(h.scrollTop=h.scrollTop-v.offsetHeight)}}):null});xx.displayName=yd;var bd="SelectScrollDownButton",wx=g.forwardRef((n,r)=>{const l=Wa(bd,n.__scopeSelect),i=oh(bd,n.__scopeSelect),[u,c]=g.useState(!1),d=Ve(r,i.onScrollButtonChange);return wt(()=>{if(l.viewport&&l.isPositioned){let h=function(){const m=v.scrollHeight-v.clientHeight,x=Math.ceil(v.scrollTop)<m;c(x)};const v=l.viewport;return h(),v.addEventListener("scroll",h),()=>v.removeEventListener("scroll",h)}},[l.viewport,l.isPositioned]),u?y.jsx(Sx,{...n,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:v}=l;h&&v&&(h.scrollTop=h.scrollTop+v.offsetHeight)}}):null});wx.displayName=bd;var Sx=g.forwardRef((n,r)=>{const{__scopeSelect:l,onAutoScroll:i,...u}=n,c=Wa("SelectScrollButton",l),d=g.useRef(null),h=hu(l),v=g.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return g.useEffect(()=>()=>v(),[v]),wt(()=>{h().find(x=>x.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[h]),y.jsx(De.div,{"aria-hidden":!0,...u,ref:r,style:{flexShrink:0,...u.style},onPointerDown:he(u.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:he(u.onPointerMove,()=>{c.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:he(u.onPointerLeave,()=>{v()})})}),T_="SelectSeparator",A_=g.forwardRef((n,r)=>{const{__scopeSelect:l,...i}=n;return y.jsx(De.div,{"aria-hidden":!0,...i,ref:r})});A_.displayName=T_;var xd="SelectArrow",N_=g.forwardRef((n,r)=>{const{__scopeSelect:l,...i}=n,u=mu(l),c=Ja(xd,l),d=Wa(xd,l);return c.open&&d.position==="popper"?y.jsx(Gb,{...u,...i,ref:r}):null});N_.displayName=xd;var M_="SelectBubbleInput",Ex=g.forwardRef(({__scopeSelect:n,value:r,...l},i)=>{const u=g.useRef(null),c=Ve(i,u),d=l_(r);return g.useEffect(()=>{const h=u.current;if(!h)return;const v=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(v,"value").set;if(d!==r&&x){const p=new Event("change",{bubbles:!0});x.call(h,r),h.dispatchEvent(p)}},[d,r]),y.jsx(De.select,{...l,style:{...ex,...l.style},ref:c,defaultValue:r})});Ex.displayName=M_;function Cx(n){return n===""||n===void 0}function Rx(n){const r=Hn(n),l=g.useRef(""),i=g.useRef(0),u=g.useCallback(d=>{const h=l.current+d;r(h),(function v(m){l.current=m,window.clearTimeout(i.current),m!==""&&(i.current=window.setTimeout(()=>v(""),1e3))})(h)},[r]),c=g.useCallback(()=>{l.current="",window.clearTimeout(i.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(i.current),[]),[l,u,c]}function Tx(n,r,l){const u=r.length>1&&Array.from(r).every(m=>m===r[0])?r[0]:r,c=l?n.indexOf(l):-1;let d=O_(n,Math.max(c,0));u.length===1&&(d=d.filter(m=>m!==l));const v=d.find(m=>m.textValue.toLowerCase().startsWith(u.toLowerCase()));return v!==l?v:void 0}function O_(n,r){return n.map((l,i)=>n[(r+i)%n.length])}var __=tx,j_=ax,D_=lx,z_=ox,L_=ix,U_=sx,k_=dx,B_=gx,H_=vx,P_=bx,q_=xx,G_=wx;function V_({...n}){return y.jsx(__,{"data-slot":"select",...n})}function Y_({...n}){return y.jsx(D_,{"data-slot":"select-value",...n})}function Q_({className:n,size:r="default",children:l,...i}){return y.jsxs(j_,{"data-slot":"select-trigger","data-size":r,className:st("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...i,children:[l,y.jsx(z_,{asChild:!0,children:y.jsx(Iy,{className:"size-4 opacity-50"})})]})}function F_({className:n,children:r,position:l="popper",align:i="center",...u}){return y.jsx(L_,{children:y.jsxs(U_,{"data-slot":"select-content",className:st("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:l,align:i,...u,children:[y.jsx(K_,{}),y.jsx(k_,{className:st("p-1",l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),y.jsx(I_,{})]})})}function cy({className:n,children:r,...l}){return y.jsxs(B_,{"data-slot":"select-item",className:st("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...l,children:[y.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:y.jsx(P_,{children:y.jsx(Ky,{className:"size-4"})})}),y.jsx(H_,{children:r})]})}function K_({className:n,...r}){return y.jsx(q_,{"data-slot":"select-scroll-up-button",className:st("flex cursor-default items-center justify-center py-1",n),...r,children:y.jsx(WC,{className:"size-4"})})}function I_({className:n,...r}){return y.jsx(G_,{"data-slot":"select-scroll-down-button",className:st("flex cursor-default items-center justify-center py-1",n),...r,children:y.jsx(Iy,{className:"size-4"})})}function X_(){const n=jl(),[r,l]=g.useState(""),[i,u]=g.useState(null),[c,d]=g.useState([]),[h,v]=g.useState(!1),[m,x]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{S()},[]),g.useEffect(()=>{i!==null&&p.current?.focus()},[i]);async function S(){try{const N=await fetch("/api/setup");if(!N.ok)return;const _=await N.json();_.config?.tmdbApiKey&&l(_.config.tmdbApiKey),_.libraries.length>0&&d(_.libraries.map(H=>({name:H.name,path:H.path,type:H.type})))}finally{v(!0)}}function R(){const N=c.length;d(_=>[..._,{name:"",path:"",type:"movies"}]),u(N)}function C(N){d(_=>_.filter((H,V)=>V!==N)),i===N&&u(null)}function E(N,_,H){d(V=>V.map((W,B)=>B===N?{...W,[_]:H}:W))}function T(N){c[N]?.path.trim()===""&&C(N),u(null)}async function A(N){N.preventDefault();const _=c.filter(V=>V.path.trim()!=="");if(_.length===0){Gt.error("Please add at least one library.");return}const H=r.trim();if(!H){Gt.error("Please enter your TMDB API key.");return}x(!0);try{const V=_.map(B=>({name:B.name.trim()||(B.path.split(/[\\/]/).pop()??B.type),path:B.path.trim(),type:B.type})),W=await fetch("/api/setup/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tmdbApiKey:H,libraries:V})});if(!W.ok){const B=await W.json();throw new Error(B.error?.message??"Setup failed")}n("/scan")}catch(V){Gt.error(V instanceof Error?V.message:"Setup failed")}finally{x(!1)}}return h?y.jsx("div",{className:"flex min-h-screen items-start justify-center px-6 pt-[15vh] pb-16",children:y.jsxs("div",{className:"w-full max-w-lg",children:[y.jsxs("div",{className:"mb-16 animate-fade-up",children:[y.jsx("h1",{className:"text-4xl font-bold tracking-tight text-foreground",children:"Set up your library"}),y.jsx("p",{className:"mt-3 text-muted-foreground",children:"Add your media folders and we'll take care of the rest."})]}),y.jsx("form",{onSubmit:N=>{A(N)},children:y.jsxs("div",{className:"space-y-16",children:[y.jsxs("section",{className:"animate-fade-up animate-delay-1",children:[y.jsx("h2",{className:"text-sm font-medium uppercase tracking-widest text-muted-foreground",children:"Libraries"}),y.jsx("div",{className:"mt-6",children:c.length===0?y.jsxs("button",{className:"flex w-full items-center justify-center rounded-lg border border-dashed border-border py-10 text-sm text-muted-foreground transition-colors hover:border-foreground/20 hover:text-foreground",onClick:R,type:"button",children:[y.jsx(od,{className:"mr-2 size-4"}),"Add a folder"]}):y.jsxs("div",{className:"space-y-2",children:[c.map((N,_)=>y.jsxs("div",{className:"flex items-center gap-3",children:[i===_?y.jsx(Cr,{ref:p,className:"flex-[2]",onBlur:()=>T(_),onChange:H=>E(_,"path",H.target.value),onKeyDown:H=>{H.key==="Enter"&&(H.preventDefault(),p.current?.blur())},placeholder:"/mnt/media/movies",value:N.path}):y.jsx("button",{className:"flex-[2] cursor-pointer truncate rounded-md px-3 py-2 text-left text-sm text-foreground hover:bg-accent",onClick:()=>u(_),type:"button",children:N.path||y.jsx("span",{className:"text-muted-foreground",children:"/mnt/media/movies"})}),y.jsxs(V_,{onValueChange:H=>E(_,"type",H),value:N.type,children:[y.jsx(Q_,{className:"w-28",children:y.jsx(Y_,{})}),y.jsxs(F_,{children:[y.jsx(cy,{value:"movies",children:"Movies"}),y.jsx(cy,{value:"shows",children:"Shows"})]})]}),y.jsx(Nt,{onClick:()=>C(_),size:"icon-sm",type:"button",variant:"ghost",children:y.jsx($y,{className:"size-4"})})]},_)),y.jsxs(Nt,{className:"mt-1",onClick:R,size:"sm",type:"button",variant:"ghost",children:[y.jsx(od,{className:"size-4"}),"Add another"]})]})})]}),y.jsxs("section",{className:"animate-fade-up animate-delay-2",children:[y.jsx("h2",{className:"text-sm font-medium uppercase tracking-widest text-muted-foreground",children:"Metadata"}),y.jsxs("p",{className:"mt-3 text-sm text-muted-foreground/70",children:["Jukebox uses"," ",y.jsx("a",{className:"text-muted-foreground underline underline-offset-4 hover:text-foreground",href:"https://www.themoviedb.org/settings/api",rel:"noopener noreferrer",target:"_blank",children:"TMDB"})," ","to find posters, ratings, and descriptions for your media."]}),y.jsx(Cr,{className:"mt-4",onChange:N=>l(N.target.value),placeholder:"TMDB API key",type:"text",value:r})]}),y.jsx("div",{className:"animate-fade-up animate-delay-3",children:y.jsx("div",{className:"flex justify-end",children:y.jsx(Nt,{disabled:m,size:"lg",type:"submit",children:m?"Setting up...":"Complete Setup"})})})]})})]})}):null}async function $_(n){const r=await fetch(`/api/library/shows/${n}`);if(!r.ok)throw new Error("Failed to fetch show");return await r.json()}function Z_(n){return gn({queryKey:["show",n],queryFn:()=>$_(n??""),enabled:!!n})}async function J_(n){const r=await fetch(`/api/progress/episode/show/${n}`);if(!r.ok)throw new Error("Failed to fetch show progress");return await r.json()}function W_(n){if(n===null)return"";if(n<60)return`${n}m`;const r=Math.floor(n/60),l=n%60;return l>0?`${r}h ${l}m`:`${r}h`}function ej(n){return!n||!n.duration?0:Math.min(n.currentTime/n.duration*100,100)}function tj(n){return!n||!n.duration?!1:n.currentTime>=n.duration*.9}function nj(){const{id:n}=vE(),r=jl(),{data:l,isLoading:i,error:u}=Z_(n),c=l?.id,{data:d}=gn({queryKey:["show-progress",c],queryFn:()=>J_(c??0),enabled:!!c}),h=g.useMemo(()=>{if(!d||!l)return null;let C=null,E="";for(const[T,A]of Object.entries(d)){const N=parseInt(T,10);A.duration&&A.currentTime<A.duration*.9&&(!E||A.updatedAt>E)&&(E=A.updatedAt,C=N)}if(C===null)return null;for(const T of l.seasons)for(const A of T.episodes)if(A.id===C)return T.seasonNumber;return null},[d,l]),[v,m]=g.useState(null);g.useEffect(()=>{if(v!==null||!l)return;if(h!==null){m(h);return}const C=l.seasons[0]?.seasonNumber??1;m(C)},[l,h,v]);function x(C){r(`/watch/episode/${C.id}`)}if(i)return y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:y.jsx(Xy,{className:"size-8 animate-spin text-muted-foreground"})})]});if(u||!l)return y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] gap-4",children:[y.jsx("p",{className:"text-foreground",children:"Show not found"}),y.jsx(Nt,{asChild:!0,variant:"outline",children:y.jsx(pa,{to:"/shows",children:"Back to Shows"})})]})]});const p=l.seasons.find(C=>C.seasonNumber===v)??l.seasons[0],S=l.genres?l.genres.split(",").map(C=>C.trim()):[],R=l.seasons.length;return y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"px-4 pt-4 pb-12 sm:px-6 sm:pt-6",children:[y.jsxs("div",{className:"flex flex-col gap-4 mb-8 sm:flex-row sm:gap-6",children:[y.jsx("div",{className:"flex-shrink-0 w-28 sm:w-40",children:y.jsx(Zs,{alt:l.title,className:"w-full rounded-lg",path:l.posterPath,title:l.title})}),y.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[y.jsx("h1",{className:"text-xl font-bold text-foreground sm:text-2xl",children:l.title}),y.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-muted-foreground",children:[l.year&&y.jsx("span",{children:l.year}),l.rating&&y.jsxs("span",{children:[l.rating.toFixed(1)," rating"]}),y.jsxs("span",{children:[R," ",R===1?"season":"seasons"]}),S.length>0&&y.jsx("span",{children:S.join(", ")})]}),l.overview&&y.jsx("p",{className:"text-sm text-muted-foreground max-w-2xl leading-relaxed",children:l.overview})]})]}),y.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:l.seasons.map(C=>y.jsx("button",{className:`cursor-pointer rounded-md px-4 min-h-11 text-sm font-medium transition-colors ${C.seasonNumber===v?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"}`,onClick:()=>m(C.seasonNumber),type:"button",children:C.name??`Season ${C.seasonNumber}`},C.id))}),p&&y.jsx("div",{className:"flex flex-col gap-1",children:p.episodes.map(C=>{const E=W_(C.runtime),T=d?.[C.id],A=ej(T),N=tj(T),_=A>0&&!N;return y.jsxs("div",{className:"group flex items-start gap-4 rounded-lg px-3 py-3 cursor-pointer hover:bg-muted transition-colors",onClick:()=>x(C),children:[y.jsx("div",{className:"flex-shrink-0 w-10 text-right text-sm text-muted-foreground pt-0.5",children:C.episodeNumber}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:`font-medium ${N?"text-muted-foreground":"text-foreground"}`,children:C.title}),E&&y.jsx("span",{className:"text-xs text-muted-foreground",children:E}),N&&y.jsx("span",{className:"text-xs text-muted-foreground/60",children:"Watched"})]}),C.overview&&y.jsx("p",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:C.overview}),_&&y.jsx("div",{className:"mt-2 h-1 w-full max-w-xs rounded-full bg-muted",children:y.jsx("div",{className:"h-full rounded-full bg-red-600 transition-all",style:{width:`${A}%`}})})]}),y.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity pt-0.5",children:y.jsx(hR,{className:"size-4 text-foreground"})})]},C.id)})})]})]})}function aj(){const{data:n,isLoading:r}=B0(),l=g.useMemo(()=>n?n.map(u=>({type:"show",item:u})):[],[n]),i=g.useMemo(()=>l.length===0?[]:nh(l),[l]);return r?y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"pt-4",children:[y.jsx(Vt,{}),y.jsx(Vt,{}),y.jsx(Vt,{}),y.jsx(Vt,{}),y.jsx(Vt,{})]})]}):l.length===0?y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] gap-4 text-center px-6",children:[y.jsx($s,{className:"size-16 text-muted-foreground"}),y.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"No shows in your library"}),y.jsxs("p",{className:"text-sm text-muted-foreground max-w-md",children:["Run"," ",y.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs font-mono",children:"bun run scan --shows /path/to/shows"})," ","to add your collection."]})]})]}):y.jsxs(y.Fragment,{children:[y.jsx(en,{}),y.jsx("div",{className:"pt-2 pb-8",children:i.map(({genre:u,items:c})=>y.jsx(Go,{items:c,title:u},u))})]})}const fy=g.lazy(()=>dy(()=>import("./Watch-kJkUCvFd.js"),__vite__mapDeps([0,1])).then(n=>({default:n.WatchPage}))),rj=new x1;BC({immediate:!0});function lj(){const{data:n,isLoading:r}=zd();return r?null:n?.enabled&&!n.authenticated?y.jsx(Ks,{to:"/login",replace:!0}):y.jsx(Py,{})}function oj(){const{data:n,isLoading:r}=YC();return r?null:n?.needsSetup?y.jsx(Ks,{to:"/setup",replace:!0}):y.jsx(Py,{})}const Ax=document.getElementById("root");if(!Ax)throw new Error("Root element not found");const ij=y.jsx(g.StrictMode,{children:y.jsxs(w1,{client:rj,children:[y.jsx(nC,{children:y.jsxs(jE,{children:[y.jsx(Tt,{path:"/login",element:y.jsx(SO,{})}),y.jsxs(Tt,{element:y.jsx(lj,{}),children:[y.jsx(Tt,{path:"/scan",element:y.jsx(RO,{})}),y.jsx(Tt,{path:"/setup",element:y.jsx(X_,{})}),y.jsxs(Tt,{element:y.jsx(oj,{}),children:[y.jsx(Tt,{path:"/",element:y.jsx(vO,{})}),y.jsx(Tt,{path:"/movies",element:y.jsx(EO,{})}),y.jsx(Tt,{path:"/shows",element:y.jsx(aj,{})}),y.jsx(Tt,{path:"/shows/:id",element:y.jsx(nj,{})}),y.jsx(Tt,{path:"/settings",element:y.jsx(Ks,{to:"/settings/profiles",replace:!0})}),y.jsx(Tt,{path:"/settings/profiles",element:y.jsx(JO,{})}),y.jsx(Tt,{path:"/settings/auth",element:y.jsx(AO,{})}),y.jsx(Tt,{path:"/watch/:id",element:y.jsx(g.Suspense,{children:y.jsx(fy,{})})}),y.jsx(Tt,{path:"/watch/episode/:id",element:y.jsx(g.Suspense,{children:y.jsx(fy,{})})})]})]})]})}),y.jsx(kC,{position:"bottom-right",theme:"dark"})]})});$S.createRoot(Ax).render(ij);export{Nt as B,IO as C,Xy as L,KO as O,FO as P,QO as R,XO as T,bR as X,st as a,$O as b,Mt as c,sj as d,uj as e,hR as f,hy as g,Zs as h,vE as i,y as j,$a as k,jl as l,pa as m,cj as n,g as r,Gt as t,gn as u};
|