(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const h of u.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&l(h)}).observe(document,{childList:!0,subtree:!0});function r(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(c){if(c.ep)return;c.ep=!0;const u=r(c);fetch(c.href,u)}})();var jR=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function GN(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _u={exports:{}},Mr={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Gg;function IN(){if(Gg)return Mr;Gg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(l,c,u){var h=null;if(u!==void 0&&(h=""+u),c.key!==void 0&&(h=""+c.key),"key"in c){u={};for(var g in c)g!=="key"&&(u[g]=c[g])}else u=c;return c=u.ref,{$$typeof:t,type:l,key:h,ref:c!==void 0?c:null,props:u}}return Mr.Fragment=n,Mr.jsx=r,Mr.jsxs=r,Mr}var Ig;function YN(){return Ig||(Ig=1,_u.exports=IN()),_u.exports}var s=YN(),zu={exports:{}},je={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Yg;function $N(){if(Yg)return je;Yg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function w(T){return T===null||typeof T!="object"?null:(T=v&&T[v]||T["@@iterator"],typeof T=="function"?T:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,A={};function E(T,U,Y){this.props=T,this.context=U,this.refs=A,this.updater=Y||j}E.prototype.isReactComponent={},E.prototype.setState=function(T,U){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,U,"setState")},E.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function D(){}D.prototype=E.prototype;function C(T,U,Y){this.props=T,this.context=U,this.refs=A,this.updater=Y||j}var O=C.prototype=new D;O.constructor=C,N(O,E.prototype),O.isPureReactComponent=!0;var Q=Array.isArray;function z(){}var I={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function ee(T,U,Y){var K=Y.ref;return{$$typeof:t,type:T,key:U,ref:K!==void 0?K:null,props:Y}}function W(T,U){return ee(T.type,U,T.props)}function le(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function de(T){var U={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(Y){return U[Y]})}var ge=/\/+/g;function be(T,U){return typeof T=="object"&&T!==null&&T.key!=null?de(""+T.key):U.toString(36)}function te(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(z,z):(T.status="pending",T.then(function(U){T.status==="pending"&&(T.status="fulfilled",T.value=U)},function(U){T.status==="pending"&&(T.status="rejected",T.reason=U)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function V(T,U,Y,K,ne){var ce=typeof T;(ce==="undefined"||ce==="boolean")&&(T=null);var ve=!1;if(T===null)ve=!0;else switch(ce){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(T.$$typeof){case t:case n:ve=!0;break;case x:return ve=T._init,V(ve(T._payload),U,Y,K,ne)}}if(ve)return ne=ne(T),ve=K===""?"."+be(T,0):K,Q(ne)?(Y="",ve!=null&&(Y=ve.replace(ge,"$&/")+"/"),V(ne,U,Y,"",function(Et){return Et})):ne!=null&&(le(ne)&&(ne=W(ne,Y+(ne.key==null||T&&T.key===ne.key?"":(""+ne.key).replace(ge,"$&/")+"/")+ve)),U.push(ne)),1;ve=0;var Ge=K===""?".":K+":";if(Q(T))for(var Ne=0;Ne<T.length;Ne++)K=T[Ne],ce=Ge+be(K,Ne),ve+=V(K,U,Y,ce,ne);else if(Ne=w(T),typeof Ne=="function")for(T=Ne.call(T),Ne=0;!(K=T.next()).done;)K=K.value,ce=Ge+be(K,Ne++),ve+=V(K,U,Y,ce,ne);else if(ce==="object"){if(typeof T.then=="function")return V(te(T),U,Y,K,ne);throw U=String(T),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return ve}function J(T,U,Y){if(T==null)return T;var K=[],ne=0;return V(T,K,"","",function(ce){return U.call(Y,ce,ne++)}),K}function ae(T){if(T._status===-1){var U=T._result;U=U(),U.then(function(Y){(T._status===0||T._status===-1)&&(T._status=1,T._result=Y)},function(Y){(T._status===0||T._status===-1)&&(T._status=2,T._result=Y)}),T._status===-1&&(T._status=0,T._result=U)}if(T._status===1)return T._result.default;throw T._result}var H=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},M={map:J,forEach:function(T,U,Y){J(T,function(){U.apply(this,arguments)},Y)},count:function(T){var U=0;return J(T,function(){U++}),U},toArray:function(T){return J(T,function(U){return U})||[]},only:function(T){if(!le(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return je.Activity=b,je.Children=M,je.Component=E,je.Fragment=r,je.Profiler=c,je.PureComponent=C,je.StrictMode=l,je.Suspense=p,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,je.__COMPILER_RUNTIME={__proto__:null,c:function(T){return I.H.useMemoCache(T)}},je.cache=function(T){return function(){return T.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(T,U,Y){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var K=N({},T.props),ne=T.key;if(U!=null)for(ce in U.key!==void 0&&(ne=""+U.key),U)!P.call(U,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&U.ref===void 0||(K[ce]=U[ce]);var ce=arguments.length-2;if(ce===1)K.children=Y;else if(1<ce){for(var ve=Array(ce),Ge=0;Ge<ce;Ge++)ve[Ge]=arguments[Ge+2];K.children=ve}return ee(T.type,ne,K)},je.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:u,_context:T},T},je.createElement=function(T,U,Y){var K,ne={},ce=null;if(U!=null)for(K in U.key!==void 0&&(ce=""+U.key),U)P.call(U,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ne[K]=U[K]);var ve=arguments.length-2;if(ve===1)ne.children=Y;else if(1<ve){for(var Ge=Array(ve),Ne=0;Ne<ve;Ne++)Ge[Ne]=arguments[Ne+2];ne.children=Ge}if(T&&T.defaultProps)for(K in ve=T.defaultProps,ve)ne[K]===void 0&&(ne[K]=ve[K]);return ee(T,ce,ne)},je.createRef=function(){return{current:null}},je.forwardRef=function(T){return{$$typeof:g,render:T}},je.isValidElement=le,je.lazy=function(T){return{$$typeof:x,_payload:{_status:-1,_result:T},_init:ae}},je.memo=function(T,U){return{$$typeof:m,type:T,compare:U===void 0?null:U}},je.startTransition=function(T){var U=I.T,Y={};I.T=Y;try{var K=T(),ne=I.S;ne!==null&&ne(Y,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(z,H)}catch(ce){H(ce)}finally{U!==null&&Y.types!==null&&(U.types=Y.types),I.T=U}},je.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},je.use=function(T){return I.H.use(T)},je.useActionState=function(T,U,Y){return I.H.useActionState(T,U,Y)},je.useCallback=function(T,U){return I.H.useCallback(T,U)},je.useContext=function(T){return I.H.useContext(T)},je.useDebugValue=function(){},je.useDeferredValue=function(T,U){return I.H.useDeferredValue(T,U)},je.useEffect=function(T,U){return I.H.useEffect(T,U)},je.useEffectEvent=function(T){return I.H.useEffectEvent(T)},je.useId=function(){return I.H.useId()},je.useImperativeHandle=function(T,U,Y){return I.H.useImperativeHandle(T,U,Y)},je.useInsertionEffect=function(T,U){return I.H.useInsertionEffect(T,U)},je.useLayoutEffect=function(T,U){return I.H.useLayoutEffect(T,U)},je.useMemo=function(T,U){return I.H.useMemo(T,U)},je.useOptimistic=function(T,U){return I.H.useOptimistic(T,U)},je.useReducer=function(T,U,Y){return I.H.useReducer(T,U,Y)},je.useRef=function(T){return I.H.useRef(T)},je.useState=function(T){return I.H.useState(T)},je.useSyncExternalStore=function(T,U,Y){return I.H.useSyncExternalStore(T,U,Y)},je.useTransition=function(){return I.H.useTransition()},je.version="19.2.6",je}var $g;function Qf(){return $g||($g=1,zu.exports=$N()),zu.exports}var k=Qf();const mt=GN(k);var Pu={exports:{}},Rr={},Lu={exports:{}},Vu={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Fg;function FN(){return Fg||(Fg=1,(function(t){function n(V,J){var ae=V.length;V.push(J);e:for(;0<ae;){var H=ae-1>>>1,M=V[H];if(0<c(M,J))V[H]=J,V[ae]=M,ae=H;else break e}}function r(V){return V.length===0?null:V[0]}function l(V){if(V.length===0)return null;var J=V[0],ae=V.pop();if(ae!==J){V[0]=ae;e:for(var H=0,M=V.length,T=M>>>1;H<T;){var U=2*(H+1)-1,Y=V[U],K=U+1,ne=V[K];if(0>c(Y,ae))K<M&&0>c(ne,Y)?(V[H]=ne,V[K]=ae,H=K):(V[H]=Y,V[U]=ae,H=U);else if(K<M&&0>c(ne,ae))V[H]=ne,V[K]=ae,H=K;else break e}}return J}function c(V,J){var ae=V.sortIndex-J.sortIndex;return ae!==0?ae:V.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var h=Date,g=h.now();t.unstable_now=function(){return h.now()-g}}var p=[],m=[],x=1,b=null,v=3,w=!1,j=!1,N=!1,A=!1,E=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(V){for(var J=r(m);J!==null;){if(J.callback===null)l(m);else if(J.startTime<=V)l(m),J.sortIndex=J.expirationTime,n(p,J);else break;J=r(m)}}function Q(V){if(N=!1,O(V),!j)if(r(p)!==null)j=!0,z||(z=!0,de());else{var J=r(m);J!==null&&te(Q,J.startTime-V)}}var z=!1,I=-1,P=5,ee=-1;function W(){return A?!0:!(t.unstable_now()-ee<P)}function le(){if(A=!1,z){var V=t.unstable_now();ee=V;var J=!0;try{e:{j=!1,N&&(N=!1,D(I),I=-1),w=!0;var ae=v;try{t:{for(O(V),b=r(p);b!==null&&!(b.expirationTime>V&&W());){var H=b.callback;if(typeof H=="function"){b.callback=null,v=b.priorityLevel;var M=H(b.expirationTime<=V);if(V=t.unstable_now(),typeof M=="function"){b.callback=M,O(V),J=!0;break t}b===r(p)&&l(p),O(V)}else l(p);b=r(p)}if(b!==null)J=!0;else{var T=r(m);T!==null&&te(Q,T.startTime-V),J=!1}}break e}finally{b=null,v=ae,w=!1}J=void 0}}finally{J?de():z=!1}}}var de;if(typeof C=="function")de=function(){C(le)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,be=ge.port2;ge.port1.onmessage=le,de=function(){be.postMessage(null)}}else de=function(){E(le,0)};function te(V,J){I=E(function(){V(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<V?Math.floor(1e3/V):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(V){switch(v){case 1:case 2:case 3:var J=3;break;default:J=v}var ae=v;v=J;try{return V()}finally{v=ae}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(V,J){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var ae=v;v=V;try{return J()}finally{v=ae}},t.unstable_scheduleCallback=function(V,J,ae){var H=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?H+ae:H):ae=H,V){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=ae+M,V={id:x++,callback:J,priorityLevel:V,startTime:ae,expirationTime:M,sortIndex:-1},ae>H?(V.sortIndex=ae,n(m,V),r(p)===null&&V===r(m)&&(N?(D(I),I=-1):N=!0,te(Q,ae-H))):(V.sortIndex=M,n(p,V),j||w||(j=!0,z||(z=!0,de()))),V},t.unstable_shouldYield=W,t.unstable_wrapCallback=function(V){var J=v;return function(){var ae=v;v=J;try{return V.apply(this,arguments)}finally{v=ae}}}})(Vu)),Vu}var Qg;function QN(){return Qg||(Qg=1,Lu.exports=FN()),Lu.exports}var Uu={exports:{}},At={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Xg;function XN(){if(Xg)return At;Xg=1;var t=Qf();function n(p){var m="https://react.dev/errors/"+p;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 #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(p,m,x){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:b==null?null:""+b,children:p,containerInfo:m,implementation:x}}var h=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,At.createPortal=function(p,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(n(299));return u(p,m,null,x)},At.flushSync=function(p){var m=h.T,x=l.p;try{if(h.T=null,l.p=2,p)return p()}finally{h.T=m,l.p=x,l.d.f()}},At.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,l.d.C(p,m))},At.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},At.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var x=m.as,b=g(x,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;x==="style"?l.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:w}):x==="script"&&l.d.X(p,{crossOrigin:b,integrity:v,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},At.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var x=g(m.as,m.crossOrigin);l.d.M(p,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&l.d.M(p)},At.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var x=m.as,b=g(x,m.crossOrigin);l.d.L(p,x,{crossOrigin:b,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})}},At.preloadModule=function(p,m){if(typeof p=="string")if(m){var x=g(m.as,m.crossOrigin);l.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else l.d.m(p)},At.requestFormReset=function(p){l.d.r(p)},At.unstable_batchedUpdates=function(p,m){return p(m)},At.useFormState=function(p,m,x){return h.H.useFormState(p,m,x)},At.useFormStatus=function(){return h.H.useHostTransitionStatus()},At.version="19.2.6",At}var Kg;function KN(){if(Kg)return Uu.exports;Kg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Uu.exports=XN(),Uu.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Wg;function WN(){if(Wg)return Rr;Wg=1;var t=QN(),n=Qf(),r=KN();function l(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)a+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var a=e,i=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(i=a.return),e=a.return;while(e)}return a.tag===3?i:null}function h(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function g(e){if(e.tag===31){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function p(e){if(u(e)!==e)throw Error(l(188))}function m(e){var a=e.alternate;if(!a){if(a=u(e),a===null)throw Error(l(188));return a!==e?null:e}for(var i=e,o=a;;){var d=i.return;if(d===null)break;var f=d.alternate;if(f===null){if(o=d.return,o!==null){i=o;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===i)return p(d),e;if(f===o)return p(d),a;f=f.sibling}throw Error(l(188))}if(i.return!==o.return)i=d,o=f;else{for(var y=!1,S=d.child;S;){if(S===i){y=!0,i=d,o=f;break}if(S===o){y=!0,o=d,i=f;break}S=S.sibling}if(!y){for(S=f.child;S;){if(S===i){y=!0,i=f,o=d;break}if(S===o){y=!0,o=f,i=d;break}S=S.sibling}if(!y)throw Error(l(189))}}if(i.alternate!==o)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?e:a}function x(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=x(e),a!==null)return a;e=e.sibling}return null}var b=Object.assign,v=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),C=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case E:return"Profiler";case A:return"StrictMode";case Q:return"Suspense";case z:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case C:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case O:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return a=e.displayName||null,a!==null?a:be(e.type)||"Memo";case P:a=e._payload,e=e._init;try{return be(e(a))}catch{}}return null}var te=Array.isArray,V=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},H=[],M=-1;function T(e){return{current:e}}function U(e){0>M||(e.current=H[M],H[M]=null,M--)}function Y(e,a){M++,H[M]=e.current,e.current=a}var K=T(null),ne=T(null),ce=T(null),ve=T(null);function Ge(e,a){switch(Y(ce,a),Y(ne,e),Y(K,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?fg(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=fg(a),e=hg(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(K),Y(K,e)}function Ne(){U(K),U(ne),U(ce)}function Et(e){e.memoizedState!==null&&Y(ve,e);var a=K.current,i=hg(a,e.type);a!==i&&(Y(ne,e),Y(K,i))}function xa(e){ne.current===e&&(U(K),U(ne)),ve.current===e&&(U(ve),Cr._currentValue=ae)}var ga,Ia;function Ot(e){if(ga===void 0)try{throw Error()}catch(i){var a=i.stack.trim().match(/\n( *(at )?)/);ga=a&&a[1]||"",Ia=-1<i.stack.indexOf(`
    at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ga+e+Ia}var Li=!1;function Rs(e,a){if(!e||Li)return"";Li=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(a){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch($){var G=$}Reflect.construct(e,[],Z)}else{try{Z.call()}catch($){G=$}e.call(Z.prototype)}}else{try{throw Error()}catch($){G=$}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch($){if($&&G&&typeof $.stack=="string")return[$.stack,G.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=o.DetermineComponentFrameRoot(),y=f[0],S=f[1];if(y&&S){var R=y.split(`
`),q=S.split(`
`);for(d=o=0;o<R.length&&!R[o].includes("DetermineComponentFrameRoot");)o++;for(;d<q.length&&!q[d].includes("DetermineComponentFrameRoot");)d++;if(o===R.length||d===q.length)for(o=R.length-1,d=q.length-1;1<=o&&0<=d&&R[o]!==q[d];)d--;for(;1<=o&&0<=d;o--,d--)if(R[o]!==q[d]){if(o!==1||d!==1)do if(o--,d--,0>d||R[o]!==q[d]){var F=`
`+R[o].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=o&&0<=d);break}}}finally{Li=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ot(i):""}function se(e,a){switch(e.tag){case 26:case 27:case 5:return Ot(e.type);case 16:return Ot("Lazy");case 13:return e.child!==a&&a!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return Rs(e.type,!1);case 11:return Rs(e.type.render,!1);case 1:return Rs(e.type,!0);case 31:return Ot("Activity");default:return""}}function we(e){try{var a="",i=null;do a+=se(e,i),i=e,e=e.return;while(e);return a}catch(o){return`
Error generating stack: `+o.message+`
`+o.stack}}var Ee=Object.prototype.hasOwnProperty,oe=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,ta=t.unstable_shouldYield,_t=t.unstable_requestPaint,gt=t.unstable_now,jw=t.unstable_getCurrentPriorityLevel,Ih=t.unstable_ImmediatePriority,Yh=t.unstable_UserBlockingPriority,nl=t.unstable_NormalPriority,kw=t.unstable_LowPriority,$h=t.unstable_IdlePriority,Sw=t.log,Cw=t.unstable_setDisableYieldValue,Vi=null,It=null;function xn(e){if(typeof Sw=="function"&&Cw(e),It&&typeof It.setStrictMode=="function")try{It.setStrictMode(Vi,e)}catch{}}var Yt=Math.clz32?Math.clz32:Tw,Ew=Math.log,Aw=Math.LN2;function Tw(e){return e>>>=0,e===0?32:31-(Ew(e)/Aw|0)|0}var sl=256,il=262144,rl=4194304;function es(e){var a=e&42;if(a!==0)return a;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 ll(e,a,i){var o=e.pendingLanes;if(o===0)return 0;var d=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=o&134217727;return S!==0?(o=S&~f,o!==0?d=es(o):(y&=S,y!==0?d=es(y):i||(i=S&~e,i!==0&&(d=es(i))))):(S=o&~f,S!==0?d=es(S):y!==0?d=es(y):i||(i=o&~e,i!==0&&(d=es(i)))),d===0?0:a!==0&&a!==d&&(a&f)===0&&(f=d&-d,i=a&-a,f>=i||f===32&&(i&4194048)!==0)?a:d}function Ui(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function Mw(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Fh(){var e=rl;return rl<<=1,(rl&62914560)===0&&(rl=4194304),e}function Nc(e){for(var a=[],i=0;31>i;i++)a.push(e);return a}function Bi(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rw(e,a,i,o,d,f){var y=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var S=e.entanglements,R=e.expirationTimes,q=e.hiddenUpdates;for(i=y&~i;0<i;){var F=31-Yt(i),Z=1<<F;S[F]=0,R[F]=-1;var G=q[F];if(G!==null)for(q[F]=null,F=0;F<G.length;F++){var $=G[F];$!==null&&($.lane&=-536870913)}i&=~Z}o!==0&&Qh(e,o,0),f!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~a))}function Qh(e,a,i){e.pendingLanes|=a,e.suspendedLanes&=~a;var o=31-Yt(a);e.entangledLanes|=a,e.entanglements[o]=e.entanglements[o]|1073741824|i&261930}function Xh(e,a){var i=e.entangledLanes|=a;for(e=e.entanglements;i;){var o=31-Yt(i),d=1<<o;d&a|e[o]&a&&(e[o]|=a),i&=~d}}function Kh(e,a){var i=a&-a;return i=(i&42)!==0?1:jc(i),(i&(e.suspendedLanes|a))!==0?0:i}function jc(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 kc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wh(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Pg(e.type))}function Zh(e,a){var i=J.p;try{return J.p=e,a()}finally{J.p=i}}var gn=Math.random().toString(36).slice(2),vt="__reactFiber$"+gn,zt="__reactProps$"+gn,Ds="__reactContainer$"+gn,Sc="__reactEvents$"+gn,Dw="__reactListeners$"+gn,Ow="__reactHandles$"+gn,Jh="__reactResources$"+gn,qi="__reactMarker$"+gn;function Cc(e){delete e[vt],delete e[zt],delete e[Sc],delete e[Dw],delete e[Ow]}function Os(e){var a=e[vt];if(a)return a;for(var i=e.parentNode;i;){if(a=i[Ds]||i[vt]){if(i=a.alternate,a.child!==null||i!==null&&i.child!==null)for(e=vg(e);e!==null;){if(i=e[vt])return i;e=vg(e)}return a}e=i,i=e.parentNode}return null}function _s(e){if(e=e[vt]||e[Ds]){var a=e.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return e}return null}function Hi(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(l(33))}function zs(e){var a=e[Jh];return a||(a=e[Jh]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function bt(e){e[qi]=!0}var em=new Set,tm={};function ts(e,a){Ps(e,a),Ps(e+"Capture",a)}function Ps(e,a){for(tm[e]=a,e=0;e<a.length;e++)em.add(a[e])}var _w=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]*$"),am={},nm={};function zw(e){return Ee.call(nm,e)?!0:Ee.call(am,e)?!1:_w.test(e)?nm[e]=!0:(am[e]=!0,!1)}function ol(e,a,i){if(zw(a))if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(a);return;case"boolean":var o=a.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(a);return}}e.setAttribute(a,""+i)}}function cl(e,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttribute(a,""+i)}}function Ya(e,a,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(a,i,""+o)}}function aa(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sm(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Pw(e,a,i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,a);if(!e.hasOwnProperty(a)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,f=o.set;return Object.defineProperty(e,a,{configurable:!0,get:function(){return d.call(this)},set:function(y){i=""+y,f.call(this,y)}}),Object.defineProperty(e,a,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[a]}}}}function Ec(e){if(!e._valueTracker){var a=sm(e)?"checked":"value";e._valueTracker=Pw(e,a,""+e[a])}}function im(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var i=a.getValue(),o="";return e&&(o=sm(e)?e.checked?"true":"false":e.value),e=o,e!==i?(a.setValue(e),!0):!1}function dl(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 Lw=/[\n"\\]/g;function na(e){return e.replace(Lw,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Ac(e,a,i,o,d,f,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),a!=null?y==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+aa(a)):e.value!==""+aa(a)&&(e.value=""+aa(a)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),a!=null?Tc(e,y,aa(a)):i!=null?Tc(e,y,aa(i)):o!=null&&e.removeAttribute("value"),d==null&&f!=null&&(e.defaultChecked=!!f),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+aa(S):e.removeAttribute("name")}function rm(e,a,i,o,d,f,y,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),a!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||a!=null)){Ec(e);return}i=i!=null?""+aa(i):"",a=a!=null?""+aa(a):i,S||a===e.value||(e.value=a),e.defaultValue=a}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=S?e.checked:!!o,e.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Ec(e)}function Tc(e,a,i){a==="number"&&dl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ls(e,a,i,o){if(e=e.options,a){a={};for(var d=0;d<i.length;d++)a["$"+i[d]]=!0;for(i=0;i<e.length;i++)d=a.hasOwnProperty("$"+e[i].value),e[i].selected!==d&&(e[i].selected=d),d&&o&&(e[i].defaultSelected=!0)}else{for(i=""+aa(i),a=null,d=0;d<e.length;d++){if(e[d].value===i){e[d].selected=!0,o&&(e[d].defaultSelected=!0);return}a!==null||e[d].disabled||(a=e[d])}a!==null&&(a.selected=!0)}}function lm(e,a,i){if(a!=null&&(a=""+aa(a),a!==e.value&&(e.value=a),i==null)){e.defaultValue!==a&&(e.defaultValue=a);return}e.defaultValue=i!=null?""+aa(i):""}function om(e,a,i,o){if(a==null){if(o!=null){if(i!=null)throw Error(l(92));if(te(o)){if(1<o.length)throw Error(l(93));o=o[0]}i=o}i==null&&(i=""),a=i}i=aa(a),e.defaultValue=i,o=e.textContent,o===i&&o!==""&&o!==null&&(e.value=o),Ec(e)}function Vs(e,a){if(a){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=a;return}}e.textContent=a}var Vw=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 cm(e,a,i){var o=a.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="":o?e.setProperty(a,i):typeof i!="number"||i===0||Vw.has(a)?a==="float"?e.cssFloat=i:e[a]=(""+i).trim():e[a]=i+"px"}function dm(e,a,i){if(a!=null&&typeof a!="object")throw Error(l(62));if(e=e.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||a!=null&&a.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var d in a)o=a[d],a.hasOwnProperty(d)&&i[d]!==o&&cm(e,d,o)}else for(var f in a)a.hasOwnProperty(f)&&cm(e,f,a[f])}function Mc(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 Uw=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"]]),Bw=/^[\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 ul(e){return Bw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $a(){}var Rc=null;function Dc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Us=null,Bs=null;function um(e){var a=_s(e);if(a&&(e=a.stateNode)){var i=e[zt]||null;e:switch(e=a.stateNode,a.type){case"input":if(Ac(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),a=i.name,i.type==="radio"&&a!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+na(""+a)+'"][type="radio"]'),a=0;a<i.length;a++){var o=i[a];if(o!==e&&o.form===e.form){var d=o[zt]||null;if(!d)throw Error(l(90));Ac(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(a=0;a<i.length;a++)o=i[a],o.form===e.form&&im(o)}break e;case"textarea":lm(e,i.value,i.defaultValue);break e;case"select":a=i.value,a!=null&&Ls(e,!!i.multiple,a,!1)}}}var Oc=!1;function fm(e,a,i){if(Oc)return e(a,i);Oc=!0;try{var o=e(a);return o}finally{if(Oc=!1,(Us!==null||Bs!==null)&&(Zl(),Us&&(a=Us,e=Bs,Bs=Us=null,um(a),e)))for(a=0;a<e.length;a++)um(e[a])}}function Gi(e,a){var i=e.stateNode;if(i===null)return null;var o=i[zt]||null;if(o===null)return null;i=o[a];e:switch(a){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(i&&typeof i!="function")throw Error(l(231,a,typeof i));return i}var Fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(Fa)try{var Ii={};Object.defineProperty(Ii,"passive",{get:function(){_c=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch{_c=!1}var bn=null,zc=null,fl=null;function hm(){if(fl)return fl;var e,a=zc,i=a.length,o,d="value"in bn?bn.value:bn.textContent,f=d.length;for(e=0;e<i&&a[e]===d[e];e++);var y=i-e;for(o=1;o<=y&&a[i-o]===d[f-o];o++);return fl=d.slice(e,1<o?1-o:void 0)}function hl(e){var a=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&a===13&&(e=13)):e=a,e===10&&(e=13),32<=e||e===13?e:0}function ml(){return!0}function mm(){return!1}function Pt(e){function a(i,o,d,f,y){this._reactName=i,this._targetInst=d,this.type=o,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(i=e[S],this[S]=i?i(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ml:mm,this.isPropagationStopped=mm,this}return b(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ml)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ml)},persist:function(){},isPersistent:ml}),a}var as={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pl=Pt(as),Yi=b({},as,{view:0,detail:0}),qw=Pt(Yi),Pc,Lc,$i,xl=b({},Yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uc,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!==$i&&($i&&e.type==="mousemove"?(Pc=e.screenX-$i.screenX,Lc=e.screenY-$i.screenY):Lc=Pc=0,$i=e),Pc)},movementY:function(e){return"movementY"in e?e.movementY:Lc}}),pm=Pt(xl),Hw=b({},xl,{dataTransfer:0}),Gw=Pt(Hw),Iw=b({},Yi,{relatedTarget:0}),Vc=Pt(Iw),Yw=b({},as,{animationName:0,elapsedTime:0,pseudoElement:0}),$w=Pt(Yw),Fw=b({},as,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qw=Pt(Fw),Xw=b({},as,{data:0}),xm=Pt(Xw),Kw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ww={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"},Zw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jw(e){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(e):(e=Zw[e])?!!a[e]:!1}function Uc(){return Jw}var e2=b({},Yi,{key:function(e){if(e.key){var a=Kw[e.key]||e.key;if(a!=="Unidentified")return a}return e.type==="keypress"?(e=hl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ww[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uc,charCode:function(e){return e.type==="keypress"?hl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),t2=Pt(e2),a2=b({},xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gm=Pt(a2),n2=b({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uc}),s2=Pt(n2),i2=b({},as,{propertyName:0,elapsedTime:0,pseudoElement:0}),r2=Pt(i2),l2=b({},xl,{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}),o2=Pt(l2),c2=b({},as,{newState:0,oldState:0}),d2=Pt(c2),u2=[9,13,27,32],Bc=Fa&&"CompositionEvent"in window,Fi=null;Fa&&"documentMode"in document&&(Fi=document.documentMode);var f2=Fa&&"TextEvent"in window&&!Fi,bm=Fa&&(!Bc||Fi&&8<Fi&&11>=Fi),ym=" ",vm=!1;function wm(e,a){switch(e){case"keyup":return u2.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qs=!1;function h2(e,a){switch(e){case"compositionend":return Nm(a);case"keypress":return a.which!==32?null:(vm=!0,ym);case"textInput":return e=a.data,e===ym&&vm?null:e;default:return null}}function m2(e,a){if(qs)return e==="compositionend"||!Bc&&wm(e,a)?(e=hm(),fl=zc=bn=null,qs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return bm&&a.locale!=="ko"?null:a.data;default:return null}}var p2={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 jm(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a==="input"?!!p2[e.type]:a==="textarea"}function km(e,a,i,o){Us?Bs?Bs.push(o):Bs=[o]:Us=o,a=io(a,"onChange"),0<a.length&&(i=new pl("onChange","change",null,i,o),e.push({event:i,listeners:a}))}var Qi=null,Xi=null;function x2(e){rg(e,0)}function gl(e){var a=Hi(e);if(im(a))return e}function Sm(e,a){if(e==="change")return a}var Cm=!1;if(Fa){var qc;if(Fa){var Hc="oninput"in document;if(!Hc){var Em=document.createElement("div");Em.setAttribute("oninput","return;"),Hc=typeof Em.oninput=="function"}qc=Hc}else qc=!1;Cm=qc&&(!document.documentMode||9<document.documentMode)}function Am(){Qi&&(Qi.detachEvent("onpropertychange",Tm),Xi=Qi=null)}function Tm(e){if(e.propertyName==="value"&&gl(Xi)){var a=[];km(a,Xi,e,Dc(e)),fm(x2,a)}}function g2(e,a,i){e==="focusin"?(Am(),Qi=a,Xi=i,Qi.attachEvent("onpropertychange",Tm)):e==="focusout"&&Am()}function b2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gl(Xi)}function y2(e,a){if(e==="click")return gl(a)}function v2(e,a){if(e==="input"||e==="change")return gl(a)}function w2(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}var $t=typeof Object.is=="function"?Object.is:w2;function Ki(e,a){if($t(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var i=Object.keys(e),o=Object.keys(a);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var d=i[o];if(!Ee.call(a,d)||!$t(e[d],a[d]))return!1}return!0}function Mm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rm(e,a){var i=Mm(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=a&&o>=a)return{node:i,offset:a-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Mm(i)}}function Dm(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?Dm(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function Om(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=dl(e.document);a instanceof e.HTMLIFrameElement;){try{var i=typeof a.contentWindow.location.href=="string"}catch{i=!1}if(i)e=a.contentWindow;else break;a=dl(e.document)}return a}function Gc(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a&&(a==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||a==="textarea"||e.contentEditable==="true")}var N2=Fa&&"documentMode"in document&&11>=document.documentMode,Hs=null,Ic=null,Wi=null,Yc=!1;function _m(e,a,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Yc||Hs==null||Hs!==dl(o)||(o=Hs,"selectionStart"in o&&Gc(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}),Wi&&Ki(Wi,o)||(Wi=o,o=io(Ic,"onSelect"),0<o.length&&(a=new pl("onSelect","select",null,a,i),e.push({event:a,listeners:o}),a.target=Hs)))}function ns(e,a){var i={};return i[e.toLowerCase()]=a.toLowerCase(),i["Webkit"+e]="webkit"+a,i["Moz"+e]="moz"+a,i}var Gs={animationend:ns("Animation","AnimationEnd"),animationiteration:ns("Animation","AnimationIteration"),animationstart:ns("Animation","AnimationStart"),transitionrun:ns("Transition","TransitionRun"),transitionstart:ns("Transition","TransitionStart"),transitioncancel:ns("Transition","TransitionCancel"),transitionend:ns("Transition","TransitionEnd")},$c={},zm={};Fa&&(zm=document.createElement("div").style,"AnimationEvent"in window||(delete Gs.animationend.animation,delete Gs.animationiteration.animation,delete Gs.animationstart.animation),"TransitionEvent"in window||delete Gs.transitionend.transition);function ss(e){if($c[e])return $c[e];if(!Gs[e])return e;var a=Gs[e],i;for(i in a)if(a.hasOwnProperty(i)&&i in zm)return $c[e]=a[i];return e}var Pm=ss("animationend"),Lm=ss("animationiteration"),Vm=ss("animationstart"),j2=ss("transitionrun"),k2=ss("transitionstart"),S2=ss("transitioncancel"),Um=ss("transitionend"),Bm=new Map,Fc="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(" ");Fc.push("scrollEnd");function ba(e,a){Bm.set(e,a),ts(a,[e])}var bl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sa=[],Is=0,Qc=0;function yl(){for(var e=Is,a=Qc=Is=0;a<e;){var i=sa[a];sa[a++]=null;var o=sa[a];sa[a++]=null;var d=sa[a];sa[a++]=null;var f=sa[a];if(sa[a++]=null,o!==null&&d!==null){var y=o.pending;y===null?d.next=d:(d.next=y.next,y.next=d),o.pending=d}f!==0&&qm(i,d,f)}}function vl(e,a,i,o){sa[Is++]=e,sa[Is++]=a,sa[Is++]=i,sa[Is++]=o,Qc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Xc(e,a,i,o){return vl(e,a,i,o),wl(e)}function is(e,a){return vl(e,null,null,a),wl(e)}function qm(e,a,i){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i);for(var d=!1,f=e.return;f!==null;)f.childLanes|=i,o=f.alternate,o!==null&&(o.childLanes|=i),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(d=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,d&&a!==null&&(d=31-Yt(i),e=f.hiddenUpdates,o=e[d],o===null?e[d]=[a]:o.push(a),a.lane=i|536870912),f):null}function wl(e){if(50<yr)throw yr=0,su=null,Error(l(185));for(var a=e.return;a!==null;)e=a,a=e.return;return e.tag===3?e.stateNode:null}var Ys={};function C2(e,a,i,o){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,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,a,i,o){return new C2(e,a,i,o)}function Kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qa(e,a){var i=e.alternate;return i===null?(i=Ft(e.tag,a,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=a,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,a=e.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Hm(e,a){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,a=i.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),e}function Nl(e,a,i,o,d,f){var y=0;if(o=e,typeof e=="function")Kc(e)&&(y=1);else if(typeof e=="string")y=RN(e,i,K.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=Ft(31,i,a,d),e.elementType=ee,e.lanes=f,e;case N:return rs(i.children,d,f,a);case A:y=8,d|=24;break;case E:return e=Ft(12,i,a,d|2),e.elementType=E,e.lanes=f,e;case Q:return e=Ft(13,i,a,d),e.elementType=Q,e.lanes=f,e;case z:return e=Ft(19,i,a,d),e.elementType=z,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case C:y=10;break e;case D:y=9;break e;case O:y=11;break e;case I:y=14;break e;case P:y=16,o=null;break e}y=29,i=Error(l(130,e===null?"null":typeof e,"")),o=null}return a=Ft(y,i,a,d),a.elementType=e,a.type=o,a.lanes=f,a}function rs(e,a,i,o){return e=Ft(7,e,o,a),e.lanes=i,e}function Wc(e,a,i){return e=Ft(6,e,null,a),e.lanes=i,e}function Gm(e){var a=Ft(18,null,null,0);return a.stateNode=e,a}function Zc(e,a,i){return a=Ft(4,e.children!==null?e.children:[],e.key,a),a.lanes=i,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}var Im=new WeakMap;function ia(e,a){if(typeof e=="object"&&e!==null){var i=Im.get(e);return i!==void 0?i:(a={value:e,source:a,stack:we(a)},Im.set(e,a),a)}return{value:e,source:a,stack:we(a)}}var $s=[],Fs=0,jl=null,Zi=0,ra=[],la=0,yn=null,Ta=1,Ma="";function Xa(e,a){$s[Fs++]=Zi,$s[Fs++]=jl,jl=e,Zi=a}function Ym(e,a,i){ra[la++]=Ta,ra[la++]=Ma,ra[la++]=yn,yn=e;var o=Ta;e=Ma;var d=32-Yt(o)-1;o&=~(1<<d),i+=1;var f=32-Yt(a)+d;if(30<f){var y=d-d%5;f=(o&(1<<y)-1).toString(32),o>>=y,d-=y,Ta=1<<32-Yt(a)+d|i<<d|o,Ma=f+e}else Ta=1<<f|i<<d|o,Ma=e}function Jc(e){e.return!==null&&(Xa(e,1),Ym(e,1,0))}function ed(e){for(;e===jl;)jl=$s[--Fs],$s[Fs]=null,Zi=$s[--Fs],$s[Fs]=null;for(;e===yn;)yn=ra[--la],ra[la]=null,Ma=ra[--la],ra[la]=null,Ta=ra[--la],ra[la]=null}function $m(e,a){ra[la++]=Ta,ra[la++]=Ma,ra[la++]=yn,Ta=a.id,Ma=a.overflow,yn=e}var wt=null,Ke=null,Pe=!1,vn=null,oa=!1,td=Error(l(519));function wn(e){var a=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ji(ia(a,e)),td}function Fm(e){var a=e.stateNode,i=e.type,o=e.memoizedProps;switch(a[vt]=e,a[zt]=o,i){case"dialog":De("cancel",a),De("close",a);break;case"iframe":case"object":case"embed":De("load",a);break;case"video":case"audio":for(i=0;i<wr.length;i++)De(wr[i],a);break;case"source":De("error",a);break;case"img":case"image":case"link":De("error",a),De("load",a);break;case"details":De("toggle",a);break;case"input":De("invalid",a),rm(a,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":De("invalid",a);break;case"textarea":De("invalid",a),om(a,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||a.textContent===""+i||o.suppressHydrationWarning===!0||dg(a.textContent,i)?(o.popover!=null&&(De("beforetoggle",a),De("toggle",a)),o.onScroll!=null&&De("scroll",a),o.onScrollEnd!=null&&De("scrollend",a),o.onClick!=null&&(a.onclick=$a),a=!0):a=!1,a||wn(e,!0)}function Qm(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:oa=!1;return;case 27:case 3:oa=!0;return;default:wt=wt.return}}function Qs(e){if(e!==wt)return!1;if(!Pe)return Qm(e),Pe=!0,!1;var a=e.tag,i;if((i=a!==3&&a!==27)&&((i=a===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||yu(e.type,e.memoizedProps)),i=!i),i&&Ke&&wn(e),Qm(e),a===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ke=yg(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ke=yg(e)}else a===27?(a=Ke,zn(e.type)?(e=ku,ku=null,Ke=e):Ke=a):Ke=wt?da(e.stateNode.nextSibling):null;return!0}function ls(){Ke=wt=null,Pe=!1}function ad(){var e=vn;return e!==null&&(Bt===null?Bt=e:Bt.push.apply(Bt,e),vn=null),e}function Ji(e){vn===null?vn=[e]:vn.push(e)}var nd=T(null),os=null,Ka=null;function Nn(e,a,i){Y(nd,a._currentValue),a._currentValue=i}function Wa(e){e._currentValue=nd.current,U(nd)}function sd(e,a,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,o!==null&&(o.childLanes|=a)):o!==null&&(o.childLanes&a)!==a&&(o.childLanes|=a),e===i)break;e=e.return}}function id(e,a,i,o){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var f=d.dependencies;if(f!==null){var y=d.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=d;for(var R=0;R<a.length;R++)if(S.context===a[R]){f.lanes|=i,S=f.alternate,S!==null&&(S.lanes|=i),sd(f.return,i,e),o||(y=null);break e}f=S.next}}else if(d.tag===18){if(y=d.return,y===null)throw Error(l(341));y.lanes|=i,f=y.alternate,f!==null&&(f.lanes|=i),sd(y,i,e),y=null}else y=d.child;if(y!==null)y.return=d;else for(y=d;y!==null;){if(y===e){y=null;break}if(d=y.sibling,d!==null){d.return=y.return,y=d;break}y=y.return}d=y}}function Xs(e,a,i,o){e=null;for(var d=a,f=!1;d!==null;){if(!f){if((d.flags&524288)!==0)f=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var y=d.alternate;if(y===null)throw Error(l(387));if(y=y.memoizedProps,y!==null){var S=d.type;$t(d.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(d===ve.current){if(y=d.alternate,y===null)throw Error(l(387));y.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Cr):e=[Cr])}d=d.return}e!==null&&id(a,e,i,o),a.flags|=262144}function kl(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function cs(e){os=e,Ka=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Nt(e){return Xm(os,e)}function Sl(e,a){return os===null&&cs(e),Xm(e,a)}function Xm(e,a){var i=a._currentValue;if(a={context:a,memoizedValue:i,next:null},Ka===null){if(e===null)throw Error(l(308));Ka=a,e.dependencies={lanes:0,firstContext:a},e.flags|=524288}else Ka=Ka.next=a;return i}var E2=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(i,o){e.push(o)}};this.abort=function(){a.aborted=!0,e.forEach(function(i){return i()})}},A2=t.unstable_scheduleCallback,T2=t.unstable_NormalPriority,rt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rd(){return{controller:new E2,data:new Map,refCount:0}}function er(e){e.refCount--,e.refCount===0&&A2(T2,function(){e.controller.abort()})}var tr=null,ld=0,Ks=0,Ws=null;function M2(e,a){if(tr===null){var i=tr=[];ld=0,Ks=du(),Ws={status:"pending",value:void 0,then:function(o){i.push(o)}}}return ld++,a.then(Km,Km),a}function Km(){if(--ld===0&&tr!==null){Ws!==null&&(Ws.status="fulfilled");var e=tr;tr=null,Ks=0,Ws=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function R2(e,a){var i=[],o={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return e.then(function(){o.status="fulfilled",o.value=a;for(var d=0;d<i.length;d++)(0,i[d])(a)},function(d){for(o.status="rejected",o.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),o}var Wm=V.S;V.S=function(e,a){_x=gt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&M2(e,a),Wm!==null&&Wm(e,a)};var ds=T(null);function od(){var e=ds.current;return e!==null?e:Fe.pooledCache}function Cl(e,a){a===null?Y(ds,ds.current):Y(ds,a.pool)}function Zm(){var e=od();return e===null?null:{parent:rt._currentValue,pool:e}}var Zs=Error(l(460)),cd=Error(l(474)),El=Error(l(542)),Al={then:function(){}};function Jm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ep(e,a,i){switch(i=e[i],i===void 0?e.push(a):i!==a&&(a.then($a,$a),a=i),a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,ap(e),e;default:if(typeof a.status=="string")a.then($a,$a);else{if(e=Fe,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=a,e.status="pending",e.then(function(o){if(a.status==="pending"){var d=a;d.status="fulfilled",d.value=o}},function(o){if(a.status==="pending"){var d=a;d.status="rejected",d.reason=o}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,ap(e),e}throw fs=a,Zs}}function us(e){try{var a=e._init;return a(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(fs=i,Zs):i}}var fs=null;function tp(){if(fs===null)throw Error(l(459));var e=fs;return fs=null,e}function ap(e){if(e===Zs||e===El)throw Error(l(483))}var Js=null,ar=0;function Tl(e){var a=ar;return ar+=1,Js===null&&(Js=[]),ep(Js,e,a)}function nr(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function Ml(e,a){throw a.$$typeof===v?Error(l(525)):(e=Object.prototype.toString.call(a),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)))}function np(e){function a(L,_){if(e){var B=L.deletions;B===null?(L.deletions=[_],L.flags|=16):B.push(_)}}function i(L,_){if(!e)return null;for(;_!==null;)a(L,_),_=_.sibling;return null}function o(L){for(var _=new Map;L!==null;)L.key!==null?_.set(L.key,L):_.set(L.index,L),L=L.sibling;return _}function d(L,_){return L=Qa(L,_),L.index=0,L.sibling=null,L}function f(L,_,B){return L.index=B,e?(B=L.alternate,B!==null?(B=B.index,B<_?(L.flags|=67108866,_):B):(L.flags|=67108866,_)):(L.flags|=1048576,_)}function y(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function S(L,_,B,X){return _===null||_.tag!==6?(_=Wc(B,L.mode,X),_.return=L,_):(_=d(_,B),_.return=L,_)}function R(L,_,B,X){var xe=B.type;return xe===N?F(L,_,B.props.children,X,B.key):_!==null&&(_.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===P&&us(xe)===_.type)?(_=d(_,B.props),nr(_,B),_.return=L,_):(_=Nl(B.type,B.key,B.props,null,L.mode,X),nr(_,B),_.return=L,_)}function q(L,_,B,X){return _===null||_.tag!==4||_.stateNode.containerInfo!==B.containerInfo||_.stateNode.implementation!==B.implementation?(_=Zc(B,L.mode,X),_.return=L,_):(_=d(_,B.children||[]),_.return=L,_)}function F(L,_,B,X,xe){return _===null||_.tag!==7?(_=rs(B,L.mode,X,xe),_.return=L,_):(_=d(_,B),_.return=L,_)}function Z(L,_,B){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=Wc(""+_,L.mode,B),_.return=L,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case w:return B=Nl(_.type,_.key,_.props,null,L.mode,B),nr(B,_),B.return=L,B;case j:return _=Zc(_,L.mode,B),_.return=L,_;case P:return _=us(_),Z(L,_,B)}if(te(_)||de(_))return _=rs(_,L.mode,B,null),_.return=L,_;if(typeof _.then=="function")return Z(L,Tl(_),B);if(_.$$typeof===C)return Z(L,Sl(L,_),B);Ml(L,_)}return null}function G(L,_,B,X){var xe=_!==null?_.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return xe!==null?null:S(L,_,""+B,X);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case w:return B.key===xe?R(L,_,B,X):null;case j:return B.key===xe?q(L,_,B,X):null;case P:return B=us(B),G(L,_,B,X)}if(te(B)||de(B))return xe!==null?null:F(L,_,B,X,null);if(typeof B.then=="function")return G(L,_,Tl(B),X);if(B.$$typeof===C)return G(L,_,Sl(L,B),X);Ml(L,B)}return null}function $(L,_,B,X,xe){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return L=L.get(B)||null,S(_,L,""+X,xe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case w:return L=L.get(X.key===null?B:X.key)||null,R(_,L,X,xe);case j:return L=L.get(X.key===null?B:X.key)||null,q(_,L,X,xe);case P:return X=us(X),$(L,_,B,X,xe)}if(te(X)||de(X))return L=L.get(B)||null,F(_,L,X,xe,null);if(typeof X.then=="function")return $(L,_,B,Tl(X),xe);if(X.$$typeof===C)return $(L,_,B,Sl(_,X),xe);Ml(_,X)}return null}function he(L,_,B,X){for(var xe=null,Le=null,pe=_,Se=_=0,ze=null;pe!==null&&Se<B.length;Se++){pe.index>Se?(ze=pe,pe=null):ze=pe.sibling;var Ve=G(L,pe,B[Se],X);if(Ve===null){pe===null&&(pe=ze);break}e&&pe&&Ve.alternate===null&&a(L,pe),_=f(Ve,_,Se),Le===null?xe=Ve:Le.sibling=Ve,Le=Ve,pe=ze}if(Se===B.length)return i(L,pe),Pe&&Xa(L,Se),xe;if(pe===null){for(;Se<B.length;Se++)pe=Z(L,B[Se],X),pe!==null&&(_=f(pe,_,Se),Le===null?xe=pe:Le.sibling=pe,Le=pe);return Pe&&Xa(L,Se),xe}for(pe=o(pe);Se<B.length;Se++)ze=$(pe,L,Se,B[Se],X),ze!==null&&(e&&ze.alternate!==null&&pe.delete(ze.key===null?Se:ze.key),_=f(ze,_,Se),Le===null?xe=ze:Le.sibling=ze,Le=ze);return e&&pe.forEach(function(Bn){return a(L,Bn)}),Pe&&Xa(L,Se),xe}function ye(L,_,B,X){if(B==null)throw Error(l(151));for(var xe=null,Le=null,pe=_,Se=_=0,ze=null,Ve=B.next();pe!==null&&!Ve.done;Se++,Ve=B.next()){pe.index>Se?(ze=pe,pe=null):ze=pe.sibling;var Bn=G(L,pe,Ve.value,X);if(Bn===null){pe===null&&(pe=ze);break}e&&pe&&Bn.alternate===null&&a(L,pe),_=f(Bn,_,Se),Le===null?xe=Bn:Le.sibling=Bn,Le=Bn,pe=ze}if(Ve.done)return i(L,pe),Pe&&Xa(L,Se),xe;if(pe===null){for(;!Ve.done;Se++,Ve=B.next())Ve=Z(L,Ve.value,X),Ve!==null&&(_=f(Ve,_,Se),Le===null?xe=Ve:Le.sibling=Ve,Le=Ve);return Pe&&Xa(L,Se),xe}for(pe=o(pe);!Ve.done;Se++,Ve=B.next())Ve=$(pe,L,Se,Ve.value,X),Ve!==null&&(e&&Ve.alternate!==null&&pe.delete(Ve.key===null?Se:Ve.key),_=f(Ve,_,Se),Le===null?xe=Ve:Le.sibling=Ve,Le=Ve);return e&&pe.forEach(function(HN){return a(L,HN)}),Pe&&Xa(L,Se),xe}function $e(L,_,B,X){if(typeof B=="object"&&B!==null&&B.type===N&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case w:e:{for(var xe=B.key;_!==null;){if(_.key===xe){if(xe=B.type,xe===N){if(_.tag===7){i(L,_.sibling),X=d(_,B.props.children),X.return=L,L=X;break e}}else if(_.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===P&&us(xe)===_.type){i(L,_.sibling),X=d(_,B.props),nr(X,B),X.return=L,L=X;break e}i(L,_);break}else a(L,_);_=_.sibling}B.type===N?(X=rs(B.props.children,L.mode,X,B.key),X.return=L,L=X):(X=Nl(B.type,B.key,B.props,null,L.mode,X),nr(X,B),X.return=L,L=X)}return y(L);case j:e:{for(xe=B.key;_!==null;){if(_.key===xe)if(_.tag===4&&_.stateNode.containerInfo===B.containerInfo&&_.stateNode.implementation===B.implementation){i(L,_.sibling),X=d(_,B.children||[]),X.return=L,L=X;break e}else{i(L,_);break}else a(L,_);_=_.sibling}X=Zc(B,L.mode,X),X.return=L,L=X}return y(L);case P:return B=us(B),$e(L,_,B,X)}if(te(B))return he(L,_,B,X);if(de(B)){if(xe=de(B),typeof xe!="function")throw Error(l(150));return B=xe.call(B),ye(L,_,B,X)}if(typeof B.then=="function")return $e(L,_,Tl(B),X);if(B.$$typeof===C)return $e(L,_,Sl(L,B),X);Ml(L,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,_!==null&&_.tag===6?(i(L,_.sibling),X=d(_,B),X.return=L,L=X):(i(L,_),X=Wc(B,L.mode,X),X.return=L,L=X),y(L)):i(L,_)}return function(L,_,B,X){try{ar=0;var xe=$e(L,_,B,X);return Js=null,xe}catch(pe){if(pe===Zs||pe===El)throw pe;var Le=Ft(29,pe,null,L.mode);return Le.lanes=X,Le.return=L,Le}finally{}}}var hs=np(!0),sp=np(!1),jn=!1;function dd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ud(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function kn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(e,a,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ue&2)!==0){var d=o.pending;return d===null?a.next=a:(a.next=d.next,d.next=a),o.pending=a,a=wl(e),qm(e,null,i),a}return vl(e,o,a,i),wl(e)}function sr(e,a,i){if(a=a.updateQueue,a!==null&&(a=a.shared,(i&4194048)!==0)){var o=a.lanes;o&=e.pendingLanes,i|=o,a.lanes=i,Xh(e,i)}}function fd(e,a){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var d=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var y={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?d=f=y:f=f.next=y,i=i.next}while(i!==null);f===null?d=f=a:f=f.next=a}else d=f=a;i={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=a:e.next=a,i.lastBaseUpdate=a}var hd=!1;function ir(){if(hd){var e=Ws;if(e!==null)throw e}}function rr(e,a,i,o){hd=!1;var d=e.updateQueue;jn=!1;var f=d.firstBaseUpdate,y=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var R=S,q=R.next;R.next=null,y===null?f=q:y.next=q,y=R;var F=e.alternate;F!==null&&(F=F.updateQueue,S=F.lastBaseUpdate,S!==y&&(S===null?F.firstBaseUpdate=q:S.next=q,F.lastBaseUpdate=R))}if(f!==null){var Z=d.baseState;y=0,F=q=R=null,S=f;do{var G=S.lane&-536870913,$=G!==S.lane;if($?(_e&G)===G:(o&G)===G){G!==0&&G===Ks&&(hd=!0),F!==null&&(F=F.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var he=e,ye=S;G=a;var $e=i;switch(ye.tag){case 1:if(he=ye.payload,typeof he=="function"){Z=he.call($e,Z,G);break e}Z=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ye.payload,G=typeof he=="function"?he.call($e,Z,G):he,G==null)break e;Z=b({},Z,G);break e;case 2:jn=!0}}G=S.callback,G!==null&&(e.flags|=64,$&&(e.flags|=8192),$=d.callbacks,$===null?d.callbacks=[G]:$.push(G))}else $={lane:G,tag:S.tag,payload:S.payload,callback:S.callback,next:null},F===null?(q=F=$,R=Z):F=F.next=$,y|=G;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;$=S,S=$.next,$.next=null,d.lastBaseUpdate=$,d.shared.pending=null}}while(!0);F===null&&(R=Z),d.baseState=R,d.firstBaseUpdate=q,d.lastBaseUpdate=F,f===null&&(d.shared.lanes=0),Mn|=y,e.lanes=y,e.memoizedState=Z}}function ip(e,a){if(typeof e!="function")throw Error(l(191,e));e.call(a)}function rp(e,a){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ip(i[e],a)}var ei=T(null),Rl=T(0);function lp(e,a){e=ln,Y(Rl,e),Y(ei,a),ln=e|a.baseLanes}function md(){Y(Rl,ln),Y(ei,ei.current)}function pd(){ln=Rl.current,U(ei),U(Rl)}var Qt=T(null),ca=null;function Cn(e){var a=e.alternate;Y(st,st.current&1),Y(Qt,e),ca===null&&(a===null||ei.current!==null||a.memoizedState!==null)&&(ca=e)}function xd(e){Y(st,st.current),Y(Qt,e),ca===null&&(ca=e)}function op(e){e.tag===22?(Y(st,st.current),Y(Qt,e),ca===null&&(ca=e)):En()}function En(){Y(st,st.current),Y(Qt,Qt.current)}function Xt(e){U(Qt),ca===e&&(ca=null),U(st)}var st=T(0);function Dl(e){for(var a=e;a!==null;){if(a.tag===13){var i=a.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Nu(i)||ju(i)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Za=0,ke=null,Ie=null,lt=null,Ol=!1,ti=!1,ms=!1,_l=0,lr=0,ai=null,D2=0;function et(){throw Error(l(321))}function gd(e,a){if(a===null)return!1;for(var i=0;i<a.length&&i<e.length;i++)if(!$t(e[i],a[i]))return!1;return!0}function bd(e,a,i,o,d,f){return Za=f,ke=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,V.H=e===null||e.memoizedState===null?Yp:Od,ms=!1,f=i(o,d),ms=!1,ti&&(f=dp(a,i,o,d)),cp(e),f}function cp(e){V.H=dr;var a=Ie!==null&&Ie.next!==null;if(Za=0,lt=Ie=ke=null,Ol=!1,lr=0,ai=null,a)throw Error(l(300));e===null||ot||(e=e.dependencies,e!==null&&kl(e)&&(ot=!0))}function dp(e,a,i,o){ke=e;var d=0;do{if(ti&&(ai=null),lr=0,ti=!1,25<=d)throw Error(l(301));if(d+=1,lt=Ie=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}V.H=$p,f=a(i,o)}while(ti);return f}function O2(){var e=V.H,a=e.useState()[0];return a=typeof a.then=="function"?or(a):a,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(ke.flags|=1024),a}function yd(){var e=_l!==0;return _l=0,e}function vd(e,a,i){a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~i}function wd(e){if(Ol){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}Ol=!1}Za=0,lt=Ie=ke=null,ti=!1,lr=_l=0,ai=null}function Tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?ke.memoizedState=lt=e:lt=lt.next=e,lt}function it(){if(Ie===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var a=lt===null?ke.memoizedState:lt.next;if(a!==null)lt=a,Ie=e;else{if(e===null)throw ke.alternate===null?Error(l(467)):Error(l(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},lt===null?ke.memoizedState=lt=e:lt=lt.next=e}return lt}function zl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function or(e){var a=lr;return lr+=1,ai===null&&(ai=[]),e=ep(ai,e,a),a=ke,(lt===null?a.memoizedState:lt.next)===null&&(a=a.alternate,V.H=a===null||a.memoizedState===null?Yp:Od),e}function Pl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return or(e);if(e.$$typeof===C)return Nt(e)}throw Error(l(438,String(e)))}function Nd(e){var a=null,i=ke.updateQueue;if(i!==null&&(a=i.memoCache),a==null){var o=ke.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(a={data:o.data.map(function(d){return d.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),i===null&&(i=zl(),ke.updateQueue=i),i.memoCache=a,i=a.data[a.index],i===void 0)for(i=a.data[a.index]=Array(e),o=0;o<e;o++)i[o]=W;return a.index++,i}function Ja(e,a){return typeof a=="function"?a(e):a}function Ll(e){var a=it();return jd(a,Ie,e)}function jd(e,a,i){var o=e.queue;if(o===null)throw Error(l(311));o.lastRenderedReducer=i;var d=e.baseQueue,f=o.pending;if(f!==null){if(d!==null){var y=d.next;d.next=f.next,f.next=y}a.baseQueue=d=f,o.pending=null}if(f=e.baseState,d===null)e.memoizedState=f;else{a=d.next;var S=y=null,R=null,q=a,F=!1;do{var Z=q.lane&-536870913;if(Z!==q.lane?(_e&Z)===Z:(Za&Z)===Z){var G=q.revertLane;if(G===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),Z===Ks&&(F=!0);else if((Za&G)===G){q=q.next,G===Ks&&(F=!0);continue}else Z={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},R===null?(S=R=Z,y=f):R=R.next=Z,ke.lanes|=G,Mn|=G;Z=q.action,ms&&i(f,Z),f=q.hasEagerState?q.eagerState:i(f,Z)}else G={lane:Z,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},R===null?(S=R=G,y=f):R=R.next=G,ke.lanes|=Z,Mn|=Z;q=q.next}while(q!==null&&q!==a);if(R===null?y=f:R.next=S,!$t(f,e.memoizedState)&&(ot=!0,F&&(i=Ws,i!==null)))throw i;e.memoizedState=f,e.baseState=y,e.baseQueue=R,o.lastRenderedState=f}return d===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function kd(e){var a=it(),i=a.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var o=i.dispatch,d=i.pending,f=a.memoizedState;if(d!==null){i.pending=null;var y=d=d.next;do f=e(f,y.action),y=y.next;while(y!==d);$t(f,a.memoizedState)||(ot=!0),a.memoizedState=f,a.baseQueue===null&&(a.baseState=f),i.lastRenderedState=f}return[f,o]}function up(e,a,i){var o=ke,d=it(),f=Pe;if(f){if(i===void 0)throw Error(l(407));i=i()}else i=a();var y=!$t((Ie||d).memoizedState,i);if(y&&(d.memoizedState=i,ot=!0),d=d.queue,Ed(mp.bind(null,o,d,e),[e]),d.getSnapshot!==a||y||lt!==null&&lt.memoizedState.tag&1){if(o.flags|=2048,ni(9,{destroy:void 0},hp.bind(null,o,d,i,a),null),Fe===null)throw Error(l(349));f||(Za&127)!==0||fp(o,a,i)}return i}function fp(e,a,i){e.flags|=16384,e={getSnapshot:a,value:i},a=ke.updateQueue,a===null?(a=zl(),ke.updateQueue=a,a.stores=[e]):(i=a.stores,i===null?a.stores=[e]:i.push(e))}function hp(e,a,i,o){a.value=i,a.getSnapshot=o,pp(a)&&xp(e)}function mp(e,a,i){return i(function(){pp(a)&&xp(e)})}function pp(e){var a=e.getSnapshot;e=e.value;try{var i=a();return!$t(e,i)}catch{return!0}}function xp(e){var a=is(e,2);a!==null&&qt(a,e,2)}function Sd(e){var a=Tt();if(typeof e=="function"){var i=e;if(e=i(),ms){xn(!0);try{i()}finally{xn(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:e},a}function gp(e,a,i,o){return e.baseState=i,jd(e,Ie,typeof o=="function"?o:Ja)}function _2(e,a,i,o,d){if(Bl(e))throw Error(l(485));if(e=a.action,e!==null){var f={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};V.T!==null?i(!0):f.isTransition=!1,o(f),i=a.pending,i===null?(f.next=a.pending=f,bp(a,f)):(f.next=i.next,a.pending=i.next=f)}}function bp(e,a){var i=a.action,o=a.payload,d=e.state;if(a.isTransition){var f=V.T,y={};V.T=y;try{var S=i(d,o),R=V.S;R!==null&&R(y,S),yp(e,a,S)}catch(q){Cd(e,a,q)}finally{f!==null&&y.types!==null&&(f.types=y.types),V.T=f}}else try{f=i(d,o),yp(e,a,f)}catch(q){Cd(e,a,q)}}function yp(e,a,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){vp(e,a,o)},function(o){return Cd(e,a,o)}):vp(e,a,i)}function vp(e,a,i){a.status="fulfilled",a.value=i,wp(a),e.state=i,a=e.pending,a!==null&&(i=a.next,i===a?e.pending=null:(i=i.next,a.next=i,bp(e,i)))}function Cd(e,a,i){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do a.status="rejected",a.reason=i,wp(a),a=a.next;while(a!==o)}e.action=null}function wp(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function Np(e,a){return a}function jp(e,a){if(Pe){var i=Fe.formState;if(i!==null){e:{var o=ke;if(Pe){if(Ke){t:{for(var d=Ke,f=oa;d.nodeType!==8;){if(!f){d=null;break t}if(d=da(d.nextSibling),d===null){d=null;break t}}f=d.data,d=f==="F!"||f==="F"?d:null}if(d){Ke=da(d.nextSibling),o=d.data==="F!";break e}}wn(o)}o=!1}o&&(a=i[0])}}return i=Tt(),i.memoizedState=i.baseState=a,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Np,lastRenderedState:a},i.queue=o,i=Hp.bind(null,ke,o),o.dispatch=i,o=Sd(!1),f=Dd.bind(null,ke,!1,o.queue),o=Tt(),d={state:a,dispatch:null,action:e,pending:null},o.queue=d,i=_2.bind(null,ke,d,f,i),d.dispatch=i,o.memoizedState=e,[a,i,!1]}function kp(e){var a=it();return Sp(a,Ie,e)}function Sp(e,a,i){if(a=jd(e,a,Np)[0],e=Ll(Ja)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var o=or(a)}catch(y){throw y===Zs?El:y}else o=a;a=it();var d=a.queue,f=d.dispatch;return i!==a.memoizedState&&(ke.flags|=2048,ni(9,{destroy:void 0},z2.bind(null,d,i),null)),[o,f,e]}function z2(e,a){e.action=a}function Cp(e){var a=it(),i=Ie;if(i!==null)return Sp(a,i,e);it(),a=a.memoizedState,i=it();var o=i.queue.dispatch;return i.memoizedState=e,[a,o,!1]}function ni(e,a,i,o){return e={tag:e,create:i,deps:o,inst:a,next:null},a=ke.updateQueue,a===null&&(a=zl(),ke.updateQueue=a),i=a.lastEffect,i===null?a.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,a.lastEffect=e),e}function Ep(){return it().memoizedState}function Vl(e,a,i,o){var d=Tt();ke.flags|=e,d.memoizedState=ni(1|a,{destroy:void 0},i,o===void 0?null:o)}function Ul(e,a,i,o){var d=it();o=o===void 0?null:o;var f=d.memoizedState.inst;Ie!==null&&o!==null&&gd(o,Ie.memoizedState.deps)?d.memoizedState=ni(a,f,i,o):(ke.flags|=e,d.memoizedState=ni(1|a,f,i,o))}function Ap(e,a){Vl(8390656,8,e,a)}function Ed(e,a){Ul(2048,8,e,a)}function P2(e){ke.flags|=4;var a=ke.updateQueue;if(a===null)a=zl(),ke.updateQueue=a,a.events=[e];else{var i=a.events;i===null?a.events=[e]:i.push(e)}}function Tp(e){var a=it().memoizedState;return P2({ref:a,nextImpl:e}),function(){if((Ue&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}function Mp(e,a){return Ul(4,2,e,a)}function Rp(e,a){return Ul(4,4,e,a)}function Dp(e,a){if(typeof a=="function"){e=e();var i=a(e);return function(){typeof i=="function"?i():a(null)}}if(a!=null)return e=e(),a.current=e,function(){a.current=null}}function Op(e,a,i){i=i!=null?i.concat([e]):null,Ul(4,4,Dp.bind(null,a,e),i)}function Ad(){}function _p(e,a){var i=it();a=a===void 0?null:a;var o=i.memoizedState;return a!==null&&gd(a,o[1])?o[0]:(i.memoizedState=[e,a],e)}function zp(e,a){var i=it();a=a===void 0?null:a;var o=i.memoizedState;if(a!==null&&gd(a,o[1]))return o[0];if(o=e(),ms){xn(!0);try{e()}finally{xn(!1)}}return i.memoizedState=[o,a],o}function Td(e,a,i){return i===void 0||(Za&1073741824)!==0&&(_e&261930)===0?e.memoizedState=a:(e.memoizedState=i,e=Px(),ke.lanes|=e,Mn|=e,i)}function Pp(e,a,i,o){return $t(i,a)?i:ei.current!==null?(e=Td(e,i,o),$t(e,a)||(ot=!0),e):(Za&42)===0||(Za&1073741824)!==0&&(_e&261930)===0?(ot=!0,e.memoizedState=i):(e=Px(),ke.lanes|=e,Mn|=e,a)}function Lp(e,a,i,o,d){var f=J.p;J.p=f!==0&&8>f?f:8;var y=V.T,S={};V.T=S,Dd(e,!1,a,i);try{var R=d(),q=V.S;if(q!==null&&q(S,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var F=R2(R,o);cr(e,a,F,Zt(e))}else cr(e,a,o,Zt(e))}catch(Z){cr(e,a,{then:function(){},status:"rejected",reason:Z},Zt())}finally{J.p=f,y!==null&&S.types!==null&&(y.types=S.types),V.T=y}}function L2(){}function Md(e,a,i,o){if(e.tag!==5)throw Error(l(476));var d=Vp(e).queue;Lp(e,d,a,ae,i===null?L2:function(){return Up(e),i(o)})}function Vp(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:ae},next:null};var i={};return a.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:i},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function Up(e){var a=Vp(e);a.next===null&&(a=e.alternate.memoizedState),cr(e,a.next.queue,{},Zt())}function Rd(){return Nt(Cr)}function Bp(){return it().memoizedState}function qp(){return it().memoizedState}function V2(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var i=Zt();e=kn(i);var o=Sn(a,e,i);o!==null&&(qt(o,a,i),sr(o,a,i)),a={cache:rd()},e.payload=a;return}a=a.return}}function U2(e,a,i){var o=Zt();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Bl(e)?Gp(a,i):(i=Xc(e,a,i,o),i!==null&&(qt(i,e,o),Ip(i,a,o)))}function Hp(e,a,i){var o=Zt();cr(e,a,i,o)}function cr(e,a,i,o){var d={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Bl(e))Gp(a,d);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=a.lastRenderedReducer,f!==null))try{var y=a.lastRenderedState,S=f(y,i);if(d.hasEagerState=!0,d.eagerState=S,$t(S,y))return vl(e,a,d,0),Fe===null&&yl(),!1}catch{}finally{}if(i=Xc(e,a,d,o),i!==null)return qt(i,e,o),Ip(i,a,o),!0}return!1}function Dd(e,a,i,o){if(o={lane:2,revertLane:du(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Bl(e)){if(a)throw Error(l(479))}else a=Xc(e,i,o,2),a!==null&&qt(a,e,2)}function Bl(e){var a=e.alternate;return e===ke||a!==null&&a===ke}function Gp(e,a){ti=Ol=!0;var i=e.pending;i===null?a.next=a:(a.next=i.next,i.next=a),e.pending=a}function Ip(e,a,i){if((i&4194048)!==0){var o=a.lanes;o&=e.pendingLanes,i|=o,a.lanes=i,Xh(e,i)}}var dr={readContext:Nt,use:Pl,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};dr.useEffectEvent=et;var Yp={readContext:Nt,use:Pl,useCallback:function(e,a){return Tt().memoizedState=[e,a===void 0?null:a],e},useContext:Nt,useEffect:Ap,useImperativeHandle:function(e,a,i){i=i!=null?i.concat([e]):null,Vl(4194308,4,Dp.bind(null,a,e),i)},useLayoutEffect:function(e,a){return Vl(4194308,4,e,a)},useInsertionEffect:function(e,a){Vl(4,2,e,a)},useMemo:function(e,a){var i=Tt();a=a===void 0?null:a;var o=e();if(ms){xn(!0);try{e()}finally{xn(!1)}}return i.memoizedState=[o,a],o},useReducer:function(e,a,i){var o=Tt();if(i!==void 0){var d=i(a);if(ms){xn(!0);try{i(a)}finally{xn(!1)}}}else d=a;return o.memoizedState=o.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},o.queue=e,e=e.dispatch=U2.bind(null,ke,e),[o.memoizedState,e]},useRef:function(e){var a=Tt();return e={current:e},a.memoizedState=e},useState:function(e){e=Sd(e);var a=e.queue,i=Hp.bind(null,ke,a);return a.dispatch=i,[e.memoizedState,i]},useDebugValue:Ad,useDeferredValue:function(e,a){var i=Tt();return Td(i,e,a)},useTransition:function(){var e=Sd(!1);return e=Lp.bind(null,ke,e.queue,!0,!1),Tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,i){var o=ke,d=Tt();if(Pe){if(i===void 0)throw Error(l(407));i=i()}else{if(i=a(),Fe===null)throw Error(l(349));(_e&127)!==0||fp(o,a,i)}d.memoizedState=i;var f={value:i,getSnapshot:a};return d.queue=f,Ap(mp.bind(null,o,f,e),[e]),o.flags|=2048,ni(9,{destroy:void 0},hp.bind(null,o,f,i,a),null),i},useId:function(){var e=Tt(),a=Fe.identifierPrefix;if(Pe){var i=Ma,o=Ta;i=(o&~(1<<32-Yt(o)-1)).toString(32)+i,a="_"+a+"R_"+i,i=_l++,0<i&&(a+="H"+i.toString(32)),a+="_"}else i=D2++,a="_"+a+"r_"+i.toString(32)+"_";return e.memoizedState=a},useHostTransitionStatus:Rd,useFormState:jp,useActionState:jp,useOptimistic:function(e){var a=Tt();a.memoizedState=a.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=i,a=Dd.bind(null,ke,!0,i),i.dispatch=a,[e,a]},useMemoCache:Nd,useCacheRefresh:function(){return Tt().memoizedState=V2.bind(null,ke)},useEffectEvent:function(e){var a=Tt(),i={impl:e};return a.memoizedState=i,function(){if((Ue&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Od={readContext:Nt,use:Pl,useCallback:_p,useContext:Nt,useEffect:Ed,useImperativeHandle:Op,useInsertionEffect:Mp,useLayoutEffect:Rp,useMemo:zp,useReducer:Ll,useRef:Ep,useState:function(){return Ll(Ja)},useDebugValue:Ad,useDeferredValue:function(e,a){var i=it();return Pp(i,Ie.memoizedState,e,a)},useTransition:function(){var e=Ll(Ja)[0],a=it().memoizedState;return[typeof e=="boolean"?e:or(e),a]},useSyncExternalStore:up,useId:Bp,useHostTransitionStatus:Rd,useFormState:kp,useActionState:kp,useOptimistic:function(e,a){var i=it();return gp(i,Ie,e,a)},useMemoCache:Nd,useCacheRefresh:qp};Od.useEffectEvent=Tp;var $p={readContext:Nt,use:Pl,useCallback:_p,useContext:Nt,useEffect:Ed,useImperativeHandle:Op,useInsertionEffect:Mp,useLayoutEffect:Rp,useMemo:zp,useReducer:kd,useRef:Ep,useState:function(){return kd(Ja)},useDebugValue:Ad,useDeferredValue:function(e,a){var i=it();return Ie===null?Td(i,e,a):Pp(i,Ie.memoizedState,e,a)},useTransition:function(){var e=kd(Ja)[0],a=it().memoizedState;return[typeof e=="boolean"?e:or(e),a]},useSyncExternalStore:up,useId:Bp,useHostTransitionStatus:Rd,useFormState:Cp,useActionState:Cp,useOptimistic:function(e,a){var i=it();return Ie!==null?gp(i,Ie,e,a):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Nd,useCacheRefresh:qp};$p.useEffectEvent=Tp;function _d(e,a,i,o){a=e.memoizedState,i=i(o,a),i=i==null?a:b({},a,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var zd={enqueueSetState:function(e,a,i){e=e._reactInternals;var o=Zt(),d=kn(o);d.payload=a,i!=null&&(d.callback=i),a=Sn(e,d,o),a!==null&&(qt(a,e,o),sr(a,e,o))},enqueueReplaceState:function(e,a,i){e=e._reactInternals;var o=Zt(),d=kn(o);d.tag=1,d.payload=a,i!=null&&(d.callback=i),a=Sn(e,d,o),a!==null&&(qt(a,e,o),sr(a,e,o))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var i=Zt(),o=kn(i);o.tag=2,a!=null&&(o.callback=a),a=Sn(e,o,i),a!==null&&(qt(a,e,i),sr(a,e,i))}};function Fp(e,a,i,o,d,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,y):a.prototype&&a.prototype.isPureReactComponent?!Ki(i,o)||!Ki(d,f):!0}function Qp(e,a,i,o){e=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(i,o),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(i,o),a.state!==e&&zd.enqueueReplaceState(a,a.state,null)}function ps(e,a){var i=a;if("ref"in a){i={};for(var o in a)o!=="ref"&&(i[o]=a[o])}if(e=e.defaultProps){i===a&&(i=b({},i));for(var d in e)i[d]===void 0&&(i[d]=e[d])}return i}function Xp(e){bl(e)}function Kp(e){console.error(e)}function Wp(e){bl(e)}function ql(e,a){try{var i=e.onUncaughtError;i(a.value,{componentStack:a.stack})}catch(o){setTimeout(function(){throw o})}}function Zp(e,a,i){try{var o=e.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Pd(e,a,i){return i=kn(i),i.tag=3,i.payload={element:null},i.callback=function(){ql(e,a)},i}function Jp(e){return e=kn(e),e.tag=3,e}function ex(e,a,i,o){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var f=o.value;e.payload=function(){return d(f)},e.callback=function(){Zp(a,i,o)}}var y=i.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Zp(a,i,o),typeof d!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function B2(e,a,i,o,d){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(a=i.alternate,a!==null&&Xs(a,i,d,!0),i=Qt.current,i!==null){switch(i.tag){case 31:case 13:return ca===null?Jl():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,o===Al?i.flags|=16384:(a=i.updateQueue,a===null?i.updateQueue=new Set([o]):a.add(o),lu(e,o,d)),!1;case 22:return i.flags|=65536,o===Al?i.flags|=16384:(a=i.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=a):(i=a.retryQueue,i===null?a.retryQueue=new Set([o]):i.add(o)),lu(e,o,d)),!1}throw Error(l(435,i.tag))}return lu(e,o,d),Jl(),!1}if(Pe)return a=Qt.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=d,o!==td&&(e=Error(l(422),{cause:o}),Ji(ia(e,i)))):(o!==td&&(a=Error(l(423),{cause:o}),Ji(ia(a,i))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,o=ia(o,i),d=Pd(e.stateNode,o,d),fd(e,d),tt!==4&&(tt=2)),!1;var f=Error(l(520),{cause:o});if(f=ia(f,i),br===null?br=[f]:br.push(f),tt!==4&&(tt=2),a===null)return!0;o=ia(o,i),i=a;do{switch(i.tag){case 3:return i.flags|=65536,e=d&-d,i.lanes|=e,e=Pd(i.stateNode,o,e),fd(i,e),!1;case 1:if(a=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Rn===null||!Rn.has(f))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Jp(d),ex(d,e,i,o),fd(i,d),!1}i=i.return}while(i!==null);return!1}var Ld=Error(l(461)),ot=!1;function jt(e,a,i,o){a.child=e===null?sp(a,null,i,o):hs(a,e.child,i,o)}function tx(e,a,i,o,d){i=i.render;var f=a.ref;if("ref"in o){var y={};for(var S in o)S!=="ref"&&(y[S]=o[S])}else y=o;return cs(a),o=bd(e,a,i,y,f,d),S=yd(),e!==null&&!ot?(vd(e,a,d),en(e,a,d)):(Pe&&S&&Jc(a),a.flags|=1,jt(e,a,o,d),a.child)}function ax(e,a,i,o,d){if(e===null){var f=i.type;return typeof f=="function"&&!Kc(f)&&f.defaultProps===void 0&&i.compare===null?(a.tag=15,a.type=f,nx(e,a,f,o,d)):(e=Nl(i.type,null,o,a,a.mode,d),e.ref=a.ref,e.return=a,a.child=e)}if(f=e.child,!Yd(e,d)){var y=f.memoizedProps;if(i=i.compare,i=i!==null?i:Ki,i(y,o)&&e.ref===a.ref)return en(e,a,d)}return a.flags|=1,e=Qa(f,o),e.ref=a.ref,e.return=a,a.child=e}function nx(e,a,i,o,d){if(e!==null){var f=e.memoizedProps;if(Ki(f,o)&&e.ref===a.ref)if(ot=!1,a.pendingProps=o=f,Yd(e,d))(e.flags&131072)!==0&&(ot=!0);else return a.lanes=e.lanes,en(e,a,d)}return Vd(e,a,i,o,d)}function sx(e,a,i,o){var d=o.children,f=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((a.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,e!==null){for(o=a.child=e.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~f}else o=0,a.child=null;return ix(e,a,f,i,o)}if((i&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&Cl(a,f!==null?f.cachePool:null),f!==null?lp(a,f):md(),op(a);else return o=a.lanes=536870912,ix(e,a,f!==null?f.baseLanes|i:i,i,o)}else f!==null?(Cl(a,f.cachePool),lp(a,f),En(),a.memoizedState=null):(e!==null&&Cl(a,null),md(),En());return jt(e,a,d,i),a.child}function ur(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function ix(e,a,i,o,d){var f=od();return f=f===null?null:{parent:rt._currentValue,pool:f},a.memoizedState={baseLanes:i,cachePool:f},e!==null&&Cl(a,null),md(),op(a),e!==null&&Xs(e,a,o,!0),a.childLanes=d,null}function Hl(e,a){return a=Il({mode:a.mode,children:a.children},e.mode),a.ref=e.ref,e.child=a,a.return=e,a}function rx(e,a,i){return hs(a,e.child,null,i),e=Hl(a,a.pendingProps),e.flags|=2,Xt(a),a.memoizedState=null,e}function q2(e,a,i){var o=a.pendingProps,d=(a.flags&128)!==0;if(a.flags&=-129,e===null){if(Pe){if(o.mode==="hidden")return e=Hl(a,o),a.lanes=536870912,ur(null,e);if(xd(a),(e=Ke)?(e=bg(e,oa),e=e!==null&&e.data==="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Ta,overflow:Ma}:null,retryLane:536870912,hydrationErrors:null},i=Gm(e),i.return=a,a.child=i,wt=a,Ke=null)):e=null,e===null)throw wn(a);return a.lanes=536870912,null}return Hl(a,o)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(xd(a),d)if(a.flags&256)a.flags&=-257,a=rx(e,a,i);else if(a.memoizedState!==null)a.child=e.child,a.flags|=128,a=null;else throw Error(l(558));else if(ot||Xs(e,a,i,!1),d=(i&e.childLanes)!==0,ot||d){if(o=Fe,o!==null&&(y=Kh(o,i),y!==0&&y!==f.retryLane))throw f.retryLane=y,is(e,y),qt(o,e,y),Ld;Jl(),a=rx(e,a,i)}else e=f.treeContext,Ke=da(y.nextSibling),wt=a,Pe=!0,vn=null,oa=!1,e!==null&&$m(a,e),a=Hl(a,o),a.flags|=4096;return a}return e=Qa(e.child,{mode:o.mode,children:o.children}),e.ref=a.ref,a.child=e,e.return=a,e}function Gl(e,a){var i=a.ref;if(i===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(a.flags|=4194816)}}function Vd(e,a,i,o,d){return cs(a),i=bd(e,a,i,o,void 0,d),o=yd(),e!==null&&!ot?(vd(e,a,d),en(e,a,d)):(Pe&&o&&Jc(a),a.flags|=1,jt(e,a,i,d),a.child)}function lx(e,a,i,o,d,f){return cs(a),a.updateQueue=null,i=dp(a,o,i,d),cp(e),o=yd(),e!==null&&!ot?(vd(e,a,f),en(e,a,f)):(Pe&&o&&Jc(a),a.flags|=1,jt(e,a,i,f),a.child)}function ox(e,a,i,o,d){if(cs(a),a.stateNode===null){var f=Ys,y=i.contextType;typeof y=="object"&&y!==null&&(f=Nt(y)),f=new i(o,f),a.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=zd,a.stateNode=f,f._reactInternals=a,f=a.stateNode,f.props=o,f.state=a.memoizedState,f.refs={},dd(a),y=i.contextType,f.context=typeof y=="object"&&y!==null?Nt(y):Ys,f.state=a.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(_d(a,i,y,o),f.state=a.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&zd.enqueueReplaceState(f,f.state,null),rr(a,o,f,d),ir(),f.state=a.memoizedState),typeof f.componentDidMount=="function"&&(a.flags|=4194308),o=!0}else if(e===null){f=a.stateNode;var S=a.memoizedProps,R=ps(i,S);f.props=R;var q=f.context,F=i.contextType;y=Ys,typeof F=="object"&&F!==null&&(y=Nt(F));var Z=i.getDerivedStateFromProps;F=typeof Z=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=a.pendingProps!==S,F||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||q!==y)&&Qp(a,f,o,y),jn=!1;var G=a.memoizedState;f.state=G,rr(a,o,f,d),ir(),q=a.memoizedState,S||G!==q||jn?(typeof Z=="function"&&(_d(a,i,Z,o),q=a.memoizedState),(R=jn||Fp(a,i,R,o,G,q,y))?(F||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"&&(a.flags|=4194308)):(typeof f.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=o,a.memoizedState=q),f.props=o,f.state=q,f.context=y,o=R):(typeof f.componentDidMount=="function"&&(a.flags|=4194308),o=!1)}else{f=a.stateNode,ud(e,a),y=a.memoizedProps,F=ps(i,y),f.props=F,Z=a.pendingProps,G=f.context,q=i.contextType,R=Ys,typeof q=="object"&&q!==null&&(R=Nt(q)),S=i.getDerivedStateFromProps,(q=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==Z||G!==R)&&Qp(a,f,o,R),jn=!1,G=a.memoizedState,f.state=G,rr(a,o,f,d),ir();var $=a.memoizedState;y!==Z||G!==$||jn||e!==null&&e.dependencies!==null&&kl(e.dependencies)?(typeof S=="function"&&(_d(a,i,S,o),$=a.memoizedState),(F=jn||Fp(a,i,F,o,G,$,R)||e!==null&&e.dependencies!==null&&kl(e.dependencies))?(q||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,$,R),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,$,R)),typeof f.componentDidUpdate=="function"&&(a.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&G===e.memoizedState||(a.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&G===e.memoizedState||(a.flags|=1024),a.memoizedProps=o,a.memoizedState=$),f.props=o,f.state=$,f.context=R,o=F):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&G===e.memoizedState||(a.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&G===e.memoizedState||(a.flags|=1024),o=!1)}return f=o,Gl(e,a),o=(a.flags&128)!==0,f||o?(f=a.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:f.render(),a.flags|=1,e!==null&&o?(a.child=hs(a,e.child,null,d),a.child=hs(a,null,i,d)):jt(e,a,i,d),a.memoizedState=f.state,e=a.child):e=en(e,a,d),e}function cx(e,a,i,o){return ls(),a.flags|=256,jt(e,a,i,o),a.child}var Ud={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bd(e){return{baseLanes:e,cachePool:Zm()}}function qd(e,a,i){return e=e!==null?e.childLanes&~i:0,a&&(e|=Wt),e}function dx(e,a,i){var o=a.pendingProps,d=!1,f=(a.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),y&&(d=!0,a.flags&=-129),y=(a.flags&32)!==0,a.flags&=-33,e===null){if(Pe){if(d?Cn(a):En(),(e=Ke)?(e=bg(e,oa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Ta,overflow:Ma}:null,retryLane:536870912,hydrationErrors:null},i=Gm(e),i.return=a,a.child=i,wt=a,Ke=null)):e=null,e===null)throw wn(a);return ju(e)?a.lanes=32:a.lanes=536870912,null}var S=o.children;return o=o.fallback,d?(En(),d=a.mode,S=Il({mode:"hidden",children:S},d),o=rs(o,d,i,null),S.return=a,o.return=a,S.sibling=o,a.child=S,o=a.child,o.memoizedState=Bd(i),o.childLanes=qd(e,y,i),a.memoizedState=Ud,ur(null,o)):(Cn(a),Hd(a,S))}var R=e.memoizedState;if(R!==null&&(S=R.dehydrated,S!==null)){if(f)a.flags&256?(Cn(a),a.flags&=-257,a=Gd(e,a,i)):a.memoizedState!==null?(En(),a.child=e.child,a.flags|=128,a=null):(En(),S=o.fallback,d=a.mode,o=Il({mode:"visible",children:o.children},d),S=rs(S,d,i,null),S.flags|=2,o.return=a,S.return=a,o.sibling=S,a.child=o,hs(a,e.child,null,i),o=a.child,o.memoizedState=Bd(i),o.childLanes=qd(e,y,i),a.memoizedState=Ud,a=ur(null,o));else if(Cn(a),ju(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var q=y.dgst;y=q,o=Error(l(419)),o.stack="",o.digest=y,Ji({value:o,source:null,stack:null}),a=Gd(e,a,i)}else if(ot||Xs(e,a,i,!1),y=(i&e.childLanes)!==0,ot||y){if(y=Fe,y!==null&&(o=Kh(y,i),o!==0&&o!==R.retryLane))throw R.retryLane=o,is(e,o),qt(y,e,o),Ld;Nu(S)||Jl(),a=Gd(e,a,i)}else Nu(S)?(a.flags|=192,a.child=e.child,a=null):(e=R.treeContext,Ke=da(S.nextSibling),wt=a,Pe=!0,vn=null,oa=!1,e!==null&&$m(a,e),a=Hd(a,o.children),a.flags|=4096);return a}return d?(En(),S=o.fallback,d=a.mode,R=e.child,q=R.sibling,o=Qa(R,{mode:"hidden",children:o.children}),o.subtreeFlags=R.subtreeFlags&65011712,q!==null?S=Qa(q,S):(S=rs(S,d,i,null),S.flags|=2),S.return=a,o.return=a,o.sibling=S,a.child=o,ur(null,o),o=a.child,S=e.child.memoizedState,S===null?S=Bd(i):(d=S.cachePool,d!==null?(R=rt._currentValue,d=d.parent!==R?{parent:R,pool:R}:d):d=Zm(),S={baseLanes:S.baseLanes|i,cachePool:d}),o.memoizedState=S,o.childLanes=qd(e,y,i),a.memoizedState=Ud,ur(e.child,o)):(Cn(a),i=e.child,e=i.sibling,i=Qa(i,{mode:"visible",children:o.children}),i.return=a,i.sibling=null,e!==null&&(y=a.deletions,y===null?(a.deletions=[e],a.flags|=16):y.push(e)),a.child=i,a.memoizedState=null,i)}function Hd(e,a){return a=Il({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function Il(e,a){return e=Ft(22,e,null,a),e.lanes=0,e}function Gd(e,a,i){return hs(a,e.child,null,i),e=Hd(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function ux(e,a,i){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a),sd(e.return,a,i)}function Id(e,a,i,o,d,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:d,treeForkCount:f}:(y.isBackwards=a,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=i,y.tailMode=d,y.treeForkCount=f)}function fx(e,a,i){var o=a.pendingProps,d=o.revealOrder,f=o.tail;o=o.children;var y=st.current,S=(y&2)!==0;if(S?(y=y&1|2,a.flags|=128):y&=1,Y(st,y),jt(e,a,o,i),o=Pe?Zi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ux(e,i,a);else if(e.tag===19)ux(e,i,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break e;for(;e.sibling===null;){if(e.return===null||e.return===a)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(i=a.child,d=null;i!==null;)e=i.alternate,e!==null&&Dl(e)===null&&(d=i),i=i.sibling;i=d,i===null?(d=a.child,a.child=null):(d=i.sibling,i.sibling=null),Id(a,!1,d,i,f,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=a.child,a.child=null;d!==null;){if(e=d.alternate,e!==null&&Dl(e)===null){a.child=d;break}e=d.sibling,d.sibling=i,i=d,d=e}Id(a,!0,i,null,f,o);break;case"together":Id(a,!1,null,null,void 0,o);break;default:a.memoizedState=null}return a.child}function en(e,a,i){if(e!==null&&(a.dependencies=e.dependencies),Mn|=a.lanes,(i&a.childLanes)===0)if(e!==null){if(Xs(e,a,i,!1),(i&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error(l(153));if(a.child!==null){for(e=a.child,i=Qa(e,e.pendingProps),a.child=i,i.return=a;e.sibling!==null;)e=e.sibling,i=i.sibling=Qa(e,e.pendingProps),i.return=a;i.sibling=null}return a.child}function Yd(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&kl(e)))}function H2(e,a,i){switch(a.tag){case 3:Ge(a,a.stateNode.containerInfo),Nn(a,rt,e.memoizedState.cache),ls();break;case 27:case 5:Et(a);break;case 4:Ge(a,a.stateNode.containerInfo);break;case 10:Nn(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,xd(a),null;break;case 13:var o=a.memoizedState;if(o!==null)return o.dehydrated!==null?(Cn(a),a.flags|=128,null):(i&a.child.childLanes)!==0?dx(e,a,i):(Cn(a),e=en(e,a,i),e!==null?e.sibling:null);Cn(a);break;case 19:var d=(e.flags&128)!==0;if(o=(i&a.childLanes)!==0,o||(Xs(e,a,i,!1),o=(i&a.childLanes)!==0),d){if(o)return fx(e,a,i);a.flags|=128}if(d=a.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Y(st,st.current),o)break;return null;case 22:return a.lanes=0,sx(e,a,i,a.pendingProps);case 24:Nn(a,rt,e.memoizedState.cache)}return en(e,a,i)}function hx(e,a,i){if(e!==null)if(e.memoizedProps!==a.pendingProps)ot=!0;else{if(!Yd(e,i)&&(a.flags&128)===0)return ot=!1,H2(e,a,i);ot=(e.flags&131072)!==0}else ot=!1,Pe&&(a.flags&1048576)!==0&&Ym(a,Zi,a.index);switch(a.lanes=0,a.tag){case 16:e:{var o=a.pendingProps;if(e=us(a.elementType),a.type=e,typeof e=="function")Kc(e)?(o=ps(e,o),a.tag=1,a=ox(null,a,e,o,i)):(a.tag=0,a=Vd(null,a,e,o,i));else{if(e!=null){var d=e.$$typeof;if(d===O){a.tag=11,a=tx(null,a,e,o,i);break e}else if(d===I){a.tag=14,a=ax(null,a,e,o,i);break e}}throw a=be(e)||e,Error(l(306,a,""))}}return a;case 0:return Vd(e,a,a.type,a.pendingProps,i);case 1:return o=a.type,d=ps(o,a.pendingProps),ox(e,a,o,d,i);case 3:e:{if(Ge(a,a.stateNode.containerInfo),e===null)throw Error(l(387));o=a.pendingProps;var f=a.memoizedState;d=f.element,ud(e,a),rr(a,o,null,i);var y=a.memoizedState;if(o=y.cache,Nn(a,rt,o),o!==f.cache&&id(a,[rt],i,!0),ir(),o=y.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:y.cache},a.updateQueue.baseState=f,a.memoizedState=f,a.flags&256){a=cx(e,a,o,i);break e}else if(o!==d){d=ia(Error(l(424)),a),Ji(d),a=cx(e,a,o,i);break e}else{switch(e=a.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ke=da(e.firstChild),wt=a,Pe=!0,vn=null,oa=!0,i=sp(a,null,o,i),a.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ls(),o===d){a=en(e,a,i);break e}jt(e,a,o,i)}a=a.child}return a;case 26:return Gl(e,a),e===null?(i=kg(a.type,null,a.pendingProps,null))?a.memoizedState=i:Pe||(i=a.type,e=a.pendingProps,o=ro(ce.current).createElement(i),o[vt]=a,o[zt]=e,kt(o,i,e),bt(o),a.stateNode=o):a.memoizedState=kg(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:return Et(a),e===null&&Pe&&(o=a.stateNode=wg(a.type,a.pendingProps,ce.current),wt=a,oa=!0,d=Ke,zn(a.type)?(ku=d,Ke=da(o.firstChild)):Ke=d),jt(e,a,a.pendingProps.children,i),Gl(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&Pe&&((d=o=Ke)&&(o=bN(o,a.type,a.pendingProps,oa),o!==null?(a.stateNode=o,wt=a,Ke=da(o.firstChild),oa=!1,d=!0):d=!1),d||wn(a)),Et(a),d=a.type,f=a.pendingProps,y=e!==null?e.memoizedProps:null,o=f.children,yu(d,f)?o=null:y!==null&&yu(d,y)&&(a.flags|=32),a.memoizedState!==null&&(d=bd(e,a,O2,null,null,i),Cr._currentValue=d),Gl(e,a),jt(e,a,o,i),a.child;case 6:return e===null&&Pe&&((e=i=Ke)&&(i=yN(i,a.pendingProps,oa),i!==null?(a.stateNode=i,wt=a,Ke=null,e=!0):e=!1),e||wn(a)),null;case 13:return dx(e,a,i);case 4:return Ge(a,a.stateNode.containerInfo),o=a.pendingProps,e===null?a.child=hs(a,null,o,i):jt(e,a,o,i),a.child;case 11:return tx(e,a,a.type,a.pendingProps,i);case 7:return jt(e,a,a.pendingProps,i),a.child;case 8:return jt(e,a,a.pendingProps.children,i),a.child;case 12:return jt(e,a,a.pendingProps.children,i),a.child;case 10:return o=a.pendingProps,Nn(a,a.type,o.value),jt(e,a,o.children,i),a.child;case 9:return d=a.type._context,o=a.pendingProps.children,cs(a),d=Nt(d),o=o(d),a.flags|=1,jt(e,a,o,i),a.child;case 14:return ax(e,a,a.type,a.pendingProps,i);case 15:return nx(e,a,a.type,a.pendingProps,i);case 19:return fx(e,a,i);case 31:return q2(e,a,i);case 22:return sx(e,a,i,a.pendingProps);case 24:return cs(a),o=Nt(rt),e===null?(d=od(),d===null&&(d=Fe,f=rd(),d.pooledCache=f,f.refCount++,f!==null&&(d.pooledCacheLanes|=i),d=f),a.memoizedState={parent:o,cache:d},dd(a),Nn(a,rt,d)):((e.lanes&i)!==0&&(ud(e,a),rr(a,null,null,i),ir()),d=e.memoizedState,f=a.memoizedState,d.parent!==o?(d={parent:o,cache:o},a.memoizedState=d,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=d),Nn(a,rt,o)):(o=f.cache,Nn(a,rt,o),o!==d.cache&&id(a,[rt],i,!0))),jt(e,a,a.pendingProps.children,i),a.child;case 29:throw a.pendingProps}throw Error(l(156,a.tag))}function tn(e){e.flags|=4}function $d(e,a,i,o,d){if((a=(e.mode&32)!==0)&&(a=!1),a){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Bx())e.flags|=8192;else throw fs=Al,cd}else e.flags&=-16777217}function mx(e,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Tg(a))if(Bx())e.flags|=8192;else throw fs=Al,cd}function Yl(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?Fh():536870912,e.lanes|=a,li|=a)}function fr(e,a){if(!Pe)switch(e.tailMode){case"hidden":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function We(e){var a=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(a)for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)i|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=o,e.childLanes=i,a}function G2(e,a,i){var o=a.pendingProps;switch(ed(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(a),null;case 1:return We(a),null;case 3:return i=a.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Wa(rt),Ne(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Qs(a)?tn(a):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,ad())),We(a),null;case 26:var d=a.type,f=a.memoizedState;return e===null?(tn(a),f!==null?(We(a),mx(a,f)):(We(a),$d(a,d,null,o,i))):f?f!==e.memoizedState?(tn(a),We(a),mx(a,f)):(We(a),a.flags&=-16777217):(e=e.memoizedProps,e!==o&&tn(a),We(a),$d(a,d,e,o,i)),null;case 27:if(xa(a),i=ce.current,d=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==o&&tn(a);else{if(!o){if(a.stateNode===null)throw Error(l(166));return We(a),null}e=K.current,Qs(a)?Fm(a):(e=wg(d,o,i),a.stateNode=e,tn(a))}return We(a),null;case 5:if(xa(a),d=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==o&&tn(a);else{if(!o){if(a.stateNode===null)throw Error(l(166));return We(a),null}if(f=K.current,Qs(a))Fm(a);else{var y=ro(ce.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?y.createElement(d,{is:o.is}):y.createElement(d)}}f[vt]=a,f[zt]=o;e:for(y=a.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===a)break e;for(;y.sibling===null;){if(y.return===null||y.return===a)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}a.stateNode=f;e:switch(kt(f,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&tn(a)}}return We(a),$d(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,i),null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==o&&tn(a);else{if(typeof o!="string"&&a.stateNode===null)throw Error(l(166));if(e=ce.current,Qs(a)){if(e=a.stateNode,i=a.memoizedProps,o=null,d=wt,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}e[vt]=a,e=!!(e.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||dg(e.nodeValue,i)),e||wn(a,!0)}else e=ro(e).createTextNode(o),e[vt]=a,a.stateNode=e}return We(a),null;case 31:if(i=a.memoizedState,e===null||e.memoizedState!==null){if(o=Qs(a),i!==null){if(e===null){if(!o)throw Error(l(318));if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[vt]=a}else ls(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;We(a),e=!1}else i=ad(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return a.flags&256?(Xt(a),a):(Xt(a),null);if((a.flags&128)!==0)throw Error(l(558))}return We(a),null;case 13:if(o=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Qs(a),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error(l(318));if(d=a.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[vt]=a}else ls(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;We(a),d=!1}else d=ad(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return a.flags&256?(Xt(a),a):(Xt(a),null)}return Xt(a),(a.flags&128)!==0?(a.lanes=i,a):(i=o!==null,e=e!==null&&e.memoizedState!==null,i&&(o=a.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==d&&(o.flags|=2048)),i!==e&&i&&(a.child.flags|=8192),Yl(a,a.updateQueue),We(a),null);case 4:return Ne(),e===null&&mu(a.stateNode.containerInfo),We(a),null;case 10:return Wa(a.type),We(a),null;case 19:if(U(st),o=a.memoizedState,o===null)return We(a),null;if(d=(a.flags&128)!==0,f=o.rendering,f===null)if(d)fr(o,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(f=Dl(e),f!==null){for(a.flags|=128,fr(o,!1),e=f.updateQueue,a.updateQueue=e,Yl(a,e),a.subtreeFlags=0,e=i,i=a.child;i!==null;)Hm(i,e),i=i.sibling;return Y(st,st.current&1|2),Pe&&Xa(a,o.treeForkCount),a.child}e=e.sibling}o.tail!==null&&gt()>Kl&&(a.flags|=128,d=!0,fr(o,!1),a.lanes=4194304)}else{if(!d)if(e=Dl(f),e!==null){if(a.flags|=128,d=!0,e=e.updateQueue,a.updateQueue=e,Yl(a,e),fr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!Pe)return We(a),null}else 2*gt()-o.renderingStartTime>Kl&&i!==536870912&&(a.flags|=128,d=!0,fr(o,!1),a.lanes=4194304);o.isBackwards?(f.sibling=a.child,a.child=f):(e=o.last,e!==null?e.sibling=f:a.child=f,o.last=f)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=gt(),e.sibling=null,i=st.current,Y(st,d?i&1|2:i&1),Pe&&Xa(a,o.treeForkCount),e):(We(a),null);case 22:case 23:return Xt(a),pd(),o=a.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(a.flags|=8192):o&&(a.flags|=8192),o?(i&536870912)!==0&&(a.flags&128)===0&&(We(a),a.subtreeFlags&6&&(a.flags|=8192)):We(a),i=a.updateQueue,i!==null&&Yl(a,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==i&&(a.flags|=2048),e!==null&&U(ds),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),a.memoizedState.cache!==i&&(a.flags|=2048),Wa(rt),We(a),null;case 25:return null;case 30:return null}throw Error(l(156,a.tag))}function I2(e,a){switch(ed(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return Wa(rt),Ne(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return xa(a),null;case 31:if(a.memoizedState!==null){if(Xt(a),a.alternate===null)throw Error(l(340));ls()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 13:if(Xt(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(l(340));ls()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return U(st),null;case 4:return Ne(),null;case 10:return Wa(a.type),null;case 22:case 23:return Xt(a),pd(),e!==null&&U(ds),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return Wa(rt),null;case 25:return null;default:return null}}function px(e,a){switch(ed(a),a.tag){case 3:Wa(rt),Ne();break;case 26:case 27:case 5:xa(a);break;case 4:Ne();break;case 31:a.memoizedState!==null&&Xt(a);break;case 13:Xt(a);break;case 19:U(st);break;case 10:Wa(a.type);break;case 22:case 23:Xt(a),pd(),e!==null&&U(ds);break;case 24:Wa(rt)}}function hr(e,a){try{var i=a.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var d=o.next;i=d;do{if((i.tag&e)===e){o=void 0;var f=i.create,y=i.inst;o=f(),y.destroy=o}i=i.next}while(i!==d)}}catch(S){qe(a,a.return,S)}}function An(e,a,i){try{var o=a.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var f=d.next;o=f;do{if((o.tag&e)===e){var y=o.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,d=a;var R=i,q=S;try{q()}catch(F){qe(d,R,F)}}}o=o.next}while(o!==f)}}catch(F){qe(a,a.return,F)}}function xx(e){var a=e.updateQueue;if(a!==null){var i=e.stateNode;try{rp(a,i)}catch(o){qe(e,e.return,o)}}}function gx(e,a,i){i.props=ps(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(o){qe(e,a,o)}}function mr(e,a){try{var i=e.ref;if(i!==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 i=="function"?e.refCleanup=i(o):i.current=o}}catch(d){qe(e,a,d)}}function Ra(e,a){var i=e.ref,o=e.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(d){qe(e,a,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){qe(e,a,d)}else i.current=null}function bx(e){var a=e.type,i=e.memoizedProps,o=e.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(d){qe(e,e.return,d)}}function Fd(e,a,i){try{var o=e.stateNode;fN(o,e.type,i,a),o[zt]=a}catch(d){qe(e,e.return,d)}}function yx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zn(e.type)||e.tag===4}function Qd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yx(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&&zn(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 Xd(e,a,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,a?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,a):(a=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,a.appendChild(e),i=i._reactRootContainer,i!=null||a.onclick!==null||(a.onclick=$a));else if(o!==4&&(o===27&&zn(e.type)&&(i=e.stateNode,a=null),e=e.child,e!==null))for(Xd(e,a,i),e=e.sibling;e!==null;)Xd(e,a,i),e=e.sibling}function $l(e,a,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,a?i.insertBefore(e,a):i.appendChild(e);else if(o!==4&&(o===27&&zn(e.type)&&(i=e.stateNode),e=e.child,e!==null))for($l(e,a,i),e=e.sibling;e!==null;)$l(e,a,i),e=e.sibling}function vx(e){var a=e.stateNode,i=e.memoizedProps;try{for(var o=e.type,d=a.attributes;d.length;)a.removeAttributeNode(d[0]);kt(a,o,i),a[vt]=e,a[zt]=i}catch(f){qe(e,e.return,f)}}var an=!1,ct=!1,Kd=!1,wx=typeof WeakSet=="function"?WeakSet:Set,yt=null;function Y2(e,a){if(e=e.containerInfo,gu=mo,e=Om(e),Gc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var d=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var y=0,S=-1,R=-1,q=0,F=0,Z=e,G=null;t:for(;;){for(var $;Z!==i||d!==0&&Z.nodeType!==3||(S=y+d),Z!==f||o!==0&&Z.nodeType!==3||(R=y+o),Z.nodeType===3&&(y+=Z.nodeValue.length),($=Z.firstChild)!==null;)G=Z,Z=$;for(;;){if(Z===e)break t;if(G===i&&++q===d&&(S=y),G===f&&++F===o&&(R=y),($=Z.nextSibling)!==null)break;Z=G,G=Z.parentNode}Z=$}i=S===-1||R===-1?null:{start:S,end:R}}else i=null}i=i||{start:0,end:0}}else i=null;for(bu={focusedElem:e,selectionRange:i},mo=!1,yt=a;yt!==null;)if(a=yt,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,yt=e;else for(;yt!==null;){switch(a=yt,f=a.alternate,e=a.flags,a.tag){case 0:if((e&4)!==0&&(e=a.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)d=e[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,i=a,d=f.memoizedProps,f=f.memoizedState,o=i.stateNode;try{var he=ps(i.type,d);e=o.getSnapshotBeforeUpdate(he,f),o.__reactInternalSnapshotBeforeUpdate=e}catch(ye){qe(i,i.return,ye)}}break;case 3:if((e&1024)!==0){if(e=a.stateNode.containerInfo,i=e.nodeType,i===9)wu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":wu(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(l(163))}if(e=a.sibling,e!==null){e.return=a.return,yt=e;break}yt=a.return}}function Nx(e,a,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:sn(e,i),o&4&&hr(5,i);break;case 1:if(sn(e,i),o&4)if(e=i.stateNode,a===null)try{e.componentDidMount()}catch(y){qe(i,i.return,y)}else{var d=ps(i.type,a.memoizedProps);a=a.memoizedState;try{e.componentDidUpdate(d,a,e.__reactInternalSnapshotBeforeUpdate)}catch(y){qe(i,i.return,y)}}o&64&&xx(i),o&512&&mr(i,i.return);break;case 3:if(sn(e,i),o&64&&(e=i.updateQueue,e!==null)){if(a=null,i.child!==null)switch(i.child.tag){case 27:case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}try{rp(e,a)}catch(y){qe(i,i.return,y)}}break;case 27:a===null&&o&4&&vx(i);case 26:case 5:sn(e,i),a===null&&o&4&&bx(i),o&512&&mr(i,i.return);break;case 12:sn(e,i);break;case 31:sn(e,i),o&4&&Sx(e,i);break;case 13:sn(e,i),o&4&&Cx(e,i),o&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=eN.bind(null,i),vN(e,i))));break;case 22:if(o=i.memoizedState!==null||an,!o){a=a!==null&&a.memoizedState!==null||ct,d=an;var f=ct;an=o,(ct=a)&&!f?rn(e,i,(i.subtreeFlags&8772)!==0):sn(e,i),an=d,ct=f}break;case 30:break;default:sn(e,i)}}function jx(e){var a=e.alternate;a!==null&&(e.alternate=null,jx(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&Cc(a)),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 Ze=null,Lt=!1;function nn(e,a,i){for(i=i.child;i!==null;)kx(e,a,i),i=i.sibling}function kx(e,a,i){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(Vi,i)}catch{}switch(i.tag){case 26:ct||Ra(i,a),nn(e,a,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ct||Ra(i,a);var o=Ze,d=Lt;zn(i.type)&&(Ze=i.stateNode,Lt=!1),nn(e,a,i),jr(i.stateNode),Ze=o,Lt=d;break;case 5:ct||Ra(i,a);case 6:if(o=Ze,d=Lt,Ze=null,nn(e,a,i),Ze=o,Lt=d,Ze!==null)if(Lt)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(i.stateNode)}catch(f){qe(i,a,f)}else try{Ze.removeChild(i.stateNode)}catch(f){qe(i,a,f)}break;case 18:Ze!==null&&(Lt?(e=Ze,xg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),pi(e)):xg(Ze,i.stateNode));break;case 4:o=Ze,d=Lt,Ze=i.stateNode.containerInfo,Lt=!0,nn(e,a,i),Ze=o,Lt=d;break;case 0:case 11:case 14:case 15:An(2,i,a),ct||An(4,i,a),nn(e,a,i);break;case 1:ct||(Ra(i,a),o=i.stateNode,typeof o.componentWillUnmount=="function"&&gx(i,a,o)),nn(e,a,i);break;case 21:nn(e,a,i);break;case 22:ct=(o=ct)||i.memoizedState!==null,nn(e,a,i),ct=o;break;default:nn(e,a,i)}}function Sx(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{pi(e)}catch(i){qe(a,a.return,i)}}}function Cx(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{pi(e)}catch(i){qe(a,a.return,i)}}function $2(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new wx),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new wx),a;default:throw Error(l(435,e.tag))}}function Fl(e,a){var i=$2(e);a.forEach(function(o){if(!i.has(o)){i.add(o);var d=tN.bind(null,e,o);o.then(d,d)}})}function Vt(e,a){var i=a.deletions;if(i!==null)for(var o=0;o<i.length;o++){var d=i[o],f=e,y=a,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(zn(S.type)){Ze=S.stateNode,Lt=!1;break e}break;case 5:Ze=S.stateNode,Lt=!1;break e;case 3:case 4:Ze=S.stateNode.containerInfo,Lt=!0;break e}S=S.return}if(Ze===null)throw Error(l(160));kx(f,y,d),Ze=null,Lt=!1,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Ex(a,e),a=a.sibling}var ya=null;function Ex(e,a){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(a,e),Ut(e),o&4&&(An(3,e,e.return),hr(3,e),An(5,e,e.return));break;case 1:Vt(a,e),Ut(e),o&512&&(ct||i===null||Ra(i,i.return)),o&64&&an&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var d=ya;if(Vt(a,e),Ut(e),o&512&&(ct||i===null||Ra(i,i.return)),o&4){var f=i!==null?i.memoizedState:null;if(o=e.memoizedState,i===null)if(o===null)if(e.stateNode===null){e:{o=e.type,i=e.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":f=d.getElementsByTagName("title")[0],(!f||f[qi]||f[vt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=d.createElement(o),d.head.insertBefore(f,d.querySelector("head > title"))),kt(f,o,i),f[vt]=e,bt(f),o=f;break e;case"link":var y=Eg("link","href",d).get(o+(i.href||""));if(y){for(var S=0;S<y.length;S++)if(f=y[S],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){y.splice(S,1);break t}}f=d.createElement(o),kt(f,o,i),d.head.appendChild(f);break;case"meta":if(y=Eg("meta","content",d).get(o+(i.content||""))){for(S=0;S<y.length;S++)if(f=y[S],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){y.splice(S,1);break t}}f=d.createElement(o),kt(f,o,i),d.head.appendChild(f);break;default:throw Error(l(468,o))}f[vt]=e,bt(f),o=f}e.stateNode=o}else Ag(d,e.type,e.stateNode);else e.stateNode=Cg(d,o,e.memoizedProps);else f!==o?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,o===null?Ag(d,e.type,e.stateNode):Cg(d,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Fd(e,e.memoizedProps,i.memoizedProps)}break;case 27:Vt(a,e),Ut(e),o&512&&(ct||i===null||Ra(i,i.return)),i!==null&&o&4&&Fd(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Vt(a,e),Ut(e),o&512&&(ct||i===null||Ra(i,i.return)),e.flags&32){d=e.stateNode;try{Vs(d,"")}catch(he){qe(e,e.return,he)}}o&4&&e.stateNode!=null&&(d=e.memoizedProps,Fd(e,d,i!==null?i.memoizedProps:d)),o&1024&&(Kd=!0);break;case 6:if(Vt(a,e),Ut(e),o&4){if(e.stateNode===null)throw Error(l(162));o=e.memoizedProps,i=e.stateNode;try{i.nodeValue=o}catch(he){qe(e,e.return,he)}}break;case 3:if(co=null,d=ya,ya=lo(a.containerInfo),Vt(a,e),ya=d,Ut(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{pi(a.containerInfo)}catch(he){qe(e,e.return,he)}Kd&&(Kd=!1,Ax(e));break;case 4:o=ya,ya=lo(e.stateNode.containerInfo),Vt(a,e),Ut(e),ya=o;break;case 12:Vt(a,e),Ut(e);break;case 31:Vt(a,e),Ut(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Fl(e,o)));break;case 13:Vt(a,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Xl=gt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Fl(e,o)));break;case 22:d=e.memoizedState!==null;var R=i!==null&&i.memoizedState!==null,q=an,F=ct;if(an=q||d,ct=F||R,Vt(a,e),ct=F,an=q,Ut(e),o&8192)e:for(a=e.stateNode,a._visibility=d?a._visibility&-2:a._visibility|1,d&&(i===null||R||an||ct||xs(e)),i=null,a=e;;){if(a.tag===5||a.tag===26){if(i===null){R=i=a;try{if(f=R.stateNode,d)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=R.stateNode;var Z=R.memoizedProps.style,G=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;S.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(he){qe(R,R.return,he)}}}else if(a.tag===6){if(i===null){R=a;try{R.stateNode.nodeValue=d?"":R.memoizedProps}catch(he){qe(R,R.return,he)}}}else if(a.tag===18){if(i===null){R=a;try{var $=R.stateNode;d?gg($,!0):gg(R.stateNode,!1)}catch(he){qe(R,R.return,he)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break e;for(;a.sibling===null;){if(a.return===null||a.return===e)break e;i===a&&(i=null),a=a.return}i===a&&(i=null),a.sibling.return=a.return,a=a.sibling}o&4&&(o=e.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,Fl(e,i))));break;case 19:Vt(a,e),Ut(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Fl(e,o)));break;case 30:break;case 21:break;default:Vt(a,e),Ut(e)}}function Ut(e){var a=e.flags;if(a&2){try{for(var i,o=e.return;o!==null;){if(yx(o)){i=o;break}o=o.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var d=i.stateNode,f=Qd(e);$l(e,f,d);break;case 5:var y=i.stateNode;i.flags&32&&(Vs(y,""),i.flags&=-33);var S=Qd(e);$l(e,S,y);break;case 3:case 4:var R=i.stateNode.containerInfo,q=Qd(e);Xd(e,q,R);break;default:throw Error(l(161))}}catch(F){qe(e,e.return,F)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function Ax(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;Ax(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),e=e.sibling}}function sn(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Nx(e,a.alternate,a),a=a.sibling}function xs(e){for(e=e.child;e!==null;){var a=e;switch(a.tag){case 0:case 11:case 14:case 15:An(4,a,a.return),xs(a);break;case 1:Ra(a,a.return);var i=a.stateNode;typeof i.componentWillUnmount=="function"&&gx(a,a.return,i),xs(a);break;case 27:jr(a.stateNode);case 26:case 5:Ra(a,a.return),xs(a);break;case 22:a.memoizedState===null&&xs(a);break;case 30:xs(a);break;default:xs(a)}e=e.sibling}}function rn(e,a,i){for(i=i&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var o=a.alternate,d=e,f=a,y=f.flags;switch(f.tag){case 0:case 11:case 15:rn(d,f,i),hr(4,f);break;case 1:if(rn(d,f,i),o=f,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(q){qe(o,o.return,q)}if(o=f,d=o.updateQueue,d!==null){var S=o.stateNode;try{var R=d.shared.hiddenCallbacks;if(R!==null)for(d.shared.hiddenCallbacks=null,d=0;d<R.length;d++)ip(R[d],S)}catch(q){qe(o,o.return,q)}}i&&y&64&&xx(f),mr(f,f.return);break;case 27:vx(f);case 26:case 5:rn(d,f,i),i&&o===null&&y&4&&bx(f),mr(f,f.return);break;case 12:rn(d,f,i);break;case 31:rn(d,f,i),i&&y&4&&Sx(d,f);break;case 13:rn(d,f,i),i&&y&4&&Cx(d,f);break;case 22:f.memoizedState===null&&rn(d,f,i),mr(f,f.return);break;case 30:break;default:rn(d,f,i)}a=a.sibling}}function Wd(e,a){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&er(i))}function Zd(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&er(e))}function va(e,a,i,o){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Tx(e,a,i,o),a=a.sibling}function Tx(e,a,i,o){var d=a.flags;switch(a.tag){case 0:case 11:case 15:va(e,a,i,o),d&2048&&hr(9,a);break;case 1:va(e,a,i,o);break;case 3:va(e,a,i,o),d&2048&&(e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&er(e)));break;case 12:if(d&2048){va(e,a,i,o),e=a.stateNode;try{var f=a.memoizedProps,y=f.id,S=f.onPostCommit;typeof S=="function"&&S(y,a.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){qe(a,a.return,R)}}else va(e,a,i,o);break;case 31:va(e,a,i,o);break;case 13:va(e,a,i,o);break;case 23:break;case 22:f=a.stateNode,y=a.alternate,a.memoizedState!==null?f._visibility&2?va(e,a,i,o):pr(e,a):f._visibility&2?va(e,a,i,o):(f._visibility|=2,si(e,a,i,o,(a.subtreeFlags&10256)!==0||!1)),d&2048&&Wd(y,a);break;case 24:va(e,a,i,o),d&2048&&Zd(a.alternate,a);break;default:va(e,a,i,o)}}function si(e,a,i,o,d){for(d=d&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var f=e,y=a,S=i,R=o,q=y.flags;switch(y.tag){case 0:case 11:case 15:si(f,y,S,R,d),hr(8,y);break;case 23:break;case 22:var F=y.stateNode;y.memoizedState!==null?F._visibility&2?si(f,y,S,R,d):pr(f,y):(F._visibility|=2,si(f,y,S,R,d)),d&&q&2048&&Wd(y.alternate,y);break;case 24:si(f,y,S,R,d),d&&q&2048&&Zd(y.alternate,y);break;default:si(f,y,S,R,d)}a=a.sibling}}function pr(e,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var i=e,o=a,d=o.flags;switch(o.tag){case 22:pr(i,o),d&2048&&Wd(o.alternate,o);break;case 24:pr(i,o),d&2048&&Zd(o.alternate,o);break;default:pr(i,o)}a=a.sibling}}var xr=8192;function ii(e,a,i){if(e.subtreeFlags&xr)for(e=e.child;e!==null;)Mx(e,a,i),e=e.sibling}function Mx(e,a,i){switch(e.tag){case 26:ii(e,a,i),e.flags&xr&&e.memoizedState!==null&&DN(i,ya,e.memoizedState,e.memoizedProps);break;case 5:ii(e,a,i);break;case 3:case 4:var o=ya;ya=lo(e.stateNode.containerInfo),ii(e,a,i),ya=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=xr,xr=16777216,ii(e,a,i),xr=o):ii(e,a,i));break;default:ii(e,a,i)}}function Rx(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function gr(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var o=a[i];yt=o,Ox(o,e)}Rx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dx(e),e=e.sibling}function Dx(e){switch(e.tag){case 0:case 11:case 15:gr(e),e.flags&2048&&An(9,e,e.return);break;case 3:gr(e);break;case 12:gr(e);break;case 22:var a=e.stateNode;e.memoizedState!==null&&a._visibility&2&&(e.return===null||e.return.tag!==13)?(a._visibility&=-3,Ql(e)):gr(e);break;default:gr(e)}}function Ql(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var o=a[i];yt=o,Ox(o,e)}Rx(e)}for(e=e.child;e!==null;){switch(a=e,a.tag){case 0:case 11:case 15:An(8,a,a.return),Ql(a);break;case 22:i=a.stateNode,i._visibility&2&&(i._visibility&=-3,Ql(a));break;default:Ql(a)}e=e.sibling}}function Ox(e,a){for(;yt!==null;){var i=yt;switch(i.tag){case 0:case 11:case 15:An(8,i,a);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:er(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,yt=o;else e:for(i=e;yt!==null;){o=yt;var d=o.sibling,f=o.return;if(jx(o),o===i){yt=null;break e}if(d!==null){d.return=f,yt=d;break e}yt=f}}}var F2={getCacheForType:function(e){var a=Nt(rt),i=a.data.get(e);return i===void 0&&(i=e(),a.data.set(e,i)),i},cacheSignal:function(){return Nt(rt).controller.signal}},Q2=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Fe=null,Re=null,_e=0,Be=0,Kt=null,Tn=!1,ri=!1,Jd=!1,ln=0,tt=0,Mn=0,gs=0,eu=0,Wt=0,li=0,br=null,Bt=null,tu=!1,Xl=0,_x=0,Kl=1/0,Wl=null,Rn=null,ut=0,Dn=null,oi=null,on=0,au=0,nu=null,zx=null,yr=0,su=null;function Zt(){return(Ue&2)!==0&&_e!==0?_e&-_e:V.T!==null?du():Wh()}function Px(){if(Wt===0)if((_e&536870912)===0||Pe){var e=il;il<<=1,(il&3932160)===0&&(il=262144),Wt=e}else Wt=536870912;return e=Qt.current,e!==null&&(e.flags|=32),Wt}function qt(e,a,i){(e===Fe&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(ci(e,0),On(e,_e,Wt,!1)),Bi(e,i),((Ue&2)===0||e!==Fe)&&(e===Fe&&((Ue&2)===0&&(gs|=i),tt===4&&On(e,_e,Wt,!1)),Da(e))}function Lx(e,a,i){if((Ue&6)!==0)throw Error(l(327));var o=!i&&(a&127)===0&&(a&e.expiredLanes)===0||Ui(e,a),d=o?W2(e,a):ru(e,a,!0),f=o;do{if(d===0){ri&&!o&&On(e,a,0,!1);break}else{if(i=e.current.alternate,f&&!X2(i)){d=ru(e,a,!1),f=!1;continue}if(d===2){if(f=a,e.errorRecoveryDisabledLanes&f)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){a=y;e:{var S=e;d=br;var R=S.current.memoizedState.isDehydrated;if(R&&(ci(S,y).flags|=256),y=ru(S,y,!1),y!==2){if(Jd&&!R){S.errorRecoveryDisabledLanes|=f,gs|=f,d=4;break e}f=Bt,Bt=d,f!==null&&(Bt===null?Bt=f:Bt.push.apply(Bt,f))}d=y}if(f=!1,d!==2)continue}}if(d===1){ci(e,0),On(e,a,0,!0);break}e:{switch(o=e,f=d,f){case 0:case 1:throw Error(l(345));case 4:if((a&4194048)!==a)break;case 6:On(o,a,Wt,!Tn);break e;case 2:Bt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((a&62914560)===a&&(d=Xl+300-gt(),10<d)){if(On(o,a,Wt,!Tn),ll(o,0,!0)!==0)break e;on=a,o.timeoutHandle=mg(Vx.bind(null,o,i,Bt,Wl,tu,a,Wt,gs,li,Tn,f,"Throttled",-0,0),d);break e}Vx(o,i,Bt,Wl,tu,a,Wt,gs,li,Tn,f,null,-0,0)}}break}while(!0);Da(e)}function Vx(e,a,i,o,d,f,y,S,R,q,F,Z,G,$){if(e.timeoutHandle=-1,Z=a.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$a},Mx(a,f,Z);var he=(f&62914560)===f?Xl-gt():(f&4194048)===f?_x-gt():0;if(he=ON(Z,he),he!==null){on=f,e.cancelPendingCommit=he($x.bind(null,e,a,f,i,o,d,y,S,R,F,Z,null,G,$)),On(e,f,y,!q);return}}$x(e,a,f,i,o,d,y,S,R)}function X2(e){for(var a=e;;){var i=a.tag;if((i===0||i===11||i===15)&&a.flags&16384&&(i=a.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var d=i[o],f=d.getSnapshot;d=d.value;try{if(!$t(f(),d))return!1}catch{return!1}}if(i=a.child,a.subtreeFlags&16384&&i!==null)i.return=a,a=i;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function On(e,a,i,o){a&=~eu,a&=~gs,e.suspendedLanes|=a,e.pingedLanes&=~a,o&&(e.warmLanes|=a),o=e.expirationTimes;for(var d=a;0<d;){var f=31-Yt(d),y=1<<f;o[f]=-1,d&=~y}i!==0&&Qh(e,i,a)}function Zl(){return(Ue&6)===0?(vr(0),!1):!0}function iu(){if(Re!==null){if(Be===0)var e=Re.return;else e=Re,Ka=os=null,wd(e),Js=null,ar=0,e=Re;for(;e!==null;)px(e.alternate,e),e=e.return;Re=null}}function ci(e,a){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,pN(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),on=0,iu(),Fe=e,Re=i=Qa(e.current,null),_e=a,Be=0,Kt=null,Tn=!1,ri=Ui(e,a),Jd=!1,li=Wt=eu=gs=Mn=tt=0,Bt=br=null,tu=!1,(a&8)!==0&&(a|=a&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=a;0<o;){var d=31-Yt(o),f=1<<d;a|=e[d],o&=~f}return ln=a,yl(),i}function Ux(e,a){ke=null,V.H=dr,a===Zs||a===El?(a=tp(),Be=3):a===cd?(a=tp(),Be=4):Be=a===Ld?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Kt=a,Re===null&&(tt=1,ql(e,ia(a,e.current)))}function Bx(){var e=Qt.current;return e===null?!0:(_e&4194048)===_e?ca===null:(_e&62914560)===_e||(_e&536870912)!==0?e===ca:!1}function qx(){var e=V.H;return V.H=dr,e===null?dr:e}function Hx(){var e=V.A;return V.A=F2,e}function Jl(){tt=4,Tn||(_e&4194048)!==_e&&Qt.current!==null||(ri=!0),(Mn&134217727)===0&&(gs&134217727)===0||Fe===null||On(Fe,_e,Wt,!1)}function ru(e,a,i){var o=Ue;Ue|=2;var d=qx(),f=Hx();(Fe!==e||_e!==a)&&(Wl=null,ci(e,a)),a=!1;var y=tt;e:do try{if(Be!==0&&Re!==null){var S=Re,R=Kt;switch(Be){case 8:iu(),y=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(a=!0);var q=Be;if(Be=0,Kt=null,di(e,S,R,q),i&&ri){y=0;break e}break;default:q=Be,Be=0,Kt=null,di(e,S,R,q)}}K2(),y=tt;break}catch(F){Ux(e,F)}while(!0);return a&&e.shellSuspendCounter++,Ka=os=null,Ue=o,V.H=d,V.A=f,Re===null&&(Fe=null,_e=0,yl()),y}function K2(){for(;Re!==null;)Gx(Re)}function W2(e,a){var i=Ue;Ue|=2;var o=qx(),d=Hx();Fe!==e||_e!==a?(Wl=null,Kl=gt()+500,ci(e,a)):ri=Ui(e,a);e:do try{if(Be!==0&&Re!==null){a=Re;var f=Kt;t:switch(Be){case 1:Be=0,Kt=null,di(e,a,f,1);break;case 2:case 9:if(Jm(f)){Be=0,Kt=null,Ix(a);break}a=function(){Be!==2&&Be!==9||Fe!==e||(Be=7),Da(e)},f.then(a,a);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Jm(f)?(Be=0,Kt=null,Ix(a)):(Be=0,Kt=null,di(e,a,f,7));break;case 5:var y=null;switch(Re.tag){case 26:y=Re.memoizedState;case 5:case 27:var S=Re;if(y?Tg(y):S.stateNode.complete){Be=0,Kt=null;var R=S.sibling;if(R!==null)Re=R;else{var q=S.return;q!==null?(Re=q,eo(q)):Re=null}break t}}Be=0,Kt=null,di(e,a,f,5);break;case 6:Be=0,Kt=null,di(e,a,f,6);break;case 8:iu(),tt=6;break e;default:throw Error(l(462))}}Z2();break}catch(F){Ux(e,F)}while(!0);return Ka=os=null,V.H=o,V.A=d,Ue=i,Re!==null?0:(Fe=null,_e=0,yl(),tt)}function Z2(){for(;Re!==null&&!ta();)Gx(Re)}function Gx(e){var a=hx(e.alternate,e,ln);e.memoizedProps=e.pendingProps,a===null?eo(e):Re=a}function Ix(e){var a=e,i=a.alternate;switch(a.tag){case 15:case 0:a=lx(i,a,a.pendingProps,a.type,void 0,_e);break;case 11:a=lx(i,a,a.pendingProps,a.type.render,a.ref,_e);break;case 5:wd(a);default:px(i,a),a=Re=Hm(a,ln),a=hx(i,a,ln)}e.memoizedProps=e.pendingProps,a===null?eo(e):Re=a}function di(e,a,i,o){Ka=os=null,wd(a),Js=null,ar=0;var d=a.return;try{if(B2(e,d,a,i,_e)){tt=1,ql(e,ia(i,e.current)),Re=null;return}}catch(f){if(d!==null)throw Re=d,f;tt=1,ql(e,ia(i,e.current)),Re=null;return}a.flags&32768?(Pe||o===1?e=!0:ri||(_e&536870912)!==0?e=!1:(Tn=e=!0,(o===2||o===9||o===3||o===6)&&(o=Qt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Yx(a,e)):eo(a)}function eo(e){var a=e;do{if((a.flags&32768)!==0){Yx(a,Tn);return}e=a.return;var i=G2(a.alternate,a,ln);if(i!==null){Re=i;return}if(a=a.sibling,a!==null){Re=a;return}Re=a=e}while(a!==null);tt===0&&(tt=5)}function Yx(e,a){do{var i=I2(e.alternate,e);if(i!==null){i.flags&=32767,Re=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!a&&(e=e.sibling,e!==null)){Re=e;return}Re=e=i}while(e!==null);tt=6,Re=null}function $x(e,a,i,o,d,f,y,S,R){e.cancelPendingCommit=null;do to();while(ut!==0);if((Ue&6)!==0)throw Error(l(327));if(a!==null){if(a===e.current)throw Error(l(177));if(f=a.lanes|a.childLanes,f|=Qc,Rw(e,i,f,y,S,R),e===Fe&&(Re=Fe=null,_e=0),oi=a,Dn=e,on=i,au=f,nu=d,zx=o,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,aN(nl,function(){return Wx(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||o){o=V.T,V.T=null,d=J.p,J.p=2,y=Ue,Ue|=4;try{Y2(e,a,i)}finally{Ue=y,J.p=d,V.T=o}}ut=1,Fx(),Qx(),Xx()}}function Fx(){if(ut===1){ut=0;var e=Dn,a=oi,i=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||i){i=V.T,V.T=null;var o=J.p;J.p=2;var d=Ue;Ue|=4;try{Ex(a,e);var f=bu,y=Om(e.containerInfo),S=f.focusedElem,R=f.selectionRange;if(y!==S&&S&&S.ownerDocument&&Dm(S.ownerDocument.documentElement,S)){if(R!==null&&Gc(S)){var q=R.start,F=R.end;if(F===void 0&&(F=q),"selectionStart"in S)S.selectionStart=q,S.selectionEnd=Math.min(F,S.value.length);else{var Z=S.ownerDocument||document,G=Z&&Z.defaultView||window;if(G.getSelection){var $=G.getSelection(),he=S.textContent.length,ye=Math.min(R.start,he),$e=R.end===void 0?ye:Math.min(R.end,he);!$.extend&&ye>$e&&(y=$e,$e=ye,ye=y);var L=Rm(S,ye),_=Rm(S,$e);if(L&&_&&($.rangeCount!==1||$.anchorNode!==L.node||$.anchorOffset!==L.offset||$.focusNode!==_.node||$.focusOffset!==_.offset)){var B=Z.createRange();B.setStart(L.node,L.offset),$.removeAllRanges(),ye>$e?($.addRange(B),$.extend(_.node,_.offset)):(B.setEnd(_.node,_.offset),$.addRange(B))}}}}for(Z=[],$=S;$=$.parentNode;)$.nodeType===1&&Z.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Z.length;S++){var X=Z[S];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}mo=!!gu,bu=gu=null}finally{Ue=d,J.p=o,V.T=i}}e.current=a,ut=2}}function Qx(){if(ut===2){ut=0;var e=Dn,a=oi,i=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||i){i=V.T,V.T=null;var o=J.p;J.p=2;var d=Ue;Ue|=4;try{Nx(e,a.alternate,a)}finally{Ue=d,J.p=o,V.T=i}}ut=3}}function Xx(){if(ut===4||ut===3){ut=0,_t();var e=Dn,a=oi,i=on,o=zx;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?ut=5:(ut=0,oi=Dn=null,Kx(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Rn=null),kc(i),a=a.stateNode,It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(Vi,a,void 0,(a.current.flags&128)===128)}catch{}if(o!==null){a=V.T,d=J.p,J.p=2,V.T=null;try{for(var f=e.onRecoverableError,y=0;y<o.length;y++){var S=o[y];f(S.value,{componentStack:S.stack})}}finally{V.T=a,J.p=d}}(on&3)!==0&&to(),Da(e),d=e.pendingLanes,(i&261930)!==0&&(d&42)!==0?e===su?yr++:(yr=0,su=e):yr=0,vr(0)}}function Kx(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,er(a)))}function to(){return Fx(),Qx(),Xx(),Wx()}function Wx(){if(ut!==5)return!1;var e=Dn,a=au;au=0;var i=kc(on),o=V.T,d=J.p;try{J.p=32>i?32:i,V.T=null,i=nu,nu=null;var f=Dn,y=on;if(ut=0,oi=Dn=null,on=0,(Ue&6)!==0)throw Error(l(331));var S=Ue;if(Ue|=4,Dx(f.current),Tx(f,f.current,y,i),Ue=S,vr(0,!1),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(Vi,f)}catch{}return!0}finally{J.p=d,V.T=o,Kx(e,a)}}function Zx(e,a,i){a=ia(i,a),a=Pd(e.stateNode,a,2),e=Sn(e,a,2),e!==null&&(Bi(e,2),Da(e))}function qe(e,a,i){if(e.tag===3)Zx(e,e,i);else for(;a!==null;){if(a.tag===3){Zx(a,e,i);break}else if(a.tag===1){var o=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Rn===null||!Rn.has(o))){e=ia(i,e),i=Jp(2),o=Sn(a,i,2),o!==null&&(ex(i,o,a,e),Bi(o,2),Da(o));break}}a=a.return}}function lu(e,a,i){var o=e.pingCache;if(o===null){o=e.pingCache=new Q2;var d=new Set;o.set(a,d)}else d=o.get(a),d===void 0&&(d=new Set,o.set(a,d));d.has(i)||(Jd=!0,d.add(i),e=J2.bind(null,e,a,i),a.then(e,e))}function J2(e,a,i){var o=e.pingCache;o!==null&&o.delete(a),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Fe===e&&(_e&i)===i&&(tt===4||tt===3&&(_e&62914560)===_e&&300>gt()-Xl?(Ue&2)===0&&ci(e,0):eu|=i,li===_e&&(li=0)),Da(e)}function Jx(e,a){a===0&&(a=Fh()),e=is(e,a),e!==null&&(Bi(e,a),Da(e))}function eN(e){var a=e.memoizedState,i=0;a!==null&&(i=a.retryLane),Jx(e,i)}function tN(e,a){var i=0;switch(e.tag){case 31:case 13:var o=e.stateNode,d=e.memoizedState;d!==null&&(i=d.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(a),Jx(e,i)}function aN(e,a){return oe(e,a)}var ao=null,ui=null,ou=!1,no=!1,cu=!1,_n=0;function Da(e){e!==ui&&e.next===null&&(ui===null?ao=ui=e:ui=ui.next=e),no=!0,ou||(ou=!0,sN())}function vr(e,a){if(!cu&&no){cu=!0;do for(var i=!1,o=ao;o!==null;){if(e!==0){var d=o.pendingLanes;if(d===0)var f=0;else{var y=o.suspendedLanes,S=o.pingedLanes;f=(1<<31-Yt(42|e)+1)-1,f&=d&~(y&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,ng(o,f))}else f=_e,f=ll(o,o===Fe?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Ui(o,f)||(i=!0,ng(o,f));o=o.next}while(i);cu=!1}}function nN(){eg()}function eg(){no=ou=!1;var e=0;_n!==0&&mN()&&(e=_n);for(var a=gt(),i=null,o=ao;o!==null;){var d=o.next,f=tg(o,a);f===0?(o.next=null,i===null?ao=d:i.next=d,d===null&&(ui=i)):(i=o,(e!==0||(f&3)!==0)&&(no=!0)),o=d}ut!==0&&ut!==5||vr(e),_n!==0&&(_n=0)}function tg(e,a){for(var i=e.suspendedLanes,o=e.pingedLanes,d=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-Yt(f),S=1<<y,R=d[y];R===-1?((S&i)===0||(S&o)!==0)&&(d[y]=Mw(S,a)):R<=a&&(e.expiredLanes|=S),f&=~S}if(a=Fe,i=_e,i=ll(e,e===a?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,i===0||e===a&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Me(o),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ui(e,i)){if(a=i&-i,a===e.callbackPriority)return a;switch(o!==null&&Me(o),kc(i)){case 2:case 8:i=Yh;break;case 32:i=nl;break;case 268435456:i=$h;break;default:i=nl}return o=ag.bind(null,e),i=oe(i,o),e.callbackPriority=a,e.callbackNode=i,a}return o!==null&&o!==null&&Me(o),e.callbackPriority=2,e.callbackNode=null,2}function ag(e,a){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(to()&&e.callbackNode!==i)return null;var o=_e;return o=ll(e,e===Fe?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Lx(e,o,a),tg(e,gt()),e.callbackNode!=null&&e.callbackNode===i?ag.bind(null,e):null)}function ng(e,a){if(to())return null;Lx(e,a,!0)}function sN(){xN(function(){(Ue&6)!==0?oe(Ih,nN):eg()})}function du(){if(_n===0){var e=Ks;e===0&&(e=sl,sl<<=1,(sl&261888)===0&&(sl=256)),_n=e}return _n}function sg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ul(""+e)}function ig(e,a){var i=a.ownerDocument.createElement("input");return i.name=a.name,i.value=a.value,e.id&&i.setAttribute("form",e.id),a.parentNode.insertBefore(i,a),e=new FormData(e),i.parentNode.removeChild(i),e}function iN(e,a,i,o,d){if(a==="submit"&&i&&i.stateNode===d){var f=sg((d[zt]||null).action),y=o.submitter;y&&(a=(a=y[zt]||null)?sg(a.formAction):y.getAttribute("formAction"),a!==null&&(f=a,y=null));var S=new pl("action","action",null,o,d);e.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(_n!==0){var R=y?ig(d,y):new FormData(d);Md(i,{pending:!0,data:R,method:d.method,action:f},null,R)}}else typeof f=="function"&&(S.preventDefault(),R=y?ig(d,y):new FormData(d),Md(i,{pending:!0,data:R,method:d.method,action:f},f,R))},currentTarget:d}]})}}for(var uu=0;uu<Fc.length;uu++){var fu=Fc[uu],rN=fu.toLowerCase(),lN=fu[0].toUpperCase()+fu.slice(1);ba(rN,"on"+lN)}ba(Pm,"onAnimationEnd"),ba(Lm,"onAnimationIteration"),ba(Vm,"onAnimationStart"),ba("dblclick","onDoubleClick"),ba("focusin","onFocus"),ba("focusout","onBlur"),ba(j2,"onTransitionRun"),ba(k2,"onTransitionStart"),ba(S2,"onTransitionCancel"),ba(Um,"onTransitionEnd"),Ps("onMouseEnter",["mouseout","mouseover"]),Ps("onMouseLeave",["mouseout","mouseover"]),Ps("onPointerEnter",["pointerout","pointerover"]),Ps("onPointerLeave",["pointerout","pointerover"]),ts("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ts("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ts("onBeforeInput",["compositionend","keypress","textInput","paste"]),ts("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ts("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ts("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wr="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(" "),oN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wr));function rg(e,a){a=(a&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],d=o.event;o=o.listeners;e:{var f=void 0;if(a)for(var y=o.length-1;0<=y;y--){var S=o[y],R=S.instance,q=S.currentTarget;if(S=S.listener,R!==f&&d.isPropagationStopped())break e;f=S,d.currentTarget=q;try{f(d)}catch(F){bl(F)}d.currentTarget=null,f=R}else for(y=0;y<o.length;y++){if(S=o[y],R=S.instance,q=S.currentTarget,S=S.listener,R!==f&&d.isPropagationStopped())break e;f=S,d.currentTarget=q;try{f(d)}catch(F){bl(F)}d.currentTarget=null,f=R}}}}function De(e,a){var i=a[Sc];i===void 0&&(i=a[Sc]=new Set);var o=e+"__bubble";i.has(o)||(lg(a,e,2,!1),i.add(o))}function hu(e,a,i){var o=0;a&&(o|=4),lg(i,e,o,a)}var so="_reactListening"+Math.random().toString(36).slice(2);function mu(e){if(!e[so]){e[so]=!0,em.forEach(function(i){i!=="selectionchange"&&(oN.has(i)||hu(i,!1,e),hu(i,!0,e))});var a=e.nodeType===9?e:e.ownerDocument;a===null||a[so]||(a[so]=!0,hu("selectionchange",!1,a))}}function lg(e,a,i,o){switch(Pg(a)){case 2:var d=PN;break;case 8:d=LN;break;default:d=Tu}i=d.bind(null,a,i,e),d=void 0,!_c||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(d=!0),o?d!==void 0?e.addEventListener(a,i,{capture:!0,passive:d}):e.addEventListener(a,i,!0):d!==void 0?e.addEventListener(a,i,{passive:d}):e.addEventListener(a,i,!1)}function pu(e,a,i,o,d){var f=o;if((a&1)===0&&(a&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var S=o.stateNode.containerInfo;if(S===d)break;if(y===4)for(y=o.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===d)return;y=y.return}for(;S!==null;){if(y=Os(S),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){o=f=y;continue e}S=S.parentNode}}o=o.return}fm(function(){var q=f,F=Dc(i),Z=[];e:{var G=Bm.get(e);if(G!==void 0){var $=pl,he=e;switch(e){case"keypress":if(hl(i)===0)break e;case"keydown":case"keyup":$=t2;break;case"focusin":he="focus",$=Vc;break;case"focusout":he="blur",$=Vc;break;case"beforeblur":case"afterblur":$=Vc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=pm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=Gw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=s2;break;case Pm:case Lm:case Vm:$=$w;break;case Um:$=r2;break;case"scroll":case"scrollend":$=qw;break;case"wheel":$=o2;break;case"copy":case"cut":case"paste":$=Qw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=gm;break;case"toggle":case"beforetoggle":$=d2}var ye=(a&4)!==0,$e=!ye&&(e==="scroll"||e==="scrollend"),L=ye?G!==null?G+"Capture":null:G;ye=[];for(var _=q,B;_!==null;){var X=_;if(B=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||B===null||L===null||(X=Gi(_,L),X!=null&&ye.push(Nr(_,X,B))),$e)break;_=_.return}0<ye.length&&(G=new $(G,he,null,i,F),Z.push({event:G,listeners:ye}))}}if((a&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",$=e==="mouseout"||e==="pointerout",G&&i!==Rc&&(he=i.relatedTarget||i.fromElement)&&(Os(he)||he[Ds]))break e;if(($||G)&&(G=F.window===F?F:(G=F.ownerDocument)?G.defaultView||G.parentWindow:window,$?(he=i.relatedTarget||i.toElement,$=q,he=he?Os(he):null,he!==null&&($e=u(he),ye=he.tag,he!==$e||ye!==5&&ye!==27&&ye!==6)&&(he=null)):($=null,he=q),$!==he)){if(ye=pm,X="onMouseLeave",L="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(ye=gm,X="onPointerLeave",L="onPointerEnter",_="pointer"),$e=$==null?G:Hi($),B=he==null?G:Hi(he),G=new ye(X,_+"leave",$,i,F),G.target=$e,G.relatedTarget=B,X=null,Os(F)===q&&(ye=new ye(L,_+"enter",he,i,F),ye.target=B,ye.relatedTarget=$e,X=ye),$e=X,$&&he)t:{for(ye=cN,L=$,_=he,B=0,X=L;X;X=ye(X))B++;X=0;for(var xe=_;xe;xe=ye(xe))X++;for(;0<B-X;)L=ye(L),B--;for(;0<X-B;)_=ye(_),X--;for(;B--;){if(L===_||_!==null&&L===_.alternate){ye=L;break t}L=ye(L),_=ye(_)}ye=null}else ye=null;$!==null&&og(Z,G,$,ye,!1),he!==null&&$e!==null&&og(Z,$e,he,ye,!0)}}e:{if(G=q?Hi(q):window,$=G.nodeName&&G.nodeName.toLowerCase(),$==="select"||$==="input"&&G.type==="file")var Le=Sm;else if(jm(G))if(Cm)Le=v2;else{Le=b2;var pe=g2}else $=G.nodeName,!$||$.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?q&&Mc(q.elementType)&&(Le=Sm):Le=y2;if(Le&&(Le=Le(e,q))){km(Z,Le,i,F);break e}pe&&pe(e,G,q),e==="focusout"&&q&&G.type==="number"&&q.memoizedProps.value!=null&&Tc(G,"number",G.value)}switch(pe=q?Hi(q):window,e){case"focusin":(jm(pe)||pe.contentEditable==="true")&&(Hs=pe,Ic=q,Wi=null);break;case"focusout":Wi=Ic=Hs=null;break;case"mousedown":Yc=!0;break;case"contextmenu":case"mouseup":case"dragend":Yc=!1,_m(Z,i,F);break;case"selectionchange":if(N2)break;case"keydown":case"keyup":_m(Z,i,F)}var Se;if(Bc)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else qs?wm(e,i)&&(ze="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ze="onCompositionStart");ze&&(bm&&i.locale!=="ko"&&(qs||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&qs&&(Se=hm()):(bn=F,zc="value"in bn?bn.value:bn.textContent,qs=!0)),pe=io(q,ze),0<pe.length&&(ze=new xm(ze,e,null,i,F),Z.push({event:ze,listeners:pe}),Se?ze.data=Se:(Se=Nm(i),Se!==null&&(ze.data=Se)))),(Se=f2?h2(e,i):m2(e,i))&&(ze=io(q,"onBeforeInput"),0<ze.length&&(pe=new xm("onBeforeInput","beforeinput",null,i,F),Z.push({event:pe,listeners:ze}),pe.data=Se)),iN(Z,e,q,i,F)}rg(Z,a)})}function Nr(e,a,i){return{instance:e,listener:a,currentTarget:i}}function io(e,a){for(var i=a+"Capture",o=[];e!==null;){var d=e,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=Gi(e,i),d!=null&&o.unshift(Nr(e,d,f)),d=Gi(e,a),d!=null&&o.push(Nr(e,d,f))),e.tag===3)return o;e=e.return}return[]}function cN(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function og(e,a,i,o,d){for(var f=a._reactName,y=[];i!==null&&i!==o;){var S=i,R=S.alternate,q=S.stateNode;if(S=S.tag,R!==null&&R===o)break;S!==5&&S!==26&&S!==27||q===null||(R=q,d?(q=Gi(i,f),q!=null&&y.unshift(Nr(i,q,R))):d||(q=Gi(i,f),q!=null&&y.push(Nr(i,q,R)))),i=i.return}y.length!==0&&e.push({event:a,listeners:y})}var dN=/\r\n?/g,uN=/\u0000|\uFFFD/g;function cg(e){return(typeof e=="string"?e:""+e).replace(dN,`
`).replace(uN,"")}function dg(e,a){return a=cg(a),cg(e)===a}function Ye(e,a,i,o,d,f){switch(i){case"children":typeof o=="string"?a==="body"||a==="textarea"&&o===""||Vs(e,o):(typeof o=="number"||typeof o=="bigint")&&a!=="body"&&Vs(e,""+o);break;case"className":cl(e,"class",o);break;case"tabIndex":cl(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":cl(e,i,o);break;case"style":dm(e,o,f);break;case"data":if(a!=="object"){cl(e,"data",o);break}case"src":case"href":if(o===""&&(a!=="a"||i!=="href")){e.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=ul(""+o),e.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(i,"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"&&(i==="formAction"?(a!=="input"&&Ye(e,a,"name",d.name,d,null),Ye(e,a,"formEncType",d.formEncType,d,null),Ye(e,a,"formMethod",d.formMethod,d,null),Ye(e,a,"formTarget",d.formTarget,d,null)):(Ye(e,a,"encType",d.encType,d,null),Ye(e,a,"method",d.method,d,null),Ye(e,a,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=ul(""+o),e.setAttribute(i,o);break;case"onClick":o!=null&&(e.onclick=$a);break;case"onScroll":o!=null&&De("scroll",e);break;case"onScrollEnd":o!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(i=o.__html,i!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=i}}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}i=ul(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+o):e.removeAttribute(i);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(i,""):e.removeAttribute(i);break;case"capture":case"download":o===!0?e.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,o):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(i,o):e.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(i):e.setAttribute(i,o);break;case"popover":De("beforetoggle",e),De("toggle",e),ol(e,"popover",o);break;case"xlinkActuate":Ya(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Ya(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Ya(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Ya(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Ya(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Ya(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Ya(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Ya(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Ya(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ol(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Uw.get(i)||i,ol(e,i,o))}}function xu(e,a,i,o,d,f){switch(i){case"style":dm(e,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(i=o.__html,i!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof o=="string"?Vs(e,o):(typeof o=="number"||typeof o=="bigint")&&Vs(e,""+o);break;case"onScroll":o!=null&&De("scroll",e);break;case"onScrollEnd":o!=null&&De("scrollend",e);break;case"onClick":o!=null&&(e.onclick=$a);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!tm.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),a=i.slice(2,d?i.length-7:void 0),f=e[zt]||null,f=f!=null?f[i]:null,typeof f=="function"&&e.removeEventListener(a,f,d),typeof o=="function")){typeof f!="function"&&f!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(a,o,d);break e}i in e?e[i]=o:o===!0?e.setAttribute(i,""):ol(e,i,o)}}}function kt(e,a,i){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var o=!1,d=!1,f;for(f in i)if(i.hasOwnProperty(f)){var y=i[f];if(y!=null)switch(f){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:Ye(e,a,f,y,i,null)}}d&&Ye(e,a,"srcSet",i.srcSet,i,null),o&&Ye(e,a,"src",i.src,i,null);return;case"input":De("invalid",e);var S=f=y=d=null,R=null,q=null;for(o in i)if(i.hasOwnProperty(o)){var F=i[o];if(F!=null)switch(o){case"name":d=F;break;case"type":y=F;break;case"checked":R=F;break;case"defaultChecked":q=F;break;case"value":f=F;break;case"defaultValue":S=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(l(137,a));break;default:Ye(e,a,o,F,i,null)}}rm(e,f,S,R,q,y,d,!1);return;case"select":De("invalid",e),o=y=f=null;for(d in i)if(i.hasOwnProperty(d)&&(S=i[d],S!=null))switch(d){case"value":f=S;break;case"defaultValue":y=S;break;case"multiple":o=S;default:Ye(e,a,d,S,i,null)}a=f,i=y,e.multiple=!!o,a!=null?Ls(e,!!o,a,!1):i!=null&&Ls(e,!!o,i,!0);return;case"textarea":De("invalid",e),f=d=o=null;for(y in i)if(i.hasOwnProperty(y)&&(S=i[y],S!=null))switch(y){case"value":o=S;break;case"defaultValue":d=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:Ye(e,a,y,S,i,null)}om(e,o,d,f);return;case"option":for(R in i)if(i.hasOwnProperty(R)&&(o=i[R],o!=null))switch(R){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Ye(e,a,R,o,i,null)}return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(o=0;o<wr.length;o++)De(wr[o],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("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(q in i)if(i.hasOwnProperty(q)&&(o=i[q],o!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:Ye(e,a,q,o,i,null)}return;default:if(Mc(a)){for(F in i)i.hasOwnProperty(F)&&(o=i[F],o!==void 0&&xu(e,a,F,o,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(o=i[S],o!=null&&Ye(e,a,S,o,i,null))}function fN(e,a,i,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,y=null,S=null,R=null,q=null,F=null;for($ in i){var Z=i[$];if(i.hasOwnProperty($)&&Z!=null)switch($){case"checked":break;case"value":break;case"defaultValue":R=Z;default:o.hasOwnProperty($)||Ye(e,a,$,null,o,Z)}}for(var G in o){var $=o[G];if(Z=i[G],o.hasOwnProperty(G)&&($!=null||Z!=null))switch(G){case"type":f=$;break;case"name":d=$;break;case"checked":q=$;break;case"defaultChecked":F=$;break;case"value":y=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(l(137,a));break;default:$!==Z&&Ye(e,a,G,$,o,Z)}}Ac(e,y,S,R,q,F,f,d);return;case"select":$=y=S=G=null;for(f in i)if(R=i[f],i.hasOwnProperty(f)&&R!=null)switch(f){case"value":break;case"multiple":$=R;default:o.hasOwnProperty(f)||Ye(e,a,f,null,o,R)}for(d in o)if(f=o[d],R=i[d],o.hasOwnProperty(d)&&(f!=null||R!=null))switch(d){case"value":G=f;break;case"defaultValue":S=f;break;case"multiple":y=f;default:f!==R&&Ye(e,a,d,f,o,R)}a=S,i=y,o=$,G!=null?Ls(e,!!i,G,!1):!!o!=!!i&&(a!=null?Ls(e,!!i,a,!0):Ls(e,!!i,i?[]:"",!1));return;case"textarea":$=G=null;for(S in i)if(d=i[S],i.hasOwnProperty(S)&&d!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ye(e,a,S,null,o,d)}for(y in o)if(d=o[y],f=i[y],o.hasOwnProperty(y)&&(d!=null||f!=null))switch(y){case"value":G=d;break;case"defaultValue":$=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==f&&Ye(e,a,y,d,o,f)}lm(e,G,$);return;case"option":for(var he in i)if(G=i[he],i.hasOwnProperty(he)&&G!=null&&!o.hasOwnProperty(he))switch(he){case"selected":e.selected=!1;break;default:Ye(e,a,he,null,o,G)}for(R in o)if(G=o[R],$=i[R],o.hasOwnProperty(R)&&G!==$&&(G!=null||$!=null))switch(R){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Ye(e,a,R,G,o,$)}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 i)G=i[ye],i.hasOwnProperty(ye)&&G!=null&&!o.hasOwnProperty(ye)&&Ye(e,a,ye,null,o,G);for(q in o)if(G=o[q],$=i[q],o.hasOwnProperty(q)&&G!==$&&(G!=null||$!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(l(137,a));break;default:Ye(e,a,q,G,o,$)}return;default:if(Mc(a)){for(var $e in i)G=i[$e],i.hasOwnProperty($e)&&G!==void 0&&!o.hasOwnProperty($e)&&xu(e,a,$e,void 0,o,G);for(F in o)G=o[F],$=i[F],!o.hasOwnProperty(F)||G===$||G===void 0&&$===void 0||xu(e,a,F,G,o,$);return}}for(var L in i)G=i[L],i.hasOwnProperty(L)&&G!=null&&!o.hasOwnProperty(L)&&Ye(e,a,L,null,o,G);for(Z in o)G=o[Z],$=i[Z],!o.hasOwnProperty(Z)||G===$||G==null&&$==null||Ye(e,a,Z,G,o,$)}function ug(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hN(){if(typeof performance.getEntriesByType=="function"){for(var e=0,a=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var d=i[o],f=d.transferSize,y=d.initiatorType,S=d.duration;if(f&&S&&ug(y)){for(y=0,S=d.responseEnd,o+=1;o<i.length;o++){var R=i[o],q=R.startTime;if(q>S)break;var F=R.transferSize,Z=R.initiatorType;F&&ug(Z)&&(R=R.responseEnd,y+=F*(R<S?1:(S-q)/(R-q)))}if(--o,a+=8*(f+y)/(d.duration/1e3),e++,10<e)break}}if(0<e)return a/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var gu=null,bu=null;function ro(e){return e.nodeType===9?e:e.ownerDocument}function fg(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 hg(e,a){if(e===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&a==="foreignObject"?0:e}function yu(e,a){return e==="textarea"||e==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var vu=null;function mN(){var e=window.event;return e&&e.type==="popstate"?e===vu?!1:(vu=e,!0):(vu=null,!1)}var mg=typeof setTimeout=="function"?setTimeout:void 0,pN=typeof clearTimeout=="function"?clearTimeout:void 0,pg=typeof Promise=="function"?Promise:void 0,xN=typeof queueMicrotask=="function"?queueMicrotask:typeof pg<"u"?function(e){return pg.resolve(null).then(e).catch(gN)}:mg;function gN(e){setTimeout(function(){throw e})}function zn(e){return e==="head"}function xg(e,a){var i=a,o=0;do{var d=i.nextSibling;if(e.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(o===0){e.removeChild(d),pi(a);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")jr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,jr(i);for(var f=i.firstChild;f;){var y=f.nextSibling,S=f.nodeName;f[qi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=y}}else i==="body"&&jr(e.ownerDocument.body);i=d}while(i);pi(a)}function gg(e,a){var i=e;e=0;do{var o=i.nextSibling;if(i.nodeType===1?a?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(a?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=o}while(i)}function wu(e){var a=e.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var i=a;switch(a=a.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":wu(i),Cc(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function bN(e,a,i,o){for(;e.nodeType===1;){var d=i;if(e.nodeName.toLowerCase()!==a.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[qi])switch(a){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!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(a==="input"&&e.type==="hidden"){var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=da(e.nextSibling),e===null)break}return null}function yN(e,a,i){if(a==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=da(e.nextSibling),e===null))return null;return e}function bg(e,a){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=da(e.nextSibling),e===null))return null;return e}function Nu(e){return e.data==="$?"||e.data==="$~"}function ju(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function vN(e,a){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=a;else if(e.data!=="$?"||i.readyState!=="loading")a();else{var o=function(){a(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function da(e){for(;e!=null;e=e.nextSibling){var a=e.nodeType;if(a===1||a===3)break;if(a===8){if(a=e.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return e}var ku=null;function yg(e){e=e.nextSibling;for(var a=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(a===0)return da(e.nextSibling);a--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||a++}e=e.nextSibling}return null}function vg(e){e=e.previousSibling;for(var a=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(a===0)return e;a--}else i!=="/$"&&i!=="/&"||a++}e=e.previousSibling}return null}function wg(e,a,i){switch(a=ro(i),e){case"html":if(e=a.documentElement,!e)throw Error(l(452));return e;case"head":if(e=a.head,!e)throw Error(l(453));return e;case"body":if(e=a.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function jr(e){for(var a=e.attributes;a.length;)e.removeAttributeNode(a[0]);Cc(e)}var ua=new Map,Ng=new Set;function lo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=J.d;J.d={f:wN,r:NN,D:jN,C:kN,L:SN,m:CN,X:AN,S:EN,M:TN};function wN(){var e=cn.f(),a=Zl();return e||a}function NN(e){var a=_s(e);a!==null&&a.tag===5&&a.type==="form"?Up(a):cn.r(e)}var fi=typeof document>"u"?null:document;function jg(e,a,i){var o=fi;if(o&&typeof a=="string"&&a){var d=na(a);d='link[rel="'+e+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),Ng.has(d)||(Ng.add(d),e={rel:e,crossOrigin:i,href:a},o.querySelector(d)===null&&(a=o.createElement("link"),kt(a,"link",e),bt(a),o.head.appendChild(a)))}}function jN(e){cn.D(e),jg("dns-prefetch",e,null)}function kN(e,a){cn.C(e,a),jg("preconnect",e,a)}function SN(e,a,i){cn.L(e,a,i);var o=fi;if(o&&e&&a){var d='link[rel="preload"][as="'+na(a)+'"]';a==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+na(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+na(i.imageSizes)+'"]')):d+='[href="'+na(e)+'"]';var f=d;switch(a){case"style":f=hi(e);break;case"script":f=mi(e)}ua.has(f)||(e=b({rel:"preload",href:a==="image"&&i&&i.imageSrcSet?void 0:e,as:a},i),ua.set(f,e),o.querySelector(d)!==null||a==="style"&&o.querySelector(kr(f))||a==="script"&&o.querySelector(Sr(f))||(a=o.createElement("link"),kt(a,"link",e),bt(a),o.head.appendChild(a)))}}function CN(e,a){cn.m(e,a);var i=fi;if(i&&e){var o=a&&typeof a.as=="string"?a.as:"script",d='link[rel="modulepreload"][as="'+na(o)+'"][href="'+na(e)+'"]',f=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=mi(e)}if(!ua.has(f)&&(e=b({rel:"modulepreload",href:e},a),ua.set(f,e),i.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Sr(f)))return}o=i.createElement("link"),kt(o,"link",e),bt(o),i.head.appendChild(o)}}}function EN(e,a,i){cn.S(e,a,i);var o=fi;if(o&&e){var d=zs(o).hoistableStyles,f=hi(e);a=a||"default";var y=d.get(f);if(!y){var S={loading:0,preload:null};if(y=o.querySelector(kr(f)))S.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":a},i),(i=ua.get(f))&&Su(e,i);var R=y=o.createElement("link");bt(R),kt(R,"link",e),R._p=new Promise(function(q,F){R.onload=q,R.onerror=F}),R.addEventListener("load",function(){S.loading|=1}),R.addEventListener("error",function(){S.loading|=2}),S.loading|=4,oo(y,a,o)}y={type:"stylesheet",instance:y,count:1,state:S},d.set(f,y)}}}function AN(e,a){cn.X(e,a);var i=fi;if(i&&e){var o=zs(i).hoistableScripts,d=mi(e),f=o.get(d);f||(f=i.querySelector(Sr(d)),f||(e=b({src:e,async:!0},a),(a=ua.get(d))&&Cu(e,a),f=i.createElement("script"),bt(f),kt(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}}function TN(e,a){cn.M(e,a);var i=fi;if(i&&e){var o=zs(i).hoistableScripts,d=mi(e),f=o.get(d);f||(f=i.querySelector(Sr(d)),f||(e=b({src:e,async:!0,type:"module"},a),(a=ua.get(d))&&Cu(e,a),f=i.createElement("script"),bt(f),kt(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}}function kg(e,a,i,o){var d=(d=ce.current)?lo(d):null;if(!d)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(a=hi(i.href),i=zs(d).hoistableStyles,o=i.get(a),o||(o={type:"style",instance:null,count:0,state:null},i.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=hi(i.href);var f=zs(d).hoistableStyles,y=f.get(e);if(y||(d=d.ownerDocument||d,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=d.querySelector(kr(e)))&&!f._p&&(y.instance=f,y.state.loading=5),ua.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},ua.set(e,i),f||MN(d,e,i,y.state))),a&&o===null)throw Error(l(528,""));return y}if(a&&o!==null)throw Error(l(529,""));return null;case"script":return a=i.async,i=i.src,typeof i=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=mi(i),i=zs(d).hoistableScripts,o=i.get(a),o||(o={type:"script",instance:null,count:0,state:null},i.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function hi(e){return'href="'+na(e)+'"'}function kr(e){return'link[rel="stylesheet"]['+e+"]"}function Sg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function MN(e,a,i,o){e.querySelector('link[rel="preload"][as="style"]['+a+"]")?o.loading=1:(a=e.createElement("link"),o.preload=a,a.addEventListener("load",function(){return o.loading|=1}),a.addEventListener("error",function(){return o.loading|=2}),kt(a,"link",i),bt(a),e.head.appendChild(a))}function mi(e){return'[src="'+na(e)+'"]'}function Sr(e){return"script[async]"+e}function Cg(e,a,i){if(a.count++,a.instance===null)switch(a.type){case"style":var o=e.querySelector('style[data-href~="'+na(i.href)+'"]');if(o)return a.instance=o,bt(o),o;var d=b({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),bt(o),kt(o,"style",d),oo(o,i.precedence,e),a.instance=o;case"stylesheet":d=hi(i.href);var f=e.querySelector(kr(d));if(f)return a.state.loading|=4,a.instance=f,bt(f),f;o=Sg(i),(d=ua.get(d))&&Su(o,d),f=(e.ownerDocument||e).createElement("link"),bt(f);var y=f;return y._p=new Promise(function(S,R){y.onload=S,y.onerror=R}),kt(f,"link",o),a.state.loading|=4,oo(f,i.precedence,e),a.instance=f;case"script":return f=mi(i.src),(d=e.querySelector(Sr(f)))?(a.instance=d,bt(d),d):(o=i,(d=ua.get(f))&&(o=b({},i),Cu(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),bt(d),kt(d,"link",o),e.head.appendChild(d),a.instance=d);case"void":return null;default:throw Error(l(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(o=a.instance,a.state.loading|=4,oo(o,i.precedence,e));return a.instance}function oo(e,a,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,f=d,y=0;y<o.length;y++){var S=o[y];if(S.dataset.precedence===a)f=S;else if(f!==d)break}f?f.parentNode.insertBefore(e,f.nextSibling):(a=i.nodeType===9?i.head:i,a.insertBefore(e,a.firstChild))}function Su(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.title==null&&(e.title=a.title)}function Cu(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.integrity==null&&(e.integrity=a.integrity)}var co=null;function Eg(e,a,i){if(co===null){var o=new Map,d=co=new Map;d.set(i,o)}else d=co,o=d.get(i),o||(o=new Map,d.set(i,o));if(o.has(e))return o;for(o.set(e,null),i=i.getElementsByTagName(e),d=0;d<i.length;d++){var f=i[d];if(!(f[qi]||f[vt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(a)||"";y=e+y;var S=o.get(y);S?S.push(f):o.set(y,[f])}}return o}function Ag(e,a,i){e=e.ownerDocument||e,e.head.insertBefore(i,a==="title"?e.querySelector("head > title"):null)}function RN(e,a,i){if(i===1||a.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return e=a.disabled,typeof a.precedence=="string"&&e==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Tg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function DN(e,a,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=hi(o.href),f=a.querySelector(kr(d));if(f){a=f._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(e.count++,e=uo.bind(e),a.then(e,e)),i.state.loading|=4,i.instance=f,bt(f);return}f=a.ownerDocument||a,o=Sg(o),(d=ua.get(d))&&Su(o,d),f=f.createElement("link"),bt(f);var y=f;y._p=new Promise(function(S,R){y.onload=S,y.onerror=R}),kt(f,"link",o),i.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,a),(a=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=uo.bind(e),a.addEventListener("load",i),a.addEventListener("error",i))}}var Eu=0;function ON(e,a){return e.stylesheets&&e.count===0&&ho(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var o=setTimeout(function(){if(e.stylesheets&&ho(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+a);0<e.imgBytes&&Eu===0&&(Eu=62500*hN());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ho(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Eu?50:800)+a);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ho(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fo=null;function ho(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fo=new Map,a.forEach(_N,e),fo=null,uo.call(e))}function _N(e,a){if(!(a.state.loading&4)){var i=fo.get(e);if(i)var o=i.get(null);else{i=new Map,fo.set(e,i);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var y=d[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(i.set(y.dataset.precedence,y),o=y)}o&&i.set(null,o)}d=a.instance,y=d.getAttribute("data-precedence"),f=i.get(y)||o,f===o&&i.set(null,d),i.set(y,d),this.count++,o=uo.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),f?f.parentNode.insertBefore(d,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),a.state.loading|=4}}var Cr={$$typeof:C,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function zN(e,a,i,o,d,f,y,S,R){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=Nc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nc(0),this.hiddenUpdates=Nc(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Mg(e,a,i,o,d,f,y,S,R,q,F,Z){return e=new zN(e,a,i,y,R,q,F,Z,S),a=1,f===!0&&(a|=24),f=Ft(3,null,null,a),e.current=f,f.stateNode=e,a=rd(),a.refCount++,e.pooledCache=a,a.refCount++,f.memoizedState={element:o,isDehydrated:i,cache:a},dd(f),e}function Rg(e){return e?(e=Ys,e):Ys}function Dg(e,a,i,o,d,f){d=Rg(d),o.context===null?o.context=d:o.pendingContext=d,o=kn(a),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=Sn(e,o,a),i!==null&&(qt(i,e,a),sr(i,e,a))}function Og(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<a?i:a}}function Au(e,a){Og(e,a),(e=e.alternate)&&Og(e,a)}function _g(e){if(e.tag===13||e.tag===31){var a=is(e,67108864);a!==null&&qt(a,e,67108864),Au(e,67108864)}}function zg(e){if(e.tag===13||e.tag===31){var a=Zt();a=jc(a);var i=is(e,a);i!==null&&qt(i,e,a),Au(e,a)}}var mo=!0;function PN(e,a,i,o){var d=V.T;V.T=null;var f=J.p;try{J.p=2,Tu(e,a,i,o)}finally{J.p=f,V.T=d}}function LN(e,a,i,o){var d=V.T;V.T=null;var f=J.p;try{J.p=8,Tu(e,a,i,o)}finally{J.p=f,V.T=d}}function Tu(e,a,i,o){if(mo){var d=Mu(o);if(d===null)pu(e,a,o,po,i),Lg(e,o);else if(UN(d,e,a,i,o))o.stopPropagation();else if(Lg(e,o),a&4&&-1<VN.indexOf(e)){for(;d!==null;){var f=_s(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=es(f.pendingLanes);if(y!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var R=1<<31-Yt(y);S.entanglements[1]|=R,y&=~R}Da(f),(Ue&6)===0&&(Kl=gt()+500,vr(0))}}break;case 31:case 13:S=is(f,2),S!==null&&qt(S,f,2),Zl(),Au(f,2)}if(f=Mu(o),f===null&&pu(e,a,o,po,i),f===d)break;d=f}d!==null&&o.stopPropagation()}else pu(e,a,o,null,i)}}function Mu(e){return e=Dc(e),Ru(e)}var po=null;function Ru(e){if(po=null,e=Os(e),e!==null){var a=u(e);if(a===null)e=null;else{var i=a.tag;if(i===13){if(e=h(a),e!==null)return e;e=null}else if(i===31){if(e=g(a),e!==null)return e;e=null}else if(i===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;e=null}else a!==e&&(e=null)}}return po=e,null}function Pg(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(jw()){case Ih:return 2;case Yh:return 8;case nl:case kw:return 32;case $h:return 268435456;default:return 32}default:return 32}}var Du=!1,Pn=null,Ln=null,Vn=null,Er=new Map,Ar=new Map,Un=[],VN="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 Lg(e,a){switch(e){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":Ln=null;break;case"mouseover":case"mouseout":Vn=null;break;case"pointerover":case"pointerout":Er.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ar.delete(a.pointerId)}}function Tr(e,a,i,o,d,f){return e===null||e.nativeEvent!==f?(e={blockedOn:a,domEventName:i,eventSystemFlags:o,nativeEvent:f,targetContainers:[d]},a!==null&&(a=_s(a),a!==null&&_g(a)),e):(e.eventSystemFlags|=o,a=e.targetContainers,d!==null&&a.indexOf(d)===-1&&a.push(d),e)}function UN(e,a,i,o,d){switch(a){case"focusin":return Pn=Tr(Pn,e,a,i,o,d),!0;case"dragenter":return Ln=Tr(Ln,e,a,i,o,d),!0;case"mouseover":return Vn=Tr(Vn,e,a,i,o,d),!0;case"pointerover":var f=d.pointerId;return Er.set(f,Tr(Er.get(f)||null,e,a,i,o,d)),!0;case"gotpointercapture":return f=d.pointerId,Ar.set(f,Tr(Ar.get(f)||null,e,a,i,o,d)),!0}return!1}function Vg(e){var a=Os(e.target);if(a!==null){var i=u(a);if(i!==null){if(a=i.tag,a===13){if(a=h(i),a!==null){e.blockedOn=a,Zh(e.priority,function(){zg(i)});return}}else if(a===31){if(a=g(i),a!==null){e.blockedOn=a,Zh(e.priority,function(){zg(i)});return}}else if(a===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xo(e){if(e.blockedOn!==null)return!1;for(var a=e.targetContainers;0<a.length;){var i=Mu(e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);Rc=o,i.target.dispatchEvent(o),Rc=null}else return a=_s(i),a!==null&&_g(a),e.blockedOn=i,!1;a.shift()}return!0}function Ug(e,a,i){xo(e)&&i.delete(a)}function BN(){Du=!1,Pn!==null&&xo(Pn)&&(Pn=null),Ln!==null&&xo(Ln)&&(Ln=null),Vn!==null&&xo(Vn)&&(Vn=null),Er.forEach(Ug),Ar.forEach(Ug)}function go(e,a){e.blockedOn===a&&(e.blockedOn=null,Du||(Du=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,BN)))}var bo=null;function Bg(e){bo!==e&&(bo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){bo===e&&(bo=null);for(var a=0;a<e.length;a+=3){var i=e[a],o=e[a+1],d=e[a+2];if(typeof o!="function"){if(Ru(o||i)===null)continue;break}var f=_s(i);f!==null&&(e.splice(a,3),a-=3,Md(f,{pending:!0,data:d,method:i.method,action:o},o,d))}}))}function pi(e){function a(R){return go(R,e)}Pn!==null&&go(Pn,e),Ln!==null&&go(Ln,e),Vn!==null&&go(Vn,e),Er.forEach(a),Ar.forEach(a);for(var i=0;i<Un.length;i++){var o=Un[i];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Un.length&&(i=Un[0],i.blockedOn===null);)Vg(i),i.blockedOn===null&&Un.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var d=i[o],f=i[o+1],y=d[zt]||null;if(typeof f=="function")y||Bg(i);else if(y){var S=null;if(f&&f.hasAttribute("formAction")){if(d=f,y=f[zt]||null)S=y.formAction;else if(Ru(d)!==null)continue}else S=y.action;typeof S=="function"?i[o+1]=S:(i.splice(o,3),o-=3),Bg(i)}}}function qg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return d=y})},focusReset:"manual",scroll:"manual"})}function a(){d!==null&&(d(),d=null),o||setTimeout(i,20)}function i(){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,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),d!==null&&(d(),d=null)}}}function Ou(e){this._internalRoot=e}yo.prototype.render=Ou.prototype.render=function(e){var a=this._internalRoot;if(a===null)throw Error(l(409));var i=a.current,o=Zt();Dg(i,o,e,a,null,null)},yo.prototype.unmount=Ou.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var a=e.containerInfo;Dg(e.current,2,null,e,null,null),Zl(),a[Ds]=null}};function yo(e){this._internalRoot=e}yo.prototype.unstable_scheduleHydration=function(e){if(e){var a=Wh();e={blockedOn:null,target:e,priority:a};for(var i=0;i<Un.length&&a!==0&&a<Un[i].priority;i++);Un.splice(i,0,e),i===0&&Vg(e)}};var Hg=n.version;if(Hg!=="19.2.6")throw Error(l(527,Hg,"19.2.6"));J.findDOMNode=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=m(a),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var qN={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vo.isDisabled&&vo.supportsFiber)try{Vi=vo.inject(qN),It=vo}catch{}}return Rr.createRoot=function(e,a){if(!c(e))throw Error(l(299));var i=!1,o="",d=Xp,f=Kp,y=Wp;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(y=a.onRecoverableError)),a=Mg(e,1,!1,null,null,i,o,null,d,f,y,qg),e[Ds]=a.current,mu(e),new Ou(a)},Rr.hydrateRoot=function(e,a,i){if(!c(e))throw Error(l(299));var o=!1,d="",f=Xp,y=Kp,S=Wp,R=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(R=i.formState)),a=Mg(e,1,!0,a,i??null,o,d,R,f,y,S,qg),a.context=Rg(null),i=a.current,o=Zt(),o=jc(o),d=kn(o),d.callback=null,Sn(i,d,o),i=o,a.current.lanes=i,Bi(a,i),Da(a),e[Ds]=a.current,mu(e),new yo(a)},Rr.version="19.2.6",Rr}var Zg;function ZN(){if(Zg)return Pu.exports;Zg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Pu.exports=WN(),Pu.exports}var JN=ZN();/**
 * react-router v7.15.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var Jg="popstate";function e0(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function ej(t={}){function n(l,c){var m;let u=(m=c.state)==null?void 0:m.masked,{pathname:h,search:g,hash:p}=u||l.location;return uf("",{pathname:h,search:g,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default",u?{pathname:l.location.pathname,search:l.location.search,hash:l.location.hash}:void 0)}function r(l,c){return typeof c=="string"?c:Hr(c)}return aj(n,r,null,t)}function Je(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function Ea(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function tj(){return Math.random().toString(36).substring(2,10)}function t0(t,n){return{usr:t.state,key:t.key,idx:n,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function uf(t,n,r=null,l,c){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof n=="string"?Ti(n):n,state:r,key:n&&n.key||l||tj(),mask:c}}function Hr({pathname:t="/",search:n="",hash:r=""}){return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ti(t){let n={};if(t){let r=t.indexOf("#");r>=0&&(n.hash=t.substring(r),t=t.substring(0,r));let l=t.indexOf("?");l>=0&&(n.search=t.substring(l),t=t.substring(0,l)),t&&(n.pathname=t)}return n}function aj(t,n,r,l={}){let{window:c=document.defaultView,v5Compat:u=!1}=l,h=c.history,g="POP",p=null,m=x();m==null&&(m=0,h.replaceState({...h.state,idx:m},""));function x(){return(h.state||{idx:null}).idx}function b(){g="POP";let A=x(),E=A==null?null:A-m;m=A,p&&p({action:g,location:N.location,delta:E})}function v(A,E){g="PUSH";let D=e0(A)?A:uf(N.location,A,E);m=x()+1;let C=t0(D,m),O=N.createHref(D.mask||D);try{h.pushState(C,"",O)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;c.location.assign(O)}u&&p&&p({action:g,location:N.location,delta:1})}function w(A,E){g="REPLACE";let D=e0(A)?A:uf(N.location,A,E);m=x();let C=t0(D,m),O=N.createHref(D.mask||D);h.replaceState(C,"",O),u&&p&&p({action:g,location:N.location,delta:0})}function j(A){return nj(A)}let N={get action(){return g},get location(){return t(c,h)},listen(A){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(Jg,b),p=A,()=>{c.removeEventListener(Jg,b),p=null}},createHref(A){return n(c,A)},createURL:j,encodeLocation(A){let E=j(A);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:v,replace:w,go(A){return h.go(A)}};return N}function nj(t,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Je(r,"No window.location.(origin|href) available to create URL");let l=typeof t=="string"?t:Hr(t);return l=l.replace(/ $/,"%20"),!n&&l.startsWith("//")&&(l=r+l),new URL(l,r)}function ly(t,n,r="/"){return sj(t,n,r,!1)}function sj(t,n,r,l,c){let u=typeof n=="string"?Ti(n):n,h=hn(u.pathname||"/",r);if(h==null)return null;let g=ij(t),p=null,m=gj(h);for(let x=0;p==null&&x<g.length;++x)p=pj(g[x],m,l);return p}function ij(t){let n=oy(t);return rj(n),n}function oy(t,n=[],r=[],l="",c=!1){let u=(h,g,p=c,m)=>{let x={relativePath:m===void 0?h.path||"":m,caseSensitive:h.caseSensitive===!0,childrenIndex:g,route:h};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(l)&&p)return;Je(x.relativePath.startsWith(l),`Absolute route path "${x.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(l.length)}let b=ka([l,x.relativePath]),v=r.concat(x);h.children&&h.children.length>0&&(Je(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),oy(h.children,n,v,b,p)),!(h.path==null&&!h.index)&&n.push({path:b,score:hj(b,h.index),routesMeta:v})};return t.forEach((h,g)=>{var p;if(h.path===""||!((p=h.path)!=null&&p.includes("?")))u(h,g);else for(let m of cy(h.path))u(h,g,!0,m)}),n}function cy(t){let n=t.split("/");if(n.length===0)return[];let[r,...l]=n,c=r.endsWith("?"),u=r.replace(/\?$/,"");if(l.length===0)return c?[u,""]:[u];let h=cy(l.join("/")),g=[];return g.push(...h.map(p=>p===""?u:[u,p].join("/"))),c&&g.push(...h),g.map(p=>t.startsWith("/")&&p===""?"/":p)}function rj(t){t.sort((n,r)=>n.score!==r.score?r.score-n.score:mj(n.routesMeta.map(l=>l.childrenIndex),r.routesMeta.map(l=>l.childrenIndex)))}var lj=/^:[\w-]+$/,oj=3,cj=2,dj=1,uj=10,fj=-2,a0=t=>t==="*";function hj(t,n){let r=t.split("/"),l=r.length;return r.some(a0)&&(l+=fj),n&&(l+=cj),r.filter(c=>!a0(c)).reduce((c,u)=>c+(lj.test(u)?oj:u===""?dj:uj),l)}function mj(t,n){return t.length===n.length&&t.slice(0,-1).every((l,c)=>l===n[c])?t[t.length-1]-n[n.length-1]:0}function pj(t,n,r=!1){let{routesMeta:l}=t,c={},u="/",h=[];for(let g=0;g<l.length;++g){let p=l[g],m=g===l.length-1,x=u==="/"?n:n.slice(u.length)||"/",b=Uo({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},x),v=p.route;if(!b&&m&&r&&!l[l.length-1].route.index&&(b=Uo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},x)),!b)return null;Object.assign(c,b.params),h.push({params:c,pathname:ka([u,b.pathname]),pathnameBase:wj(ka([u,b.pathnameBase])),route:v}),b.pathnameBase!=="/"&&(u=ka([u,b.pathnameBase]))}return h}function Uo(t,n){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,l]=xj(t.path,t.caseSensitive,t.end),c=n.match(r);if(!c)return null;let u=c[0],h=u.replace(/(.)\/+$/,"$1"),g=c.slice(1);return{params:l.reduce((m,{paramName:x,isOptional:b},v)=>{if(x==="*"){let j=g[v]||"";h=u.slice(0,u.length-j.length).replace(/(.)\/+$/,"$1")}const w=g[v];return b&&!w?m[x]=void 0:m[x]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:h,pattern:t}}function xj(t,n=!1,r=!0){Ea(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let l=[],c="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,g,p,m,x)=>{if(l.push({paramName:g,isOptional:p!=null}),p){let b=x.charAt(m+h.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(l.push({paramName:"*"}),c+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":t!==""&&t!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,n?void 0:"i"),l]}function gj(t){try{return t.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Ea(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),t}}function hn(t,n){if(n==="/")return t;if(!t.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,l=t.charAt(r);return l&&l!=="/"?null:t.slice(r)||"/"}var bj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function yj(t,n="/"){let{pathname:r,search:l="",hash:c=""}=typeof t=="string"?Ti(t):t,u;return r?(r=uy(r),r.startsWith("/")?u=n0(r.substring(1),"/"):u=n0(r,n)):u=n,{pathname:u,search:Nj(l),hash:jj(c)}}function n0(t,n){let r=Bo(n).split("/");return t.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function Bu(t,n,r,l){return`Cannot include a '${t}' character in a manually specified \`to.${n}\` field [${JSON.stringify(l)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vj(t){return t.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function dy(t){let n=vj(t);return n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase)}function Xf(t,n,r,l=!1){let c;typeof t=="string"?c=Ti(t):(c={...t},Je(!c.pathname||!c.pathname.includes("?"),Bu("?","pathname","search",c)),Je(!c.pathname||!c.pathname.includes("#"),Bu("#","pathname","hash",c)),Je(!c.search||!c.search.includes("#"),Bu("#","search","hash",c)));let u=t===""||c.pathname==="",h=u?"/":c.pathname,g;if(h==null)g=r;else{let b=n.length-1;if(!l&&h.startsWith("..")){let v=h.split("/");for(;v[0]==="..";)v.shift(),b-=1;c.pathname=v.join("/")}g=b>=0?n[b]:"/"}let p=yj(c,g),m=h&&h!=="/"&&h.endsWith("/"),x=(u||h===".")&&r.endsWith("/");return!p.pathname.endsWith("/")&&(m||x)&&(p.pathname+="/"),p}var uy=t=>t.replace(/\/\/+/g,"/"),ka=t=>uy(t.join("/")),Bo=t=>t.replace(/\/+$/,""),wj=t=>Bo(t).replace(/^\/*/,"/"),Nj=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,jj=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,kj=class{constructor(t,n,r,l=!1){this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Sj(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Cj(t){let n=t.map(r=>r.route.path).filter(Boolean);return ka(n)||"/"}var fy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function hy(t,n){let r=t;if(typeof r!="string"||!bj.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let l=r,c=!1;if(fy)try{let u=new URL(window.location.href),h=r.startsWith("//")?new URL(u.protocol+r):new URL(r),g=hn(h.pathname,n);h.origin===u.origin&&g!=null?r=g+h.search+h.hash:c=!0}catch{Ea(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:c,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var my=["POST","PUT","PATCH","DELETE"];new Set(my);var Ej=["GET",...my];new Set(Ej);var Mi=k.createContext(null);Mi.displayName="DataRouter";var ic=k.createContext(null);ic.displayName="DataRouterState";var py=k.createContext(!1);function Aj(){return k.useContext(py)}var xy=k.createContext({isTransitioning:!1});xy.displayName="ViewTransition";var Tj=k.createContext(new Map);Tj.displayName="Fetchers";var Mj=k.createContext(null);Mj.displayName="Await";var pa=k.createContext(null);pa.displayName="Navigation";var Xr=k.createContext(null);Xr.displayName="Location";var pn=k.createContext({outlet:null,matches:[],isDataRoute:!1});pn.displayName="Route";var Kf=k.createContext(null);Kf.displayName="RouteError";var gy="REACT_ROUTER_ERROR",Rj="REDIRECT",Dj="ROUTE_ERROR_RESPONSE";function Oj(t){if(t.startsWith(`${gy}:${Rj}:{`))try{let n=JSON.parse(t.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function _j(t){if(t.startsWith(`${gy}:${Dj}:{`))try{let n=JSON.parse(t.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new kj(n.status,n.statusText,n.data)}catch{}}function zj(t,{relative:n}={}){Je(Kr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:l}=k.useContext(pa),{hash:c,pathname:u,search:h}=Wr(t,{relative:n}),g=u;return r!=="/"&&(g=u==="/"?r:ka([r,u])),l.createHref({pathname:g,search:h,hash:c})}function Kr(){return k.useContext(Xr)!=null}function ea(){return Je(Kr(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Xr).location}var by="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function yy(t){k.useContext(pa).static||k.useLayoutEffect(t)}function Ri(){let{isDataRoute:t}=k.useContext(pn);return t?Qj():Pj()}function Pj(){Je(Kr(),"useNavigate() may be used only in the context of a <Router> component.");let t=k.useContext(Mi),{basename:n,navigator:r}=k.useContext(pa),{matches:l}=k.useContext(pn),{pathname:c}=ea(),u=JSON.stringify(dy(l)),h=k.useRef(!1);return yy(()=>{h.current=!0}),k.useCallback((p,m={})=>{if(Ea(h.current,by),!h.current)return;if(typeof p=="number"){r.go(p);return}let x=Xf(p,JSON.parse(u),c,m.relative==="path");t==null&&n!=="/"&&(x.pathname=x.pathname==="/"?n:ka([n,x.pathname])),(m.replace?r.replace:r.push)(x,m.state,m)},[n,r,u,c,t])}k.createContext(null);function Wr(t,{relative:n}={}){let{matches:r}=k.useContext(pn),{pathname:l}=ea(),c=JSON.stringify(dy(r));return k.useMemo(()=>Xf(t,JSON.parse(c),l,n==="path"),[t,c,l,n])}function Lj(t,n){return vy(t,n)}function vy(t,n,r){var A;Je(Kr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=k.useContext(pa),{matches:c}=k.useContext(pn),u=c[c.length-1],h=u?u.params:{},g=u?u.pathname:"/",p=u?u.pathnameBase:"/",m=u&&u.route;{let E=m&&m.path||"";Ny(g,!m||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let x=ea(),b;if(n){let E=typeof n=="string"?Ti(n):n;Je(p==="/"||((A=E.pathname)==null?void 0:A.startsWith(p)),`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 "${p}" but pathname "${E.pathname}" was given in the \`location\` prop.`),b=E}else b=x;let v=b.pathname||"/",w=v;if(p!=="/"){let E=p.replace(/^\//,"").split("/");w="/"+v.replace(/^\//,"").split("/").slice(E.length).join("/")}let j=r&&r.state.matches.length?r.state.matches.map(E=>Object.assign(E,{route:r.manifest[E.route.id]||E.route})):ly(t,{pathname:w});Ea(m||j!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Ea(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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 N=Hj(j&&j.map(E=>Object.assign({},E,{params:Object.assign({},h,E.params),pathname:ka([p,l.encodeLocation?l.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?p:ka([p,l.encodeLocation?l.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),c,r);return n&&N?k.createElement(Xr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...b},navigationType:"POP"}},N):N}function Vj(){let t=Fj(),n=Sj(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,l="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:l},u={padding:"2px 4px",backgroundColor:l},h=null;return console.error("Error handled by React Router default ErrorBoundary:",t),h=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:u},"ErrorBoundary")," or"," ",k.createElement("code",{style:u},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},n),r?k.createElement("pre",{style:c},r):null,h)}var Uj=k.createElement(Vj,null),wy=class extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){this.props.onError?this.props.onError(t,n):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=_j(t.digest);r&&(t=r)}let n=t!==void 0?k.createElement(pn.Provider,{value:this.props.routeContext},k.createElement(Kf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?k.createElement(Bj,{error:t},n):n}};wy.contextType=py;var qu=new WeakMap;function Bj({children:t,error:n}){let{basename:r}=k.useContext(pa);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let l=Oj(n.digest);if(l){let c=qu.get(n);if(c)throw c;let u=hy(l.location,r);if(fy&&!qu.get(n))if(u.isExternal||l.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:l.replace}));throw qu.set(n,h),h}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return t}function qj({routeContext:t,match:n,children:r}){let l=k.useContext(Mi);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(pn.Provider,{value:t},r)}function Hj(t,n=[],r){let l=r==null?void 0:r.state;if(t==null){if(!l)return null;if(l.errors)t=l.matches;else if(n.length===0&&!l.initialized&&l.matches.length>0)t=l.matches;else return null}let c=t,u=l==null?void 0:l.errors;if(u!=null){let x=c.findIndex(b=>b.route.id&&(u==null?void 0:u[b.route.id])!==void 0);Je(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),c=c.slice(0,Math.min(c.length,x+1))}let h=!1,g=-1;if(r&&l){h=l.renderFallback;for(let x=0;x<c.length;x++){let b=c[x];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(g=x),b.route.id){let{loaderData:v,errors:w}=l,j=b.route.loader&&!v.hasOwnProperty(b.route.id)&&(!w||w[b.route.id]===void 0);if(b.route.lazy||j){r.isStatic&&(h=!0),g>=0?c=c.slice(0,g+1):c=[c[0]];break}}}}let p=r==null?void 0:r.onError,m=l&&p?(x,b)=>{var v,w;p(x,{location:l.location,params:((w=(v=l.matches)==null?void 0:v[0])==null?void 0:w.params)??{},pattern:Cj(l.matches),errorInfo:b})}:void 0;return c.reduceRight((x,b,v)=>{let w,j=!1,N=null,A=null;l&&(w=u&&b.route.id?u[b.route.id]:void 0,N=b.route.errorElement||Uj,h&&(g<0&&v===0?(Ny("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,A=null):g===v&&(j=!0,A=b.route.hydrateFallbackElement||null)));let E=n.concat(c.slice(0,v+1)),D=()=>{let C;return w?C=N:j?C=A:b.route.Component?C=k.createElement(b.route.Component,null):b.route.element?C=b.route.element:C=x,k.createElement(qj,{match:b,routeContext:{outlet:x,matches:E,isDataRoute:l!=null},children:C})};return l&&(b.route.ErrorBoundary||b.route.errorElement||v===0)?k.createElement(wy,{location:l.location,revalidation:l.revalidation,component:N,error:w,children:D(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:m}):D()},null)}function Wf(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gj(t){let n=k.useContext(Mi);return Je(n,Wf(t)),n}function Ij(t){let n=k.useContext(ic);return Je(n,Wf(t)),n}function Yj(t){let n=k.useContext(pn);return Je(n,Wf(t)),n}function Zf(t){let n=Yj(t),r=n.matches[n.matches.length-1];return Je(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function $j(){return Zf("useRouteId")}function Fj(){var l;let t=k.useContext(Kf),n=Ij("useRouteError"),r=Zf("useRouteError");return t!==void 0?t:(l=n.errors)==null?void 0:l[r]}function Qj(){let{router:t}=Gj("useNavigate"),n=Zf("useNavigate"),r=k.useRef(!1);return yy(()=>{r.current=!0}),k.useCallback(async(c,u={})=>{Ea(r.current,by),r.current&&(typeof c=="number"?await t.navigate(c):await t.navigate(c,{fromRouteId:n,...u}))},[t,n])}var s0={};function Ny(t,n,r){!n&&!s0[t]&&(s0[t]=!0,Ea(!1,r))}k.memo(Xj);function Xj({routes:t,manifest:n,future:r,state:l,isStatic:c,onError:u}){return vy(t,void 0,{manifest:n,state:l,isStatic:c,onError:u})}function Na(t){Je(!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 Kj({basename:t="/",children:n=null,location:r,navigationType:l="POP",navigator:c,static:u=!1,useTransitions:h}){Je(!Kr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let g=t.replace(/^\/*/,"/"),p=k.useMemo(()=>({basename:g,navigator:c,static:u,useTransitions:h,future:{}}),[g,c,u,h]);typeof r=="string"&&(r=Ti(r));let{pathname:m="/",search:x="",hash:b="",state:v=null,key:w="default",mask:j}=r,N=k.useMemo(()=>{let A=hn(m,g);return A==null?null:{location:{pathname:A,search:x,hash:b,state:v,key:w,mask:j},navigationType:l}},[g,m,x,b,v,w,l,j]);return Ea(N!=null,`<Router basename="${g}"> is not able to match the URL "${m}${x}${b}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:k.createElement(pa.Provider,{value:p},k.createElement(Xr.Provider,{children:n,value:N}))}function Wj({children:t,location:n}){return Lj(ff(t),n)}function ff(t,n=[]){let r=[];return k.Children.forEach(t,(l,c)=>{if(!k.isValidElement(l))return;let u=[...n,c];if(l.type===k.Fragment){r.push.apply(r,ff(l.props.children,u));return}Je(l.type===Na,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Je(!l.props.index||!l.props.children,"An index route cannot have child routes.");let h={id:l.props.id||u.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(h.children=ff(l.props.children,u)),r.push(h)}),r}var To="get",Mo="application/x-www-form-urlencoded";function rc(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Zj(t){return rc(t)&&t.tagName.toLowerCase()==="button"}function Jj(t){return rc(t)&&t.tagName.toLowerCase()==="form"}function ek(t){return rc(t)&&t.tagName.toLowerCase()==="input"}function tk(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function ak(t,n){return t.button===0&&(!n||n==="_self")&&!tk(t)}function hf(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((n,r)=>{let l=t[r];return n.concat(Array.isArray(l)?l.map(c=>[r,c]):[[r,l]])},[]))}function nk(t,n){let r=hf(t);return n&&n.forEach((l,c)=>{r.has(c)||n.getAll(c).forEach(u=>{r.append(c,u)})}),r}var wo=null;function sk(){if(wo===null)try{new FormData(document.createElement("form"),0),wo=!1}catch{wo=!0}return wo}var ik=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Hu(t){return t!=null&&!ik.has(t)?(Ea(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mo}"`),null):t}function rk(t,n){let r,l,c,u,h;if(Jj(t)){let g=t.getAttribute("action");l=g?hn(g,n):null,r=t.getAttribute("method")||To,c=Hu(t.getAttribute("enctype"))||Mo,u=new FormData(t)}else if(Zj(t)||ek(t)&&(t.type==="submit"||t.type==="image")){let g=t.form;if(g==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=t.getAttribute("formaction")||g.getAttribute("action");if(l=p?hn(p,n):null,r=t.getAttribute("formmethod")||g.getAttribute("method")||To,c=Hu(t.getAttribute("formenctype"))||Hu(g.getAttribute("enctype"))||Mo,u=new FormData(g,t),!sk()){let{name:m,type:x,value:b}=t;if(x==="image"){let v=m?`${m}.`:"";u.append(`${v}x`,"0"),u.append(`${v}y`,"0")}else m&&u.append(m,b)}}else{if(rc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=To,l=null,c=Mo,h=t}return u&&c==="text/plain"&&(h=u,u=void 0),{action:l,method:r.toLowerCase(),encType:c,formData:u,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jf(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function jy(t,n,r,l){let c=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${l}`:c.pathname=`${c.pathname}.${l}`:c.pathname==="/"?c.pathname=`_root.${l}`:n&&hn(c.pathname,n)==="/"?c.pathname=`${Bo(n)}/_root.${l}`:c.pathname=`${Bo(c.pathname)}.${l}`,c}async function lk(t,n){if(t.id in n)return n[t.id];try{let r=await import(t.module);return n[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ok(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function ck(t,n,r){let l=await Promise.all(t.map(async c=>{let u=n.routes[c.route.id];if(u){let h=await lk(u,r);return h.links?h.links():[]}return[]}));return hk(l.flat(1).filter(ok).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function i0(t,n,r,l,c,u){let h=(p,m)=>r[m]?p.route.id!==r[m].route.id:!0,g=(p,m)=>{var x;return r[m].pathname!==p.pathname||((x=r[m].route.path)==null?void 0:x.endsWith("*"))&&r[m].params["*"]!==p.params["*"]};return u==="assets"?n.filter((p,m)=>h(p,m)||g(p,m)):u==="data"?n.filter((p,m)=>{var b;let x=l.routes[p.route.id];if(!x||!x.hasLoader)return!1;if(h(p,m)||g(p,m))return!0;if(p.route.shouldRevalidate){let v=p.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:((b=r[0])==null?void 0:b.params)||{},nextUrl:new URL(t,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function dk(t,n,{includeHydrateFallback:r}={}){return uk(t.map(l=>{let c=n.routes[l.route.id];if(!c)return[];let u=[c.module];return c.clientActionModule&&(u=u.concat(c.clientActionModule)),c.clientLoaderModule&&(u=u.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(u=u.concat(c.hydrateFallbackModule)),c.imports&&(u=u.concat(c.imports)),u}).flat(1))}function uk(t){return[...new Set(t)]}function fk(t){let n={},r=Object.keys(t).sort();for(let l of r)n[l]=t[l];return n}function hk(t,n){let r=new Set;return new Set(n),t.reduce((l,c)=>{let u=JSON.stringify(fk(c));return r.has(u)||(r.add(u),l.push({key:u,link:c})),l},[])}function eh(){let t=k.useContext(Mi);return Jf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function mk(){let t=k.useContext(ic);return Jf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var th=k.createContext(void 0);th.displayName="FrameworkContext";function ah(){let t=k.useContext(th);return Jf(t,"You must render this element inside a <HydratedRouter> element"),t}function pk(t,n){let r=k.useContext(th),[l,c]=k.useState(!1),[u,h]=k.useState(!1),{onFocus:g,onBlur:p,onMouseEnter:m,onMouseLeave:x,onTouchStart:b}=n,v=k.useRef(null);k.useEffect(()=>{if(t==="render"&&h(!0),t==="viewport"){let N=E=>{E.forEach(D=>{h(D.isIntersecting)})},A=new IntersectionObserver(N,{threshold:.5});return v.current&&A.observe(v.current),()=>{A.disconnect()}}},[t]),k.useEffect(()=>{if(l){let N=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(N)}}},[l]);let w=()=>{c(!0)},j=()=>{c(!1),h(!1)};return r?t!=="intent"?[u,v,{}]:[u,v,{onFocus:Dr(g,w),onBlur:Dr(p,j),onMouseEnter:Dr(m,w),onMouseLeave:Dr(x,j),onTouchStart:Dr(b,w)}]:[!1,v,{}]}function Dr(t,n){return r=>{t&&t(r),r.defaultPrevented||n(r)}}function xk({page:t,...n}){let r=Aj(),{router:l}=eh(),c=k.useMemo(()=>ly(l.routes,t,l.basename),[l.routes,t,l.basename]);return c?r?k.createElement(bk,{page:t,matches:c,...n}):k.createElement(yk,{page:t,matches:c,...n}):null}function gk(t){let{manifest:n,routeModules:r}=ah(),[l,c]=k.useState([]);return k.useEffect(()=>{let u=!1;return ck(t,n,r).then(h=>{u||c(h)}),()=>{u=!0}},[t,n,r]),l}function bk({page:t,matches:n,...r}){let l=ea(),{future:c}=ah(),{basename:u}=eh(),h=k.useMemo(()=>{if(t===l.pathname+l.search+l.hash)return[];let g=jy(t,u,c.unstable_trailingSlashAwareDataRequests,"rsc"),p=!1,m=[];for(let x of n)typeof x.route.shouldRevalidate=="function"?p=!0:m.push(x.route.id);return p&&m.length>0&&g.searchParams.set("_routes",m.join(",")),[g.pathname+g.search]},[u,c.unstable_trailingSlashAwareDataRequests,t,l,n]);return k.createElement(k.Fragment,null,h.map(g=>k.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})))}function yk({page:t,matches:n,...r}){let l=ea(),{future:c,manifest:u,routeModules:h}=ah(),{basename:g}=eh(),{loaderData:p,matches:m}=mk(),x=k.useMemo(()=>i0(t,n,m,u,l,"data"),[t,n,m,u,l]),b=k.useMemo(()=>i0(t,n,m,u,l,"assets"),[t,n,m,u,l]),v=k.useMemo(()=>{if(t===l.pathname+l.search+l.hash)return[];let N=new Set,A=!1;if(n.forEach(D=>{var O;let C=u.routes[D.route.id];!C||!C.hasLoader||(!x.some(Q=>Q.route.id===D.route.id)&&D.route.id in p&&((O=h[D.route.id])!=null&&O.shouldRevalidate)||C.hasClientLoader?A=!0:N.add(D.route.id))}),N.size===0)return[];let E=jy(t,g,c.unstable_trailingSlashAwareDataRequests,"data");return A&&N.size>0&&E.searchParams.set("_routes",n.filter(D=>N.has(D.route.id)).map(D=>D.route.id).join(",")),[E.pathname+E.search]},[g,c.unstable_trailingSlashAwareDataRequests,p,l,u,x,n,t,h]),w=k.useMemo(()=>dk(b,u),[b,u]),j=gk(b);return k.createElement(k.Fragment,null,v.map(N=>k.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...r})),w.map(N=>k.createElement("link",{key:N,rel:"modulepreload",href:N,...r})),j.map(({key:N,link:A})=>k.createElement("link",{key:N,nonce:r.nonce,...A,crossOrigin:A.crossOrigin??r.crossOrigin})))}function vk(...t){return n=>{t.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var wk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wk&&(window.__reactRouterVersion="7.15.1")}catch{}function Nk({basename:t,children:n,useTransitions:r,window:l}){let c=k.useRef();c.current==null&&(c.current=ej({window:l,v5Compat:!0}));let u=c.current,[h,g]=k.useState({action:u.action,location:u.location}),p=k.useCallback(m=>{r===!1?g(m):k.startTransition(()=>g(m))},[r]);return k.useLayoutEffect(()=>u.listen(p),[u,p]),k.createElement(Kj,{basename:t,children:n,location:h.location,navigationType:h.action,navigator:u,useTransitions:r})}var ky=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,In=k.forwardRef(function({onClick:n,discover:r="render",prefetch:l="none",relative:c,reloadDocument:u,replace:h,mask:g,state:p,target:m,to:x,preventScrollReset:b,viewTransition:v,defaultShouldRevalidate:w,...j},N){let{basename:A,navigator:E,useTransitions:D}=k.useContext(pa),C=typeof x=="string"&&ky.test(x),O=hy(x,A);x=O.to;let Q=zj(x,{relative:c}),z=ea(),I=null;if(g){let te=Xf(g,[],z.mask?z.mask.pathname:"/",!0);A!=="/"&&(te.pathname=te.pathname==="/"?A:ka([A,te.pathname])),I=E.createHref(te)}let[P,ee,W]=pk(l,j),le=Ck(x,{replace:h,mask:g,state:p,target:m,preventScrollReset:b,relative:c,viewTransition:v,defaultShouldRevalidate:w,useTransitions:D});function de(te){n&&n(te),te.defaultPrevented||le(te)}let ge=!(O.isExternal||u),be=k.createElement("a",{...j,...W,href:(ge?I:void 0)||O.absoluteURL||Q,onClick:ge?de:n,ref:vk(N,ee),target:m,"data-discover":!C&&r==="render"?"true":void 0});return P&&!C?k.createElement(k.Fragment,null,be,k.createElement(xk,{page:Q})):be});In.displayName="Link";var jk=k.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:l="",end:c=!1,style:u,to:h,viewTransition:g,children:p,...m},x){let b=Wr(h,{relative:m.relative}),v=ea(),w=k.useContext(ic),{navigator:j,basename:N}=k.useContext(pa),A=w!=null&&Dk(b)&&g===!0,E=j.encodeLocation?j.encodeLocation(b).pathname:b.pathname,D=v.pathname,C=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;r||(D=D.toLowerCase(),C=C?C.toLowerCase():null,E=E.toLowerCase()),C&&N&&(C=hn(C,N)||C);const O=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let Q=D===E||!c&&D.startsWith(E)&&D.charAt(O)==="/",z=C!=null&&(C===E||!c&&C.startsWith(E)&&C.charAt(E.length)==="/"),I={isActive:Q,isPending:z,isTransitioning:A},P=Q?n:void 0,ee;typeof l=="function"?ee=l(I):ee=[l,Q?"active":null,z?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let W=typeof u=="function"?u(I):u;return k.createElement(In,{...m,"aria-current":P,className:ee,ref:x,style:W,to:h,viewTransition:g},typeof p=="function"?p(I):p)});jk.displayName="NavLink";var kk=k.forwardRef(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:l,replace:c,state:u,method:h=To,action:g,onSubmit:p,relative:m,preventScrollReset:x,viewTransition:b,defaultShouldRevalidate:v,...w},j)=>{let{useTransitions:N}=k.useContext(pa),A=Mk(),E=Rk(g,{relative:m}),D=h.toLowerCase()==="get"?"get":"post",C=typeof g=="string"&&ky.test(g),O=Q=>{if(p&&p(Q),Q.defaultPrevented)return;Q.preventDefault();let z=Q.nativeEvent.submitter,I=(z==null?void 0:z.getAttribute("formmethod"))||h,P=()=>A(z||Q.currentTarget,{fetcherKey:n,method:I,navigate:r,replace:c,state:u,relative:m,preventScrollReset:x,viewTransition:b,defaultShouldRevalidate:v});N&&r!==!1?k.startTransition(()=>P()):P()};return k.createElement("form",{ref:j,method:D,action:E,onSubmit:l?p:O,...w,"data-discover":!C&&t==="render"?"true":void 0})});kk.displayName="Form";function Sk(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sy(t){let n=k.useContext(Mi);return Je(n,Sk(t)),n}function Ck(t,{target:n,replace:r,mask:l,state:c,preventScrollReset:u,relative:h,viewTransition:g,defaultShouldRevalidate:p,useTransitions:m}={}){let x=Ri(),b=ea(),v=Wr(t,{relative:h});return k.useCallback(w=>{if(ak(w,n)){w.preventDefault();let j=r!==void 0?r:Hr(b)===Hr(v),N=()=>x(t,{replace:j,mask:l,state:c,preventScrollReset:u,relative:h,viewTransition:g,defaultShouldRevalidate:p});m?k.startTransition(()=>N()):N()}},[b,x,v,r,l,c,n,t,u,h,g,p,m])}function Ek(t){Ea(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=k.useRef(hf(t)),r=k.useRef(!1),l=ea(),c=k.useMemo(()=>nk(l.search,r.current?null:n.current),[l.search]),u=Ri(),h=k.useCallback((g,p)=>{const m=hf(typeof g=="function"?g(new URLSearchParams(c)):g);r.current=!0,u("?"+m,p)},[u,c]);return[c,h]}var Ak=0,Tk=()=>`__${String(++Ak)}__`;function Mk(){let{router:t}=Sy("useSubmit"),{basename:n}=k.useContext(pa),r=$j(),l=t.fetch,c=t.navigate;return k.useCallback(async(u,h={})=>{let{action:g,method:p,encType:m,formData:x,body:b}=rk(u,n);if(h.navigate===!1){let v=h.fetcherKey||Tk();await l(v,r,h.action||g,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:x,body:b,formMethod:h.method||p,formEncType:h.encType||m,flushSync:h.flushSync})}else await c(h.action||g,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:x,body:b,formMethod:h.method||p,formEncType:h.encType||m,replace:h.replace,state:h.state,fromRouteId:r,flushSync:h.flushSync,viewTransition:h.viewTransition})},[l,c,n,r])}function Rk(t,{relative:n}={}){let{basename:r}=k.useContext(pa),l=k.useContext(pn);Je(l,"useFormAction must be used inside a RouteContext");let[c]=l.matches.slice(-1),u={...Wr(t||".",{relative:n})},h=ea();if(t==null){u.search=h.search;let g=new URLSearchParams(u.search),p=g.getAll("index");if(p.some(x=>x==="")){g.delete("index"),p.filter(b=>b).forEach(b=>g.append("index",b));let x=g.toString();u.search=x?`?${x}`:""}}return(!t||t===".")&&c.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:ka([r,u.pathname])),Hr(u)}function Dk(t,{relative:n}={}){let r=k.useContext(xy);Je(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=Sy("useViewTransitionState"),c=Wr(t,{relative:n});if(!r.isTransitioning)return!1;let u=hn(r.currentLocation.pathname,l)||r.currentLocation.pathname,h=hn(r.nextLocation.pathname,l)||r.nextLocation.pathname;return Uo(c.pathname,h)!=null||Uo(c.pathname,u)!=null}/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ok=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_k=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,l)=>l?l.toUpperCase():r.toLowerCase()),r0=t=>{const n=_k(t);return n.charAt(0).toUpperCase()+n.slice(1)},Cy=(...t)=>t.filter((n,r,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===r).join(" ").trim(),zk=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var Pk={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"};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lk=k.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:c="",children:u,iconNode:h,...g},p)=>k.createElement("svg",{ref:p,...Pk,width:n,height:n,stroke:t,strokeWidth:l?Number(r)*24/Number(n):r,className:Cy("lucide",c),...!u&&!zk(g)&&{"aria-hidden":"true"},...g},[...h.map(([m,x])=>k.createElement(m,x)),...Array.isArray(u)?u:[u]]));/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const re=(t,n)=>{const r=k.forwardRef(({className:l,...c},u)=>k.createElement(Lk,{ref:u,iconNode:n,className:Cy(`lucide-${Ok(r0(t))}`,`lucide-${t}`,l),...c}));return r.displayName=r0(t),r};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vk=[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]],Uk=re("accessibility",Vk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bk=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],nh=re("arrow-down",Bk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qk=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],Hk=re("arrow-left-right",qk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gk=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ik=re("arrow-left",Gk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],mn=re("arrow-right",Yk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $k=[["path",{d:"M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5",key:"1u7htd"}],["path",{d:"M15 12h.01",key:"1k8ypt"}],["path",{d:"M19.38 6.813A9 9 0 0 1 20.8 10.2a2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1",key:"11xh7x"}],["path",{d:"M9 12h.01",key:"157uk2"}]],Fk=re("baby",$k);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qk=[["path",{d:"M17 11h1a3 3 0 0 1 0 6h-1",key:"1yp76v"}],["path",{d:"M9 12v6",key:"1u1cab"}],["path",{d:"M13 12v6",key:"1sugkk"}],["path",{d:"M14 7.5c-1 0-1.44.5-3 .5s-2-.5-3-.5-1.72.5-2.5.5a2.5 2.5 0 0 1 0-5c.78 0 1.57.5 2.5.5S9.44 2 11 2s2 1.5 3 1.5 1.72-.5 2.5-.5a2.5 2.5 0 0 1 0 5c-.78 0-1.5-.5-2.5-.5Z",key:"1510fo"}],["path",{d:"M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"19jb7n"}]],l0=re("beer",Qk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xk=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]],Ey=re("calendar-check",Xk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kk=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Wk=re("calendar-days",Kk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zk=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],lc=re("calendar",Zk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jk=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Ay=re("camera",Jk);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const e5=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],t5=re("car",e5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a5=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Lr=re("chart-column",a5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n5=[["path",{d:"M17 21a1 1 0 0 0 1-1v-5.35c0-.457.316-.844.727-1.041a4 4 0 0 0-2.134-7.589 5 5 0 0 0-9.186 0 4 4 0 0 0-2.134 7.588c.411.198.727.585.727 1.041V20a1 1 0 0 0 1 1Z",key:"1qvrer"}],["path",{d:"M6 17h12",key:"1jwigz"}]],s5=re("chef-hat",n5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const i5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],r5=re("chevron-right",i5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const l5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ty=re("circle-alert",l5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const o5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Dt=re("circle-check",o5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const c5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],d5=re("circle-plus",c5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const u5=[["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"}]],o0=re("circle-x",u5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const f5=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gr=re("clock",f5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const h5=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],sh=re("copy",h5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m5=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],fn=re("credit-card",m5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p5=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],mf=re("dollar-sign",p5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const x5=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ih=re("download",x5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const g5=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],b5=re("ellipsis-vertical",g5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const y5=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Si=re("external-link",y5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v5=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],w5=re("eye-off",v5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N5=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],My=re("eye",N5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j5=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],k5=re("facebook",j5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const S5=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],rh=re("funnel",S5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const C5=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],Ci=re("gift",C5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const E5=[["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"}]],A5=re("heart",E5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],oc=re("image",T5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ry=re("info",M5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const R5=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],qo=re("instagram",R5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D5=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],Dy=re("landmark",D5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O5=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],_5=re("link",O5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z5=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Oy=re("list-checks",z5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P5=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],L5=re("lock-keyhole",P5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V5=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],c0=re("lock",V5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U5=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ho=re("log-out",U5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B5=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],cc=re("mail",B5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q5=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],pf=re("map-pin",q5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H5=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],G5=re("map-pinned",H5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I5=[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M12 11v11",key:"ur9y6a"}],["path",{d:"m19 3-7 8-7-8Z",key:"1sgpiw"}]],_y=re("martini",I5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y5=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],zy=re("megaphone",Y5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $5=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Py=re("menu",$5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F5=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Va=re("message-circle",F5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q5=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],X5=re("music",Q5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K5=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],W5=re("navigation",K5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z5=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],Go=re("pen-line",Z5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J5=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Es=re("phone",J5);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const e4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],dc=re("plus",e4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t4=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Ba=re("qr-code",t4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a4=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],n4=re("refresh-ccw",a4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const s4=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Zr=re("refresh-cw",s4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const i4=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],uc=re("save",i4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const r4=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]],l4=re("scan-line",r4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const o4=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$n=re("search",o4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const c4=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],d0=re("send",c4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const d4=[["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"}]],u4=re("settings",d4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const f4=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],h4=re("share-2",f4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m4=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Fn=re("shield-check",m4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p4=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],x4=re("shield",p4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const g4=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],fc=re("shopping-bag",g4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b4=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],y4=re("smartphone",b4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v4=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ly=re("sparkles",v4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const w4=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],lh=re("star",w4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N4=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],qa=re("ticket",N4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j4=[["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"}]],As=re("trash-2",j4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const k4=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Io=re("trending-up",k4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const S4=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],C4=re("triangle-alert",S4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const E4=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],xf=re("upload",E4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A4=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],u0=re("user-check",A4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T4=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Vy=re("user",T4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M4=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Di=re("users",M4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const R4=[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],D4=re("utensils",R4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O4=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],oh=re("wallet",O4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _4=[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M12 15v7",key:"t2xh3l"}],["path",{d:"M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z",key:"10ffi3"}]],z4=re("wine",_4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P4=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],f0=re("wrench",P4);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ha=re("x",L4);function Uy(t){var n,r,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var c=t.length;for(n=0;n<c;n++)t[n]&&(r=Uy(t[n]))&&(l&&(l+=" "),l+=r)}else for(r in t)t[r]&&(l&&(l+=" "),l+=r);return l}function V4(){for(var t,n,r=0,l="",c=arguments.length;r<c;r++)(t=arguments[r])&&(n=Uy(t))&&(l&&(l+=" "),l+=n);return l}const U4=(t,n)=>{const r=new Array(t.length+n.length);for(let l=0;l<t.length;l++)r[l]=t[l];for(let l=0;l<n.length;l++)r[t.length+l]=n[l];return r},B4=(t,n)=>({classGroupId:t,validator:n}),By=(t=new Map,n=null,r)=>({nextPart:t,validators:n,classGroupId:r}),Yo="-",h0=[],q4="arbitrary..",H4=t=>{const n=I4(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=t;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return G4(h);const g=h.split(Yo),p=g[0]===""&&g.length>1?1:0;return qy(g,p,n)},getConflictingClassGroupIds:(h,g)=>{if(g){const p=l[h],m=r[h];return p?m?U4(m,p):p:m||h0}return r[h]||h0}}},qy=(t,n,r)=>{if(t.length-n===0)return r.classGroupId;const c=t[n],u=r.nextPart.get(c);if(u){const m=qy(t,n+1,u);if(m)return m}const h=r.validators;if(h===null)return;const g=n===0?t.join(Yo):t.slice(n).join(Yo),p=h.length;for(let m=0;m<p;m++){const x=h[m];if(x.validator(g))return x.classGroupId}},G4=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),r=n.indexOf(":"),l=n.slice(0,r);return l?q4+l:void 0})(),I4=t=>{const{theme:n,classGroups:r}=t;return Y4(r,n)},Y4=(t,n)=>{const r=By();for(const l in t){const c=t[l];ch(c,r,l,n)}return r},ch=(t,n,r,l)=>{const c=t.length;for(let u=0;u<c;u++){const h=t[u];$4(h,n,r,l)}},$4=(t,n,r,l)=>{if(typeof t=="string"){F4(t,n,r);return}if(typeof t=="function"){Q4(t,n,r,l);return}X4(t,n,r,l)},F4=(t,n,r)=>{const l=t===""?n:Hy(n,t);l.classGroupId=r},Q4=(t,n,r,l)=>{if(K4(t)){ch(t(l),n,r,l);return}n.validators===null&&(n.validators=[]),n.validators.push(B4(r,t))},X4=(t,n,r,l)=>{const c=Object.entries(t),u=c.length;for(let h=0;h<u;h++){const[g,p]=c[h];ch(p,Hy(n,g),r,l)}},Hy=(t,n)=>{let r=t;const l=n.split(Yo),c=l.length;for(let u=0;u<c;u++){const h=l[u];let g=r.nextPart.get(h);g||(g=By(),r.nextPart.set(h,g)),r=g}return r},K4=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,W4=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),l=Object.create(null);const c=(u,h)=>{r[u]=h,n++,n>t&&(n=0,l=r,r=Object.create(null))};return{get(u){let h=r[u];if(h!==void 0)return h;if((h=l[u])!==void 0)return c(u,h),h},set(u,h){u in r?r[u]=h:c(u,h)}}},gf="!",m0=":",Z4=[],p0=(t,n,r,l,c)=>({modifiers:t,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:l,isExternal:c}),J4=t=>{const{prefix:n,experimentalParseClassName:r}=t;let l=c=>{const u=[];let h=0,g=0,p=0,m;const x=c.length;for(let N=0;N<x;N++){const A=c[N];if(h===0&&g===0){if(A===m0){u.push(c.slice(p,N)),p=N+1;continue}if(A==="/"){m=N;continue}}A==="["?h++:A==="]"?h--:A==="("?g++:A===")"&&g--}const b=u.length===0?c:c.slice(p);let v=b,w=!1;b.endsWith(gf)?(v=b.slice(0,-1),w=!0):b.startsWith(gf)&&(v=b.slice(1),w=!0);const j=m&&m>p?m-p:void 0;return p0(u,w,v,j)};if(n){const c=n+m0,u=l;l=h=>h.startsWith(c)?u(h.slice(c.length)):p0(Z4,!1,h,void 0,!0)}if(r){const c=l;l=u=>r({className:u,parseClassName:c})}return l},eS=t=>{const n=new Map;return t.orderSensitiveModifiers.forEach((r,l)=>{n.set(r,1e6+l)}),r=>{const l=[];let c=[];for(let u=0;u<r.length;u++){const h=r[u],g=h[0]==="[",p=n.has(h);g||p?(c.length>0&&(c.sort(),l.push(...c),c=[]),l.push(h)):c.push(h)}return c.length>0&&(c.sort(),l.push(...c)),l}},tS=t=>({cache:W4(t.cacheSize),parseClassName:J4(t),sortModifiers:eS(t),postfixLookupClassGroupIds:aS(t),...H4(t)}),aS=t=>{const n=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let l=0;l<r.length;l++)n[r[l]]=!0;return n},nS=/\s+/,sS=(t,n)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:c,sortModifiers:u,postfixLookupClassGroupIds:h}=n,g=[],p=t.trim().split(nS);let m="";for(let x=p.length-1;x>=0;x-=1){const b=p[x],{isExternal:v,modifiers:w,hasImportantModifier:j,baseClassName:N,maybePostfixModifierPosition:A}=r(b);if(v){m=b+(m.length>0?" "+m:m);continue}let E=!!A,D;if(E){const I=N.substring(0,A);D=l(I);const P=D&&h[D]?l(N):void 0;P&&P!==D&&(D=P,E=!1)}else D=l(N);if(!D){if(!E){m=b+(m.length>0?" "+m:m);continue}if(D=l(N),!D){m=b+(m.length>0?" "+m:m);continue}E=!1}const C=w.length===0?"":w.length===1?w[0]:u(w).join(":"),O=j?C+gf:C,Q=O+D;if(g.indexOf(Q)>-1)continue;g.push(Q);const z=c(D,E);for(let I=0;I<z.length;++I){const P=z[I];g.push(O+P)}m=b+(m.length>0?" "+m:m)}return m},iS=(...t)=>{let n=0,r,l,c="";for(;n<t.length;)(r=t[n++])&&(l=Gy(r))&&(c&&(c+=" "),c+=l);return c},Gy=t=>{if(typeof t=="string")return t;let n,r="";for(let l=0;l<t.length;l++)t[l]&&(n=Gy(t[l]))&&(r&&(r+=" "),r+=n);return r},rS=(t,...n)=>{let r,l,c,u;const h=p=>{const m=n.reduce((x,b)=>b(x),t());return r=tS(m),l=r.cache.get,c=r.cache.set,u=g,g(p)},g=p=>{const m=l(p);if(m)return m;const x=sS(p,r);return c(p,x),x};return u=h,(...p)=>u(iS(...p))},lS=[],ft=t=>{const n=r=>r[t]||lS;return n.isThemeGetter=!0,n},Iy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dS=/\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$/,uS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qn=t=>oS.test(t),Ae=t=>!!t&&!Number.isNaN(Number(t)),Oa=t=>!!t&&Number.isInteger(Number(t)),Gu=t=>t.endsWith("%")&&Ae(t.slice(0,-1)),dn=t=>cS.test(t),$y=()=>!0,mS=t=>dS.test(t)&&!uS.test(t),dh=()=>!1,pS=t=>fS.test(t),xS=t=>hS.test(t),gS=t=>!ue(t)&&!fe(t),bS=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),yS=t=>Zn(t,Xy,dh),ue=t=>Iy.test(t),bs=t=>Zn(t,Ky,mS),x0=t=>Zn(t,ES,Ae),vS=t=>Zn(t,Zy,$y),wS=t=>Zn(t,Wy,dh),g0=t=>Zn(t,Fy,dh),NS=t=>Zn(t,Qy,xS),No=t=>Zn(t,Jy,pS),fe=t=>Yy.test(t),Or=t=>Ms(t,Ky),jS=t=>Ms(t,Wy),b0=t=>Ms(t,Fy),kS=t=>Ms(t,Xy),SS=t=>Ms(t,Qy),jo=t=>Ms(t,Jy,!0),CS=t=>Ms(t,Zy,!0),Zn=(t,n,r)=>{const l=Iy.exec(t);return l?l[1]?n(l[1]):r(l[2]):!1},Ms=(t,n,r=!1)=>{const l=Yy.exec(t);return l?l[1]?n(l[1]):r:!1},Fy=t=>t==="position"||t==="percentage",Qy=t=>t==="image"||t==="url",Xy=t=>t==="length"||t==="size"||t==="bg-size",Ky=t=>t==="length",ES=t=>t==="number",Wy=t=>t==="family-name",Zy=t=>t==="number"||t==="weight",Jy=t=>t==="shadow",AS=()=>{const t=ft("color"),n=ft("font"),r=ft("text"),l=ft("font-weight"),c=ft("tracking"),u=ft("leading"),h=ft("breakpoint"),g=ft("container"),p=ft("spacing"),m=ft("radius"),x=ft("shadow"),b=ft("inset-shadow"),v=ft("text-shadow"),w=ft("drop-shadow"),j=ft("blur"),N=ft("perspective"),A=ft("aspect"),E=ft("ease"),D=ft("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...O(),fe,ue],z=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],P=()=>[fe,ue,p],ee=()=>[qn,"full","auto",...P()],W=()=>[Oa,"none","subgrid",fe,ue],le=()=>["auto",{span:["full",Oa,fe,ue]},Oa,fe,ue],de=()=>[Oa,"auto",fe,ue],ge=()=>["auto","min","max","fr",fe,ue],be=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...P()],J=()=>[qn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],ae=()=>[qn,"screen","full","dvw","lvw","svw","min","max","fit",...P()],H=()=>[qn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],M=()=>[t,fe,ue],T=()=>[...O(),b0,g0,{position:[fe,ue]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",kS,yS,{size:[fe,ue]}],K=()=>[Gu,Or,bs],ne=()=>["","none","full",m,fe,ue],ce=()=>["",Ae,Or,bs],ve=()=>["solid","dashed","dotted","double"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[Ae,Gu,b0,g0],Et=()=>["","none",j,fe,ue],xa=()=>["none",Ae,fe,ue],ga=()=>["none",Ae,fe,ue],Ia=()=>[Ae,fe,ue],Ot=()=>[qn,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[dn],breakpoint:[dn],color:[$y],container:[dn],"drop-shadow":[dn],ease:["in","out","in-out"],font:[gS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[dn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[dn],shadow:[dn],spacing:["px",Ae],text:[dn],"text-shadow":[dn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qn,ue,fe,A]}],container:["container"],"container-type":[{"@container":["","normal","size",fe,ue]}],"container-named":[bS],columns:[{columns:[Ae,ue,fe,g]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:Q()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[Oa,"auto",fe,ue]}],basis:[{basis:[qn,"full","auto",g,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,qn,"auto","initial","none",ue]}],grow:[{grow:["",Ae,fe,ue]}],shrink:[{shrink:["",Ae,fe,ue]}],order:[{order:[Oa,"first","last","none",fe,ue]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":de()}],"col-end":[{"col-end":de()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":de()}],"row-end":[{"row-end":de()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ge()}],"auto-rows":[{"auto-rows":ge()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...be(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...be()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":be()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...H()]}],"min-block-size":[{"min-block":["auto",...H()]}],"max-block-size":[{"max-block":["none",...H()]}],w:[{w:[g,"screen",...J()]}],"min-w":[{"min-w":[g,"screen","none",...J()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[h]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,Or,bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,CS,vS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gu,ue]}],"font-family":[{font:[jS,wS,n]}],"font-features":[{"font-features":[ue]}],"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:[c,fe,ue]}],"line-clamp":[{"line-clamp":[Ae,"none",fe,x0]}],leading:[{leading:[u,...P()]}],"list-image":[{"list-image":["none",fe,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",fe,bs]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Ae,"auto",fe,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[Oa,fe,ue]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,ue]}],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",fe,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oa,fe,ue],radial:["",fe,ue],conic:[Oa,fe,ue]},SS,NS]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,fe,ue]}],"outline-w":[{outline:["",Ae,Or,bs]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",x,jo,No]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",b,jo,No]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Ae,bs]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",v,jo,No]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Ae,fe,ue]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ge()}],"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":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[fe,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,ue]}],filter:[{filter:["","none",fe,ue]}],blur:[{blur:Et()}],brightness:[{brightness:[Ae,fe,ue]}],contrast:[{contrast:[Ae,fe,ue]}],"drop-shadow":[{"drop-shadow":["","none",w,jo,No]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Ae,fe,ue]}],"hue-rotate":[{"hue-rotate":[Ae,fe,ue]}],invert:[{invert:["",Ae,fe,ue]}],saturate:[{saturate:[Ae,fe,ue]}],sepia:[{sepia:["",Ae,fe,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,ue]}],"backdrop-blur":[{"backdrop-blur":Et()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,fe,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,fe,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,fe,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,fe,ue]}],"backdrop-invert":[{"backdrop-invert":["",Ae,fe,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,fe,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,fe,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,fe,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",fe,ue]}],ease:[{ease:["linear","initial",E,fe,ue]}],delay:[{delay:[Ae,fe,ue]}],animate:[{animate:["none",D,fe,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,fe,ue]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:xa()}],"rotate-x":[{"rotate-x":xa()}],"rotate-y":[{"rotate-y":xa()}],"rotate-z":[{"rotate-z":xa()}],scale:[{scale:ga()}],"scale-x":[{"scale-x":ga()}],"scale-y":[{"scale-y":ga()}],"scale-z":[{"scale-z":ga()}],"scale-3d":["scale-3d"],skew:[{skew:Ia()}],"skew-x":[{"skew-x":Ia()}],"skew-y":[{"skew-y":Ia()}],transform:[{transform:[fe,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ot()}],"translate-x":[{"translate-x":Ot()}],"translate-y":[{"translate-y":Ot()}],"translate-z":[{"translate-z":Ot()}],"translate-none":["translate-none"],zoom:[{zoom:[Oa,fe,ue]}],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"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",fe,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",fe,ue]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Ae,Or,bs,x0]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},TS=rS(AS);function MS(...t){return TS(V4(t))}const ie=k.forwardRef(({className:t,variant:n="primary",size:r="md",...l},c)=>{const u={primary:"bg-gradient-to-r from-brand-gold-bright via-brand-gold to-brand-wine text-black wine-glow border border-brand-gold/60 btn-hover-effect font-black uppercase tracking-widest",secondary:"bg-[#F4E7C0] text-black hover:bg-white btn-hover-effect font-black uppercase tracking-widest",outline:"bg-black/30 border border-brand-gold/20 text-brand-gold hover:bg-brand-gold/10 hover:border-brand-gold/50 btn-hover-effect font-black uppercase tracking-widest",ghost:"text-gray-400 hover:text-white hover:bg-white/5 transition-colors font-black uppercase tracking-widest",gold:"bg-brand-gold text-black border border-brand-gold-bright/60 btn-hover-effect font-black uppercase tracking-widest"},h={sm:"px-4 py-2 text-sm",md:"px-6 py-3",lg:"px-8 py-4 text-lg font-bold"};return s.jsx("button",{ref:c,className:MS("inline-flex items-center justify-center rounded-sm transition-all active:scale-95 disabled:opacity-50 disabled:pointer-events-none",u[n],h[r],t),...l})});ie.displayName="Button";const uh=k.createContext({});function fh(t){const n=k.useRef(null);return n.current===null&&(n.current=t()),n.current}const RS=typeof window<"u",e1=RS?k.useLayoutEffect:k.useEffect,hc=k.createContext(null);function hh(t,n){t.indexOf(n)===-1&&t.push(n)}function $o(t,n){const r=t.indexOf(n);r>-1&&t.splice(r,1)}const Ga=(t,n,r)=>r>n?n:r<t?t:r;let mh=()=>{};const Qn={},t1=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a1=t=>typeof t=="object"&&t!==null,n1=t=>/^0[^.\s]+$/u.test(t);function s1(t){let n;return()=>(n===void 0&&(n=t()),n)}const ha=t=>t,Jr=(...t)=>t.reduce((n,r)=>l=>r(n(l))),Ir=(t,n,r)=>{const l=n-t;return l?(r-t)/l:1};class ph{constructor(){this.subscriptions=[]}add(n){return hh(this.subscriptions,n),()=>$o(this.subscriptions,n)}notify(n,r,l){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](n,r,l);else for(let u=0;u<c;u++){const h=this.subscriptions[u];h&&h(n,r,l)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Jt=t=>t*1e3,fa=t=>t/1e3,i1=(t,n)=>n?t*(1e3/n):0,r1=(t,n,r)=>(((1-3*r+3*n)*t+(3*r-6*n))*t+3*n)*t,DS=1e-7,OS=12;function _S(t,n,r,l,c){let u,h,g=0;do h=n+(r-n)/2,u=r1(h,l,c)-t,u>0?r=h:n=h;while(Math.abs(u)>DS&&++g<OS);return h}function el(t,n,r,l){if(t===n&&r===l)return ha;const c=u=>_S(u,0,1,t,r);return u=>u===0||u===1?u:r1(c(u),n,l)}const l1=t=>n=>n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2,o1=t=>n=>1-t(1-n),c1=el(.33,1.53,.69,.99),xh=o1(c1),d1=l1(xh),u1=t=>t>=1?1:(t*=2)<1?.5*xh(t):.5*(2-Math.pow(2,-10*(t-1))),gh=t=>1-Math.sin(Math.acos(t)),f1=o1(gh),h1=l1(gh),zS=el(.42,0,1,1),PS=el(0,0,.58,1),m1=el(.42,0,.58,1),LS=t=>Array.isArray(t)&&typeof t[0]!="number",p1=t=>Array.isArray(t)&&typeof t[0]=="number",VS={linear:ha,easeIn:zS,easeInOut:m1,easeOut:PS,circIn:gh,circInOut:h1,circOut:f1,backIn:xh,backInOut:d1,backOut:c1,anticipate:u1},US=t=>typeof t=="string",y0=t=>{if(p1(t)){mh(t.length===4);const[n,r,l,c]=t;return el(n,r,l,c)}else if(US(t))return VS[t];return t},ko=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function BS(t,n){let r=new Set,l=new Set,c=!1,u=!1;const h=new WeakSet;let g={delta:0,timestamp:0,isProcessing:!1};function p(x){h.has(x)&&(m.schedule(x),t()),x(g)}const m={schedule:(x,b=!1,v=!1)=>{const j=v&&c?r:l;return b&&h.add(x),j.add(x),x},cancel:x=>{l.delete(x),h.delete(x)},process:x=>{if(g=x,c){u=!0;return}c=!0;const b=r;r=l,l=b,r.forEach(p),r.clear(),c=!1,u&&(u=!1,m.process(x))}};return m}const qS=40;function x1(t,n){let r=!1,l=!0;const c={delta:0,timestamp:0,isProcessing:!1},u=()=>r=!0,h=ko.reduce((C,O)=>(C[O]=BS(u),C),{}),{setup:g,read:p,resolveKeyframes:m,preUpdate:x,update:b,preRender:v,render:w,postRender:j}=h,N=()=>{const C=Qn.useManualTiming,O=C?c.timestamp:performance.now();r=!1,C||(c.delta=l?1e3/60:Math.max(Math.min(O-c.timestamp,qS),1)),c.timestamp=O,c.isProcessing=!0,g.process(c),p.process(c),m.process(c),x.process(c),b.process(c),v.process(c),w.process(c),j.process(c),c.isProcessing=!1,r&&n&&(l=!1,t(N))},A=()=>{r=!0,l=!0,c.isProcessing||t(N)};return{schedule:ko.reduce((C,O)=>{const Q=h[O];return C[O]=(z,I=!1,P=!1)=>(r||A(),Q.schedule(z,I,P)),C},{}),cancel:C=>{for(let O=0;O<ko.length;O++)h[ko[O]].cancel(C)},state:c,steps:h}}const{schedule:Xe,cancel:Xn,state:St,steps:Iu}=x1(typeof requestAnimationFrame<"u"?requestAnimationFrame:ha,!0);let Ro;function HS(){Ro=void 0}const Mt={now:()=>(Ro===void 0&&Mt.set(St.isProcessing||Qn.useManualTiming?St.timestamp:performance.now()),Ro),set:t=>{Ro=t,queueMicrotask(HS)}},g1=t=>n=>typeof n=="string"&&n.startsWith(t),b1=g1("--"),GS=g1("var(--"),bh=t=>GS(t)?IS.test(t.split("/*")[0].trim()):!1,IS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v0(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Oi={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Yr={...Oi,transform:t=>Ga(0,1,t)},So={...Oi,default:1},Vr=t=>Math.round(t*1e5)/1e5,yh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function YS(t){return t==null}const $S=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vh=(t,n)=>r=>!!(typeof r=="string"&&$S.test(r)&&r.startsWith(t)||n&&!YS(r)&&Object.prototype.hasOwnProperty.call(r,n)),y1=(t,n,r)=>l=>{if(typeof l!="string")return l;const[c,u,h,g]=l.match(yh);return{[t]:parseFloat(c),[n]:parseFloat(u),[r]:parseFloat(h),alpha:g!==void 0?parseFloat(g):1}},FS=t=>Ga(0,255,t),Yu={...Oi,transform:t=>Math.round(FS(t))},js={test:vh("rgb","red"),parse:y1("red","green","blue"),transform:({red:t,green:n,blue:r,alpha:l=1})=>"rgba("+Yu.transform(t)+", "+Yu.transform(n)+", "+Yu.transform(r)+", "+Vr(Yr.transform(l))+")"};function QS(t){let n="",r="",l="",c="";return t.length>5?(n=t.substring(1,3),r=t.substring(3,5),l=t.substring(5,7),c=t.substring(7,9)):(n=t.substring(1,2),r=t.substring(2,3),l=t.substring(3,4),c=t.substring(4,5),n+=n,r+=r,l+=l,c+=c),{red:parseInt(n,16),green:parseInt(r,16),blue:parseInt(l,16),alpha:c?parseInt(c,16)/255:1}}const bf={test:vh("#"),parse:QS,transform:js.transform},tl=t=>({test:n=>typeof n=="string"&&n.endsWith(t)&&n.split(" ").length===1,parse:parseFloat,transform:n=>`${n}${t}`}),un=tl("deg"),Ua=tl("%"),me=tl("px"),XS=tl("vh"),KS=tl("vw"),w0={...Ua,parse:t=>Ua.parse(t)/100,transform:t=>Ua.transform(t*100)},yi={test:vh("hsl","hue"),parse:y1("hue","saturation","lightness"),transform:({hue:t,saturation:n,lightness:r,alpha:l=1})=>"hsla("+Math.round(t)+", "+Ua.transform(Vr(n))+", "+Ua.transform(Vr(r))+", "+Vr(Yr.transform(l))+")"},dt={test:t=>js.test(t)||bf.test(t)||yi.test(t),parse:t=>js.test(t)?js.parse(t):yi.test(t)?yi.parse(t):bf.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?js.transform(t):yi.transform(t),getAnimatableNone:t=>{const n=dt.parse(t);return n.alpha=0,dt.transform(n)}},WS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ZS(t){var n,r;return isNaN(t)&&typeof t=="string"&&(((n=t.match(yh))==null?void 0:n.length)||0)+(((r=t.match(WS))==null?void 0:r.length)||0)>0}const v1="number",w1="color",JS="var",e3="var(",N0="${}",t3=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ei(t){const n=t.toString(),r=[],l={color:[],number:[],var:[]},c=[];let u=0;const g=n.replace(t3,p=>(dt.test(p)?(l.color.push(u),c.push(w1),r.push(dt.parse(p))):p.startsWith(e3)?(l.var.push(u),c.push(JS),r.push(p)):(l.number.push(u),c.push(v1),r.push(parseFloat(p))),++u,N0)).split(N0);return{values:r,split:g,indexes:l,types:c}}function a3(t){return Ei(t).values}function N1({split:t,types:n}){const r=t.length;return l=>{let c="";for(let u=0;u<r;u++)if(c+=t[u],l[u]!==void 0){const h=n[u];h===v1?c+=Vr(l[u]):h===w1?c+=dt.transform(l[u]):c+=l[u]}return c}}function n3(t){return N1(Ei(t))}const s3=t=>typeof t=="number"?0:dt.test(t)?dt.getAnimatableNone(t):t,i3=(t,n)=>typeof t=="number"?n!=null&&n.trim().endsWith("/")?t:0:s3(t);function r3(t){const n=Ei(t);return N1(n)(n.values.map((l,c)=>i3(l,n.split[c])))}const Sa={test:ZS,parse:a3,createTransformer:n3,getAnimatableNone:r3};function $u(t,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}function l3({hue:t,saturation:n,lightness:r,alpha:l}){t/=360,n/=100,r/=100;let c=0,u=0,h=0;if(!n)c=u=h=r;else{const g=r<.5?r*(1+n):r+n-r*n,p=2*r-g;c=$u(p,g,t+1/3),u=$u(p,g,t),h=$u(p,g,t-1/3)}return{red:Math.round(c*255),green:Math.round(u*255),blue:Math.round(h*255),alpha:l}}function Fo(t,n){return r=>r>0?n:t}const Qe=(t,n,r)=>t+(n-t)*r,Fu=(t,n,r)=>{const l=t*t,c=r*(n*n-l)+l;return c<0?0:Math.sqrt(c)},o3=[bf,js,yi],c3=t=>o3.find(n=>n.test(t));function j0(t){const n=c3(t);if(!n)return!1;let r=n.parse(t);return n===yi&&(r=l3(r)),r}const k0=(t,n)=>{const r=j0(t),l=j0(n);if(!r||!l)return Fo(t,n);const c={...r};return u=>(c.red=Fu(r.red,l.red,u),c.green=Fu(r.green,l.green,u),c.blue=Fu(r.blue,l.blue,u),c.alpha=Qe(r.alpha,l.alpha,u),js.transform(c))},yf=new Set(["none","hidden"]);function d3(t,n){return yf.has(t)?r=>r<=0?t:n:r=>r>=1?n:t}function u3(t,n){return r=>Qe(t,n,r)}function wh(t){return typeof t=="number"?u3:typeof t=="string"?bh(t)?Fo:dt.test(t)?k0:m3:Array.isArray(t)?j1:typeof t=="object"?dt.test(t)?k0:f3:Fo}function j1(t,n){const r=[...t],l=r.length,c=t.map((u,h)=>wh(u)(u,n[h]));return u=>{for(let h=0;h<l;h++)r[h]=c[h](u);return r}}function f3(t,n){const r={...t,...n},l={};for(const c in r)t[c]!==void 0&&n[c]!==void 0&&(l[c]=wh(t[c])(t[c],n[c]));return c=>{for(const u in l)r[u]=l[u](c);return r}}function h3(t,n){const r=[],l={color:0,var:0,number:0};for(let c=0;c<n.values.length;c++){const u=n.types[c],h=t.indexes[u][l[u]],g=t.values[h]??0;r[c]=g,l[u]++}return r}const m3=(t,n)=>{const r=Sa.createTransformer(n),l=Ei(t),c=Ei(n);return l.indexes.var.length===c.indexes.var.length&&l.indexes.color.length===c.indexes.color.length&&l.indexes.number.length>=c.indexes.number.length?yf.has(t)&&!c.values.length||yf.has(n)&&!l.values.length?d3(t,n):Jr(j1(h3(l,c),c.values),r):Fo(t,n)};function k1(t,n,r){return typeof t=="number"&&typeof n=="number"&&typeof r=="number"?Qe(t,n,r):wh(t)(t,n)}const p3=t=>{const n=({timestamp:r})=>t(r);return{start:(r=!0)=>Xe.update(n,r),stop:()=>Xn(n),now:()=>St.isProcessing?St.timestamp:Mt.now()}},S1=(t,n,r=10)=>{let l="";const c=Math.max(Math.round(n/r),2);for(let u=0;u<c;u++)l+=Math.round(t(u/(c-1))*1e4)/1e4+", ";return`linear(${l.substring(0,l.length-2)})`},Qo=2e4;function Nh(t){let n=0;const r=50;let l=t.next(n);for(;!l.done&&n<Qo;)n+=r,l=t.next(n);return n>=Qo?1/0:n}function x3(t,n=100,r){const l=r({...t,keyframes:[0,n]}),c=Math.min(Nh(l),Qo);return{type:"keyframes",ease:u=>l.next(c*u).value/n,duration:fa(c)}}const nt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function vf(t,n){return t*Math.sqrt(1-n*n)}const g3=12;function b3(t,n,r){let l=r;for(let c=1;c<g3;c++)l=l-t(l)/n(l);return l}const Qu=.001;function y3({duration:t=nt.duration,bounce:n=nt.bounce,velocity:r=nt.velocity,mass:l=nt.mass}){let c,u,h=1-n;h=Ga(nt.minDamping,nt.maxDamping,h),t=Ga(nt.minDuration,nt.maxDuration,fa(t)),h<1?(c=m=>{const x=m*h,b=x*t,v=x-r,w=vf(m,h),j=Math.exp(-b);return Qu-v/w*j},u=m=>{const b=m*h*t,v=b*r+r,w=Math.pow(h,2)*Math.pow(m,2)*t,j=Math.exp(-b),N=vf(Math.pow(m,2),h);return(-c(m)+Qu>0?-1:1)*((v-w)*j)/N}):(c=m=>{const x=Math.exp(-m*t),b=(m-r)*t+1;return-Qu+x*b},u=m=>{const x=Math.exp(-m*t),b=(r-m)*(t*t);return x*b});const g=5/t,p=b3(c,u,g);if(t=Jt(t),isNaN(p))return{stiffness:nt.stiffness,damping:nt.damping,duration:t};{const m=Math.pow(p,2)*l;return{stiffness:m,damping:h*2*Math.sqrt(l*m),duration:t}}}const v3=["duration","bounce"],w3=["stiffness","damping","mass"];function S0(t,n){return n.some(r=>t[r]!==void 0)}function N3(t){let n={velocity:nt.velocity,stiffness:nt.stiffness,damping:nt.damping,mass:nt.mass,isResolvedFromDuration:!1,...t};if(!S0(t,w3)&&S0(t,v3))if(n.velocity=0,t.visualDuration){const r=t.visualDuration,l=2*Math.PI/(r*1.2),c=l*l,u=2*Ga(.05,1,1-(t.bounce||0))*Math.sqrt(c);n={...n,mass:nt.mass,stiffness:c,damping:u}}else{const r=y3({...t,velocity:0});n={...n,...r,mass:nt.mass},n.isResolvedFromDuration=!0}return n}function Xo(t=nt.visualDuration,n=nt.bounce){const r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:n}:t;let{restSpeed:l,restDelta:c}=r;const u=r.keyframes[0],h=r.keyframes[r.keyframes.length-1],g={done:!1,value:u},{stiffness:p,damping:m,mass:x,duration:b,velocity:v,isResolvedFromDuration:w}=N3({...r,velocity:-fa(r.velocity||0)}),j=v||0,N=m/(2*Math.sqrt(p*x)),A=h-u,E=fa(Math.sqrt(p/x)),D=Math.abs(A)<5;l||(l=D?nt.restSpeed.granular:nt.restSpeed.default),c||(c=D?nt.restDelta.granular:nt.restDelta.default);let C,O,Q,z,I,P;if(N<1)Q=vf(E,N),z=(j+N*E*A)/Q,C=W=>{const le=Math.exp(-N*E*W);return h-le*(z*Math.sin(Q*W)+A*Math.cos(Q*W))},I=N*E*z+A*Q,P=N*E*A-z*Q,O=W=>Math.exp(-N*E*W)*(I*Math.sin(Q*W)+P*Math.cos(Q*W));else if(N===1){C=le=>h-Math.exp(-E*le)*(A+(j+E*A)*le);const W=j+E*A;O=le=>Math.exp(-E*le)*(E*W*le-j)}else{const W=E*Math.sqrt(N*N-1);C=be=>{const te=Math.exp(-N*E*be),V=Math.min(W*be,300);return h-te*((j+N*E*A)*Math.sinh(V)+W*A*Math.cosh(V))/W};const le=(j+N*E*A)/W,de=N*E*le-A*W,ge=N*E*A-le*W;O=be=>{const te=Math.exp(-N*E*be),V=Math.min(W*be,300);return te*(de*Math.sinh(V)+ge*Math.cosh(V))}}const ee={calculatedDuration:w&&b||null,velocity:W=>Jt(O(W)),next:W=>{if(!w&&N<1){const de=Math.exp(-N*E*W),ge=Math.sin(Q*W),be=Math.cos(Q*W),te=h-de*(z*ge+A*be),V=Jt(de*(I*ge+P*be));return g.done=Math.abs(V)<=l&&Math.abs(h-te)<=c,g.value=g.done?h:te,g}const le=C(W);if(w)g.done=W>=b;else{const de=Jt(O(W));g.done=Math.abs(de)<=l&&Math.abs(h-le)<=c}return g.value=g.done?h:le,g},toString:()=>{const W=Math.min(Nh(ee),Qo),le=S1(de=>ee.next(W*de).value,W,30);return W+"ms "+le},toTransition:()=>{}};return ee}Xo.applyToOptions=t=>{const n=x3(t,100,Xo);return t.ease=n.ease,t.duration=Jt(n.duration),t.type="keyframes",t};const j3=5;function C1(t,n,r){const l=Math.max(n-j3,0);return i1(r-t(l),n-l)}function wf({keyframes:t,velocity:n=0,power:r=.8,timeConstant:l=325,bounceDamping:c=10,bounceStiffness:u=500,modifyTarget:h,min:g,max:p,restDelta:m=.5,restSpeed:x}){const b=t[0],v={done:!1,value:b},w=P=>g!==void 0&&P<g||p!==void 0&&P>p,j=P=>g===void 0?p:p===void 0||Math.abs(g-P)<Math.abs(p-P)?g:p;let N=r*n;const A=b+N,E=h===void 0?A:h(A);E!==A&&(N=E-b);const D=P=>-N*Math.exp(-P/l),C=P=>E+D(P),O=P=>{const ee=D(P),W=C(P);v.done=Math.abs(ee)<=m,v.value=v.done?E:W};let Q,z;const I=P=>{w(v.value)&&(Q=P,z=Xo({keyframes:[v.value,j(v.value)],velocity:C1(C,P,v.value),damping:c,stiffness:u,restDelta:m,restSpeed:x}))};return I(0),{calculatedDuration:null,next:P=>{let ee=!1;return!z&&Q===void 0&&(ee=!0,O(P),I(P)),Q!==void 0&&P>=Q?z.next(P-Q):(!ee&&O(P),v)}}}function k3(t,n,r){const l=[],c=r||Qn.mix||k1,u=t.length-1;for(let h=0;h<u;h++){let g=c(t[h],t[h+1]);if(n){const p=Array.isArray(n)?n[h]||ha:n;g=Jr(p,g)}l.push(g)}return l}function S3(t,n,{clamp:r=!0,ease:l,mixer:c}={}){const u=t.length;if(mh(u===n.length),u===1)return()=>n[0];if(u===2&&n[0]===n[1])return()=>n[1];const h=t[0]===t[1];t[0]>t[u-1]&&(t=[...t].reverse(),n=[...n].reverse());const g=k3(n,l,c),p=g.length,m=x=>{if(h&&x<t[0])return n[0];let b=0;if(p>1)for(;b<t.length-2&&!(x<t[b+1]);b++);const v=Ir(t[b],t[b+1],x);return g[b](v)};return r?x=>m(Ga(t[0],t[u-1],x)):m}function C3(t,n){const r=t[t.length-1];for(let l=1;l<=n;l++){const c=Ir(0,n,l);t.push(Qe(r,1,c))}}function E3(t){const n=[0];return C3(n,t.length-1),n}function A3(t,n){return t.map(r=>r*n)}function T3(t,n){return t.map(()=>n||m1).splice(0,t.length-1)}function Ur({duration:t=300,keyframes:n,times:r,ease:l="easeInOut"}){const c=LS(l)?l.map(y0):y0(l),u={done:!1,value:n[0]},h=A3(r&&r.length===n.length?r:E3(n),t),g=S3(h,n,{ease:Array.isArray(c)?c:T3(n,c)});return{calculatedDuration:t,next:p=>(u.value=g(p),u.done=p>=t,u)}}const M3=t=>t!==null;function mc(t,{repeat:n,repeatType:r="loop"},l,c=1){const u=t.filter(M3),g=c<0||n&&r!=="loop"&&n%2===1?0:u.length-1;return!g||l===void 0?u[g]:l}const R3={decay:wf,inertia:wf,tween:Ur,keyframes:Ur,spring:Xo};function E1(t){typeof t.type=="string"&&(t.type=R3[t.type])}class jh{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(n=>{this.resolve=n})}notifyFinished(){this.resolve()}then(n,r){return this.finished.then(n,r)}}const D3=t=>t/100;class Ko extends jh{constructor(n){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var l,c;const{motionValue:r}=this.options;r&&r.updatedAt!==Mt.now()&&this.tick(Mt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(c=(l=this.options).onStop)==null||c.call(l))},this.options=n,this.initAnimation(),this.play(),n.autoplay===!1&&this.pause()}initAnimation(){const{options:n}=this;E1(n);const{type:r=Ur,repeat:l=0,repeatDelay:c=0,repeatType:u,velocity:h=0}=n;let{keyframes:g}=n;const p=r||Ur;p!==Ur&&typeof g[0]!="number"&&(this.mixKeyframes=Jr(D3,k1(g[0],g[1])),g=[0,100]);const m=p({...n,keyframes:g});u==="mirror"&&(this.mirroredGenerator=p({...n,keyframes:[...g].reverse(),velocity:-h})),m.calculatedDuration===null&&(m.calculatedDuration=Nh(m));const{calculatedDuration:x}=m;this.calculatedDuration=x,this.resolvedDuration=x+c,this.totalDuration=this.resolvedDuration*(l+1)-c,this.generator=m}updateTime(n){const r=Math.round(n-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(n,r=!1){const{generator:l,totalDuration:c,mixKeyframes:u,mirroredGenerator:h,resolvedDuration:g,calculatedDuration:p}=this;if(this.startTime===null)return l.next(0);const{delay:m=0,keyframes:x,repeat:b,repeatType:v,repeatDelay:w,type:j,onUpdate:N,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,n):this.speed<0&&(this.startTime=Math.min(n-c/this.speed,this.startTime)),r?this.currentTime=n:this.updateTime(n);const E=this.currentTime-m*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?E<0:E>c;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let C=this.currentTime,O=l;if(b){const P=Math.min(this.currentTime,c)/g;let ee=Math.floor(P),W=P%1;!W&&P>=1&&(W=1),W===1&&ee--,ee=Math.min(ee,b+1),!!(ee%2)&&(v==="reverse"?(W=1-W,w&&(W-=w/g)):v==="mirror"&&(O=h)),C=Ga(0,1,W)*g}let Q;D?(this.delayState.value=x[0],Q=this.delayState):Q=O.next(C),u&&!D&&(Q.value=u(Q.value));let{done:z}=Q;!D&&p!==null&&(z=this.playbackSpeed>=0?this.currentTime>=c:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&z);return I&&j!==wf&&(Q.value=mc(x,this.options,A,this.speed)),N&&N(Q.value),I&&this.finish(),Q}then(n,r){return this.finished.then(n,r)}get duration(){return fa(this.calculatedDuration)}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+fa(n)}get time(){return fa(this.currentTime)}set time(n){n=Jt(n),this.currentTime=n,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=n:this.driver&&(this.startTime=this.driver.now()-n/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=n,this.tick(n))}getGeneratorVelocity(){const n=this.currentTime;if(n<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(n);const r=this.generator.next(n).value;return C1(l=>this.generator.next(l).value,n,r)}get speed(){return this.playbackSpeed}set speed(n){const r=this.playbackSpeed!==n;r&&this.driver&&this.updateTime(Mt.now()),this.playbackSpeed=n,r&&this.driver&&(this.time=fa(this.currentTime))}play(){var c,u;if(this.isStopped)return;const{driver:n=p3,startTime:r}=this.options;this.driver||(this.driver=n(h=>this.tick(h))),(u=(c=this.options).onPlay)==null||u.call(c);const l=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=l):this.holdTime!==null?this.startTime=l-this.holdTime:this.startTime||(this.startTime=r??l),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Mt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var n,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(n=this.options).onComplete)==null||r.call(n)}cancel(){var n,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(n=this.options).onCancel)==null||r.call(n)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(n){return this.startTime=0,this.tick(n,!0)}attachTimeline(n){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),n.observe(this)}}function O3(t){for(let n=1;n<t.length;n++)t[n]??(t[n]=t[n-1])}const ks=t=>t*180/Math.PI,Nf=t=>{const n=ks(Math.atan2(t[1],t[0]));return jf(n)},_3={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Nf,rotateZ:Nf,skewX:t=>ks(Math.atan(t[1])),skewY:t=>ks(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},jf=t=>(t=t%360,t<0&&(t+=360),t),C0=Nf,E0=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),A0=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),z3={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:E0,scaleY:A0,scale:t=>(E0(t)+A0(t))/2,rotateX:t=>jf(ks(Math.atan2(t[6],t[5]))),rotateY:t=>jf(ks(Math.atan2(-t[2],t[0]))),rotateZ:C0,rotate:C0,skewX:t=>ks(Math.atan(t[4])),skewY:t=>ks(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function kf(t){return t.includes("scale")?1:0}function Sf(t,n){if(!t||t==="none")return kf(n);const r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let l,c;if(r)l=z3,c=r;else{const g=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);l=_3,c=g}if(!c)return kf(n);const u=l[n],h=c[1].split(",").map(L3);return typeof u=="function"?u(h):h[u]}const P3=(t,n)=>{const{transform:r="none"}=getComputedStyle(t);return Sf(r,n)};function L3(t){return parseFloat(t.trim())}const _i=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zi=new Set([..._i,"pathRotation"]),T0=t=>t===Oi||t===me,V3=new Set(["x","y","z"]),U3=_i.filter(t=>!V3.has(t));function B3(t){const n=[];return U3.forEach(r=>{const l=t.getValue(r);l!==void 0&&(n.push([r,l.get()]),l.set(r.startsWith("scale")?1:0))}),n}const Yn={width:({x:t},{paddingLeft:n="0",paddingRight:r="0",boxSizing:l})=>{const c=t.max-t.min;return l==="border-box"?c:c-parseFloat(n)-parseFloat(r)},height:({y:t},{paddingTop:n="0",paddingBottom:r="0",boxSizing:l})=>{const c=t.max-t.min;return l==="border-box"?c:c-parseFloat(n)-parseFloat(r)},top:(t,{top:n})=>parseFloat(n),left:(t,{left:n})=>parseFloat(n),bottom:({y:t},{top:n})=>parseFloat(n)+(t.max-t.min),right:({x:t},{left:n})=>parseFloat(n)+(t.max-t.min),x:(t,{transform:n})=>Sf(n,"x"),y:(t,{transform:n})=>Sf(n,"y")};Yn.translateX=Yn.x;Yn.translateY=Yn.y;const Ss=new Set;let Cf=!1,Ef=!1,Af=!1;function A1(){if(Ef){const t=Array.from(Ss).filter(l=>l.needsMeasurement),n=new Set(t.map(l=>l.element)),r=new Map;n.forEach(l=>{const c=B3(l);c.length&&(r.set(l,c),l.render())}),t.forEach(l=>l.measureInitialState()),n.forEach(l=>{l.render();const c=r.get(l);c&&c.forEach(([u,h])=>{var g;(g=l.getValue(u))==null||g.set(h)})}),t.forEach(l=>l.measureEndState()),t.forEach(l=>{l.suspendedScrollY!==void 0&&window.scrollTo(0,l.suspendedScrollY)})}Ef=!1,Cf=!1,Ss.forEach(t=>t.complete(Af)),Ss.clear()}function T1(){Ss.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ef=!0)})}function q3(){Af=!0,T1(),A1(),Af=!1}class kh{constructor(n,r,l,c,u,h=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...n],this.onComplete=r,this.name=l,this.motionValue=c,this.element=u,this.isAsync=h}scheduleResolve(){this.state="scheduled",this.isAsync?(Ss.add(this),Cf||(Cf=!0,Xe.read(T1),Xe.resolveKeyframes(A1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:n,name:r,element:l,motionValue:c}=this;if(n[0]===null){const u=c==null?void 0:c.get(),h=n[n.length-1];if(u!==void 0)n[0]=u;else if(l&&r){const g=l.readValue(r,h);g!=null&&(n[0]=g)}n[0]===void 0&&(n[0]=h),c&&u===void 0&&c.set(n[0])}O3(n)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(n=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,n),Ss.delete(this)}cancel(){this.state==="scheduled"&&(Ss.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const H3=t=>t.startsWith("--");function M1(t,n,r){H3(n)?t.style.setProperty(n,r):t.style[n]=r}const G3={};function R1(t,n){const r=s1(t);return()=>G3[n]??r()}const I3=R1(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),D1=R1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pr=([t,n,r,l])=>`cubic-bezier(${t}, ${n}, ${r}, ${l})`,M0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pr([0,.65,.55,1]),circOut:Pr([.55,0,1,.45]),backIn:Pr([.31,.01,.66,-.59]),backOut:Pr([.33,1.53,.69,.99])};function O1(t,n){if(t)return typeof t=="function"?D1()?S1(t,n):"ease-out":p1(t)?Pr(t):Array.isArray(t)?t.map(r=>O1(r,n)||M0.easeOut):M0[t]}function Y3(t,n,r,{delay:l=0,duration:c=300,repeat:u=0,repeatType:h="loop",ease:g="easeOut",times:p}={},m=void 0){const x={[n]:r};p&&(x.offset=p);const b=O1(g,c);Array.isArray(b)&&(x.easing=b);const v={delay:l,duration:c,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:u+1,direction:h==="reverse"?"alternate":"normal"};return m&&(v.pseudoElement=m),t.animate(x,v)}function _1(t){return typeof t=="function"&&"applyToOptions"in t}function $3({type:t,...n}){return _1(t)&&D1()?t.applyToOptions(n):(n.duration??(n.duration=300),n.ease??(n.ease="easeOut"),n)}class z1 extends jh{constructor(n){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!n)return;const{element:r,name:l,keyframes:c,pseudoElement:u,allowFlatten:h=!1,finalKeyframe:g,onComplete:p}=n;this.isPseudoElement=!!u,this.allowFlatten=h,this.options=n,mh(typeof n.type!="string");const m=$3(n);this.animation=Y3(r,l,c,m,u),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const x=mc(c,this.options,g,this.speed);this.updateMotionValue&&this.updateMotionValue(x),M1(r,l,x),this.animation.cancel()}p==null||p(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var n,r;(r=(n=this.animation).finish)==null||r.call(n)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:n}=this;n==="idle"||n==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,l,c;const n=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(n!=null&&n.isConnected)&&((c=(l=this.animation).commitStyles)==null||c.call(l))}get duration(){var r,l;const n=((l=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:l.call(r).duration)||0;return fa(Number(n))}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+fa(n)}get time(){return fa(Number(this.animation.currentTime)||0)}set time(n){const r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Jt(n),r&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(n){n<0&&(this.finishedTime=null),this.animation.playbackRate=n}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(n){this.manualStartTime=this.animation.startTime=n}attachTimeline({timeline:n,rangeStart:r,rangeEnd:l,observe:c}){var u;return this.allowFlatten&&((u=this.animation.effect)==null||u.updateTiming({easing:"linear"})),this.animation.onfinish=null,n&&I3()?(this.animation.timeline=n,r&&(this.animation.rangeStart=r),l&&(this.animation.rangeEnd=l),ha):c(this)}}const P1={anticipate:u1,backInOut:d1,circInOut:h1};function F3(t){return t in P1}function Q3(t){typeof t.ease=="string"&&F3(t.ease)&&(t.ease=P1[t.ease])}const Xu=10;class X3 extends z1{constructor(n){Q3(n),E1(n),super(n),n.startTime!==void 0&&n.autoplay!==!1&&(this.startTime=n.startTime),this.options=n}updateMotionValue(n){const{motionValue:r,onUpdate:l,onComplete:c,element:u,...h}=this.options;if(!r)return;if(n!==void 0){r.set(n);return}const g=new Ko({...h,autoplay:!1}),p=Math.max(Xu,Mt.now()-this.startTime),m=Ga(0,Xu,p-Xu),x=g.sample(p).value,{name:b}=this.options;u&&b&&M1(u,b,x),r.setWithVelocity(g.sample(Math.max(0,p-m)).value,x,m),g.stop()}}const R0=(t,n)=>n==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Sa.test(t)||t==="0")&&!t.startsWith("url("));function K3(t){const n=t[0];if(t.length===1)return!0;for(let r=0;r<t.length;r++)if(t[r]!==n)return!0}function W3(t,n,r,l){const c=t[0];if(c===null)return!1;if(n==="display"||n==="visibility")return!0;const u=t[t.length-1],h=R0(c,n),g=R0(u,n);return!h||!g?!1:K3(t)||(r==="spring"||_1(r))&&l}function Tf(t){t.duration=0,t.type="keyframes"}const L1=new Set(["opacity","clipPath","filter","transform"]),Z3=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function J3(t){for(let n=0;n<t.length;n++)if(typeof t[n]=="string"&&Z3.test(t[n]))return!0;return!1}const eC=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),tC=s1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function aC(t){var b;const{motionValue:n,name:r,repeatDelay:l,repeatType:c,damping:u,type:h,keyframes:g}=t;if(!(((b=n==null?void 0:n.owner)==null?void 0:b.current)instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:x}=n.owner.getProps();return tC()&&r&&(L1.has(r)||eC.has(r)&&J3(g))&&(r!=="transform"||!x)&&!m&&!l&&c!=="mirror"&&u!==0&&h!=="inertia"}const nC=40;class sC extends jh{constructor({autoplay:n=!0,delay:r=0,type:l="keyframes",repeat:c=0,repeatDelay:u=0,repeatType:h="loop",keyframes:g,name:p,motionValue:m,element:x,...b}){var j;super(),this.stop=()=>{var N,A;this._animation&&(this._animation.stop(),(N=this.stopTimeline)==null||N.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=Mt.now();const v={autoplay:n,delay:r,type:l,repeat:c,repeatDelay:u,repeatType:h,name:p,motionValue:m,element:x,...b},w=(x==null?void 0:x.KeyframeResolver)||kh;this.keyframeResolver=new w(g,(N,A,E)=>this.onKeyframesResolved(N,A,v,!E),p,m,x),(j=this.keyframeResolver)==null||j.scheduleResolve()}onKeyframesResolved(n,r,l,c){var E,D;this.keyframeResolver=void 0;const{name:u,type:h,velocity:g,delay:p,isHandoff:m,onUpdate:x}=l;this.resolvedAt=Mt.now();let b=!0;W3(n,u,h,g)||(b=!1,(Qn.instantAnimations||!p)&&(x==null||x(mc(n,l,r))),n[0]=n[n.length-1],Tf(l),l.repeat=0);const w={startTime:c?this.resolvedAt?this.resolvedAt-this.createdAt>nC?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...l,keyframes:n},j=b&&!m&&aC(w),N=(D=(E=w.motionValue)==null?void 0:E.owner)==null?void 0:D.current;let A;if(j)try{A=new X3({...w,element:N})}catch{A=new Ko(w)}else A=new Ko(w);A.finished.then(()=>{this.notifyFinished()}).catch(ha),this.pendingTimeline&&(this.stopTimeline=A.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=A}get finished(){return this._animation?this.animation.finished:this._finished}then(n,r){return this.finished.finally(n).then(()=>{})}get animation(){var n;return this._animation||((n=this.keyframeResolver)==null||n.resume(),q3()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(n){this.animation.time=n}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(n){this.animation.speed=n}get startTime(){return this.animation.startTime}attachTimeline(n){return this._animation?this.stopTimeline=this.animation.attachTimeline(n):this.pendingTimeline=n,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var n;this._animation&&this.animation.cancel(),(n=this.keyframeResolver)==null||n.cancel()}}function V1(t,n,r,l=0,c=1){const u=Array.from(t).sort((m,x)=>m.sortNodePosition(x)).indexOf(n),h=t.size,g=(h-1)*l;return typeof r=="function"?r(u,h):c===1?u*l:g-u*l}const D0=30,iC=t=>!isNaN(parseFloat(t));class rC{constructor(n,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=l=>{var u;const c=Mt.now();if(this.updatedAt!==c&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(l),this.current!==this.prev&&((u=this.events.change)==null||u.notify(this.current),this.dependents))for(const h of this.dependents)h.dirty()},this.hasAnimated=!1,this.setCurrent(n),this.owner=r.owner}setCurrent(n){this.current=n,this.updatedAt=Mt.now(),this.canTrackVelocity===null&&n!==void 0&&(this.canTrackVelocity=iC(this.current))}setPrevFrameValue(n=this.current){this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt}onChange(n){return this.on("change",n)}on(n,r){this.events[n]||(this.events[n]=new ph);const l=this.events[n].add(r);return n==="change"?()=>{l(),Xe.read(()=>{this.events.change.getSize()||this.stop()})}:l}clearListeners(){for(const n in this.events)this.events[n].clear()}attach(n,r){this.passiveEffect=n,this.stopPassiveEffect=r}set(n){this.passiveEffect?this.passiveEffect(n,this.updateAndNotify):this.updateAndNotify(n)}setWithVelocity(n,r,l){this.set(r),this.prev=void 0,this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt-l}jump(n,r=!0){this.updateAndNotify(n),this.prev=n,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var n;(n=this.events.change)==null||n.notify(this.current)}addDependent(n){this.dependents||(this.dependents=new Set),this.dependents.add(n)}removeDependent(n){this.dependents&&this.dependents.delete(n)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const n=Mt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||n-this.updatedAt>D0)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,D0);return i1(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(n){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=n(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var n,r;(n=this.dependents)==null||n.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ai(t,n){return new rC(t,n)}function U1(t,n){if(t!=null&&t.inherit&&n){const{inherit:r,...l}=t;return{...n,...l}}return t}function Sh(t,n){const r=(t==null?void 0:t[n])??(t==null?void 0:t.default)??t;return r!==t?U1(r,t):r}const lC={type:"spring",stiffness:500,damping:25,restSpeed:10},oC=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),cC={type:"keyframes",duration:.8},dC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uC=(t,{keyframes:n})=>n.length>2?cC:zi.has(t)?t.startsWith("scale")?oC(n[1]):lC:dC,fC=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function hC(t){for(const n in t)if(!fC.has(n))return!0;return!1}const Ch=(t,n,r,l={},c,u)=>h=>{const g=Sh(l,t)||{},p=g.delay||l.delay||0;let{elapsed:m=0}=l;m=m-Jt(p);const x={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:n.getVelocity(),...g,delay:-m,onUpdate:v=>{n.set(v),g.onUpdate&&g.onUpdate(v)},onComplete:()=>{h(),g.onComplete&&g.onComplete()},name:t,motionValue:n,element:u?void 0:c};hC(g)||Object.assign(x,uC(t,x)),x.duration&&(x.duration=Jt(x.duration)),x.repeatDelay&&(x.repeatDelay=Jt(x.repeatDelay)),x.from!==void 0&&(x.keyframes[0]=x.from);let b=!1;if((x.type===!1||x.duration===0&&!x.repeatDelay)&&(Tf(x),x.delay===0&&(b=!0)),(Qn.instantAnimations||Qn.skipAnimations||c!=null&&c.shouldSkipAnimations||g.skipAnimations)&&(b=!0,Tf(x),x.delay=0),x.allowFlatten=!g.type&&!g.ease,b&&!u&&n.get()!==void 0){const v=mc(x.keyframes,g);if(v!==void 0){Xe.update(()=>{x.onUpdate(v),x.onComplete()});return}}return g.isSync?new Ko(x):new sC(x)},mC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pC(t){const n=mC.exec(t);if(!n)return[,];const[,r,l,c]=n;return[`--${r??l}`,c]}function B1(t,n,r=1){const[l,c]=pC(t);if(!l)return;const u=window.getComputedStyle(n).getPropertyValue(l);if(u){const h=u.trim();return t1(h)?parseFloat(h):h}return bh(c)?B1(c,n,r+1):c}function O0(t){const n=[{},{}];return t==null||t.values.forEach((r,l)=>{n[0][l]=r.get(),n[1][l]=r.getVelocity()}),n}function Eh(t,n,r,l){if(typeof n=="function"){const[c,u]=O0(l);n=n(r!==void 0?r:t.custom,c,u)}if(typeof n=="string"&&(n=t.variants&&t.variants[n]),typeof n=="function"){const[c,u]=O0(l);n=n(r!==void 0?r:t.custom,c,u)}return n}function Cs(t,n,r){const l=t.getProps();return Eh(l,n,r!==void 0?r:l.custom,t)}const q1=new Set(["width","height","top","left","right","bottom",..._i]),Mf=t=>Array.isArray(t);function xC(t,n,r){t.hasValue(n)?t.getValue(n).set(r):t.addValue(n,Ai(r))}function gC(t){return Mf(t)?t[t.length-1]||0:t}function bC(t,n){const r=Cs(t,n);let{transitionEnd:l={},transition:c={},...u}=r||{};u={...u,...l};for(const h in u){const g=gC(u[h]);xC(t,h,g)}}const Ct=t=>!!(t&&t.getVelocity);function yC(t){return!!(Ct(t)&&t.add)}function Rf(t,n){const r=t.getValue("willChange");if(yC(r))return r.add(n);if(!r&&Qn.WillChange){const l=new Qn.WillChange("auto");t.addValue("willChange",l),l.add(n)}}function Ah(t){return t.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}const vC="framerAppearId",H1="data-"+Ah(vC);function G1(t){return t.props[H1]}function wC({protectedKeys:t,needsAnimating:n},r){const l=t.hasOwnProperty(r)&&n[r]!==!0;return n[r]=!1,l}function I1(t,n,{delay:r=0,transitionOverride:l,type:c}={}){let{transition:u,transitionEnd:h,...g}=n;const p=t.getDefaultTransition();u=u?U1(u,p):p;const m=u==null?void 0:u.reduceMotion,x=u==null?void 0:u.skipAnimations;l&&(u=l);const b=[],v=c&&t.animationState&&t.animationState.getState()[c],w=u==null?void 0:u.path;w&&w.animateVisualElement(t,g,u,r,b);for(const j in g){const N=t.getValue(j,t.latestValues[j]??null),A=g[j];if(A===void 0||v&&wC(v,j))continue;const E={delay:r,...Sh(u||{},j)};x&&(E.skipAnimations=!0);const D=N.get();if(D!==void 0&&!N.isAnimating()&&!Array.isArray(A)&&A===D&&!E.velocity){Xe.update(()=>N.set(A));continue}let C=!1;if(window.MotionHandoffAnimation){const z=G1(t);if(z){const I=window.MotionHandoffAnimation(z,j,Xe);I!==null&&(E.startTime=I,C=!0)}}Rf(t,j);const O=m??t.shouldReduceMotion;N.start(Ch(j,N,A,O&&q1.has(j)?{type:!1}:E,t,C));const Q=N.animation;Q&&b.push(Q)}if(h){const j=()=>Xe.update(()=>{h&&bC(t,h)});b.length?Promise.all(b).then(j):j()}return b}function Df(t,n,r={}){var p;const l=Cs(t,n,r.type==="exit"?(p=t.presenceContext)==null?void 0:p.custom:void 0);let{transition:c=t.getDefaultTransition()||{}}=l||{};r.transitionOverride&&(c=r.transitionOverride);const u=l?()=>Promise.all(I1(t,l,r)):()=>Promise.resolve(),h=t.variantChildren&&t.variantChildren.size?(m=0)=>{const{delayChildren:x=0,staggerChildren:b,staggerDirection:v}=c;return NC(t,n,m,x,b,v,r)}:()=>Promise.resolve(),{when:g}=c;if(g){const[m,x]=g==="beforeChildren"?[u,h]:[h,u];return m().then(()=>x())}else return Promise.all([u(),h(r.delay)])}function NC(t,n,r=0,l=0,c=0,u=1,h){const g=[];for(const p of t.variantChildren)p.notify("AnimationStart",n),g.push(Df(p,n,{...h,delay:r+(typeof l=="function"?0:l)+V1(t.variantChildren,p,l,c,u)}).then(()=>p.notify("AnimationComplete",n)));return Promise.all(g)}function jC(t,n,r={}){t.notify("AnimationStart",n);let l;if(Array.isArray(n)){const c=n.map(u=>Df(t,u,r));l=Promise.all(c)}else if(typeof n=="string")l=Df(t,n,r);else{const c=typeof n=="function"?Cs(t,n,r.custom):n;l=Promise.all(I1(t,c,r))}return l.then(()=>{t.notify("AnimationComplete",n)})}const kC={test:t=>t==="auto",parse:t=>t},Y1=t=>n=>n.test(t),$1=[Oi,me,Ua,un,KS,XS,kC],_0=t=>$1.find(Y1(t));function SC(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||n1(t):!0}const CC=new Set(["brightness","contrast","saturate","opacity"]);function EC(t){const[n,r]=t.slice(0,-1).split("(");if(n==="drop-shadow")return t;const[l]=r.match(yh)||[];if(!l)return t;const c=r.replace(l,"");let u=CC.has(n)?1:0;return l!==r&&(u*=100),n+"("+u+c+")"}const AC=/\b([a-z-]*)\(.*?\)/gu,Of={...Sa,getAnimatableNone:t=>{const n=t.match(AC);return n?n.map(EC).join(" "):t}},_f={...Sa,getAnimatableNone:t=>{const n=Sa.parse(t);return Sa.createTransformer(t)(n.map(l=>typeof l=="number"?0:typeof l=="object"?{...l,alpha:1}:l))}},z0={...Oi,transform:Math.round},TC={rotate:un,pathRotation:un,rotateX:un,rotateY:un,rotateZ:un,scale:So,scaleX:So,scaleY:So,scaleZ:So,skew:un,skewX:un,skewY:un,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Yr,originX:w0,originY:w0,originZ:me},Wo={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,inset:me,insetBlock:me,insetBlockStart:me,insetBlockEnd:me,insetInline:me,insetInlineStart:me,insetInlineEnd:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,paddingBlock:me,paddingBlockStart:me,paddingBlockEnd:me,paddingInline:me,paddingInlineStart:me,paddingInlineEnd:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,marginBlock:me,marginBlockStart:me,marginBlockEnd:me,marginInline:me,marginInlineStart:me,marginInlineEnd:me,fontSize:me,backgroundPositionX:me,backgroundPositionY:me,...TC,zIndex:z0,fillOpacity:Yr,strokeOpacity:Yr,numOctaves:z0},MC={...Wo,color:dt,backgroundColor:dt,outlineColor:dt,fill:dt,stroke:dt,borderColor:dt,borderTopColor:dt,borderRightColor:dt,borderBottomColor:dt,borderLeftColor:dt,filter:Of,WebkitFilter:Of,mask:_f,WebkitMask:_f},F1=t=>MC[t],RC=new Set([Of,_f]);function Q1(t,n){let r=F1(t);return RC.has(r)||(r=Sa),r.getAnimatableNone?r.getAnimatableNone(n):void 0}const DC=new Set(["auto","none","0"]);function OC(t,n,r){let l=0,c;for(;l<t.length&&!c;){const u=t[l];typeof u=="string"&&!DC.has(u)&&Ei(u).values.length&&(c=t[l]),l++}if(c&&r)for(const u of n)t[u]=Q1(r,c)}class _C extends kh{constructor(n,r,l,c,u){super(n,r,l,c,u,!0)}readKeyframes(){const{unresolvedKeyframes:n,element:r,name:l}=this;if(!r||!r.current)return;super.readKeyframes();for(let x=0;x<n.length;x++){let b=n[x];if(typeof b=="string"&&(b=b.trim(),bh(b))){const v=B1(b,r.current);v!==void 0&&(n[x]=v),x===n.length-1&&(this.finalKeyframe=b)}}if(this.resolveNoneKeyframes(),!q1.has(l)||n.length!==2)return;const[c,u]=n,h=_0(c),g=_0(u),p=v0(c),m=v0(u);if(p!==m&&Yn[l]){this.needsMeasurement=!0;return}if(h!==g)if(T0(h)&&T0(g))for(let x=0;x<n.length;x++){const b=n[x];typeof b=="string"&&(n[x]=parseFloat(b))}else Yn[l]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:n,name:r}=this,l=[];for(let c=0;c<n.length;c++)(n[c]===null||SC(n[c]))&&l.push(c);l.length&&OC(n,l,r)}measureInitialState(){const{element:n,unresolvedKeyframes:r,name:l}=this;if(!n||!n.current)return;l==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Yn[l](n.measureViewportBox(),window.getComputedStyle(n.current)),r[0]=this.measuredOrigin;const c=r[r.length-1];c!==void 0&&n.getValue(l,c).jump(c,!1)}measureEndState(){var g;const{element:n,name:r,unresolvedKeyframes:l}=this;if(!n||!n.current)return;const c=n.getValue(r);c&&c.jump(this.measuredOrigin,!1);const u=l.length-1,h=l[u];l[u]=Yn[r](n.measureViewportBox(),window.getComputedStyle(n.current)),h!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=h),(g=this.removedTransforms)!=null&&g.length&&this.removedTransforms.forEach(([p,m])=>{n.getValue(p).set(m)}),this.resolveNoneKeyframes()}}function X1(t,n,r){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let l=document;const c=(r==null?void 0:r[t])??l.querySelectorAll(t);return c?Array.from(c):[]}return Array.from(t).filter(l=>l!=null)}const zf=(t,n)=>n&&typeof t=="number"?n.transform(t):t;function Do(t){return a1(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Th}=x1(queueMicrotask,!1),ja={x:!1,y:!1};function K1(){return ja.x||ja.y}function zC(t){return t==="x"||t==="y"?ja[t]?null:(ja[t]=!0,()=>{ja[t]=!1}):ja.x||ja.y?null:(ja.x=ja.y=!0,()=>{ja.x=ja.y=!1})}function W1(t,n){const r=X1(t),l=new AbortController,c={passive:!0,...n,signal:l.signal};return[r,c,()=>l.abort()]}function PC(t){return!(t.pointerType==="touch"||K1())}function LC(t,n,r={}){const[l,c,u]=W1(t,r);return l.forEach(h=>{let g=!1,p=!1,m;const x=()=>{h.removeEventListener("pointerleave",j)},b=A=>{m&&(m(A),m=void 0),x()},v=A=>{g=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),p&&(p=!1,b(A))},w=()=>{g=!0,window.addEventListener("pointerup",v,c),window.addEventListener("pointercancel",v,c)},j=A=>{if(A.pointerType!=="touch"){if(g){p=!0;return}b(A)}},N=A=>{if(!PC(A))return;p=!1;const E=n(h,A);typeof E=="function"&&(m=E,h.addEventListener("pointerleave",j,c))};h.addEventListener("pointerenter",N,c),h.addEventListener("pointerdown",w,c)}),u}const Z1=(t,n)=>n?t===n?!0:Z1(t,n.parentElement):!1,Mh=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,VC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function UC(t){return VC.has(t.tagName)||t.isContentEditable===!0}const BC=new Set(["INPUT","SELECT","TEXTAREA"]);function qC(t){return BC.has(t.tagName)||t.isContentEditable===!0}const Oo=new WeakSet;function P0(t){return n=>{n.key==="Enter"&&t(n)}}function Ku(t,n){t.dispatchEvent(new PointerEvent("pointer"+n,{isPrimary:!0,bubbles:!0}))}const HC=(t,n)=>{const r=t.currentTarget;if(!r)return;const l=P0(()=>{if(Oo.has(r))return;Ku(r,"down");const c=P0(()=>{Ku(r,"up")}),u=()=>Ku(r,"cancel");r.addEventListener("keyup",c,n),r.addEventListener("blur",u,n)});r.addEventListener("keydown",l,n),r.addEventListener("blur",()=>r.removeEventListener("keydown",l),n)};function L0(t){return Mh(t)&&!K1()}const V0=new WeakSet;function GC(t,n,r={}){const[l,c,u]=W1(t,r),h=g=>{const p=g.currentTarget;if(!L0(g)||V0.has(g))return;Oo.add(p),r.stopPropagation&&V0.add(g);const m=n(p,g),x=(w,j)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",v),Oo.has(p)&&Oo.delete(p),L0(w)&&typeof m=="function"&&m(w,{success:j})},b=w=>{x(w,p===window||p===document||r.useGlobalTarget||Z1(p,w.target))},v=w=>{x(w,!1)};window.addEventListener("pointerup",b,c),window.addEventListener("pointercancel",v,c)};return l.forEach(g=>{(r.useGlobalTarget?window:g).addEventListener("pointerdown",h,c),Do(g)&&(g.addEventListener("focus",m=>HC(m,c)),!UC(g)&&!g.hasAttribute("tabindex")&&(g.tabIndex=0))}),u}function Rh(t){return a1(t)&&"ownerSVGElement"in t}const _o=new WeakMap;let Gn;const J1=(t,n,r)=>(l,c)=>c&&c[0]?c[0][t+"Size"]:Rh(l)&&"getBBox"in l?l.getBBox()[n]:l[r],IC=J1("inline","width","offsetWidth"),YC=J1("block","height","offsetHeight");function $C({target:t,borderBoxSize:n}){var r;(r=_o.get(t))==null||r.forEach(l=>{l(t,{get width(){return IC(t,n)},get height(){return YC(t,n)}})})}function FC(t){t.forEach($C)}function QC(){typeof ResizeObserver>"u"||(Gn=new ResizeObserver(FC))}function XC(t,n){Gn||QC();const r=X1(t);return r.forEach(l=>{let c=_o.get(l);c||(c=new Set,_o.set(l,c)),c.add(n),Gn==null||Gn.observe(l)}),()=>{r.forEach(l=>{const c=_o.get(l);c==null||c.delete(n),c!=null&&c.size||Gn==null||Gn.unobserve(l)})}}const zo=new Set;let vi;function KC(){vi=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};zo.forEach(n=>n(t))},window.addEventListener("resize",vi)}function WC(t){return zo.add(t),vi||KC(),()=>{zo.delete(t),!zo.size&&typeof vi=="function"&&(window.removeEventListener("resize",vi),vi=void 0)}}function U0(t,n){return typeof t=="function"?WC(t):XC(t,n)}function ZC(t){return Rh(t)&&t.tagName==="svg"}const JC=[...$1,dt,Sa],eE=t=>JC.find(Y1(t)),B0=()=>({translate:0,scale:1,origin:0,originPoint:0}),wi=()=>({x:B0(),y:B0()}),q0=()=>({min:0,max:0}),ht=()=>({x:q0(),y:q0()}),tE=new WeakMap;function pc(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function $r(t){return typeof t=="string"||Array.isArray(t)}const Dh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oh=["initial",...Dh];function xc(t){return pc(t.animate)||Oh.some(n=>$r(t[n]))}function ev(t){return!!(xc(t)||t.variants)}function aE(t,n,r){for(const l in n){const c=n[l],u=r[l];if(Ct(c))t.addValue(l,c);else if(Ct(u))t.addValue(l,Ai(c,{owner:t}));else if(u!==c)if(t.hasValue(l)){const h=t.getValue(l);h.liveStyle===!0?h.jump(c):h.hasAnimated||h.set(c)}else{const h=t.getStaticValue(l);t.addValue(l,Ai(h!==void 0?h:c,{owner:t}))}}for(const l in r)n[l]===void 0&&t.removeValue(l);return n}const Pf={current:null},tv={current:!1},nE=typeof window<"u";function sE(){if(tv.current=!0,!!nE)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),n=()=>Pf.current=t.matches;t.addEventListener("change",n),n()}else Pf.current=!1}const H0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Zo={};function av(t){Zo=t}function iE(){return Zo}class rE{scrapeMotionValuesFromProps(n,r,l){return{}}constructor({parent:n,props:r,presenceContext:l,reducedMotionConfig:c,skipAnimations:u,blockInitialAnimation:h,visualState:g},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=kh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=Mt.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,Xe.render(this.render,!1,!0))};const{latestValues:m,renderState:x}=g;this.latestValues=m,this.baseTarget={...m},this.initialValues=r.initial?{...m}:{},this.renderState=x,this.parent=n,this.props=r,this.presenceContext=l,this.depth=n?n.depth+1:0,this.reducedMotionConfig=c,this.skipAnimationsConfig=u,this.options=p,this.blockInitialAnimation=!!h,this.isControllingVariants=xc(r),this.isVariantNode=ev(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(n&&n.current);const{willChange:b,...v}=this.scrapeMotionValuesFromProps(r,{},this);for(const w in v){const j=v[w];m[w]!==void 0&&Ct(j)&&j.set(m[w])}}mount(n){var r,l;if(this.hasBeenMounted)for(const c in this.initialValues)(r=this.values.get(c))==null||r.jump(this.initialValues[c]),this.latestValues[c]=this.initialValues[c];this.current=n,tE.set(n,this),this.projection&&!this.projection.instance&&this.projection.mount(n),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((c,u)=>this.bindToMotionValue(u,c)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(tv.current||sE(),this.shouldReduceMotion=Pf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(l=this.parent)==null||l.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var n;this.projection&&this.projection.unmount(),Xn(this.notifyUpdate),Xn(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(n=this.parent)==null||n.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const l=this.features[r];l&&(l.unmount(),l.isMounted=!1)}this.current=null}addChild(n){this.children.add(n),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(n)}removeChild(n){this.children.delete(n),this.enteringChildren&&this.enteringChildren.delete(n)}bindToMotionValue(n,r){if(this.valueSubscriptions.has(n)&&this.valueSubscriptions.get(n)(),r.accelerate&&L1.has(n)&&this.current instanceof HTMLElement){const{factory:h,keyframes:g,times:p,ease:m,duration:x}=r.accelerate,b=new z1({element:this.current,name:n,keyframes:g,times:p,ease:m,duration:Jt(x)}),v=h(b);this.valueSubscriptions.set(n,()=>{v(),b.cancel()});return}const l=zi.has(n);l&&this.onBindTransform&&this.onBindTransform();const c=r.on("change",h=>{this.latestValues[n]=h,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),l&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let u;typeof window<"u"&&window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,n,r)),this.valueSubscriptions.set(n,()=>{c(),u&&u()})}sortNodePosition(n){return!this.current||!this.sortInstanceNodePosition||this.type!==n.type?0:this.sortInstanceNodePosition(this.current,n.current)}updateFeatures(){let n="animation";for(n in Zo){const r=Zo[n];if(!r)continue;const{isEnabled:l,Feature:c}=r;if(!this.features[n]&&c&&l(this.props)&&(this.features[n]=new c(this)),this.features[n]){const u=this.features[n];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ht()}getStaticValue(n){return this.latestValues[n]}setStaticValue(n,r){this.latestValues[n]=r}update(n,r){(n.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=n,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let l=0;l<H0.length;l++){const c=H0[l];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const u="on"+c,h=n[u];h&&(this.propEventSubscriptions[c]=this.on(c,h))}this.prevMotionValues=aE(this,this.scrapeMotionValuesFromProps(n,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(n){return this.props.variants?this.props.variants[n]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(n){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(n),()=>r.variantChildren.delete(n)}addValue(n,r){const l=this.values.get(n);r!==l&&(l&&this.removeValue(n),this.bindToMotionValue(n,r),this.values.set(n,r),this.latestValues[n]=r.get())}removeValue(n){this.values.delete(n);const r=this.valueSubscriptions.get(n);r&&(r(),this.valueSubscriptions.delete(n)),delete this.latestValues[n],this.removeValueFromRenderState(n,this.renderState)}hasValue(n){return this.values.has(n)}getValue(n,r){if(this.props.values&&this.props.values[n])return this.props.values[n];let l=this.values.get(n);return l===void 0&&r!==void 0&&(l=Ai(r===null?void 0:r,{owner:this}),this.addValue(n,l)),l}readValue(n,r){let l=this.latestValues[n]!==void 0||!this.current?this.latestValues[n]:this.getBaseTargetFromProps(this.props,n)??this.readValueFromInstance(this.current,n,this.options);return l!=null&&(typeof l=="string"&&(t1(l)||n1(l))?l=parseFloat(l):!eE(l)&&Sa.test(r)&&(l=Q1(n,r)),this.setBaseTarget(n,Ct(l)?l.get():l)),Ct(l)?l.get():l}setBaseTarget(n,r){this.baseTarget[n]=r}getBaseTarget(n){var u;const{initial:r}=this.props;let l;if(typeof r=="string"||typeof r=="object"){const h=Eh(this.props,r,(u=this.presenceContext)==null?void 0:u.custom);h&&(l=h[n])}if(r&&l!==void 0)return l;const c=this.getBaseTargetFromProps(this.props,n);return c!==void 0&&!Ct(c)?c:this.initialValues[n]!==void 0&&l===void 0?void 0:this.baseTarget[n]}on(n,r){return this.events[n]||(this.events[n]=new ph),this.events[n].add(r)}notify(n,...r){this.events[n]&&this.events[n].notify(...r)}scheduleRenderMicrotask(){Th.render(this.render)}}class nv extends rE{constructor(){super(...arguments),this.KeyframeResolver=_C}sortInstanceNodePosition(n,r){return n.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(n,r){const l=n.style;return l?l[r]:void 0}removeValueFromRenderState(n,{vars:r,style:l}){delete r[n],delete l[n]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:n}=this.props;Ct(n)&&(this.childSubscription=n.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Jn{constructor(n){this.isMounted=!1,this.node=n}update(){}}function sv({top:t,left:n,right:r,bottom:l}){return{x:{min:n,max:r},y:{min:t,max:l}}}function lE({x:t,y:n}){return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function oE(t,n){if(!n)return t;const r=n({x:t.left,y:t.top}),l=n({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:l.y,right:l.x}}function Wu(t){return t===void 0||t===1}function Lf({scale:t,scaleX:n,scaleY:r}){return!Wu(t)||!Wu(n)||!Wu(r)}function vs(t){return Lf(t)||iv(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function iv(t){return G0(t.x)||G0(t.y)}function G0(t){return t&&t!=="0%"}function Jo(t,n,r){const l=t-r,c=n*l;return r+c}function I0(t,n,r,l,c){return c!==void 0&&(t=Jo(t,c,l)),Jo(t,r,l)+n}function Vf(t,n=0,r=1,l,c){t.min=I0(t.min,n,r,l,c),t.max=I0(t.max,n,r,l,c)}function rv(t,{x:n,y:r}){Vf(t.x,n.translate,n.scale,n.originPoint),Vf(t.y,r.translate,r.scale,r.originPoint)}const Y0=.999999999999,$0=1.0000000000001;function cE(t,n,r,l=!1){var g;const c=r.length;if(!c)return;n.x=n.y=1;let u,h;for(let p=0;p<c;p++){u=r[p],h=u.projectionDelta;const{visualElement:m}=u.options;m&&m.props.style&&m.props.style.display==="contents"||(l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(za(t.x,-u.scroll.offset.x),za(t.y,-u.scroll.offset.y)),h&&(n.x*=h.x.scale,n.y*=h.y.scale,rv(t,h)),l&&vs(u.latestValues)&&Po(t,u.latestValues,(g=u.layout)==null?void 0:g.layoutBox))}n.x<$0&&n.x>Y0&&(n.x=1),n.y<$0&&n.y>Y0&&(n.y=1)}function za(t,n){t.min+=n,t.max+=n}function F0(t,n,r,l,c=.5){const u=Qe(t.min,t.max,c);Vf(t,n,r,u,l)}function Q0(t,n){return typeof t=="string"?parseFloat(t)/100*(n.max-n.min):t}function Po(t,n,r){const l=r??t;F0(t.x,Q0(n.x,l.x),n.scaleX,n.scale,n.originX),F0(t.y,Q0(n.y,l.y),n.scaleY,n.scale,n.originY)}function lv(t,n){return sv(oE(t.getBoundingClientRect(),n))}function dE(t,n,r){const l=lv(t,r),{scroll:c}=n;return c&&(za(l.x,c.offset.x),za(l.y,c.offset.y)),l}const uE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fE=_i.length;function hE(t,n,r){let l="",c=!0;for(let h=0;h<fE;h++){const g=_i[h],p=t[g];if(p===void 0)continue;let m=!0;if(typeof p=="number")m=p===(g.startsWith("scale")?1:0);else{const x=parseFloat(p);m=g.startsWith("scale")?x===1:x===0}if(!m||r){const x=zf(p,Wo[g]);if(!m){c=!1;const b=uE[g]||g;l+=`${b}(${x}) `}r&&(n[g]=x)}}const u=t.pathRotation;return u&&(c=!1,l+=`rotate(${zf(u,Wo.pathRotation)}) `),l=l.trim(),r?l=r(n,c?"":l):c&&(l="none"),l}function _h(t,n,r){const{style:l,vars:c,transformOrigin:u}=t;let h=!1,g=!1;for(const p in n){const m=n[p];if(zi.has(p)){h=!0;continue}else if(b1(p)){c[p]=m;continue}else{const x=zf(m,Wo[p]);p.startsWith("origin")?(g=!0,u[p]=x):l[p]=x}}if(n.transform||(h||r?l.transform=hE(n,t.transform,r):l.transform&&(l.transform="none")),g){const{originX:p="50%",originY:m="50%",originZ:x=0}=u;l.transformOrigin=`${p} ${m} ${x}`}}function ov(t,{style:n,vars:r},l,c){const u=t.style;let h;for(h in n)u[h]=n[h];c==null||c.applyProjectionStyles(u,l);for(h in r)u.setProperty(h,r[h])}function X0(t,n){return n.max===n.min?0:t/(n.max-n.min)*100}const _r={correct:(t,n)=>{if(!n.target)return t;if(typeof t=="string")if(me.test(t))t=parseFloat(t);else return t;const r=X0(t,n.target.x),l=X0(t,n.target.y);return`${r}% ${l}%`}},mE={correct:(t,{treeScale:n,projectionDelta:r})=>{const l=t,c=Sa.parse(t);if(c.length>5)return l;const u=Sa.createTransformer(t),h=typeof c[0]!="number"?1:0,g=r.x.scale*n.x,p=r.y.scale*n.y;c[0+h]/=g,c[1+h]/=p;const m=Qe(g,p,.5);return typeof c[2+h]=="number"&&(c[2+h]/=m),typeof c[3+h]=="number"&&(c[3+h]/=m),u(c)}},Uf={borderRadius:{..._r,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_r,borderTopRightRadius:_r,borderBottomLeftRadius:_r,borderBottomRightRadius:_r,boxShadow:mE};function cv(t,{layout:n,layoutId:r}){return zi.has(t)||t.startsWith("origin")||(n||r!==void 0)&&(!!Uf[t]||t==="opacity")}function zh(t,n,r){var h;const l=t.style,c=n==null?void 0:n.style,u={};if(!l)return u;for(const g in l)(Ct(l[g])||c&&Ct(c[g])||cv(g,t)||((h=r==null?void 0:r.getValue(g))==null?void 0:h.liveStyle)!==void 0)&&(u[g]=l[g]);return u}function pE(t){return window.getComputedStyle(t)}class xE extends nv{constructor(){super(...arguments),this.type="html",this.renderInstance=ov}readValueFromInstance(n,r){var l;if(zi.has(r))return(l=this.projection)!=null&&l.isProjecting?kf(r):P3(n,r);{const c=pE(n),u=(b1(r)?c.getPropertyValue(r):c[r])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(n,{transformPagePoint:r}){return lv(n,r)}build(n,r,l){_h(n,r,l.transformTemplate)}scrapeMotionValuesFromProps(n,r,l){return zh(n,r,l)}}const gE={offset:"stroke-dashoffset",array:"stroke-dasharray"},bE={offset:"strokeDashoffset",array:"strokeDasharray"};function yE(t,n,r=1,l=0,c=!0){t.pathLength=1;const u=c?gE:bE;t[u.offset]=`${-l}`,t[u.array]=`${n} ${r}`}const vE=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dv(t,{attrX:n,attrY:r,attrScale:l,pathLength:c,pathSpacing:u=1,pathOffset:h=0,...g},p,m,x){if(_h(t,g,m),p){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:b,style:v}=t;b.transform&&(v.transform=b.transform,delete b.transform),(v.transform||b.transformOrigin)&&(v.transformOrigin=b.transformOrigin??"50% 50%",delete b.transformOrigin),v.transform&&(v.transformBox=(x==null?void 0:x.transformBox)??"fill-box",delete b.transformBox);for(const w of vE)b[w]!==void 0&&(v[w]=b[w],delete b[w]);n!==void 0&&(b.x=n),r!==void 0&&(b.y=r),l!==void 0&&(b.scale=l),c!==void 0&&yE(b,c,u,h,!1)}const uv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),fv=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wE(t,n,r,l){ov(t,n,void 0,l);for(const c in n.attrs)t.setAttribute(uv.has(c)?c:Ah(c),n.attrs[c])}function hv(t,n,r){const l=zh(t,n,r);for(const c in t)if(Ct(t[c])||Ct(n[c])){const u=_i.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;l[u]=t[c]}return l}class NE extends nv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ht}getBaseTargetFromProps(n,r){return n[r]}readValueFromInstance(n,r){if(zi.has(r)){const l=F1(r);return l&&l.default||0}return r=uv.has(r)?r:Ah(r),n.getAttribute(r)}scrapeMotionValuesFromProps(n,r,l){return hv(n,r,l)}build(n,r,l){dv(n,r,this.isSVGTag,l.transformTemplate,l.style)}renderInstance(n,r,l,c){wE(n,r,l,c)}mount(n){this.isSVGTag=fv(n.tagName),super.mount(n)}}const jE=Oh.length;function mv(t){if(!t)return;if(!t.isControllingVariants){const r=t.parent?mv(t.parent)||{}:{};return t.props.initial!==void 0&&(r.initial=t.props.initial),r}const n={};for(let r=0;r<jE;r++){const l=Oh[r],c=t.props[l];($r(c)||c===!1)&&(n[l]=c)}return n}function pv(t,n){if(!Array.isArray(n))return!1;const r=n.length;if(r!==t.length)return!1;for(let l=0;l<r;l++)if(n[l]!==t[l])return!1;return!0}const kE=[...Dh].reverse(),SE=Dh.length;function CE(t){return n=>Promise.all(n.map(({animation:r,options:l})=>jC(t,r,l)))}function EE(t){let n=CE(t),r=K0(),l=!0,c=!1;const u=m=>(x,b)=>{var w;const v=Cs(t,b,m==="exit"?(w=t.presenceContext)==null?void 0:w.custom:void 0);if(v){const{transition:j,transitionEnd:N,...A}=v;x={...x,...A,...N}}return x};function h(m){n=m(t)}function g(m){const{props:x}=t,b=mv(t.parent)||{},v=[],w=new Set;let j={},N=1/0;for(let E=0;E<SE;E++){const D=kE[E],C=r[D],O=x[D]!==void 0?x[D]:b[D],Q=$r(O),z=D===m?C.isActive:null;z===!1&&(N=E);let I=O===b[D]&&O!==x[D]&&Q;if(I&&(l||c)&&t.manuallyAnimateOnMount&&(I=!1),C.protectedKeys={...j},!C.isActive&&z===null||!O&&!C.prevProp||pc(O)||typeof O=="boolean")continue;if(D==="exit"&&C.isActive&&z!==!0){C.prevResolvedValues&&(j={...j,...C.prevResolvedValues});continue}const P=AE(C.prevProp,O);let ee=P||D===m&&C.isActive&&!I&&Q||E>N&&Q,W=!1;const le=Array.isArray(O)?O:[O];let de=le.reduce(u(D),{});z===!1&&(de={});const{prevResolvedValues:ge={}}=C,be={...ge,...de},te=ae=>{ee=!0,w.has(ae)&&(W=!0,w.delete(ae)),C.needsAnimating[ae]=!0;const H=t.getValue(ae);H&&(H.liveStyle=!1)};for(const ae in be){const H=de[ae],M=ge[ae];if(j.hasOwnProperty(ae))continue;let T=!1;Mf(H)&&Mf(M)?T=!pv(H,M)||P:T=H!==M,T?H!=null?te(ae):w.add(ae):H!==void 0&&w.has(ae)?te(ae):C.protectedKeys[ae]=!0}C.prevProp=O,C.prevResolvedValues=de,C.isActive&&(j={...j,...de}),(l||c)&&t.blockInitialAnimation&&(ee=!1);const V=I&&P;ee&&(!V||W)&&v.push(...le.map(ae=>{const H={type:D};if(typeof ae=="string"&&(l||c)&&!V&&t.manuallyAnimateOnMount&&t.parent){const{parent:M}=t,T=Cs(M,ae);if(M.enteringChildren&&T){const{delayChildren:U}=T.transition||{};H.delay=V1(M.enteringChildren,t,U)}}return{animation:ae,options:H}}))}if(w.size){const E={};if(typeof x.initial!="boolean"){const D=Cs(t,Array.isArray(x.initial)?x.initial[0]:x.initial);D&&D.transition&&(E.transition=D.transition)}w.forEach(D=>{const C=t.getBaseTarget(D),O=t.getValue(D);O&&(O.liveStyle=!0),E[D]=C??null}),v.push({animation:E})}let A=!!v.length;return l&&(x.initial===!1||x.initial===x.animate)&&!t.manuallyAnimateOnMount&&(A=!1),l=!1,c=!1,A?n(v):Promise.resolve()}function p(m,x){var v;if(r[m].isActive===x)return Promise.resolve();(v=t.variantChildren)==null||v.forEach(w=>{var j;return(j=w.animationState)==null?void 0:j.setActive(m,x)}),r[m].isActive=x;const b=g(m);for(const w in r)r[w].protectedKeys={};return b}return{animateChanges:g,setActive:p,setAnimateFunction:h,getState:()=>r,reset:()=>{r=K0(),c=!0}}}function AE(t,n){return typeof n=="string"?n!==t:Array.isArray(n)?!pv(n,t):!1}function ys(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function K0(){return{animate:ys(!0),whileInView:ys(),whileHover:ys(),whileTap:ys(),whileDrag:ys(),whileFocus:ys(),exit:ys()}}function Bf(t,n){t.min=n.min,t.max=n.max}function wa(t,n){Bf(t.x,n.x),Bf(t.y,n.y)}function W0(t,n){t.translate=n.translate,t.scale=n.scale,t.originPoint=n.originPoint,t.origin=n.origin}const xv=1e-4,TE=1-xv,ME=1+xv,gv=.01,RE=0-gv,DE=0+gv;function Rt(t){return t.max-t.min}function OE(t,n,r){return Math.abs(t-n)<=r}function Z0(t,n,r,l=.5){t.origin=l,t.originPoint=Qe(n.min,n.max,t.origin),t.scale=Rt(r)/Rt(n),t.translate=Qe(r.min,r.max,t.origin)-t.originPoint,(t.scale>=TE&&t.scale<=ME||isNaN(t.scale))&&(t.scale=1),(t.translate>=RE&&t.translate<=DE||isNaN(t.translate))&&(t.translate=0)}function Br(t,n,r,l){Z0(t.x,n.x,r.x,l?l.originX:void 0),Z0(t.y,n.y,r.y,l?l.originY:void 0)}function J0(t,n,r,l=0){const c=l?Qe(r.min,r.max,l):r.min;t.min=c+n.min,t.max=t.min+Rt(n)}function _E(t,n,r,l){J0(t.x,n.x,r.x,l==null?void 0:l.x),J0(t.y,n.y,r.y,l==null?void 0:l.y)}function eb(t,n,r,l=0){const c=l?Qe(r.min,r.max,l):r.min;t.min=n.min-c,t.max=t.min+Rt(n)}function ec(t,n,r,l){eb(t.x,n.x,r.x,l==null?void 0:l.x),eb(t.y,n.y,r.y,l==null?void 0:l.y)}function tb(t,n,r,l,c){return t-=n,t=Jo(t,1/r,l),c!==void 0&&(t=Jo(t,1/c,l)),t}function zE(t,n=0,r=1,l=.5,c,u=t,h=t){if(Ua.test(n)&&(n=parseFloat(n),n=Qe(h.min,h.max,n/100)-h.min),typeof n!="number")return;let g=Qe(u.min,u.max,l);t===u&&(g-=n),t.min=tb(t.min,n,r,g,c),t.max=tb(t.max,n,r,g,c)}function ab(t,n,[r,l,c],u,h){zE(t,n[r],n[l],n[c],n.scale,u,h)}const PE=["x","scaleX","originX"],LE=["y","scaleY","originY"];function nb(t,n,r,l){ab(t.x,n,PE,r?r.x:void 0,l?l.x:void 0),ab(t.y,n,LE,r?r.y:void 0,l?l.y:void 0)}function sb(t){return t.translate===0&&t.scale===1}function bv(t){return sb(t.x)&&sb(t.y)}function ib(t,n){return t.min===n.min&&t.max===n.max}function VE(t,n){return ib(t.x,n.x)&&ib(t.y,n.y)}function rb(t,n){return Math.round(t.min)===Math.round(n.min)&&Math.round(t.max)===Math.round(n.max)}function yv(t,n){return rb(t.x,n.x)&&rb(t.y,n.y)}function lb(t){return Rt(t.x)/Rt(t.y)}function ob(t,n){return t.translate===n.translate&&t.scale===n.scale&&t.originPoint===n.originPoint}function _a(t){return[t("x"),t("y")]}function UE(t,n,r){let l="";const c=t.x.translate/n.x,u=t.y.translate/n.y,h=(r==null?void 0:r.z)||0;if((c||u||h)&&(l=`translate3d(${c}px, ${u}px, ${h}px) `),(n.x!==1||n.y!==1)&&(l+=`scale(${1/n.x}, ${1/n.y}) `),r){const{transformPerspective:m,rotate:x,pathRotation:b,rotateX:v,rotateY:w,skewX:j,skewY:N}=r;m&&(l=`perspective(${m}px) ${l}`),x&&(l+=`rotate(${x}deg) `),b&&(l+=`rotate(${b}deg) `),v&&(l+=`rotateX(${v}deg) `),w&&(l+=`rotateY(${w}deg) `),j&&(l+=`skewX(${j}deg) `),N&&(l+=`skewY(${N}deg) `)}const g=t.x.scale*n.x,p=t.y.scale*n.y;return(g!==1||p!==1)&&(l+=`scale(${g}, ${p})`),l||"none"}const vv=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],BE=vv.length,cb=t=>typeof t=="string"?parseFloat(t):t,db=t=>typeof t=="number"||me.test(t);function qE(t,n,r,l,c,u){c?(t.opacity=Qe(0,r.opacity??1,HE(l)),t.opacityExit=Qe(n.opacity??1,0,GE(l))):u&&(t.opacity=Qe(n.opacity??1,r.opacity??1,l));for(let h=0;h<BE;h++){const g=vv[h];let p=ub(n,g),m=ub(r,g);if(p===void 0&&m===void 0)continue;p||(p=0),m||(m=0),p===0||m===0||db(p)===db(m)?(t[g]=Math.max(Qe(cb(p),cb(m),l),0),(Ua.test(m)||Ua.test(p))&&(t[g]+="%")):t[g]=m}(n.rotate||r.rotate)&&(t.rotate=Qe(n.rotate||0,r.rotate||0,l))}function ub(t,n){return t[n]!==void 0?t[n]:t.borderRadius}const HE=wv(0,.5,f1),GE=wv(.5,.95,ha);function wv(t,n,r){return l=>l<t?0:l>n?1:r(Ir(t,n,l))}function IE(t,n,r){const l=Ct(t)?t:Ai(t);return l.start(Ch("",l,n,r)),l.animation}function Fr(t,n,r,l={passive:!0}){return t.addEventListener(n,r,l),()=>t.removeEventListener(n,r)}const YE=(t,n)=>t.depth-n.depth;class $E{constructor(){this.children=[],this.isDirty=!1}add(n){hh(this.children,n),this.isDirty=!0}remove(n){$o(this.children,n),this.isDirty=!0}forEach(n){this.isDirty&&this.children.sort(YE),this.isDirty=!1,this.children.forEach(n)}}function FE(t,n){const r=Mt.now(),l=({timestamp:c})=>{const u=c-r;u>=n&&(Xn(l),t(u-n))};return Xe.setup(l,!0),()=>Xn(l)}function Lo(t){return Ct(t)?t.get():t}class QE{constructor(){this.members=[]}add(n){hh(this.members,n);for(let r=this.members.length-1;r>=0;r--){const l=this.members[r];if(l===n||l===this.lead||l===this.prevLead)continue;const c=l.instance;(!c||c.isConnected===!1)&&!l.snapshot&&($o(this.members,l),l.unmount())}n.scheduleRender()}remove(n){if($o(this.members,n),n===this.prevLead&&(this.prevLead=void 0),n===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(n){var r;for(let l=this.members.indexOf(n)-1;l>=0;l--){const c=this.members[l];if(c.isPresent!==!1&&((r=c.instance)==null?void 0:r.isConnected)!==!1)return this.promote(c),!0}return!1}promote(n,r){var c;const l=this.lead;if(n!==l&&(this.prevLead=l,this.lead=n,n.show(),l)){l.updateSnapshot(),n.scheduleRender();const{layoutDependency:u}=l.options,{layoutDependency:h}=n.options;(u===void 0||u!==h)&&(n.resumeFrom=l,r&&(l.preserveOpacity=!0),l.snapshot&&(n.snapshot=l.snapshot,n.snapshot.latestValues=l.animationValues||l.latestValues),(c=n.root)!=null&&c.isUpdating&&(n.isLayoutDirty=!0)),n.options.crossfade===!1&&l.hide()}}exitAnimationComplete(){this.members.forEach(n=>{var r,l,c,u,h;(l=(r=n.options).onExitComplete)==null||l.call(r),(h=(c=n.resumingFrom)==null?void 0:(u=c.options).onExitComplete)==null||h.call(u)})}scheduleRender(){this.members.forEach(n=>n.instance&&n.scheduleRender(!1))}removeLeadSnapshot(){var n;(n=this.lead)!=null&&n.snapshot&&(this.lead.snapshot=void 0)}}const Vo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Zu=["","X","Y","Z"],XE=1e3;let KE=0;function Ju(t,n,r,l){const{latestValues:c}=n;c[t]&&(r[t]=c[t],n.setStaticValue(t,0),l&&(l[t]=0))}function Nv(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:n}=t.options;if(!n)return;const r=G1(n);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:c,layoutId:u}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",Xe,!(c||u))}const{parent:l}=t;l&&!l.hasCheckedOptimisedAppear&&Nv(l)}function jv({attachResizeListener:t,defaultParent:n,measureScroll:r,checkIsScrollRoot:l,resetTransform:c}){return class{constructor(h={},g=n==null?void 0:n()){this.id=KE++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(JE),this.nodes.forEach(iA),this.nodes.forEach(rA),this.nodes.forEach(eA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=h,this.root=g?g.root||g:this,this.path=g?[...g.path,g]:[],this.parent=g,this.depth=g?g.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new $E)}addEventListener(h,g){return this.eventHandlers.has(h)||this.eventHandlers.set(h,new ph),this.eventHandlers.get(h).add(g)}notifyListeners(h,...g){const p=this.eventHandlers.get(h);p&&p.notify(...g)}hasListeners(h){return this.eventHandlers.has(h)}mount(h){if(this.instance)return;this.isSVG=Rh(h)&&!ZC(h),this.instance=h;const{layoutId:g,layout:p,visualElement:m}=this.options;if(m&&!m.current&&m.mount(h),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(p||g)&&(this.isLayoutDirty=!0),t){let x,b=0;const v=()=>this.root.updateBlockedByResize=!1;Xe.read(()=>{b=window.innerWidth}),t(h,()=>{const w=window.innerWidth;w!==b&&(b=w,this.root.updateBlockedByResize=!0,x&&x(),x=FE(v,250),Vo.hasAnimatedSinceResize&&(Vo.hasAnimatedSinceResize=!1,this.nodes.forEach(mb)))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&m&&(g||p)&&this.addEventListener("didUpdate",({delta:x,hasLayoutChanged:b,hasRelativeLayoutChanged:v,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||m.getDefaultTransition()||uA,{onLayoutAnimationStart:N,onLayoutAnimationComplete:A}=m.getProps(),E=!this.targetLayout||!yv(this.targetLayout,w),D=!b&&v;if(this.options.layoutRoot||this.resumeFrom||D||b&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...Sh(j,"layout"),onPlay:N,onComplete:A};(m.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(x,D,C.path)}else b||mb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const h=this.getStack();h&&h.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Xn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(lA),this.animationId++)}getTransformTemplate(){const{visualElement:h}=this.options;return h&&h.getProps().transformTemplate}willUpdate(h=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let x=0;x<this.path.length;x++){const b=this.path[x];b.shouldResetTransform=!0,(typeof b.latestValues.x=="string"||typeof b.latestValues.y=="string")&&(b.isLayoutDirty=!0),b.updateScroll("snapshot"),b.options.layoutRoot&&b.willUpdate(!1)}const{layoutId:g,layout:p}=this.options;if(g===void 0&&!p)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),h&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const p=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),p&&this.nodes.forEach(aA),this.nodes.forEach(fb);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(hb);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nA),this.nodes.forEach(sA),this.nodes.forEach(WE),this.nodes.forEach(ZE)):this.nodes.forEach(hb),this.clearAllSnapshots();const g=Mt.now();St.delta=Ga(0,1e3/60,g-St.timestamp),St.timestamp=g,St.isProcessing=!0,Iu.update.process(St),Iu.preRender.process(St),Iu.render.process(St),St.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Th.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tA),this.sharedNodes.forEach(oA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Rt(this.snapshot.measuredBox.x)&&!Rt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p<this.path.length;p++)this.path[p].updateScroll();const h=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ht()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:g}=this.options;g&&g.notify("LayoutMeasure",this.layout.layoutBox,h?h.layoutBox:void 0)}updateScroll(h="measure"){let g=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===h&&(g=!1),g&&this.instance){const p=l(this.instance);this.scroll={animationId:this.root.animationId,phase:h,isRoot:p,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!c)return;const h=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,g=this.projectionDelta&&!bv(this.projectionDelta),p=this.getTransformTemplate(),m=p?p(this.latestValues,""):void 0,x=m!==this.prevTransformTemplateValue;h&&this.instance&&(g||vs(this.latestValues)||x)&&(c(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(h=!0){const g=this.measurePageBox();let p=this.removeElementScroll(g);return h&&(p=this.removeTransform(p)),fA(p),{animationId:this.root.animationId,measuredBox:g,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var m;const{visualElement:h}=this.options;if(!h)return ht();const g=h.measureViewportBox();if(!(((m=this.scroll)==null?void 0:m.wasRoot)||this.path.some(hA))){const{scroll:x}=this.root;x&&(za(g.x,x.offset.x),za(g.y,x.offset.y))}return g}removeElementScroll(h){var p;const g=ht();if(wa(g,h),(p=this.scroll)!=null&&p.wasRoot)return g;for(let m=0;m<this.path.length;m++){const x=this.path[m],{scroll:b,options:v}=x;x!==this.root&&b&&v.layoutScroll&&(b.wasRoot&&wa(g,h),za(g.x,b.offset.x),za(g.y,b.offset.y))}return g}applyTransform(h,g=!1,p){var x,b;const m=p||ht();wa(m,h);for(let v=0;v<this.path.length;v++){const w=this.path[v];!g&&w.options.layoutScroll&&w.scroll&&w!==w.root&&(za(m.x,-w.scroll.offset.x),za(m.y,-w.scroll.offset.y)),vs(w.latestValues)&&Po(m,w.latestValues,(x=w.layout)==null?void 0:x.layoutBox)}return vs(this.latestValues)&&Po(m,this.latestValues,(b=this.layout)==null?void 0:b.layoutBox),m}removeTransform(h){var p;const g=ht();wa(g,h);for(let m=0;m<this.path.length;m++){const x=this.path[m];if(!vs(x.latestValues))continue;let b;x.instance&&(Lf(x.latestValues)&&x.updateSnapshot(),b=ht(),wa(b,x.measurePageBox())),nb(g,x.latestValues,(p=x.snapshot)==null?void 0:p.layoutBox,b)}return vs(this.latestValues)&&nb(g,this.latestValues),g}setTargetDelta(h){this.targetDelta=h,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(h){this.options={...this.options,...h,crossfade:h.crossfade!==void 0?h.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==St.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(h=!1){var w;const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const p=!!this.resumingFrom||this!==g;if(!(h||p&&this.isSharedProjectionDirty||this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:x,layoutId:b}=this.options;if(!this.layout||!(x||b))return;this.resolvedRelativeTargetAt=St.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ht(),this.targetWithTransforms=ht()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_E(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):wa(this.target,this.layout.layoutBox),rv(this.target,this.targetDelta)):wa(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Lf(this.parent.latestValues)||iv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(h,g,p){this.relativeParent=h,this.linkedParentVersion=h.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ht(),this.relativeTargetOrigin=ht(),ec(this.relativeTargetOrigin,g,p,this.options.layoutAnchor||void 0),wa(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var j;const h=this.getLead(),g=!!this.resumingFrom||this!==h;let p=!0;if((this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty)&&(p=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(p=!1),this.resolvedRelativeTargetAt===St.timestamp&&(p=!1),p)return;const{layout:m,layoutId:x}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||x))return;wa(this.layoutCorrected,this.layout.layoutBox);const b=this.treeScale.x,v=this.treeScale.y;cE(this.layoutCorrected,this.treeScale,this.path,g),h.layout&&!h.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(h.target=h.layout.layoutBox,h.targetWithTransforms=ht());const{target:w}=h;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(W0(this.prevProjectionDelta.x,this.projectionDelta.x),W0(this.prevProjectionDelta.y,this.projectionDelta.y)),Br(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==b||this.treeScale.y!==v||!ob(this.projectionDelta.x,this.prevProjectionDelta.x)||!ob(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(h=!0){var g;if((g=this.options.visualElement)==null||g.scheduleRender(),h){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wi(),this.projectionDelta=wi(),this.projectionDeltaWithTransform=wi()}setAnimationOrigin(h,g=!1,p){const m=this.snapshot,x=m?m.latestValues:{},b={...this.latestValues},v=wi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!g;const w=ht(),j=m?m.source:void 0,N=this.layout?this.layout.source:void 0,A=j!==N,E=this.getStack(),D=!E||E.members.length<=1,C=!!(A&&!D&&this.options.crossfade===!0&&!this.path.some(dA));this.animationProgress=0;let O;const Q=p==null?void 0:p.interpolateProjection(h);this.mixTargetDelta=z=>{const I=z/1e3,P=Q==null?void 0:Q(I);P?(v.x.translate=P.x,v.x.scale=Qe(h.x.scale,1,I),v.x.origin=h.x.origin,v.x.originPoint=h.x.originPoint,v.y.translate=P.y,v.y.scale=Qe(h.y.scale,1,I),v.y.origin=h.y.origin,v.y.originPoint=h.y.originPoint):(pb(v.x,h.x,I),pb(v.y,h.y,I)),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ec(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),cA(this.relativeTarget,this.relativeTargetOrigin,w,I),O&&VE(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=ht()),wa(O,this.relativeTarget)),A&&(this.animationValues=b,qE(b,x,this.latestValues,I,C,D)),P&&P.rotate!==void 0&&(this.animationValues||(this.animationValues=b),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(h){var g,p,m;this.notifyListeners("animationStart"),(g=this.currentAnimation)==null||g.stop(),(m=(p=this.resumingFrom)==null?void 0:p.currentAnimation)==null||m.stop(),this.pendingAnimation&&(Xn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Vo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.motionValue.jump(0,!1),this.currentAnimation=IE(this.motionValue,[0,1e3],{...h,velocity:0,isSync:!0,onUpdate:x=>{this.mixTargetDelta(x),h.onUpdate&&h.onUpdate(x)},onStop:()=>{},onComplete:()=>{h.onComplete&&h.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const h=this.getStack();h&&h.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(XE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const h=this.getLead();let{targetWithTransforms:g,target:p,layout:m,latestValues:x}=h;if(!(!g||!p||!m)){if(this!==h&&this.layout&&m&&kv(this.options.animationType,this.layout.layoutBox,m.layoutBox)){p=this.target||ht();const b=Rt(this.layout.layoutBox.x);p.x.min=h.target.x.min,p.x.max=p.x.min+b;const v=Rt(this.layout.layoutBox.y);p.y.min=h.target.y.min,p.y.max=p.y.min+v}wa(g,p),Po(g,x),Br(this.projectionDeltaWithTransform,this.layoutCorrected,g,x)}}registerSharedNode(h,g){this.sharedNodes.has(h)||this.sharedNodes.set(h,new QE),this.sharedNodes.get(h).add(g);const m=g.options.initialPromotionConfig;g.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(g):void 0})}isLead(){const h=this.getStack();return h?h.lead===this:!0}getLead(){var g;const{layoutId:h}=this.options;return h?((g=this.getStack())==null?void 0:g.lead)||this:this}getPrevLead(){var g;const{layoutId:h}=this.options;return h?(g=this.getStack())==null?void 0:g.prevLead:void 0}getStack(){const{layoutId:h}=this.options;if(h)return this.root.sharedNodes.get(h)}promote({needsReset:h,transition:g,preserveFollowOpacity:p}={}){const m=this.getStack();m&&m.promote(this,p),h&&(this.projectionDelta=void 0,this.needsReset=!0),g&&this.setOptions({transition:g})}relegate(){const h=this.getStack();return h?h.relegate(this):!1}resetSkewAndRotation(){const{visualElement:h}=this.options;if(!h)return;let g=!1;const{latestValues:p}=h;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(g=!0),!g)return;const m={};p.z&&Ju("z",h,m,this.animationValues);for(let x=0;x<Zu.length;x++)Ju(`rotate${Zu[x]}`,h,m,this.animationValues),Ju(`skew${Zu[x]}`,h,m,this.animationValues);h.render();for(const x in m)h.setStaticValue(x,m[x]),this.animationValues&&(this.animationValues[x]=m[x]);h.scheduleRender()}applyProjectionStyles(h,g){if(!this.instance||this.isSVG)return;if(!this.isVisible){h.visibility="hidden";return}const p=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,h.visibility="",h.opacity="",h.pointerEvents=Lo(g==null?void 0:g.pointerEvents)||"",h.transform=p?p(this.latestValues,""):"none";return}const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Lo(g==null?void 0:g.pointerEvents)||""),this.hasProjected&&!vs(this.latestValues)&&(h.transform=p?p({},""):"none",this.hasProjected=!1);return}h.visibility="";const x=m.animationValues||m.latestValues;this.applyTransformsToTarget();let b=UE(this.projectionDeltaWithTransform,this.treeScale,x);p&&(b=p(x,b)),h.transform=b;const{x:v,y:w}=this.projectionDelta;h.transformOrigin=`${v.origin*100}% ${w.origin*100}% 0`,m.animationValues?h.opacity=m===this?x.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:h.opacity=m===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const j in Uf){if(x[j]===void 0)continue;const{correct:N,applyTo:A,isCSSVariable:E}=Uf[j],D=b==="none"?x[j]:N(x[j],m);if(A){const C=A.length;for(let O=0;O<C;O++)h[A[O]]=D}else E?this.options.visualElement.renderState.vars[j]=D:h[j]=D}this.options.layoutId&&(h.pointerEvents=m===this?Lo(g==null?void 0:g.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(h=>{var g;return(g=h.currentAnimation)==null?void 0:g.stop()}),this.root.nodes.forEach(fb),this.root.sharedNodes.clear()}}}function WE(t){t.updateLayout()}function ZE(t){var r;const n=((r=t.resumeFrom)==null?void 0:r.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:l,measuredBox:c}=t.layout,{animationType:u}=t.options,h=n.source!==t.layout.source;if(u==="size")_a(b=>{const v=h?n.measuredBox[b]:n.layoutBox[b],w=Rt(v);v.min=l[b].min,v.max=v.min+w});else if(u==="x"||u==="y"){const b=u==="x"?"y":"x";Bf(h?n.measuredBox[b]:n.layoutBox[b],l[b])}else kv(u,n.layoutBox,l)&&_a(b=>{const v=h?n.measuredBox[b]:n.layoutBox[b],w=Rt(l[b]);v.max=v.min+w,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[b].max=t.relativeTarget[b].min+w)});const g=wi();Br(g,l,n.layoutBox);const p=wi();h?Br(p,t.applyTransform(c,!0),n.measuredBox):Br(p,l,n.layoutBox);const m=!bv(g);let x=!1;if(!t.resumeFrom){const b=t.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:v,layout:w}=b;if(v&&w){const j=t.options.layoutAnchor||void 0,N=ht();ec(N,n.layoutBox,v.layoutBox,j);const A=ht();ec(A,l,w.layoutBox,j),yv(N,A)||(x=!0),b.options.layoutRoot&&(t.relativeTarget=A,t.relativeTargetOrigin=N,t.relativeParent=b)}}}t.notifyListeners("didUpdate",{layout:l,snapshot:n,delta:p,layoutDelta:g,hasLayoutChanged:m,hasRelativeLayoutChanged:x})}else if(t.isLead()){const{onExitComplete:l}=t.options;l&&l()}t.options.transition=void 0}function JE(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function eA(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tA(t){t.clearSnapshot()}function fb(t){t.clearMeasurements()}function aA(t){t.isLayoutDirty=!0,t.updateLayout()}function hb(t){t.isLayoutDirty=!1}function nA(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function sA(t){const{visualElement:n}=t.options;n&&n.getProps().onBeforeLayoutMeasure&&n.notify("BeforeLayoutMeasure"),t.resetTransform()}function mb(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function iA(t){t.resolveTargetDelta()}function rA(t){t.calcProjection()}function lA(t){t.resetSkewAndRotation()}function oA(t){t.removeLeadSnapshot()}function pb(t,n,r){t.translate=Qe(n.translate,0,r),t.scale=Qe(n.scale,1,r),t.origin=n.origin,t.originPoint=n.originPoint}function xb(t,n,r,l){t.min=Qe(n.min,r.min,l),t.max=Qe(n.max,r.max,l)}function cA(t,n,r,l){xb(t.x,n.x,r.x,l),xb(t.y,n.y,r.y,l)}function dA(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const uA={duration:.45,ease:[.4,0,.1,1]},gb=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),bb=gb("applewebkit/")&&!gb("chrome/")?Math.round:ha;function yb(t){t.min=bb(t.min),t.max=bb(t.max)}function fA(t){yb(t.x),yb(t.y)}function kv(t,n,r){return t==="position"||t==="preserve-aspect"&&!OE(lb(n),lb(r),.2)}function hA(t){var n;return t!==t.root&&((n=t.scroll)==null?void 0:n.wasRoot)}const mA=jv({attachResizeListener:(t,n)=>Fr(t,"resize",n),measureScroll:()=>{var t,n;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((n=document.body)==null?void 0:n.scrollTop)||0}},checkIsScrollRoot:()=>!0}),ef={current:void 0},Sv=jv({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ef.current){const t=new mA({});t.mount(window),t.setOptions({layoutScroll:!0}),ef.current=t}return ef.current},resetTransform:(t,n)=>{t.style.transform=n!==void 0?n:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ph=k.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function vb(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function pA(...t){return n=>{let r=!1;const l=t.map(c=>{const u=vb(c,n);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let c=0;c<l.length;c++){const u=l[c];typeof u=="function"?u():vb(t[c],null)}}}}function xA(...t){return k.useCallback(pA(...t),t)}class gA extends k.Component{getSnapshotBeforeUpdate(n){const r=this.props.childRef.current;if(Do(r)&&n.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const l=r.offsetParent,c=Do(l)&&l.offsetWidth||0,u=Do(l)&&l.offsetHeight||0,h=getComputedStyle(r),g=this.props.sizeRef.current;g.height=parseFloat(h.height),g.width=parseFloat(h.width),g.top=r.offsetTop,g.left=r.offsetLeft,g.right=c-g.width-g.left,g.bottom=u-g.height-g.top,g.direction=h.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function bA({children:t,isPresent:n,anchorX:r,anchorY:l,root:c,pop:u}){var v;const h=k.useId(),g=k.useRef(null),p=k.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:m}=k.useContext(Ph),x=((v=t.props)==null?void 0:v.ref)??(t==null?void 0:t.ref),b=xA(g,x);return k.useInsertionEffect(()=>{const{width:w,height:j,top:N,left:A,right:E,bottom:D,direction:C}=p.current;if(n||u===!1||!g.current||!w||!j)return;const O=C==="rtl",Q=r==="left"?O?`right: ${E}`:`left: ${A}`:O?`left: ${A}`:`right: ${E}`,z=l==="bottom"?`bottom: ${D}`:`top: ${N}`;g.current.dataset.motionPopId=h;const I=document.createElement("style");m&&(I.nonce=m);const P=c??document.head;return P.appendChild(I),I.sheet&&I.sheet.insertRule(`
          [data-motion-pop-id="${h}"] {
            position: absolute !important;
            width: ${w}px !important;
            height: ${j}px !important;
            ${Q}px !important;
            ${z}px !important;
          }
        `),()=>{var ee;(ee=g.current)==null||ee.removeAttribute("data-motion-pop-id"),P.contains(I)&&P.removeChild(I)}},[n]),s.jsx(gA,{isPresent:n,childRef:g,sizeRef:p,pop:u,children:u===!1?t:k.cloneElement(t,{ref:b})})}const yA=({children:t,initial:n,isPresent:r,onExitComplete:l,custom:c,presenceAffectsLayout:u,mode:h,anchorX:g,anchorY:p,root:m})=>{const x=fh(vA),b=k.useId();let v=!0,w=k.useMemo(()=>(v=!1,{id:b,initial:n,isPresent:r,custom:c,onExitComplete:j=>{x.set(j,!0);for(const N of x.values())if(!N)return;l&&l()},register:j=>(x.set(j,!1),()=>x.delete(j))}),[r,x,l]);return u&&v&&(w={...w}),k.useMemo(()=>{x.forEach((j,N)=>x.set(N,!1))},[r]),k.useEffect(()=>{!r&&!x.size&&l&&l()},[r]),t=s.jsx(bA,{pop:h==="popLayout",isPresent:r,anchorX:g,anchorY:p,root:m,children:t}),s.jsx(hc.Provider,{value:w,children:t})};function vA(){return new Map}function Cv(t=!0){const n=k.useContext(hc);if(n===null)return[!0,null];const{isPresent:r,onExitComplete:l,register:c}=n,u=k.useId();k.useEffect(()=>{if(t)return c(u)},[t]);const h=k.useCallback(()=>t&&l&&l(u),[u,l,t]);return!r&&l?[!1,h]:[!0]}const Co=t=>t.key||"";function wb(t){const n=[];return k.Children.forEach(t,r=>{k.isValidElement(r)&&n.push(r)}),n}const ma=({children:t,custom:n,initial:r=!0,onExitComplete:l,presenceAffectsLayout:c=!0,mode:u="sync",propagate:h=!1,anchorX:g="left",anchorY:p="top",root:m})=>{const[x,b]=Cv(h),v=k.useMemo(()=>wb(t),[t]),w=h&&!x?[]:v.map(Co),j=k.useRef(!0),N=k.useRef(v),A=fh(()=>new Map),E=k.useRef(new Set),[D,C]=k.useState(v),[O,Q]=k.useState(v);e1(()=>{j.current=!1,N.current=v;for(let P=0;P<O.length;P++){const ee=Co(O[P]);w.includes(ee)?(A.delete(ee),E.current.delete(ee)):A.get(ee)!==!0&&A.set(ee,!1)}},[O,w.length,w.join("-")]);const z=[];if(v!==D){let P=[...v];for(let ee=0;ee<O.length;ee++){const W=O[ee],le=Co(W);w.includes(le)||(P.splice(ee,0,W),z.push(W))}return u==="wait"&&z.length&&(P=z),Q(wb(P)),C(v),null}const{forceRender:I}=k.useContext(uh);return s.jsx(s.Fragment,{children:O.map(P=>{const ee=Co(P),W=h&&!x?!1:v===O||w.includes(ee),le=()=>{if(E.current.has(ee))return;if(A.has(ee))E.current.add(ee),A.set(ee,!0);else return;let de=!0;A.forEach(ge=>{ge||(de=!1)}),de&&(I==null||I(),Q(N.current),h&&(b==null||b()),l&&l())};return s.jsx(yA,{isPresent:W,initial:!j.current||r?void 0:!1,custom:n,presenceAffectsLayout:c,mode:u,root:m,onExitComplete:W?void 0:le,anchorX:g,anchorY:p,children:P},ee)})})},Ev=k.createContext({strict:!1}),Nb={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let jb=!1;function wA(){if(jb)return;const t={};for(const n in Nb)t[n]={isEnabled:r=>Nb[n].some(l=>!!r[l])};av(t),jb=!0}function Av(){return wA(),iE()}function NA(t){const n=Av();for(const r in t)n[r]={...n[r],...t[r]};av(n)}const jA=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function tc(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||jA.has(t)}let Tv=t=>!tc(t);function kA(t){typeof t=="function"&&(Tv=n=>n.startsWith("on")?!tc(n):t(n))}try{kA(require("@emotion/is-prop-valid").default)}catch{}function SA(t,n,r){const l={};for(const c in t)c==="values"&&typeof t.values=="object"||Ct(t[c])||(Tv(c)||r===!0&&tc(c)||!n&&!tc(c)||t.draggable&&c.startsWith("onDrag"))&&(l[c]=t[c]);return l}const gc=k.createContext({});function CA(t,n){if(xc(t)){const{initial:r,animate:l}=t;return{initial:r===!1||$r(r)?r:void 0,animate:$r(l)?l:void 0}}return t.inherit!==!1?n:{}}function EA(t){const{initial:n,animate:r}=CA(t,k.useContext(gc));return k.useMemo(()=>({initial:n,animate:r}),[kb(n),kb(r)])}function kb(t){return Array.isArray(t)?t.join(" "):t}const Lh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mv(t,n,r){for(const l in n)!Ct(n[l])&&!cv(l,r)&&(t[l]=n[l])}function AA({transformTemplate:t},n){return k.useMemo(()=>{const r=Lh();return _h(r,n,t),Object.assign({},r.vars,r.style)},[n])}function TA(t,n){const r=t.style||{},l={};return Mv(l,r,t),Object.assign(l,AA(t,n)),l}function MA(t,n){const r={},l=TA(t,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,l.userSelect=l.WebkitUserSelect=l.WebkitTouchCallout="none",l.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=l,r}const Rv=()=>({...Lh(),attrs:{}});function RA(t,n,r,l){const c=k.useMemo(()=>{const u=Rv();return dv(u,n,fv(l),t.transformTemplate,t.style),{...u.attrs,style:{...u.style}}},[n]);if(t.style){const u={};Mv(u,t.style,t),c.style={...u,...c.style}}return c}const DA=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Vh(t){return typeof t!="string"||t.includes("-")?!1:!!(DA.indexOf(t)>-1||/[A-Z]/u.test(t))}function OA(t,n,r,{latestValues:l},c,u=!1,h){const p=(h??Vh(t)?RA:MA)(n,l,c,t),m=SA(n,typeof t=="string",u),x=t!==k.Fragment?{...m,...p,ref:r}:{},{children:b}=n,v=k.useMemo(()=>Ct(b)?b.get():b,[b]);return k.createElement(t,{...x,children:v})}function _A({scrapeMotionValuesFromProps:t,createRenderState:n},r,l,c){return{latestValues:zA(r,l,c,t),renderState:n()}}function zA(t,n,r,l){const c={},u=l(t,{});for(const v in u)c[v]=Lo(u[v]);let{initial:h,animate:g}=t;const p=xc(t),m=ev(t);n&&m&&!p&&t.inherit!==!1&&(h===void 0&&(h=n.initial),g===void 0&&(g=n.animate));let x=r?r.initial===!1:!1;x=x||h===!1;const b=x?g:h;if(b&&typeof b!="boolean"&&!pc(b)){const v=Array.isArray(b)?b:[b];for(let w=0;w<v.length;w++){const j=Eh(t,v[w]);if(j){const{transitionEnd:N,transition:A,...E}=j;for(const D in E){let C=E[D];if(Array.isArray(C)){const O=x?C.length-1:0;C=C[O]}C!==null&&(c[D]=C)}for(const D in N)c[D]=N[D]}}}return c}const Dv=t=>(n,r)=>{const l=k.useContext(gc),c=k.useContext(hc),u=()=>_A(t,n,l,c);return r?u():fh(u)},PA=Dv({scrapeMotionValuesFromProps:zh,createRenderState:Lh}),LA=Dv({scrapeMotionValuesFromProps:hv,createRenderState:Rv}),VA=Symbol.for("motionComponentSymbol");function UA(t,n,r){const l=k.useRef(r);k.useInsertionEffect(()=>{l.current=r});const c=k.useRef(null);return k.useCallback(u=>{var g;u&&((g=t.onMount)==null||g.call(t,u)),n&&(u?n.mount(u):n.unmount());const h=l.current;if(typeof h=="function")if(u){const p=h(u);typeof p=="function"&&(c.current=p)}else c.current?(c.current(),c.current=null):h(u);else h&&(h.current=u)},[n])}const Ov=k.createContext({});function gi(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function BA(t,n,r,l,c,u){var C,O;const{visualElement:h}=k.useContext(gc),g=k.useContext(Ev),p=k.useContext(hc),m=k.useContext(Ph),x=m.reducedMotion,b=m.skipAnimations,v=k.useRef(null),w=k.useRef(!1);l=l||g.renderer,!v.current&&l&&(v.current=l(t,{visualState:n,parent:h,props:r,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:x,skipAnimations:b,isSVG:u}),w.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const j=v.current,N=k.useContext(Ov);j&&!j.projection&&c&&(j.type==="html"||j.type==="svg")&&qA(v.current,r,c,N);const A=k.useRef(!1);k.useInsertionEffect(()=>{j&&A.current&&j.update(r,p)});const E=r[H1],D=k.useRef(!!E&&typeof window<"u"&&!((C=window.MotionHandoffIsComplete)!=null&&C.call(window,E))&&((O=window.MotionHasOptimisedAnimation)==null?void 0:O.call(window,E)));return e1(()=>{w.current=!0,j&&(A.current=!0,window.MotionIsMounted=!0,j.updateFeatures(),j.scheduleRenderMicrotask(),D.current&&j.animationState&&j.animationState.animateChanges())}),k.useEffect(()=>{j&&(!D.current&&j.animationState&&j.animationState.animateChanges(),D.current&&(queueMicrotask(()=>{var Q;(Q=window.MotionHandoffMarkAsComplete)==null||Q.call(window,E)}),D.current=!1),j.enteringChildren=void 0)}),j}function qA(t,n,r,l){const{layoutId:c,layout:u,drag:h,dragConstraints:g,layoutScroll:p,layoutRoot:m,layoutAnchor:x,layoutCrossfade:b}=n;t.projection=new r(t.latestValues,n["data-framer-portal-id"]?void 0:_v(t.parent)),t.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!h||g&&gi(g),visualElement:t,animationType:typeof u=="string"?u:"both",initialPromotionConfig:l,crossfade:b,layoutScroll:p,layoutRoot:m,layoutAnchor:x})}function _v(t){if(t)return t.options.allowProjection!==!1?t.projection:_v(t.parent)}function tf(t,{forwardMotionProps:n=!1,type:r}={},l,c){l&&NA(l);const u=r?r==="svg":Vh(t),h=u?LA:PA;function g(m,x){let b;const v={...k.useContext(Ph),...m,layoutId:HA(m)},{isStatic:w}=v,j=EA(m),N=h(m,w);if(!w&&typeof window<"u"){GA();const A=IA(v);b=A.MeasureLayout,j.visualElement=BA(t,N,v,c,A.ProjectionNode,u)}return s.jsxs(gc.Provider,{value:j,children:[b&&j.visualElement?s.jsx(b,{visualElement:j.visualElement,...v}):null,OA(t,m,UA(N,j.visualElement,x),N,w,n,u)]})}g.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const p=k.forwardRef(g);return p[VA]=t,p}function HA({layoutId:t}){const n=k.useContext(uh).id;return n&&t!==void 0?n+"-"+t:t}function GA(t,n){k.useContext(Ev).strict}function IA(t){const n=Av(),{drag:r,layout:l}=n;if(!r&&!l)return{};const c={...r,...l};return{MeasureLayout:r!=null&&r.isEnabled(t)||l!=null&&l.isEnabled(t)?c.MeasureLayout:void 0,ProjectionNode:c.ProjectionNode}}function YA(t,n){if(typeof Proxy>"u")return tf;const r=new Map,l=(u,h)=>tf(u,h,t,n),c=(u,h)=>l(u,h);return new Proxy(c,{get:(u,h)=>h==="create"?l:(r.has(h)||r.set(h,tf(h,void 0,t,n)),r.get(h))})}const $A=(t,n)=>n.isSVG??Vh(t)?new NE(n):new xE(n,{allowProjection:t!==k.Fragment});class FA extends Jn{constructor(n){super(n),n.animationState||(n.animationState=EE(n))}updateAnimationControlsSubscription(){const{animate:n}=this.node.getProps();pc(n)&&(this.unmountControls=n.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:n}=this.node.getProps(),{animate:r}=this.node.prevProps||{};n!==r&&this.updateAnimationControlsSubscription()}unmount(){var n;this.node.animationState.reset(),(n=this.unmountControls)==null||n.call(this)}}let QA=0;class XA extends Jn{constructor(){super(...arguments),this.id=QA++,this.isExitComplete=!1}update(){var u;if(!this.node.presenceContext)return;const{isPresent:n,onExitComplete:r}=this.node.presenceContext,{isPresent:l}=this.node.prevPresenceContext||{};if(!this.node.animationState||n===l)return;if(n&&l===!1){if(this.isExitComplete){const{initial:h,custom:g}=this.node.getProps();if(typeof h=="string"||typeof h=="object"&&h!==null&&!Array.isArray(h)){const p=Cs(this.node,h,g);if(p){const{transition:m,transitionEnd:x,...b}=p;for(const v in b)(u=this.node.getValue(v))==null||u.jump(b[v])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const c=this.node.animationState.setActive("exit",!n);r&&!n&&c.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){const{register:n,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),n&&(this.unmount=n(this.id))}unmount(){}}const KA={animation:{Feature:FA},exit:{Feature:XA}};function al(t){return{point:{x:t.pageX,y:t.pageY}}}const WA=t=>n=>Mh(n)&&t(n,al(n));function qr(t,n,r,l){return Fr(t,n,WA(r),l)}const zv=({current:t})=>t?t.ownerDocument.defaultView:null,Sb=(t,n)=>Math.abs(t-n);function ZA(t,n){const r=Sb(t.x,n.x),l=Sb(t.y,n.y);return Math.sqrt(r**2+l**2)}const Cb=new Set(["auto","scroll"]);class Pv{constructor(n,r,{transformPagePoint:l,contextWindow:c=window,dragSnapToOrigin:u=!1,distanceThreshold:h=3,element:g}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Eo(this.lastRawMoveEventInfo,this.transformPagePoint));const w=af(this.lastMoveEventInfo,this.history),j=this.startEvent!==null,N=ZA(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!j&&!N)return;const{point:A}=w,{timestamp:E}=St;this.history.push({...A,timestamp:E});const{onStart:D,onMove:C}=this.handlers;j||(D&&D(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,w)},this.handlePointerMove=(w,j)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=j,this.lastMoveEventInfo=Eo(j,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(w,j)=>{this.end();const{onEnd:N,onSessionEnd:A,resumeAnimation:E}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=af(w.type==="pointercancel"?this.lastMoveEventInfo:Eo(j,this.transformPagePoint),this.history);this.startEvent&&N&&N(w,D),A&&A(w,D)},!Mh(n))return;this.dragSnapToOrigin=u,this.handlers=r,this.transformPagePoint=l,this.distanceThreshold=h,this.contextWindow=c||window;const p=al(n),m=Eo(p,this.transformPagePoint),{point:x}=m,{timestamp:b}=St;this.history=[{...x,timestamp:b}];const{onSessionStart:v}=r;v&&v(n,af(m,this.history)),this.removeListeners=Jr(qr(this.contextWindow,"pointermove",this.handlePointerMove),qr(this.contextWindow,"pointerup",this.handlePointerUp),qr(this.contextWindow,"pointercancel",this.handlePointerUp)),g&&this.startScrollTracking(g)}startScrollTracking(n){let r=n.parentElement;for(;r;){const l=getComputedStyle(r);(Cb.has(l.overflowX)||Cb.has(l.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(n){const r=this.scrollPositions.get(n);if(!r)return;const l=n===window,c=l?{x:window.scrollX,y:window.scrollY}:{x:n.scrollLeft,y:n.scrollTop},u={x:c.x-r.x,y:c.y-r.y};u.x===0&&u.y===0||(l?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=u.x,this.lastMoveEventInfo.point.y+=u.y):this.history.length>0&&(this.history[0].x-=u.x,this.history[0].y-=u.y),this.scrollPositions.set(n,c),Xe.update(this.updatePoint,!0))}updateHandlers(n){this.handlers=n}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Xn(this.updatePoint)}}function Eo(t,n){return n?{point:n(t.point)}:t}function Eb(t,n){return{x:t.x-n.x,y:t.y-n.y}}function af({point:t},n){return{point:t,delta:Eb(t,Lv(n)),offset:Eb(t,JA(n)),velocity:eT(n,.1)}}function JA(t){return t[0]}function Lv(t){return t[t.length-1]}function eT(t,n){if(t.length<2)return{x:0,y:0};let r=t.length-1,l=null;const c=Lv(t);for(;r>=0&&(l=t[r],!(c.timestamp-l.timestamp>Jt(n)));)r--;if(!l)return{x:0,y:0};l===t[0]&&t.length>2&&c.timestamp-l.timestamp>Jt(n)*2&&(l=t[1]);const u=fa(c.timestamp-l.timestamp);if(u===0)return{x:0,y:0};const h={x:(c.x-l.x)/u,y:(c.y-l.y)/u};return h.x===1/0&&(h.x=0),h.y===1/0&&(h.y=0),h}function tT(t,{min:n,max:r},l){return n!==void 0&&t<n?t=l?Qe(n,t,l.min):Math.max(t,n):r!==void 0&&t>r&&(t=l?Qe(r,t,l.max):Math.min(t,r)),t}function Ab(t,n,r){return{min:n!==void 0?t.min+n:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function aT(t,{top:n,left:r,bottom:l,right:c}){return{x:Ab(t.x,r,c),y:Ab(t.y,n,l)}}function Tb(t,n){let r=n.min-t.min,l=n.max-t.max;return n.max-n.min<t.max-t.min&&([r,l]=[l,r]),{min:r,max:l}}function nT(t,n){return{x:Tb(t.x,n.x),y:Tb(t.y,n.y)}}function sT(t,n){let r=.5;const l=Rt(t),c=Rt(n);return c>l?r=Ir(n.min,n.max-l,t.min):l>c&&(r=Ir(t.min,t.max-c,n.min)),Ga(0,1,r)}function iT(t,n){const r={};return n.min!==void 0&&(r.min=n.min-t.min),n.max!==void 0&&(r.max=n.max-t.min),r}const qf=.35;function rT(t=qf){return t===!1?t=0:t===!0&&(t=qf),{x:Mb(t,"left","right"),y:Mb(t,"top","bottom")}}function Mb(t,n,r){return{min:Rb(t,n),max:Rb(t,r)}}function Rb(t,n){return typeof t=="number"?t:t[n]||0}const lT=new WeakMap;class oT{constructor(n){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ht(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=n}start(n,{snapToCursor:r=!1,distanceThreshold:l}={}){const{presenceContext:c}=this.visualElement;if(c&&c.isPresent===!1)return;const u=b=>{r&&this.snapToCursor(al(b).point),this.stopAnimation()},h=(b,v)=>{const{drag:w,dragPropagation:j,onDragStart:N}=this.getProps();if(w&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zC(w),!this.openDragLock))return;this.latestPointerEvent=b,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_a(E=>{let D=this.getAxisMotionValue(E).get()||0;if(Ua.test(D)){const{projection:C}=this.visualElement;if(C&&C.layout){const O=C.layout.layoutBox[E];O&&(D=Rt(O)*(parseFloat(D)/100))}}this.originPoint[E]=D}),N&&Xe.update(()=>N(b,v),!1,!0),Rf(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},g=(b,v)=>{this.latestPointerEvent=b,this.latestPanInfo=v;const{dragPropagation:w,dragDirectionLock:j,onDirectionLock:N,onDrag:A}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:E}=v;if(j&&this.currentDirection===null){this.currentDirection=dT(E),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",v.point,E),this.updateAxis("y",v.point,E),this.visualElement.render(),A&&Xe.update(()=>A(b,v),!1,!0)},p=(b,v)=>{this.latestPointerEvent=b,this.latestPanInfo=v,this.stop(b,v),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>{const{dragSnapToOrigin:b}=this.getProps();(b||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:x}=this.getProps();this.panSession=new Pv(n,{onSessionStart:u,onStart:h,onMove:g,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:x,distanceThreshold:l,contextWindow:zv(this.visualElement),element:this.visualElement.current})}stop(n,r){const l=n||this.latestPointerEvent,c=r||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!c||!l)return;const{velocity:h}=c;this.startAnimation(h);const{onDragEnd:g}=this.getProps();g&&Xe.postRender(()=>g(l,c))}cancel(){this.isDragging=!1;const{projection:n,animationState:r}=this.visualElement;n&&(n.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:l}=this.getProps();!l&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(n,r,l){const{drag:c}=this.getProps();if(!l||!Ao(n,c,this.currentDirection))return;const u=this.getAxisMotionValue(n);let h=this.originPoint[n]+l[n];this.constraints&&this.constraints[n]&&(h=tT(h,this.constraints[n],this.elastic[n])),u.set(h)}resolveConstraints(){var u;const{dragConstraints:n,dragElastic:r}=this.getProps(),l=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(u=this.visualElement.projection)==null?void 0:u.layout,c=this.constraints;n&&gi(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&l?this.constraints=aT(l.layoutBox,n):this.constraints=!1,this.elastic=rT(r),c!==this.constraints&&!gi(n)&&l&&this.constraints&&!this.hasMutatedConstraints&&_a(h=>{this.constraints!==!1&&this.getAxisMotionValue(h)&&(this.constraints[h]=iT(l.layoutBox[h],this.constraints[h]))})}resolveRefConstraints(){const{dragConstraints:n,onMeasureDragConstraints:r}=this.getProps();if(!n||!gi(n))return!1;const l=n.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;c.root&&(c.root.scroll=void 0,c.root.updateScroll());const u=dE(l,c.root,this.visualElement.getTransformPagePoint());let h=nT(c.layout.layoutBox,u);if(r){const g=r(lE(h));this.hasMutatedConstraints=!!g,g&&(h=sv(g))}return h}startAnimation(n){const{drag:r,dragMomentum:l,dragElastic:c,dragTransition:u,dragSnapToOrigin:h,onDragTransitionEnd:g}=this.getProps(),p=this.constraints||{},m=_a(x=>{if(!Ao(x,r,this.currentDirection))return;let b=p&&p[x]||{};(h===!0||h===x)&&(b={min:0,max:0});const v=c?200:1e6,w=c?40:1e7,j={type:"inertia",velocity:l?n[x]:0,bounceStiffness:v,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...u,...b};return this.startAxisValueAnimation(x,j)});return Promise.all(m).then(g)}startAxisValueAnimation(n,r){const l=this.getAxisMotionValue(n);return Rf(this.visualElement,n),l.start(Ch(n,l,0,r,this.visualElement,!1))}stopAnimation(){_a(n=>this.getAxisMotionValue(n).stop())}getAxisMotionValue(n){const r=`_drag${n.toUpperCase()}`,c=this.visualElement.getProps()[r];return c||this.visualElement.getValue(n,this.visualElement.latestValues[n]??0)}snapToCursor(n){_a(r=>{const{drag:l}=this.getProps();if(!Ao(r,l,this.currentDirection))return;const{projection:c}=this.visualElement,u=this.getAxisMotionValue(r);if(c&&c.layout){const{min:h,max:g}=c.layout.layoutBox[r],p=u.get()||0;u.set(n[r]-Qe(h,g,.5)+p)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:l}=this.visualElement;if(!gi(r)||!l||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};_a(h=>{const g=this.getAxisMotionValue(h);if(g&&this.constraints!==!1){const p=g.get();c[h]=sT({min:p,max:p},this.constraints[h])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",l.root&&l.root.updateScroll(),l.updateLayout(),this.constraints=!1,this.resolveConstraints(),_a(h=>{if(!Ao(h,n,null))return;const g=this.getAxisMotionValue(h),{min:p,max:m}=this.constraints[h];g.set(Qe(p,m,c[h]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;lT.set(this.visualElement,this);const n=this.visualElement.current,r=qr(n,"pointerdown",m=>{const{drag:x,dragListener:b=!0}=this.getProps(),v=m.target,w=v!==n&&qC(v);x&&b&&!w&&this.start(m)});let l;const c=()=>{const{dragConstraints:m}=this.getProps();gi(m)&&m.current&&(this.constraints=this.resolveRefConstraints(),l||(l=cT(n,m.current,()=>this.scalePositionWithinConstraints())))},{projection:u}=this.visualElement,h=u.addEventListener("measure",c);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),Xe.read(c);const g=Fr(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:x})=>{this.isDragging&&x&&(_a(b=>{const v=this.getAxisMotionValue(b);v&&(this.originPoint[b]+=m[b].translate,v.set(v.get()+m[b].translate))}),this.visualElement.render())}));return()=>{g(),r(),h(),p&&p(),l&&l()}}getProps(){const n=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:l=!1,dragPropagation:c=!1,dragConstraints:u=!1,dragElastic:h=qf,dragMomentum:g=!0}=n;return{...n,drag:r,dragDirectionLock:l,dragPropagation:c,dragConstraints:u,dragElastic:h,dragMomentum:g}}}function Db(t){let n=!0;return()=>{if(n){n=!1;return}t()}}function cT(t,n,r){const l=U0(t,Db(r)),c=U0(n,Db(r));return()=>{l(),c()}}function Ao(t,n,r){return(n===!0||n===t)&&(r===null||r===t)}function dT(t,n=10){let r=null;return Math.abs(t.y)>n?r="y":Math.abs(t.x)>n&&(r="x"),r}class uT extends Jn{constructor(n){super(n),this.removeGroupControls=ha,this.removeListeners=ha,this.controls=new oT(n)}mount(){const{dragControls:n}=this.node.getProps();n&&(this.removeGroupControls=n.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ha}update(){const{dragControls:n}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};n!==r&&(this.removeGroupControls(),n&&(this.removeGroupControls=n.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const nf=t=>(n,r)=>{t&&Xe.update(()=>t(n,r),!1,!0)};class fT extends Jn{constructor(){super(...arguments),this.removePointerDownListener=ha}onPointerDown(n){this.session=new Pv(n,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zv(this.node)})}createPanHandlers(){const{onPanSessionStart:n,onPanStart:r,onPan:l,onPanEnd:c}=this.node.getProps();return{onSessionStart:nf(n),onStart:nf(r),onMove:nf(l),onEnd:(u,h)=>{delete this.session,c&&Xe.postRender(()=>c(u,h))}}}mount(){this.removePointerDownListener=qr(this.node.current,"pointerdown",n=>this.onPointerDown(n))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let sf=!1;class hT extends k.Component{componentDidMount(){const{visualElement:n,layoutGroup:r,switchLayoutGroup:l,layoutId:c}=this.props,{projection:u}=n;u&&(r.group&&r.group.add(u),l&&l.register&&c&&l.register(u),sf&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Vo.hasEverUpdated=!0}getSnapshotBeforeUpdate(n){const{layoutDependency:r,visualElement:l,drag:c,isPresent:u}=this.props,{projection:h}=l;return h&&(h.isPresent=u,n.layoutDependency!==r&&h.setOptions({...h.options,layoutDependency:r}),sf=!0,c||n.layoutDependency!==r||r===void 0||n.isPresent!==u?h.willUpdate():this.safeToRemove(),n.isPresent!==u&&(u?h.promote():h.relegate()||Xe.postRender(()=>{const g=h.getStack();(!g||!g.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:n,layoutAnchor:r}=this.props,{projection:l}=n;l&&(l.options.layoutAnchor=r,l.root.didUpdate(),Th.postRender(()=>{!l.currentAnimation&&l.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:n,layoutGroup:r,switchLayoutGroup:l}=this.props,{projection:c}=n;sf=!0,c&&(c.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(c),l&&l.deregister&&l.deregister(c))}safeToRemove(){const{safeToRemove:n}=this.props;n&&n()}render(){return null}}function Vv(t){const[n,r]=Cv(),l=k.useContext(uh);return s.jsx(hT,{...t,layoutGroup:l,switchLayoutGroup:k.useContext(Ov),isPresent:n,safeToRemove:r})}const mT={pan:{Feature:fT},drag:{Feature:uT,ProjectionNode:Sv,MeasureLayout:Vv}};function Ob(t,n,r){const{props:l}=t;t.animationState&&l.whileHover&&t.animationState.setActive("whileHover",r==="Start");const c="onHover"+r,u=l[c];u&&Xe.postRender(()=>u(n,al(n)))}class pT extends Jn{mount(){const{current:n}=this.node;n&&(this.unmount=LC(n,(r,l)=>(Ob(this.node,l,"Start"),c=>Ob(this.node,c,"End"))))}unmount(){}}class xT extends Jn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let n=!1;try{n=this.node.current.matches(":focus-visible")}catch{n=!0}!n||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Jr(Fr(this.node.current,"focus",()=>this.onFocus()),Fr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _b(t,n,r){const{props:l}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&l.whileTap&&t.animationState.setActive("whileTap",r==="Start");const c="onTap"+(r==="End"?"":r),u=l[c];u&&Xe.postRender(()=>u(n,al(n)))}class gT extends Jn{mount(){const{current:n}=this.node;if(!n)return;const{globalTapTarget:r,propagate:l}=this.node.props;this.unmount=GC(n,(c,u)=>(_b(this.node,u,"Start"),(h,{success:g})=>_b(this.node,h,g?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(l==null?void 0:l.tap)===!1})}unmount(){}}const Hf=new WeakMap,rf=new WeakMap,bT=t=>{const n=Hf.get(t.target);n&&n(t)},yT=t=>{t.forEach(bT)};function vT({root:t,...n}){const r=t||document;rf.has(r)||rf.set(r,{});const l=rf.get(r),c=JSON.stringify(n);return l[c]||(l[c]=new IntersectionObserver(yT,{root:t,...n})),l[c]}function wT(t,n,r){const l=vT(n);return Hf.set(t,r),l.observe(t),()=>{Hf.delete(t),l.unobserve(t)}}const NT={some:0,all:1};class jT extends Jn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var p;(p=this.stopObserver)==null||p.call(this);const{viewport:n={}}=this.node.getProps(),{root:r,margin:l,amount:c="some",once:u}=n,h={root:r?r.current:void 0,rootMargin:l,threshold:typeof c=="number"?c:NT[c]},g=m=>{const{isIntersecting:x}=m;if(this.isInView===x||(this.isInView=x,u&&!x&&this.hasEnteredView))return;x&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",x);const{onViewportEnter:b,onViewportLeave:v}=this.node.getProps(),w=x?b:v;w&&w(m)};this.stopObserver=wT(this.node.current,h,g)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:n,prevProps:r}=this.node;["amount","margin","root"].some(kT(n,r))&&this.startObserver()}unmount(){var n;(n=this.stopObserver)==null||n.call(this),this.hasEnteredView=!1,this.isInView=!1}}function kT({viewport:t={}},{viewport:n={}}={}){return r=>t[r]!==n[r]}const ST={inView:{Feature:jT},tap:{Feature:gT},focus:{Feature:xT},hover:{Feature:pT}},CT={layout:{ProjectionNode:Sv,MeasureLayout:Vv}},ET={...KA,...ST,...mT,...CT},Te=YA(ET,$A),Kn="/galpao-imperial/logo/499590839_18021494816651395_7453057703159795787_n.jpg";function Uh({onAdminClick:t,onPartnershipClick:n}){const[r,l]=k.useState(!1),[c,u]=k.useState(!1),h=ea(),g=Ri();k.useEffect(()=>{const b=()=>u(window.scrollY>50);return window.addEventListener("scroll",b),()=>window.removeEventListener("scroll",b)},[]);const p=b=>{var v;if(h.pathname==="/"){(v=document.getElementById(b))==null||v.scrollIntoView({behavior:"smooth"});return}sessionStorage.setItem("galpao_imperial_scroll_target",b),g("/")},m=[{name:"Experiência",section:"experiencia"},{name:"Menu",section:"menu"},{name:"Estrutura",section:"estrutura"},{name:"Galeria",section:"galeria"},{name:"Localização",section:"localizacao"}],x=()=>window.open("https://wa.me/5527997532187?text=Ol%C3%A1!%20Quero%20fazer%20uma%20reserva%20no%20Galp%C3%A3o%20Imperial.","_blank");return s.jsxs("nav",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${c?"py-4":"py-8"}`,children:[s.jsx("div",{className:"max-w-7xl mx-auto px-6 sm:px-12",children:s.jsxs("div",{className:`relative flex items-center justify-between px-8 h-20 rounded-[32px] transition-all duration-500 ${c?"glass wine-glow":"bg-black/30 border border-brand-gold/15"}`,children:[s.jsxs(In,{to:"/",className:"flex-shrink-0 flex items-center gap-4 group cursor-pointer",children:[s.jsx("div",{className:"w-12 h-12 imperial-logo-frame rounded-full flex items-center justify-center p-1.5 group-hover:scale-105 transition-transform duration-500 overflow-hidden",children:s.jsx("img",{src:Kn,alt:"Galpão Imperial Logo",className:"w-full h-full object-contain"})}),s.jsxs("div",{className:"flex flex-col leading-none",children:[s.jsx("span",{className:"font-display font-black text-2xl tracking-normal uppercase text-white group-hover:text-brand-gold transition-colors",children:"Galpão"}),s.jsx("span",{className:"text-brand-gold text-[9px] font-black tracking-[0.4em] uppercase mt-1",children:"Imperial"})]})]}),s.jsx("div",{className:"hidden lg:flex items-center gap-8",children:m.map(b=>b.section?s.jsxs("button",{onClick:()=>p(b.section),className:"text-[11px] font-black uppercase tracking-[0.3em] text-gray-400 hover:text-white transition-all hover:scale-105 relative group/link",children:[b.name,s.jsx("span",{className:"absolute -bottom-2 left-0 w-0 h-[2px] bg-brand-wine transition-all group-hover/link:w-full"})]},b.name):s.jsxs(In,{to:b.to,className:"text-[11px] font-black uppercase tracking-[0.3em] text-gray-400 hover:text-white transition-all hover:scale-105 relative group/link",children:[b.name,s.jsx("span",{className:"absolute -bottom-2 left-0 w-0 h-[2px] bg-brand-wine transition-all group-hover/link:w-full"})]},b.name))}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsxs("div",{className:"hidden sm:flex items-center gap-6 border-l border-white/10 pl-8",children:[s.jsx(In,{to:"/admin",className:"text-[9px] font-black uppercase tracking-[0.3em] text-gray-600 hover:text-brand-wine transition-colors",title:"Painel Administrativo",children:"ADMIN"}),s.jsx("a",{href:"https://www.instagram.com/galpao.imperial/",target:"_blank",rel:"noreferrer",className:"text-gray-400 hover:text-brand-gold transition-colors",title:"Instagram Galpao Imperial",children:s.jsx(qo,{className:"w-5 h-5"})}),s.jsx(ie,{variant:"primary",size:"sm",className:"rounded-2xl px-8 py-3 text-[10px] font-black",onClick:x,children:"RESERVAR"})]}),s.jsx("button",{onClick:()=>l(!r),className:"lg:hidden w-12 h-12 rounded-2xl bg-white/5 flex items-center justify-center text-white border border-white/10 active:scale-90 transition-all",children:r?s.jsx(Ha,{className:"w-6 h-6"}):s.jsx(Py,{className:"w-6 h-6"})})]})]})}),s.jsx(ma,{children:r&&s.jsx(Te.div,{initial:{opacity:0,height:0,y:-20},animate:{opacity:1,height:"auto",y:0},exit:{opacity:0,height:0,y:-20},className:"lg:hidden mx-6 mt-4 glass rounded-[32px] border border-white/5 overflow-hidden wine-glow",children:s.jsxs("div",{className:"p-8 space-y-6",children:[m.map(b=>b.section?s.jsx("button",{onClick:()=>{l(!1),p(b.section)},className:"block text-xl font-display font-black text-white uppercase tracking-tighter hover:text-brand-gold transition-colors text-left",children:b.name},b.name):s.jsx(In,{to:b.to,onClick:()=>l(!1),className:"block text-xl font-display font-black text-white uppercase tracking-tighter hover:text-brand-gold transition-colors",children:b.name},b.name)),s.jsxs("div",{className:"pt-6 border-t border-white/5 space-y-4",children:[s.jsxs(ie,{className:"w-full gap-2 py-6 rounded-2xl text-[10px] font-black tracking-widest",variant:"primary",onClick:()=>{l(!1),x()},children:[s.jsx(Ey,{className:"w-5 h-5"}),"FAZER RESERVA"]}),s.jsx("div",{className:"flex justify-center",children:s.jsx(In,{to:"/admin",onClick:()=>l(!1),className:"text-[9px] font-black uppercase tracking-[0.3em] text-gray-500 hover:text-brand-wine",children:"ACESSO ADMINISTRATIVO"})})]})]})})})]})}const Uv=6048e5,AT=864e5,zb=Symbol.for("constructDateFrom");function Wn(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&zb in t?t[zb](n):t instanceof Date?new t.constructor(n):new Date(n)}function Aa(t,n){return Wn(n||t,t)}let TT={};function bc(){return TT}function Qr(t,n){var g,p,m,x;const r=bc(),l=(n==null?void 0:n.weekStartsOn)??((p=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((x=(m=r.locale)==null?void 0:m.options)==null?void 0:x.weekStartsOn)??0,c=Aa(t,n==null?void 0:n.in),u=c.getDay(),h=(u<l?7:0)+u-l;return c.setDate(c.getDate()-h),c.setHours(0,0,0,0),c}function ac(t,n){return Qr(t,{...n,weekStartsOn:1})}function Bv(t,n){const r=Aa(t,n==null?void 0:n.in),l=r.getFullYear(),c=Wn(r,0);c.setFullYear(l+1,0,4),c.setHours(0,0,0,0);const u=ac(c),h=Wn(r,0);h.setFullYear(l,0,4),h.setHours(0,0,0,0);const g=ac(h);return r.getTime()>=u.getTime()?l+1:r.getTime()>=g.getTime()?l:l-1}function Pb(t){const n=Aa(t),r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return r.setUTCFullYear(n.getFullYear()),+t-+r}function MT(t,...n){const r=Wn.bind(null,n.find(l=>typeof l=="object"));return n.map(r)}function Lb(t,n){const r=Aa(t,n==null?void 0:n.in);return r.setHours(0,0,0,0),r}function qv(t,n,r){const[l,c]=MT(r==null?void 0:r.in,t,n),u=Lb(l),h=Lb(c),g=+u-Pb(u),p=+h-Pb(h);return Math.round((g-p)/AT)}function RT(t,n){const r=Bv(t,n),l=Wn(t,0);return l.setFullYear(r,0,4),l.setHours(0,0,0,0),ac(l)}function DT(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function OT(t){return!(!DT(t)&&typeof t!="number"||isNaN(+Aa(t)))}function _T(t,n){const r=Aa(t,n==null?void 0:n.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const zT={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},PT=(t,n,r)=>{let l;const c=zT[t];return typeof c=="string"?l=c:n===1?l=c.one:l=c.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+l:l+" ago":l};function ji(t){return(n={})=>{const r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const LT={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VT={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},UT={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},BT={date:ji({formats:LT,defaultWidth:"full"}),time:ji({formats:VT,defaultWidth:"full"}),dateTime:ji({formats:UT,defaultWidth:"full"})},qT={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},HT=(t,n,r,l)=>qT[t];function Pa(t){return(n,r)=>{const l=r!=null&&r.context?String(r.context):"standalone";let c;if(l==="formatting"&&t.formattingValues){const h=t.defaultFormattingWidth||t.defaultWidth,g=r!=null&&r.width?String(r.width):h;c=t.formattingValues[g]||t.formattingValues[h]}else{const h=t.defaultWidth,g=r!=null&&r.width?String(r.width):t.defaultWidth;c=t.values[g]||t.values[h]}const u=t.argumentCallback?t.argumentCallback(n):n;return c[u]}}const GT={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},IT={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},YT={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$T={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},FT={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},QT={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},XT=(t,n)=>{const r=Number(t),l=r%100;if(l>20||l<10)switch(l%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},KT={ordinalNumber:XT,era:Pa({values:GT,defaultWidth:"wide"}),quarter:Pa({values:IT,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Pa({values:YT,defaultWidth:"wide"}),day:Pa({values:$T,defaultWidth:"wide"}),dayPeriod:Pa({values:FT,defaultWidth:"wide",formattingValues:QT,defaultFormattingWidth:"wide"})};function La(t){return(n,r={})=>{const l=r.width,c=l&&t.matchPatterns[l]||t.matchPatterns[t.defaultMatchWidth],u=n.match(c);if(!u)return null;const h=u[0],g=l&&t.parsePatterns[l]||t.parsePatterns[t.defaultParseWidth],p=Array.isArray(g)?ZT(g,b=>b.test(h)):WT(g,b=>b.test(h));let m;m=t.valueCallback?t.valueCallback(p):p,m=r.valueCallback?r.valueCallback(m):m;const x=n.slice(h.length);return{value:m,rest:x}}}function WT(t,n){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n(t[r]))return r}function ZT(t,n){for(let r=0;r<t.length;r++)if(n(t[r]))return r}function Hv(t){return(n,r={})=>{const l=n.match(t.matchPattern);if(!l)return null;const c=l[0],u=n.match(t.parsePattern);if(!u)return null;let h=t.valueCallback?t.valueCallback(u[0]):u[0];h=r.valueCallback?r.valueCallback(h):h;const g=n.slice(c.length);return{value:h,rest:g}}}const JT=/^(\d+)(th|st|nd|rd)?/i,e6=/\d+/i,t6={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},a6={any:[/^b/i,/^(a|c)/i]},n6={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},s6={any:[/1/i,/2/i,/3/i,/4/i]},i6={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},r6={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},l6={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},o6={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},c6={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},d6={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},u6={ordinalNumber:Hv({matchPattern:JT,parsePattern:e6,valueCallback:t=>parseInt(t,10)}),era:La({matchPatterns:t6,defaultMatchWidth:"wide",parsePatterns:a6,defaultParseWidth:"any"}),quarter:La({matchPatterns:n6,defaultMatchWidth:"wide",parsePatterns:s6,defaultParseWidth:"any",valueCallback:t=>t+1}),month:La({matchPatterns:i6,defaultMatchWidth:"wide",parsePatterns:r6,defaultParseWidth:"any"}),day:La({matchPatterns:l6,defaultMatchWidth:"wide",parsePatterns:o6,defaultParseWidth:"any"}),dayPeriod:La({matchPatterns:c6,defaultMatchWidth:"any",parsePatterns:d6,defaultParseWidth:"any"})},f6={code:"en-US",formatDistance:PT,formatLong:BT,formatRelative:HT,localize:KT,match:u6,options:{weekStartsOn:0,firstWeekContainsDate:1}};function h6(t,n){const r=Aa(t,n==null?void 0:n.in);return qv(r,_T(r))+1}function m6(t,n){const r=Aa(t,n==null?void 0:n.in),l=+ac(r)-+RT(r);return Math.round(l/Uv)+1}function Gv(t,n){var x,b,v,w;const r=Aa(t,n==null?void 0:n.in),l=r.getFullYear(),c=bc(),u=(n==null?void 0:n.firstWeekContainsDate)??((b=(x=n==null?void 0:n.locale)==null?void 0:x.options)==null?void 0:b.firstWeekContainsDate)??c.firstWeekContainsDate??((w=(v=c.locale)==null?void 0:v.options)==null?void 0:w.firstWeekContainsDate)??1,h=Wn((n==null?void 0:n.in)||t,0);h.setFullYear(l+1,0,u),h.setHours(0,0,0,0);const g=Qr(h,n),p=Wn((n==null?void 0:n.in)||t,0);p.setFullYear(l,0,u),p.setHours(0,0,0,0);const m=Qr(p,n);return+r>=+g?l+1:+r>=+m?l:l-1}function p6(t,n){var g,p,m,x;const r=bc(),l=(n==null?void 0:n.firstWeekContainsDate)??((p=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((x=(m=r.locale)==null?void 0:m.options)==null?void 0:x.firstWeekContainsDate)??1,c=Gv(t,n),u=Wn((n==null?void 0:n.in)||t,0);return u.setFullYear(c,0,l),u.setHours(0,0,0,0),Qr(u,n)}function x6(t,n){const r=Aa(t,n==null?void 0:n.in),l=+Qr(r,n)-+p6(r,n);return Math.round(l/Uv)+1}function He(t,n){const r=t<0?"-":"",l=Math.abs(t).toString().padStart(n,"0");return r+l}const Hn={y(t,n){const r=t.getFullYear(),l=r>0?r:1-r;return He(n==="yy"?l%100:l,n.length)},M(t,n){const r=t.getMonth();return n==="M"?String(r+1):He(r+1,2)},d(t,n){return He(t.getDate(),n.length)},a(t,n){const r=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,n){return He(t.getHours()%12||12,n.length)},H(t,n){return He(t.getHours(),n.length)},m(t,n){return He(t.getMinutes(),n.length)},s(t,n){return He(t.getSeconds(),n.length)},S(t,n){const r=n.length,l=t.getMilliseconds(),c=Math.trunc(l*Math.pow(10,r-3));return He(c,n.length)}},xi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Vb={G:function(t,n,r){const l=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(l,{width:"abbreviated"});case"GGGGG":return r.era(l,{width:"narrow"});case"GGGG":default:return r.era(l,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){const l=t.getFullYear(),c=l>0?l:1-l;return r.ordinalNumber(c,{unit:"year"})}return Hn.y(t,n)},Y:function(t,n,r,l){const c=Gv(t,l),u=c>0?c:1-c;if(n==="YY"){const h=u%100;return He(h,2)}return n==="Yo"?r.ordinalNumber(u,{unit:"year"}):He(u,n.length)},R:function(t,n){const r=Bv(t);return He(r,n.length)},u:function(t,n){const r=t.getFullYear();return He(r,n.length)},Q:function(t,n,r){const l=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(l);case"QQ":return He(l,2);case"Qo":return r.ordinalNumber(l,{unit:"quarter"});case"QQQ":return r.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(l,{width:"wide",context:"formatting"})}},q:function(t,n,r){const l=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(l);case"qq":return He(l,2);case"qo":return r.ordinalNumber(l,{unit:"quarter"});case"qqq":return r.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(l,{width:"wide",context:"standalone"})}},M:function(t,n,r){const l=t.getMonth();switch(n){case"M":case"MM":return Hn.M(t,n);case"Mo":return r.ordinalNumber(l+1,{unit:"month"});case"MMM":return r.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(l,{width:"wide",context:"formatting"})}},L:function(t,n,r){const l=t.getMonth();switch(n){case"L":return String(l+1);case"LL":return He(l+1,2);case"Lo":return r.ordinalNumber(l+1,{unit:"month"});case"LLL":return r.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(l,{width:"wide",context:"standalone"})}},w:function(t,n,r,l){const c=x6(t,l);return n==="wo"?r.ordinalNumber(c,{unit:"week"}):He(c,n.length)},I:function(t,n,r){const l=m6(t);return n==="Io"?r.ordinalNumber(l,{unit:"week"}):He(l,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Hn.d(t,n)},D:function(t,n,r){const l=h6(t);return n==="Do"?r.ordinalNumber(l,{unit:"dayOfYear"}):He(l,n.length)},E:function(t,n,r){const l=t.getDay();switch(n){case"E":case"EE":case"EEE":return r.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(l,{width:"short",context:"formatting"});case"EEEE":default:return r.day(l,{width:"wide",context:"formatting"})}},e:function(t,n,r,l){const c=t.getDay(),u=(c-l.weekStartsOn+8)%7||7;switch(n){case"e":return String(u);case"ee":return He(u,2);case"eo":return r.ordinalNumber(u,{unit:"day"});case"eee":return r.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(c,{width:"short",context:"formatting"});case"eeee":default:return r.day(c,{width:"wide",context:"formatting"})}},c:function(t,n,r,l){const c=t.getDay(),u=(c-l.weekStartsOn+8)%7||7;switch(n){case"c":return String(u);case"cc":return He(u,n.length);case"co":return r.ordinalNumber(u,{unit:"day"});case"ccc":return r.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(c,{width:"narrow",context:"standalone"});case"cccccc":return r.day(c,{width:"short",context:"standalone"});case"cccc":default:return r.day(c,{width:"wide",context:"standalone"})}},i:function(t,n,r){const l=t.getDay(),c=l===0?7:l;switch(n){case"i":return String(c);case"ii":return He(c,n.length);case"io":return r.ordinalNumber(c,{unit:"day"});case"iii":return r.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(l,{width:"short",context:"formatting"});case"iiii":default:return r.day(l,{width:"wide",context:"formatting"})}},a:function(t,n,r){const c=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(c,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(c,{width:"wide",context:"formatting"})}},b:function(t,n,r){const l=t.getHours();let c;switch(l===12?c=xi.noon:l===0?c=xi.midnight:c=l/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(c,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(t,n,r){const l=t.getHours();let c;switch(l>=17?c=xi.evening:l>=12?c=xi.afternoon:l>=4?c=xi.morning:c=xi.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(c,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){let l=t.getHours()%12;return l===0&&(l=12),r.ordinalNumber(l,{unit:"hour"})}return Hn.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Hn.H(t,n)},K:function(t,n,r){const l=t.getHours()%12;return n==="Ko"?r.ordinalNumber(l,{unit:"hour"}):He(l,n.length)},k:function(t,n,r){let l=t.getHours();return l===0&&(l=24),n==="ko"?r.ordinalNumber(l,{unit:"hour"}):He(l,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Hn.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Hn.s(t,n)},S:function(t,n){return Hn.S(t,n)},X:function(t,n,r){const l=t.getTimezoneOffset();if(l===0)return"Z";switch(n){case"X":return Bb(l);case"XXXX":case"XX":return ws(l);case"XXXXX":case"XXX":default:return ws(l,":")}},x:function(t,n,r){const l=t.getTimezoneOffset();switch(n){case"x":return Bb(l);case"xxxx":case"xx":return ws(l);case"xxxxx":case"xxx":default:return ws(l,":")}},O:function(t,n,r){const l=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Ub(l,":");case"OOOO":default:return"GMT"+ws(l,":")}},z:function(t,n,r){const l=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Ub(l,":");case"zzzz":default:return"GMT"+ws(l,":")}},t:function(t,n,r){const l=Math.trunc(+t/1e3);return He(l,n.length)},T:function(t,n,r){return He(+t,n.length)}};function Ub(t,n=""){const r=t>0?"-":"+",l=Math.abs(t),c=Math.trunc(l/60),u=l%60;return u===0?r+String(c):r+String(c)+n+He(u,2)}function Bb(t,n){return t%60===0?(t>0?"-":"+")+He(Math.abs(t)/60,2):ws(t,n)}function ws(t,n=""){const r=t>0?"-":"+",l=Math.abs(t),c=He(Math.trunc(l/60),2),u=He(l%60,2);return r+c+n+u}const qb=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Iv=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},g6=(t,n)=>{const r=t.match(/(P+)(p+)?/)||[],l=r[1],c=r[2];if(!c)return qb(t,n);let u;switch(l){case"P":u=n.dateTime({width:"short"});break;case"PP":u=n.dateTime({width:"medium"});break;case"PPP":u=n.dateTime({width:"long"});break;case"PPPP":default:u=n.dateTime({width:"full"});break}return u.replace("{{date}}",qb(l,n)).replace("{{time}}",Iv(c,n))},b6={p:Iv,P:g6},y6=/^D+$/,v6=/^Y+$/,w6=["D","DD","YY","YYYY"];function N6(t){return y6.test(t)}function j6(t){return v6.test(t)}function k6(t,n,r){const l=S6(t,n,r);if(console.warn(l),w6.includes(t))throw new RangeError(l)}function S6(t,n,r){const l=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${l} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const C6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,E6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,A6=/^'([^]*?)'?$/,T6=/''/g,M6=/[a-zA-Z]/;function Ht(t,n,r){var x,b,v,w,j,N,A,E;const l=bc(),c=(r==null?void 0:r.locale)??l.locale??f6,u=(r==null?void 0:r.firstWeekContainsDate)??((b=(x=r==null?void 0:r.locale)==null?void 0:x.options)==null?void 0:b.firstWeekContainsDate)??l.firstWeekContainsDate??((w=(v=l.locale)==null?void 0:v.options)==null?void 0:w.firstWeekContainsDate)??1,h=(r==null?void 0:r.weekStartsOn)??((N=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:N.weekStartsOn)??l.weekStartsOn??((E=(A=l.locale)==null?void 0:A.options)==null?void 0:E.weekStartsOn)??0,g=Aa(t,r==null?void 0:r.in);if(!OT(g))throw new RangeError("Invalid time value");let p=n.match(E6).map(D=>{const C=D[0];if(C==="p"||C==="P"){const O=b6[C];return O(D,c.formatLong)}return D}).join("").match(C6).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const C=D[0];if(C==="'")return{isToken:!1,value:R6(D)};if(Vb[C])return{isToken:!0,value:D};if(C.match(M6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:D}});c.localize.preprocessor&&(p=c.localize.preprocessor(g,p));const m={firstWeekContainsDate:u,weekStartsOn:h,locale:c};return p.map(D=>{if(!D.isToken)return D.value;const C=D.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&j6(C)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&N6(C))&&k6(C,n,String(t));const O=Vb[C[0]];return O(g,C,c.localize,m)}).join("")}function R6(t){const n=t.match(A6);return n?n[1].replace(T6,"'"):t}var D6=Object.defineProperty,nc=Object.getOwnPropertySymbols,Yv=Object.prototype.hasOwnProperty,$v=Object.prototype.propertyIsEnumerable,Hb=(t,n,r)=>n in t?D6(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,Gf=(t,n)=>{for(var r in n||(n={}))Yv.call(n,r)&&Hb(t,r,n[r]);if(nc)for(var r of nc(n))$v.call(n,r)&&Hb(t,r,n[r]);return t},If=(t,n)=>{var r={};for(var l in t)Yv.call(t,l)&&n.indexOf(l)<0&&(r[l]=t[l]);if(t!=null&&nc)for(var l of nc(t))n.indexOf(l)<0&&$v.call(t,l)&&(r[l]=t[l]);return r};/**
 * @license QR Code generator library (TypeScript)
 * Copyright (c) Project Nayuki.
 * SPDX-License-Identifier: MIT
 */var Ts;(t=>{const n=class Oe{constructor(p,m,x,b){if(this.version=p,this.errorCorrectionLevel=m,this.modules=[],this.isFunction=[],p<Oe.MIN_VERSION||p>Oe.MAX_VERSION)throw new RangeError("Version value out of range");if(b<-1||b>7)throw new RangeError("Mask value out of range");this.size=p*4+17;let v=[];for(let j=0;j<this.size;j++)v.push(!1);for(let j=0;j<this.size;j++)this.modules.push(v.slice()),this.isFunction.push(v.slice());this.drawFunctionPatterns();const w=this.addEccAndInterleave(x);if(this.drawCodewords(w),b==-1){let j=1e9;for(let N=0;N<8;N++){this.applyMask(N),this.drawFormatBits(N);const A=this.getPenaltyScore();A<j&&(b=N,j=A),this.applyMask(N)}}c(0<=b&&b<=7),this.mask=b,this.applyMask(b),this.drawFormatBits(b),this.isFunction=[]}static encodeText(p,m){const x=t.QrSegment.makeSegments(p);return Oe.encodeSegments(x,m)}static encodeBinary(p,m){const x=t.QrSegment.makeBytes(p);return Oe.encodeSegments([x],m)}static encodeSegments(p,m,x=1,b=40,v=-1,w=!0){if(!(Oe.MIN_VERSION<=x&&x<=b&&b<=Oe.MAX_VERSION)||v<-1||v>7)throw new RangeError("Invalid value");let j,N;for(j=x;;j++){const C=Oe.getNumDataCodewords(j,m)*8,O=h.getTotalBits(p,j);if(O<=C){N=O;break}if(j>=b)throw new RangeError("Data too long")}for(const C of[Oe.Ecc.MEDIUM,Oe.Ecc.QUARTILE,Oe.Ecc.HIGH])w&&N<=Oe.getNumDataCodewords(j,C)*8&&(m=C);let A=[];for(const C of p){r(C.mode.modeBits,4,A),r(C.numChars,C.mode.numCharCountBits(j),A);for(const O of C.getData())A.push(O)}c(A.length==N);const E=Oe.getNumDataCodewords(j,m)*8;c(A.length<=E),r(0,Math.min(4,E-A.length),A),r(0,(8-A.length%8)%8,A),c(A.length%8==0);for(let C=236;A.length<E;C^=253)r(C,8,A);let D=[];for(;D.length*8<A.length;)D.push(0);return A.forEach((C,O)=>D[O>>>3]|=C<<7-(O&7)),new Oe(j,m,D,v)}getModule(p,m){return 0<=p&&p<this.size&&0<=m&&m<this.size&&this.modules[m][p]}getModules(){return this.modules}drawFunctionPatterns(){for(let x=0;x<this.size;x++)this.setFunctionModule(6,x,x%2==0),this.setFunctionModule(x,6,x%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const p=this.getAlignmentPatternPositions(),m=p.length;for(let x=0;x<m;x++)for(let b=0;b<m;b++)x==0&&b==0||x==0&&b==m-1||x==m-1&&b==0||this.drawAlignmentPattern(p[x],p[b]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(p){const m=this.errorCorrectionLevel.formatBits<<3|p;let x=m;for(let v=0;v<10;v++)x=x<<1^(x>>>9)*1335;const b=(m<<10|x)^21522;c(b>>>15==0);for(let v=0;v<=5;v++)this.setFunctionModule(8,v,l(b,v));this.setFunctionModule(8,7,l(b,6)),this.setFunctionModule(8,8,l(b,7)),this.setFunctionModule(7,8,l(b,8));for(let v=9;v<15;v++)this.setFunctionModule(14-v,8,l(b,v));for(let v=0;v<8;v++)this.setFunctionModule(this.size-1-v,8,l(b,v));for(let v=8;v<15;v++)this.setFunctionModule(8,this.size-15+v,l(b,v));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let p=this.version;for(let x=0;x<12;x++)p=p<<1^(p>>>11)*7973;const m=this.version<<12|p;c(m>>>18==0);for(let x=0;x<18;x++){const b=l(m,x),v=this.size-11+x%3,w=Math.floor(x/3);this.setFunctionModule(v,w,b),this.setFunctionModule(w,v,b)}}drawFinderPattern(p,m){for(let x=-4;x<=4;x++)for(let b=-4;b<=4;b++){const v=Math.max(Math.abs(b),Math.abs(x)),w=p+b,j=m+x;0<=w&&w<this.size&&0<=j&&j<this.size&&this.setFunctionModule(w,j,v!=2&&v!=4)}}drawAlignmentPattern(p,m){for(let x=-2;x<=2;x++)for(let b=-2;b<=2;b++)this.setFunctionModule(p+b,m+x,Math.max(Math.abs(b),Math.abs(x))!=1)}setFunctionModule(p,m,x){this.modules[m][p]=x,this.isFunction[m][p]=!0}addEccAndInterleave(p){const m=this.version,x=this.errorCorrectionLevel;if(p.length!=Oe.getNumDataCodewords(m,x))throw new RangeError("Invalid argument");const b=Oe.NUM_ERROR_CORRECTION_BLOCKS[x.ordinal][m],v=Oe.ECC_CODEWORDS_PER_BLOCK[x.ordinal][m],w=Math.floor(Oe.getNumRawDataModules(m)/8),j=b-w%b,N=Math.floor(w/b);let A=[];const E=Oe.reedSolomonComputeDivisor(v);for(let C=0,O=0;C<b;C++){let Q=p.slice(O,O+N-v+(C<j?0:1));O+=Q.length;const z=Oe.reedSolomonComputeRemainder(Q,E);C<j&&Q.push(0),A.push(Q.concat(z))}let D=[];for(let C=0;C<A[0].length;C++)A.forEach((O,Q)=>{(C!=N-v||Q>=j)&&D.push(O[C])});return c(D.length==w),D}drawCodewords(p){if(p.length!=Math.floor(Oe.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let m=0;for(let x=this.size-1;x>=1;x-=2){x==6&&(x=5);for(let b=0;b<this.size;b++)for(let v=0;v<2;v++){const w=x-v,N=(x+1&2)==0?this.size-1-b:b;!this.isFunction[N][w]&&m<p.length*8&&(this.modules[N][w]=l(p[m>>>3],7-(m&7)),m++)}}c(m==p.length*8)}applyMask(p){if(p<0||p>7)throw new RangeError("Mask value out of range");for(let m=0;m<this.size;m++)for(let x=0;x<this.size;x++){let b;switch(p){case 0:b=(x+m)%2==0;break;case 1:b=m%2==0;break;case 2:b=x%3==0;break;case 3:b=(x+m)%3==0;break;case 4:b=(Math.floor(x/3)+Math.floor(m/2))%2==0;break;case 5:b=x*m%2+x*m%3==0;break;case 6:b=(x*m%2+x*m%3)%2==0;break;case 7:b=((x+m)%2+x*m%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[m][x]&&b&&(this.modules[m][x]=!this.modules[m][x])}}getPenaltyScore(){let p=0;for(let v=0;v<this.size;v++){let w=!1,j=0,N=[0,0,0,0,0,0,0];for(let A=0;A<this.size;A++)this.modules[v][A]==w?(j++,j==5?p+=Oe.PENALTY_N1:j>5&&p++):(this.finderPenaltyAddHistory(j,N),w||(p+=this.finderPenaltyCountPatterns(N)*Oe.PENALTY_N3),w=this.modules[v][A],j=1);p+=this.finderPenaltyTerminateAndCount(w,j,N)*Oe.PENALTY_N3}for(let v=0;v<this.size;v++){let w=!1,j=0,N=[0,0,0,0,0,0,0];for(let A=0;A<this.size;A++)this.modules[A][v]==w?(j++,j==5?p+=Oe.PENALTY_N1:j>5&&p++):(this.finderPenaltyAddHistory(j,N),w||(p+=this.finderPenaltyCountPatterns(N)*Oe.PENALTY_N3),w=this.modules[A][v],j=1);p+=this.finderPenaltyTerminateAndCount(w,j,N)*Oe.PENALTY_N3}for(let v=0;v<this.size-1;v++)for(let w=0;w<this.size-1;w++){const j=this.modules[v][w];j==this.modules[v][w+1]&&j==this.modules[v+1][w]&&j==this.modules[v+1][w+1]&&(p+=Oe.PENALTY_N2)}let m=0;for(const v of this.modules)m=v.reduce((w,j)=>w+(j?1:0),m);const x=this.size*this.size,b=Math.ceil(Math.abs(m*20-x*10)/x)-1;return c(0<=b&&b<=9),p+=b*Oe.PENALTY_N4,c(0<=p&&p<=2568888),p}getAlignmentPatternPositions(){if(this.version==1)return[];{const p=Math.floor(this.version/7)+2,m=this.version==32?26:Math.ceil((this.version*4+4)/(p*2-2))*2;let x=[6];for(let b=this.size-7;x.length<p;b-=m)x.splice(1,0,b);return x}}static getNumRawDataModules(p){if(p<Oe.MIN_VERSION||p>Oe.MAX_VERSION)throw new RangeError("Version number out of range");let m=(16*p+128)*p+64;if(p>=2){const x=Math.floor(p/7)+2;m-=(25*x-10)*x-55,p>=7&&(m-=36)}return c(208<=m&&m<=29648),m}static getNumDataCodewords(p,m){return Math.floor(Oe.getNumRawDataModules(p)/8)-Oe.ECC_CODEWORDS_PER_BLOCK[m.ordinal][p]*Oe.NUM_ERROR_CORRECTION_BLOCKS[m.ordinal][p]}static reedSolomonComputeDivisor(p){if(p<1||p>255)throw new RangeError("Degree out of range");let m=[];for(let b=0;b<p-1;b++)m.push(0);m.push(1);let x=1;for(let b=0;b<p;b++){for(let v=0;v<m.length;v++)m[v]=Oe.reedSolomonMultiply(m[v],x),v+1<m.length&&(m[v]^=m[v+1]);x=Oe.reedSolomonMultiply(x,2)}return m}static reedSolomonComputeRemainder(p,m){let x=m.map(b=>0);for(const b of p){const v=b^x.shift();x.push(0),m.forEach((w,j)=>x[j]^=Oe.reedSolomonMultiply(w,v))}return x}static reedSolomonMultiply(p,m){if(p>>>8||m>>>8)throw new RangeError("Byte out of range");let x=0;for(let b=7;b>=0;b--)x=x<<1^(x>>>7)*285,x^=(m>>>b&1)*p;return c(x>>>8==0),x}finderPenaltyCountPatterns(p){const m=p[1];c(m<=this.size*3);const x=m>0&&p[2]==m&&p[3]==m*3&&p[4]==m&&p[5]==m;return(x&&p[0]>=m*4&&p[6]>=m?1:0)+(x&&p[6]>=m*4&&p[0]>=m?1:0)}finderPenaltyTerminateAndCount(p,m,x){return p&&(this.finderPenaltyAddHistory(m,x),m=0),m+=this.size,this.finderPenaltyAddHistory(m,x),this.finderPenaltyCountPatterns(x)}finderPenaltyAddHistory(p,m){m[0]==0&&(p+=this.size),m.pop(),m.unshift(p)}};n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=n;function r(g,p,m){if(p<0||p>31||g>>>p)throw new RangeError("Value out of range");for(let x=p-1;x>=0;x--)m.push(g>>>x&1)}function l(g,p){return(g>>>p&1)!=0}function c(g){if(!g)throw new Error("Assertion error")}const u=class at{constructor(p,m,x){if(this.mode=p,this.numChars=m,this.bitData=x,m<0)throw new RangeError("Invalid argument");this.bitData=x.slice()}static makeBytes(p){let m=[];for(const x of p)r(x,8,m);return new at(at.Mode.BYTE,p.length,m)}static makeNumeric(p){if(!at.isNumeric(p))throw new RangeError("String contains non-numeric characters");let m=[];for(let x=0;x<p.length;){const b=Math.min(p.length-x,3);r(parseInt(p.substring(x,x+b),10),b*3+1,m),x+=b}return new at(at.Mode.NUMERIC,p.length,m)}static makeAlphanumeric(p){if(!at.isAlphanumeric(p))throw new RangeError("String contains unencodable characters in alphanumeric mode");let m=[],x;for(x=0;x+2<=p.length;x+=2){let b=at.ALPHANUMERIC_CHARSET.indexOf(p.charAt(x))*45;b+=at.ALPHANUMERIC_CHARSET.indexOf(p.charAt(x+1)),r(b,11,m)}return x<p.length&&r(at.ALPHANUMERIC_CHARSET.indexOf(p.charAt(x)),6,m),new at(at.Mode.ALPHANUMERIC,p.length,m)}static makeSegments(p){return p==""?[]:at.isNumeric(p)?[at.makeNumeric(p)]:at.isAlphanumeric(p)?[at.makeAlphanumeric(p)]:[at.makeBytes(at.toUtf8ByteArray(p))]}static makeEci(p){let m=[];if(p<0)throw new RangeError("ECI assignment value out of range");if(p<128)r(p,8,m);else if(p<16384)r(2,2,m),r(p,14,m);else if(p<1e6)r(6,3,m),r(p,21,m);else throw new RangeError("ECI assignment value out of range");return new at(at.Mode.ECI,0,m)}static isNumeric(p){return at.NUMERIC_REGEX.test(p)}static isAlphanumeric(p){return at.ALPHANUMERIC_REGEX.test(p)}getData(){return this.bitData.slice()}static getTotalBits(p,m){let x=0;for(const b of p){const v=b.mode.numCharCountBits(m);if(b.numChars>=1<<v)return 1/0;x+=4+v+b.bitData.length}return x}static toUtf8ByteArray(p){p=encodeURI(p);let m=[];for(let x=0;x<p.length;x++)p.charAt(x)!="%"?m.push(p.charCodeAt(x)):(m.push(parseInt(p.substring(x+1,x+3),16)),x+=2);return m}};u.NUMERIC_REGEX=/^[0-9]*$/,u.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,u.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let h=u;t.QrSegment=u})(Ts||(Ts={}));(t=>{(n=>{const r=class{constructor(c,u){this.ordinal=c,this.formatBits=u}};r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),n.Ecc=r})(t.QrCode||(t.QrCode={}))})(Ts||(Ts={}));(t=>{(n=>{const r=class{constructor(c,u){this.modeBits=c,this.numBitsCharCount=u}numCharCountBits(c){return this.numBitsCharCount[Math.floor((c+7)/17)]}};r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),n.Mode=r})(t.QrSegment||(t.QrSegment={}))})(Ts||(Ts={}));var Ni=Ts;/**
 * @license qrcode.react
 * Copyright (c) Paul O'Shannessy
 * SPDX-License-Identifier: ISC
 */var O6={L:Ni.QrCode.Ecc.LOW,M:Ni.QrCode.Ecc.MEDIUM,Q:Ni.QrCode.Ecc.QUARTILE,H:Ni.QrCode.Ecc.HIGH},Fv=128,Qv="L",Xv="#FFFFFF",Kv="#000000",Wv=!1,Zv=1,_6=4,z6=0,P6=.1;function Jv(t,n=0){const r=[];return t.forEach(function(l,c){let u=null;l.forEach(function(h,g){if(!h&&u!==null){r.push(`M${u+n} ${c+n}h${g-u}v1H${u+n}z`),u=null;return}if(g===l.length-1){if(!h)return;u===null?r.push(`M${g+n},${c+n} h1v1H${g+n}z`):r.push(`M${u+n},${c+n} h${g+1-u}v1H${u+n}z`);return}h&&u===null&&(u=g)})}),r.join("")}function ew(t,n){return t.slice().map((r,l)=>l<n.y||l>=n.y+n.h?r:r.map((c,u)=>u<n.x||u>=n.x+n.w?c:!1))}function L6(t,n,r,l){if(l==null)return null;const c=t.length+r*2,u=Math.floor(n*P6),h=c/n,g=(l.width||u)*h,p=(l.height||u)*h,m=l.x==null?t.length/2-g/2:l.x*h,x=l.y==null?t.length/2-p/2:l.y*h,b=l.opacity==null?1:l.opacity;let v=null;if(l.excavate){let j=Math.floor(m),N=Math.floor(x),A=Math.ceil(g+m-j),E=Math.ceil(p+x-N);v={x:j,y:N,w:A,h:E}}const w=l.crossOrigin;return{x:m,y:x,h:p,w:g,excavation:v,opacity:b,crossOrigin:w}}function V6(t,n){return n!=null?Math.max(Math.floor(n),0):t?_6:z6}function tw({value:t,level:n,minVersion:r,includeMargin:l,marginSize:c,imageSettings:u,size:h,boostLevel:g}){let p=mt.useMemo(()=>{const j=(Array.isArray(t)?t:[t]).reduce((N,A)=>(N.push(...Ni.QrSegment.makeSegments(A)),N),[]);return Ni.QrCode.encodeSegments(j,O6[n],r,void 0,void 0,g)},[t,n,r,g]);const{cells:m,margin:x,numCells:b,calculatedImageSettings:v}=mt.useMemo(()=>{let w=p.getModules();const j=V6(l,c),N=w.length+j*2,A=L6(w,h,j,u);return{cells:w,margin:j,numCells:N,calculatedImageSettings:A}},[p,h,u,l,c]);return{qrcode:p,margin:x,cells:m,numCells:b,calculatedImageSettings:v}}var U6=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),B6=mt.forwardRef(function(n,r){const l=n,{value:c,size:u=Fv,level:h=Qv,bgColor:g=Xv,fgColor:p=Kv,includeMargin:m=Wv,minVersion:x=Zv,boostLevel:b,marginSize:v,imageSettings:w}=l,N=If(l,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:A}=N,E=If(N,["style"]),D=w==null?void 0:w.src,C=mt.useRef(null),O=mt.useRef(null),Q=mt.useCallback(be=>{C.current=be,typeof r=="function"?r(be):r&&(r.current=be)},[r]),[z,I]=mt.useState(!1),{margin:P,cells:ee,numCells:W,calculatedImageSettings:le}=tw({value:c,level:h,minVersion:x,boostLevel:b,includeMargin:m,marginSize:v,imageSettings:w,size:u});mt.useEffect(()=>{if(C.current!=null){const be=C.current,te=be.getContext("2d");if(!te)return;let V=ee;const J=O.current,ae=le!=null&&J!==null&&J.complete&&J.naturalHeight!==0&&J.naturalWidth!==0;ae&&le.excavation!=null&&(V=ew(ee,le.excavation));const H=window.devicePixelRatio||1;be.height=be.width=u*H;const M=u/W*H;te.scale(M,M),te.fillStyle=g,te.fillRect(0,0,W,W),te.fillStyle=p,U6?te.fill(new Path2D(Jv(V,P))):ee.forEach(function(T,U){T.forEach(function(Y,K){Y&&te.fillRect(K+P,U+P,1,1)})}),le&&(te.globalAlpha=le.opacity),ae&&te.drawImage(J,le.x+P,le.y+P,le.w,le.h)}}),mt.useEffect(()=>{I(!1)},[D]);const de=Gf({height:u,width:u},A);let ge=null;return D!=null&&(ge=mt.createElement("img",{src:D,key:D,style:{display:"none"},onLoad:()=>{I(!0)},ref:O,crossOrigin:le==null?void 0:le.crossOrigin})),mt.createElement(mt.Fragment,null,mt.createElement("canvas",Gf({style:de,height:u,width:u,ref:Q,role:"img"},E)),ge)});B6.displayName="QRCodeCanvas";var Bh=mt.forwardRef(function(n,r){const l=n,{value:c,size:u=Fv,level:h=Qv,bgColor:g=Xv,fgColor:p=Kv,includeMargin:m=Wv,minVersion:x=Zv,boostLevel:b,title:v,marginSize:w,imageSettings:j}=l,N=If(l,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:A,cells:E,numCells:D,calculatedImageSettings:C}=tw({value:c,level:h,minVersion:x,boostLevel:b,includeMargin:m,marginSize:w,imageSettings:j,size:u});let O=E,Q=null;j!=null&&C!=null&&(C.excavation!=null&&(O=ew(E,C.excavation)),Q=mt.createElement("image",{href:j.src,height:C.h,width:C.w,x:C.x+A,y:C.y+A,preserveAspectRatio:"none",opacity:C.opacity,crossOrigin:C.crossOrigin}));const z=Jv(O,A);return mt.createElement("svg",Gf({height:u,width:u,viewBox:`0 0 ${D} ${D}`,ref:r,role:"img"},N),!!v&&mt.createElement("title",null,v),mt.createElement("path",{fill:g,d:`M0,0 h${D}v${D}H0z`,shapeRendering:"crispEdges"}),mt.createElement("path",{fill:p,d:z,shapeRendering:"crispEdges"}),Q)});Bh.displayName="QRCodeSVG";function ki({value:t,size:n=220,className:r=""}){return s.jsx("div",{className:`bg-white rounded-[32px] p-4 shadow-2xl ${r}`,children:s.jsx(Bh,{value:t,size:n,level:"M",includeMargin:!0,bgColor:"#FFFFFF",fgColor:"#000000"})})}function q6({partner:t}){const n={active:"bg-green-500",expired:"bg-red-500",pending:"bg-brand-gold",blocked:"bg-gray-500"},r={active:"Ativa",expired:"Vencida",pending:"Pendente",blocked:"Bloqueada"};return s.jsx("div",{className:"w-[340px] aspect-[1.6/1] sm:w-[450px] relative group perspective",children:s.jsxs("div",{className:"w-full h-full bg-[#121212] rounded-[32px] overflow-hidden border border-white/10 shadow-2xl relative transition-transform duration-700 group-hover:rotate-y-12",children:[s.jsx("div",{className:"absolute top-0 right-0 w-48 h-48 bg-brand-wine/20 blur-[60px] rounded-full -mr-10 -mt-10"}),s.jsx("div",{className:"absolute bottom-0 left-0 w-32 h-32 bg-brand-gold/10 blur-[50px] rounded-full -ml-10 -mb-10"}),s.jsx("div",{className:"absolute inset-0 noise opacity-20"}),s.jsxs("div",{className:"absolute top-8 left-8 right-8 flex items-start justify-between z-10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-white rounded-xl flex items-center justify-center p-1.5 border border-white/10 overflow-hidden shrink-0",children:s.jsx("img",{src:Kn,alt:"Logo",className:"w-full h-full object-contain"})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-white font-display font-black text-sm uppercase tracking-tighter",children:"Galpão Imperial"}),s.jsx("span",{className:"text-brand-gold text-[7px] font-black uppercase tracking-widest leading-none",children:"Clube Parceiro"})]})]}),s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1 bg-black/40 backdrop-blur-md rounded-lg border border-white/5",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${n[t.status]} animate-pulse`}),s.jsx("span",{className:"text-[8px] font-black text-white uppercase tracking-widest",children:r[t.status]})]})]}),s.jsxs("div",{className:"absolute bottom-8 left-8 right-8 flex justify-between items-end z-10",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-gray-500 text-[7px] font-black uppercase tracking-widest leading-none",children:"Membro Oficial"}),s.jsx("p",{className:"text-white font-display font-black text-2xl uppercase tracking-tighter truncate max-w-[200px] sm:max-w-[280px]",children:t.name})]}),s.jsxs("div",{className:"flex gap-8",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-gray-500 text-[6px] font-black uppercase tracking-widest leading-none",children:"Matrícula"}),s.jsx("p",{className:"text-white font-black text-[10px] tracking-widest",children:t.id})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-gray-500 text-[6px] font-black uppercase tracking-widest leading-none",children:"Validade"}),s.jsx("p",{className:"text-brand-gold font-black text-[10px] tracking-widest",children:Ht(t.expiryDate,"MM/yy")})]})]})]}),s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("div",{className:"w-16 h-16 bg-white p-1 rounded-xl shadow-lg border-2 border-brand-wine/20 overflow-hidden flex items-center justify-center",children:s.jsx(ki,{value:t.qrValue||`GALPAO_IMPERIAL:PARTNER:${t.memberCode||t.cpf||t.id}`,size:56,className:"scale-[0.92]"})}),s.jsxs("p",{className:"text-[6px] text-gray-400 font-black uppercase tracking-widest",children:["Código: ",t.memberCode||t.cpf.slice(-4)]})]})]}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-transparent via-white/5 to-white/10 opacity-30 pointer-events-none"}),s.jsx("div",{className:"absolute top-1/2 left-0 right-0 h-8 bg-brand-wine/5 backdrop-blur-sm -skew-y-6 -translate-y-1/2 flex items-center justify-center opacity-30",children:s.jsx("div",{className:"flex gap-10",children:[1,2,3,4,5].map(l=>s.jsx(Fn,{className:"w-4 h-4 text-brand-gold/30"},l))})})]})})}const aw=[{id:"monthly",name:"Parceiro Mensal",price:50,validityDays:30,benefits:["Acesso ao espaço em dias permitidos","Piscina e área de banho","Futebol de sabão quando disponível","Churrasco e lazer","Carteirinha digital","Mensalidade acessível","Prioridade em comunicados e eventos"]}],H6=[{id:"p1",name:"João da Silva",whatsapp:"27999887766",cpf:"123.456.789-00",birthDate:"1990-05-15",planId:"monthly",startDate:new Date,expiryDate:new Date(Date.now()+720*60*60*1e3),status:"active"}],G6=[{id:"l1",title:"Domingo de Lazer no Galpão Imperial",date:new Date("2026-04-26T09:00:00"),time:"09:00h às 17:00h",description:"Piscina, churrasco e futebol de sabão para parceiros.",imageUrl:"https://images.unsplash.com/photo-1519167758481-83f550bb49b3?auto=format&fit=crop&q=80",acceptsPartner:!0,guestPrice:30},{id:"l2",title:"Sábado de Piscina e Lazer",date:new Date("2026-04-25T10:00:00"),time:"10:00h às 16:00h",description:"Dia de relaxar na piscina com música ao vivo ambiente.",imageUrl:"https://images.unsplash.com/photo-1540541338287-41700207dee6?auto=format&fit=crop&q=80",acceptsPartner:!0,guestPrice:20}],nw={name:"Galpão Imperial",whatsapp:"(27) 99753-2187",instagram:"@galpao.imperial",address:"R. Tijuco Preto - Paraju, Domingos Martins - ES, 29273-000",googleMapsLink:"https://maps.app.goo.gl/3appdn2QiPPDTPk87",wazeLink:"https://waze.com/ul?q=Galp%C3%A3o%20Imperial%20Paraju%20Domingos%20Martins%20ES&navigate=yes",pixKey:"27993411555",serviceTax:0,confirmationMessage:"Seu ingresso para o Galpão Imperial foi confirmado!",whatsappTemplate:"Olá, [nome]. Seu ingresso para [evento] no Galpão Imperial foi confirmado. Código do ingresso: [código]. Apresente este código/QR Code na entrada."},I6=[{id:"s1",orderNumber:"#88921",buyerName:"Alice Oliveira",email:"alice@email.com",whatsapp:"27999887766",eventId:"1",eventTitle:"Almoço Imperial",quantity:2,totalValue:40,paymentMethod:"pix",paymentStatus:"paid",purchaseDate:new Date("2026-04-20T14:30:00"),ticketStatus:"unused",tickets:[{id:"t1",code:"GI-ALICE-1",batchName:"Lote Promocional",status:"unused"},{id:"t2",code:"GI-ALICE-2",batchName:"Lote Promocional",status:"unused"}]},{id:"s2",orderNumber:"#88922",buyerName:"Bruno Costa",email:"bruno@email.com",whatsapp:"27988776655",eventId:"1",eventTitle:"Almoço Imperial",quantity:1,totalValue:20,paymentMethod:"pix",paymentStatus:"pending",purchaseDate:new Date("2026-04-22T09:15:00"),ticketStatus:"unused",tickets:[{id:"t3",code:"GI-BRUNO-1",batchName:"Lote Promocional",status:"unused"}]}],Y6=[{id:"g1",firstName:"Mariana",lastName:"Souza",whatsapp:"27999887766",claimDate:new Date("2026-04-20T10:00:00"),code:"PRESENTE-MARIANA-1234",status:"confirmed"},{id:"g2",firstName:"Carla",lastName:"Mendes",whatsapp:"27988776655",claimDate:new Date("2026-04-21T15:30:00"),code:"PRESENTE-CARLA-5678",status:"used",usedAt:new Date("2026-04-22T21:00:00")}],$6=[{id:"1",title:"Almoço Imperial",date:new Date("2026-05-24T12:00:00"),location:"Paraju / Domingos Martins - ES",attractions:["Buffet à vontade","Bar no local"],imageUrl:"https://images.unsplash.com/photo-1544148103-0773bf10d330?auto=format&fit=crop&q=80",description:"Almoço com buffet, bebidas selecionadas e ambiente aconchegante para famílias, grupos e turistas.",status:"featured",featured:!0,category:"Restaurante",slug:"almoco-imperial",horario:"12:00",totalTickets:200,batches:[{id:"b1",name:"Reserva de Mesa",price:0,available:!0,quantity:200,sold:0,status:"active"}]},{id:"2",title:"Reserva para Eventos",date:new Date("2026-04-26T18:00:00"),location:"Paraju / Domingos Martins - ES",attractions:["Espaço privativo","Atendimento para grupos"],imageUrl:"https://images.unsplash.com/photo-1528605248644-14dd04022da1?auto=format&fit=crop&q=80",description:"Espaço reservado para aniversários, encontros corporativos e comemorações com atendimento no salão.",status:"active",category:"Eventos",slug:"reserva-para-eventos",horario:"18:00",totalTickets:120,batches:[{id:"b1",name:"Consulta de Reserva",price:0,available:!0,quantity:120,sold:0,status:"active"}]},{id:"3",title:"Música ao Vivo",date:new Date("2026-05-24T12:00:00"),location:"Paraju / Domingos Martins - ES",attractions:["Música ao vivo","Cervejas selecionadas"],imageUrl:"https://images.unsplash.com/photo-1510812431401-41d2bd2722f3?auto=format&fit=crop&q=80",description:"Noites com boa música, bar completo e mesas para curtir com tranquilidade.",status:"active",category:"Bar",slug:"musica-ao-vivo",horario:"19:00",totalTickets:160,batches:[{id:"b1",name:"Reserva de Mesa",price:0,available:!0,quantity:160,sold:0,status:"active"}]},{id:"4",title:"Mesa para Grupos",date:new Date("2026-04-25T12:00:00"),location:"Paraju / Domingos Martins - ES",attractions:["Mesas externas","Garçons"],imageUrl:"https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&q=80",description:"Ambiente confortável para grupos, almoço em família e comemorações.",status:"active",category:"Reservas",slug:"mesa-para-grupos",horario:"12:00",totalTickets:180,batches:[{id:"b1",name:"Consulta de Mesa",price:0,available:!0,quantity:180,sold:0,status:"active"}]}],Gb={},F6=typeof import.meta<"u"&&Gb?Gb:{},Q6=(F6.VITE_API_BASE_URL||"").trim(),X6="/api",sw=(Q6||X6).replace(/\/$/,""),Gt=t=>t instanceof Date?t:t?new Date(t):new Date,iw=t=>({...t,holderName:t.holderName??t.holder_name??null,holderEmail:t.holderEmail??t.holder_email??null,ticketEmailSentAt:t.ticketEmailSentAt??t.ticket_email_sent_at??null,ticketEmailError:t.ticketEmailError??t.ticket_email_error??null,usedAt:t.usedAt?Gt(t.usedAt):void 0}),rw=t=>({...t,date:Gt(t.date),isUnlimited:!!t.isUnlimited,remainingTickets:t.remainingTickets??null,batches:(t.batches||[]).map(n=>({...n,ticketsPerUnit:Math.max(1,Number(n.ticketsPerUnit??n.tickets_per_unit??1)),available:!!n.available,isUnlimited:!!n.isUnlimited,remaining:n.remaining??null,startDate:n.startDate?Gt(n.startDate):void 0,endDate:n.endDate?Gt(n.endDate):void 0}))}),qh=t=>({...t,startDate:Gt(t.startDate),expiryDate:Gt(t.expiryDate),lastValidatedAt:t.lastValidatedAt?Gt(t.lastValidatedAt):void 0}),lw=t=>{var n;return{...t,purchaseDate:Gt(t.purchaseDate),expectedTicketCount:Number(t.expectedTicketCount??t.expected_ticket_count??((n=t.tickets)==null?void 0:n.length)??t.quantity??0),missingTicketCount:Number(t.missingTicketCount??t.missing_ticket_count??0),tickets:(t.tickets||[]).map(iw)}},yc=t=>({...t,claimDate:Gt(t.claimDate),usedAt:t.usedAt?Gt(t.usedAt):void 0}),ow=t=>({...t,displayOrder:Number(t.displayOrder||0)}),cw=t=>({id:String(t.id),name:t.name||"",slug:t.slug??null,code:t.code||"",instagram:t.instagram??null,whatsapp:t.whatsapp??null,notes:t.notes??null,landingUrl:t.landingUrl??t.landing_url??null,isActive:!!(t.isActive??t.is_active??!1),clicks:Number(t.clicks||0),totalOrders:Number(t.totalOrders||t.total_orders||0),paidOrders:Number(t.paidOrders||t.paid_orders||0),totalRevenue:Number(t.totalRevenue||t.total_revenue||0),generatedLink:t.generatedLink||t.generated_link||"",lastClickAt:t.lastClickAt??t.last_click_at??null,createdAt:t.createdAt??t.created_at??null}),Ib=t=>({...t,amount:Number(t.amount||0),createdAt:Gt(t.createdAt||t.created_at),referenceType:t.referenceType??t.reference_type??null,referenceId:t.referenceId??t.reference_id??null}),vc=t=>{var n,r,l,c,u,h,g,p,m,x,b,v,w,j,N;return{organizer:{balance:Number(((n=t==null?void 0:t.organizer)==null?void 0:n.balance)||0),availableForManualWithdraw:Number(((r=t==null?void 0:t.organizer)==null?void 0:r.availableForManualWithdraw)||0),autoWithdrawThreshold:Number(((l=t==null?void 0:t.organizer)==null?void 0:l.autoWithdrawThreshold)||0),manualWithdrawFee:Number(((c=t==null?void 0:t.organizer)==null?void 0:c.manualWithdrawFee)||0),autoWithdrawFee:Number(((u=t==null?void 0:t.organizer)==null?void 0:u.autoWithdrawFee)||0),pixKey:((h=t==null?void 0:t.organizer)==null?void 0:h.pixKey)??null,pixKeyType:((g=t==null?void 0:t.organizer)==null?void 0:g.pixKeyType)??null,recipientName:((p=t==null?void 0:t.organizer)==null?void 0:p.recipientName)??null,transactions:(((m=t==null?void 0:t.organizer)==null?void 0:m.transactions)||[]).map(Ib)},platform:t!=null&&t.platform?{balance:Number(((x=t==null?void 0:t.platform)==null?void 0:x.balance)||0),availableForManualWithdraw:Number(((b=t==null?void 0:t.platform)==null?void 0:b.availableForManualWithdraw)||0),pixKey:((v=t==null?void 0:t.platform)==null?void 0:v.pixKey)??null,pixKeyType:((w=t==null?void 0:t.platform)==null?void 0:w.pixKeyType)??null,recipientName:((j=t==null?void 0:t.platform)==null?void 0:j.recipientName)??null,transactions:(((N=t==null?void 0:t.platform)==null?void 0:N.transactions)||[]).map(Ib)}:void 0,advancedUnlocked:!!(t!=null&&t.advancedUnlocked)}},dw=t=>({...t,expiryDate:t.expiryDate?Gt(t.expiryDate):void 0,lastValidatedAt:t.lastValidatedAt?Gt(t.lastValidatedAt):void 0}),K6=t=>({...t,date:Gt(t.date)}),Pi=t=>({...t,logoUrl:(t==null?void 0:t.logoUrl)||(t==null?void 0:t.logo_url)||"",serviceTax:Number((t==null?void 0:t.serviceTax)||0),asaasFeePerOrder:Number((t==null?void 0:t.asaasFeePerOrder)||(t==null?void 0:t.asaas_fee_per_order)||0),organizerPixKey:(t==null?void 0:t.organizerPixKey)??(t==null?void 0:t.organizer_pix_key)??"",organizerPixKeyType:(t==null?void 0:t.organizerPixKeyType)??(t==null?void 0:t.organizer_pix_key_type)??"CPF",organizerRecipientName:(t==null?void 0:t.organizerRecipientName)??(t==null?void 0:t.organizer_recipient_name)??"",organizerAutoWithdrawThreshold:Number((t==null?void 0:t.organizerAutoWithdrawThreshold)||(t==null?void 0:t.organizer_auto_withdraw_threshold)||0),organizerManualWithdrawFee:Number((t==null?void 0:t.organizerManualWithdrawFee)||(t==null?void 0:t.organizer_manual_withdraw_fee)||0),organizerAutoWithdrawFee:Number((t==null?void 0:t.organizerAutoWithdrawFee)||(t==null?void 0:t.organizer_auto_withdraw_fee)||0),platformPixKey:(t==null?void 0:t.platformPixKey)??(t==null?void 0:t.platform_pix_key)??"",platformPixKeyType:(t==null?void 0:t.platformPixKeyType)??(t==null?void 0:t.platform_pix_key_type)??"CPF",platformRecipientName:(t==null?void 0:t.platformRecipientName)??(t==null?void 0:t.platform_recipient_name)??""}),uw="galpao_imperial_promoter_ref",fw="galpao_imperial_promoter_ref";function hw(){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(uw)||window.localStorage.getItem("promoter_ref");if(n&&n.trim())return n.trim()}catch{}const t=document.cookie.match(new RegExp("(?:^|; )"+fw.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function W6(){if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search),n=(t.get("ref")||t.get("promoter")||t.get("indicador")||"").trim();if(!n)return hw();try{window.localStorage.setItem(uw,n),window.localStorage.setItem("promoter_ref",n)}catch{}try{document.cookie=`${fw}=${encodeURIComponent(n)}; path=/; max-age=2592000; SameSite=Lax`}catch{}try{await Ce("/promoters/click",{method:"POST",body:JSON.stringify({code:n,landingUrl:window.location.href,referrer:document.referrer||null})})}catch(r){console.warn("Não foi possível registrar clique do promotor.",r)}return n}const Z6=()=>({settings:nw,heroBanners:[],events:$6,membershipPlans:aw,leisureActivities:G6,partners:H6,sales:I6,giftClaims:Y6,galleryImages:[]});async function Ce(t,n){var c,u,h,g,p,m,x,b;const r=await fetch(`${sw}${t}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)||{}},credentials:"include",...n}),l=await r.json().catch(()=>null);if(!r.ok||!(l!=null&&l.success)){const v=((g=(h=(u=(c=l==null?void 0:l.errors)==null?void 0:c.asaas)==null?void 0:u.errors)==null?void 0:h[0])==null?void 0:g.description)||((p=l==null?void 0:l.errors)==null?void 0:p.curlError)||((b=(x=(m=l==null?void 0:l.errors)==null?void 0:m.missing)==null?void 0:x.join)==null?void 0:b.call(x,", "));throw new Error(v||(l==null?void 0:l.message)||"Falha ao comunicar com a API.")}return l}async function J6(){try{const n=(await Ce("/bootstrap")).data;return{settings:Pi(n.settings||nw),heroBanners:n.heroBanners||[],events:(n.events||[]).map(rw),membershipPlans:n.membershipPlans||aw,leisureActivities:(n.leisureActivities||[]).map(K6),partners:(n.partners||[]).map(qh),sales:(n.sales||[]).map(lw),giftClaims:(n.giftClaims||[]).map(yc),galleryImages:(n.galleryImages||[]).map(ow)}}catch(t){return console.warn("API indisponível, usando dados locais.",t),Z6()}}async function eM(t){const n=t.promoterCode||hw();return(await Ce("/ticket-orders",{method:"POST",body:JSON.stringify({...t,promoterCode:n})})).data}async function tM(t){return(await Ce("/partner-orders",{method:"POST",body:JSON.stringify(t)})).data}async function Yf(t){const n=await Ce("/orders/status",{method:"POST",body:JSON.stringify({paymentId:t})});return lw(n.data)}async function aM(t,n){await Ce("/auth/login",{method:"POST",body:JSON.stringify({username:t,password:n})})}async function nM(){await Ce("/auth/logout",{method:"POST"})}async function sM(){var t;try{return!!((t=(await Ce("/auth/me")).data)!=null&&t.authenticated)}catch{return!1}}async function iM(t){await Ce("/platform/auth/login",{method:"POST",body:JSON.stringify({accessKey:t})})}async function rM(){await Ce("/platform/auth/logout",{method:"POST"})}async function lM(){var t;try{return!!((t=(await Ce("/platform/auth/me")).data)!=null&&t.authenticated)}catch{return!1}}async function oM(t){const n=await Ce("/admin/settings",{method:"PUT",body:JSON.stringify(t)});return Pi(n.data)}async function cM(t){const n=t.id?"PUT":"POST",r=t.id?`/admin/events/${t.id}`:"/admin/events",l=await Ce(r,{method:n,body:JSON.stringify({...t,date:t.date instanceof Date?t.date.toISOString().slice(0,10):t.date,batches:t.batches})});return rw(l.data)}async function dM(t){await Ce("/admin/events/"+t,{method:"DELETE"})}async function uM(t){const n=new FormData;n.append("file",t);const r=await fetch(`${sw}/media`,{method:"POST",body:n,credentials:"include"}),l=await r.json().catch(()=>null);if(!r.ok||!(l!=null&&l.success))throw new Error((l==null?void 0:l.message)||"Falha ao enviar imagem.");return l.data}async function fM(t){const n=await Ce("/gift-claims",{method:"POST",body:JSON.stringify(t)});return yc(n.data)}async function mw(t,n){const r=await Ce("/validate/ticket/search",{method:"POST",body:JSON.stringify({query:t,eventId:n})});return{...r.data,tickets:(r.data.tickets||[]).map(iw)}}async function $f(t,n="Portaria",r){return(await Ce("/validate/ticket/check-in",{method:"POST",body:JSON.stringify({ticketCode:t,validatedBy:n,eventId:r})})).data}async function pw(t){const n=await Ce("/validate/gift/search",{method:"POST",body:JSON.stringify({query:t})});return yc(n.data)}async function wc(t){const n=await Ce("/validate/gift/use",{method:"POST",body:JSON.stringify({id:t})});return yc(n.data)}async function hM(t){const n=await Ce(`/orders/resend-ticket-email?orderId=${encodeURIComponent(String(t))}&key=91416210`);return n.data||{message:n.message||"E-mail reenviado."}}async function mM(t){const n=await Ce(`/orders/repair-missing-tickets?orderId=${encodeURIComponent(String(t))}&key=91416210`);return n.data||{message:n.message||"Pedido conferido."}}async function pM(){return(await Ce("/admin/sales/sync-pending-payments",{method:"POST"})).data||{checked:0,paid:0,closed:0,pending:0,errors:[]}}async function xM(t){await Ce(`/admin/sales/${t}`,{method:"DELETE"})}async function gM(t){const n=t.id?"PUT":"POST",r=t.id?`/admin/gallery/${t.id}`:"/admin/gallery",l=await Ce(r,{method:n,body:JSON.stringify(t)});return ow(l.data)}async function bM(t){await Ce(`/admin/gallery/${t}`,{method:"DELETE"})}async function xw(t){const n=await Ce("/validate/partner/search",{method:"POST",body:JSON.stringify({query:t})});return dw(n.data)}async function gw(t,n="Portaria"){const r=await Ce("/validate/partner/check",{method:"POST",body:JSON.stringify({query:t,validatedBy:n})});return dw(r.data)}async function yM(t){const n=t.id?"PUT":"POST",r=t.id?`/admin/partners/${t.id}`:"/admin/partners",l=await Ce(r,{method:n,body:JSON.stringify(t)});return qh(l.data)}async function vM(t,n=30){const r=await Ce(`/admin/partner-renew/${t}`,{method:"POST",body:JSON.stringify({days:n})});return qh(r.data)}async function wM(t){await Ce(`/admin/partners/${t}`,{method:"DELETE"})}async function NM(){const t=await Ce("/admin/payment-settings");return Pi(t.data)}async function jM(t){const n=await Ce("/admin/payment-settings",{method:"PUT",body:JSON.stringify(t)});return Pi(n.data)}async function kM(){const t=await Ce("/admin/wallet");return vc(t.data)}async function SM(t,n="Admin"){const r=await Ce("/admin/wallet",{method:"POST",body:JSON.stringify({amount:t,requestedBy:n})});return{withdrawal:r.data.withdrawal,wallet:vc(r.data.wallet)}}async function CM(){return((await Ce("/admin/promoters")).data||[]).map(cw)}async function EM(t){const n=t.id?"PUT":"POST",r=t.id?`/admin/promoters/${t.id}`:"/admin/promoters",l=await Ce(r,{method:n,body:JSON.stringify(t)});return cw(l.data)}async function AM(t){await Ce(`/admin/promoters/${t}`,{method:"DELETE"})}async function TM(){const t=await Ce("/platform/payment-settings");return Pi(t.data)}async function MM(t){const n=await Ce("/platform/payment-settings",{method:"PUT",body:JSON.stringify(t)});return Pi(n.data)}async function RM(){const t=await Ce("/platform/wallet");return vc(t.data)}async function DM(t,n="Plataforma"){const r=await Ce("/platform/wallet",{method:"POST",body:JSON.stringify({amount:t,requestedBy:n})});return{withdrawal:r.data.withdrawal,wallet:vc(r.data.wallet)}}function OM({plan:t,isOpen:n,onClose:r}){const[l,c]=k.useState("form"),[u,h]=k.useState(!1),[g,p]=k.useState(!1),[m,x]=k.useState(null),[b,v]=k.useState(!1),[w,j]=k.useState(null),[N,A]=k.useState({name:"",whatsapp:"",cpf:"",birthDate:"",email:""}),[E,D]=k.useState(null);k.useEffect(()=>{if(!(m!=null&&m.payment.id)||l!=="payment"||!t)return;const W=window.setInterval(async()=>{try{p(!0),(await Yf(m.payment.id)).paymentStatus==="paid"&&(D({id:m.partner.cpf.slice(-6),name:m.partner.name,whatsapp:m.partner.whatsapp,cpf:m.partner.cpf,birthDate:N.birthDate,email:m.partner.email||void 0,planId:m.partner.planId,startDate:new Date,expiryDate:new Date(Date.now()+t.validityDays*24*60*60*1e3),status:"active",memberCode:`PARC-${m.partner.cpf.slice(-6)}`,qrValue:`GALPAO_IMPERIAL:PARTNER:${m.partner.cpf.replace(/\D/g,"")}`}),c("digital-card"),window.clearInterval(W))}catch{}finally{p(!1)}},8e3);return()=>window.clearInterval(W)},[m==null?void 0:m.payment.id,N.birthDate,t,l]);const C=()=>{c("form"),h(!1),p(!1),x(null),v(!1),j(null),D(null),A({name:"",whatsapp:"",cpf:"",birthDate:"",email:""})},O=()=>{C(),r()},Q=W=>{W.preventDefault(),c("payment")},z=async()=>{if(t){h(!0),j(null);try{const W=await tM({planId:t.id,name:N.name,whatsapp:N.whatsapp,cpf:N.cpf,birthDate:N.birthDate,email:N.email});x(W)}catch(W){j(W instanceof Error?W.message:"Não foi possível gerar o pagamento.")}finally{h(!1)}}},I=async()=>{if(!(!(m!=null&&m.payment.id)||!t)){p(!0),j(null);try{if((await Yf(m.payment.id)).paymentStatus==="paid"){D({id:m.partner.cpf.slice(-6),name:m.partner.name,whatsapp:m.partner.whatsapp,cpf:m.partner.cpf,birthDate:N.birthDate,email:m.partner.email||void 0,planId:m.partner.planId,startDate:new Date,expiryDate:new Date(Date.now()+t.validityDays*24*60*60*1e3),status:"active",memberCode:`PARC-${m.partner.cpf.slice(-6)}`,qrValue:`GALPAO_IMPERIAL:PARTNER:${m.partner.cpf.replace(/\D/g,"")}`}),c("digital-card");return}j("Pagamento ainda não confirmado. Assim que o webhook atualizar, a carteirinha é liberada.")}catch(W){j(W instanceof Error?W.message:"Não foi possível verificar o pagamento.")}finally{p(!1)}}},P=async()=>{m!=null&&m.pix.payload&&(await navigator.clipboard.writeText(m.pix.payload),v(!0),window.setTimeout(()=>v(!1),2e3))},ee=k.useMemo(()=>E?`Minha carteirinha do Galpão Imperial está ativa. Código: ${E.memberCode}`:"",[E]);return!n||!t?null:s.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[s.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/95 backdrop-blur-xl",onClick:O}),s.jsxs(Te.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:"relative w-full max-w-4xl bg-[#0D0D0D] border border-white/10 rounded-[32px] sm:rounded-[60px] overflow-hidden shadow-2xl noise flex flex-col max-h-[95vh] sm:max-h-[90vh]",children:[s.jsx("button",{onClick:O,className:"absolute top-4 right-4 sm:top-8 sm:right-8 w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-white/5 border border-white/10 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all z-20",children:s.jsx(Ha,{className:"w-5 h-5 sm:w-6 sm:h-6"})}),s.jsxs("div",{className:"flex flex-col lg:flex-row h-full overflow-hidden",children:[s.jsxs("div",{className:"w-full lg:w-[40%] bg-white/[0.02] p-8 sm:p-12 border-b lg:border-b-0 lg:border-r border-white/5 flex flex-col justify-between shrink-0",children:[s.jsxs("div",{className:"flex lg:flex-col items-center lg:items-start justify-between lg:justify-start gap-6 lg:gap-10",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-12 h-12 sm:w-16 sm:h-16 bg-white rounded-2xl sm:rounded-3xl flex items-center justify-center p-2 border border-white/10 overflow-hidden shrink-0",children:s.jsx("img",{src:Kn,alt:"Galpão Imperial Logo",className:"w-full h-full object-contain"})}),s.jsx("div",{className:"lg:hidden",children:s.jsxs("h2",{className:"text-xl font-display font-black text-white uppercase tracking-tighter leading-none",children:["Seu Passe ",s.jsx("span",{className:"text-brand-gold italic",children:"Galpão Imperial"})]})})]}),s.jsxs("div",{className:"hidden lg:block",children:[s.jsxs("h2",{className:"text-4xl font-display font-black text-white uppercase tracking-tighter leading-none mb-4",children:["Seu Passe ",s.jsx("br",{})," ",s.jsx("span",{className:"text-brand-gold italic",children:"Galpão Imperial"})]}),s.jsx("div",{className:"h-1 w-12 bg-brand-wine rounded-full mb-10"})]}),s.jsx("div",{className:"flex lg:flex-col gap-3 sm:gap-6",children:[{step:"form",label:"Cadastro"},{step:"payment",label:"Ativação"},{step:"digital-card",label:"Carteira"}].map((W,le)=>s.jsxs("div",{className:`flex items-center gap-3 sm:gap-4 transition-all duration-500 ${l===W.step?"opacity-100 scale-105":"opacity-30"}`,children:[s.jsx("div",{className:`w-8 h-8 sm:w-10 sm:h-10 rounded-xl sm:rounded-2xl flex items-center justify-center font-black text-[8px] sm:text-xs border ${l===W.step?"bg-brand-wine border-brand-wine text-white":"border-white/20"}`,children:le+1}),s.jsx("span",{className:"hidden sm:block text-[8px] sm:text-[10px] font-black uppercase tracking-[0.2em]",children:W.label})]},le))})]}),s.jsxs("div",{className:"mt-8 lg:mt-0 p-4 sm:p-8 rounded-2xl sm:rounded-[32px] bg-brand-gold/5 border border-brand-gold/10 flex lg:flex-col items-center lg:items-start justify-between lg:justify-start gap-4",children:[s.jsxs("div",{className:"text-left",children:[s.jsx("p",{className:"text-brand-gold text-[7px] sm:text-[9px] font-black uppercase tracking-widest mb-1 sm:mb-2",children:"Plano Escolhido"}),s.jsx("p",{className:"text-white font-black text-sm sm:text-xl uppercase tracking-tighter",children:t.name})]}),s.jsxs("p",{className:"text-brand-wine text-[10px] sm:text-[11px] font-black",children:["R$ ",t.price.toFixed(2).replace(".",",")," / mês"]})]})]}),s.jsx("div",{className:"flex-1 p-6 sm:p-10 lg:p-16 overflow-y-auto scrollbar-hide",children:s.jsxs(ma,{mode:"wait",children:[l==="form"&&s.jsxs(Te.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-10",children:[s.jsxs("div",{className:"text-center lg:text-left",children:[s.jsx("h3",{className:"text-3xl font-display font-black text-white uppercase tracking-tighter mb-4",children:"Dados de Cadastro"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-bold uppercase tracking-widest",children:"Preencha corretamente para gerar sua carteirinha."})]}),s.jsxs("form",{onSubmit:Q,className:"grid grid-cols-1 md:grid-cols-2 gap-6 pb-20",children:[s.jsxs("div",{className:"space-y-2 md:col-span-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase ml-4",children:"Nome Completo"}),s.jsx("input",{required:!0,type:"text",value:N.name,onChange:W=>A({...N,name:W.target.value}),className:"w-full h-16 bg-white/[0.03] border border-white/10 rounded-[20px] px-8 text-white focus:border-brand-wine transition-all",placeholder:"Seu nome oficial"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase ml-4",children:"WhatsApp"}),s.jsx("input",{required:!0,type:"tel",value:N.whatsapp,onChange:W=>A({...N,whatsapp:W.target.value}),className:"w-full h-16 bg-white/[0.03] border border-white/10 rounded-[20px] px-8 text-white focus:border-brand-wine transition-all",placeholder:"(27) 99999-9999"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase ml-4",children:"CPF"}),s.jsx("input",{required:!0,type:"text",value:N.cpf,onChange:W=>A({...N,cpf:W.target.value}),className:"w-full h-16 bg-white/[0.03] border border-white/10 rounded-[20px] px-8 text-white focus:border-brand-wine transition-all",placeholder:"000.000.000-00"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase ml-4",children:"Nascimento"}),s.jsx("input",{required:!0,type:"date",value:N.birthDate,onChange:W=>A({...N,birthDate:W.target.value}),className:"w-full h-16 bg-white/[0.03] border border-white/10 rounded-[20px] px-8 text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase ml-4",children:"E-mail (Opcional)"}),s.jsx("input",{type:"email",value:N.email,onChange:W=>A({...N,email:W.target.value}),className:"w-full h-16 bg-white/[0.03] border border-white/10 rounded-[20px] px-8 text-white focus:border-brand-wine transition-all",placeholder:"exemplo@email.com"})]}),s.jsx("div",{className:"md:col-span-2 pt-6",children:s.jsxs(ie,{variant:"primary",size:"lg",className:"w-full py-5 sm:py-6 rounded-xl sm:rounded-[24px] text-[10px] sm:text-xs font-black",children:["PRÓXIMO PASSO ",s.jsx(r5,{className:"ml-2 w-5 h-5"})]})})]})]},"form"),l==="payment"&&s.jsxs(Te.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-8 sm:space-y-10",children:[s.jsxs("div",{className:"text-center lg:text-left",children:[s.jsx("h3",{className:"text-2xl sm:text-3xl font-display font-black text-white uppercase tracking-tighter mb-4",children:"Pagamento"}),s.jsx("p",{className:"text-brand-gold text-[9px] sm:text-[10px] font-bold uppercase tracking-widest leading-relaxed",children:"Pagamento confirmado = carteirinha liberada automaticamente."})]}),s.jsxs("div",{className:"p-6 sm:p-10 rounded-[30px] sm:rounded-[40px] bg-white/[0.02] border border-white/10 space-y-6 sm:space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[220px_1fr] gap-6 items-start",children:[s.jsx("div",{className:"flex justify-center",children:m!=null&&m.pix.encodedImage?s.jsx("div",{className:"bg-white rounded-[32px] p-4 shadow-2xl",children:s.jsx("img",{src:`data:image/png;base64,${m.pix.encodedImage}`,alt:"QR Code Pix",className:"w-[200px] h-[200px] object-contain"})}):m!=null&&m.pix.payload?s.jsx(ki,{value:m.pix.payload,size:200}):s.jsx("div",{className:"w-48 h-48 bg-white p-4 rounded-2xl sm:rounded-3xl shadow-2xl flex items-center justify-center",children:s.jsx("span",{className:"text-black font-black text-xs px-4 text-center",children:"Clique em gerar pagamento"})})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1 sm:space-y-2",children:[s.jsx("p",{className:"text-gray-500 text-[8px] sm:text-[10px] font-black uppercase",children:"Valor Total"}),s.jsxs("p",{className:"text-3xl sm:text-4xl font-display font-black text-white",children:["R$ ",t.price.toFixed(2).replace(".",",")]})]}),m&&s.jsxs("div",{className:"p-4 rounded-2xl border border-white/10 bg-black/30 text-left",children:[s.jsx("p",{className:"text-[8px] sm:text-[10px] text-gray-500 font-black uppercase mb-2",children:"Pix copia e cola"}),s.jsx("p",{className:"text-[10px] sm:text-xs text-gray-200 break-all",children:m.pix.payload})]}),s.jsx("div",{className:"p-4 rounded-2xl border border-green-500/20 bg-green-500/10",children:s.jsx("p",{className:"text-[9px] text-green-400 font-black uppercase tracking-widest",children:g?"Verificando pagamento no Asaas...":"Aguardando webhook do Asaas para liberar a carteirinha."})})]})]}),w&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-red-400",children:w}),s.jsx("div",{className:"space-y-3 sm:space-y-4",children:m?s.jsxs(s.Fragment,{children:[s.jsxs(ie,{variant:"ghost",className:"w-full py-4 rounded-xl sm:rounded-2xl border border-white/10 text-brand-gold text-[9px] sm:text-[10px] uppercase font-black",onClick:()=>void P(),children:[b?"CÓDIGO COPIADO":"COPIAR CÓDIGO PIX"," ",s.jsx(sh,{className:"ml-2 w-4 h-4"})]}),m.payment.invoiceUrl&&s.jsxs(ie,{variant:"outline",className:"w-full py-4 rounded-xl sm:rounded-2xl border border-white/10 text-[9px] sm:text-[10px] uppercase font-black",onClick:()=>window.open(m.payment.invoiceUrl,"_blank"),children:["ABRIR FATURA ",s.jsx(Si,{className:"ml-2 w-4 h-4"})]}),s.jsxs(ie,{variant:"outline",className:"w-full py-5 sm:py-6 rounded-xl sm:rounded-2xl border border-white/10 text-[10px] sm:text-xs font-black tracking-widest",onClick:()=>void I(),disabled:g,children:[g?"VERIFICANDO...":"JÁ PAGUEI / VERIFICAR STATUS"," ",s.jsx(Zr,{className:"ml-2 w-4 h-4"})]})]}):s.jsxs(ie,{variant:"primary",className:"w-full py-5 sm:py-6 rounded-xl sm:rounded-2xl shadow-xl shadow-brand-wine/20 text-[10px] sm:text-xs font-black tracking-widest",onClick:()=>void z(),disabled:u,children:[u?"GERANDO PIX...":"GERAR PAGAMENTO PIX"," ",s.jsx(fn,{className:"ml-2 w-4 h-4"})]})})]})]},"payment"),l==="digital-card"&&E&&s.jsxs(Te.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"space-y-8 sm:space-y-12 pb-10",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 sm:w-16 sm:h-16 rounded-full bg-green-500/20 border border-green-500/50 flex items-center justify-center mx-auto mb-4 sm:mb-6",children:s.jsx(Dt,{className:"w-6 h-6 sm:w-8 sm:h-8 text-green-500"})}),s.jsx("h3",{className:"text-2xl sm:text-3xl font-display font-black text-white uppercase tracking-tighter mb-2 sm:mb-4",children:"Carteirinha Ativa"}),s.jsx("p",{className:"text-gray-500 text-[8px] sm:text-[10px] font-black uppercase tracking-widest",children:"Pagamento confirmado. Sua leitura por QR e CPF já está disponível."})]}),s.jsx("div",{className:"flex justify-center scale-75 sm:scale-100 -my-4 sm:my-0 h-40 sm:h-auto overflow-visible",children:s.jsx(q6,{partner:E})}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[s.jsxs(ie,{variant:"outline",className:"rounded-xl sm:rounded-2xl py-4 sm:py-5 gap-2 border-white/10 text-[9px] sm:text-[10px] font-black tracking-widest",onClick:()=>void navigator.clipboard.writeText(E.qrValue||""),children:["BAIXAR/ COPIAR QR ",s.jsx(ih,{className:"w-4 h-4"})]}),s.jsxs(ie,{variant:"outline",className:"rounded-xl sm:rounded-2xl py-4 sm:py-5 gap-2 border-white/10 text-[9px] sm:text-[10px] font-black tracking-widest",onClick:()=>window.open(`https://wa.me/?text=${encodeURIComponent(ee)}`,"_blank"),children:["ENVIAR NO WHATSAPP ",s.jsx(h4,{className:"w-4 h-4"})]}),s.jsxs(ie,{variant:"primary",className:"sm:col-span-2 rounded-xl sm:rounded-2xl py-5 sm:py-6 gap-2 text-[10px] sm:text-xs font-black tracking-widest",onClick:O,children:["CONCLUIR CADASTRO ",s.jsx(mn,{className:"w-5 h-5"})]})]})]},"digital-card")]})})]})]})]})}const bw=[{id:"dashboard",icon:Io,label:"Dashboard"},{id:"events",icon:lc,label:"Eventos"},{id:"new-event",icon:d5,label:"Novo Evento"},{id:"sales",icon:fc,label:"Vendas"},{id:"validate-ticket",icon:Ba,label:"Validar Ingressos"},{id:"reports",icon:Lr,label:"Relatórios"},{id:"partners",icon:Di,label:"Parceiros"},{id:"validate-partner",icon:Fn,label:"Validar Carteirinha"},{id:"gifts",icon:Ci,label:"Presentes"},{id:"validate-gift",icon:qa,label:"Validar Presente"},{id:"gallery",icon:oc,label:"Galeria"},{id:"promoters",icon:zy,label:"Promotores"},{id:"payment",icon:fn,label:"Pagamento"},{id:"wallet",icon:oh,label:"Carteira"},{id:"settings",icon:u4,label:"Configurações"}];function _M({activeTab:t,onTabChange:n,onBack:r}){return s.jsxs("aside",{className:"w-72 bg-[#070604] border-r border-brand-gold/10 h-screen sticky top-0 hidden lg:flex flex-col",children:[s.jsxs("div",{className:"p-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-10",children:[s.jsx("div",{className:"w-10 h-10 imperial-logo-frame rounded-full flex items-center justify-center text-brand-gold font-sans font-black",children:"GI"}),s.jsxs("h1",{className:"text-xl font-sans font-black text-white uppercase tracking-tighter",children:["Admin ",s.jsx("span",{className:"text-brand-gold",children:"Galpão Imperial"})]})]}),s.jsx("nav",{className:"space-y-1",children:bw.map(l=>s.jsxs("button",{onClick:()=>n(l.id),className:`flex items-center gap-3 w-full px-4 py-3.5 rounded-xl text-[10px] font-black uppercase tracking-widest transition-all ${t===l.id?"bg-brand-gold text-black shadow-lg shadow-brand-gold/20 translate-x-1":"text-brand-gold/45 hover:text-brand-gold hover:bg-brand-gold/5"}`,children:[s.jsx(l.icon,{className:"w-4 h-4"}),l.label]},l.id))})]}),s.jsx("div",{className:"mt-auto p-8 border-t border-white/5",children:s.jsxs("button",{onClick:r,className:"flex items-center gap-3 w-full px-4 py-3.5 rounded-xl text-[10px] font-black uppercase tracking-widest text-red-500 hover:bg-red-500/10 transition-all",children:[s.jsx(Ho,{className:"w-4 h-4"}),"Sair do Painel"]})})]})}function zM({activeTab:t,onTabChange:n,onMenuOpen:r}){const l=[{id:"dashboard",icon:Io,label:"Dash"},{id:"events",icon:lc,label:"Eventos"},{id:"sales",icon:fc,label:"Vendas"},{id:"validate-ticket",icon:Ba,label:"Validar"}];return s.jsxs("div",{className:"lg:hidden fixed bottom-0 left-0 right-0 z-50 bg-[#0A0A0A]/90 backdrop-blur-xl border-t border-white/10 px-4 py-3 flex items-center justify-between shadow-[0_-10px_40px_rgba(0,0,0,0.5)]",children:[l.map(c=>s.jsxs("button",{onClick:()=>n(c.id),className:`flex flex-col items-center gap-1.5 px-3 py-1 rounded-xl transition-all ${t===c.id?"text-brand-gold":"text-gray-500"}`,children:[s.jsx(c.icon,{className:`w-5 h-5 ${t===c.id?"scale-110":""}`}),s.jsx("span",{className:"text-[8px] font-black uppercase tracking-widest",children:c.label})]},c.id)),s.jsxs("button",{onClick:r,className:"flex flex-col items-center gap-1.5 px-3 py-1 rounded-xl text-gray-500",children:[s.jsx(Py,{className:"w-5 h-5"}),s.jsx("span",{className:"text-[8px] font-black uppercase tracking-widest",children:"Menu"})]})]})}const PM={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},LM=(t,n,r)=>{let l;const c=PM[t];return typeof c=="string"?l=c:n===1?l=c.one:l=c.other.replace("{{count}}",String(n)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"em "+l:"há "+l:l},VM={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},UM={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},BM={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qM={date:ji({formats:VM,defaultWidth:"full"}),time:ji({formats:UM,defaultWidth:"full"}),dateTime:ji({formats:BM,defaultWidth:"full"})},HM={lastWeek:t=>{const n=t.getDay();return"'"+(n===0||n===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},GM=(t,n,r,l)=>{const c=HM[t];return typeof c=="function"?c(n):c},IM={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},YM={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},$M={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},FM={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},QM={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},XM={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},KM=(t,n)=>{const r=Number(t);return(n==null?void 0:n.unit)==="week"?r+"ª":r+"º"},WM={ordinalNumber:KM,era:Pa({values:IM,defaultWidth:"wide"}),quarter:Pa({values:YM,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Pa({values:$M,defaultWidth:"wide"}),day:Pa({values:FM,defaultWidth:"wide"}),dayPeriod:Pa({values:QM,defaultWidth:"wide",formattingValues:XM,defaultFormattingWidth:"wide"})},ZM=/^(\d+)[ºªo]?/i,JM=/\d+/i,e8={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},t8={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},a8={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},n8={any:[/1/i,/2/i,/3/i,/4/i]},s8={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},i8={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},r8={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},l8={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},o8={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},c8={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},d8={ordinalNumber:Hv({matchPattern:ZM,parsePattern:JM,valueCallback:t=>parseInt(t,10)}),era:La({matchPatterns:e8,defaultMatchWidth:"wide",parsePatterns:t8,defaultParseWidth:"any"}),quarter:La({matchPatterns:a8,defaultMatchWidth:"wide",parsePatterns:n8,defaultParseWidth:"any",valueCallback:t=>t+1}),month:La({matchPatterns:s8,defaultMatchWidth:"wide",parsePatterns:i8,defaultParseWidth:"any"}),day:La({matchPatterns:r8,defaultMatchWidth:"wide",parsePatterns:l8,defaultParseWidth:"any"}),dayPeriod:La({matchPatterns:o8,defaultMatchWidth:"any",parsePatterns:c8,defaultParseWidth:"any"})},Ca={code:"pt-BR",formatDistance:LM,formatLong:qM,formatRelative:GM,localize:WM,match:d8,options:{weekStartsOn:0,firstWeekContainsDate:1}},yw=k.createContext(null),u8={settings:{name:"",logoUrl:"",whatsapp:"",instagram:"",address:"",googleMapsLink:"",wazeLink:"",pixKey:"",serviceTax:0,confirmationMessage:"",whatsappTemplate:""},heroBanners:[],events:[],membershipPlans:[],leisureActivities:[],partners:[],sales:[],giftClaims:[],galleryImages:[]};function f8({children:t}){const[n,r]=k.useState(u8),[l,c]=k.useState(!0),u=async()=>{c(!0);try{const g=await J6();r(g)}finally{c(!1)}};k.useEffect(()=>{u()},[]);const h=k.useMemo(()=>({...n,loading:l,reload:u}),[n,l]);return s.jsx(yw.Provider,{value:h,children:t})}function xt(){const t=k.useContext(yw);if(!t)throw new Error("useAppData deve ser usado dentro de AppDataProvider.");return t}const Yb={},h8=t=>/^https?:\/\//i.test(t),m8=typeof import.meta<"u"&&Yb?Yb:{},$b=(m8.VITE_API_BASE_URL||"").trim().replace(/\/$/,"");function Fb(t){const n=(t||"").trim();if(!n)return"";if(n.startsWith("data:")||n.startsWith("blob:")||n.startsWith("/")||!h8(n)||typeof window>"u")return n;const r=$b?`${$b}/media`:"/api/media",l=new URL(r,window.location.origin);return l.searchParams.set("url",n),l.toString()}const p8="./event-fallback.svg";function pt({src:t,fallbackSrc:n=p8,...r}){const[l,c]=k.useState(Fb(t)||n);return s.jsx("img",{...r,src:l,onError:()=>{l!==n&&c(Fb(n)||n)}})}const Ns=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),Qb=(t,n)=>{const r=new Date(t);return r.setDate(r.getDate()+n),Ns(r)},zr=t=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",maximumFractionDigits:0}).format(t),x8=new Set(["active","featured","last_tickets","sold_out"]);function Xb(){var J,ae;const{events:t,sales:n,giftClaims:r}=xt(),l=Ns(new Date),c=n.filter(H=>H.paymentStatus==="paid"),u=c.filter(H=>Ns(new Date(H.purchaseDate)).getTime()===l.getTime()),h=Qb(l,-6),g=c.filter(H=>Ns(new Date(H.purchaseDate))>=h),p=u.reduce((H,M)=>H+M.totalValue,0),m=g.reduce((H,M)=>H+M.totalValue,0),x=u.reduce((H,M)=>H+M.quantity,0),b=g.reduce((H,M)=>H+M.quantity,0),v=g.length>0?m/g.length:0,w=c.reduce((H,M)=>H+M.quantity,0),j=c.reduce((H,M)=>H+M.totalValue,0),N=n.filter(H=>H.paymentStatus==="pending").length,A=t.filter(H=>x8.has(H.status)),E=A.length,D=n.reduce((H,M)=>H+M.tickets.filter(T=>T.status==="used").length,0),C=A.reduce((H,M)=>H+(M.remainingTickets??0),0),O=r.filter(H=>H.status!=="used").length,z=A.filter(H=>Ns(new Date(H.date))>=l).sort((H,M)=>new Date(H.date).getTime()-new Date(M.date).getTime())[0],I=z?qv(Ns(new Date(z.date)),l):null,P=I===null?"Nenhum":I===0?"Hoje":I===1?"1 dia":`${I} dias`,ee=Array.from({length:7},(H,M)=>Qb(l,M-6)).map(H=>{const M=c.filter(T=>Ns(new Date(T.purchaseDate)).getTime()===H.getTime());return{date:H,label:Ht(H,"EEE",{locale:Ca}).replace(".",""),orders:M.length,tickets:M.reduce((T,U)=>T+U.quantity,0),revenue:M.reduce((T,U)=>T+U.totalValue,0)}}),W=Math.max(...ee.map(H=>H.revenue),1),le=[{label:"Vendas Hoje",value:u.length,icon:fc,color:"text-green-500",bg:"bg-green-500/10",trend:u.length>0?"+"+u.length:"0"},{label:"Receita Hoje",value:zr(p),icon:mf,color:"text-emerald-400",bg:"bg-emerald-500/10",trend:`${x} ing.`},{label:"Vendas Semana",value:g.length,icon:Lr,color:"text-sky-400",bg:"bg-sky-500/10",trend:`${b} ing.`},{label:"Receita Semana",value:zr(m),icon:Io,color:"text-brand-gold",bg:"bg-brand-gold/10",trend:`TM ${zr(v)}`},{label:"Ingressos Vendidos",value:w,icon:Io,color:"text-blue-500",bg:"bg-blue-500/10",trend:w>0?"Pago":"0"},{label:"Receita Total",value:`R$ ${j.toFixed(0)}`,icon:mf,color:"text-brand-gold",bg:"bg-brand-gold/10",trend:c.length>0?`${c.length} vendas`:"0"},{label:"Pagtos Pendentes",value:N,icon:Gr,color:"text-yellow-500",bg:"bg-yellow-500/10",trend:N>0?"Atenção":"OK"},{label:"Eventos Ativos",value:E,icon:lc,color:"text-brand-wine",bg:"bg-brand-wine/10",trend:((J=z==null?void 0:z.title)==null?void 0:J.slice(0,12))||"0"},{label:"Check-ins",value:D,icon:Dt,color:"text-emerald-500",bg:"bg-emerald-500/10",trend:w>0?`${Math.round(D/w*100)}%`:"0%"},{label:"Ingressos Rest.",value:C,icon:Lr,color:"text-purple-500",bg:"bg-purple-500/10",trend:C>0?"Disponível":"Esgotado"},{label:"Próximo Evento",value:P,icon:Gr,color:"text-white",bg:"bg-white/10",trend:((ae=z==null?void 0:z.title)==null?void 0:ae.slice(0,12))||"Nenhum"}],de=A.find(H=>H.featured)||z||A[0],ge=de?c.filter(H=>H.eventId===de.id):[],be=ge.reduce((H,M)=>H+M.tickets.filter(T=>T.status==="used").length,0),te=de?de.batches.reduce((H,M)=>H+(M.sold||0),0):0,V=A.map(H=>{const M=c.filter(ne=>ne.eventId===H.id),T=M.reduce((ne,ce)=>ne+ce.quantity,0),U=M.reduce((ne,ce)=>ne+ce.totalValue,0),Y=M.reduce((ne,ce)=>ne+ce.tickets.filter(ve=>ve.status==="used").length,0),K=H.isUnlimited?null:H.remainingTickets??H.batches.reduce((ne,ce)=>ne+(ce.remaining??0),0);return{event:H,sold:T,revenue:U,checkins:Y,remaining:K}}).sort((H,M)=>M.sold-H.sold);return s.jsxs("div",{className:"space-y-10 pb-24 lg:pb-0",children:[s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-6",children:le.map((H,M)=>s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.02] border border-white/5 space-y-4 hover:border-white/10 transition-all group overflow-hidden relative",children:[s.jsx("div",{className:"absolute -right-4 -top-4 opacity-5 group-hover:scale-110 transition-transform",children:s.jsx(H.icon,{className:"w-24 h-24"})}),s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("div",{className:`w-12 h-12 rounded-2xl ${H.bg} flex items-center justify-center`,children:s.jsx(H.icon,{className:`w-6 h-6 ${H.color}`})}),s.jsx("span",{className:`text-[9px] font-black uppercase px-2 py-1 rounded-lg ${H.bg} ${H.color}`,children:H.trend})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest leading-none mb-2",children:H.label}),s.jsx("p",{className:"text-3xl font-sans font-black text-white tracking-tighter",children:H.value})]})]},M))}),s.jsxs("div",{className:"p-6 sm:p-8 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-7",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between gap-5",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-brand-gold text-[10px] font-black uppercase tracking-[0.3em] mb-2",children:"Ultimos 7 dias"}),s.jsx("h3",{className:"text-2xl sm:text-3xl font-sans font-black text-white uppercase tracking-tighter",children:"Ritmo diario de vendas"})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3 w-full lg:w-auto",children:[s.jsxs("div",{className:"rounded-2xl bg-black/30 border border-white/10 px-4 py-3",children:[s.jsx("p",{className:"text-[8px] font-black uppercase tracking-widest text-gray-600",children:"Pedidos"}),s.jsx("p",{className:"text-xl font-sans font-black text-white",children:g.length})]}),s.jsxs("div",{className:"rounded-2xl bg-black/30 border border-white/10 px-4 py-3",children:[s.jsx("p",{className:"text-[8px] font-black uppercase tracking-widest text-gray-600",children:"Ingressos"}),s.jsx("p",{className:"text-xl font-sans font-black text-white",children:b})]}),s.jsxs("div",{className:"rounded-2xl bg-black/30 border border-white/10 px-4 py-3",children:[s.jsx("p",{className:"text-[8px] font-black uppercase tracking-widest text-gray-600",children:"Receita"}),s.jsx("p",{className:"text-xl font-sans font-black text-brand-gold",children:zr(m)})]})]})]}),s.jsx("div",{className:"grid grid-cols-7 gap-2 sm:gap-4 items-end h-52",children:ee.map(H=>{const M=H.revenue>0?Math.max(10,H.revenue/W*100):2;return s.jsxs("div",{className:"h-full min-w-0 flex flex-col justify-end gap-3",children:[s.jsx("div",{className:"flex-1 flex items-end",children:s.jsx("div",{className:"w-full rounded-t-2xl bg-gradient-to-t from-brand-wine to-brand-gold/90 border border-white/10 shadow-[0_16px_40px_-24px_#D4AF37] transition-all",style:{height:`${M}%`},title:`${H.orders} pedidos - ${zr(H.revenue)}`})}),s.jsxs("div",{className:"text-center space-y-1",children:[s.jsx("p",{className:"text-[9px] sm:text-[10px] font-black uppercase text-gray-400 truncate",children:H.label}),s.jsx("p",{className:"text-[10px] sm:text-xs font-black text-white",children:H.orders})]})]},H.date.toISOString())})})]}),s.jsxs("div",{className:"p-6 sm:p-8 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-brand-gold text-[10px] font-black uppercase tracking-[0.3em] mb-2",children:"Eventos ativos"}),s.jsx("h3",{className:"text-2xl sm:text-3xl font-sans font-black text-white uppercase tracking-tighter",children:"Vendas por evento"})]}),s.jsx(Lr,{className:"w-8 h-8 text-brand-gold"})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:V.map(({event:H,sold:M,revenue:T,checkins:U,remaining:Y})=>s.jsxs("div",{className:"p-5 rounded-[28px] bg-black/30 border border-white/10 space-y-4",children:[s.jsxs("div",{className:"flex gap-3 items-center",children:[s.jsx("div",{className:"w-12 h-12 rounded-2xl overflow-hidden bg-black shrink-0",children:s.jsx(pt,{src:H.imageUrl,className:"w-full h-full object-cover",alt:H.title})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-black text-white uppercase truncate",children:H.title}),s.jsxs("p",{className:"text-[9px] text-gray-500 font-black uppercase tracking-widest",children:[Ht(H.date,"dd/MM",{locale:Ca})," • ",H.horario]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-[10px] uppercase font-black tracking-widest",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-600",children:"Vendidos"}),s.jsx("p",{className:"text-white text-xl font-sans",children:M})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-600",children:"Receita"}),s.jsxs("p",{className:"text-brand-gold text-xl font-sans",children:["R$ ",T.toFixed(0)]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-600",children:"Check-ins"}),s.jsx("p",{className:"text-emerald-400 text-xl font-sans",children:U})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-600",children:"Restantes"}),s.jsx("p",{className:"text-white text-xl font-sans",children:Y===null?"∞":Y})]})]})]},H.id))})]}),s.jsxs("div",{className:`grid grid-cols-1 ${de?"xl:grid-cols-[1.6fr_0.8fr]":""} gap-8`,children:[de&&s.jsxs("div",{className:"p-8 sm:p-12 rounded-[48px] bg-brand-wine/5 border border-brand-wine/10 relative overflow-hidden group",children:[s.jsx("div",{className:"absolute top-0 right-0 w-1/2 h-full opacity-10 pointer-events-none hidden lg:block",children:s.jsx(pt,{src:de.imageUrl,className:"w-full h-full object-cover blur-2xl",alt:"Bg"})}),s.jsxs("div",{className:"relative z-10 flex flex-col lg:flex-row gap-12 items-center",children:[s.jsx("div",{className:"w-full lg:w-1/3 aspect-[4/5] rounded-[40px] overflow-hidden border border-white/10 premium-shadow shrink-0",children:s.jsx(pt,{src:de.imageUrl,className:"w-full h-full object-cover",alt:"Featured"})}),s.jsxs("div",{className:"flex-1 space-y-8",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-brand-gold/10 border border-brand-gold/20 text-brand-gold text-[10px] font-black uppercase tracking-widest mb-6",children:[s.jsx(Dt,{className:"w-4 h-4"})," Evento em Destaque"]}),s.jsx("h2",{className:"text-4xl sm:text-5xl font-sans font-black text-white uppercase tracking-tighter leading-none mb-4",children:de.title}),s.jsxs("p",{className:"text-gray-500 text-xs font-bold uppercase tracking-widest leading-relaxed flex items-center gap-4",children:[s.jsx("span",{children:Ht(de.date,"dd MMM yyyy",{locale:Ca})}),s.jsx("span",{className:"w-1 h-1 rounded-full bg-gray-700"}),s.jsxs("span",{children:[de.horario,"h"]}),s.jsx("span",{className:"w-1 h-1 rounded-full bg-gray-700"}),s.jsx("span",{children:de.location})]})]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-6 pt-6 border-t border-white/5",children:[{label:"Vendido",value:`${te}`},{label:"Disponível",value:de.isUnlimited?"Ilimitado":`${de.remainingTickets||0}`},{label:"Arrecadado",value:`R$ ${ge.reduce((H,M)=>H+M.totalValue,0).toFixed(0)}`},{label:"Check-in",value:`${be}`}].map((H,M)=>s.jsxs("div",{children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest mb-1",children:H.label}),s.jsx("p",{className:"text-xl font-sans font-black text-white tracking-tighter",children:H.value})]},M))}),s.jsxs("div",{className:"flex flex-wrap gap-4 pt-4",children:[s.jsxs(ie,{variant:"primary",className:"rounded-2xl px-8 h-14 text-[10px] font-black gap-2 shadow-xl shadow-brand-wine/20",children:[s.jsx(Go,{className:"w-4 h-4"})," EDITAR EVENTO"]}),s.jsxs(ie,{variant:"outline",className:"rounded-2xl px-8 h-14 text-[10px] font-black gap-2 border-white/10",children:[s.jsx(My,{className:"w-4 h-4"})," VER VENDAS"]}),s.jsxs(ie,{variant:"outline",className:"rounded-2xl px-8 h-14 text-[10px] font-black gap-2 border-white/10",children:[s.jsx(Ba,{className:"w-4 h-4"})," VALIDAR INGRESSOS"]})]})]})]})]}),s.jsxs("div",{className:"p-8 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-6",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-brand-gold text-[10px] font-black uppercase tracking-[0.3em] mb-3",children:"Presentes e Lista"}),s.jsx("h3",{className:"text-3xl font-sans font-black text-white uppercase tracking-tighter",children:"Fila de Benefícios"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"p-5 rounded-[28px] bg-white/[0.02] border border-white/5",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest mb-2",children:"Presentes ativos"}),s.jsx("p",{className:"text-3xl font-sans font-black text-white",children:O})]}),s.jsxs("div",{className:"p-5 rounded-[28px] bg-white/[0.02] border border-white/5",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest mb-2",children:"Usados"}),s.jsx("p",{className:"text-3xl font-sans font-black text-white",children:r.filter(H=>H.status==="used").length})]})]}),s.jsx("div",{className:"space-y-3",children:r.slice(0,5).map(H=>s.jsxs("div",{className:"p-4 rounded-2xl bg-black/30 border border-white/5 flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-black text-white uppercase",children:[H.firstName," ",H.lastName]}),s.jsx("p",{className:"text-[9px] text-gray-500 font-black uppercase tracking-widest",children:H.code})]}),s.jsx("span",{className:`px-3 py-1 rounded-full text-[8px] font-black uppercase tracking-widest ${H.status==="used"?"bg-red-500/10 text-red-400":"bg-green-500/10 text-green-400"}`,children:H.status==="used"?"Utilizado":"+3 amigas"})]},H.id))})]})]})]})}const g8={active:{label:"Ativo",className:"bg-green-500/10 border-green-500/20 text-green-500"},featured:{label:"Destaque",className:"bg-brand-gold/10 border-brand-gold/20 text-brand-gold"},last_tickets:{label:"Ultimos ingressos",className:"bg-orange-500/10 border-orange-500/20 text-orange-400"},sold_out:{label:"Esgotado",className:"bg-red-500/10 border-red-500/20 text-red-500"},finished:{label:"Encerrado",className:"bg-white/5 border-white/10 text-gray-500"},draft:{label:"Rascunho",className:"bg-zinc-500/10 border-zinc-500/20 text-zinc-400"}},Kb=t=>g8[t]||{label:t,className:"bg-white/5 border-white/10 text-gray-400"};function b8({onNewEvent:t,onEditEvent:n}){const{events:r,sales:l,reload:c}=xt(),u=g=>l.filter(p=>p.eventId===g),h=async g=>{if(window.confirm("Deseja excluir este evento? As vendas antigas continuam no historico, mas o evento sai da agenda e da validacao."))try{await dM(g),await c()}catch(p){alert(p instanceof Error?p.message:"Nao foi possivel excluir este evento.")}};return s.jsxs("div",{className:"space-y-8 pb-24 lg:pb-0",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter",children:"Eventos"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Gerencie sua agenda de shows e lazer"})]}),s.jsxs(ie,{onClick:t,variant:"primary",className:"w-full sm:w-auto rounded-2xl h-14 px-10 text-[10px] font-black tracking-widest gap-2 shadow-xl shadow-brand-wine/20",children:[s.jsx(dc,{className:"w-5 h-5"})," NOVO EVENTO"]})]}),s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-4 bg-white/[0.02] p-4 rounded-[24px] border border-white/5",children:[s.jsxs("div",{className:"relative flex-1 w-full",children:[s.jsx($n,{className:"absolute left-6 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-600"}),s.jsx("input",{type:"text",placeholder:"BUSCAR EVENTO POR NOME OU CATEGORIA...",className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl pl-16 pr-8 text-xs font-black uppercase tracking-wider focus:border-brand-wine transition-all"})]}),s.jsx("div",{className:"flex gap-4 w-full lg:w-auto",children:s.jsxs(ie,{variant:"outline",className:"flex-1 lg:flex-none h-14 rounded-[20px] px-8 border-white/10 gap-3 text-[10px] font-black",children:[s.jsx(rh,{className:"w-4 h-4"})," FILTRAR"]})})]}),s.jsx("div",{className:"hidden lg:block bg-white/[0.02] rounded-[40px] border border-white/5 overflow-hidden",children:s.jsxs("table",{className:"w-full border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-white/5",children:[s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Evento"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Data/Status"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Vendas"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Receita"}),s.jsx("th",{className:"px-8 py-6 text-right text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Ações"})]})}),s.jsx("tbody",{children:r.map(g=>{const m=u(g.id).filter(j=>j.paymentStatus==="paid"),x=m.reduce((j,N)=>j+N.tickets.length,0),b=g.totalTickets||g.batches.reduce((j,N)=>j+(N.quantity||0),0),v=m.reduce((j,N)=>j+N.totalValue,0),w=Kb(g.status);return s.jsxs("tr",{className:"border-b border-white/5 last:border-0 hover:bg-white/[0.02] transition-colors group",children:[s.jsx("td",{className:"px-8 py-6",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"w-14 h-14 rounded-2xl overflow-hidden border border-white/10 relative shrink-0",children:[s.jsx(pt,{src:g.imageUrl,className:"w-full h-full object-cover",alt:g.title}),g.status==="featured"&&s.jsx("div",{className:"absolute top-1 right-1",children:s.jsx(lh,{className:"w-3 h-3 text-brand-gold fill-brand-gold shadow-glow"})})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-black text-white uppercase tracking-tight",children:g.title}),s.jsx("p",{className:"text-[10px] text-gray-600 font-bold tracking-widest",children:g.category||"Atração Geral"})]})]})}),s.jsx("td",{className:"px-8 py-6",children:s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-[11px] font-black text-white",children:Ht(g.date,"dd MMM yyyy",{locale:Ca})}),s.jsx("span",{className:`px-2 py-0.5 rounded-lg text-[8px] font-black uppercase tracking-widest border ${w.className}`,children:w.label})]})}),s.jsx("td",{className:"px-8 py-6",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fc,{className:"w-4 h-4 text-gray-700"}),s.jsxs("span",{className:"font-sans font-black text-white text-lg",children:[x,s.jsxs("span",{className:"text-xs text-gray-600 ml-1",children:["/ ",b]})]})]})}),s.jsx("td",{className:"px-8 py-6",children:s.jsxs("p",{className:"text-sm font-black text-brand-gold",children:["R$ ",v.toFixed(2)]})}),s.jsx("td",{className:"px-8 py-6 text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-2 opacity-100 transition-opacity",children:[s.jsx("button",{className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all shadow-lg",title:"Editar",onClick:()=>n(g.id),children:s.jsx(Go,{className:"w-4 h-4"})}),s.jsx("button",{className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all shadow-lg",title:"Validar",children:s.jsx(Ba,{className:"w-4 h-4"})}),s.jsx("button",{className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-red-500 hover:text-white transition-all shadow-lg text-red-500/50",title:"Remover",onClick:()=>void h(g.id),children:s.jsx(As,{className:"w-4 h-4"})})]})})]},g.id)})})]})}),s.jsx("div",{className:"grid grid-cols-1 gap-6 lg:hidden",children:r.map(g=>{const m=u(g.id).filter(w=>w.paymentStatus==="paid"),x=m.reduce((w,j)=>w+j.tickets.length,0),b=m.reduce((w,j)=>w+j.totalValue,0),v=Kb(g.status);return s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.02] border border-white/5 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl overflow-hidden border border-white/10 shrink-0",children:s.jsx(pt,{src:g.imageUrl,className:"w-full h-full object-cover",alt:"Thumb"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsx("p",{className:"text-base font-black text-white uppercase tracking-tight truncate",children:g.title}),s.jsx("button",{className:"p-2 text-gray-600",children:s.jsx(b5,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("span",{className:"text-[8px] font-black text-brand-gold uppercase tracking-widest",children:g.category}),s.jsx("span",{className:"w-1 h-1 rounded-full bg-gray-700"}),s.jsx("span",{className:"text-[8px] font-black text-gray-500 uppercase tracking-widest",children:Ht(g.date,"dd MMM yyyy",{locale:Ca})})]})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 pt-4 border-t border-white/5",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[8px] text-gray-600 font-black uppercase mb-1",children:"Vendas"}),s.jsx("p",{className:"text-sm font-black text-white",children:x})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[8px] text-gray-600 font-black uppercase mb-1",children:"Receita"}),s.jsxs("p",{className:"text-sm font-black text-brand-gold",children:["R$ ",b.toFixed(0)]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"text-[8px] text-gray-600 font-black uppercase mb-1",children:"Status"}),s.jsx("span",{className:`px-2 py-0.5 rounded-lg text-[8px] font-black uppercase border ${v.className}`,children:v.label})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-2 pt-2",children:[s.jsxs(ie,{variant:"primary",size:"sm",className:"flex-1 rounded-xl h-12 text-[9px] font-black uppercase tracking-widest gap-2",onClick:()=>n(g.id),children:[s.jsx(Go,{className:"w-3 h-3"})," EDITAR"]}),s.jsxs(ie,{variant:"outline",size:"sm",className:"flex-1 rounded-xl h-12 text-[9px] font-black uppercase tracking-widest gap-2 border-white/10",children:[s.jsx(Ba,{className:"w-3 h-3"})," VALIDAR"]}),s.jsxs(ie,{variant:"outline",size:"sm",className:"flex-1 rounded-xl h-12 text-[9px] font-black uppercase tracking-widest gap-2 border-red-500/30 text-red-400 hover:bg-red-500 hover:text-white",onClick:()=>void h(g.id),children:[s.jsx(As,{className:"w-3 h-3"})," EXCLUIR"]})]})]},g.id)})})]})}const lf=()=>({name:"",description:"",price:0,ticketsPerUnit:1,quantity:"",sold:0,available:!0,isUnlimited:!1,status:"active"});function y8({onCancel:t,eventId:n}){const{events:r,reload:l}=xt(),c=r.find(z=>z.id===n),[u,h]=k.useState(!1),[g,p]=k.useState(!1),[m,x]=k.useState(null),[b,v]=k.useState(null),[w,j]=k.useState({title:"",slug:"",description:"",date:"",horario:"",category:"SHOW",location:"Paraju / Domingos Martins - ES",attractionsText:"",imageUrl:"",status:"draft",featured:!1,totalTickets:0,isUnlimited:!1,internalNotes:""}),[N,A]=k.useState([lf()]);k.useEffect(()=>{if(!c){j({title:"",slug:"",description:"",date:"",horario:"",category:"SHOW",location:"Paraju / Domingos Martins - ES",attractionsText:"",imageUrl:"",status:"draft",featured:!1,totalTickets:0,isUnlimited:!1,internalNotes:""}),A([lf()]);return}j({title:c.title,slug:c.slug||"",description:c.description,date:c.date.toISOString().slice(0,10),horario:c.horario||"",category:c.category||"SHOW",location:c.location,attractionsText:c.attractions.join(", "),imageUrl:c.imageUrl,status:c.status,featured:!!c.featured,totalTickets:c.totalTickets||0,isUnlimited:!!c.isUnlimited,internalNotes:c.internalNotes||""}),A(c.batches.map(z=>({id:z.id,name:z.name,description:z.description||"",price:z.price,ticketsPerUnit:Math.max(1,z.ticketsPerUnit||1),quantity:z.isUnlimited?"":z.quantity||0,sold:z.sold||0,available:!!z.available,isUnlimited:!!z.isUnlimited,status:z.status||"active"})))},[c]);const E=()=>A(z=>[...z,lf()]),D=(z,I)=>{A(P=>P.filter((ee,W)=>ee.id!==z&&W!==I))},C=(z,I,P)=>{A(ee=>ee.map((W,le)=>le===z?{...W,[I]:P}:W))},O=async z=>{var P;const I=(P=z.target.files)==null?void 0:P[0];if(z.target.value="",!!I){p(!0),v(null);try{const ee=await uM(I);j(W=>({...W,imageUrl:ee.url}))}catch(ee){v(ee instanceof Error?ee.message:"Não foi possível enviar a imagem.")}finally{p(!1)}}},Q=async()=>{h(!0),x(null);try{await cM({id:c==null?void 0:c.id,...w,attractionsText:w.attractionsText,batches:N.filter(z=>z.name.trim()!=="")}),await l(),t()}catch(z){x(z instanceof Error?z.message:"Não foi possível salvar o evento.")}finally{h(!1)}};return s.jsxs("div",{className:"max-w-5xl mx-auto space-y-10 pb-24 lg:pb-0",children:[s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx("button",{onClick:t,className:"w-12 h-12 rounded-2xl bg-white/5 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all",children:s.jsx(Ik,{className:"w-6 h-6"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter leading-none",children:c?"Editar Evento":"Novo Evento"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Configure todas as informações do evento abaixo"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-12",children:[s.jsxs("div",{className:"lg:col-span-8 space-y-8",children:[s.jsxs("div",{className:"p-8 sm:p-10 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Nome do Evento"}),s.jsx("input",{type:"text",value:w.title,onChange:z=>j({...w,title:z.target.value}),placeholder:"EX: BAILÃO DO GALPÃO IMPERIAL",className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none placeholder:text-gray-800"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Slug (URL)"}),s.jsx("input",{type:"text",value:w.slug,onChange:z=>j({...w,slug:z.target.value}),placeholder:"EX: almoco-imperial",className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none placeholder:text-gray-800"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Descrição"}),s.jsx("textarea",{value:w.description,onChange:z=>j({...w,description:z.target.value}),placeholder:"DETALHES SOBRE O EVENTO...",className:"w-full h-40 bg-black/40 border border-white/5 rounded-3xl p-6 text-sm font-bold text-white focus:border-brand-wine transition-all outline-none resize-none placeholder:text-gray-800"})]}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Data"}),s.jsx("input",{type:"date",value:w.date,onChange:z=>j({...w,date:z.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Horário"}),s.jsx("input",{type:"time",value:w.horario,onChange:z=>j({...w,horario:z.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Categoria"}),s.jsxs("select",{value:w.category,onChange:z=>j({...w,category:z.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none appearance-none",children:[s.jsx("option",{children:"SHOW"}),s.jsx("option",{children:"MÚSICA"}),s.jsx("option",{children:"CULTURA"}),s.jsx("option",{children:"LAZER"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Limite Total"}),s.jsx("input",{type:"number",disabled:w.isUnlimited,value:w.isUnlimited?"":w.totalTickets,onChange:z=>j({...w,totalTickets:Number(z.target.value)}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none disabled:opacity-40"})]})]}),s.jsxs("label",{className:"flex items-center gap-4 p-4 rounded-2xl bg-white/[0.02] border border-white/5 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:w.isUnlimited,onChange:z=>j({...w,isUnlimited:z.target.checked,totalTickets:z.target.checked?0:w.totalTickets}),className:"w-6 h-6 rounded-lg accent-brand-wine"}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-[10px] font-black text-white uppercase tracking-widest",children:"Evento com ingressos ilimitados"}),s.jsx("span",{className:"text-[8px] text-gray-600 font-bold uppercase tracking-widest",children:"Quando ativo, o limite total fica livre"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Local"}),s.jsx("input",{type:"text",value:w.location,onChange:z=>j({...w,location:z.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Atrações (Separadas por vírgula)"}),s.jsx("input",{type:"text",value:w.attractionsText,onChange:z=>j({...w,attractionsText:z.target.value}),placeholder:"EX: NEGUINHO SAFADÃO, DJ X...",className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none placeholder:text-gray-800"})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between px-2",children:[s.jsx("h3",{className:"text-xl font-sans font-black text-white uppercase tracking-tighter",children:"Lotes de Ingressos"}),s.jsxs(ie,{onClick:E,variant:"outline",size:"sm",className:"rounded-xl border-white/10 gap-2 text-[8px] font-black tracking-widest py-3",children:[s.jsx(dc,{className:"w-3 h-3"})," ADICIONAR LOTE"]})]}),s.jsx("div",{className:"space-y-4",children:N.map((z,I)=>s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.02] border border-white/5 flex flex-col gap-6 relative group",children:[s.jsx("button",{onClick:()=>D(z.id,I),className:"absolute top-4 right-4 text-gray-700 hover:text-red-500 transition-colors",children:s.jsx(As,{className:"w-4 h-4"})}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest px-2",children:"Nome do Lote"}),s.jsx("input",{type:"text",value:z.name,onChange:P=>C(I,"name",P.target.value),placeholder:"EX: PROMOCIONAL",className:"w-full h-12 bg-black/40 border border-white/5 rounded-xl px-4 text-xs font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest px-2",children:"Descrição"}),s.jsx("input",{type:"text",value:z.description,onChange:P=>C(I,"description",P.target.value),placeholder:"LOTE VIGENTE",className:"w-full h-12 bg-black/40 border border-white/5 rounded-xl px-4 text-xs font-black text-white focus:border-brand-wine transition-all"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest px-2",children:"Preço (R$)"}),s.jsx("input",{type:"number",value:z.price,onChange:P=>C(I,"price",Number(P.target.value)),className:"w-full h-12 bg-black/40 border border-white/5 rounded-xl px-4 text-xs font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest px-2",children:"QR por unidade"}),s.jsx("input",{type:"number",min:1,max:20,value:z.ticketsPerUnit,onChange:P=>C(I,"ticketsPerUnit",Math.max(1,Number(P.target.value)||1)),className:"w-full h-12 bg-black/40 border border-white/5 rounded-xl px-4 text-xs font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest px-2",children:"Qtd"}),s.jsx("input",{type:"number",disabled:z.isUnlimited,value:z.isUnlimited?"":z.quantity,onChange:P=>C(I,"quantity",Number(P.target.value)),className:"w-full h-12 bg-black/40 border border-white/5 rounded-xl px-4 text-xs font-black text-white focus:border-brand-wine transition-all disabled:opacity-40"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest px-2",children:"Vendidos"}),s.jsx("input",{type:"number",value:z.sold,onChange:P=>C(I,"sold",Number(P.target.value)),className:"w-full h-12 bg-black/40 border border-white/5 rounded-xl px-4 text-xs font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest px-2",children:"Status"}),s.jsxs("select",{value:z.status,onChange:P=>C(I,"status",P.target.value),className:"w-full h-12 bg-black/40 border border-white/5 rounded-xl px-4 text-xs font-black text-white focus:border-brand-wine transition-all appearance-none",children:[s.jsx("option",{value:"active",children:"ATIVO"}),s.jsx("option",{value:"sold_out",children:"ESGOTADO"}),s.jsx("option",{value:"paused",children:"PAUSADO"})]})]})]}),s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-2xl bg-black/30 border border-white/5 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:z.isUnlimited,onChange:P=>C(I,"isUnlimited",P.target.checked),className:"w-5 h-5 rounded accent-brand-wine"}),s.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest text-white",children:"Lote ilimitado"})]})]},z.id||I))})]})]}),s.jsxs("div",{className:"lg:col-span-4 space-y-8",children:[s.jsxs("div",{className:"p-8 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-8",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2 block",children:"Imagem de Capa"}),s.jsxs("label",{className:"aspect-[4/5] bg-black/40 rounded-[32px] border-2 border-dashed border-white/5 hover:border-brand-gold/40 flex flex-col items-center justify-center gap-4 overflow-hidden relative group cursor-pointer transition-all",children:[s.jsx("input",{type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",onChange:z=>void O(z),disabled:g}),w.imageUrl?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:w.imageUrl,alt:w.title||"Evento",className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/55 transition-all flex items-center justify-center opacity-0 group-hover:opacity-100",children:s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl bg-black/80 border border-white/10 px-5 py-3 text-[9px] font-black uppercase tracking-widest text-white",children:[s.jsx(xf,{className:"w-4 h-4 text-brand-gold"}),"Trocar imagem"]})})]}):s.jsx("div",{className:"flex flex-col items-center gap-2 group-hover:scale-110 transition-transform",children:g?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-10 w-10 rounded-full border-2 border-brand-gold/20 border-t-brand-gold animate-spin"}),s.jsx("span",{className:"text-[9px] font-black text-brand-gold uppercase tracking-widest",children:"Enviando imagem..."})]}):s.jsxs(s.Fragment,{children:[s.jsx(oc,{className:"w-10 h-10 text-gray-700"}),s.jsx("span",{className:"text-[9px] font-black text-gray-600 uppercase tracking-widest text-center",children:"Clique para enviar imagem"}),s.jsx("span",{className:"text-[8px] font-black text-gray-700 uppercase tracking-widest",children:"ou cole a URL abaixo"})]})})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("input",{type:"text",value:w.imageUrl,onChange:z=>j({...w,imageUrl:z.target.value}),placeholder:"https://... ou /uploads/imagem.jpg",className:"min-w-0 flex-1 rounded-2xl h-14 bg-black/40 border border-white/10 px-5 text-[10px] font-black tracking-widest text-white"}),w.imageUrl&&s.jsx("button",{type:"button",onClick:()=>j({...w,imageUrl:""}),className:"h-14 w-14 rounded-2xl border border-white/10 bg-black/40 flex items-center justify-center text-gray-500 hover:text-white hover:border-brand-gold/40 transition-all",title:"Remover imagem",children:s.jsx(Ha,{className:"w-4 h-4"})})]}),s.jsxs(ie,{variant:"outline",className:"w-full rounded-2xl h-12 text-[9px] font-black tracking-[0.2em] gap-2",disabled:g,onClick:()=>{var z;return(z=document.getElementById("event-cover-upload"))==null?void 0:z.click()},children:[s.jsx(xf,{className:"w-4 h-4"})," ",g?"ENVIANDO...":"FAZER UPLOAD"]}),s.jsx("input",{id:"event-cover-upload",type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",onChange:z=>void O(z),disabled:g}),b&&s.jsx("p",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-red-400 px-2",children:b})]}),s.jsxs("div",{className:"pt-8 border-t border-white/5 space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Status do Evento"}),s.jsxs("select",{value:w.status,onChange:z=>j({...w,status:z.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none appearance-none",children:[s.jsx("option",{value:"active",children:"ATIVO"}),s.jsx("option",{value:"featured",children:"EM DESTAQUE"}),s.jsx("option",{value:"sold_out",children:"ESGOTADO"}),s.jsx("option",{value:"finished",children:"ENCERRADO"}),s.jsx("option",{value:"draft",children:"RASCUNHO"})]})]}),s.jsxs("label",{className:"flex items-center gap-4 p-4 rounded-2xl bg-white/[0.02] border border-white/5 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:w.featured,onChange:z=>j({...w,featured:z.target.checked}),className:"w-6 h-6 rounded-lg accent-brand-wine"}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-[10px] font-black text-white uppercase tracking-widest",children:"Evento em Destaque"}),s.jsx("span",{className:"text-[8px] text-gray-600 font-bold uppercase tracking-widest",children:"EXIBIR NO TOPO DA HOME"})]})]})]})]}),s.jsxs("div",{className:"p-8 rounded-[40px] bg-brand-gold/5 border border-brand-gold/10 space-y-6",children:[s.jsxs("h4",{className:"text-[10px] text-brand-gold font-black uppercase tracking-[0.3em] px-2 flex items-center gap-2",children:[s.jsx(lh,{className:"w-4 h-4"})," Notas Internas"]}),s.jsx("textarea",{value:w.internalNotes,onChange:z=>j({...w,internalNotes:z.target.value}),placeholder:"OBSERVAÇÕES EXCLUSIVAS DO ADMIN...",className:"w-full h-40 bg-black/40 border border-brand-gold/10 rounded-2xl p-4 text-xs font-bold text-white focus:border-brand-gold transition-all outline-none resize-none placeholder:text-gray-800"}),m&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-red-400",children:m}),s.jsxs(ie,{variant:"primary",className:"w-full rounded-2xl h-16 text-xs font-black tracking-[0.2em] shadow-xl shadow-brand-wine/20",onClick:()=>void Q(),disabled:u,children:[s.jsx(uc,{className:"w-5 h-5 mr-3"})," ",u?"SALVANDO...":"SALVAR EVENTO"]})]})]})]})]})}function v8(){const{sales:t,events:n,reload:r}=xt(),[l,c]=k.useState(null),[u,h]=k.useState(!1),[g,p]=k.useState(!1),[m,x]=k.useState(null),[b,v]=k.useState(null),[w,j]=k.useState(null),[N,A]=k.useState(!1),[E,D]=k.useState(""),C=M=>String(M??"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),O=M=>String(M??"").replace(/\D+/g,""),Q=M=>{switch(M){case"paid":return"bg-green-500/10 border-green-500/20 text-green-500";case"pending":return"bg-yellow-500/10 border-yellow-500/20 text-yellow-500";case"cancelled":return"bg-red-500/10 border-red-500/20 text-red-500";default:return"bg-gray-500/10 border-gray-500/20 text-gray-500"}},z=M=>{switch(M){case"paid":return"Pago";case"pending":return"Pendente";case"cancelled":return"Cancelado";case"refunded":return"Estornado";default:return M}},I=M=>{const T=n.find(U=>U.id===M);return(T==null?void 0:T.imageUrl)||""},P=async M=>{if(confirm("Tem certeza que deseja excluir esta venda?")){p(!0);try{await xM(M),await r()}catch(T){console.error("Erro ao excluir venda:",T)}finally{p(!1)}}},ee=async M=>{x(M.id),j(null);try{const T=await hM(M.id),U=T.sentTo?" para "+T.sentTo:M.email?" para "+M.email:"";j("Ingresso reenviado"+U+". Confira caixa de entrada, spam, lixo eletrônico e promoções."),await r()}catch(T){j(T instanceof Error?T.message:"Não foi possível reenviar o ingresso.")}finally{x(null)}},W=async M=>{var T;v(M.id),j(null);try{const Y=((T=(await mM(M.id)).repair)==null?void 0:T.createdTickets)??0;j(Y>0?`${Y} QR faltante(s) gerado(s) e e-mail reenviado.`:"Pedido conferido: nenhum QR faltante encontrado."),await r()}catch(U){j(U instanceof Error?U.message:"Nao foi possivel corrigir QR faltante.")}finally{v(null)}},le=async()=>{var M;A(!0),j(null);try{const T=await pM(),U=(M=T.errors)!=null&&M.length?` ${T.errors.length} erro(s).`:"";j(`Asaas sincronizado: ${T.checked} verificado(s), ${T.paid} pago(s), ${T.pending} pendente(s).${U}`),await r()}catch(T){j(T instanceof Error?T.message:"Nao foi possivel sincronizar o Asaas.")}finally{A(!1)}},de=M=>{c(M),h(!0)},ge=async(M,T,U)=>{if(!T.qrValue)return;const Y=`https://quickchart.io/qr?size=900&margin=24&text=${encodeURIComponent(T.qrValue)}`,K=`${M.orderNumber.replace(/[^0-9A-Za-z-]+/g,"")||"pedido"}-${U+1}-${T.code}.png`;try{const ne=await fetch(Y);if(!ne.ok)throw new Error("Falha ao gerar QR.");const ce=await ne.blob(),ve=URL.createObjectURL(ce),Ge=document.createElement("a");Ge.href=ve,Ge.download=K,document.body.appendChild(Ge),Ge.click(),Ge.remove(),URL.revokeObjectURL(ve)}catch{window.open(Y,"_blank")}},be=M=>{const T=M.whatsapp.replace(/\D/g,""),U=encodeURIComponent(`Olá ${M.buyerName}, tudo certo? Estou entrando em contato sobre o pedido ${M.orderNumber} do evento ${M.eventTitle}.`);T&&window.open(`https://wa.me/55${T}?text=${U}`,"_blank")},te=t.reduce((M,T)=>M+T.totalValue,0),V=t.filter(M=>M.paymentStatus==="pending").length,J=C(E.trim()),ae=O(E),H=t.filter(M=>{if(!J)return!0;const T=M.tickets.map(K=>[K.code,K.holderName,K.holderEmail,K.batchName,K.status].join(" ")).join(" "),U=C([M.orderNumber,M.buyerName,M.customerCpf,M.email,M.whatsapp,M.eventTitle,M.paymentStatus,z(M.paymentStatus),M.paymentMethod,T].join(" ")),Y=O([M.orderNumber,M.customerCpf,M.whatsapp,M.tickets.map(K=>K.code).join(" ")].join(" "));return U.includes(J)||ae.length>=3&&Y.includes(ae)});return s.jsxs("div",{className:"space-y-8 pb-24 lg:pb-0",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter",children:"Vendas"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Gerencie todos os pedidos e pagamentos"})]}),s.jsxs("div",{className:"flex gap-4 w-full sm:w-auto",children:[s.jsxs(ie,{variant:"outline",className:"h-14 rounded-[20px] px-6 border-green-500/30 text-green-400 gap-3 text-[10px] font-black",onClick:()=>void le(),disabled:N,children:[s.jsx(Zr,{className:`w-4 h-4 ${N?"animate-spin":""}`})," ASAAS"]}),s.jsxs("div",{className:"flex-1 sm:flex-none p-4 bg-white/[0.02] border border-white/5 rounded-2xl flex flex-col items-center",children:[s.jsx("span",{className:"text-[8px] text-gray-600 font-black uppercase mb-1",children:"Total Geral"}),s.jsxs("span",{className:"text-lg font-sans font-black text-white",children:["R$ ",te.toFixed(2)]})]}),s.jsxs("div",{className:"flex-1 sm:flex-none p-4 bg-white/[0.02] border border-white/5 rounded-2xl flex flex-col items-center",children:[s.jsx("span",{className:"text-[8px] text-gray-600 font-black uppercase mb-1",children:"Pendentes"}),s.jsx("span",{className:"text-lg font-sans font-black text-yellow-500",children:V})]})]})]}),w&&s.jsx("div",{className:"p-4 rounded-[24px] bg-green-500/10 border border-green-500/20 text-green-300 text-[10px] font-black uppercase tracking-widest",children:w}),s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-4 bg-white/[0.02] p-4 rounded-[24px] border border-white/5",children:[s.jsxs("div",{className:"relative flex-1 w-full",children:[s.jsx($n,{className:"absolute left-6 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-600"}),s.jsx("input",{type:"text",value:E,onChange:M=>D(M.target.value),placeholder:"BUSCAR POR NOME, CPF, E-MAIL, PEDIDO, WHATSAPP OU QR...",className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl pl-16 pr-8 text-xs font-black uppercase tracking-wider focus:border-brand-wine transition-all"})]}),s.jsx("div",{className:"flex gap-4 w-full lg:w-auto",children:s.jsxs(ie,{variant:"outline",className:"flex-1 lg:flex-none h-14 rounded-[20px] px-8 border-white/10 gap-3 text-[10px] font-black",children:[s.jsx(rh,{className:"w-4 h-4"})," STATUS"]})})]}),s.jsxs("div",{className:"hidden lg:block bg-white/[0.02] rounded-[40px] border border-white/5 overflow-hidden",children:[s.jsxs("table",{className:"w-full border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-white/5",children:[s.jsx("th",{className:"px-4 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Img"}),s.jsx("th",{className:"px-4 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Pedido / Data"}),s.jsx("th",{className:"px-4 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Comprador"}),s.jsx("th",{className:"px-4 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Evento"}),s.jsx("th",{className:"px-4 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Valor"}),s.jsx("th",{className:"px-4 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Status"}),s.jsx("th",{className:"px-4 py-6 text-right text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Ações"})]})}),s.jsx("tbody",{children:H.map(M=>s.jsxs("tr",{className:"border-b border-white/5 last:border-0 hover:bg-white/[0.02] transition-colors group",children:[s.jsx("td",{className:"px-4 py-6",children:s.jsx("div",{className:"w-12 h-12 rounded-xl overflow-hidden bg-black",children:s.jsx(pt,{src:I(M.eventId),alt:"",className:"w-full h-full object-cover"})})}),s.jsx("td",{className:"px-4 py-6",children:s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm font-black text-white",children:M.orderNumber}),s.jsx("p",{className:"text-[10px] text-gray-600 font-bold tracking-widest",children:Ht(M.purchaseDate,"dd/MM HH:mm")})]})}),s.jsx("td",{className:"px-4 py-6",children:s.jsxs("div",{className:"space-y-1 min-w-[150px]",children:[s.jsx("p",{className:"text-sm font-black text-white uppercase tracking-tight truncate",children:M.buyerName}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Va,{className:"w-3 h-3 text-brand-gold"}),s.jsx("span",{className:"text-[10px] text-gray-500 font-bold",children:M.whatsapp})]})]})}),s.jsx("td",{className:"px-4 py-6",children:s.jsxs("div",{className:"space-y-1 max-w-[200px]",children:[s.jsx("p",{className:"text-xs font-black text-white uppercase tracking-tight truncate",children:M.eventTitle}),s.jsxs("p",{className:"text-[9px] text-gray-700 font-bold uppercase tracking-widest leading-none",children:[M.quantity," Itens • ",M.tickets.length,"/",M.expectedTicketCount||M.tickets.length," QR"]})]})}),s.jsx("td",{className:"px-4 py-6",children:s.jsxs("p",{className:"text-sm font-black text-brand-gold",children:["R$ ",M.totalValue.toFixed(2)]})}),s.jsx("td",{className:"px-4 py-6",children:s.jsx("span",{className:`px-2 py-0.5 rounded-lg text-[8px] font-black uppercase tracking-widest border ${Q(M.paymentStatus)}`,children:z(M.paymentStatus)})}),s.jsx("td",{className:"px-4 py-6 text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-2 opacity-50 group-hover:opacity-100 transition-opacity",children:[s.jsx("button",{className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-brand-gold hover:text-black transition-all",title:"Ver QR Code",onClick:()=>de(M),children:s.jsx(Ba,{className:"w-4 h-4"})}),s.jsx("button",{className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all",title:"WhatsApp",onClick:()=>be(M),children:s.jsx(Va,{className:"w-4 h-4"})}),s.jsx("button",{className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-green-600 hover:text-white transition-all disabled:opacity-50",title:"Reenviar e-mail",onClick:()=>void ee(M),disabled:m===M.id,children:s.jsx(d0,{className:"w-4 h-4"})}),(M.missingTicketCount||0)>0&&s.jsx("button",{className:"w-10 h-10 rounded-xl bg-yellow-500/10 border border-yellow-500/20 flex items-center justify-center hover:bg-yellow-500 hover:text-black transition-all disabled:opacity-50",title:"Corrigir QR faltante",onClick:()=>void W(M),disabled:b===M.id,children:s.jsx(f0,{className:"w-4 h-4"})}),s.jsx("button",{className:"w-10 h-10 rounded-xl bg-red-500/10 border border-red-500/20 flex items-center justify-center hover:bg-red-500 hover:text-white transition-all",title:"Excluir Venda",onClick:()=>P(M.id),disabled:g,children:s.jsx(As,{className:"w-4 h-4"})})]})})]},M.id))})]}),H.length===0&&s.jsx("div",{className:"p-10 text-center text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Nenhuma venda encontrada para essa busca."})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:hidden",children:[H.map(M=>s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.02] border border-white/5 space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-sans font-black text-white tracking-tighter leading-none",children:M.orderNumber}),s.jsx("p",{className:"text-[10px] text-gray-600 font-bold uppercase mt-1 tracking-widest",children:Ht(M.purchaseDate,"dd/MM/yyyy HH:mm")})]}),s.jsx("span",{className:`px-3 py-1 rounded-full text-[8px] font-black uppercase tracking-widest border ${Q(M.paymentStatus)}`,children:z(M.paymentStatus)})]}),s.jsxs("div",{className:"space-y-4 pt-4 border-t border-white/5",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-brand-wine/10 flex items-center justify-center text-brand-wine font-black",children:M.buyerName.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-black text-white uppercase tracking-tight",children:M.buyerName}),s.jsx("p",{className:"text-[10px] text-gray-600 font-bold uppercase tracking-widest",children:M.whatsapp})]})]}),s.jsxs("div",{className:"p-4 rounded-2xl bg-black/40 border border-white/5 space-y-2",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest",children:"Resumo da Compra"}),s.jsx("p",{className:"text-xs font-black text-white uppercase truncate",children:M.eventTitle}),s.jsxs("div",{className:"flex justify-between items-center mt-2",children:[s.jsxs("span",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest",children:[M.quantity,"x Itens • ",M.tickets.length,"/",M.expectedTicketCount||M.tickets.length," QR"]}),s.jsxs("span",{className:"text-base font-sans font-black text-brand-gold",children:["R$ ",M.totalValue.toFixed(2)]})]})]})]}),s.jsxs("div",{className:"flex gap-2 pt-2",children:[s.jsxs(ie,{variant:"primary",size:"sm",className:"flex-1 rounded-xl h-12 text-[9px] font-black uppercase tracking-widest gap-2",onClick:()=>de(M),children:["DETALHES ",s.jsx(Si,{className:"w-4 h-4"})]}),s.jsxs(ie,{variant:"outline",size:"sm",className:"flex-1 rounded-xl h-12 text-[9px] font-black uppercase tracking-widest gap-2 border-white/10",onClick:()=>be(M),children:[s.jsx(Va,{className:"w-4 h-4"})," WHATSAPP"]}),s.jsxs(ie,{variant:"outline",size:"sm",className:"flex-1 rounded-xl h-12 text-[9px] font-black uppercase tracking-widest gap-2 border-green-500/30 text-green-400",onClick:()=>void ee(M),disabled:m===M.id,children:[s.jsx(d0,{className:"w-4 h-4"})," ",m===M.id?"ENVIANDO":"REENVIAR"]}),(M.missingTicketCount||0)>0&&s.jsxs(ie,{variant:"outline",size:"sm",className:"flex-1 rounded-xl h-12 text-[9px] font-black uppercase tracking-widest gap-2 border-yellow-500/30 text-yellow-400",onClick:()=>void W(M),disabled:b===M.id,children:[s.jsx(f0,{className:"w-4 h-4"})," ",b===M.id?"OK...":"QR"]})]})]},M.id)),H.length===0&&s.jsx("div",{className:"p-8 rounded-[28px] border border-dashed border-white/10 text-center text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Nenhuma venda encontrada para essa busca."})]}),s.jsx(ma,{children:u&&l&&s.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/90 backdrop-blur-md",onClick:()=>h(!1),children:s.jsxs(Te.div,{initial:{scale:.9,y:20},animate:{scale:1,y:0},exit:{scale:.9,y:20},className:"bg-[#0D0D0D] border border-white/10 rounded-[32px] sm:rounded-[40px] p-5 sm:p-8 max-w-lg w-full max-h-[92vh] overflow-hidden",onClick:M=>M.stopPropagation(),children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h3",{className:"text-xl font-sans font-black text-white uppercase",children:"Detalhes da venda"}),s.jsx("button",{onClick:()=>h(!1),className:"w-10 h-10 rounded-xl bg-white/5 flex items-center justify-center",children:s.jsx(Ha,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"space-y-5 max-h-[70vh] overflow-y-auto pr-1",children:[s.jsxs("div",{className:"w-full space-y-2 text-center p-4 rounded-[24px] bg-white/[0.03] border border-white/10",children:[s.jsx("p",{className:"text-sm font-black text-white uppercase",children:l.buyerName}),s.jsxs("p",{className:"text-[10px] text-gray-500 font-black uppercase",children:[l.email," • ",l.whatsapp]}),s.jsxs("p",{className:"text-[10px] text-brand-gold font-black uppercase",children:[l.orderNumber," • ",l.eventTitle]}),s.jsxs("p",{className:"text-[10px] text-gray-500 font-black uppercase",children:["QR: ",l.tickets.length,"/",l.expectedTicketCount||l.tickets.length]}),s.jsxs("p",{className:"text-[10px] text-gray-500 font-black uppercase",children:["Status e-mail: ",l.ticketEmailSentAt?"enviado":l.ticketEmailError?"erro":"aguardando"]})]}),l.tickets.map((M,T)=>s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[132px_1fr] gap-4 items-center p-4 rounded-[24px] bg-black/30 border border-white/10",children:[s.jsx("div",{className:"w-32 h-32 mx-auto rounded-[22px] bg-white p-3 flex items-center justify-center",children:M.qrValue?s.jsx(ki,{value:M.qrValue,size:100,className:"!p-0 !shadow-none !rounded-none"}):s.jsx("div",{className:"w-full h-full flex items-center justify-center text-black text-[10px] font-black text-center",children:"Sem QR"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("p",{className:"text-[9px] font-black uppercase tracking-widest text-brand-gold",children:["Ingresso ",T+1,"/",l.tickets.length]}),s.jsx("p",{className:"text-xs font-mono font-black text-white break-all mt-1",children:M.code}),s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase mt-2",children:M.holderName||l.buyerName}),s.jsx("p",{className:"text-[10px] text-gray-600 font-bold break-all",children:M.holderEmail||l.email}),M.qrValue&&s.jsxs(ie,{variant:"outline",size:"sm",className:"mt-4 h-10 rounded-xl text-[9px] font-black uppercase tracking-widest gap-2 border-white/10",onClick:()=>void ge(l,M,T),children:[s.jsx(ih,{className:"w-3.5 h-3.5"})," Baixar QR"]}),s.jsxs("p",{className:"text-[9px] text-gray-500 font-black uppercase mt-2",children:["QR: ",M.status==="used"?"confirmado":M.status==="cancelled"?"cancelado":"não usado"," • ",M.ticketEmailSentAt?"E-mail enviado":M.ticketEmailError?"Erro no e-mail":"E-mail pendente"]})]})]},M.code)),s.jsx(ie,{variant:"outline",className:"w-full h-12 rounded-2xl text-[10px]",onClick:()=>h(!1),children:"FECHAR"})]})]})})})]})}function Wb({mode:t="ticket"}){var E;const[n,r]=k.useState(""),[l,c]=k.useState(null),[u,h]=k.useState(!1),[g,p]=k.useState(null),{events:m}=xt(),[x,b]=k.useState(""),v=k.useMemo(()=>m.filter(D=>D.status!=="finished"&&D.status!=="draft"),[m]),w=t==="ticket",j=`/colaborador?mode=${w?"ticket":"partner"}`,N=async D=>{if(D==null||D.preventDefault(),!!n){h(!0),p(null);try{if(w){const C=await mw(n,x||void 0);c(C)}else{const C=await xw(n);c(C)}}catch(C){c(null),p(C instanceof Error?C.message:"Falha na busca.")}finally{h(!1)}}},A=async()=>{if(l){h(!0),p(null);try{w?(await $f(l.tickets[0].code,"Admin",x||void 0),p("Entrada confirmada com sucesso.")):(await gw(l.cpf,"Admin"),p("Carteirinha validada com sucesso.")),c(null),r("")}catch(D){p(D instanceof Error?D.message:"Falha na validação.")}finally{h(!1)}}};return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-8 pb-24 lg:pb-0",children:[s.jsxs("div",{className:"flex flex-col xl:flex-row xl:items-end justify-between gap-5",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-brand-gold/20 bg-brand-gold/10 px-4 py-2 text-[9px] font-black uppercase tracking-[0.25em] text-brand-gold mb-4",children:[s.jsx(l4,{className:"w-4 h-4"})," Validação operacional"]}),s.jsx("h2",{className:"text-4xl sm:text-5xl font-sans font-black text-white uppercase tracking-tighter leading-none",children:w?"Validar Ingressos":"Validar Carteirinhas"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-3 max-w-2xl leading-relaxed",children:w?"Abra a câmera externa para leitura contínua ou faça uma busca manual por código, nome ou CPF.":"Valide sócios/parceiros pela carteirinha digital, CPF, nome ou WhatsApp."})]}),s.jsxs(ie,{variant:"outline",className:"h-14 rounded-2xl border-white/10 gap-2 text-[10px] font-black tracking-widest uppercase px-6",onClick:()=>window.open(j,"_blank"),children:[s.jsx(Si,{className:"w-4 h-4"})," Abrir validador externo"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"rounded-[28px] border border-white/10 bg-white/[0.03] p-5",children:[s.jsx(y4,{className:"w-6 h-6 text-brand-gold mb-4"}),s.jsx("p",{className:"text-sm font-black uppercase text-white",children:"Câmera externa"}),s.jsx("p",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest mt-2",children:"Ideal para celular da portaria."})]}),s.jsxs("div",{className:"rounded-[28px] border border-white/10 bg-white/[0.03] p-5",children:[s.jsx(Oy,{className:"w-6 h-6 text-emerald-400 mb-4"}),s.jsx("p",{className:"text-sm font-black uppercase text-white",children:"Busca manual"}),s.jsx("p",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest mt-2",children:"Confere antes de confirmar."})]}),s.jsxs("div",{className:"rounded-[28px] border border-white/10 bg-white/[0.03] p-5",children:[s.jsx(Fn,{className:"w-6 h-6 text-blue-400 mb-4"}),s.jsx("p",{className:"text-sm font-black uppercase text-white",children:"Status claro"}),s.jsx("p",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest mt-2",children:"Mostra pago/usado/ativo."})]})]}),s.jsx(ma,{mode:"wait",children:l?s.jsxs(Te.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"p-10 rounded-[48px] border-4 flex flex-col items-center text-center space-y-8 bg-emerald-500/5 border-emerald-500/20",children:[s.jsx("div",{className:"w-24 h-24 rounded-[32px] flex items-center justify-center bg-emerald-500 text-white",children:s.jsx(Dt,{className:"w-12 h-12"})}),s.jsx("div",{className:"space-y-2",children:s.jsx("h3",{className:"text-4xl font-sans font-black uppercase tracking-tighter text-emerald-500",children:w?"Ingresso Encontrado":"Carteirinha Encontrada"})}),s.jsx("div",{className:"w-full space-y-4 pt-4",children:w?s.jsxs("div",{className:"p-6 rounded-3xl bg-black/40 border border-white/5 grid grid-cols-1 sm:grid-cols-2 gap-4 text-left",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase mb-1",children:"Comprador"}),s.jsx("p",{className:"text-sm font-black text-white uppercase",children:l.buyerName})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase mb-1",children:"CPF"}),s.jsx("p",{className:"text-sm font-black text-white",children:l.customerCpf||"Não informado"})]}),s.jsxs("div",{className:"col-span-2 pt-2 border-t border-white/5",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase mb-1",children:"Evento"}),s.jsx("p",{className:"text-sm font-black text-brand-gold uppercase",children:l.eventTitle})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase mb-1",children:"Ticket"}),s.jsx("p",{className:"text-sm font-mono font-black text-white break-all",children:(E=l.tickets[0])==null?void 0:E.code})]})]}):s.jsxs("div",{className:"p-6 rounded-3xl bg-black/40 border border-white/5 grid grid-cols-1 sm:grid-cols-2 gap-4 text-left",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase mb-1",children:"Parceiro"}),s.jsx("p",{className:"text-sm font-black text-white uppercase",children:l.name})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase mb-1",children:"CPF"}),s.jsx("p",{className:"text-sm font-black text-white",children:l.cpf})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase mb-1",children:"WhatsApp"}),s.jsx("p",{className:"text-sm font-black text-white",children:l.whatsapp})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase mb-1",children:"Plano"}),s.jsx("p",{className:"text-sm font-black text-brand-gold uppercase",children:l.planId})]})]})}),s.jsxs("div",{className:"flex w-full gap-4",children:[s.jsx(ie,{onClick:()=>{c(null),r(""),p(null)},variant:"outline",className:"flex-1 h-16 rounded-[24px] text-xs font-black tracking-widest",children:"NOVA BUSCA"}),s.jsxs(ie,{onClick:()=>void A(),disabled:u||w&&l.paymentStatus!=="paid",variant:"primary",className:"flex-1 h-16 rounded-[24px] text-xs font-black tracking-widest gap-3 shadow-xl",children:["CONFIRMAR ",s.jsx(mn,{className:"w-5 h-5"})]})]})]},"result"):s.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,scale:.95},className:"space-y-8",children:[s.jsxs("div",{className:"min-h-[340px] bg-gradient-to-br from-brand-wine/15 via-white/[0.03] to-black border border-white/10 rounded-[44px] flex flex-col items-center justify-center p-8 relative overflow-hidden group hover:border-brand-gold/40 transition-all",children:[s.jsx("div",{className:"absolute inset-0 bg-brand-wine/5 opacity-0 group-hover:opacity-100 transition-opacity"}),s.jsx("div",{className:"p-8 bg-black/40 border border-white/10 rounded-[32px] mb-6 shadow-2xl",children:s.jsx(Ay,{className:"w-16 h-16 text-brand-wine"})}),s.jsx("h3",{className:"text-2xl font-sans font-black text-white uppercase tracking-tighter mb-2 italic",children:"Portaria Rápida"}),s.jsx("p",{className:"text-gray-600 text-[10px] font-black uppercase tracking-[0.2em] text-center max-w-[280px]",children:"Use a página do colaborador para abrir só a câmera, sem login, e validar em sequência."}),s.jsxs(ie,{variant:"outline",className:"mt-6 h-14 rounded-[24px] text-[10px] uppercase tracking-[0.3em] border-white/10",onClick:()=>window.open(j,"_blank"),children:["Abrir Página Colaborador ",s.jsx(Si,{className:"w-4 h-4 ml-2"})]})]}),w&&s.jsxs("div",{className:"p-6 rounded-[28px] bg-white/[0.02] border border-white/5",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest block mb-3",children:"Evento da validação"}),s.jsxs("select",{value:x,onChange:D=>b(D.target.value),className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl px-6 text-xs font-black text-white focus:border-brand-wine transition-all outline-none",children:[s.jsx("option",{value:"",children:"Todos os eventos"}),v.map(D=>s.jsx("option",{value:D.id,children:D.title},D.id))]})]}),s.jsxs("form",{className:"space-y-4",onSubmit:N,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"text",value:n,onChange:D=>r(w?D.target.value.toUpperCase():D.target.value),placeholder:w?"DIGITE O CÓDIGO, CPF OU NOME...":"DIGITE CPF, NOME, WHATSAPP OU QR...",className:"w-full h-18 bg-white/[0.02] border border-white/5 rounded-[24px] px-8 text-lg font-black text-white focus:border-brand-wine transition-all outline-none placeholder:text-gray-800"}),s.jsx("div",{className:"absolute right-4 top-1/2 -translate-y-1/2",children:w?s.jsx(qa,{className:"w-6 h-6 text-gray-800"}):s.jsx(Fn,{className:"w-6 h-6 text-gray-800"})})]}),g&&s.jsx("p",{className:`text-[10px] uppercase tracking-[0.2em] font-black ${g.includes("sucesso")?"text-green-400":"text-red-400"}`,children:g}),s.jsx(ie,{type:"submit",disabled:!n||u,variant:"primary",className:"w-full h-18 rounded-[24px] text-xs font-black tracking-widest gap-3 shadow-xl shadow-brand-wine/20",children:u?s.jsx(Zr,{className:"w-5 h-5 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx(Dt,{className:"w-5 h-5"})," BUSCAR"]})})]})]},"scanner")})]})}const Zb=t=>`R$ ${t.toFixed(2).replace(".",",")}`;function w8(){const{sales:t,events:n,partners:r,giftClaims:l}=xt(),c=t.filter(N=>N.paymentStatus==="paid"),u=t.filter(N=>N.paymentStatus==="pending"),h=c.reduce((N,A)=>N+A.totalValue,0),g=c.reduce((N,A)=>N+A.tickets.length,0),p=c.reduce((N,A)=>N+A.tickets.filter(E=>E.status==="used").length,0),m=r.filter(N=>N.status==="active").length,x=l.filter(N=>N.status==="used").length,b=l.filter(N=>N.status==="confirmed").length,v=n.map(N=>{const A=t.filter(z=>z.eventId===N.id),E=A.filter(z=>z.paymentStatus==="paid"),D=E.reduce((z,I)=>z+I.tickets.length,0),C=E.reduce((z,I)=>z+I.tickets.filter(P=>P.status==="used").length,0),O=E.reduce((z,I)=>z+I.totalValue,0),Q=A.filter(z=>z.paymentStatus==="pending").length;return{event:N,ticketsSold:D,checkins:C,revenue:O,pending:Q}}).sort((N,A)=>A.revenue-N.revenue),w=Math.max(...v.map(N=>N.revenue),1),j=[{label:"Receita paga",value:Zb(h),icon:mf,color:"text-brand-gold"},{label:"Ingressos vendidos",value:String(g),icon:qa,color:"text-emerald-400"},{label:"Check-ins feitos",value:String(p),icon:Dt,color:"text-blue-400"},{label:"Pedidos pendentes",value:String(u.length),icon:Gr,color:"text-yellow-400"}];return s.jsxs("div",{className:"space-y-8 pb-24 lg:pb-0",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-5",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-brand-gold/20 bg-brand-gold/10 px-4 py-2 text-[9px] font-black uppercase tracking-[0.25em] text-brand-gold mb-4",children:[s.jsx(Lr,{className:"w-4 h-4"})," Painel financeiro e operação"]}),s.jsx("h2",{className:"text-4xl sm:text-5xl font-sans font-black text-white uppercase tracking-tighter leading-none",children:"Relatórios"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-3 max-w-2xl",children:"Resumo real de vendas, eventos ativos, check-ins, parceiros e lista de presentes."})]}),s.jsxs(ie,{variant:"outline",className:"h-12 rounded-2xl border-white/10 gap-2 text-[10px] font-black tracking-widest uppercase px-6",children:[s.jsx(ih,{className:"w-4 h-4"})," Exportar resumo"]})]}),s.jsx("div",{className:"grid grid-cols-2 xl:grid-cols-4 gap-4",children:j.map(N=>s.jsxs("div",{className:"rounded-[30px] border border-white/10 bg-white/[0.03] p-5 sm:p-6 relative overflow-hidden",children:[s.jsx(N.icon,{className:`w-7 h-7 ${N.color} mb-6`}),s.jsx("p",{className:"text-[9px] font-black uppercase tracking-[0.22em] text-gray-500",children:N.label}),s.jsx("p",{className:"text-2xl sm:text-3xl font-sans font-black text-white mt-2 tracking-tighter",children:N.value})]},N.label))}),s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[1.35fr_0.65fr] gap-6",children:[s.jsxs("div",{className:"rounded-[42px] border border-white/10 bg-white/[0.025] p-5 sm:p-8 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-2xl font-sans font-black uppercase tracking-tighter text-white",children:"Eventos ativos"}),s.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-500 mt-1",children:"Vendas, receita e presença por evento"})]}),s.jsx(Wk,{className:"w-8 h-8 text-brand-gold"})]}),s.jsxs("div",{className:"space-y-4",children:[v.map(({event:N,ticketsSold:A,checkins:E,revenue:D,pending:C})=>s.jsxs("div",{className:"rounded-[28px] border border-white/10 bg-black/35 p-5 space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-base font-black uppercase text-white tracking-tight",children:N.title}),s.jsxs("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-600",children:[N.status," • ",N.location]})]}),s.jsx("p",{className:"text-xl font-sans font-black text-brand-gold",children:Zb(D)})]}),s.jsx("div",{className:"h-3 rounded-full bg-white/[0.05] overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-brand-wine to-brand-gold",style:{width:`${Math.max(4,D/w*100)}%`}})}),s.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center",children:[s.jsxs("div",{className:"rounded-2xl bg-white/[0.03] p-3",children:[s.jsx("p",{className:"text-lg font-black text-white",children:A}),s.jsx("p",{className:"text-[8px] text-gray-500 font-black uppercase tracking-widest",children:"vendidos"})]}),s.jsxs("div",{className:"rounded-2xl bg-white/[0.03] p-3",children:[s.jsx("p",{className:"text-lg font-black text-emerald-400",children:E}),s.jsx("p",{className:"text-[8px] text-gray-500 font-black uppercase tracking-widest",children:"check-ins"})]}),s.jsxs("div",{className:"rounded-2xl bg-white/[0.03] p-3",children:[s.jsx("p",{className:"text-lg font-black text-yellow-400",children:C}),s.jsx("p",{className:"text-[8px] text-gray-500 font-black uppercase tracking-widest",children:"pendentes"})]})]})]},N.id)),!v.length&&s.jsx("div",{className:"rounded-[28px] border border-dashed border-white/10 p-8 text-center text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Nenhum evento para exibir"})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"rounded-[42px] border border-white/10 bg-white/[0.025] p-7 space-y-5",children:[s.jsx(Di,{className:"w-8 h-8 text-brand-gold"}),s.jsx("h3",{className:"text-2xl font-sans font-black uppercase tracking-tighter text-white",children:"Clube parceiro"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"rounded-2xl bg-black/40 p-4",children:[s.jsx("p",{className:"text-2xl font-black text-white",children:r.length}),s.jsx("p",{className:"text-[8px] uppercase tracking-widest text-gray-500 font-black",children:"total"})]}),s.jsxs("div",{className:"rounded-2xl bg-black/40 p-4",children:[s.jsx("p",{className:"text-2xl font-black text-emerald-400",children:m}),s.jsx("p",{className:"text-[8px] uppercase tracking-widest text-gray-500 font-black",children:"ativos"})]})]})]}),s.jsxs("div",{className:"rounded-[42px] border border-white/10 bg-white/[0.025] p-7 space-y-5",children:[s.jsx(qa,{className:"w-8 h-8 text-brand-gold"}),s.jsx("h3",{className:"text-2xl font-sans font-black uppercase tracking-tighter text-white",children:"Presentes"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"rounded-2xl bg-black/40 p-4",children:[s.jsx("p",{className:"text-2xl font-black text-yellow-400",children:b}),s.jsx("p",{className:"text-[8px] uppercase tracking-widest text-gray-500 font-black",children:"na lista"})]}),s.jsxs("div",{className:"rounded-2xl bg-black/40 p-4",children:[s.jsx("p",{className:"text-2xl font-black text-emerald-400",children:x}),s.jsx("p",{className:"text-[8px] uppercase tracking-widest text-gray-500 font-black",children:"entraram"})]})]})]})]})]})]})}function N8(){const[t,n]=k.useState(""),[r,l]=k.useState(null),[c,u]=k.useState(null),[h,g]=k.useState(!1),{partners:p,reload:m}=xt(),x=k.useMemo(()=>p.filter(N=>N.name.toLowerCase().includes(t.toLowerCase())||N.cpf.includes(t)||N.whatsapp.includes(t)||(N.memberCode||"").toLowerCase().includes(t.toLowerCase())),[p,t]),b=N=>u({...N}),v=async()=>{if(c){g(!0);try{await yM({...c,planId:c.planId,startDate:c.startDate.toISOString().slice(0,10),expiryDate:c.expiryDate.toISOString().slice(0,10)}),await m(),u(null)}finally{g(!1)}}},w=async N=>{g(!0);try{await vM(N,30),await m()}finally{g(!1)}},j=async N=>{if(window.confirm("Deseja excluir este parceiro?")){g(!0);try{await wM(N),await m()}finally{g(!1)}}};return s.jsxs("div",{className:"space-y-8 pb-24 lg:pb-0",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter",children:"Parceiros"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Edite, renove, exclua e visualize a carteirinha do sócio"})]}),s.jsx(ie,{variant:"primary",className:"w-full sm:w-auto rounded-2xl h-14 px-10 text-[10px] font-black tracking-widest gap-2",children:"EXPORTAR PDF"})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-6 bg-white/[0.02] p-6 rounded-[32px] border border-white/5",children:[s.jsxs("div",{className:"relative flex-1 w-full sm:w-auto",children:[s.jsx($n,{className:"absolute left-6 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-600"}),s.jsx("input",{type:"text",value:t,onChange:N=>n(N.target.value),placeholder:"BUSCAR POR NOME, CPF, WHATSAPP OU CÓDIGO...",className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl pl-16 pr-8 text-xs font-black uppercase tracking-wider focus:border-brand-wine transition-all"})]}),s.jsx("div",{className:"flex gap-4",children:s.jsxs(ie,{variant:"outline",size:"sm",className:"rounded-xl border-white/10 text-[9px] font-black uppercase tracking-widest px-6 h-14",children:[s.jsx(rh,{className:"w-4 h-4 mr-2"})," FILTRAR"]})})]}),s.jsx("div",{className:"hidden lg:block bg-white/[0.02] rounded-[40px] border border-white/5 overflow-hidden",children:s.jsxs("table",{className:"w-full border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-white/5",children:[s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Parceiro"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Contato"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Status"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Renovação"}),s.jsx("th",{className:"px-8 py-6 text-right text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Ações"})]})}),s.jsx("tbody",{children:x.map(N=>s.jsxs("tr",{className:"border-b border-white/5 last:border-0 hover:bg-white/[0.02] transition-colors group",children:[s.jsx("td",{className:"px-8 py-6",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-brand-wine/10 flex items-center justify-center text-brand-wine font-black text-sm",children:N.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-black text-white uppercase tracking-tight",children:N.name}),s.jsx("p",{className:"text-[10px] text-gray-500 font-bold tracking-widest",children:N.cpf}),s.jsx("p",{className:"text-[9px] text-gray-700 font-bold tracking-widest",children:N.memberCode})]})]})}),s.jsx("td",{className:"px-8 py-6",children:s.jsxs("div",{className:"space-y-1",children:[s.jsxs("p",{className:"text-[10px] font-black text-white flex items-center gap-2",children:[s.jsx(Es,{className:"w-3 h-3"})," ",N.whatsapp]}),s.jsxs("p",{className:"text-[9px] text-gray-500 font-bold tracking-widest flex items-center gap-2",children:[s.jsx(cc,{className:"w-3 h-3"})," ",N.email||"Sem e-mail"]})]})}),s.jsx("td",{className:"px-8 py-6",children:s.jsx("span",{className:`px-3 py-1 rounded-full text-[8px] font-black uppercase tracking-widest border ${N.status==="active"?"bg-green-500/10 border-green-500/20 text-green-500":"bg-red-500/10 border-red-500/20 text-red-500"}`,children:N.status==="active"?"Ativa":N.status})}),s.jsx("td",{className:"px-8 py-6",children:s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-[11px] font-black text-white",children:Ht(N.expiryDate,"dd/MM/yyyy",{locale:Ca})}),s.jsxs("p",{className:"text-[8px] text-gray-500 font-bold uppercase tracking-widest",children:["Renova em ",Ht(N.expiryDate,"dd/MM",{locale:Ca})]})]})}),s.jsx("td",{className:"px-8 py-6 text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-2 opacity-30 group-hover:opacity-100 transition-opacity",children:[s.jsx("button",{type:"button",onClick:()=>l(N),className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all shadow-lg",children:s.jsx(Ba,{className:"w-4 h-4"})}),s.jsx("button",{type:"button",onClick:()=>b(N),className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all shadow-lg",children:s.jsx(Go,{className:"w-4 h-4"})}),s.jsx("button",{type:"button",onClick:()=>void w(N.id),className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all shadow-lg",children:s.jsx(Zr,{className:"w-4 h-4"})}),s.jsx("button",{type:"button",onClick:()=>void j(N.id),className:"w-10 h-10 rounded-xl bg-white/5 border border-white/5 flex items-center justify-center hover:bg-red-500 hover:text-white transition-all shadow-lg text-red-500/50",children:s.jsx(As,{className:"w-4 h-4"})})]})})]},N.id))})]})}),r&&s.jsxs("div",{className:"fixed inset-0 z-[120] flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/85 backdrop-blur-md",onClick:()=>l(null)}),s.jsxs("div",{className:"relative w-full max-w-md rounded-[40px] border border-white/10 bg-[#0A0A0A] p-8 space-y-6",children:[s.jsx("button",{type:"button",onClick:()=>l(null),className:"absolute top-5 right-5 w-10 h-10 rounded-full bg-white/5 border border-white/10 flex items-center justify-center text-gray-400 hover:text-white",children:s.jsx(Ha,{className:"w-4 h-4"})}),s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("p",{className:"text-[10px] text-brand-gold font-black uppercase tracking-[0.4em]",children:"Carteirinha do Sócio"}),s.jsx("h3",{className:"text-2xl font-sans font-black text-white uppercase tracking-tighter",children:r.name}),s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:r.memberCode})]}),s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"bg-white rounded-[28px] p-4 shadow-2xl",children:s.jsx(Bh,{value:r.qrValue||r.memberCode||r.cpf,size:220})})}),s.jsxs("div",{className:"grid grid-cols-1 gap-3 text-center",children:[s.jsxs("div",{className:"p-4 rounded-2xl bg-white/[0.03] border border-white/10",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest mb-1",children:"CPF"}),s.jsx("p",{className:"text-sm font-black text-white",children:r.cpf})]}),s.jsxs("div",{className:"p-4 rounded-2xl bg-white/[0.03] border border-white/10",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest mb-1",children:"Renovação"}),s.jsx("p",{className:"text-sm font-black text-brand-gold",children:Ht(r.expiryDate,"dd/MM/yyyy",{locale:Ca})})]})]})]})]}),c&&s.jsxs("div",{className:"fixed inset-0 z-[121] flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/85 backdrop-blur-md",onClick:()=>u(null)}),s.jsxs("div",{className:"relative w-full max-w-2xl rounded-[40px] border border-white/10 bg-[#0A0A0A] p-8 space-y-6",children:[s.jsx("button",{type:"button",onClick:()=>u(null),className:"absolute top-5 right-5 w-10 h-10 rounded-full bg-white/5 border border-white/10 flex items-center justify-center text-gray-400 hover:text-white",children:s.jsx(Ha,{className:"w-4 h-4"})}),s.jsx("h3",{className:"text-2xl font-sans font-black text-white uppercase tracking-tighter",children:"Editar Parceiro"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsx("input",{value:c.name,onChange:N=>u({...c,name:N.target.value}),className:"h-14 rounded-2xl bg-black/40 border border-white/10 px-5 text-sm font-black text-white",placeholder:"Nome"}),s.jsx("input",{value:c.whatsapp,onChange:N=>u({...c,whatsapp:N.target.value}),className:"h-14 rounded-2xl bg-black/40 border border-white/10 px-5 text-sm font-black text-white",placeholder:"WhatsApp"}),s.jsx("input",{value:c.cpf,onChange:N=>u({...c,cpf:N.target.value}),className:"h-14 rounded-2xl bg-black/40 border border-white/10 px-5 text-sm font-black text-white",placeholder:"CPF"}),s.jsx("input",{value:c.email||"",onChange:N=>u({...c,email:N.target.value}),className:"h-14 rounded-2xl bg-black/40 border border-white/10 px-5 text-sm font-black text-white",placeholder:"E-mail"}),s.jsx("input",{type:"date",value:c.birthDate,onChange:N=>u({...c,birthDate:N.target.value}),className:"h-14 rounded-2xl bg-black/40 border border-white/10 px-5 text-sm font-black text-white"}),s.jsx("input",{type:"date",value:c.expiryDate.toISOString().slice(0,10),onChange:N=>u({...c,expiryDate:new Date(`${N.target.value}T12:00:00`)}),className:"h-14 rounded-2xl bg-black/40 border border-white/10 px-5 text-sm font-black text-white"})]}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(ie,{variant:"outline",className:"h-14 rounded-2xl px-8",onClick:()=>u(null),children:"Cancelar"}),s.jsxs(ie,{variant:"primary",className:"h-14 rounded-2xl px-8 gap-2",onClick:()=>void v(),disabled:h,children:[s.jsx(uc,{className:"w-4 h-4"})," ",h?"Salvando...":"Salvar"]})]})]})]})]})}function j8(){const{settings:t,reload:n}=xt(),[r,l]=k.useState(t),[c,u]=k.useState(!1),[h,g]=k.useState(null);k.useEffect(()=>{l(t)},[t]);const p=async()=>{u(!0),g(null);try{await oM(r),await n(),g("Configurações salvas com sucesso.")}catch(m){g(m instanceof Error?m.message:"Não foi possível salvar.")}finally{u(!1)}};return s.jsxs("div",{className:"max-w-4xl mx-auto space-y-10 pb-24 lg:pb-0",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter leading-none",children:"Configurações"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Ajustes gerais da plataforma e do espaço"})]}),s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"p-8 sm:p-10 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-8",children:[s.jsxs("h3",{className:"text-xl font-sans font-black text-white uppercase tracking-tighter flex items-center gap-3",children:[s.jsx(Ry,{className:"w-6 h-6 text-brand-gold"})," Informações Básicas"]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Nome do Espaço"}),s.jsx("input",{type:"text",value:r.name,onChange:m=>l({...r,name:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Logo URL"}),s.jsx("input",{type:"text",value:r.logoUrl||"",onChange:m=>l({...r,logoUrl:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"WhatsApp Principal"}),s.jsx("input",{type:"text",value:r.whatsapp,onChange:m=>l({...r,whatsapp:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Instagram"}),s.jsx("input",{type:"text",value:r.instagram,onChange:m=>l({...r,instagram:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"E-mail"}),s.jsx("input",{type:"text",value:r.email||"",onChange:m=>l({...r,email:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Taxa de Serviço (%)"}),s.jsx("input",{type:"number",value:r.serviceTax,onChange:m=>l({...r,serviceTax:Number(m.target.value)}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all"})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2 flex items-center gap-2",children:[s.jsx(oc,{className:"w-4 h-4 text-brand-gold"})," Prévia da logo"]}),s.jsx("div",{className:"w-32 h-32 rounded-[28px] bg-white p-4 border border-white/10 overflow-hidden flex items-center justify-center",children:s.jsx(pt,{src:r.logoUrl,alt:"Logo atual",className:"w-full h-full object-contain"})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Endereço Completo"}),s.jsx("input",{type:"text",value:r.address,onChange:m=>l({...r,address:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all"})]})]}),s.jsxs("div",{className:"p-8 sm:p-10 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-8",children:[s.jsxs("h3",{className:"text-xl font-sans font-black text-white uppercase tracking-tighter flex items-center gap-3",children:[s.jsx(Ba,{className:"w-6 h-6 text-brand-gold"})," Pagamento & Links"]}),s.jsxs("div",{className:"grid grid-cols-1 gap-8",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Chave PIX"}),s.jsx("input",{type:"text",value:r.pixKey,onChange:m=>l({...r,pixKey:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Link Google Maps"}),s.jsx("input",{type:"text",value:r.googleMapsLink,onChange:m=>l({...r,googleMapsLink:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-[10px] font-bold text-gray-400 focus:border-brand-wine transition-all"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Link Waze"}),s.jsx("input",{type:"text",value:r.wazeLink,onChange:m=>l({...r,wazeLink:m.target.value}),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-[10px] font-bold text-gray-400 focus:border-brand-wine transition-all"})]})]})]})]}),s.jsxs("div",{className:"p-8 sm:p-10 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-8",children:[s.jsxs("h3",{className:"text-xl font-sans font-black text-white uppercase tracking-tighter flex items-center gap-3",children:[s.jsx(Va,{className:"w-6 h-6 text-brand-gold"})," Comunicação"]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Mensagem de Confirmação (E-mail)"}),s.jsx("textarea",{value:r.confirmationMessage,onChange:m=>l({...r,confirmationMessage:m.target.value}),className:"w-full h-32 bg-black/40 border border-white/5 rounded-3xl p-6 text-sm font-bold text-white focus:border-brand-wine transition-all outline-none resize-none"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2 text-brand-gold italic",children:"Template WhatsApp"}),s.jsx("textarea",{value:r.whatsappTemplate,onChange:m=>l({...r,whatsappTemplate:m.target.value}),className:"w-full h-40 bg-black/40 border border-brand-gold/10 rounded-3xl p-6 text-sm font-bold text-white focus:border-brand-gold transition-all outline-none resize-none"})]})]})]}),h&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-brand-gold",children:h}),s.jsx("div",{className:"flex justify-end pt-4",children:s.jsxs(ie,{variant:"primary",className:"w-full sm:w-auto h-18 rounded-[24px] px-12 text-xs font-black tracking-widest shadow-xl shadow-brand-wine/20 gap-3",onClick:()=>void p(),disabled:c,children:[s.jsx(uc,{className:"w-6 h-6"})," ",c?"SALVANDO...":"SALVAR TODAS AS CONFIGURAÇÕES"]})})]})]})}function k8(){const[t,n]=k.useState(""),[r,l]=k.useState("all"),[c,u]=k.useState(null),{giftClaims:h,reload:g}=xt(),p=h.filter(x=>{const b=`${x.firstName} ${x.lastName}`.toLowerCase().includes(t.toLowerCase())||x.whatsapp.includes(t)||(x.cpf||"").includes(t)||x.code.toLowerCase().includes(t.toLowerCase()),v=r==="all"||x.status===r;return b&&v}),m=async x=>{u(x);try{await wc(x),await g()}finally{u(null)}};return s.jsxs("div",{className:"space-y-8 pb-24 lg:pb-0",children:[s.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-6",children:s.jsxs("div",{children:[s.jsxs("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter",children:["Presentes / ",s.jsx("span",{className:"text-brand-gold",children:"Promoções"})]}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Lista simples de entrada. Marcou, entrou."})]})}),s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-4 bg-white/[0.02] p-4 rounded-[24px] border border-white/5 backdrop-blur-sm",children:[s.jsxs("div",{className:"relative flex-1 w-full",children:[s.jsx($n,{className:"absolute left-6 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-600"}),s.jsx("input",{type:"text",placeholder:"BUSCAR POR NOME, WHATSAPP, CPF OU CÓDIGO...",className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl pl-16 pr-8 text-xs font-black uppercase tracking-wider focus:border-brand-wine transition-all",value:t,onChange:x=>n(x.target.value)})]}),s.jsx("div",{className:"flex gap-4 w-full lg:w-auto",children:s.jsxs("select",{className:"h-14 bg-black/40 border border-white/5 rounded-2xl px-6 text-[10px] font-black uppercase tracking-widest text-white appearance-none cursor-pointer hover:border-white/20 transition-all",value:r,onChange:x=>l(x.target.value),children:[s.jsx("option",{value:"all",children:"TODOS STATUS"}),s.jsx("option",{value:"confirmed",children:"NA LISTA"}),s.jsx("option",{value:"used",children:"JÁ ENTROU"}),s.jsx("option",{value:"cancelled",children:"CANCELADO"})]})})]}),s.jsxs("div",{className:"bg-white/[0.02] rounded-[40px] border border-white/5 overflow-hidden",children:[s.jsx("div",{className:"hidden lg:block overflow-x-auto",children:s.jsxs("table",{className:"w-full border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-white/5",children:[s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Cliente"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"WhatsApp"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Data"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Código"}),s.jsx("th",{className:"px-8 py-6 text-left text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Status"}),s.jsx("th",{className:"px-8 py-6 text-right text-[10px] font-black uppercase text-gray-500 tracking-[0.2em]",children:"Ações"})]})}),s.jsx("tbody",{children:p.map(x=>s.jsxs("tr",{className:"border-b border-white/5 last:border-0 hover:bg-white/[0.02] transition-colors group",children:[s.jsx("td",{className:"px-8 py-6",children:s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-black text-white uppercase tracking-tight",children:[x.firstName," ",x.lastName]}),s.jsx("p",{className:"text-[10px] text-gray-600 font-bold tracking-widest",children:x.cpf||"Sem CPF"})]})}),s.jsx("td",{className:"px-8 py-6",children:s.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-black text-white",children:[s.jsx(Es,{className:"w-3.5 h-3.5"})," ",x.whatsapp]})}),s.jsx("td",{className:"px-8 py-6 text-xs text-gray-400 font-bold",children:Ht(x.claimDate,"dd/MM/yyyy HH:mm",{locale:Ca})}),s.jsx("td",{className:"px-8 py-6",children:s.jsx("span",{className:"font-mono text-[10px] font-black text-white bg-white/5 px-3 py-1 rounded-lg",children:x.code})}),s.jsx("td",{className:"px-8 py-6",children:s.jsx("span",{className:`px-2 py-1 rounded-lg text-[8px] font-black uppercase tracking-widest border ${x.status==="confirmed"?"bg-green-500/10 border-green-500/20 text-green-500":x.status==="used"?"bg-brand-gold/10 border-brand-gold/20 text-brand-gold":"bg-red-500/10 border-red-500/20 text-red-500"}`,children:x.status==="confirmed"?"Na lista":x.status==="used"?"Entrou":"Cancelado"})}),s.jsx("td",{className:"px-8 py-6 text-right",children:x.status==="confirmed"?s.jsxs(ie,{variant:"primary",size:"sm",className:"h-10 rounded-xl px-4 text-[8px] gap-2",onClick:()=>void m(x.id),disabled:c===x.id,children:[s.jsx(Dt,{className:"w-3 h-3"}),c===x.id?"MARCANDO...":"MARCAR ENTRADA"]}):s.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest text-gray-600",children:"Já marcado"})})]},x.id))})]})}),s.jsx("div",{className:"lg:hidden grid grid-cols-1 gap-4 p-4",children:p.map(x=>s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/5 border border-white/5 space-y-4 relative",children:[s.jsxs("div",{className:"flex justify-between items-start gap-4",children:[s.jsxs("div",{children:[s.jsxs("h4",{className:"text-sm font-black text-white uppercase",children:[x.firstName," ",x.lastName]}),s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:x.whatsapp}),s.jsx("p",{className:"text-[10px] text-gray-700 font-black uppercase tracking-widest mt-1",children:x.cpf||"Sem CPF"})]}),s.jsx("span",{className:`px-2 py-0.5 rounded-lg text-[8px] font-black uppercase tracking-widest ${x.status==="confirmed"?"text-green-500":x.status==="used"?"text-brand-gold":"text-red-500"}`,children:x.status==="confirmed"?"Na lista":x.status==="used"?"Entrou":"Cancelado"})]}),s.jsxs("div",{className:"border-t border-white/10 pt-4 space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[8px] text-gray-600 font-black uppercase mb-1",children:"Código"}),s.jsx("p",{className:"font-mono text-xs font-black text-white break-all",children:x.code})]}),x.status==="confirmed"&&s.jsxs(ie,{variant:"primary",size:"sm",className:"h-10 rounded-xl px-6 text-[8px] gap-2 w-full",onClick:()=>void m(x.id),disabled:c===x.id,children:[s.jsx(Dt,{className:"w-3 h-3"}),c===x.id?"MARCANDO...":"MARCAR ENTRADA"]})]})]},x.id))})]})]})}function S8(){const[t,n]=k.useState(""),[r,l]=k.useState(null),[c,u]=k.useState(!1),{reload:h,giftClaims:g}=xt(),p=k.useMemo(()=>{const b=g.length,v=g.filter(N=>N.status==="confirmed").length,w=g.filter(N=>N.status==="used").length,j=g.filter(N=>N.status==="cancelled").length;return{total:b,confirmed:v,used:w,cancelled:j}},[g]),m=async b=>{if(b==null||b.preventDefault(),!!t){u(!0),l(null);try{const v=await pw(t);l(v)}catch{l("not_found")}finally{u(!1)}}},x=async()=>{if(!(!r||r==="not_found")){u(!0);try{const b=await wc(r.id);l(b),await h()}finally{u(!1)}}};return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-8 pb-24 lg:pb-0",children:[s.jsxs("div",{className:"flex flex-col xl:flex-row xl:items-end justify-between gap-5",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-brand-gold/20 bg-brand-gold/10 px-4 py-2 text-[9px] font-black uppercase tracking-[0.25em] text-brand-gold mb-4",children:[s.jsx(Ci,{className:"w-4 h-4"})," Portaria de presentes"]}),s.jsxs("h2",{className:"text-4xl sm:text-5xl font-sans font-black text-white uppercase tracking-tighter leading-none",children:["Validar ",s.jsx("span",{className:"text-brand-gold",children:"Presente"})]}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest leading-relaxed max-w-2xl mt-3",children:"Busque por nome, CPF, WhatsApp ou código. Marque entrada e acompanhe a lista externa sem abrir o painel."})]}),s.jsxs(ie,{variant:"outline",className:"h-14 rounded-2xl border-white/10 gap-2 text-[10px] font-black tracking-widest uppercase px-6",onClick:()=>window.open("/lista-presentes","_blank"),children:[s.jsx(Si,{className:"w-4 h-4"})," Abrir lista externa"]})]}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[{label:"Na lista",value:p.total,icon:Di,color:"text-white"},{label:"Pendentes",value:p.confirmed,icon:Gr,color:"text-yellow-400"},{label:"Entraram",value:p.used,icon:Dt,color:"text-emerald-400"},{label:"Cancelados",value:p.cancelled,icon:o0,color:"text-red-400"}].map(b=>s.jsxs("div",{className:"rounded-[28px] border border-white/10 bg-white/[0.03] p-5",children:[s.jsx(b.icon,{className:`w-6 h-6 ${b.color} mb-5`}),s.jsx("p",{className:"text-[8px] text-gray-500 font-black uppercase tracking-widest",children:b.label}),s.jsx("p",{className:"text-3xl font-sans font-black text-white mt-1",children:b.value})]},b.label))}),s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[1fr_0.75fr] gap-6",children:[s.jsxs("div",{className:"p-6 sm:p-8 rounded-[42px] bg-white/[0.02] border border-white/10 wine-glow space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-wine/15 flex items-center justify-center",children:s.jsx($n,{className:"w-5 h-5 text-brand-gold"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-2xl font-sans font-black uppercase tracking-tighter text-white",children:"Busca rápida"}),s.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-500",children:"Nome, telefone, CPF ou código"})]})]}),s.jsxs("form",{onSubmit:m,className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx($n,{className:"absolute left-6 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-700"}),s.jsx("input",{type:"text",placeholder:"BUSCAR POR NOME, CPF, WHATSAPP OU CÓDIGO...",className:"w-full h-18 bg-black/40 border border-white/10 rounded-[26px] pl-16 pr-6 text-base sm:text-xs font-black uppercase tracking-widest text-brand-gold focus:border-brand-wine transition-all shadow-2xl outline-none",value:t,onChange:b=>n(b.target.value)})]}),s.jsxs(ie,{type:"submit",variant:"primary",className:"w-full h-16 rounded-[24px] gap-3 text-xs font-black shadow-xl",disabled:c||!t,children:[c?"BUSCANDO...":"BUSCAR PRESENTE"," ",s.jsx(Fn,{className:"w-5 h-5"})]})]})]}),s.jsxs("div",{className:"rounded-[42px] border border-white/10 bg-white/[0.025] p-7 space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-2xl bg-brand-gold/10 flex items-center justify-center",children:s.jsx(Oy,{className:"w-5 h-5 text-brand-gold"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-sans font-black uppercase tracking-tighter text-white",children:"Benefícios da lista"}),s.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-500",children:"Orientação para a portaria"})]})]}),s.jsx("div",{className:"space-y-3",children:[["Entrada pela lista","Confirmar o nome antes de marcar entrada."],["Drink/benefício","Liberar benefício conforme regra do evento."],["Acompanhamento externo","Use a lista externa para consulta rápida."]].map(([b,v])=>s.jsxs("div",{className:"rounded-2xl bg-black/35 border border-white/5 p-4 flex gap-3",children:[s.jsx(_y,{className:"w-4 h-4 text-brand-gold flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-white",children:b}),s.jsx("p",{className:"text-[10px] text-gray-500 font-bold mt-1 leading-relaxed",children:v})]})]},b))})]})]}),s.jsxs(ma,{mode:"wait",children:[r==="not_found"&&s.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0},className:"p-10 rounded-[42px] bg-red-500/5 border border-red-500/20 text-center space-y-5",children:[s.jsx("div",{className:"w-20 h-20 bg-red-500/10 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Ty,{className:"w-10 h-10 text-red-500"})}),s.jsx("h3",{className:"text-2xl font-black text-white uppercase tracking-tighter",children:"Presente não encontrado"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest",children:"Verifique se os dados digitados estão corretos"})]}),r&&r!=="not_found"&&s.jsxs(Te.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0},className:`p-8 sm:p-12 rounded-[48px] border relative overflow-hidden transition-all duration-500 ${r.status==="confirmed"?"bg-green-500/5 border-green-500/20":"bg-yellow-500/5 border-yellow-500/20"}`,children:[s.jsx("div",{className:"absolute top-0 right-0 p-12 opacity-5 pointer-events-none -mr-12 -mt-12",children:s.jsx(Ci,{className:"w-80 h-80"})}),s.jsxs("div",{className:"relative z-10 flex flex-col md:flex-row gap-8 items-center",children:[s.jsx("div",{className:`w-24 h-24 rounded-[34px] flex items-center justify-center border-4 ${r.status==="confirmed"?"border-green-500 bg-green-500/10":"border-yellow-500 bg-yellow-500/10"}`,children:r.status==="confirmed"?s.jsx(Dt,{className:"w-12 h-12 text-green-500"}):s.jsx(o0,{className:"w-12 h-12 text-yellow-500"})}),s.jsxs("div",{className:"flex-1 text-center md:text-left space-y-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:`inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-[10px] font-black uppercase tracking-widest mb-4 border ${r.status==="confirmed"?"bg-green-500/10 border-green-500/20 text-green-500":"bg-brand-gold/10 border-brand-gold/20 text-brand-gold"}`,children:r.status==="confirmed"?"Presente válido":"Já utilizado"}),s.jsxs("h3",{className:"text-4xl sm:text-5xl font-sans font-black text-white uppercase tracking-tighter leading-none mb-2",children:[r.firstName," ",s.jsx("span",{className:"text-brand-gold",children:r.lastName})]}),s.jsxs("div",{className:"flex flex-wrap justify-center md:justify-start gap-4 text-gray-500 text-[10px] font-black uppercase tracking-widest",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Es,{className:"w-3 h-3"})," ",r.whatsapp]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(qa,{className:"w-3 h-3"})," ",r.code]}),r.cpf&&s.jsx("span",{children:r.cpf})]})]}),r.status==="confirmed"?s.jsxs(ie,{variant:"primary",className:"w-full h-16 rounded-[28px] gap-3 text-xs font-black uppercase tracking-widest shadow-2xl shadow-green-500/20 bg-green-600 hover:bg-green-500",onClick:()=>void x(),disabled:c,children:["CONFIRMAR ENTRADA ",s.jsx(Fn,{className:"w-5 h-5"})]}):s.jsx("div",{className:"p-6 rounded-[26px] bg-yellow-500/10 border border-yellow-500/40 text-center",children:s.jsx("p",{className:"text-yellow-500 font-black uppercase tracking-widest text-xs",children:"Presente já utilizado anteriormente"})}),s.jsx(ie,{onClick:()=>{l(null),n("")},variant:"ghost",className:"w-full text-[10px] font-black uppercase tracking-[0.3em] opacity-40 mt-2",children:"BUSCAR OUTRO"})]})]})]})]})]})}function C8(){const{galleryImages:t,reload:n}=xt(),[r,l]=k.useState("instagram"),[c,u]=k.useState(""),[h,g]=k.useState(""),[p,m]=k.useState(!1),[x,b]=k.useState(null),v=k.useMemo(()=>t.filter(E=>E.type===r).sort((E,D)=>E.displayOrder-D.displayOrder),[r,t]),w=k.useMemo(()=>t.filter(E=>E.type==="upload").sort((E,D)=>E.displayOrder-D.displayOrder),[t]),j=async()=>{if(c.trim()){m(!0);try{await gM({id:x==null?void 0:x.id,url:c.trim(),type:(x==null?void 0:x.type)||r,title:h.trim()||void 0,displayOrder:(x==null?void 0:x.displayOrder)??v.length}),await n(),u(""),g(""),b(null)}finally{m(!1)}}},N=E=>{b(E),l(E.type),u(E.url),g(E.title||"")},A=async E=>{m(!0);try{await bM(E),await n()}finally{m(!1)}};return s.jsxs("div",{className:"space-y-8 pb-24 lg:pb-0",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter",children:["Galeria ",s.jsx("span",{className:"text-brand-gold",children:"Nossa Vibe"})]}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Gerencie Instagram e imagens próprias do site"})]}),s.jsxs("div",{className:"flex gap-4 p-1 bg-white/[0.02] rounded-2xl w-fit",children:[s.jsxs("button",{onClick:()=>l("instagram"),className:`flex items-center gap-2 px-6 py-3 rounded-xl text-[10px] font-black uppercase tracking-widest transition-all ${r==="instagram"?"bg-brand-wine text-white":"text-gray-500 hover:text-white"}`,children:[s.jsx(qo,{className:"w-4 h-4"})," Instagram"]}),s.jsxs("button",{onClick:()=>l("upload"),className:`flex items-center gap-2 px-6 py-3 rounded-xl text-[10px] font-black uppercase tracking-widest transition-all ${r==="upload"?"bg-brand-wine text-white":"text-gray-500 hover:text-white"}`,children:[s.jsx(xf,{className:"w-4 h-4"})," Próprias"]})]}),s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[1.1fr_0.9fr] gap-8",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"p-8 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-4",children:[s.jsx("h3",{className:"text-lg font-sans font-black text-white uppercase tracking-tighter",children:x?"Substituir imagem selecionada":r==="instagram"?"Adicionar imagem do Instagram":"Adicionar imagem própria"}),s.jsx("input",{type:"text",value:h,onChange:E=>g(E.target.value),placeholder:"Título opcional",className:"w-full h-14 rounded-2xl bg-black/40 border border-white/10 px-5 text-[10px] font-black tracking-widest text-white"}),s.jsx("input",{type:"text",value:c,onChange:E=>u(E.target.value),placeholder:"https://...",className:"w-full h-16 rounded-2xl bg-black/40 border border-white/10 px-5 text-[10px] font-black tracking-widest text-white"}),s.jsxs(ie,{onClick:()=>void j(),disabled:!c||p,className:"w-full h-14 rounded-2xl text-[10px] font-black tracking-widest gap-2",children:[s.jsx(dc,{className:"w-4 h-4"})," ",p?"SALVANDO...":x?"SUBSTITUIR IMAGEM":"ADICIONAR IMAGEM"]})]}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:s.jsx(ma,{children:v.map(E=>s.jsxs(Te.div,{layout:!0,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"relative rounded-[28px] overflow-hidden bg-white/[0.02] border border-white/5 aspect-square group",children:[s.jsx(pt,{src:E.url,alt:E.title||"Gallery",className:"w-full h-full object-cover"}),s.jsxs("div",{className:"absolute inset-x-2 bottom-2 bg-black/80 rounded-[22px] opacity-100 transition-opacity flex items-center justify-center p-2 backdrop-blur-md",children:[s.jsx("button",{onClick:()=>void A(E.id),className:"w-10 h-10 rounded-full bg-red-500/20 border border-red-500/40 flex items-center justify-center hover:bg-red-500 hover:text-white transition-all",children:s.jsx(As,{className:"w-5 h-5"})}),s.jsx("button",{onClick:()=>N(E),className:"ml-2 px-3 h-10 rounded-full bg-brand-gold/20 border border-brand-gold/40 text-[8px] font-black uppercase tracking-widest text-brand-gold hover:bg-brand-gold hover:text-black transition-all",children:"Substituir"})]}),s.jsx("div",{className:"absolute top-2 left-2 px-2 py-1 rounded-lg bg-black/60 text-[8px] font-black uppercase text-white",children:E.type==="instagram"?"IG":"Manual"})]},E.id))})})]}),s.jsxs("div",{className:"p-8 rounded-[40px] bg-white/[0.02] border border-white/5",children:[s.jsx("h3",{className:"text-lg font-sans font-black text-white uppercase tracking-tighter mb-6",children:"Pré-visualização no Site"}),w.length?s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 xl:grid-cols-3 gap-3",children:w.slice(0,5).map((E,D)=>s.jsx("div",{className:`overflow-hidden group rounded-[24px] ${D===0?"md:col-span-2 md:row-span-2 aspect-video md:aspect-auto":"aspect-square"}`,children:s.jsx(pt,{src:E.url,alt:E.title||"Gallery Preview",className:"w-full h-full object-cover grayscale hover:grayscale-0 transition-all duration-700 group-hover:scale-110"})},E.id))}):s.jsxs("div",{className:"h-64 rounded-[32px] border border-dashed border-white/10 flex flex-col items-center justify-center gap-3 text-gray-500",children:[s.jsx(oc,{className:"w-10 h-10"}),s.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest",children:"Nenhuma imagem própria cadastrada"})]})]})]})]})}const Jb=t=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(t||0),ey={name:"",code:"",instagram:"",whatsapp:"",landingUrl:"",notes:"",isActive:!0};function E8(){const[t,n]=k.useState([]),[r,l]=k.useState(ey),[c,u]=k.useState(!0),[h,g]=k.useState(!1),[p,m]=k.useState(null),x=async()=>{u(!0);try{n(await CM())}catch(C){m(C instanceof Error?C.message:"Não foi possível carregar os promotores.")}finally{u(!1)}};k.useEffect(()=>{x()},[]);const b=k.useMemo(()=>t.reduce((C,O)=>C+O.clicks,0),[t]),v=k.useMemo(()=>t.reduce((C,O)=>C+O.paidOrders,0),[t]),w=k.useMemo(()=>t.reduce((C,O)=>C+O.totalRevenue,0),[t]),j=()=>l(ey),N=C=>{l({id:C.id,name:C.name,code:C.code,instagram:C.instagram||"",whatsapp:C.whatsapp||"",landingUrl:C.landingUrl||"",notes:C.notes||"",isActive:C.isActive}),window.scrollTo({top:0,behavior:"smooth"})},A=async()=>{var C;if(!((C=r.name)!=null&&C.trim())){m("Informe o nome do promotor.");return}g(!0),m(null);try{const O=await EM(r);n(Q=>Q.some(I=>I.id===O.id)?Q.map(I=>I.id===O.id?O:I):[O,...Q]),j(),m("Promotor salvo com sucesso.")}catch(O){m(O instanceof Error?O.message:"Não foi possível salvar o promotor.")}finally{g(!1)}},E=async C=>{if(window.confirm(`Excluir o promotor ${C.name}?`))try{await AM(C.id),n(O=>O.filter(Q=>Q.id!==C.id)),r.id===C.id&&j()}catch(O){m(O instanceof Error?O.message:"Não foi possível excluir o promotor.")}},D=async C=>{try{await navigator.clipboard.writeText(C),m("Link copiado.")}catch{m("Não foi possível copiar o link.")}};return s.jsxs("div",{className:"max-w-7xl mx-auto space-y-10 pb-24 lg:pb-0",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter leading-none",children:"Promotores"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Links de divulgação, rastreamento e vendas por influencer"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"rounded-[32px] bg-white/[0.02] border border-white/5 p-6",children:[s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:"Promotores ativos"}),s.jsx("h3",{className:"text-4xl font-sans font-black text-white mt-4",children:t.filter(C=>C.isActive).length})]}),s.jsxs("div",{className:"rounded-[32px] bg-white/[0.02] border border-white/5 p-6",children:[s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:"Cliques rastreados"}),s.jsx("h3",{className:"text-4xl font-sans font-black text-white mt-4",children:b})]}),s.jsxs("div",{className:"rounded-[32px] bg-white/[0.02] border border-white/5 p-6",children:[s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:"Receita atribuída"}),s.jsx("h3",{className:"text-4xl font-sans font-black text-white mt-4",children:Jb(w)}),s.jsxs("p",{className:"text-[10px] text-brand-gold font-black uppercase tracking-widest mt-2",children:[v," pedidos pagos"]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[420px,1fr] gap-8",children:[s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("h3",{className:"text-2xl font-sans font-black text-white uppercase tracking-tighter flex items-center gap-3",children:[s.jsx(zy,{className:"w-6 h-6 text-brand-gold"})," ",r.id?"Editar promotor":"Novo promotor"]}),r.id&&s.jsx("button",{onClick:j,className:"text-[10px] uppercase tracking-widest font-black text-gray-500 hover:text-white",children:"Limpar"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Nome"}),s.jsx("input",{value:r.name,onChange:C=>l(O=>({...O,name:C.target.value})),className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl px-5 text-sm font-black text-white outline-none focus:border-brand-wine",placeholder:"Ex.: João do Galpão Imperial"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-1 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Código"}),s.jsx("input",{value:r.code,onChange:C=>l(O=>({...O,code:C.target.value})),className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl px-5 text-sm font-black text-white outline-none focus:border-brand-wine",placeholder:"joao123"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"WhatsApp"}),s.jsx("input",{value:r.whatsapp,onChange:C=>l(O=>({...O,whatsapp:C.target.value})),className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl px-5 text-sm font-black text-white outline-none focus:border-brand-wine",placeholder:"85999999999"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Instagram"}),s.jsx("input",{value:r.instagram,onChange:C=>l(O=>({...O,instagram:C.target.value})),className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl px-5 text-sm font-black text-white outline-none focus:border-brand-wine",placeholder:"@perfil"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Landing page do link"}),s.jsx("input",{value:r.landingUrl,onChange:C=>l(O=>({...O,landingUrl:C.target.value})),className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl px-5 text-sm font-black text-white outline-none focus:border-brand-wine",placeholder:"https://seudominio.com/"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Observações"}),s.jsx("textarea",{value:r.notes,onChange:C=>l(O=>({...O,notes:C.target.value})),className:"w-full min-h-[120px] bg-black/40 border border-white/5 rounded-2xl px-5 py-4 text-sm font-bold text-white outline-none focus:border-brand-wine",placeholder:"Detalhes do acordo, nicho, observações..."})]}),s.jsxs("label",{className:"flex items-center gap-3 text-sm font-bold text-white",children:[s.jsx("input",{type:"checkbox",checked:r.isActive,onChange:C=>l(O=>({...O,isActive:C.target.checked})),className:"w-4 h-4 rounded border-white/10 bg-black/30"}),"Promotor ativo"]}),p&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-brand-gold",children:p}),s.jsxs(ie,{variant:"primary",className:"w-full h-16 rounded-[24px] text-xs gap-3",onClick:()=>void A(),disabled:h,children:[r.id?s.jsx(Zr,{className:"w-5 h-5"}):s.jsx(dc,{className:"w-5 h-5"}),h?"SALVANDO...":r.id?"ATUALIZAR PROMOTOR":"CRIAR PROMOTOR"]})]}),s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("h3",{className:"text-2xl font-sans font-black text-white uppercase tracking-tighter",children:"Lista de promotores"}),s.jsx("button",{onClick:()=>void x(),className:"text-[10px] font-black uppercase tracking-widest text-gray-500 hover:text-white",children:"Atualizar"})]}),c?s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"h-24 rounded-[28px] bg-black/25 animate-pulse"}),s.jsx("div",{className:"h-24 rounded-[28px] bg-black/25 animate-pulse"})]}):t.length?s.jsx("div",{className:"space-y-5",children:t.map(C=>s.jsxs("div",{className:"rounded-[30px] border border-white/5 bg-black/20 p-6 space-y-5",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-start lg:justify-between gap-5",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[s.jsx("h4",{className:"text-2xl font-sans font-black text-white tracking-tight",children:C.name}),s.jsx("span",{className:`px-3 py-1 rounded-full text-[10px] font-black uppercase tracking-widest ${C.isActive?"bg-emerald-500/10 text-emerald-400":"bg-white/5 text-gray-500"}`,children:C.isActive?"Ativo":"Inativo"})]}),s.jsxs("p",{className:"text-[11px] uppercase tracking-wider font-bold text-gray-500 mt-2",children:["Código: ",C.code]}),C.instagram&&s.jsx("p",{className:"text-sm text-gray-300 mt-2",children:C.instagram})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:()=>N(C),className:"h-12 px-5 rounded-2xl border border-white/10 text-[10px] uppercase tracking-widest font-black text-white hover:bg-white/5",children:"Editar"}),s.jsx("button",{onClick:()=>void E(C),className:"w-12 h-12 rounded-2xl border border-red-500/20 text-red-400 flex items-center justify-center hover:bg-red-500/10",children:s.jsx(As,{className:"w-4 h-4"})})]})]}),s.jsxs("div",{className:"grid grid-cols-2 xl:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-white/[0.02] p-4",children:[s.jsx("p",{className:"text-[10px] uppercase tracking-widest font-black text-gray-500",children:"Cliques"}),s.jsx("p",{className:"text-2xl font-sans font-black text-white mt-3",children:C.clicks})]}),s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-white/[0.02] p-4",children:[s.jsx("p",{className:"text-[10px] uppercase tracking-widest font-black text-gray-500",children:"Pedidos"}),s.jsx("p",{className:"text-2xl font-sans font-black text-white mt-3",children:C.totalOrders})]}),s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-white/[0.02] p-4",children:[s.jsx("p",{className:"text-[10px] uppercase tracking-widest font-black text-gray-500",children:"Pagos"}),s.jsx("p",{className:"text-2xl font-sans font-black text-white mt-3",children:C.paidOrders})]}),s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-white/[0.02] p-4",children:[s.jsx("p",{className:"text-[10px] uppercase tracking-widest font-black text-gray-500",children:"Receita"}),s.jsx("p",{className:"text-2xl font-sans font-black text-white mt-3",children:Jb(C.totalRevenue)})]})]}),s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-black/30 p-4 sm:p-5",children:[s.jsxs("div",{className:"flex items-center gap-3 text-brand-gold text-[10px] font-black uppercase tracking-widest mb-3",children:[s.jsx(_5,{className:"w-4 h-4"})," Link do promotor"]}),s.jsxs("div",{className:"flex flex-col xl:flex-row gap-3",children:[s.jsx("input",{readOnly:!0,value:C.generatedLink,className:"flex-1 h-14 bg-black/40 border border-white/5 rounded-2xl px-5 text-sm font-bold text-gray-200 outline-none"}),s.jsxs("button",{onClick:()=>void D(C.generatedLink),className:"h-14 px-5 rounded-2xl bg-brand-wine text-white text-[10px] font-black uppercase tracking-widest flex items-center justify-center gap-2",children:[s.jsx(sh,{className:"w-4 h-4"})," Copiar"]})]})]})]},C.id))}):s.jsx("div",{className:"rounded-[28px] border border-dashed border-white/10 p-8 text-center text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Nenhum promotor cadastrado."})]})]})]})}const A8=["CPF","CNPJ","EMAIL","PHONE","EVP"];function T8(){const{settings:t,reload:n}=xt(),r=k.useMemo(()=>({...t,organizerRecipientName:t.organizerRecipientName||"",organizerPixKeyType:t.organizerPixKeyType||"CPF",organizerPixKey:t.organizerPixKey||""}),[t]),[l,c]=k.useState(r),[u,h]=k.useState(!0),[g,p]=k.useState(!1),[m,x]=k.useState(null);k.useEffect(()=>{c(r)},[r]),k.useEffect(()=>{(async()=>{h(!0);try{const w=await NM();c(j=>({...j,...w}))}catch(w){x(w instanceof Error?w.message:"Não foi possível carregar os dados de pagamento.")}finally{h(!1)}})()},[]);const b=async()=>{p(!0),x(null);try{await jM(l),await n(),x("Dados de recebimento salvos com sucesso.")}catch(v){x(v instanceof Error?v.message:"Não foi possível salvar os dados de pagamento.")}finally{p(!1)}};return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-10 pb-24 lg:pb-0",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter leading-none",children:"Pagamento"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Conta de recebimento do estabelecimento"})]}),s.jsxs("div",{className:"p-8 sm:p-12 rounded-[40px] bg-white/[0.02] border border-white/5 space-y-8",children:[s.jsxs("h3",{className:"text-2xl font-sans font-black text-white uppercase tracking-tighter flex items-center gap-3",children:[s.jsx(fn,{className:"w-6 h-6 text-brand-gold"})," Pix do estabelecimento"]}),u?s.jsx("div",{className:"h-48 rounded-[32px] bg-black/30 border border-white/5 animate-pulse"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Nome do recebedor"}),s.jsx("input",{type:"text",value:l.organizerRecipientName||"",onChange:v=>c(w=>({...w,organizerRecipientName:v.target.value})),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"Ex.: João Silva"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Tipo da chave"}),s.jsx("select",{value:l.organizerPixKeyType||"CPF",onChange:v=>c(w=>({...w,organizerPixKeyType:v.target.value})),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",children:A8.map(v=>s.jsx("option",{value:v,className:"bg-[#0b0b0b]",children:v},v))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Chave Pix do estabelecimento"}),s.jsx("input",{type:"text",value:l.organizerPixKey||"",onChange:v=>c(w=>({...w,organizerPixKey:v.target.value})),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"CPF, CNPJ, e-mail, telefone ou EVP"})]}),s.jsx("div",{className:"rounded-[28px] border border-white/5 bg-black/20 p-6 text-[11px] font-bold uppercase tracking-wider text-gray-400 leading-relaxed",children:"Esses dados serão usados para receber o saldo líquido das vendas e processar as solicitações de saque do organizador."}),m&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-brand-gold",children:m}),s.jsx("div",{className:"flex justify-end pt-2",children:s.jsxs(ie,{variant:"primary",className:"w-full sm:w-auto h-16 rounded-[24px] px-12 text-xs gap-3",onClick:()=>void b(),disabled:g,children:[s.jsx(uc,{className:"w-5 h-5"})," ",g?"SALVANDO...":"SALVAR PAGAMENTO"]})})]})]})]})}const Ff=t=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(t||0),M8=t=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"medium"}).format(t);function R8({transaction:t}){const n=t.direction==="credit";return s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-black/25 px-6 py-5 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-white font-black text-lg tracking-tight",children:t.description}),s.jsx("p",{className:"text-[11px] text-gray-500 font-bold uppercase tracking-wider mt-1",children:M8(t.createdAt)})]}),s.jsxs("div",{className:`text-xl font-black whitespace-nowrap ${n?"text-emerald-400":"text-red-400"}`,children:[n?"+":"-"," ",Ff(t.amount)]})]})}function D8(){const[t,n]=k.useState(null),[r,l]=k.useState(""),[c,u]=k.useState(!0),[h,g]=k.useState(!1),[p,m]=k.useState(null),x=async()=>{u(!0);try{const j=await kM();n(j)}catch(j){m(j instanceof Error?j.message:"Não foi possível carregar a carteira.")}finally{u(!1)}};k.useEffect(()=>{x()},[]);const b=t==null?void 0:t.organizer,v=k.useMemo(()=>(b==null?void 0:b.transactions)||[],[b]),w=async()=>{const j=Number(String(r).replace(",","."));if(!j||j<=0){m("Informe um valor de saque válido.");return}g(!0),m(null);try{const N=await SM(j);n(N.wallet),l(""),m("Solicitação de saque enviada com sucesso.")}catch(N){m(N instanceof Error?N.message:"Não foi possível solicitar o saque.")}finally{g(!1)}};return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-10 pb-24 lg:pb-0",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-4xl font-sans font-black text-white uppercase tracking-tighter leading-none",children:"Carteira"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest mt-1",children:"Saldo do estabelecimento, extrato e saques"})]}),c?s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[s.jsx("div",{className:"h-56 rounded-[40px] bg-white/[0.02] border border-white/5 animate-pulse"}),s.jsx("div",{className:"h-56 rounded-[40px] bg-white/[0.02] border border-white/5 animate-pulse"}),s.jsx("div",{className:"h-72 rounded-[40px] bg-white/[0.02] border border-white/5 animate-pulse"}),s.jsx("div",{className:"h-72 rounded-[40px] bg-white/[0.02] border border-white/5 animate-pulse"})]}):s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-6",children:[s.jsx("div",{className:"w-16 h-16 rounded-3xl bg-emerald-500/10 flex items-center justify-center",children:s.jsx(oh,{className:"w-7 h-7 text-emerald-400"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:"Saldo disponível"}),s.jsx("h3",{className:"text-5xl font-sans font-black text-white tracking-tighter mt-4",children:Ff((b==null?void 0:b.balance)||0)})]}),s.jsxs("p",{className:"text-[11px] text-gray-500 font-bold uppercase tracking-wider",children:["Repasse automático a cada ",Ff((b==null?void 0:b.autoWithdrawThreshold)||0)]})]}),s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-6",children:[s.jsx("div",{className:"w-16 h-16 rounded-3xl bg-brand-gold/10 flex items-center justify-center",children:s.jsx(Dy,{className:"w-7 h-7 text-brand-gold"})}),s.jsxs("div",{className:"space-y-4 text-sm font-black uppercase tracking-wider",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-gray-500 mb-2",children:"Conta de recebimento"}),s.jsx("p",{className:"text-white text-2xl break-all",children:(b==null?void 0:b.pixKey)||"Não configurada"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-gray-500 mb-2",children:"Recebedor"}),s.jsx("p",{className:"text-white",children:(b==null?void 0:b.recipientName)||"Não informado"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-gray-500 mb-2",children:"Tipo da chave"}),s.jsx("p",{className:"text-white",children:(b==null?void 0:b.pixKeyType)||"CPF"})]})]})]}),s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-8",children:[s.jsxs("h3",{className:"text-2xl font-sans font-black text-white uppercase tracking-tighter flex items-center gap-3",children:[s.jsx(nh,{className:"w-6 h-6 text-brand-gold"})," Solicitar saque"]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Valor do saque"}),s.jsx("input",{type:"number",min:"0",step:"0.01",value:r,onChange:j=>l(j.target.value),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"0,00"})]}),s.jsx(ie,{variant:"primary",className:"w-full h-16 rounded-[24px] text-xs",onClick:()=>void w(),disabled:h,children:h?"SOLICITANDO...":"SOLICITAR SAQUE"}),p&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-brand-gold",children:p})]}),s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("h3",{className:"text-2xl font-sans font-black text-white uppercase tracking-tighter",children:"Extrato"}),s.jsx("button",{onClick:()=>void x(),className:"text-[10px] font-black uppercase tracking-widest text-gray-500 hover:text-white transition-colors",children:"Atualizar"})]}),s.jsxs("div",{className:"space-y-4 max-h-[420px] overflow-y-auto pr-1",children:[!v.length&&s.jsx("div",{className:"rounded-[24px] border border-dashed border-white/10 p-8 text-center text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Nenhuma movimentação encontrada."}),v.map(j=>s.jsx("div",{children:s.jsx(R8,{transaction:j})},j.id))]})]})]})]})}const vw=k.createContext(null);function O8({children:t}){const[n,r]=k.useState(!1),[l,c]=k.useState(!0);k.useEffect(()=>{let g=!0;return(async()=>{c(!0);const m=await sM(),x=typeof window<"u"&&window.sessionStorage.getItem("galpao_imperial_admin_unlocked")==="1";g&&(r(m&&x),c(!1))})(),()=>{g=!1}},[]);const u=async(g,p)=>{await aM(g,p),typeof window<"u"&&window.sessionStorage.setItem("galpao_imperial_admin_unlocked","1"),r(!0)},h=async()=>{await nM(),typeof window<"u"&&window.sessionStorage.removeItem("galpao_imperial_admin_unlocked"),r(!1)};return s.jsx(vw.Provider,{value:{isAuthenticated:n,isLoading:l,login:u,logout:h},children:t})}function Hh(){const t=k.useContext(vw);if(!t)throw new Error("useAdminAuth must be used within AdminAuthProvider");return t}function _8({onBack:t}){const{logout:n}=Hh(),[r,l]=k.useState("dashboard"),[c,u]=k.useState(!1),[h,g]=k.useState(null);k.useEffect(()=>{u(!1),window.scrollTo({top:0,behavior:"smooth"})},[r]);const p=async()=>{await n(),t()},m=()=>{switch(r){case"dashboard":return s.jsx(Xb,{});case"events":return s.jsx(b8,{onNewEvent:()=>{g(null),l("new-event")},onEditEvent:x=>{g(x),l("new-event")}});case"new-event":return s.jsx(y8,{eventId:h,onCancel:()=>l("events")});case"sales":return s.jsx(v8,{});case"validate-ticket":return s.jsx(Wb,{mode:"ticket"});case"reports":return s.jsx(w8,{});case"partners":return s.jsx(N8,{});case"validate-partner":return s.jsx(Wb,{mode:"partner"});case"gifts":return s.jsx(k8,{});case"validate-gift":return s.jsx(S8,{});case"gallery":return s.jsx(C8,{});case"promoters":return s.jsx(E8,{});case"payment":return s.jsx(T8,{});case"wallet":return s.jsx(D8,{});case"settings":return s.jsx(j8,{});default:return s.jsx(Xb,{})}};return s.jsxs("div",{className:"min-h-screen bg-bg-black text-white flex flex-col lg:flex-row relative font-sans tabular-nums",children:[s.jsx(_M,{activeTab:r,onTabChange:l,onBack:t}),s.jsxs("main",{className:"flex-1 min-h-screen relative lg:ml-0",children:[s.jsxs("header",{className:"lg:hidden fixed top-0 left-0 right-0 z-[70] bg-bg-black/95 backdrop-blur-xl border-b border-white/10 h-16 px-5 flex items-center justify-between shadow-[0_10px_30px_rgba(0,0,0,0.45)]",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 imperial-logo-frame rounded-full flex items-center justify-center text-brand-gold font-sans font-black text-xs",children:"GI"}),s.jsx("span",{className:"font-sans font-black uppercase text-sm tracking-widest text-brand-gold",children:"Admin"})]}),s.jsx("button",{onClick:()=>void p(),className:"w-10 h-10 rounded-xl bg-white/5 flex items-center justify-center border border-white/10",children:s.jsx(Ho,{className:"w-4 h-4 text-red-500"})})]}),s.jsx("div",{className:"px-4 pt-24 pb-28 sm:px-8 lg:p-16 lg:pb-16",children:s.jsx(ma,{mode:"wait",children:s.jsx(Te.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},children:m()},r)})})]}),s.jsx(zM,{activeTab:r,onTabChange:l,onMenuOpen:()=>u(!0)}),s.jsx(ma,{children:c&&s.jsxs(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] bg-black h-screen p-8 overflow-y-auto",children:[s.jsxs("div",{className:"flex items-center justify-between mb-12",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 imperial-logo-frame rounded-full flex items-center justify-center text-brand-gold font-sans font-black",children:"GI"}),s.jsxs("h1",{className:"text-xl font-sans font-black text-white uppercase tracking-tighter",children:["Menu ",s.jsx("span",{className:"text-brand-gold",children:"Admin"})]})]}),s.jsx("button",{onClick:()=>u(!1),className:"w-12 h-12 rounded-2xl bg-white/5 flex items-center justify-center",children:s.jsx(Ha,{className:"w-6 h-6"})})]}),s.jsx("div",{className:"grid grid-cols-2 gap-4",children:bw.map(x=>s.jsxs("button",{onClick:()=>l(x.id),className:`flex flex-col items-center justify-center gap-4 aspect-square rounded-[32px] border transition-all ${r===x.id?"bg-brand-gold border-brand-gold text-black shadow-2xl shadow-brand-gold/20 scale-[1.02]":"bg-white/[0.02] border-white/5 text-gray-500"}`,children:[s.jsx(x.icon,{className:`w-8 h-8 ${r===x.id?"text-white":"text-gray-700"}`}),s.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest text-center",children:x.label})]},x.id))}),s.jsx("div",{className:"mt-12 pt-8 border-t border-white/5",children:s.jsxs("button",{onClick:()=>void p(),className:"w-full h-16 rounded-2xl bg-red-500/10 text-red-500 text-[10px] font-black uppercase tracking-widest flex items-center justify-center gap-3",children:[s.jsx(Ho,{className:"w-5 h-5"})," Sair do Painel"]})})]})})]})}function z8({activities:t}){return s.jsx("section",{className:"py-32 bg-white/[0.02] border-y border-white/5 noise",id:"lazer",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-8",children:[s.jsxs("div",{className:"text-center mb-20",children:[s.jsx("span",{className:"text-brand-gold text-[10px] font-black uppercase tracking-[0.4em] mb-4 block",children:"Fim de Semana & Lazer"}),s.jsxs("h2",{className:"text-4xl md:text-6xl font-display font-black text-white uppercase tracking-tighter",children:["Agenda de ",s.jsx("span",{className:"text-gradient",children:"Lazer"})]}),s.jsxs("p",{className:"text-gray-500 text-xs font-bold uppercase tracking-widest max-w-xl mx-auto mt-6 leading-relaxed",children:["Piscina, churrasco e diversão para toda a família. ",s.jsx("br",{className:"hidden sm:block"})," Confira os dias liberados para parceiros e visitantes."]})]}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10",children:t.map((n,r)=>s.jsxs(Te.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:r*.1},viewport:{once:!0},className:"group bg-black/40 border border-white/5 rounded-[48px] overflow-hidden hover:border-brand-wine/30 transition-all duration-500 flex flex-col sm:flex-row h-full",children:[s.jsxs("div",{className:"w-full sm:w-[40%] aspect-[4/5] sm:aspect-auto relative overflow-hidden",children:[s.jsx("img",{src:n.imageUrl,alt:n.title,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-[2000ms]"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-transparent to-transparent opacity-60"}),s.jsx("div",{className:"absolute top-6 left-6",children:s.jsx("div",{className:"px-4 py-2 rounded-2xl bg-brand-gold text-black text-[9px] font-black uppercase tracking-widest shadow-xl",children:Ht(n.date,"dd MMM",{locale:Ca})})})]}),s.jsxs("div",{className:"flex-1 p-8 sm:p-10 flex flex-col justify-between",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6 text-brand-wine-light text-[9px] font-black uppercase tracking-[0.3em]",children:[s.jsx(Gr,{className:"w-3 h-3"}),n.time]}),s.jsx("h3",{className:"text-2xl font-display font-black text-white uppercase tracking-tighter mb-4 leading-tight group-hover:text-brand-gold transition-colors",children:n.title}),s.jsx("p",{className:"text-gray-500 text-[11px] font-bold uppercase leading-relaxed tracking-wide mb-8",children:n.description}),s.jsx("div",{className:"space-y-3 mb-10",children:s.jsxs("div",{className:"flex items-center gap-3 py-3 px-4 rounded-2xl bg-white/5 border border-white/5",children:[s.jsx("div",{className:"w-8 h-8 rounded-xl bg-brand-wine/10 flex items-center justify-center",children:s.jsx(Di,{className:"w-4 h-4 text-brand-gold"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-white text-[10px] font-black uppercase tracking-widest leading-none mb-1",children:n.acceptsPartner?"Parceiros Liberados":"Evento Fechado"}),s.jsx("p",{className:"text-gray-500 text-[8px] font-bold uppercase tracking-widest",children:n.acceptsPartner?"Entrada pela carteira ativa":"Exige ingresso"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[s.jsxs(ie,{variant:"primary",className:"w-full py-4 rounded-2xl text-[9px] gap-2 shadow-lg",onClick:()=>window.open("https://wa.me/5527997532187","_blank"),children:["CONSULTAR ",s.jsx(Va,{className:"w-3.5 h-3.5"})]}),n.guestPrice&&s.jsxs("div",{className:"text-center sm:text-left",children:[s.jsx("p",{className:"text-gray-600 text-[8px] uppercase font-black tracking-widest",children:"Visitantes"}),s.jsxs("p",{className:"text-white font-black text-lg",children:["R$ ",n.guestPrice.toFixed(0),",00"]})]})]})]})]},n.id))}),s.jsxs("div",{className:"mt-20 p-10 lg:p-16 rounded-[60px] bg-white/[0.01] border border-white/5 relative overflow-hidden group",children:[s.jsx("div",{className:"absolute top-0 right-0 p-10 opacity-[0.02] group-hover:opacity-10 transition-opacity",children:s.jsx(Ry,{className:"w-64 h-64"})}),s.jsxs("div",{className:"flex flex-col lg:flex-row gap-12 lg:items-center relative z-10",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("h4",{className:"text-brand-gold font-display font-black text-3xl uppercase tracking-tighter mb-6",children:["Regras do ",s.jsx("br",{})," Clube Parceiro"]}),s.jsx("div",{className:"h-1 w-20 bg-brand-wine rounded-full mb-8"})]}),s.jsx("div",{className:"lg:flex-[2] grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-6",children:["Entrada liberada nos dias autorizados pela administração.","Em shows/eventos fechados, ingresso à parte pode ser necessário.","Atividades (piscina/churrasco) dependem da agenda do dia.","A carteirinha é estritamente pessoal e intransferível.","Mensalidade válida por 30 dias após confirmação.","A validação é feita por QR Code ou nome na portaria."].map((n,r)=>s.jsxs("div",{className:"flex gap-4 items-start",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-brand-gold mt-1.5 shrink-0 shadow-[0_0_8px_rgba(200,162,74,0.8)]"}),s.jsx("p",{className:"text-[10px] text-gray-500 font-bold uppercase leading-relaxed tracking-widest",children:n})]},r))})]})]})]})})}function P8({onJoin:t,onBack:n}){const{membershipPlans:r,leisureActivities:l,settings:c}=xt(),u=r[0];return u?s.jsxs("div",{className:"min-h-screen bg-bg-black text-white noise",children:[s.jsxs("section",{className:"relative pt-32 pb-20 overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-brand-wine/10 via-transparent to-transparent"}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-8 relative z-10 text-center",children:s.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-6",children:[s.jsx("span",{className:"text-brand-gold text-[10px] font-black uppercase tracking-[0.5em] block",children:"Benefícios Exclusivos"}),s.jsxs("h1",{className:"text-5xl md:text-8xl font-display font-black uppercase tracking-tighter leading-[0.8]",children:["Clube de ",s.jsx("br",{})," ",s.jsx("span",{className:"text-gradient",children:"Parceiros"})," Galpão Imperial"]}),s.jsx("p",{className:"text-gray-400 text-sm md:text-base font-bold uppercase leading-loose tracking-[0.2em] max-w-2xl mx-auto py-6",children:"“Com sua carteirinha mensal, você aproveita os dias de lazer no Galpão Imperial com piscina, churrasco, futebol de sabão e programação especial.”"}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[s.jsx(ie,{variant:"primary",size:"lg",className:"w-full sm:w-auto rounded-2xl px-12 py-6 text-xs shadow-2xl",onClick:t,children:"FAZER MINHA CARTEIRINHA"}),s.jsxs(ie,{variant:"outline",size:"lg",className:"w-full sm:w-auto rounded-2xl px-12 py-6 text-xs border-white/10 text-white",onClick:()=>window.open(`https://wa.me/55${c.whatsapp.replace(/\D/g,"")}`,"_blank"),children:["FALAR NO WHATSAPP ",s.jsx(Va,{className:"ml-2 w-4 h-4"})]})]})]})})]}),s.jsx("section",{className:"py-20 bg-white/[0.02] border-y border-white/5",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-8",children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-16 items-center",children:[s.jsxs("div",{className:"flex-1 space-y-8",children:[s.jsxs("h2",{className:"text-4xl font-display font-black uppercase tracking-tighter",children:["O Plano Perfeito ",s.jsx("br",{})," para sua ",s.jsx("span",{className:"text-brand-gold",children:"Família"})]}),s.jsx("p",{className:"text-gray-500 text-xs font-bold uppercase tracking-widest leading-relaxed",children:"Acesso ilimitado ao espaço nos dias de lazer autorizados pela administração. Desfrute da melhor infraestrutura recreativa de Paraju."}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:u.benefits.map((h,g)=>s.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-2xl bg-white/5 border border-white/5",children:[s.jsx("div",{className:"w-6 h-6 rounded-lg bg-brand-wine/20 flex items-center justify-center",children:s.jsx(Fn,{className:"w-3 h-3 text-brand-gold"})}),s.jsx("span",{className:"text-[10px] font-black uppercase text-gray-300 tracking-widest",children:h})]},g))})]}),s.jsx("div",{className:"w-full max-w-[420px] relative",children:s.jsx("div",{className:"relative p-1 rounded-[48px] bg-gradient-to-br from-brand-gold/20 via-white/5 to-white/5 border border-white/10 shadow-2xl overflow-hidden noise",children:s.jsxs("div",{className:"bg-[#0A0A0A] rounded-[44px] p-10 space-y-10 relative z-10 text-center",children:[s.jsx("h3",{className:"text-brand-gold font-display font-black text-3xl uppercase tracking-tighter",children:u.name}),s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsxs("div",{className:"flex items-baseline gap-1",children:[s.jsx("span",{className:"text-gray-500 text-xl font-bold uppercase tracking-tighter",children:"R$"}),s.jsx("span",{className:"text-7xl font-display font-black text-white tracking-tighter",children:u.price.toFixed(0)}),s.jsx("span",{className:"text-gray-500 text-xl font-bold uppercase",children:",00"})]}),s.jsx("span",{className:"text-[10px] text-gray-600 font-black uppercase tracking-[0.3em] mt-2",children:"Pagamento Mensal"})]}),s.jsx(ie,{variant:"primary",className:"w-full py-6 rounded-3xl text-sm shadow-xl",onClick:t,children:"CONTRATAR AGORA"}),s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest",children:"Geração imediata de carteirinha digital via Pix"})]})})})]})})}),s.jsx("section",{className:"py-24 bg-bg-black relative overflow-hidden",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-8",children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-16",children:[s.jsx("div",{className:"lg:w-1/3",children:s.jsxs("h2",{className:"text-4xl font-display font-black uppercase tracking-tighter sticky top-32",children:["Regras do ",s.jsx("br",{}),s.jsx("span",{className:"text-brand-wine",children:"Clube de"})," ",s.jsx("br",{})," Parceiros"]})}),s.jsx("div",{className:"lg:w-2/3",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:["A carteirinha é mensal e tem validade de 30 dias.","A carteirinha é pessoal e intransferível.","O acesso é válido apenas nos dias autorizados pela administração.","Em dias de shows, bailões ou eventos fechados, pode ser necessário comprar ingresso separado.","Atividades como futebol de sabão, piscina e churrasco dependem da programação do dia.","A entrada pode ser validada pelo nome, telefone ou QR Code da carteirinha.","A administração pode alterar programações e regras conforme necessidade operacional."].map((h,g)=>s.jsxs("div",{className:"flex gap-4 p-6 rounded-3xl bg-white/[0.02] border border-white/5 group hover:border-brand-gold/20 transition-all",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-brand-wine/10 flex items-center justify-center shrink-0 font-black text-brand-wine text-xs",children:g+1}),s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest leading-relaxed text-gray-400 group-hover:text-gray-200 transition-colors",children:h})]},g))})})]})})}),s.jsx(z8,{activities:l}),s.jsx("footer",{className:"py-20 text-center border-t border-white/5 mt-20",children:s.jsxs(ie,{variant:"ghost",onClick:n,className:"text-[10px] font-black uppercase tracking-[0.4em] opacity-40 hover:opacity-100",children:[s.jsx(mn,{className:"w-4 h-4 mr-2 rotate-180"})," VOLTAR PARA O INÍCIO"]})})]}):null}function L8(){const[t,n]=k.useState({firstName:"",lastName:"",cpf:"",whatsapp:""}),[r,l]=k.useState({}),[c,u]=k.useState(!1),[h,g]=k.useState(null),[p,m]=k.useState(!1),[x,b]=k.useState(!1),v=()=>{const j={};return t.firstName.trim()||(j.firstName="O nome é necessário"),t.lastName.trim()||(j.lastName="O sobrenome é necessário"),t.cpf.trim()||(j.cpf="O CPF é necessário"),t.whatsapp.trim()||(j.whatsapp="O WhatsApp é necessário"),l(j),Object.keys(j).length===0},w=async j=>{if(j.preventDefault(),!!v()){u(!0);try{const N=await fM({firstName:t.firstName,lastName:t.lastName,cpf:t.cpf,whatsapp:t.whatsapp});g(N)}catch(N){l({general:N instanceof Error?N.message:"Não foi possível reservar o presente."})}finally{u(!1)}}};return s.jsxs("div",{className:"min-h-screen bg-[#050505] selection:bg-brand-gold selection:text-black overflow-x-hidden",children:[s.jsx(Uh,{}),s.jsxs("section",{className:"relative min-h-screen flex items-center justify-center pt-20 overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0",children:[s.jsx("img",{src:"https://images.unsplash.com/photo-1514525253361-bee8718a74a2?auto=format&fit=crop&q=80",className:"w-full h-full object-cover opacity-30 grayscale-[0.5] contrast-[1.1]",alt:"Atmosfera Galpão Imperial"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[#050505]/80 via-transparent to-[#050505]"}),s.jsx("div",{className:"absolute inset-x-0 bottom-0 h-96 bg-gradient-to-t from-[#050505] to-transparent"})]}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-8 relative z-10 py-20 text-center space-y-12",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"inline-flex items-center gap-3 px-6 py-2.5 rounded-full bg-white/5 border border-white/10 text-brand-gold text-[10px] font-black uppercase tracking-[0.4em] backdrop-blur-xl",children:[s.jsx(A5,{className:"w-3.5 h-3.5 fill-brand-gold"}),"Um convite especial para você"]}),s.jsxs(Te.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-5xl md:text-8xl font-display font-black text-white uppercase leading-[0.85] tracking-tighter max-w-4xl mx-auto",children:["Hoje tem um ",s.jsx("br",{})," ",s.jsx("span",{className:"text-gradient",children:"presente"})," te esperando"]}),s.jsx(Te.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"text-gray-400 text-base md:text-lg font-bold uppercase tracking-widest max-w-2xl mx-auto leading-relaxed",children:"O Galpão Imperial preparou uma surpresa para tornar sua próxima noite conosco inesquecível."})]}),s.jsx("div",{className:"relative pt-10",children:s.jsx(ma,{children:!p&&s.jsxs(Te.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:1.5,opacity:0},whileHover:{scale:1.05},className:"relative group cursor-pointer inline-block",onClick:()=>m(!0),children:[s.jsx("div",{className:"absolute inset-0 bg-brand-gold/20 blur-[100px] rounded-full group-hover:bg-brand-gold/40 transition-all"}),s.jsxs("div",{className:"relative z-10 w-48 h-48 md:w-64 md:h-64 flex flex-col items-center justify-center gap-4",children:[s.jsx(Te.div,{animate:{rotate:[0,-5,5,-5,5,0],scale:[1,1.05,1,1.05,1]},transition:{repeat:1/0,duration:3,ease:"easeInOut"},children:s.jsx(Ci,{className:"w-24 h-24 md:w-32 md:h-32 text-brand-gold drop-shadow-[0_0_30px_rgba(212,175,55,0.4)]"})}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-white font-black uppercase text-[12px] tracking-[0.4em] mb-2 group-hover:text-brand-gold transition-colors",children:"Abra seu presente"}),s.jsx("p",{className:"text-gray-500 text-[9px] font-black uppercase tracking-widest leading-none",children:"Clique na caixa para descobrir"})]})]}),s.jsx("div",{className:"absolute -top-4 -right-4",children:s.jsx(Ly,{className:"w-8 h-8 text-brand-gold animate-pulse"})})]})})}),s.jsxs(Te.div,{initial:{opacity:0},animate:{opacity:.3},className:"flex flex-col items-center gap-4 pt-12",children:[s.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.5em] text-white",children:"Deslize para ver mais"}),s.jsx(nh,{className:"w-4 h-4 text-white animate-bounce"})]})]})]}),s.jsx("section",{className:"py-32 bg-white/[0.01] border-y border-white/5 relative overflow-hidden",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-8",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-12 text-center",children:[{icon:qa,title:"Entrada Cortesia",desc:"Acesso sem custo ao evento"},{icon:Va,title:"Drink de Boas-vindas",desc:"Um brinde para começar a noite"},{icon:lh,title:"Leve +3 Amigas",desc:"Seu benefício inclui até três convidadas"}].map((j,N)=>s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl bg-brand-wine/10 border border-white/10 flex items-center justify-center mx-auto mb-6",children:s.jsx(j.icon,{className:"w-6 h-6 text-brand-gold"})}),s.jsx("h3",{className:"text-xl font-black text-white uppercase tracking-tight",children:j.title}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest",children:j.desc})]},N))})})}),s.jsx(ma,{children:p&&s.jsxs(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 sm:p-8",children:[s.jsx("div",{className:"absolute inset-0 bg-black/95 backdrop-blur-md",onClick:()=>!h&&m(!1)}),s.jsxs(Te.div,{initial:{scale:.9,y:20},animate:{scale:1,y:0},exit:{scale:.9,y:20},className:"relative w-full max-w-2xl bg-[#0A0A0A] border border-white/10 rounded-[60px] overflow-hidden shadow-[0_0_100px_rgba(157,21,54,0.2)] noise",children:[!h&&s.jsx("button",{onClick:()=>m(!1),className:"absolute top-8 right-8 w-12 h-12 rounded-full bg-white/5 flex items-center justify-center text-gray-500 hover:text-white transition-colors z-20",children:s.jsx(Ha,{className:"w-6 h-6"})}),s.jsx("div",{className:"p-8 sm:p-16 space-y-12",children:s.jsx(ma,{mode:"wait",children:!x&&!h?s.jsxs(Te.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"text-center space-y-10",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("span",{className:"text-brand-gold text-[10px] font-black uppercase tracking-[0.5em]",children:"Presente Revelado"}),s.jsx("h2",{className:"text-4xl sm:text-6xl font-display font-black text-white uppercase tracking-tighter",children:"É todo seu!"})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[{icon:qa,label:"Entrada Liberada",sub:"Grátis no evento"},{icon:Va,label:"1 Drink Cortesia",sub:"Na sua chegada"}].map((j,N)=>s.jsxs("div",{className:"p-8 rounded-[32px] bg-white/[0.03] border border-white/5 space-y-4",children:[s.jsx(j.icon,{className:"w-8 h-8 text-brand-gold mx-auto"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-black text-white uppercase tracking-tight",children:j.label}),s.jsx("p",{className:"text-[9px] text-gray-500 font-black uppercase tracking-widest mt-1",children:j.sub})]})]},N))}),s.jsxs("div",{className:"space-y-6",children:[s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest leading-relaxed",children:"Preencha seus dados e o sistema gera sua entrada automaticamente. Você pode levar +3 amigas."}),s.jsxs(ie,{variant:"primary",size:"lg",className:"w-full h-20 rounded-[28px] text-xs font-black uppercase tracking-[0.2em]",onClick:()=>b(!0),children:["Resgatar Agora ",s.jsx(mn,{className:"w-5 h-5 ml-2"})]})]})]},"reveal"):h?s.jsxs(Te.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"text-center space-y-8",children:[s.jsx("div",{className:"w-20 h-20 bg-green-500/10 rounded-full flex items-center justify-center mx-auto mb-6 border border-green-500/20",children:s.jsx(Dt,{className:"w-10 h-10 text-green-500"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h2",{className:"text-4xl font-display font-black text-white uppercase tracking-tighter leading-none",children:[h.firstName,", ",s.jsx("br",{})," está garantido!"]}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest leading-relaxed",children:"Seu presente foi reservado com sucesso. Você pode levar +3 amigas e a portaria valida pelo nome, CPF, WhatsApp ou código."})]}),s.jsxs("div",{className:"p-8 rounded-[32px] bg-white/[0.02] border border-brand-gold/20 space-y-4",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-[0.4em]",children:"Seu Código"}),s.jsx("p",{className:"text-2xl font-mono font-black text-brand-gold tracking-widest",children:h.code}),s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:"Gerado automaticamente pelo sistema"})]}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsxs(ie,{variant:"primary",className:"w-full h-16 rounded-2xl gap-3 text-[10px] font-black shadow-xl",onClick:()=>window.open(`https://wa.me/?text=Olha o presente que ganhei no Galpão Imperial! Código: ${h.code}`,"_blank"),children:[s.jsx(Va,{className:"w-4 h-4"})," COMPARTILHAR"]}),s.jsx(In,{to:"/",className:"w-full",children:s.jsx(ie,{variant:"ghost",className:"w-full text-[9px] font-black uppercase opacity-50",children:"Voltar para o início"})})]})]},"confirmed"):s.jsxs(Te.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-10",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h2",{className:"text-3xl font-display font-black text-white uppercase tracking-tighter mb-2",children:"Quase lá!"}),s.jsx("p",{className:"text-gray-500 text-[9px] font-black uppercase tracking-widest",children:"Sem confirmar número e sem criar código. A gente gera tudo para você."})]}),s.jsxs("form",{onSubmit:w,className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] font-black uppercase tracking-[0.2em] text-gray-600 ml-2",children:"Primeiro Nome"}),s.jsx("input",{type:"text",className:`w-full h-14 bg-black/40 border ${r.firstName?"border-brand-wine":"border-white/5"} rounded-2xl px-6 text-xs font-black text-white focus:border-brand-gold transition-all`,value:t.firstName,onChange:j=>n({...t,firstName:j.target.value})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] font-black uppercase tracking-[0.2em] text-gray-600 ml-2",children:"Sobrenome"}),s.jsx("input",{type:"text",className:`w-full h-14 bg-black/40 border ${r.lastName?"border-brand-wine":"border-white/5"} rounded-2xl px-6 text-xs font-black text-white focus:border-brand-gold transition-all`,value:t.lastName,onChange:j=>n({...t,lastName:j.target.value})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] font-black uppercase tracking-[0.2em] text-gray-600 ml-2",children:"CPF"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"text",className:`w-full h-14 bg-black/40 border ${r.cpf?"border-brand-wine":"border-white/5"} rounded-2xl px-6 pl-14 text-xs font-black text-white focus:border-brand-gold transition-all`,value:t.cpf,onChange:j=>n({...t,cpf:j.target.value})}),s.jsx(fn,{className:"absolute left-5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[9px] font-black uppercase tracking-[0.2em] text-gray-600 ml-2",children:"WhatsApp"}),s.jsx("input",{type:"tel",className:`w-full h-14 bg-black/40 border ${r.whatsapp?"border-brand-wine":"border-white/5"} rounded-2xl px-6 text-xs font-black text-white focus:border-brand-gold transition-all`,value:t.whatsapp,onChange:j=>n({...t,whatsapp:j.target.value})})]}),r.general&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-red-400",children:r.general}),s.jsx(ie,{type:"submit",variant:"primary",className:"w-full h-20 rounded-[28px] text-xs font-black uppercase tracking-[0.2em]",disabled:c,children:c?"Gerando seu presente...":"Entrar na Lista"})]})]},"form")})})]})]})}),s.jsx("section",{className:"py-24 border-t border-white/5 opacity-60",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center space-y-12",children:[s.jsxs("div",{className:"flex items-center gap-6 justify-center",children:[s.jsx("div",{className:"h-[1px] bg-white/10 flex-1"}),s.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.5em] text-gray-500 shrink-0",children:"Regras importantes"}),s.jsx("div",{className:"h-[1px] bg-white/10 flex-1"})]}),s.jsx("ul",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-6 text-left",children:["Válido exclusivamente para clientes mulheres.","Cada CPF ou WhatsApp dá direito a um resgate único.","Inclui entrada liberada e 1 drink conforme disponibilidade.","A portaria localiza por nome, CPF, WhatsApp ou código.","Válido somente em eventos selecionados para a campanha.","Sujeito à lotação do espaço físico.","O Galpão Imperial reserva-se o direito de alterar as regras."].map((j,N)=>s.jsxs("li",{className:"flex gap-4 items-start text-gray-600",children:[s.jsx("div",{className:"w-1 h-1 rounded-full bg-brand-wine mt-1.5 shrink-0"}),s.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest leading-relaxed",children:j})]},N))}),s.jsxs("div",{className:"pt-12",children:[s.jsx("img",{src:Kn,alt:"Logo",className:"w-10 h-10 mx-auto opacity-10"}),s.jsx("p",{className:"text-[8px] font-black uppercase tracking-[0.5em] text-gray-700 mt-4",children:"Galpão Imperial • Paraju"})]})]})})]})}function V8(){const{pathname:t}=ea();return k.useEffect(()=>{window.scrollTo(0,0)},[t]),null}const U8="modulepreload",B8=function(t){return"/"+t},ty={},q8=function(n,r,l){let c=Promise.resolve();if(r&&r.length>0){let h=function(m){return Promise.all(m.map(x=>Promise.resolve(x).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),p=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));c=h(r.map(m=>{if(m=B8(m),m in ty)return;ty[m]=!0;const x=m.endsWith(".css"),b=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${b}`))return;const v=document.createElement("link");if(v.rel=x?"stylesheet":U8,x||(v.as="script"),v.crossOrigin="",v.href=m,p&&v.setAttribute("nonce",p),document.head.appendChild(v),x)return new Promise((w,j)=>{v.addEventListener("load",w),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return c.then(h=>{for(const g of h||[])g.status==="rejected"&&u(g.reason);return n().catch(u)})},of="galpao-imperial-qr-reader",H8=3e3,G8={ticket:{label:"Ingresso",icon:qa,manualPlaceholder:"Nome, CPF, celular, e-mail, pedido ou codigo",idleHint:"Aponte para o QR Code do ingresso. Nao precisa aproximar demais o celular."},gift:{label:"Presente",icon:Ci,manualPlaceholder:"Nome, CPF, WhatsApp ou codigo",idleHint:"Aponte para o QR Code ou use a busca manual do presente."},partner:{label:"Carteirinha",icon:Fn,manualPlaceholder:"CPF, nome, WhatsApp ou QR",idleHint:"Aponte para a carteirinha do parceiro. A leitura e continua."}},I8=t=>t.toLocaleString("pt-BR",{style:"currency",currency:"BRL"}),sc=t=>(t||"").replace(/\D+/g,""),Y8=t=>{const n=sc(t);return n.length===11?`${n.slice(0,3)}.${n.slice(3,6)}.${n.slice(6,9)}-${n.slice(9)}`:t||"-"},$8=t=>{const n=sc(t);return n.length===11?`(${n.slice(0,2)}) ${n.slice(2,7)}-${n.slice(7)}`:n.length===10?`(${n.slice(0,2)}) ${n.slice(2,6)}-${n.slice(6)}`:t||"-"},cf=t=>{if(!t)return"-";const n=new Date(t);return Number.isNaN(n.getTime())?t:n.toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})};function ay(){var Rs;const t=ea(),[n]=Ek(),r=t.pathname==="/colaborador"||n.get("compact")==="1",l=n.get("mode"),c=l==="partner"||l==="gift"||l==="ticket"?l:"ticket",u=G8[c],h=u.icon,{events:g,sales:p}=xt(),m=k.useRef(null),x=k.useRef(null),b=k.useRef(!1),v=k.useRef(null),[w,j]=k.useState(!1),[N,A]=k.useState(!1),[E,D]=k.useState(null),[C,O]=k.useState([]),[Q,z]=k.useState(null),[I,P]=k.useState(""),[ee,W]=k.useState(""),[le,de]=k.useState("active"),[ge,be]=k.useState(new Set),[te,V]=k.useState(null),[J,ae]=k.useState({kind:"idle",title:"Pronto para leitura",description:"Toque no botao abaixo para ativar a camera.",helper:u.idleHint}),H=C.length>1,M=k.useMemo(()=>c==="ticket"?"Leitor de ingressos":c==="gift"?"Lista e validacao de presentes":"Validacao de carteirinha",[c]),T=k.useMemo(()=>g.filter(se=>["active","featured","last_tickets"].includes(se.status)),[g]),U=k.useMemo(()=>{const se=ee.trim().toLowerCase(),we=sc(ee),Ee=new Set(T.map(oe=>oe.id));return p.filter(oe=>oe.orderType==="ticket").filter(oe=>le==="all"?!0:le==="active"?oe.eventId?Ee.has(oe.eventId):!1:oe.eventId===le).flatMap(oe=>oe.tickets.map(Me=>({sale:oe,ticket:Me}))).filter(({sale:oe,ticket:Me})=>{if(!se)return!0;const ta=[oe.orderNumber,oe.buyerName,oe.customerCpf,oe.whatsapp,oe.email,oe.eventTitle,Me.code,Me.holderName,Me.holderEmail,Me.batchName].join(" ").toLowerCase(),_t=sc(`${oe.customerCpf||""} ${oe.whatsapp||""} ${oe.orderNumber||""} ${Me.code||""}`);return ta.includes(se)||we.length>=3&&_t.includes(we)}).map(({sale:oe,ticket:Me})=>{var ta,_t;return{orderId:oe.id,orderNumber:oe.orderNumber,buyerName:oe.buyerName,customerCpf:oe.customerCpf,whatsapp:oe.whatsapp,email:oe.email,paymentStatus:oe.paymentStatus,quantity:oe.quantity,totalValue:oe.totalValue,purchaseDate:oe.purchaseDate instanceof Date?oe.purchaseDate.toISOString():String(oe.purchaseDate||""),eventTitle:oe.eventTitle,eventDate:((_t=(ta=g.find(gt=>gt.id===oe.eventId))==null?void 0:ta.date)==null?void 0:_t.toISOString())||null,ticket:{...Me,status:ge.has(Me.code)?"used":Me.status,usedAt:ge.has(Me.code)?new Date:Me.usedAt,validatedBy:ge.has(Me.code)?"Portaria":Me.validatedBy}}})},[T,g,p,le,ee,ge]),Y=U.filter(se=>se.paymentStatus==="paid"&&se.ticket.status==="unused").length,K=se=>{if(typeof window>"u")return;const we=window.AudioContext||window.webkitAudioContext;if(!we)return;const Ee=new we,oe=Ee.createOscillator(),Me=Ee.createGain();oe.type=se==="success"?"triangle":"square",oe.frequency.value=se==="success"?980:260,Me.gain.value=se==="success"?.08:.1,oe.connect(Me),Me.connect(Ee.destination),oe.start(),oe.stop(Ee.currentTime+(se==="success"?.14:.22)),oe.onended=()=>void Ee.close()},ne=()=>{b.current=!1,ae({kind:"idle",title:"Pronto para leitura",description:w?"A camera ja esta pronta para o proximo QR Code.":"Toque no botao abaixo para ativar a camera.",helper:u.idleHint})},ce=(se=H8)=>{v.current&&window.clearTimeout(v.current),v.current=window.setTimeout(ne,se)},ve=se=>{be(we=>{const Ee=new Set(we);return Ee.add(se),Ee})},Ge=async(se,we)=>{if(!(!se||te)){V(se);try{await $f(se,"Portaria"),ve(se),ae({kind:"success",title:"Entrada liberada",description:we,helper:"Check-in feito pela lista manual da portaria."}),K("success")}catch(Ee){K("error"),ae({kind:"error",title:"Falha na validacao",description:Ee instanceof Error?Ee.message:"Nao foi possivel validar agora.",helper:"Confira o status do pagamento ou tente localizar outro ingresso."})}finally{V(null),ce()}}},Ne=async se=>{var Ee;const we=se.trim();if(!we){b.current=!1;return}try{if(c==="ticket"){const oe=await mw(we),Me=(Ee=oe.tickets)==null?void 0:Ee[0];if(!Me)throw new Error("Ingresso nao encontrado.");await $f(Me.code,"Portaria"),ve(Me.code),ae({kind:"success",title:"Entrada liberada",description:`${oe.buyerName} - ${oe.eventTitle}`,helper:"Check-in concluido. O resultado permanece na tela por alguns segundos."})}else if(c==="gift"){const oe=await pw(we);if(oe.status==="used")throw new Error("Presente ja utilizado.");await wc(oe.id),ae({kind:"success",title:"Entrada confirmada",description:`${oe.firstName} ${oe.lastName}`,helper:"Presenca marcada com sucesso. Preparando a proxima leitura."})}else{const oe=await xw(we);await gw(oe.cpf,"Portaria"),ae({kind:"success",title:"Carteirinha validada",description:`${oe.name} - ${oe.planId}`,helper:"Validacao confirmada. A camera continua pronta para a proxima leitura."})}K("success"),P("")}catch(oe){K("error"),ae({kind:"error",title:"Falha na validacao",description:oe instanceof Error?oe.message:"Nao foi possivel validar agora.",helper:"Confira o QR Code ou utilize a busca manual abaixo."})}finally{ce()}},Et=async()=>{const se=m.current;if(m.current=null,se){try{await se.stop()}catch{}try{await se.clear()}catch{}}j(!1)},xa=(se,we)=>{var Ee,oe;return we&&se.some(Me=>Me.id===we)?we:((Ee=se.find(Me=>/back|rear|traseira|environment/i.test(Me.label)))==null?void 0:Ee.id)??((oe=se[0])==null?void 0:oe.id)??null},ga=()=>{window.requestAnimationFrame(()=>{const se=x.current;if(!se)return;const we=document.getElementById(`${of}__scan_region`),Ee=se.querySelector("video"),oe=se.querySelector("canvas");we&&(we.style.width="100%",we.style.height="100%",we.style.display="flex",we.style.alignItems="stretch",we.style.justifyContent="stretch",we.style.overflow="hidden"),Array.from((we==null?void 0:we.children)||[]).forEach(Me=>{const ta=Me;ta.style.width="100%",ta.style.height="100%"}),Ee&&(Ee.setAttribute("playsinline","true"),Ee.muted=!0,Ee.style.width="100%",Ee.style.height="100%",Ee.style.objectFit="cover",Ee.style.display="block",Ee.style.background="#000"),oe&&(oe.style.width="100%",oe.style.height="100%")})},Ia=async se=>{A(!0),D(null),ae({kind:"idle",title:"Preparando camera",description:"Abrindo a camera para leitura do QR Code.",helper:"Permita o uso da camera no navegador."});try{await Et();const we=await q8(()=>import("./index-MGQ-7KRN.js"),[]),oe=(await we.Html5Qrcode.getCameras()).map(_t=>({id:_t.id,label:_t.label||"Camera"}));O(oe);const Me=xa(oe,se??Q);if(!Me)throw new Error("Nenhuma camera encontrada neste aparelho.");z(Me);const ta=new we.Html5Qrcode(of,{verbose:!1});m.current=ta,await ta.start({deviceId:{exact:Me}},{fps:12,aspectRatio:1.333334,qrbox:(_t,gt)=>({width:Math.max(220,Math.floor(Math.min(_t,gt)*(r?.72:.68))),height:Math.max(220,Math.floor(Math.min(_t,gt)*(r?.72:.68)))}),disableFlip:!1,videoConstraints:{facingMode:{ideal:"environment"},width:{ideal:1280},height:{ideal:960}}},async _t=>{b.current||(b.current=!0,await Ne(_t))},()=>{}),ga(),j(!0),ae({kind:"idle",title:"Pronto para leitura",description:"Posicione o QR Code dentro da moldura para validar.",helper:u.idleHint})}catch(we){const Ee=we instanceof Error?we.message:"Nao foi possivel ativar a camera.";D(Ee),ae({kind:"error",title:"Camera indisponivel",description:"Nao foi possivel ativar a camera neste aparelho.",helper:"Tente novamente ou use a validacao manual abaixo."})}finally{A(!1)}},Ot=async()=>{if(!H)return;const se=C.findIndex(Ee=>Ee.id===Q),we=C[(se+1)%C.length];we&&await Ia(we.id)},Li=se=>{se.preventDefault()};return k.useEffect(()=>{ae({kind:"idle",title:"Pronto para leitura",description:"Toque no botao abaixo para ativar a camera.",helper:u.idleHint}),P(""),D(null),O([]),z(null),Et()},[c]),k.useEffect(()=>{w&&ga()},[w]),k.useEffect(()=>()=>{v.current&&window.clearTimeout(v.current),Et()},[]),s.jsx("div",{className:`min-h-screen bg-[#050505] text-white ${r?"py-5 px-3 sm:px-5":"py-8 px-4 sm:px-8"}`,children:s.jsxs("div",{className:`${r?"max-w-4xl":"max-w-6xl"} mx-auto space-y-5`,children:[s.jsxs("div",{className:"text-center space-y-3",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-white/10 bg-white/[0.04] px-4 py-2 text-[10px] font-black uppercase tracking-[0.28em] text-gray-300",children:[s.jsx(Ly,{className:"h-3.5 w-3.5 text-brand-gold"}),"Leitura continua por camera"]}),s.jsxs("h1",{className:`${r?"text-3xl sm:text-5xl":"text-4xl sm:text-5xl"} font-display font-black uppercase tracking-tighter`,children:[r?"Colaborador":"Portaria"," ",s.jsx("span",{className:"text-brand-gold",children:"Galpão Imperial"})]}),s.jsxs("p",{className:"text-[11px] uppercase tracking-[0.2em] font-black text-gray-500 max-w-2xl mx-auto leading-relaxed",children:[M," - interface simplificada, leitura continua e busca por lista."]})]}),s.jsxs("div",{className:"grid gap-4 lg:grid-cols-[minmax(0,1fr)_320px] items-start",children:[s.jsxs("div",{className:"rounded-[36px] border border-white/10 bg-white/[0.02] p-4 sm:p-6 space-y-5",children:[!w&&s.jsxs("div",{className:"rounded-[28px] border border-white/10 bg-black/40 p-5 sm:p-6 space-y-4 text-center",children:[s.jsx("div",{className:"mx-auto w-14 h-14 rounded-2xl bg-brand-gold/10 border border-brand-gold/20 flex items-center justify-center",children:s.jsx(Ay,{className:"w-6 h-6 text-brand-gold"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm font-black uppercase tracking-widest text-white",children:"Ativar camera"}),s.jsx("p",{className:"text-[10px] uppercase tracking-[0.18em] font-black text-gray-500 leading-relaxed",children:"O botao fica fora da area de leitura. Depois de permitir, ele some e fica so o scanner."})]}),s.jsx("div",{className:"flex justify-center",children:s.jsx(ie,{className:"h-14 rounded-[22px] px-8 text-[10px] tracking-[0.24em]",onClick:()=>void Ia(),disabled:N,children:N?"Abrindo camera...":"Permitir e escanear"})}),E&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.18em] font-black text-red-400",children:E})]}),s.jsxs("div",{ref:x,className:"rounded-[32px] overflow-hidden bg-black border border-white/10 relative w-full max-w-[560px] mx-auto aspect-square",children:[!w&&s.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center px-6 text-center bg-black",children:[s.jsx(Ba,{className:"w-14 h-14 text-gray-700 mb-4"}),s.jsx("p",{className:"text-[10px] uppercase tracking-[0.22em] font-black text-gray-500 max-w-xs leading-relaxed",children:"Assim que a camera for ativada, o video aparece aqui limpo, encaixado e sem botoes dentro da area de leitura."})]}),s.jsx("div",{id:of,className:"staff-scanner-root absolute inset-0"}),s.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center p-6 sm:p-8",children:s.jsxs("div",{className:"relative w-full h-full rounded-[34px] border border-white/10 shadow-[0_0_0_9999px_rgba(0,0,0,0.06)]",children:[s.jsx("div",{className:"absolute -left-1 -top-1 h-14 w-14 rounded-tl-[28px] border-l-4 border-t-4 border-white"}),s.jsx("div",{className:"absolute -right-1 -top-1 h-14 w-14 rounded-tr-[28px] border-r-4 border-t-4 border-white"}),s.jsx("div",{className:"absolute -bottom-1 -left-1 h-14 w-14 rounded-bl-[28px] border-b-4 border-l-4 border-white"}),s.jsx("div",{className:"absolute -bottom-1 -right-1 h-14 w-14 rounded-br-[28px] border-b-4 border-r-4 border-white"}),s.jsx("div",{className:"absolute left-1/2 top-1/2 h-[1px] w-[86%] -translate-x-1/2 -translate-y-1/2 bg-gradient-to-r from-transparent via-brand-gold to-transparent opacity-90"})]})})]}),s.jsx("div",{className:`rounded-[28px] p-5 border ${J.kind==="success"?"bg-green-500/10 border-green-500/30":J.kind==="error"?"bg-red-500/10 border-red-500/30":"bg-white/[0.02] border-white/10"}`,children:s.jsxs("div",{className:"flex items-start gap-3",children:[J.kind==="success"?s.jsx(Dt,{className:"mt-0.5 w-6 h-6 text-green-400 shrink-0"}):J.kind==="error"?s.jsx(C4,{className:"mt-0.5 w-6 h-6 text-red-400 shrink-0"}):s.jsx(Hk,{className:"mt-0.5 w-6 h-6 text-brand-gold shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-black uppercase tracking-widest",children:J.title}),s.jsx("p",{className:"text-[11px] uppercase tracking-[0.18em] text-gray-300 font-black mt-2 leading-relaxed break-words",children:J.description}),s.jsx("p",{className:"text-[10px] uppercase tracking-[0.16em] text-gray-500 font-black mt-2 leading-relaxed",children:J.helper})]})]})}),c!=="ticket"&&!r&&s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[s.jsx("input",{type:"text",value:I,onChange:se=>P(se.target.value),placeholder:u.manualPlaceholder,className:"flex-1 h-16 rounded-[24px] bg-black/40 border border-white/10 px-6 text-sm font-black uppercase tracking-widest text-white"}),s.jsx(ie,{className:"h-16 rounded-[24px] px-8",onClick:()=>{b.current||!I||(b.current=!0,Ne(I))},disabled:!I||b.current,children:"VALIDAR"})]})]}),s.jsxs("aside",{className:"space-y-4",children:[s.jsxs("div",{className:"rounded-[32px] border border-white/10 bg-white/[0.02] p-5 space-y-4",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-brand-gold/10 border border-brand-gold/20 px-3 py-2 text-[10px] font-black uppercase tracking-[0.2em] text-brand-gold",children:[s.jsx(h,{className:"w-3.5 h-3.5"}),u.label]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-black uppercase tracking-widest text-white",children:"Leitura rapida"}),s.jsxs("ul",{className:"mt-3 space-y-3 text-[10px] font-black uppercase tracking-[0.18em] text-gray-400 leading-relaxed",children:[s.jsx("li",{children:"Use a camera quando houver QR Code."}),s.jsx("li",{children:"Use a lista abaixo quando o cliente so disser nome, CPF, celular ou e-mail."}),s.jsx("li",{children:"O botao verde confirma entrada paga e nao usada."}),s.jsx("li",{children:"Itens usados ou pendentes ficam bloqueados."})]})]})]}),w&&H&&s.jsxs("div",{className:"rounded-[32px] border border-white/10 bg-white/[0.02] p-5 space-y-3",children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[0.24em] text-gray-500",children:"Camera ativa"}),s.jsx("p",{className:"text-sm font-black uppercase tracking-tight text-white",children:((Rs=C.find(se=>se.id===Q))==null?void 0:Rs.label)||"Camera selecionada"}),s.jsx(ie,{variant:"outline",className:"h-12 rounded-[20px] w-full text-[10px] tracking-[0.2em]",onClick:()=>void Ot(),children:"Trocar camera"})]})]})]}),c==="ticket"&&s.jsxs("section",{className:"rounded-[36px] border border-white/10 bg-white/[0.025] p-4 sm:p-6 space-y-5",children:[s.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[0.28em] text-brand-gold",children:"Lista da portaria"}),s.jsx("h2",{className:"text-xl sm:text-2xl font-black uppercase tracking-tight text-white",children:"Busca manual de ingressos"}),s.jsx("p",{className:"max-w-2xl text-[10px] sm:text-[11px] font-black uppercase tracking-[0.16em] leading-relaxed text-gray-500",children:"Localize por nome, CPF, celular, e-mail, numero do pedido ou codigo do ingresso. A lista mostra dados do pedido e permite validar sem QR Code."})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:flex",children:[s.jsxs("div",{className:"rounded-2xl border border-white/10 bg-black/30 px-4 py-3",children:[s.jsx("p",{className:"text-lg font-black text-white",children:U.length}),s.jsx("p",{className:"text-[8px] font-black uppercase tracking-widest text-gray-500",children:"na lista"})]}),s.jsxs("div",{className:"rounded-2xl border border-green-500/20 bg-green-500/10 px-4 py-3",children:[s.jsx("p",{className:"text-lg font-black text-green-300",children:Y}),s.jsx("p",{className:"text-[8px] font-black uppercase tracking-widest text-green-200/60",children:"liberados"})]})]})]}),s.jsxs("form",{onSubmit:Li,className:"grid gap-3 lg:grid-cols-[260px_minmax(0,1fr)_180px]",children:[s.jsxs("select",{value:le,onChange:se=>de(se.target.value),className:"h-16 w-full rounded-[24px] border border-white/10 bg-black/50 px-5 text-xs font-black uppercase tracking-[0.14em] text-white outline-none transition focus:border-brand-gold/60",children:[s.jsx("option",{value:"active",children:"Todos os shows ativos"}),T.map(se=>s.jsx("option",{value:se.id,children:se.title},se.id)),s.jsx("option",{value:"all",children:"Todos os shows"})]}),s.jsxs("label",{className:"relative block",children:[s.jsx($n,{className:"absolute left-5 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-600"}),s.jsx("input",{value:ee,onChange:se=>W(se.target.value),placeholder:u.manualPlaceholder,className:"h-16 w-full rounded-[24px] border border-white/10 bg-black/50 pl-14 pr-5 text-xs font-black uppercase tracking-[0.18em] text-white outline-none transition focus:border-brand-gold/60"})]}),s.jsx(ie,{className:"h-16 rounded-[24px] text-[10px] tracking-[0.22em]",children:"Buscar"})]}),s.jsxs("div",{className:"space-y-3",children:[U.length===0&&s.jsxs("div",{className:"rounded-[28px] border border-dashed border-white/10 bg-black/20 p-8 text-center",children:[s.jsx(u0,{className:"mx-auto h-8 w-8 text-gray-700"}),s.jsx("p",{className:"mt-4 text-sm font-black uppercase tracking-widest text-white",children:"Nenhum ingresso encontrado"}),s.jsx("p",{className:"mt-2 text-[10px] font-black uppercase tracking-[0.18em] leading-relaxed text-gray-500",children:"Tente buscar pelo primeiro nome, CPF sem pontos, celular, e-mail ou numero do pedido."})]}),U.map(se=>{const we=se.paymentStatus==="paid"&&se.ticket.status==="unused",Ee=se.paymentStatus!=="paid"?"Pagamento pendente":se.ticket.status==="used"?`Usado ${cf(se.ticket.usedAt instanceof Date?se.ticket.usedAt.toISOString():se.ticket.usedAt)}`:se.ticket.status==="cancelled"?"Cancelado":"Pronto para validar",oe=`${se.ticket.holderName||se.buyerName} - ${se.eventTitle}`;return s.jsx("article",{className:"rounded-[28px] border border-white/10 bg-black/35 p-4 sm:p-5",children:s.jsxs("div",{className:"grid gap-4 lg:grid-cols-[minmax(0,1fr)_170px] lg:items-center",children:[s.jsxs("div",{className:"min-w-0 space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:`rounded-full px-3 py-1 text-[8px] font-black uppercase tracking-widest ${we?"bg-green-500/15 text-green-300 border border-green-500/25":se.ticket.status==="used"?"bg-blue-500/15 text-blue-300 border border-blue-500/25":"bg-yellow-500/15 text-yellow-200 border border-yellow-500/25"}`,children:Ee}),s.jsx("span",{className:"rounded-full border border-white/10 bg-white/[0.04] px-3 py-1 text-[8px] font-black uppercase tracking-widest text-gray-400",children:se.orderNumber}),s.jsx("span",{className:"rounded-full border border-white/10 bg-white/[0.04] px-3 py-1 text-[8px] font-black uppercase tracking-widest text-gray-400",children:I8(se.totalValue)})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-base font-black uppercase tracking-tight text-white",children:se.ticket.holderName||se.buyerName}),s.jsxs("p",{className:"mt-1 text-[10px] font-black uppercase tracking-[0.18em] leading-relaxed text-brand-gold",children:[se.eventTitle," - ",se.ticket.batchName||"Ingresso"]})]}),s.jsxs("div",{className:"grid gap-2 text-[10px] font-black uppercase tracking-[0.14em] text-gray-400 sm:grid-cols-2",children:[s.jsxs("span",{className:"min-w-0 truncate",children:[s.jsx(u0,{className:"mr-2 inline h-3.5 w-3.5 text-gray-600"}),"CPF ",Y8(se.customerCpf)]}),s.jsxs("span",{className:"min-w-0 truncate",children:[s.jsx(Es,{className:"mr-2 inline h-3.5 w-3.5 text-gray-600"}),$8(se.whatsapp)]}),s.jsxs("span",{className:"min-w-0 truncate",children:[s.jsx(cc,{className:"mr-2 inline h-3.5 w-3.5 text-gray-600"}),se.ticket.holderEmail||se.email||"-"]}),s.jsxs("span",{className:"min-w-0 truncate",children:[s.jsx(qa,{className:"mr-2 inline h-3.5 w-3.5 text-gray-600"}),se.ticket.code]})]}),s.jsxs("p",{className:"text-[9px] font-black uppercase tracking-[0.16em] text-gray-600",children:["Compra: ",cf(se.purchaseDate)," - Evento: ",cf(se.eventDate)," - Validado por: ",se.ticket.validatedBy||"-"]})]}),s.jsx(ie,{className:`h-14 rounded-[22px] text-[10px] tracking-[0.2em] ${we?"bg-green-600 hover:bg-green-500":""}`,variant:we?"primary":"outline",disabled:!we||te===se.ticket.code,onClick:()=>void Ge(se.ticket.code,oe),children:te===se.ticket.code?"Validando...":we?"Validar entrada":"Bloqueado"})]})},`${se.orderId}-${se.ticket.code}`)})]})]})]})})}function F8(){const{giftClaims:t,reload:n}=xt(),[r,l]=k.useState(""),[c,u]=k.useState("all"),[h,g]=k.useState(null),p=k.useMemo(()=>t.filter(x=>`${x.firstName} ${x.lastName} ${x.whatsapp} ${x.cpf||""} ${x.code}`.toLowerCase().includes(r.toLowerCase())&&(c==="all"||x.status===c)),[t,r,c]),m=async x=>{g(x);try{await wc(x),await n()}finally{g(null)}};return s.jsx("div",{className:"min-h-screen bg-[#050505] text-white px-3 py-5 sm:px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto space-y-5 pb-20",children:[s.jsxs("div",{className:"text-center space-y-3",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-white/10 bg-white/[0.04] px-4 py-2 text-[10px] font-black uppercase tracking-[0.28em] text-gray-300",children:[s.jsx(Ci,{className:"h-4 w-4 text-brand-gold"})," Lista simples de entrada"]}),s.jsxs("h1",{className:"text-3xl sm:text-5xl font-display font-black uppercase tracking-tighter",children:["Lista de ",s.jsx("span",{className:"text-brand-gold",children:"Presentes"})]}),s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-gray-500",children:"Busque por nome, WhatsApp, CPF ou código e marque entrada sem abrir o painel."})]}),s.jsxs("div",{className:"rounded-[32px] border border-white/10 bg-white/[0.02] p-4 flex flex-col lg:flex-row gap-3",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx($n,{className:"absolute left-5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-600"}),s.jsx("input",{value:r,onChange:x=>l(x.target.value),placeholder:"BUSCAR...",className:"w-full h-14 rounded-[22px] bg-black/40 border border-white/10 pl-14 pr-5 text-base sm:text-[11px] font-black uppercase tracking-[0.16em] text-white"})]}),s.jsxs("select",{value:c,onChange:x=>u(x.target.value),className:"h-14 rounded-[22px] bg-black/40 border border-white/10 px-5 text-base sm:text-[10px] font-black uppercase tracking-[0.16em] text-white",children:[s.jsx("option",{value:"all",children:"Todos"}),s.jsx("option",{value:"confirmed",children:"Na lista"}),s.jsx("option",{value:"used",children:"Já entrou"}),s.jsx("option",{value:"cancelled",children:"Cancelado"})]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:p.map(x=>s.jsxs("div",{className:"rounded-[28px] border border-white/10 bg-white/[0.02] p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-black uppercase text-white",children:[x.firstName," ",x.lastName]}),s.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500 mt-1",children:x.whatsapp}),s.jsx("p",{className:"text-[10px] text-gray-600 font-mono mt-1",children:x.code})]}),s.jsx("span",{className:`px-2 py-1 rounded-lg text-[8px] font-black uppercase tracking-widest ${x.status==="confirmed"?"bg-green-500/10 text-green-400":x.status==="used"?"bg-brand-gold/10 text-brand-gold":"bg-red-500/10 text-red-400"}`,children:x.status==="confirmed"?"Na lista":x.status==="used"?"Entrou":"Cancelado"})]}),x.status==="confirmed"?s.jsxs(ie,{className:"w-full h-12 rounded-2xl text-[9px] gap-2",onClick:()=>void m(x.id),disabled:h===x.id,children:[s.jsx(Dt,{className:"w-4 h-4"}),h===x.id?"Marcando...":"Marcar entrada"]}):s.jsx("div",{className:"rounded-2xl border border-white/10 bg-black/30 p-3 text-center text-[9px] font-black uppercase tracking-widest text-gray-500",children:"Registro já marcado"})]},x.id))})]})})}function Q8({onSuccess:t}){const{login:n}=Hh(),[r,l]=k.useState(""),[c,u]=k.useState(""),[h,g]=k.useState(!1),[p,m]=k.useState(""),[x,b]=k.useState(!1),v=async w=>{w.preventDefault(),m(""),b(!0);try{await n(r,c),t()}catch(j){m(j instanceof Error?j.message:"Credenciais inválidas. Tente novamente.")}b(!1)};return s.jsxs("div",{className:"min-h-screen bg-bg-black text-white flex items-center justify-center p-4 noise",children:[s.jsx("div",{className:"absolute inset-0 pointer-events-none bg-[radial-gradient(circle_at_50%_8%,rgba(200,162,74,0.16),transparent_34rem)]"}),s.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"w-full max-w-md relative z-10",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("div",{className:"w-28 h-28 imperial-logo-frame rounded-full flex items-center justify-center mx-auto mb-7 p-2",children:s.jsx("img",{src:Kn,alt:"Galpão Imperial",className:"w-full h-full object-contain"})}),s.jsx("div",{className:"h-px imperial-hairline mb-6"}),s.jsxs("h1",{className:"text-3xl font-sans font-black uppercase tracking-wide",children:["Painel ",s.jsx("span",{className:"text-brand-gold",children:"Admin"})]}),s.jsx("p",{className:"text-brand-gold/50 text-[10px] font-black uppercase tracking-[0.3em] mt-2",children:"Acesso restrito"})]}),s.jsxs("form",{onSubmit:v,className:"space-y-6",children:[p&&s.jsxs(Te.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"p-4 rounded-2xl bg-red-500/10 border border-red-500/20 flex items-center gap-3",children:[s.jsx(Ty,{className:"w-5 h-5 text-red-500 shrink-0"}),s.jsx("p",{className:"text-xs font-black uppercase text-red-500",children:p})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-brand-gold/55 font-black uppercase tracking-widest px-2",children:"Usuário"}),s.jsxs("div",{className:"relative",children:[s.jsx(Vy,{className:"absolute left-6 top-1/2 -translate-y-1/2 w-5 h-5 text-brand-gold/35"}),s.jsx("input",{type:"text",value:r,onChange:w=>l(w.target.value.toUpperCase()),placeholder:"USUÁRIO",className:"w-full h-16 bg-black/50 border border-brand-gold/15 rounded-2xl pl-16 pr-6 text-sm font-black text-white focus:border-brand-gold transition-all outline-none placeholder:text-brand-gold/20",autoComplete:"username"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-brand-gold/55 font-black uppercase tracking-widest px-2",children:"Senha"}),s.jsxs("div",{className:"relative",children:[s.jsx(c0,{className:"absolute left-6 top-1/2 -translate-y-1/2 w-5 h-5 text-brand-gold/35"}),s.jsx("input",{type:h?"text":"password",value:c,onChange:w=>u(w.target.value),placeholder:"SENHA",className:"w-full h-16 bg-black/50 border border-brand-gold/15 rounded-2xl pl-16 pr-16 text-sm font-black text-white focus:border-brand-gold transition-all outline-none placeholder:text-brand-gold/20",autoComplete:"current-password"}),s.jsx("button",{type:"button",onClick:()=>g(!h),className:"absolute right-6 top-1/2 -translate-y-1/2 text-brand-gold/35 hover:text-brand-gold transition-colors",children:h?s.jsx(w5,{className:"w-5 h-5"}):s.jsx(My,{className:"w-5 h-5"})})]})]}),s.jsx(ie,{type:"submit",disabled:x||!r||!c,variant:"primary",className:"w-full h-16 rounded-2xl text-xs font-black uppercase tracking-widest gap-3",children:x?s.jsx("div",{className:"w-5 h-5 border-2 border-black/30 border-t-black rounded-full animate-spin"}):s.jsxs(s.Fragment,{children:["ENTRAR ",s.jsx(c0,{className:"w-4 h-4"})]})})]}),s.jsx("p",{className:"text-center text-brand-gold/30 text-[9px] font-black uppercase tracking-widest mt-8",children:"Área restrita • Galpão Imperial"})]})]})}const ww=k.createContext(null);function X8({children:t}){const[n,r]=k.useState(!1),[l,c]=k.useState(!0);k.useEffect(()=>{let g=!0;return(async()=>{c(!0);const m=await lM(),x=typeof window<"u"&&window.sessionStorage.getItem("galpao_imperial_platform_unlocked")==="1";g&&(r(m&&x),c(!1))})(),()=>{g=!1}},[]);const u=async g=>{await iM(g),typeof window<"u"&&window.sessionStorage.setItem("galpao_imperial_platform_unlocked","1"),r(!0)},h=async()=>{await rM(),typeof window<"u"&&window.sessionStorage.removeItem("galpao_imperial_platform_unlocked"),r(!1)};return s.jsx(ww.Provider,{value:{isAuthenticated:n,isLoading:l,login:u,logout:h},children:t})}function Gh(){const t=k.useContext(ww);if(!t)throw new Error("usePlatformAuth must be used within PlatformAuthProvider");return t}function K8({onSuccess:t}){const{login:n}=Gh(),[r,l]=k.useState(""),[c,u]=k.useState(!1),[h,g]=k.useState(null),p=async m=>{m.preventDefault(),u(!0),g(null);try{await n(r),t()}catch(x){g(x instanceof Error?x.message:"Chave inválida.")}finally{u(!1)}};return s.jsx("div",{className:"font-platform min-h-screen bg-[#050505] text-white flex items-center justify-center px-4 py-12",children:s.jsxs("div",{className:"w-full max-w-xl rounded-[40px] border border-white/5 bg-white/[0.02] p-8 sm:p-12 shadow-2xl shadow-black/40",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[s.jsx("div",{className:"w-16 h-16 rounded-[24px] bg-brand-gold/10 flex items-center justify-center",children:s.jsx(x4,{className:"w-8 h-8 text-brand-gold"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[0.4em] text-brand-gold",children:"Acesso interno"}),s.jsx("h1",{className:"text-4xl font-black uppercase tracking-tight",children:"Central da plataforma"})]})]}),s.jsx("p",{className:"text-gray-400 text-sm leading-relaxed mb-8",children:"Esta área é exclusiva para a equipe da plataforma sacar taxas e acompanhar o extrato das comissões por ingresso."}),s.jsxs("form",{onSubmit:p,className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Chave de acesso avançado"}),s.jsxs("div",{className:"relative",children:[s.jsx(L5,{className:"w-5 h-5 text-gray-500 absolute left-5 top-1/2 -translate-y-1/2"}),s.jsx("input",{type:"password",value:r,onChange:m=>l(m.target.value),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl pl-14 pr-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"Digite a chave interna"})]})]}),h&&s.jsx("div",{className:"rounded-2xl border border-red-500/20 bg-red-500/10 px-5 py-4 text-[11px] font-black uppercase tracking-wider text-red-300",children:h}),s.jsx(ie,{type:"submit",variant:"primary",className:"w-full h-16 rounded-[24px] text-xs",disabled:c,children:c?"VALIDANDO...":"ENTRAR NA CENTRAL"})]})]})})}const W8=["CPF","CNPJ","EMAIL","PHONE","EVP"],bi=t=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(t||0),Z8=t=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"medium"}).format(t);function J8({transaction:t}){const n=t.direction==="credit";return s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-black/20 px-6 py-5 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-white font-black text-lg tracking-tight",children:t.description}),s.jsx("p",{className:"text-gray-500 text-[11px] font-bold uppercase tracking-wider mt-1",children:Z8(t.createdAt)})]}),s.jsxs("p",{className:`text-2xl font-platform font-black tracking-tight tabular-nums ${n?"text-emerald-400":"text-red-400"}`,children:[n?"+":"-"," ",bi(t.amount)]})]})}function eR({onBack:t}){const{settings:n,reload:r}=xt(),{logout:l}=Gh(),[c,u]=k.useState({...n,platformRecipientName:n.platformRecipientName||"",platformPixKeyType:n.platformPixKeyType||"CPF",platformPixKey:n.platformPixKey||"",serviceTax:Number(n.serviceTax||0),asaasFeePerOrder:Number(n.asaasFeePerOrder||.99)}),[h,g]=k.useState("3"),[p,m]=k.useState(null),[x,b]=k.useState(""),[v,w]=k.useState(!0),[j,N]=k.useState(!1),[A,E]=k.useState(!1),[D,C]=k.useState(null),O=p==null?void 0:p.platform,Q=k.useMemo(()=>(O==null?void 0:O.transactions)||[],[O]),z=(O==null?void 0:O.availableForManualWithdraw)??Math.max(0,(O==null?void 0:O.balance)||0),I=Math.max(0,Number(h.replace(",","."))||0),P=Math.max(0,Number(c.serviceTax||0)),ee=Math.max(0,Number(c.asaasFeePerOrder||0)),W=I+P+ee,le=async()=>{w(!0),C(null);try{const[te,V]=await Promise.all([TM(),RM()]);u(J=>({...J,...te})),m(V)}catch(te){C(te instanceof Error?te.message:"Não foi possível carregar a central da plataforma.")}finally{w(!1)}};k.useEffect(()=>{le()},[]);const de=async()=>{N(!0),C(null);try{await MM(c),await r(),C("Dados de recebimento da plataforma salvos com sucesso.")}catch(te){C(te instanceof Error?te.message:"Não foi possível salvar os dados da plataforma.")}finally{N(!1)}},ge=async()=>{const te=Number(x.replace(",","."));if(!te||te<=0){C("Informe um valor válido para o saque da plataforma.");return}if(te>z){C("Saldo disponível insuficiente para este saque.");return}E(!0),C(null);try{const V=await DM(te,"Equipe Plataforma");m(V.wallet),b(""),C("Solicitação de saque da plataforma criada com sucesso.")}catch(V){C(V instanceof Error?V.message:"Não foi possível solicitar o saque da plataforma.")}finally{E(!1)}},be=async()=>{await l(),t()};return s.jsx("div",{className:"font-platform min-h-screen bg-[#050505] text-white px-4 py-8 sm:px-8 lg:px-12 lg:py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto space-y-10 pb-16",children:[s.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-brand-gold text-[10px] font-black uppercase tracking-[0.4em]",children:"Interno • plataforma"}),s.jsx("h1",{className:"text-4xl sm:text-5xl font-black uppercase tracking-tight",children:"Central de comissões"}),s.jsx("p",{className:"text-gray-500 text-[11px] font-black uppercase tracking-wider mt-3",children:"Saque das taxas, extrato e conta de recebimento da equipe desenvolvedora"})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs("button",{onClick:()=>void le(),className:"h-14 px-6 rounded-2xl border border-white/10 bg-white/[0.02] text-[10px] font-black uppercase tracking-widest flex items-center gap-3 hover:bg-white/5 transition-all",children:[s.jsx(n4,{className:"w-4 h-4"})," Atualizar"]}),s.jsxs("button",{onClick:()=>void be(),className:"h-14 px-6 rounded-2xl border border-red-500/20 bg-red-500/10 text-[10px] font-black uppercase tracking-widest text-red-300 flex items-center gap-3 hover:bg-red-500/20 transition-all",children:[s.jsx(Ho,{className:"w-4 h-4"})," Sair"]})]})]}),v?s.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[0,1,2,3].map(te=>s.jsx("div",{className:"h-72 rounded-[40px] bg-white/[0.02] border border-white/5 animate-pulse"},te))}):s.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-8",children:[s.jsxs("h2",{className:"text-2xl font-black uppercase tracking-tight flex items-center gap-3",children:[s.jsx(fn,{className:"w-6 h-6 text-brand-gold"})," Pagamento da plataforma"]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Nossa taxa por ingresso"}),s.jsx("input",{type:"number",min:"0",step:"0.01",value:c.serviceTax||0,onChange:te=>u(V=>({...V,serviceTax:Number(te.target.value||0)})),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"Ex.: 1,50"}),s.jsx("p",{className:"text-[10px] text-gray-600 font-bold uppercase tracking-wider px-2",children:"Essa taxa entra no Pix do cliente e alimenta a carteira da plataforma."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Taxa Pix Asaas estimada"}),s.jsx("input",{type:"number",min:"0",step:"0.01",value:c.asaasFeePerOrder||0,onChange:te=>u(V=>({...V,asaasFeePerOrder:Number(te.target.value||0)})),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"Ex.: 0,99"}),s.jsx("p",{className:"text-[10px] text-gray-600 font-bold uppercase tracking-wider px-2",children:"Essa taxa é somada ao Pix e registrada no pedido para acompanhar quanto o Asaas está cobrando."})]}),s.jsxs("div",{className:"rounded-[28px] border border-brand-gold/15 bg-brand-gold/5 p-5 space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Simular ingresso"}),s.jsx("input",{type:"number",min:"0",step:"0.01",value:h,onChange:te=>g(te.target.value),className:"w-full h-14 bg-black/40 border border-white/5 rounded-2xl px-5 text-sm font-black text-white focus:border-brand-wine transition-all outline-none"})]}),s.jsxs("div",{className:"space-y-2 text-[10px] font-black uppercase tracking-wider text-gray-400",children:[s.jsxs("div",{className:"flex justify-between gap-4",children:[s.jsx("span",{children:"Estabelecimento"}),s.jsx("span",{className:"text-white",children:bi(I)})]}),s.jsxs("div",{className:"flex justify-between gap-4",children:[s.jsx("span",{children:"Nossa taxa"}),s.jsx("span",{className:"text-emerald-400",children:bi(P)})]}),s.jsxs("div",{className:"flex justify-between gap-4",children:[s.jsx("span",{children:"Asaas"}),s.jsx("span",{className:"text-red-400",children:bi(ee)})]}),s.jsxs("div",{className:"flex justify-between gap-4 border-t border-white/10 pt-3 text-white",children:[s.jsx("span",{children:"Total no Pix"}),s.jsx("span",{className:"text-brand-gold",children:bi(W)})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Nome do recebedor"}),s.jsx("input",{type:"text",value:c.platformRecipientName||"",onChange:te=>u(V=>({...V,platformRecipientName:te.target.value})),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"Ex.: MinhaBagg Tecnologia"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Tipo da chave"}),s.jsx("select",{value:c.platformPixKeyType||"CPF",onChange:te=>u(V=>({...V,platformPixKeyType:te.target.value})),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",children:W8.map(te=>s.jsx("option",{value:te,className:"bg-[#0b0b0b]",children:te},te))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Chave Pix da plataforma"}),s.jsx("input",{type:"text",value:c.platformPixKey||"",onChange:te=>u(V=>({...V,platformPixKey:te.target.value})),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"CPF, CNPJ, e-mail, telefone ou EVP"})]})]}),s.jsx(ie,{variant:"primary",className:"w-full h-16 rounded-[24px] text-xs",onClick:()=>void de(),disabled:j,children:j?"SALVANDO...":"SALVAR CONTA DA PLATAFORMA"})]}),s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-6",children:[s.jsx("div",{className:"w-16 h-16 rounded-3xl bg-emerald-500/10 flex items-center justify-center",children:s.jsx(oh,{className:"w-7 h-7 text-emerald-400"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest",children:"Saldo disponível da plataforma"}),s.jsx("h2",{className:"text-5xl font-black text-white tracking-tight tabular-nums mt-4",children:bi(z)}),s.jsx("p",{className:"text-[11px] text-gray-500 font-bold uppercase tracking-wider mt-4",children:"Valor líquido acumulado nas taxas por ingresso"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm font-black uppercase tracking-wider",children:[s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-black/20 px-5 py-4",children:[s.jsx("p",{className:"text-[10px] text-gray-500 mb-2",children:"Conta de recebimento"}),s.jsx("p",{className:"text-white break-all",children:(O==null?void 0:O.pixKey)||"Não configurada"})]}),s.jsxs("div",{className:"rounded-[24px] border border-white/5 bg-black/20 px-5 py-4",children:[s.jsx("p",{className:"text-[10px] text-gray-500 mb-2",children:"Recebedor"}),s.jsx("p",{className:"text-white",children:(O==null?void 0:O.recipientName)||"Não informado"})]})]})]}),s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-8",children:[s.jsxs("h2",{className:"text-2xl font-black uppercase tracking-tight flex items-center gap-3",children:[s.jsx(nh,{className:"w-6 h-6 text-brand-gold"})," Sacar comissões"]}),s.jsx("div",{className:"rounded-[28px] border border-white/5 bg-black/20 p-6 text-[11px] font-bold uppercase tracking-wider text-gray-400 leading-relaxed",children:"Solicite aqui o saque do saldo líquido das taxas da plataforma. O valor vai para a chave Pix configurada acima."}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest px-2",children:"Valor do saque"}),s.jsx("input",{type:"number",min:"0",step:"0.01",value:x,onChange:te=>b(te.target.value),className:"w-full h-16 bg-black/40 border border-white/5 rounded-2xl px-6 text-sm font-black text-white focus:border-brand-wine transition-all outline-none",placeholder:"0,00"})]}),s.jsx(ie,{variant:"primary",className:"w-full h-16 rounded-[24px] text-xs",onClick:()=>void ge(),disabled:A||z<=0,children:A?"SOLICITANDO...":"SOLICITAR SAQUE DA PLATAFORMA"}),D&&s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-brand-gold",children:D})]}),s.jsxs("div",{className:"rounded-[40px] bg-white/[0.02] border border-white/5 p-8 sm:p-10 space-y-6",children:[s.jsx("div",{className:"flex items-center justify-between gap-4",children:s.jsxs("h2",{className:"text-2xl font-black uppercase tracking-tight flex items-center gap-3",children:[s.jsx(Dy,{className:"w-6 h-6 text-brand-gold"})," Extrato da plataforma"]})}),s.jsxs("div",{className:"space-y-4 max-h-[420px] overflow-y-auto pr-1",children:[!Q.length&&s.jsx("div",{className:"rounded-[24px] border border-dashed border-white/10 p-8 text-center text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Nenhuma movimentação encontrada."}),Q.map(te=>s.jsx("div",{children:s.jsx(J8,{transaction:te})},te.id))]})]})]})]})})}const tR=t=>t.available!==!1&&t.status!=="paused"&&t.status!=="sold_out"&&(t.isUnlimited||(t.remaining??t.quantity??1)>0),aR=t=>t.batches.find(tR)||t.batches[0],nR=t=>t.toFixed(2).replace(".",","),sR=t=>{const n=t.map(r=>r.trim()).filter(Boolean);return n.length<=2?n.join(" & "):`${n.slice(0,-1).join(", ")} & ${n[n.length-1]}`};function iR({event:t,onBuy:n}){const r=aR(t),l=t.title.trim().split(/\s+/),c=l[0]||t.title,u=l.slice(1).join(" "),h=Number((r==null?void 0:r.price)||0),g=!!r,p="GARANTIR INGRESSO",m=h>0,x=m?`R$ ${nR(h)}`:"Consultar lote",b=t.status==="last_tickets"?"Últimos tickets":"Confirmado";return s.jsxs("section",{className:"relative min-h-[92vh] overflow-hidden bg-bg-black pt-36 pb-20 noise lg:pt-40",children:[s.jsxs("div",{className:"absolute inset-0 z-0",children:[s.jsx(pt,{src:t.imageUrl,alt:t.title,className:"h-full w-full scale-105 object-cover opacity-24 blur-[1px] lg:scale-100"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-bg-black via-bg-black/78 to-bg-black/35"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-bg-black via-bg-black/45 to-transparent"}),s.jsx("div",{className:"absolute bottom-0 right-0 h-[70%] w-[55%] bg-brand-gold/10 blur-[120px]"})]}),s.jsxs("div",{className:"relative z-10 mx-auto grid max-w-7xl grid-cols-1 items-center gap-12 px-6 sm:px-12 lg:grid-cols-[1.15fr_0.85fr] lg:gap-20",children:[s.jsx("div",{className:"text-center lg:text-left",children:s.jsxs(Te.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},children:[s.jsxs("div",{className:"mb-10 inline-flex items-center gap-3 rounded-full border border-brand-gold/30 bg-brand-gold/10 px-5 py-2 text-[10px] font-black uppercase tracking-[0.4em] text-brand-gold shadow-lg",children:[s.jsx("span",{className:"h-2 w-2 rounded-full bg-brand-gold animate-ping"}),"Destaque da semana"]}),s.jsxs("h1",{className:"mb-9 font-display text-6xl font-black uppercase leading-[0.78] tracking-normal text-white drop-shadow-[0_20px_50px_rgba(0,0,0,1)] sm:text-7xl md:text-8xl lg:text-[9.2rem]",children:[c,u&&s.jsx("span",{className:"block text-brand-gold",children:u})]}),s.jsxs("div",{className:"mb-12 space-y-2",children:[s.jsx("p",{className:"text-xs font-black uppercase tracking-[0.3em] text-gray-500",children:"Atrações principais"}),s.jsx("p",{className:"font-display text-2xl font-black italic tracking-tight text-brand-gold opacity-95 sm:text-3xl md:text-4xl",children:sR(t.attractions)})]}),s.jsxs("div",{className:"mb-14 flex flex-wrap justify-center gap-6 text-gray-400 lg:justify-start lg:gap-10",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl border border-white/10 bg-white/5",children:s.jsx(lc,{className:"h-5 w-5 text-brand-gold"})}),s.jsx("span",{className:"text-sm font-black uppercase tracking-widest text-white",children:Ht(t.date,"eeee, dd/MM",{locale:Ca})})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl border border-white/10 bg-white/5",children:s.jsx(pf,{className:"h-5 w-5 text-brand-gold"})}),s.jsx("span",{className:"text-sm font-black uppercase tracking-widest text-white",children:t.location||"Paraju - Domingos Martins/ES"})]})]}),s.jsxs("div",{className:"flex flex-col items-center justify-center gap-8 sm:flex-row lg:justify-start",children:[s.jsxs(ie,{size:"lg",variant:"primary",className:"w-full rounded-[24px] px-8 py-8 text-xs font-black shadow-[0_20px_60px_-15px_rgba(200,162,74,0.45)] sm:w-max sm:px-16 sm:text-sm",disabled:!g,onClick:()=>n(t),children:[p," ",s.jsx(mn,{className:"ml-3 h-5 w-5 flex-shrink-0"})]}),s.jsxs("div",{className:"flex flex-col items-center sm:items-start",children:[s.jsx("span",{className:"mb-1 text-[10px] font-black uppercase tracking-widest text-gray-600",children:m?"A partir de":"Ingresso"}),s.jsx("span",{className:"font-display text-3xl font-black tracking-tighter text-white",children:x})]})]})]})}),s.jsxs(Te.div,{initial:{opacity:0,scale:.9,x:50},animate:{opacity:1,scale:1,x:0},transition:{duration:.8,delay:.2},className:"group relative mx-auto aspect-[4/5] w-full max-w-[430px] lg:max-w-[460px]",children:[s.jsx("div",{className:"pointer-events-none absolute -inset-5 rounded-[56px] bg-brand-gold/25 blur-3xl transition-all duration-700 group-hover:bg-brand-gold/35"}),s.jsxs("div",{className:"relative h-full w-full overflow-hidden rounded-[42px] border border-brand-gold/20 shadow-2xl transition-transform duration-700 lg:rotate-2 group-hover:rotate-0",children:[s.jsx(pt,{src:t.imageUrl,className:"h-full w-full object-cover transition-transform duration-[5000ms] group-hover:scale-110",alt:t.title}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-bg-black via-transparent to-transparent opacity-85"}),s.jsx("div",{className:"absolute inset-x-0 bottom-0 p-6 transition-transform group-hover:translate-y-[-4px] sm:p-8",children:s.jsxs("div",{className:"flex items-center justify-between rounded-[28px] border border-white/15 bg-black/80 p-5 shadow-2xl backdrop-blur-xl sm:p-6",children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"mb-1 text-[10px] font-black uppercase tracking-widest text-brand-gold",children:b}),s.jsx("span",{className:"mb-1 max-w-[170px] truncate text-xl font-black uppercase leading-none tracking-tight text-white",children:t.attractions[0]}),s.jsx("span",{className:"text-[9px] font-bold uppercase leading-none tracking-widest text-gray-500",children:t.category||"Palco principal"})]}),s.jsx("div",{className:"flex h-14 w-14 flex-shrink-0 rotate-3 items-center justify-center rounded-2xl bg-brand-gold text-black shadow-lg",children:s.jsx(qa,{className:"h-7 w-7"})})]})})]}),t.status==="last_tickets"&&s.jsx("div",{className:"absolute -right-3 -top-4 z-20 flex h-24 w-24 rotate-12 items-center justify-center rounded-full border-4 border-bg-black bg-brand-gold p-3 shadow-2xl transition-transform group-hover:rotate-0",children:s.jsxs("div",{className:"flex h-full w-full items-center justify-center rounded-full border-2 border-dashed border-black/15 text-center text-xs font-black uppercase leading-tight text-black",children:["Últimos ",s.jsx("br",{})," Tickets"]})})]})]}),s.jsx("div",{className:"absolute inset-x-0 bottom-0 z-20 h-32 bg-gradient-to-t from-bg-black to-transparent"})]})}const rR=t=>t.status==="active"&&t.available!==!1&&(t.isUnlimited||(t.remaining??0)>0),Nw=t=>t.replace(/\D/g,""),ny=t=>t.trim().split(/\s+/).filter(n=>n.length>=2).length>=2,sy=t=>/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(t.trim()),lR=t=>{const n=Nw(t);return n.length===11&&!/^(\d)\1{10}$/.test(n)},oR=t=>Nw(t).length>=10,cR=(t,n)=>{const r=t.toLowerCase();return r.includes("nome")||r.includes("name")?"Digite seu nome completo, com nome e sobrenome.":r.includes("cpf")||r.includes("cnpj")?"Confira o CPF do comprador. Use os 11 numeros, sem erro de digitacao.":r.includes("email")||r.includes("e-mail")?"Confira o e-mail. Ele precisa estar correto para receber o ingresso.":r.includes("phone")||r.includes("telefone")||r.includes("whatsapp")||r.includes("celular")?"Confira o WhatsApp com DDD. Exemplo: 27999999999.":r.includes("billingtype")||r.includes("credit_card")||r.includes("cartao")?n==="credit_card"?"Nao foi possivel gerar pagamento no cartao agora. Tente Pix ou fale com o suporte.":"Nao foi possivel gerar o Pix agora. Tente novamente em instantes.":`Nao foi possivel gerar o pagamento. Confira os dados e tente novamente. Detalhe: ${t}`};function dR({event:t,onClose:n}){const[r,l]=k.useState("selection"),[c,u]=k.useState(!1),[h,g]=k.useState(null),[p,m]=k.useState(null),[x,b]=k.useState(!1),[v,w]=k.useState(null),[j,N]=k.useState(!1),{settings:A}=xt(),[E,D]=k.useState({name:"",email:"",whatsapp:"",cpf:"",batchId:"",quantity:1,paymentMethod:"pix",sendTicketsSeparately:!1,ticketHolders:[]}),C=k.useMemo(()=>((t==null?void 0:t.batches)||[]).filter(rR),[t]);if(k.useEffect(()=>{if(!t)return;C.some(K=>K.id===E.batchId)||D(K=>{var ne;return{...K,batchId:((ne=C[0])==null?void 0:ne.id)||"",quantity:1,sendTicketsSeparately:!1,ticketHolders:[]}})},[C,t,E.batchId]),k.useEffect(()=>{if(!(h!=null&&h.payment.id)||r!=="payment")return;const Y=window.setInterval(async()=>{try{b(!0);const K=await Yf(h.payment.id);m(K),K.paymentStatus==="paid"&&(l("ticket"),window.clearInterval(Y))}catch{}finally{b(!1)}},8e3);return()=>window.clearInterval(Y)},[h==null?void 0:h.payment.id,r]),!t)return null;const O=C.find(Y=>Y.id===E.batchId)||C[0],Q=O!=null&&O.isUnlimited?10:Math.min((O==null?void 0:O.remaining)??1,10),z=Math.max(1,Number((O==null?void 0:O.ticketsPerUnit)||1)),I=E.quantity*z,P=Math.max(0,Number((A==null?void 0:A.serviceTax)||0)),ee=Math.max(0,Number((A==null?void 0:A.asaasFeePerOrder)||0)),W=O?O.price*E.quantity:0,le=P*E.quantity,de=W+le+ee,ge=Y=>Y.toFixed(2).replace(".",","),be=E.paymentMethod||"pix",te=(h==null?void 0:h.payment.method)||be,V=be==="credit_card",J=te==="credit_card",ae=()=>{if(!O)return"Escolha um lote de ingresso antes de continuar.";if(!ny(E.name))return"Digite seu nome completo, com nome e sobrenome.";if(!sy(E.email))return"Digite um e-mail valido para receber o QR Code.";if(!oR(E.whatsapp))return"Digite seu WhatsApp com DDD. Exemplo: 27999999999.";if(!lR(E.cpf))return"Digite um CPF valido com 11 numeros.";if(E.sendTicketsSeparately){const Y=Math.max(0,I-1);for(let K=0;K<Y;K+=1){const ne=E.ticketHolders[K];if(!ny((ne==null?void 0:ne.name)||""))return`Digite nome e sobrenome do titular do ingresso ${K+2}.`;if(!sy((ne==null?void 0:ne.email)||""))return`Digite um e-mail valido para o titular do ingresso ${K+2}.`}}return null},H=async()=>{if(r==="selection"&&E.batchId){l("form");return}if(r==="form"){const Y=ae();if(Y){w(Y);return}u(!0),w(null);try{const K=await eM({eventId:t.id,batchId:O.id,name:E.name,email:E.email,whatsapp:E.whatsapp,cpf:E.cpf,quantity:E.quantity,paymentMethod:be,ticketHolders:E.sendTicketsSeparately?E.ticketHolders:[]});g(K),m(null),l("payment")}catch(K){const ne=K instanceof Error?K.message:"Erro desconhecido";w(cR(ne,be))}finally{u(!1)}}},M=async Y=>{Y&&(await navigator.clipboard.writeText(Y),N(!0),window.setTimeout(()=>N(!1),1800))},T=(p==null?void 0:p.tickets)||[],U=T[0];return s.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-0 sm:p-4",children:[s.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n,className:"absolute inset-0 bg-black/95 backdrop-blur-md"}),s.jsxs(Te.div,{initial:{opacity:0,scale:.9,y:40},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:40},className:"relative bg-bg-black border border-white/10 w-full h-full sm:h-auto sm:max-w-5xl sm:rounded-[32px] md:rounded-[48px] overflow-hidden shadow-2xl flex flex-col md:flex-row noise",children:[s.jsxs("div",{className:"md:hidden flex items-center justify-between p-4 sm:p-6 border-b border-white/5 bg-black/40 backdrop-blur-md",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 bg-white rounded-lg flex items-center justify-center p-1 border border-white/10 overflow-hidden",children:s.jsx("img",{src:Kn,alt:"Logo",className:"w-full h-full object-contain"})}),s.jsx("span",{className:"font-display font-black uppercase text-lg text-white",children:"Ingressos"})]}),s.jsx("button",{onClick:n,className:"w-8 h-8 rounded-full bg-white/5 flex items-center justify-center border border-white/10",children:s.jsx(Ha,{className:"w-4 h-4 text-white"})})]}),s.jsxs("div",{className:"hidden md:flex flex-col w-[34%] bg-gradient-to-b from-[#111] to-[#050505] p-10 border-r border-white/5 relative",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-full opacity-10 pointer-events-none",children:s.jsx(pt,{src:t.imageUrl,className:"w-full h-full object-cover blur-xl",alt:"Bg"})}),s.jsxs("div",{className:"relative z-10 flex flex-col h-full",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("span",{className:"text-brand-gold text-[10px] uppercase font-black tracking-[0.3em] mb-4 block",children:"Item Selecionado"}),s.jsx("div",{className:"rounded-[32px] overflow-hidden aspect-[4/5] mb-6 border border-white/10 premium-shadow",children:s.jsx(pt,{src:t.imageUrl,alt:t.title,className:"w-full h-full object-cover"})}),s.jsx("h3",{className:"text-2xl font-display font-black text-white leading-tight uppercase tracking-tighter",children:t.title})]}),s.jsxs("div",{className:"mt-auto pt-10 border-t border-white/5 space-y-6",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] uppercase font-black text-gray-600 tracking-widest mb-1",children:"Setor"}),s.jsx("p",{className:"text-sm font-bold text-white uppercase",children:(O==null?void 0:O.name)||"A definir"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] uppercase font-black text-gray-600 tracking-widest mb-1",children:"Total a Pagar"}),s.jsxs("div",{className:"space-y-1 text-[10px] font-black uppercase tracking-widest text-gray-500",children:[s.jsxs("div",{className:"flex justify-between gap-4",children:[s.jsx("span",{children:"Ingressos"}),s.jsxs("span",{children:["R$ ",ge(W)]})]}),s.jsxs("div",{className:"flex justify-between gap-4",children:[s.jsxs("span",{children:["Taxa (",E.quantity,"x)"]}),s.jsxs("span",{children:["R$ ",ge(le)]})]}),s.jsxs("div",{className:"flex justify-between gap-4",children:[s.jsx("span",{children:"Taxa Asaas"}),s.jsxs("span",{children:["R$ ",ge(ee)]})]})]}),s.jsxs("p",{className:"text-4xl font-display font-black text-brand-gold tracking-tighter",children:["R$ ",ge(de)]})]})]})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto relative bg-[#0D0D0D] noise",children:[s.jsx("button",{onClick:n,className:"absolute top-8 right-8 hidden md:block text-gray-500 hover:text-white transition-colors",children:s.jsx(Ha,{className:"w-8 h-8"})}),s.jsx("div",{className:"p-8 sm:p-16",children:s.jsxs(ma,{mode:"wait",children:[r==="selection"&&s.jsxs(Te.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:[s.jsxs("div",{className:"mb-12",children:[s.jsx("h2",{className:"text-4xl sm:text-5xl font-display font-black text-white uppercase tracking-tighter mb-4 leading-none truncate",children:"Ingressos"}),s.jsx("p",{className:"text-gray-500 text-xs font-bold uppercase tracking-widest",children:"Lotes ativos aparecem automaticamente conforme disponibilidade."})]}),s.jsxs("div",{className:"space-y-4 mb-8 sm:mb-12",children:[C.map(Y=>s.jsxs("label",{className:`group block p-4 sm:p-6 rounded-2xl sm:rounded-[32px] border transition-all cursor-pointer ${E.batchId===Y.id?"border-brand-wine bg-brand-wine/5":"border-white/5 bg-white/[0.02] hover:border-white/20"}`,children:[s.jsx("input",{type:"radio",name:"batch",value:Y.id,className:"hidden",checked:E.batchId===Y.id,onChange:K=>D({...E,batchId:K.target.value,quantity:1,sendTicketsSeparately:!1,ticketHolders:[]})}),s.jsxs("div",{className:"flex justify-between items-center gap-4",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-black text-white uppercase tracking-tight text-sm sm:text-lg truncate",children:Y.name}),s.jsx("p",{className:"text-[8px] sm:text-[10px] text-gray-500 font-bold uppercase tracking-widest mt-1",children:Y.isUnlimited?"Disponibilidade ilimitada":`${Y.remaining||0} restantes`})]}),s.jsxs("p",{className:"font-display font-black text-brand-gold text-xl sm:text-2xl tracking-tighter shrink-0",children:["R$ ",ge(Y.price)]})]})]},Y.id)),!C.length&&s.jsx("div",{className:"p-6 rounded-[32px] border border-red-500/20 bg-red-500/10 text-red-300 text-center text-[10px] font-black uppercase tracking-[0.3em]",children:"Não há lotes disponíveis no momento"})]}),s.jsxs("div",{className:"flex items-center justify-between p-4 sm:p-6 bg-white/[0.02] border border-white/5 rounded-2xl sm:rounded-[32px] mb-8 sm:mb-12",children:[s.jsx("span",{className:"font-black text-[8px] sm:text-[10px] uppercase tracking-[0.2em] text-gray-500",children:"Qtd"}),s.jsxs("div",{className:"flex items-center gap-4 sm:gap-6",children:[s.jsx("button",{onClick:()=>D(Y=>{const K=Math.max(1,Y.quantity-1);return{...Y,quantity:K,ticketHolders:Y.ticketHolders.slice(0,Math.max(0,K*z-1))}}),className:"w-10 h-10 sm:w-12 sm:h-12 rounded-full border border-white/10 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all font-black text-xl sm:text-2xl",children:"-"}),s.jsx("span",{className:"font-display font-black text-2xl sm:text-3xl w-6 sm:w-8 text-center",children:E.quantity}),s.jsx("button",{onClick:()=>D(Y=>({...Y,quantity:Math.min(Q||1,Y.quantity+1)})),className:"w-10 h-10 sm:w-12 sm:h-12 rounded-full border border-white/10 flex items-center justify-center hover:bg-brand-wine hover:text-white transition-all font-black text-xl sm:text-2xl",children:"+"})]})]}),z>1&&s.jsxs("p",{className:"mb-8 -mt-6 text-[10px] font-black uppercase tracking-[0.2em] text-brand-gold",children:["Este lote gera ",z," QR Codes por unidade. Total: ",I," QR Codes."]}),s.jsxs("div",{className:"p-5 sm:p-6 bg-white/[0.02] border border-white/5 rounded-2xl sm:rounded-[32px] mb-8 space-y-3",children:[s.jsxs("div",{className:"flex justify-between text-[10px] font-black uppercase tracking-[0.2em] text-gray-500",children:[s.jsx("span",{children:"Subtotal dos ingressos"}),s.jsxs("span",{className:"text-white",children:["R$ ",ge(W)]})]}),s.jsxs("div",{className:"flex justify-between text-[10px] font-black uppercase tracking-[0.2em] text-gray-500",children:[s.jsxs("span",{children:["Taxa de serviço (",E.quantity,"x R$ ",ge(P),")"]}),s.jsxs("span",{className:"text-brand-gold",children:["R$ ",ge(le)]})]}),s.jsxs("div",{className:"flex justify-between text-[10px] font-black uppercase tracking-[0.2em] text-gray-500",children:[s.jsx("span",{children:"Taxa Asaas"}),s.jsxs("span",{className:"text-brand-gold",children:["R$ ",ge(ee)]})]}),s.jsx("div",{className:"h-px bg-white/10"}),s.jsxs("div",{className:"flex justify-between items-end",children:[s.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.25em] text-gray-500",children:"Total com taxa"}),s.jsxs("span",{className:"text-3xl font-display font-black text-brand-gold tracking-tighter",children:["R$ ",ge(de)]})]})]}),s.jsxs(ie,{className:"w-full py-5 sm:py-6 rounded-xl sm:rounded-[32px] text-xs sm:text-sm font-black tracking-widest",variant:"gold",disabled:!E.batchId||!C.length,onClick:H,children:["IDENTIFICAÇÃO ",s.jsx(mn,{className:"w-5 h-5 ml-2"})]})]},"selection"),r==="form"&&s.jsxs(Te.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:[s.jsxs("div",{className:"mb-12",children:[s.jsx("h2",{className:"text-4xl sm:text-5xl font-display font-black text-white uppercase tracking-tighter mb-4 leading-none",children:"Checkout"}),s.jsx("p",{className:"text-gray-500 text-xs font-bold uppercase tracking-widest",children:"Preencha seus dados para recebimento."})]}),s.jsx("div",{className:"space-y-6 mb-12",children:[{icon:Vy,placeholder:"Nome Completo",field:"name"},{icon:cc,placeholder:"E-mail para Envio",field:"email",type:"email"},{icon:Es,placeholder:"WhatsApp (com DDD)",field:"whatsapp"},{icon:fn,placeholder:"CPF do comprador",field:"cpf"}].map((Y,K)=>s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:Y.type||"text",className:"w-full bg-white/[0.02] border border-white/10 rounded-[32px] py-5 px-8 pl-16 text-white focus:border-brand-wine outline-none transition-all placeholder:text-gray-700 font-bold uppercase text-xs tracking-widest",placeholder:Y.placeholder,value:E[Y.field],onChange:ne=>{w(null),D({...E,[Y.field]:ne.target.value})}}),s.jsx(Y.icon,{className:"absolute left-6 top-1/2 -translate-y-1/2 w-6 h-6 text-gray-700"})]},K))}),s.jsxs("div",{className:"mb-12 space-y-4",children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[0.25em] text-gray-500",children:"Forma de pagamento"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("button",{type:"button",onClick:()=>{w(null),D(Y=>({...Y,paymentMethod:"pix"}))},className:`p-5 rounded-[28px] border text-left transition-all ${be==="pix"?"border-brand-gold bg-brand-gold/10":"border-white/10 bg-white/[0.02] hover:border-white/20"}`,children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-black/40 border border-white/10 flex items-center justify-center",children:s.jsx(Ba,{className:"w-5 h-5 text-brand-gold"})}),s.jsx("p",{className:"text-sm font-black uppercase tracking-widest text-white",children:"Pix"})]}),s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-gray-500 leading-relaxed",children:"QR Code e copia e cola na hora."})]}),s.jsxs("button",{type:"button",onClick:()=>{w(null),D(Y=>({...Y,paymentMethod:"credit_card"}))},className:`p-5 rounded-[28px] border text-left transition-all ${be==="credit_card"?"border-brand-gold bg-brand-gold/10":"border-white/10 bg-white/[0.02] hover:border-white/20"}`,children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-black/40 border border-white/10 flex items-center justify-center",children:s.jsx(fn,{className:"w-5 h-5 text-brand-gold"})}),s.jsx("p",{className:"text-sm font-black uppercase tracking-widest text-white",children:"Cartao de credito"})]}),s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-gray-500 leading-relaxed",children:"Abre a fatura segura do Asaas para pagar no cartao."})]})]})]}),I>1&&s.jsxs("div",{className:"mb-12 p-5 sm:p-6 rounded-[32px] bg-white/[0.02] border border-white/10 space-y-5",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-2xl bg-brand-gold/10 border border-brand-gold/20 flex items-center justify-center shrink-0",children:s.jsx(Di,{className:"w-5 h-5 text-brand-gold"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-black uppercase tracking-widest text-white",children:"Envio dos ingressos"}),s.jsxs("p",{className:"text-[10px] uppercase tracking-[0.18em] text-gray-500 font-black leading-relaxed mt-1",children:["Este pedido vai gerar ",I," QR Codes. Quer enviar algum ingresso para outro nome/e-mail?"]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[s.jsxs("button",{type:"button",onClick:()=>D(Y=>({...Y,sendTicketsSeparately:!1,ticketHolders:[]})),className:`p-4 rounded-[24px] border text-left transition-all ${E.sendTicketsSeparately?"border-white/10 bg-black/30 hover:border-white/20":"border-brand-gold bg-brand-gold/10"}`,children:[s.jsx("p",{className:"text-xs font-black uppercase tracking-widest text-white",children:"Não"}),s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-gray-500 mt-2 leading-relaxed",children:"Enviar todos os QR Codes para o e-mail principal."})]}),s.jsxs("button",{type:"button",onClick:()=>D(Y=>({...Y,sendTicketsSeparately:!0})),className:`p-4 rounded-[24px] border text-left transition-all ${E.sendTicketsSeparately?"border-brand-gold bg-brand-gold/10":"border-white/10 bg-black/30 hover:border-white/20"}`,children:[s.jsx("p",{className:"text-xs font-black uppercase tracking-widest text-white",children:"Sim"}),s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-gray-500 mt-2 leading-relaxed",children:"Informar nome e e-mail para outros titulares."})]})]}),E.sendTicketsSeparately&&Array.from({length:Math.max(0,I-1)}).map((Y,K)=>{const ne=E.ticketHolders[K]||{name:"",email:""},ce=(ve,Ge)=>{D(Ne=>{const Et=[...Ne.ticketHolders];return Et[K]={...Et[K]||{name:"",email:""},[ve]:Ge},{...Ne,ticketHolders:Et}})};return s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 p-4 rounded-[24px] bg-black/30 border border-white/10",children:[s.jsxs("div",{className:"sm:col-span-2 text-[10px] uppercase tracking-[0.18em] font-black text-brand-gold",children:["Ingresso ",K+2," de ",I]}),s.jsx("input",{type:"text",className:"w-full bg-white/[0.03] border border-white/10 rounded-[20px] py-4 px-5 text-white focus:border-brand-gold outline-none placeholder:text-gray-700 font-bold uppercase text-base sm:text-xs tracking-widest",placeholder:"Nome do titular",value:ne.name,onChange:ve=>ce("name",ve.target.value)}),s.jsx("input",{type:"email",className:"w-full bg-white/[0.03] border border-white/10 rounded-[20px] py-4 px-5 text-white focus:border-brand-gold outline-none placeholder:text-gray-700 font-bold uppercase text-base sm:text-xs tracking-widest",placeholder:"E-mail do titular",value:ne.email,onChange:ve=>ce("email",ve.target.value)})]},K)})]}),s.jsxs("div",{className:"mb-8 p-5 rounded-[28px] border border-brand-gold/20 bg-brand-gold/5 space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-[10px] font-black uppercase tracking-[0.18em] text-gray-400",children:[s.jsx("span",{children:"Ingressos"}),s.jsxs("span",{children:["R$ ",ge(W)]})]}),s.jsxs("div",{className:"flex justify-between text-[10px] font-black uppercase tracking-[0.18em] text-gray-400",children:[s.jsx("span",{children:"Taxa de serviço"}),s.jsxs("span",{children:["R$ ",ge(le)]})]}),s.jsxs("div",{className:"flex justify-between text-[10px] font-black uppercase tracking-[0.18em] text-gray-400",children:[s.jsx("span",{children:"Taxa Asaas"}),s.jsxs("span",{children:["R$ ",ge(ee)]})]}),s.jsxs("div",{className:"flex justify-between text-sm font-black uppercase tracking-widest text-white pt-2 border-t border-white/10",children:[s.jsx("span",{children:"Total do pedido"}),s.jsxs("span",{className:"text-brand-gold",children:["R$ ",ge(de)]})]})]}),v&&s.jsx("div",{className:"mb-6 rounded-[24px] border border-red-500/30 bg-red-500/10 p-4",children:s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-red-300 leading-relaxed",children:v})}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[s.jsx(ie,{variant:"outline",className:"flex-1 py-6 rounded-[32px]",onClick:()=>l("selection"),children:"VOLTAR"}),s.jsxs(ie,{variant:"gold",className:"flex-[2] py-6 rounded-[32px] text-sm group",onClick:()=>void H(),disabled:c||!O,children:[c?"GERANDO PAGAMENTO...":V?"GERAR PAGAMENTO NO CARTAO":"GERAR PAGAMENTO PIX"," ",s.jsx(mn,{className:"w-5 h-5 ml-2 group-hover:translate-x-1"})]})]})]},"form"),r==="payment"&&h&&s.jsxs(Te.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},className:"py-6",children:[s.jsxs("div",{className:"mb-8 text-center md:text-left",children:[s.jsx("h3",{className:"text-3xl font-display font-black text-white uppercase tracking-tighter mb-4",children:J?"Pague no cartao":"Pague com Pix"}),s.jsxs("p",{className:"text-gray-500 text-xs font-bold uppercase tracking-[0.2em] leading-relaxed",children:["Pedido ",h.orderNumber,". Após o webhook confirmar o pagamento, o ingresso é liberado automaticamente."]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[280px_1fr] gap-8 items-start",children:[s.jsx("div",{className:"flex justify-center md:justify-start",children:J?s.jsxs("div",{className:"w-[252px] h-[252px] rounded-[32px] bg-brand-gold/10 border border-brand-gold/25 flex flex-col items-center justify-center text-center p-8",children:[s.jsx(fn,{className:"w-16 h-16 text-brand-gold mb-5"}),s.jsx("p",{className:"text-[10px] uppercase tracking-[0.25em] font-black text-brand-gold leading-relaxed",children:"Pagamento por cartao via Asaas"})]}):h.pix.encodedImage?s.jsx("div",{className:"bg-white rounded-[32px] p-4 shadow-2xl",children:s.jsx("img",{src:`data:image/png;base64,${h.pix.encodedImage}`,alt:"QR Code Pix",className:"w-[220px] h-[220px] object-contain"})}):h.pix.payload?s.jsx(ki,{value:h.pix.payload,size:220}):s.jsx("div",{className:"w-[252px] h-[252px] rounded-[32px] bg-white text-black flex items-center justify-center text-sm font-black p-6 text-center",children:"Configure o Asaas para exibir o QR Code real"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.03] border border-white/10 text-center md:text-left",children:[s.jsx("p",{className:"text-[10px] text-gray-600 font-black uppercase tracking-widest mb-1",children:"Total do Pedido"}),s.jsxs("p",{className:"text-3xl font-display font-black text-white",children:["R$ ",ge(h.totalValue)]})]}),!J&&h.pix.payload&&s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.03] border border-white/10 text-left break-all",children:[s.jsx("p",{className:"text-[9px] text-gray-600 font-black uppercase tracking-widest mb-3",children:"Pix copia e cola"}),s.jsx("p",{className:"text-[11px] text-gray-200 leading-relaxed",children:h.pix.payload})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[!J&&h.pix.payload&&s.jsxs(ie,{variant:"outline",className:"flex-1 py-5 rounded-[32px] text-[10px] border-brand-gold/30 text-brand-gold uppercase tracking-[0.3em] font-black",onClick:()=>void M(h.pix.payload),children:[j?"CÓDIGO COPIADO":"COPIAR PIX"," ",s.jsx(sh,{className:"w-4 h-4 ml-2"})]}),h.payment.invoiceUrl&&s.jsxs(ie,{variant:J?"gold":"outline",className:"flex-1 py-5 rounded-[32px] text-[10px] uppercase tracking-[0.3em] font-black border-white/10",onClick:()=>window.open(h.payment.invoiceUrl,"_blank"),children:[J?"PAGAR NO CARTAO":"ABRIR FATURA"," ",s.jsx(Si,{className:"w-4 h-4 ml-2"})]})]}),s.jsx("div",{className:"p-5 rounded-[28px] bg-green-500/10 border border-green-500/20",children:s.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-green-400",children:(p==null?void 0:p.paymentStatus)==="paid"?"Pagamento confirmado. Seu ingresso já está liberado.":x?"Verificando pagamento no Asaas...":"Aguardando pagamento. O status é conferido automaticamente."})})]})]})]},"payment"),r==="ticket"&&p&&s.jsxs(Te.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},className:"py-4 space-y-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-green-500/20 border border-green-500/40 flex items-center justify-center mx-auto mb-4",children:s.jsx(Dt,{className:"w-8 h-8 text-green-500"})}),s.jsx("h3",{className:"text-3xl font-display font-black text-white uppercase tracking-tighter mb-3",children:"Ingresso Liberado"}),s.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest",children:"Cada ingresso tem QR Code único. O envio por e-mail é feito individualmente."}),s.jsxs("div",{className:"mt-5 p-5 rounded-[28px] bg-brand-gold/10 border border-brand-gold/25 text-left",children:[s.jsx("p",{className:"text-brand-gold text-[10px] font-black uppercase tracking-[0.25em] mb-2",children:"Tire um print do QR Code agora"}),s.jsx("p",{className:"text-gray-300 text-xs font-bold leading-relaxed uppercase tracking-widest",children:"Por segurança, salve o print deste ingresso. Se perder o e-mail ou a imagem não abrir no Gmail, Outlook ou Hotmail, a portaria consegue consultar seu QR Code pelo CPF do comprador e pelo número do pedido."})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[300px_1fr] gap-8 items-start",children:[s.jsx("div",{className:"flex justify-center",children:(U==null?void 0:U.qrValue)&&s.jsx(ki,{value:U.qrValue,size:240})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.03] border border-white/10",children:[s.jsx("p",{className:"text-[10px] text-gray-600 font-black uppercase tracking-widest mb-2",children:"Titular"}),s.jsx("p",{className:"text-lg font-black text-white uppercase",children:p.buyerName}),s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest mt-4",children:"CPF"}),s.jsx("p",{className:"text-sm text-brand-gold font-black",children:p.customerCpf||E.cpf}),s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest mt-4",children:"Pedido"}),s.jsx("p",{className:"text-sm text-white font-black",children:p.orderNumber}),s.jsx("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest mt-4",children:"Consulta na portaria"}),s.jsx("p",{className:"text-xs text-gray-300 font-bold uppercase tracking-wider leading-relaxed",children:"Se precisar, informe o CPF ou o pedido para localizar o ingresso."})]}),s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.03] border border-white/10",children:[s.jsx("p",{className:"text-[10px] text-gray-600 font-black uppercase tracking-widest mb-2",children:"Código do Ingresso"}),s.jsx("p",{className:"text-base font-mono font-black text-brand-gold break-all",children:U==null?void 0:U.code}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 mt-4",children:[s.jsx(ie,{variant:"outline",className:"flex-1 py-4 rounded-[24px] text-[10px]",onClick:()=>void M(U==null?void 0:U.code),children:"COPIAR CÓDIGO"}),s.jsx(ie,{variant:"outline",className:"flex-1 py-4 rounded-[24px] text-[10px]",onClick:()=>void M(U==null?void 0:U.qrValue),children:"COPIAR DADO QR"})]})]}),T.length>1&&s.jsxs("div",{className:"p-6 rounded-[32px] bg-white/[0.03] border border-white/10 space-y-4",children:[s.jsx("p",{className:"text-[10px] text-gray-600 font-black uppercase tracking-widest",children:"Todos os ingressos do pedido"}),T.map((Y,K)=>s.jsxs("div",{className:"grid grid-cols-[64px_1fr] gap-4 items-center p-3 rounded-[20px] bg-black/30 border border-white/10",children:[Y.qrValue&&s.jsx(ki,{value:Y.qrValue,size:64}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("p",{className:"text-[9px] text-brand-gold font-black uppercase tracking-widest",children:["Ingresso ",K+1,"/",T.length]}),s.jsx("p",{className:"font-mono text-white text-[11px] break-all mt-1",children:Y.code}),s.jsx("p",{className:"text-gray-500 uppercase font-black text-[9px] tracking-wider mt-1",children:Y.holderEmail||p.email})]})]},Y.code))]}),s.jsxs(ie,{className:"w-full py-5 rounded-[32px] bg-green-600 hover:bg-green-700 text-white gap-3 uppercase font-black text-[10px] tracking-widest shadow-[0_10px_30px_rgba(22,163,74,0.3)]",onClick:()=>window.open(`https://wa.me/5527997532187?text=Pagamento+confirmado+pedido+${p.orderNumber}+ingresso+${U==null?void 0:U.code}`,"_blank"),children:["ENVIAR NO WHATSAPP ",s.jsx(Va,{className:"w-5 h-5 flex-shrink-0"})]})]})]})]},"ticket")]})})]})]})]})}const iy=[{id:"ig-default-1",url:"https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&q=80",title:"Salão do Galpão Imperial",type:"instagram",displayOrder:0},{id:"ig-default-2",url:"https://images.unsplash.com/photo-1544148103-0773bf10d330?auto=format&fit=crop&q=80",title:"Buffet servido no local",type:"instagram",displayOrder:1},{id:"ig-default-3",url:"https://images.unsplash.com/photo-1510812431401-41d2bd2722f3?auto=format&fit=crop&q=80",title:"Bar e bebidas selecionadas",type:"instagram",displayOrder:2},{id:"ig-default-4",url:"https://images.unsplash.com/photo-1528605248644-14dd04022da1?auto=format&fit=crop&q=80",title:"Mesa para grupos",type:"instagram",displayOrder:3}],ry="https://www.instagram.com/galpao.imperial/",uR="https://www.facebook.com/galpao.imperial/",fR=new Set(["active","featured","last_tickets"]),hR=t=>{const n=new Date(t.date);return n.setHours(23,59,59,999),n>=new Date},mR=t=>{const n=t.filter(r=>fR.has(r.status)&&hR(r)).sort((r,l)=>r.date.getTime()-l.date.getTime());return n.find(r=>r.featured||r.status==="featured")||n[0]||null},pR=t=>{try{return new URL(t).hostname===["i","imgur","com"].join(".")}catch{return!1}};function xR(){const{settings:t,galleryImages:n,events:r,loading:l}=xt(),[c,u]=k.useState(null),h=n.filter(N=>N.type==="instagram");h.length;const g=n.filter(N=>N.type==="upload"&&!pR(N.url)),p=g.length?g:iy,m=k.useMemo(()=>mR(r),[r]),b=`https://wa.me/55${t.whatsapp.replace(/\D/g,"")||"27997532187"}?text=${encodeURIComponent("Olá! Quero fazer uma reserva no Galpão Imperial.")}`,v=t.googleMapsLink||"https://maps.app.goo.gl/3appdn2QiPPDTPk87",w=t.wazeLink||"https://waze.com/ul?q=Galp%C3%A3o%20Imperial%20Paraju%20Domingos%20Martins%20ES&navigate=yes",j=N=>{const A=document.getElementById(N);A&&A.scrollIntoView({behavior:"smooth"})};return k.useEffect(()=>{const N=sessionStorage.getItem("galpao_imperial_scroll_target");N&&(window.setTimeout(()=>j(N),250),sessionStorage.removeItem("galpao_imperial_scroll_target"))},[]),s.jsxs("div",{className:"min-h-screen bg-bg-black selection:bg-brand-gold selection:text-black overflow-x-hidden",children:[s.jsx(Uh,{}),s.jsxs("main",{className:"relative z-10",children:[m?s.jsx(iR,{event:m,onBuy:u}):l?s.jsx("section",{className:"relative min-h-[92vh] bg-bg-black pt-36 pb-20 noise",children:s.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_20%,rgba(200,162,74,0.12),transparent_34rem)]"})}):s.jsxs("section",{className:"relative min-h-[92vh] overflow-hidden bg-bg-black pt-36 pb-20 noise",children:[s.jsxs("div",{className:"absolute inset-0 z-0",children:[s.jsx(pt,{src:"/galpao-imperial/ambiente/image.png",alt:"Ambiente do Galpão Imperial",className:"h-full w-full object-cover opacity-24"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-bg-black via-bg-black/78 to-bg-black/25"}),s.jsx("div",{className:"absolute inset-x-0 bottom-0 h-48 bg-gradient-to-t from-bg-black to-transparent"})]}),s.jsxs("div",{className:"relative z-10 mx-auto grid max-w-7xl grid-cols-1 items-end gap-14 px-6 sm:px-12 lg:grid-cols-[1.05fr_0.95fr]",children:[s.jsxs("div",{className:"max-w-4xl",children:[s.jsx("div",{className:"mb-10 inline-flex items-center gap-3 rounded-full border border-brand-gold/30 bg-brand-gold/10 px-5 py-2 text-[10px] font-black uppercase tracking-[0.35em] text-brand-gold",children:"Restaurante • Bar • Eventos"}),s.jsxs("h1",{className:"font-display text-6xl font-black uppercase leading-[0.82] tracking-normal text-white sm:text-7xl lg:text-[8.6rem]",children:["Galpão ",s.jsx("span",{className:"block text-brand-gold",children:"Imperial"})]}),s.jsx("p",{className:"mt-10 max-w-2xl text-sm font-bold uppercase leading-loose tracking-[0.18em] text-gray-400",children:"Um endereço casual e sofisticado para almoço, buffet, boas bebidas, música ao vivo e encontros memoráveis em Paraju, Domingos Martins."}),s.jsxs("div",{className:"mt-12 flex flex-col gap-4 sm:flex-row",children:[s.jsxs(ie,{className:"rounded-2xl px-10 py-7 text-[11px] font-black tracking-widest",onClick:()=>window.open(b,"_blank"),children:["FAZER RESERVA ",s.jsx(mn,{className:"h-4 w-4"})]}),s.jsx(ie,{variant:"outline",className:"rounded-2xl px-10 py-7 text-[11px] font-black tracking-widest",onClick:()=>j("experiencia"),children:"CONHECER O ESPAÇO"})]})]}),s.jsxs("div",{className:"relative hidden min-h-[560px] lg:block",children:[s.jsx("div",{className:"absolute right-0 top-0 h-[520px] w-[390px] overflow-hidden rounded-[56px] border border-brand-gold/20 shadow-2xl rotate-2",children:s.jsx(pt,{src:"/galpao-imperial/ambiente/image.png",alt:"Mesas e ambiente do Galpão Imperial",className:"h-full w-full object-cover"})}),s.jsxs("div",{className:"absolute bottom-0 left-0 w-[330px] rounded-[40px] border border-brand-gold/20 bg-black/80 p-8 backdrop-blur-xl",children:[s.jsx("img",{src:Kn,alt:"Galpão Imperial",className:"mb-6 h-16 w-16 rounded-full"}),s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[0.35em] text-brand-gold",children:"Aceita reservas"}),s.jsx("p",{className:"mt-3 text-2xl font-display font-black uppercase leading-tight text-white",children:"Mesas, grupos e espaço privativo para eventos."})]})]})]})]}),s.jsx("section",{className:"border-y border-white/5 bg-white/[0.02] py-24",id:"experiencia",children:s.jsxs("div",{className:"mx-auto max-w-7xl px-6 sm:px-12",children:[s.jsxs("div",{className:"mb-16 grid gap-8 lg:grid-cols-[0.9fr_1.1fr] lg:items-end",children:[s.jsxs("div",{children:[s.jsx("span",{className:"mb-4 block text-[10px] font-black uppercase tracking-[0.4em] text-brand-gold",children:"Experiência"}),s.jsx("h2",{className:"font-display text-4xl font-black uppercase leading-none text-white md:text-6xl",children:"Almoço, bar e convivência no mesmo lugar."})]}),s.jsx("p",{className:"max-w-xl text-xs font-bold uppercase leading-loose tracking-widest text-gray-500 lg:ml-auto",children:"O Galpão Imperial combina buffet, mesas externas, bar completo e atendimento de garçons em uma atmosfera aconchegante, casual e refinada."})]}),s.jsx("div",{className:"grid grid-cols-1 gap-5 md:grid-cols-2 lg:grid-cols-4",children:[{icon:D4,title:"Buffet à vontade",text:"Almoço, serviço de buffet, sobremesas e lugar para sentar."},{icon:l0,title:"Bar no local",text:"Cervejas, destilados, vinhos e bebidas para acompanhar a refeição."},{icon:X5,title:"Música ao vivo",text:"Programação musical em dias selecionados, com clima tranquilo."},{icon:Di,title:"Espaço privativo",text:"Reservas para grupos, comemorações e encontros corporativos."}].map(N=>s.jsxs("div",{className:"group rounded-[32px] border border-white/5 bg-black/35 p-8 transition-all hover:border-brand-gold/35 hover:bg-brand-gold/5",children:[s.jsx(N.icon,{className:"mb-7 h-7 w-7 text-brand-gold"}),s.jsx("h3",{className:"mb-3 font-display text-2xl font-black uppercase text-white",children:N.title}),s.jsx("p",{className:"text-[11px] font-bold uppercase leading-relaxed tracking-widest text-gray-500",children:N.text})]},N.title))})]})}),s.jsx("section",{className:"py-28",id:"menu",children:s.jsxs("div",{className:"mx-auto grid max-w-7xl grid-cols-1 gap-14 px-6 sm:px-12 lg:grid-cols-[0.95fr_1.05fr] lg:items-center",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(pt,{src:"https://images.unsplash.com/photo-1543352634-a1c51d9f1fa7?auto=format&fit=crop&q=80",alt:"Buffet e pratos servidos",className:"h-[420px] rounded-[40px] object-cover"}),s.jsxs("div",{className:"space-y-4 pt-16",children:[s.jsx(pt,{src:"https://images.unsplash.com/photo-1544025162-d76694265947?auto=format&fit=crop&q=80",alt:"Porções e refeição",className:"h-48 rounded-[32px] object-cover"}),s.jsx(pt,{src:"https://images.unsplash.com/photo-1513558161293-cdaf765ed2fd?auto=format&fit=crop&q=80",alt:"Bebidas no bar",className:"h-48 rounded-[32px] object-cover"})]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"mb-4 block text-[10px] font-black uppercase tracking-[0.4em] text-brand-gold",children:"Menu"}),s.jsx("h2",{className:"font-display text-4xl font-black uppercase leading-none text-white md:text-6xl",children:"Do almoço ao último brinde."}),s.jsx("div",{className:"mt-10 grid gap-4 sm:grid-cols-2",children:[{icon:s5,label:"Almoço e buffet"},{icon:_y,label:"Comida tarde da noite"},{icon:z4,label:"Vinhos e destilados"},{icon:l0,label:"Ótima seleção de cervejas"}].map(N=>s.jsxs("div",{className:"flex items-center gap-4 rounded-2xl border border-white/5 bg-white/[0.03] p-5",children:[s.jsx(N.icon,{className:"h-5 w-5 text-brand-gold"}),s.jsx("span",{className:"text-[11px] font-black uppercase tracking-widest text-white",children:N.label})]},N.label))}),s.jsx("p",{className:"mt-8 text-sm font-bold uppercase leading-loose tracking-wide text-gray-500",children:"Ideal para almoço, refeição rápida, encontro a dois, grupos, turistas e quem procura um lugar bonito para comer com calma."})]})]})}),s.jsx("section",{className:"border-y border-white/5 bg-white/[0.02] py-28",id:"estrutura",children:s.jsxs("div",{className:"mx-auto max-w-7xl px-6 sm:px-12",children:[s.jsxs("div",{className:"mb-14 max-w-3xl",children:[s.jsx("span",{className:"mb-4 block text-[10px] font-black uppercase tracking-[0.4em] text-brand-gold",children:"Estrutura"}),s.jsx("h2",{className:"font-display text-4xl font-black uppercase leading-none text-white md:text-6xl",children:"Conforto para todos os momentos."})]}),s.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[{icon:Uk,title:"Acessibilidade completa",text:"Entrada, banheiro, assento e estacionamento acessíveis para pessoas em cadeira de rodas."},{icon:t5,title:"Estacionamento gratuito",text:"Muitas vagas, estacionamento descoberto gratuito e opções na rua."},{icon:Fk,title:"Bom para crianças",text:"Ambiente adequado para famílias, aniversários infantis e cadeirinhas altas."},{icon:Ey,title:"Reservas aceitas",text:"Planeje almoço, comemoração, mesa para grupo ou evento privativo."},{icon:fn,title:"Pagamentos práticos",text:"Cartão de crédito, débito e pagamentos por aproximação via NFC."},{icon:Dt,title:"Ambiente versátil",text:"Aconchegante, casual, romântico, sofisticado, tranquilo e atual."}].map(N=>s.jsxs("div",{className:"rounded-[28px] border border-white/5 bg-black/30 p-7",children:[s.jsx(N.icon,{className:"mb-5 h-6 w-6 text-brand-gold"}),s.jsx("h3",{className:"mb-2 font-black uppercase tracking-wide text-white",children:N.title}),s.jsx("p",{className:"text-[11px] font-bold uppercase leading-relaxed tracking-widest text-gray-500",children:N.text})]},N.title))})]})}),s.jsx("section",{className:"py-28",id:"galeria",children:s.jsxs("div",{className:"mx-auto max-w-7xl px-6 sm:px-12",children:[s.jsxs("div",{className:"mb-12 flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between",children:[s.jsxs("div",{children:[s.jsx("span",{className:"mb-4 block text-[10px] font-black uppercase tracking-[0.4em] text-brand-gold",children:"Ambiente"}),s.jsx("h2",{className:"font-display text-4xl font-black uppercase leading-none text-white md:text-6xl",children:"Mesas, bar e clima de encontro."})]}),s.jsxs(ie,{variant:"outline",className:"w-max rounded-2xl px-8 py-5 text-[10px]",onClick:()=>window.open(t.instagram?`https://instagram.com/${t.instagram.replace("@","")}`:ry,"_blank"),children:["VER INSTAGRAM ",s.jsx(qo,{className:"h-4 w-4"})]})]}),s.jsx("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4 lg:grid-cols-5",children:p.slice(0,5).map((N,A)=>s.jsx("div",{className:`overflow-hidden rounded-[24px] ${A===0?"col-span-2 row-span-2 aspect-square":"aspect-square"}`,children:s.jsx(pt,{src:N.url,alt:N.title||"Ambiente Galpão Imperial",className:"h-full w-full object-cover transition-transform duration-700 hover:scale-105"})},N.id||A))})]})}),s.jsxs("section",{className:"relative overflow-hidden border-t border-white/5 bg-white/[0.02] py-32",id:"localizacao",children:[s.jsx("div",{className:"absolute inset-0 opacity-40 imperial-map-grid"}),s.jsxs("div",{className:"relative z-10 mx-auto grid max-w-7xl grid-cols-1 gap-14 px-4 sm:px-8 lg:grid-cols-[0.85fr_1.15fr] lg:items-center",children:[s.jsxs("div",{className:"text-center lg:text-left",children:[s.jsx("span",{className:"mb-6 block text-[10px] font-black uppercase tracking-[0.5em] text-brand-gold",children:"Como Chegar"}),s.jsxs("h2",{className:"mb-10 font-display text-5xl font-black uppercase leading-[0.88] text-white md:text-7xl",children:["Rota fácil para ",s.jsx("br",{})," ",s.jsx("span",{className:"text-brand-gold",children:"chegar bem."})]}),s.jsx("p",{className:"mx-auto mb-10 max-w-xl text-sm font-bold uppercase leading-loose tracking-wide text-gray-500 lg:mx-0",children:"Galpão Imperial fica em Tijuco Preto, Paraju, Domingos Martins, com acesso prático, estacionamento gratuito e estrutura para receber famílias, grupos e turistas."}),s.jsx("div",{className:"mb-8 rounded-[34px] border border-brand-gold/15 bg-black/45 p-6 text-left premium-shadow",children:s.jsxs("div",{className:"flex items-start gap-5",children:[s.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-brand-gold text-black",children:s.jsx(G5,{className:"h-7 w-7"})}),s.jsxs("div",{children:[s.jsx("p",{className:"mb-1 text-[10px] font-black uppercase tracking-[0.3em] text-brand-gold",children:"Destino no Maps"}),s.jsx("p",{className:"text-lg font-black uppercase leading-tight text-white",children:"Galpão Imperial"}),s.jsx("p",{className:"mt-2 text-[10px] font-bold uppercase leading-relaxed tracking-widest text-gray-500",children:"R. Tijuco Preto - Paraju, Domingos Martins - ES, 29273-000"})]})]})}),s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[s.jsxs(ie,{className:"rounded-[24px] py-6 text-[10px] font-black tracking-widest",onClick:()=>window.open(v,"_blank"),children:["GOOGLE MAPS ",s.jsx(W5,{className:"h-4 w-4"})]}),s.jsxs(ie,{variant:"outline",className:"rounded-[24px] py-6 text-[10px] font-black tracking-widest",onClick:()=>window.open(w,"_blank"),children:["ABRIR NO WAZE ",s.jsx(mn,{className:"h-4 w-4"})]}),s.jsxs(ie,{variant:"outline",className:"rounded-[24px] py-6 text-[10px] font-black tracking-widest sm:col-span-2",onClick:()=>window.open(b,"_blank"),children:["RESERVAR ANTES DE IR ",s.jsx(Es,{className:"h-4 w-4"})]})]})]}),s.jsxs("div",{className:"relative min-h-[620px]",children:[s.jsx("div",{className:"absolute left-0 top-8 hidden h-[560px] w-[78%] rounded-[54px] border border-brand-gold/15 bg-black/80 shadow-2xl lg:block imperial-route-line"}),s.jsx("div",{className:"absolute left-[12%] top-[16%] hidden rounded-full border border-white/10 bg-black/85 px-5 py-3 text-[9px] font-black uppercase tracking-[0.25em] text-gray-400 lg:block",children:"Domingos Martins - ES"}),s.jsx("div",{className:"absolute left-[38%] top-[39%] hidden rounded-full border border-brand-gold/20 bg-brand-gold/10 px-5 py-3 text-[9px] font-black uppercase tracking-[0.25em] text-brand-gold lg:block",children:"Paraju"}),s.jsx("div",{className:"absolute left-[51%] top-[49%] z-20 hidden lg:block",children:s.jsx("div",{className:"imperial-pin-pulse relative flex h-16 w-16 items-center justify-center rounded-full bg-brand-gold text-black shadow-[0_0_42px_rgba(246,220,134,0.55)]",children:s.jsx(pf,{className:"h-8 w-8"})})}),s.jsxs("div",{className:"relative ml-auto overflow-hidden rounded-[48px] border border-brand-gold/20 bg-bg-black shadow-2xl lg:w-[82%]",children:[s.jsx("div",{className:"absolute inset-0 z-[1] imperial-map-grid opacity-70"}),s.jsx("div",{className:"absolute inset-0 z-[2] imperial-route-line opacity-80"}),s.jsx("div",{className:"absolute left-[14%] top-[22%] z-[3] h-[2px] w-[70%] -rotate-12 rounded-full bg-brand-gold/30"}),s.jsx("div",{className:"absolute left-[22%] top-[38%] z-[3] h-[2px] w-[58%] rotate-[28deg] rounded-full bg-brand-gold/25"}),s.jsx("div",{className:"absolute left-[14%] top-[62%] z-[3] h-[2px] w-[72%] rotate-[-4deg] rounded-full bg-white/10"}),s.jsx("div",{className:"absolute left-[18%] top-[18%] z-[4] rounded-full border border-white/10 bg-black/75 px-3 py-1.5 text-[8px] font-black uppercase tracking-[0.22em] text-gray-500",children:"Tijuco Preto"}),s.jsx("div",{className:"absolute right-[14%] top-[36%] z-[4] rounded-full border border-white/10 bg-black/75 px-3 py-1.5 text-[8px] font-black uppercase tracking-[0.22em] text-gray-500",children:"Paraju"}),s.jsx("div",{className:"absolute left-1/2 top-1/2 z-[5] -translate-x-1/2 -translate-y-1/2",children:s.jsx("div",{className:"imperial-pin-pulse relative flex h-16 w-16 items-center justify-center rounded-full bg-brand-gold text-black shadow-[0_0_42px_rgba(246,220,134,0.55)]",children:s.jsx(pf,{className:"h-8 w-8"})})}),s.jsx("div",{className:"absolute left-6 top-6 z-10 rounded-full border border-brand-gold/20 bg-black/80 px-4 py-2 text-[9px] font-black uppercase tracking-[0.25em] text-brand-gold backdrop-blur-xl",children:"Mapa interativo"}),s.jsx("iframe",{title:"Mapa do Galpão Imperial",src:"https://www.google.com/maps?q=Q35W%2B8X%20Paraju%2C%20Domingos%20Martins%20-%20ES&z=16&output=embed",className:"relative z-[6] h-[560px] w-full border-0 grayscale invert contrast-[1.15] opacity-25 mix-blend-screen transition-opacity duration-700 hover:opacity-55",allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"}),s.jsx("div",{className:"relative z-10 grid grid-cols-3 border-t border-brand-gold/10 bg-black/85",children:[{value:"Vagas",label:"gratuitas"},{value:"Reserva",label:"por WhatsApp"},{value:"Acesso",label:"facilitado"}].map(N=>s.jsxs("div",{className:"border-r border-brand-gold/10 p-5 last:border-r-0",children:[s.jsx("p",{className:"font-display text-2xl font-black uppercase text-white",children:N.value}),s.jsx("p",{className:"mt-1 text-[8px] font-black uppercase tracking-[0.25em] text-brand-gold",children:N.label})]},N.value))})]})]})]})]})]}),s.jsx(dR,{event:c,onClose:()=>u(null)}),s.jsx("footer",{className:"bg-bg-black py-24 border-t border-white/5",id:"contato",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-8",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-16 lg:gap-12",children:[s.jsxs("div",{className:"lg:col-span-2",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-10 group cursor-pointer",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:[s.jsx("div",{className:"w-14 h-14 bg-white rounded-[20px] flex items-center justify-center p-2 border border-white/20 group-hover:rotate-12 transition-transform overflow-hidden",children:s.jsx("img",{src:Kn,alt:"Galpão Imperial Logo",className:"w-full h-full object-contain"})}),s.jsxs("span",{className:"font-display font-black text-3xl tracking-tighter uppercase text-white",children:["Galpão ",s.jsx("span",{className:"text-brand-gold text-[10px] block tracking-[0.4em] font-black mt-1",children:"Imperial"})]})]}),s.jsx("p",{className:"text-gray-500 max-w-sm mb-10 text-xs font-bold uppercase leading-loose tracking-widest",children:"Restaurante, bar e espaço para encontros em Paraju, Domingos Martins. Almoço, buffet, reservas, música ao vivo e atendimento para grupos."}),s.jsx("div",{className:"flex gap-4",children:[{href:ry,label:"Instagram Galpao Imperial",Icon:qo},{href:uR,label:"Facebook Galpao Imperial",Icon:k5}].map(({href:N,label:A,Icon:E})=>s.jsx("a",{href:N,target:"_blank",rel:"noreferrer","aria-label":A,className:"w-12 h-12 rounded-2xl bg-white/[0.03] border border-white/10 flex items-center justify-center hover:bg-brand-gold hover:text-black transition-all text-white active:scale-95",children:s.jsx(E,{className:"w-6 h-6"})},A))})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-white font-black mb-8 uppercase tracking-[0.3em] text-[10px]",children:"Contato Direto"}),s.jsxs("div",{className:"space-y-6 text-gray-400 text-xs font-bold uppercase tracking-widest",children:[s.jsxs("div",{className:"flex items-center gap-4 hover:text-white transition-colors cursor-pointer group",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-white/5 flex items-center justify-center group-hover:bg-brand-wine/20 transition-colors",children:s.jsx(Es,{className:"w-4 h-4 text-brand-gold"})}),t.whatsapp]}),s.jsxs("div",{className:"flex items-center gap-4 hover:text-white transition-colors cursor-pointer group",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-white/5 flex items-center justify-center group-hover:bg-brand-wine/20 transition-colors",children:s.jsx(cc,{className:"w-4 h-4 text-brand-gold"})}),t.email||"contato@galpaoimperial.com.br"]})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-white font-black mb-8 uppercase tracking-[0.3em] text-[10px]",children:"Mapa do Site"}),s.jsxs("ul",{className:"space-y-4 text-gray-500 text-xs font-black uppercase tracking-[0.2em]",children:[s.jsx("li",{children:s.jsxs("button",{onClick:()=>window.scrollTo(0,0),className:"hover:text-white transition-colors flex items-center gap-2 group",children:[s.jsx("div",{className:"w-0 group-hover:w-2 h-[2px] bg-brand-wine transition-all"})," Início"]})}),s.jsx("li",{children:s.jsxs("button",{onClick:()=>j("menu"),className:"hover:text-white transition-colors flex items-center gap-2 group",children:[s.jsx("div",{className:"w-0 group-hover:w-2 h-[2px] bg-brand-wine transition-all"})," Menu"]})}),s.jsx("li",{children:s.jsxs("button",{onClick:()=>j("estrutura"),className:"hover:text-white transition-colors flex items-center gap-2 group",children:[s.jsx("div",{className:"w-0 group-hover:w-2 h-[2px] bg-brand-wine transition-all"})," Estrutura"]})}),s.jsx("li",{children:s.jsxs("button",{onClick:()=>j("galeria"),className:"hover:text-white transition-colors flex items-center gap-2 group",children:[s.jsx("div",{className:"w-0 group-hover:w-2 h-[2px] bg-brand-wine transition-all"})," Galeria"]})}),s.jsx("li",{children:s.jsxs("button",{onClick:()=>j("localizacao"),className:"hover:text-white transition-colors flex items-center gap-2 group",children:[s.jsx("div",{className:"w-0 group-hover:w-2 h-[2px] bg-brand-wine transition-all"})," Localização"]})})]})]})]}),s.jsxs("div",{className:"mt-24 pt-12 border-t border-white/5 flex flex-col sm:flex-row items-center justify-between gap-6",children:[s.jsx("div",{className:"text-gray-600 text-[9px] uppercase tracking-[0.5em] font-black",children:"© 2026 Galpão Imperial • All rights reserved"}),s.jsxs("div",{className:"flex gap-8 text-[9px] font-black uppercase tracking-[0.3em] text-gray-500",children:[s.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Privacidade"}),s.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Termos de Uso"})]})]})]})})]})}function gR(){return k.useEffect(()=>{W6()},[]),null}function bR(){return s.jsxs(Nk,{children:[s.jsx(gR,{}),s.jsx(V8,{}),s.jsxs(Wj,{children:[s.jsx(Na,{path:"/",element:s.jsx(xR,{})}),s.jsx(Na,{path:"/admin",element:s.jsx(yR,{})}),s.jsx(Na,{path:"/parceiros",element:s.jsx(wR,{})}),s.jsx(Na,{path:"/presentes/mulheres",element:s.jsx(L8,{})}),s.jsx(Na,{path:"/portaria",element:s.jsx(ay,{})}),s.jsx(Na,{path:"/colaborador",element:s.jsx(ay,{})}),s.jsx(Na,{path:"/lista-presentes",element:s.jsx(F8,{})}),s.jsx(Na,{path:"/plataforma",element:s.jsx(df,{})}),s.jsx(Na,{path:"/plataforma-financeiro",element:s.jsx(df,{})}),s.jsx(Na,{path:"/central-plataforma",element:s.jsx(df,{})})]})]})}function yR(){return s.jsx(O8,{children:s.jsx(vR,{})})}function vR(){const{isAuthenticated:t,isLoading:n}=Hh(),r=Ri();return n?s.jsx("div",{className:"min-h-screen bg-bg-black text-white flex items-center justify-center",children:s.jsx("p",{className:"text-xs font-black uppercase tracking-[0.4em] text-gray-500",children:"Validando acesso..."})}):t?s.jsx(_8,{onBack:()=>r("/")}):s.jsx(Q8,{onSuccess:()=>r("/admin",{replace:!0})})}function wR(){const[t,n]=k.useState(!1),r=Ri(),{membershipPlans:l}=xt();return s.jsxs(s.Fragment,{children:[s.jsx(Uh,{}),s.jsx(P8,{onJoin:()=>n(!0),onBack:()=>r("/")}),s.jsx(OM,{plan:l[0],isOpen:t,onClose:()=>n(!1)})]})}function df(){return s.jsx(X8,{children:s.jsx(NR,{})})}function NR(){const{isAuthenticated:t,isLoading:n}=Gh(),r=Ri();return n?s.jsx("div",{className:"min-h-screen bg-bg-black text-white flex items-center justify-center",children:s.jsx("p",{className:"text-xs font-black uppercase tracking-[0.4em] text-gray-500",children:"Validando acesso interno..."})}):t?s.jsx(eR,{onBack:()=>r("/")}):s.jsx(K8,{onSuccess:()=>r("/plataforma-financeiro",{replace:!0})})}JN.createRoot(document.getElementById("root")).render(s.jsx(k.StrictMode,{children:s.jsx(f8,{children:s.jsx(bR,{})})}));export{jR as c};
