(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const p of m.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function o(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function r(d){if(d.ep)return;d.ep=!0;const m=o(d);fetch(d.href,m)}})();function dh(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var oo={exports:{}},ei={};/** * @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 Ym;function zy(){if(Ym)return ei;Ym=1;var i=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function o(r,d,m){var p=null;if(m!==void 0&&(p=""+m),d.key!==void 0&&(p=""+d.key),"key"in d){m={};for(var v in d)v!=="key"&&(m[v]=d[v])}else m=d;return d=m.ref,{$$typeof:i,type:r,key:p,ref:d!==void 0?d:null,props:m}}return ei.Fragment=u,ei.jsx=o,ei.jsxs=o,ei}var Gm;function My(){return Gm||(Gm=1,oo.exports=zy()),oo.exports}var f=My(),co={exports:{}},ti={},fo={exports:{}},mo={};/** * @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 Xm;function Oy(){return Xm||(Xm=1,(function(i){function u(R,$){var ae=R.length;R.push($);e:for(;0>>1,ce=R[ie];if(0>>1;ie<_;){var L=2*(ie+1)-1,J=R[L],I=L+1,fe=R[I];if(0>d(J,ae))Id(fe,J)?(R[ie]=fe,R[I]=ae,ie=I):(R[ie]=J,R[L]=ae,ie=L);else if(Id(fe,ae))R[ie]=fe,R[I]=ae,ie=I;else break e}}return $}function d(R,$){var ae=R.sortIndex-$.sortIndex;return ae!==0?ae:R.id-$.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var p=Date,v=p.now();i.unstable_now=function(){return p.now()-v}}var g=[],y=[],E=1,b=null,j=3,z=!1,q=!1,D=!1,X=!1,B=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function U(R){for(var $=o(y);$!==null;){if($.callback===null)r(y);else if($.startTime<=R)r(y),$.sortIndex=$.expirationTime,u(g,$);else break;$=o(y)}}function Z(R){if(D=!1,U(R),!q)if(o(g)!==null)q=!0,K||(K=!0,ue());else{var $=o(y);$!==null&&Me(Z,$.startTime-R)}}var K=!1,Y=-1,F=5,te=-1;function V(){return X?!0:!(i.unstable_now()-teR&&V());){var ie=b.callback;if(typeof ie=="function"){b.callback=null,j=b.priorityLevel;var ce=ie(b.expirationTime<=R);if(R=i.unstable_now(),typeof ce=="function"){b.callback=ce,U(R),$=!0;break t}b===o(g)&&r(g),U(R)}else r(g);b=o(g)}if(b!==null)$=!0;else{var _=o(y);_!==null&&Me(Z,_.startTime-R),$=!1}}break e}finally{b=null,j=ae,z=!1}$=void 0}}finally{$?ue():K=!1}}}var ue;if(typeof M=="function")ue=function(){M(ee)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,_e=Oe.port2;Oe.port1.onmessage=ee,ue=function(){_e.postMessage(null)}}else ue=function(){B(ee,0)};function Me(R,$){Y=B(function(){R(i.unstable_now())},$)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(R){R.callback=null},i.unstable_forceFrameRate=function(R){0>R||125ie?(R.sortIndex=ae,u(y,R),o(g)===null&&R===o(y)&&(D?(k(Y),Y=-1):D=!0,Me(Z,ae-ie))):(R.sortIndex=ce,u(g,R),q||z||(q=!0,K||(K=!0,ue()))),R},i.unstable_shouldYield=V,i.unstable_wrapCallback=function(R){var $=j;return function(){var ae=j;j=$;try{return R.apply(this,arguments)}finally{j=ae}}}})(mo)),mo}var Qm;function Ry(){return Qm||(Qm=1,fo.exports=Oy()),fo.exports}var ho={exports:{}},re={};/** * @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 Vm;function Dy(){if(Vm)return re;Vm=1;var i=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),p=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),j=Symbol.iterator;function z(_){return _===null||typeof _!="object"?null:(_=j&&_[j]||_["@@iterator"],typeof _=="function"?_:null)}var q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,X={};function B(_,L,J){this.props=_,this.context=L,this.refs=X,this.updater=J||q}B.prototype.isReactComponent={},B.prototype.setState=function(_,L){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,L,"setState")},B.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function k(){}k.prototype=B.prototype;function M(_,L,J){this.props=_,this.context=L,this.refs=X,this.updater=J||q}var U=M.prototype=new k;U.constructor=M,D(U,B.prototype),U.isPureReactComponent=!0;var Z=Array.isArray;function K(){}var Y={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function te(_,L,J){var I=J.ref;return{$$typeof:i,type:_,key:L,ref:I!==void 0?I:null,props:J}}function V(_,L){return te(_.type,L,_.props)}function ee(_){return typeof _=="object"&&_!==null&&_.$$typeof===i}function ue(_){var L={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(J){return L[J]})}var Oe=/\/+/g;function _e(_,L){return typeof _=="object"&&_!==null&&_.key!=null?ue(""+_.key):L.toString(36)}function Me(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(K,K):(_.status="pending",_.then(function(L){_.status==="pending"&&(_.status="fulfilled",_.value=L)},function(L){_.status==="pending"&&(_.status="rejected",_.reason=L)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function R(_,L,J,I,fe){var he=typeof _;(he==="undefined"||he==="boolean")&&(_=null);var Te=!1;if(_===null)Te=!0;else switch(he){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(_.$$typeof){case i:case u:Te=!0;break;case E:return Te=_._init,R(Te(_._payload),L,J,I,fe)}}if(Te)return fe=fe(_),Te=I===""?"."+_e(_,0):I,Z(fe)?(J="",Te!=null&&(J=Te.replace(Oe,"$&/")+"/"),R(fe,L,J,"",function(un){return un})):fe!=null&&(ee(fe)&&(fe=V(fe,J+(fe.key==null||_&&_.key===fe.key?"":(""+fe.key).replace(Oe,"$&/")+"/")+Te)),L.push(fe)),1;Te=0;var lt=I===""?".":I+":";if(Z(_))for(var qe=0;qe<_.length;qe++)I=_[qe],he=lt+_e(I,qe),Te+=R(I,L,J,he,fe);else if(qe=z(_),typeof qe=="function")for(_=qe.call(_),qe=0;!(I=_.next()).done;)I=I.value,he=lt+_e(I,qe++),Te+=R(I,L,J,he,fe);else if(he==="object"){if(typeof _.then=="function")return R(Me(_),L,J,I,fe);throw L=String(_),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return Te}function $(_,L,J){if(_==null)return _;var I=[],fe=0;return R(_,I,"","",function(he){return L.call(J,he,fe++)}),I}function ae(_){if(_._status===-1){var L=_._result;L=L(),L.then(function(J){(_._status===0||_._status===-1)&&(_._status=1,_._result=J)},function(J){(_._status===0||_._status===-1)&&(_._status=2,_._result=J)}),_._status===-1&&(_._status=0,_._result=L)}if(_._status===1)return _._result.default;throw _._result}var ie=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ce={map:$,forEach:function(_,L,J){$(_,function(){L.apply(this,arguments)},J)},count:function(_){var L=0;return $(_,function(){L++}),L},toArray:function(_){return $(_,function(L){return L})||[]},only:function(_){if(!ee(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return re.Activity=b,re.Children=ce,re.Component=B,re.Fragment=o,re.Profiler=d,re.PureComponent=M,re.StrictMode=r,re.Suspense=g,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,re.__COMPILER_RUNTIME={__proto__:null,c:function(_){return Y.H.useMemoCache(_)}},re.cache=function(_){return function(){return _.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(_,L,J){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var I=D({},_.props),fe=_.key;if(L!=null)for(he in L.key!==void 0&&(fe=""+L.key),L)!F.call(L,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&L.ref===void 0||(I[he]=L[he]);var he=arguments.length-2;if(he===1)I.children=J;else if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(u){console.error(u)}}return i(),po.exports=By(),po.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 $m;function Ly(){if($m)return ti;$m=1;var i=Ry(),u=Oo(),o=Uy();function r(e){var t="https://react.dev/errors/"+e;if(1ce||(e.current=ie[ce],ie[ce]=null,ce--)}function J(e,t){ce++,ie[ce]=e.current,e.current=t}var I=_(null),fe=_(null),he=_(null),Te=_(null);function lt(e,t){switch(J(he,t),J(fe,e),J(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=cm(t),e=fm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(I),J(I,e)}function qe(){L(I),L(fe),L(he)}function un(e){e.memoizedState!==null&&J(Te,e);var t=I.current,a=fm(t,e.type);t!==a&&(J(fe,e),J(I,a))}function mi(e){fe.current===e&&(L(I),L(fe)),Te.current===e&&(L(Te),Fn._currentValue=ae)}var Vs,ko;function $a(e){if(Vs===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Vs=t&&t[1]||"",ko=-1)":-1n||S[l]!==A[n]){var H=` `+S[l].replace(" at new "," at ");return e.displayName&&H.includes("")&&(H=H.replace("",e.displayName)),H}while(1<=l&&0<=n);break}}}finally{Zs=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?$a(a):""}function u0(e,t){switch(e.tag){case 26:case 27:case 5:return $a(e.type);case 16:return $a("Lazy");case 13:return e.child!==t&&t!==null?$a("Suspense Fallback"):$a("Suspense");case 19:return $a("SuspenseList");case 0:case 15:return Ks(e.type,!1);case 11:return Ks(e.type.render,!1);case 1:return Ks(e.type,!0);case 31:return $a("Activity");default:return""}}function qo(e){try{var t="",a=null;do t+=u0(e,a),a=e,e=e.return;while(e);return t}catch(l){return` Error generating stack: `+l.message+` `+l.stack}}var Js=Object.prototype.hasOwnProperty,$s=i.unstable_scheduleCallback,Fs=i.unstable_cancelCallback,r0=i.unstable_shouldYield,o0=i.unstable_requestPaint,mt=i.unstable_now,c0=i.unstable_getCurrentPriorityLevel,Yo=i.unstable_ImmediatePriority,Go=i.unstable_UserBlockingPriority,hi=i.unstable_NormalPriority,f0=i.unstable_LowPriority,Xo=i.unstable_IdlePriority,d0=i.log,m0=i.unstable_setDisableYieldValue,rn=null,ht=null;function xa(e){if(typeof d0=="function"&&m0(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(rn,e)}catch{}}var pt=Math.clz32?Math.clz32:y0,h0=Math.log,p0=Math.LN2;function y0(e){return e>>>=0,e===0?32:31-(h0(e)/p0|0)|0}var pi=256,yi=262144,gi=4194304;function Fa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function vi(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var n=0,s=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~s,l!==0?n=Fa(l):(c&=h,c!==0?n=Fa(c):a||(a=h&~e,a!==0&&(n=Fa(a))))):(h=l&~s,h!==0?n=Fa(h):c!==0?n=Fa(c):a||(a=l&~e,a!==0&&(n=Fa(a)))),n===0?0:t!==0&&t!==n&&(t&s)===0&&(s=n&-n,a=t&-t,s>=a||s===32&&(a&4194048)!==0)?t:n}function on(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function g0(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qo(){var e=gi;return gi<<=1,(gi&62914560)===0&&(gi=4194304),e}function Ws(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function cn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function v0(e,t,a,l,n,s){var c=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var h=e.entanglements,S=e.expirationTimes,A=e.hiddenUpdates;for(a=c&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var T0=/[\n"\\]/g;function jt(e){return e.replace(T0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function lu(e,t,a,l,n,s,c,h){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?nu(e,c,Nt(t)):a!=null?nu(e,c,Nt(a)):l!=null&&e.removeAttribute("value"),n==null&&s!=null&&(e.defaultChecked=!!s),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Nt(h):e.removeAttribute("name")}function lc(e,t,a,l,n,s,c,h){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||a!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){au(e);return}a=a!=null?""+Nt(a):"",t=t!=null?""+Nt(t):a,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),au(e)}function nu(e,t,a){t==="number"&&Si(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function _l(e,t,a,l){if(e=e.options,t){t={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ou=!1;if(Ft)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){ou=!0}}),window.addEventListener("test",hn,hn),window.removeEventListener("test",hn,hn)}catch{ou=!1}var Sa=null,cu=null,_i=null;function cc(){if(_i)return _i;var e,t=cu,a=t.length,l,n="value"in Sa?Sa.value:Sa.textContent,s=n.length;for(e=0;e=gn),yc=" ",gc=!1;function vc(e,t){switch(e){case"keyup":return I0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cl=!1;function ep(e,t){switch(e){case"compositionend":return xc(t);case"keypress":return t.which!==32?null:(gc=!0,yc);case"textInput":return e=t.data,e===yc&&gc?null:e;default:return null}}function tp(e,t){if(Cl)return e==="compositionend"||!pu&&vc(e,t)?(e=cc(),_i=cu=Sa=null,Cl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Cc(a)}}function wc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Si(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Si(e.document)}return t}function vu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var op=Ft&&"documentMode"in document&&11>=document.documentMode,Al=null,xu=null,Sn=null,bu=!1;function Mc(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;bu||Al==null||Al!==Si(l)||(l=Al,"selectionStart"in l&&vu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Sn&&bn(Sn,l)||(Sn=l,l=ys(xu,"onSelect"),0>=c,n-=c,Xt=1<<32-pt(t)+n|a<me?(ve=P,P=null):ve=P.sibling;var Se=w(N,P,C[me],G);if(Se===null){P===null&&(P=ve);break}e&&P&&Se.alternate===null&&t(N,P),T=s(Se,T,me),be===null?le=Se:be.sibling=Se,be=Se,P=ve}if(me===C.length)return a(N,P),xe&&It(N,me),le;if(P===null){for(;meme?(ve=P,P=null):ve=P.sibling;var Xa=w(N,P,Se.value,G);if(Xa===null){P===null&&(P=ve);break}e&&P&&Xa.alternate===null&&t(N,P),T=s(Xa,T,me),be===null?le=Xa:be.sibling=Xa,be=Xa,P=ve}if(Se.done)return a(N,P),xe&&It(N,me),le;if(P===null){for(;!Se.done;me++,Se=C.next())Se=Q(N,Se.value,G),Se!==null&&(T=s(Se,T,me),be===null?le=Se:be.sibling=Se,be=Se);return xe&&It(N,me),le}for(P=l(P);!Se.done;me++,Se=C.next())Se=O(P,N,me,Se.value,G),Se!==null&&(e&&Se.alternate!==null&&P.delete(Se.key===null?me:Se.key),T=s(Se,T,me),be===null?le=Se:be.sibling=Se,be=Se);return e&&P.forEach(function(wy){return t(N,wy)}),xe&&It(N,me),le}function we(N,T,C,G){if(typeof C=="object"&&C!==null&&C.type===D&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case z:e:{for(var le=C.key;T!==null;){if(T.key===le){if(le=C.type,le===D){if(T.tag===7){a(N,T.sibling),G=n(T,C.props.children),G.return=N,N=G;break e}}else if(T.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===F&&ul(le)===T.type){a(N,T.sibling),G=n(T,C.props),Cn(G,C),G.return=N,N=G;break e}a(N,T);break}else t(N,T);T=T.sibling}C.type===D?(G=al(C.props.children,N.mode,G,C.key),G.return=N,N=G):(G=Ri(C.type,C.key,C.props,null,N.mode,G),Cn(G,C),G.return=N,N=G)}return c(N);case q:e:{for(le=C.key;T!==null;){if(T.key===le)if(T.tag===4&&T.stateNode.containerInfo===C.containerInfo&&T.stateNode.implementation===C.implementation){a(N,T.sibling),G=n(T,C.children||[]),G.return=N,N=G;break e}else{a(N,T);break}else t(N,T);T=T.sibling}G=Cu(C,N.mode,G),G.return=N,N=G}return c(N);case F:return C=ul(C),we(N,T,C,G)}if(Me(C))return W(N,T,C,G);if(ue(C)){if(le=ue(C),typeof le!="function")throw Error(r(150));return C=le.call(C),ne(N,T,C,G)}if(typeof C.then=="function")return we(N,T,qi(C),G);if(C.$$typeof===M)return we(N,T,Ui(N,C),G);Yi(N,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,T!==null&&T.tag===6?(a(N,T.sibling),G=n(T,C),G.return=N,N=G):(a(N,T),G=ju(C,N.mode,G),G.return=N,N=G),c(N)):a(N,T)}return function(N,T,C,G){try{jn=0;var le=we(N,T,C,G);return kl=null,le}catch(P){if(P===Hl||P===Hi)throw P;var be=gt(29,P,null,N.mode);return be.lanes=G,be.return=N,be}finally{}}}var ol=ef(!0),tf=ef(!1),ja=!1;function ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ca(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Aa(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ee&2)!==0){var n=l.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),l.pending=t,t=Oi(e),Hc(e,null,a),t}return Mi(e,l,t,a),Oi(e)}function An(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Zo(e,a)}}function Yu(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var n=null,s=null;if(a=a.firstBaseUpdate,a!==null){do{var c={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};s===null?n=s=c:s=s.next=c,a=a.next}while(a!==null);s===null?n=s=t:s=s.next=t}else n=s=t;a={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Gu=!1;function wn(){if(Gu){var e=Ll;if(e!==null)throw e}}function zn(e,t,a,l){Gu=!1;var n=e.updateQueue;ja=!1;var s=n.firstBaseUpdate,c=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var S=h,A=S.next;S.next=null,c===null?s=A:c.next=A,c=S;var H=e.alternate;H!==null&&(H=H.updateQueue,h=H.lastBaseUpdate,h!==c&&(h===null?H.firstBaseUpdate=A:h.next=A,H.lastBaseUpdate=S))}if(s!==null){var Q=n.baseState;c=0,H=A=S=null,h=s;do{var w=h.lane&-536870913,O=w!==h.lane;if(O?(ge&w)===w:(l&w)===w){w!==0&&w===Ul&&(Gu=!0),H!==null&&(H=H.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var W=e,ne=h;w=t;var we=a;switch(ne.tag){case 1:if(W=ne.payload,typeof W=="function"){Q=W.call(we,Q,w);break e}Q=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=ne.payload,w=typeof W=="function"?W.call(we,Q,w):W,w==null)break e;Q=b({},Q,w);break e;case 2:ja=!0}}w=h.callback,w!==null&&(e.flags|=64,O&&(e.flags|=8192),O=n.callbacks,O===null?n.callbacks=[w]:O.push(w))}else O={lane:w,tag:h.tag,payload:h.payload,callback:h.callback,next:null},H===null?(A=H=O,S=Q):H=H.next=O,c|=w;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;O=h,h=O.next,O.next=null,n.lastBaseUpdate=O,n.shared.pending=null}}while(!0);H===null&&(S=Q),n.baseState=S,n.firstBaseUpdate=A,n.lastBaseUpdate=H,s===null&&(n.shared.lanes=0),Ra|=c,e.lanes=c,e.memoizedState=Q}}function af(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function lf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;es?s:8;var c=R.T,h={};R.T=h,ur(e,!1,t,a);try{var S=n(),A=R.S;if(A!==null&&A(h,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var H=vp(S,l);Rn(e,t,H,Et(e))}else Rn(e,t,l,Et(e))}catch(Q){Rn(e,t,{then:function(){},status:"rejected",reason:Q},Et())}finally{$.p=s,c!==null&&h.types!==null&&(c.types=h.types),R.T=c}}function Tp(){}function ir(e,t,a,l){if(e.tag!==5)throw Error(r(476));var n=Uf(e).queue;Bf(e,n,t,ae,a===null?Tp:function(){return Lf(e),a(l)})}function Uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:ae},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Lf(e){var t=Uf(e);t.next===null&&(t=e.alternate.memoizedState),Rn(e,t.next.queue,{},Et())}function sr(){return Ie(Fn)}function Hf(){return Ge().memoizedState}function kf(){return Ge().memoizedState}function Np(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Et();e=Ca(a);var l=Aa(t,e,a);l!==null&&(dt(l,t,a),An(l,t,a)),t={cache:Bu()},e.payload=t;return}t=t.return}}function jp(e,t,a){var l=Et();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Wi(e)?Yf(t,a):(a=Tu(e,t,a,l),a!==null&&(dt(a,e,l),Gf(a,t,l)))}function qf(e,t,a){var l=Et();Rn(e,t,a,l)}function Rn(e,t,a,l){var n={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Wi(e))Yf(t,n);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var c=t.lastRenderedState,h=s(c,a);if(n.hasEagerState=!0,n.eagerState=h,yt(h,c))return Mi(e,t,n,0),ze===null&&zi(),!1}catch{}finally{}if(a=Tu(e,t,n,l),a!==null)return dt(a,e,l),Gf(a,t,l),!0}return!1}function ur(e,t,a,l){if(l={lane:2,revertLane:kr(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Wi(e)){if(t)throw Error(r(479))}else t=Tu(e,a,l,2),t!==null&&dt(t,e,2)}function Wi(e){var t=e.alternate;return e===de||t!==null&&t===de}function Yf(e,t){Yl=Qi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Gf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Zo(e,a)}}var Dn={readContext:Ie,use:Ki,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useLayoutEffect:He,useInsertionEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useSyncExternalStore:He,useId:He,useHostTransitionStatus:He,useFormState:He,useActionState:He,useOptimistic:He,useMemoCache:He,useCacheRefresh:He};Dn.useEffectEvent=He;var Xf={readContext:Ie,use:Ki,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:Ie,useEffect:jf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,$i(4194308,4,zf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return $i(4194308,4,e,t)},useInsertionEffect:function(e,t){$i(4,2,e,t)},useMemo:function(e,t){var a=nt();t=t===void 0?null:t;var l=e();if(cl){xa(!0);try{e()}finally{xa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=nt();if(a!==void 0){var n=a(t);if(cl){xa(!0);try{a(t)}finally{xa(!1)}}}else n=t;return l.memoizedState=l.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=jp.bind(null,de,e),[l.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:function(e){e=er(e);var t=e.queue,a=qf.bind(null,de,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:lr,useDeferredValue:function(e,t){var a=nt();return nr(a,e,t)},useTransition:function(){var e=er(!1);return e=Bf.bind(null,de,e.queue,!0,!1),nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=de,n=nt();if(xe){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),ze===null)throw Error(r(349));(ge&127)!==0||cf(l,t,a)}n.memoizedState=a;var s={value:a,getSnapshot:t};return n.queue=s,jf(df.bind(null,l,s,e),[e]),l.flags|=2048,Xl(9,{destroy:void 0},ff.bind(null,l,s,a,t),null),a},useId:function(){var e=nt(),t=ze.identifierPrefix;if(xe){var a=Qt,l=Xt;a=(l&~(1<<32-pt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Vi++,0<\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?c.createElement("select",{is:l.is}):c.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?c.createElement(n,{is:l.is}):c.createElement(n)}}s[Fe]=t,s[st]=l;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)s.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=s;e:switch(et(s,n,l),n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&na(t)}}return De(t),Sr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&na(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=he.current,Dl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,n=We,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}e[Fe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||rm(e.nodeValue,a)),e||Ta(t,!0)}else e=gs(e).createTextNode(l),e[Fe]=t,t.stateNode=e}return De(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Dl(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Fe]=t}else ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),e=!1}else a=Mu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(xt(t),t):(xt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return De(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Dl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[Fe]=t}else ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),n=!1}else n=Mu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(xt(t),t):(xt(t),null)}return xt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==n&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),as(t,t.updateQueue),De(t),null);case 4:return qe(),e===null&&Xr(t.stateNode.containerInfo),De(t),null;case 10:return ea(t.type),De(t),null;case 19:if(L(Ye),l=t.memoizedState,l===null)return De(t),null;if(n=(t.flags&128)!==0,s=l.rendering,s===null)if(n)Un(l,!1);else{if(ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Xi(e),s!==null){for(t.flags|=128,Un(l,!1),e=s.updateQueue,t.updateQueue=e,as(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)kc(a,e),a=a.sibling;return J(Ye,Ye.current&1|2),xe&&It(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&mt()>us&&(t.flags|=128,n=!0,Un(l,!1),t.lanes=4194304)}else{if(!n)if(e=Xi(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,as(t,e),Un(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!xe)return De(t),null}else 2*mt()-l.renderingStartTime>us&&a!==536870912&&(t.flags|=128,n=!0,Un(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=mt(),e.sibling=null,a=Ye.current,J(Ye,n?a&1|2:a&1),xe&&It(t,l.treeForkCount),e):(De(t),null);case 22:case 23:return xt(t),Qu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),a=t.updateQueue,a!==null&&as(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&L(sl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ea(Xe),De(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Mp(e,t){switch(wu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(Xe),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return mi(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(r(340));ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Ye),null;case 4:return qe(),null;case 10:return ea(t.type),null;case 22:case 23:return xt(t),Qu(),e!==null&&L(sl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(Xe),null;case 25:return null;default:return null}}function md(e,t){switch(wu(t),t.tag){case 3:ea(Xe),qe();break;case 26:case 27:case 5:mi(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:L(Ye);break;case 10:ea(t.type);break;case 22:case 23:xt(t),Qu(),e!==null&&L(sl);break;case 24:ea(Xe)}}function Ln(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var n=l.next;a=n;do{if((a.tag&e)===e){l=void 0;var s=a.create,c=a.inst;l=s(),c.destroy=l}a=a.next}while(a!==n)}}catch(h){je(t,t.return,h)}}function Ma(e,t,a){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var s=n.next;l=s;do{if((l.tag&e)===e){var c=l.inst,h=c.destroy;if(h!==void 0){c.destroy=void 0,n=t;var S=a,A=h;try{A()}catch(H){je(n,S,H)}}}l=l.next}while(l!==s)}}catch(H){je(t,t.return,H)}}function hd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{lf(t,a)}catch(l){je(e,e.return,l)}}}function pd(e,t,a){a.props=fl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){je(e,t,l)}}function Hn(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(n){je(e,t,n)}}function Vt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(n){je(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){je(e,t,n)}else a.current=null}function yd(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(n){je(e,e.return,n)}}function Er(e,t,a){try{var l=e.stateNode;Pp(l,e.type,a,t),l[st]=t}catch(n){je(e,e.return,n)}}function gd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ha(e.type)||e.tag===4}function _r(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gd(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&&Ha(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 Tr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=$t));else if(l!==4&&(l===27&&Ha(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Tr(e,t,a),e=e.sibling;e!==null;)Tr(e,t,a),e=e.sibling}function ls(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ha(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ls(e,t,a),e=e.sibling;e!==null;)ls(e,t,a),e=e.sibling}function vd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);et(t,l,a),t[Fe]=e,t[st]=a}catch(s){je(e,e.return,s)}}var ia=!1,Ze=!1,Nr=!1,xd=typeof WeakSet=="function"?WeakSet:Set,$e=null;function Op(e,t){if(e=e.containerInfo,Zr=Ts,e=zc(e),vu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var n=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{a.nodeType,s.nodeType}catch{a=null;break e}var c=0,h=-1,S=-1,A=0,H=0,Q=e,w=null;t:for(;;){for(var O;Q!==a||n!==0&&Q.nodeType!==3||(h=c+n),Q!==s||l!==0&&Q.nodeType!==3||(S=c+l),Q.nodeType===3&&(c+=Q.nodeValue.length),(O=Q.firstChild)!==null;)w=Q,Q=O;for(;;){if(Q===e)break t;if(w===a&&++A===n&&(h=c),w===s&&++H===l&&(S=c),(O=Q.nextSibling)!==null)break;Q=w,w=Q.parentNode}Q=O}a=h===-1||S===-1?null:{start:h,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(Kr={focusedElem:e,selectionRange:a},Ts=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){switch(t=$e,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),et(s,l,a),s[Fe]=e,Je(s),l=s;break e;case"link":var c=Nm("link","href",n).get(l+(a.href||""));if(c){for(var h=0;hwe&&(c=we,we=ne,ne=c);var N=Ac(h,ne),T=Ac(h,we);if(N&&T&&(O.rangeCount!==1||O.anchorNode!==N.node||O.anchorOffset!==N.offset||O.focusNode!==T.node||O.focusOffset!==T.offset)){var C=Q.createRange();C.setStart(N.node,N.offset),O.removeAllRanges(),ne>we?(O.addRange(C),O.extend(T.node,T.offset)):(C.setEnd(T.node,T.offset),O.addRange(C))}}}}for(Q=[],O=h;O=O.parentNode;)O.nodeType===1&&Q.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;ha?32:a,R.T=null,a=Or,Or=null;var s=Ba,c=ca;if(Ke=0,Jl=Ba=null,ca=0,(Ee&6)!==0)throw Error(r(331));var h=Ee;if(Ee|=4,zd(s.current),Cd(s,s.current,c,a),Ee=h,Qn(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(rn,s)}catch{}return!0}finally{$.p=n,R.T=l,Jd(e,t)}}function Fd(e,t,a){t=At(a,t),t=fr(e.stateNode,t,2),e=Aa(e,t,2),e!==null&&(cn(e,2),Zt(e))}function je(e,t,a){if(e.tag===3)Fd(e,e,a);else for(;t!==null;){if(t.tag===3){Fd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Da===null||!Da.has(l))){e=At(a,e),a=Wf(2),l=Aa(t,a,2),l!==null&&(If(a,l,t,e),cn(l,2),Zt(l));break}}t=t.return}}function Ur(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Bp;var n=new Set;l.set(t,n)}else n=l.get(t),n===void 0&&(n=new Set,l.set(t,n));n.has(a)||(Ar=!0,n.add(a),e=qp.bind(null,e,t,a),t.then(e,e))}function qp(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ze===e&&(ge&a)===a&&(ke===4||ke===3&&(ge&62914560)===ge&&300>mt()-ss?(Ee&2)===0&&$l(e,0):wr|=a,Kl===ge&&(Kl=0)),Zt(e)}function Wd(e,t){t===0&&(t=Qo()),e=tl(e,t),e!==null&&(cn(e,t),Zt(e))}function Yp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Wd(e,a)}function Gp(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),Wd(e,a)}function Xp(e,t){return $s(e,t)}var ms=null,Wl=null,Lr=!1,hs=!1,Hr=!1,La=0;function Zt(e){e!==Wl&&e.next===null&&(Wl===null?ms=Wl=e:Wl=Wl.next=e),hs=!0,Lr||(Lr=!0,Vp())}function Qn(e,t){if(!Hr&&hs){Hr=!0;do for(var a=!1,l=ms;l!==null;){if(e!==0){var n=l.pendingLanes;if(n===0)var s=0;else{var c=l.suspendedLanes,h=l.pingedLanes;s=(1<<31-pt(42|e)+1)-1,s&=n&~(c&~h),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,tm(l,s))}else s=ge,s=vi(l,l===ze?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||on(l,s)||(a=!0,tm(l,s));l=l.next}while(a);Hr=!1}}function Qp(){Id()}function Id(){hs=Lr=!1;var e=0;La!==0&&ty()&&(e=La);for(var t=mt(),a=null,l=ms;l!==null;){var n=l.next,s=Pd(l,t);s===0?(l.next=null,a===null?ms=n:a.next=n,n===null&&(Wl=a)):(a=l,(e!==0||(s&3)!==0)&&(hs=!0)),l=n}Ke!==0&&Ke!==5||Qn(e),La!==0&&(La=0)}function Pd(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,n=e.expirationTimes,s=e.pendingLanes&-62914561;0h)break;var H=S.transferSize,Q=S.initiatorType;H&&om(Q)&&(S=S.responseEnd,c+=H*(S"u"?null:document;function Sm(e,t,a){var l=Il;if(l&&typeof t=="string"&&t){var n=jt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),bm.has(n)||(bm.add(n),e={rel:e,crossOrigin:a,href:t},l.querySelector(n)===null&&(t=l.createElement("link"),et(t,"link",e),Je(t),l.head.appendChild(t)))}}function cy(e){fa.D(e),Sm("dns-prefetch",e,null)}function fy(e,t){fa.C(e,t),Sm("preconnect",e,t)}function dy(e,t,a){fa.L(e,t,a);var l=Il;if(l&&e&&t){var n='link[rel="preload"][as="'+jt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+jt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+jt(a.imageSizes)+'"]')):n+='[href="'+jt(e)+'"]';var s=n;switch(t){case"style":s=Pl(e);break;case"script":s=en(e)}Dt.has(s)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Dt.set(s,e),l.querySelector(n)!==null||t==="style"&&l.querySelector(Jn(s))||t==="script"&&l.querySelector($n(s))||(t=l.createElement("link"),et(t,"link",e),Je(t),l.head.appendChild(t)))}}function my(e,t){fa.m(e,t);var a=Il;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+jt(l)+'"][href="'+jt(e)+'"]',s=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=en(e)}if(!Dt.has(s)&&(e=b({rel:"modulepreload",href:e},t),Dt.set(s,e),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector($n(s)))return}l=a.createElement("link"),et(l,"link",e),Je(l),a.head.appendChild(l)}}}function hy(e,t,a){fa.S(e,t,a);var l=Il;if(l&&e){var n=Sl(l).hoistableStyles,s=Pl(e);t=t||"default";var c=n.get(s);if(!c){var h={loading:0,preload:null};if(c=l.querySelector(Jn(s)))h.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Dt.get(s))&&eo(e,a);var S=c=l.createElement("link");Je(S),et(S,"link",e),S._p=new Promise(function(A,H){S.onload=A,S.onerror=H}),S.addEventListener("load",function(){h.loading|=1}),S.addEventListener("error",function(){h.loading|=2}),h.loading|=4,xs(c,t,l)}c={type:"stylesheet",instance:c,count:1,state:h},n.set(s,c)}}}function py(e,t){fa.X(e,t);var a=Il;if(a&&e){var l=Sl(a).hoistableScripts,n=en(e),s=l.get(n);s||(s=a.querySelector($n(n)),s||(e=b({src:e,async:!0},t),(t=Dt.get(n))&&to(e,t),s=a.createElement("script"),Je(s),et(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(n,s))}}function yy(e,t){fa.M(e,t);var a=Il;if(a&&e){var l=Sl(a).hoistableScripts,n=en(e),s=l.get(n);s||(s=a.querySelector($n(n)),s||(e=b({src:e,async:!0,type:"module"},t),(t=Dt.get(n))&&to(e,t),s=a.createElement("script"),Je(s),et(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(n,s))}}function Em(e,t,a,l){var n=(n=he.current)?vs(n):null;if(!n)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Pl(a.href),a=Sl(n).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Pl(a.href);var s=Sl(n).hoistableStyles,c=s.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,c),(s=n.querySelector(Jn(e)))&&!s._p&&(c.instance=s,c.state.loading=5),Dt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Dt.set(e,a),s||gy(n,e,a,c.state))),t&&l===null)throw Error(r(528,""));return c}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=en(a),a=Sl(n).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Pl(e){return'href="'+jt(e)+'"'}function Jn(e){return'link[rel="stylesheet"]['+e+"]"}function _m(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function gy(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),et(t,"link",a),Je(t),e.head.appendChild(t))}function en(e){return'[src="'+jt(e)+'"]'}function $n(e){return"script[async]"+e}function Tm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+jt(a.href)+'"]');if(l)return t.instance=l,Je(l),l;var n=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Je(l),et(l,"style",n),xs(l,a.precedence,e),t.instance=l;case"stylesheet":n=Pl(a.href);var s=e.querySelector(Jn(n));if(s)return t.state.loading|=4,t.instance=s,Je(s),s;l=_m(a),(n=Dt.get(n))&&eo(l,n),s=(e.ownerDocument||e).createElement("link"),Je(s);var c=s;return c._p=new Promise(function(h,S){c.onload=h,c.onerror=S}),et(s,"link",l),t.state.loading|=4,xs(s,a.precedence,e),t.instance=s;case"script":return s=en(a.src),(n=e.querySelector($n(s)))?(t.instance=n,Je(n),n):(l=a,(n=Dt.get(s))&&(l=b({},a),to(l,n)),e=e.ownerDocument||e,n=e.createElement("script"),Je(n),et(n,"link",l),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,xs(l,a.precedence,e));return t.instance}function xs(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,s=n,c=0;c title"):null)}function vy(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Cm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function xy(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Pl(l.href),s=t.querySelector(Jn(n));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ss.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=s,Je(s);return}s=t.ownerDocument||t,l=_m(l),(n=Dt.get(n))&&eo(l,n),s=s.createElement("link"),Je(s);var c=s;c._p=new Promise(function(h,S){c.onload=h,c.onerror=S}),et(s,"link",l),a.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ss.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var ao=0;function by(e,t){return e.stylesheets&&e.count===0&&_s(e,e.stylesheets),0ao?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(n)}}:null}function Ss(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_s(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Es=null;function _s(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Es=new Map,t.forEach(Sy,e),Es=null,Ss.call(e))}function Sy(e,t){if(!(t.state.loading&4)){var a=Es.get(e);if(a)var l=a.get(null);else{a=new Map,Es.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(u){console.error(u)}}return i(),co.exports=Ly(),co.exports}var ky=Hy();const qy=dh(ky);var x=Oo();const Be=dh(x),mh="/express/assets/no_image-DuvbomyT.png";function qt(i){return Intl.NumberFormat("es-CL",{style:"currency",currency:"CLP"}).format(i)}const hh=x.createContext(void 0),si=()=>{const i=x.useContext(hh);if(!i)throw new Error("useDialog debe ser usado dentro de un DialogProvider");return i},Yy=({children:i})=>{var te,V,ee,ue,Oe,_e,Me,R,$,ae;const[u,o]=x.useState(!1),[r,d]=x.useState({type:"confirm"}),[m,p]=x.useState(""),[v,g]=x.useState(!1),[y,E]=x.useState({}),[b,j]=x.useState(!1),[z,q]=x.useState({method:()=>{}}),D=x.useRef(()=>{}),X=x.useRef(null),B=ie=>{const ce=Math.min(window.innerWidth-32,400),_=500,L=(window.innerHeight-_)/2,J=(window.innerWidth-ce)/2;return{top:`${L}px`,left:`${J}px`,width:`${ce}px`,height:`${_}px`,opacity:1,borderRadius:"16px"}},k=x.useCallback((ie,ce,_)=>{var L;return d({type:"confirm",message:ie,icon:ce,options:_}),g(((L=_==null?void 0:_.checkboxOptions)==null?void 0:L.defaultChecked)||!1),o(!0),new Promise(J=>{D.current=J})},[]),M=x.useCallback((ie,ce,_)=>{var L;return d({type:"prompt",message:ie,icon:ce,options:_}),p((_==null?void 0:_.defaultValue)||""),g(((L=_==null?void 0:_.checkboxOptions)==null?void 0:L.defaultChecked)||!1),o(!0),setTimeout(()=>{var J;return(J=X.current)==null?void 0:J.focus()},50),new Promise(J=>{D.current=J})},[]),U=x.useCallback((ie,ce,_)=>(d({type:"choose",message:ie,icon:ce,options:_}),o(!0),new Promise(L=>{D.current=L})),[]),Z=x.useCallback((ie,ce,_)=>(d({type:"product",options:{product:ie,originRect:_}}),_?(j(!0),E({position:"fixed",top:`${_.top}px`,left:`${_.left}px`,width:`${_.width}px`,height:`${_.height}px`,opacity:0,zIndex:50,filter:"blur(50px)",borderRadius:"12px",overflow:"hidden",transition:"all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)"}),o(!0),q({method:()=>ce(ie)}),setTimeout(()=>{E(L=>({...L,...B(),filter:"blur(0px)",opacity:1,height:"auto",minHeight:"400px"})),setTimeout(()=>j(!1),300)},10)):o(!0),new Promise(L=>{D.current=L})),[]);x.useCallback(()=>{z.method(),K()},[z]);const K=x.useCallback((ie=null)=>{o(!1),D.current(ie),setTimeout(()=>E({}),300)},[z]),Y=ie=>{var _,L;ie.key==="Escape"&&K(!1);const ce=((L=(_=r.options)==null?void 0:_.checkboxOptions)==null?void 0:L.required)&&!v;r.type==="prompt"&&ie.key==="Enter"&&!ce&&K(m)},F=((V=(te=r.options)==null?void 0:te.checkboxOptions)==null?void 0:V.required)&&!v;return f.jsxs(hh.Provider,{value:{confirm:k,prompt:M,choose:U,showProduct:Z},children:[i,u&&f.jsxs("div",{"aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center px-4",role:"dialog",children:[f.jsx("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm transition-opacity duration-300 animate-in fade-in",onClick:()=>K(null)}),r.type==="product"&&((ee=r.options)!=null&&ee.product)?f.jsxs("div",{style:y,className:"bg-[#201512] border border-white/10 shadow-2xl flex flex-col relative",children:[f.jsxs("div",{className:"h-48 w-full relative shrink-0",children:[f.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url("${r.options.product.image||mh}")`}}),f.jsx("button",{onClick:()=>K(),className:"absolute top-2 right-2 bg-black/50 hover:bg-black/70 text-white rounded-full p-1 transition-colors z-10",children:f.jsx("span",{className:"material-symbols-outlined text-xl",children:"close"})})]}),f.jsxs("div",{className:`p-6 flex flex-col flex-1 transition-opacity duration-300 delay-100 ${b?"opacity-0":"opacity-100"}`,children:[f.jsxs("div",{className:"flex justify-between items-start mb-2",children:[f.jsx("h2",{className:"text-2xl font-bold text-white font-display",children:r.options.product.name}),f.jsx("span",{className:"text-xl font-bold text-[#a33f1e]",children:qt(r.options.product.price)})]}),f.jsx("p",{className:"text-gray-300 text-sm leading-relaxed mb-6",children:r.options.product.description}),f.jsx("div",{className:"mt-auto"})]})]}):f.jsxs("div",{className:`relative bg-[#201512] rounded-2xl border border-white/10 shadow-2xl w-full transform transition-all p-6 overflow-hidden animate-in fade-in zoom-in duration-200 ${r.type==="choose"&&((ue=r.options)==null?void 0:ue.style)==="block"?"max-w-md":"max-w-xs"}`,children:[f.jsx("div",{className:"flex justify-center mb-4",children:f.jsx("div",{className:"bg-[#a33f1e]/20 p-3 rounded-full",children:f.jsx("span",{className:"material-symbols-outlined text-[#a33f1e] text-3xl select-none",children:r.icon})})}),f.jsx("p",{className:"text-white text-lg font-bold text-center mb-2 font-display leading-tight",children:r.message}),r.type==="prompt"&&f.jsx("div",{className:"mb-6 mt-4",children:f.jsx("input",{ref:X,type:((Oe=r.options)==null?void 0:Oe.inputType)||"text",value:m,onChange:ie=>p(ie.target.value),onKeyDown:Y,placeholder:(_e=r.options)==null?void 0:_e.placeholder,className:"w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder-white/30 focus:outline-none focus:border-[#a33f1e] transition-all"})}),((Me=r.options)==null?void 0:Me.checkboxOptions)&&f.jsxs("div",{className:"mt-4 flex items-start gap-3 p-3 rounded-xl cursor-pointer hover:bg-white/10 transition-colors",onClick:()=>g(!v),children:[f.jsx("div",{className:`mt-0.5 w-5 h-5 aspect-square rounded border flex items-center justify-center transition-all ${v?"bg-[#a33f1e] border-[#a33f1e]":"border-white/30"}`,children:v&&f.jsx("span",{className:"material-symbols-outlined text-white text-sm font-bold",children:"check"})}),f.jsx("span",{className:"text-sm text-gray-300 select-none leading-tight",children:r.options.checkboxOptions.label})]}),r.type==="choose"&&((R=r.options)==null?void 0:R.choices)&&f.jsx("div",{className:`mt-6 ${r.options.style==="block"?"grid grid-cols-2 gap-3":"flex flex-col space-y-2"}`,children:r.options.choices.map(ie=>{var ce;return f.jsx("button",{onClick:()=>{o(!1),D.current(ie.value)},className:`group relative overflow-hidden rounded-xl border border-white/10 transition-all hover:border-[#a33f1e]/50 hover:bg-white/5 ${((ce=r.options)==null?void 0:ce.style)==="block"?"flex flex-col items-center p-4":"flex items-center w-full p-3"}`,children:f.jsx("span",{className:"text-white text-sm",children:ie.label})},ie.value)})}),f.jsxs("div",{className:`grid ${r.type==="choose"?"grid-cols-1 mt-6":"grid-cols-2 gap-3 mt-6"}`,children:[f.jsx("button",{onClick:()=>K(!1),className:"px-4 py-3 rounded-xl border border-white/20 text-white text-sm hover:bg-white/5",children:(($=r.options)==null?void 0:$.cancelText)||"Cancelar"}),r.type!=="choose"&&f.jsx("button",{disabled:F,onClick:()=>K(r.type==="prompt"?m:!0),className:`px-4 py-3 rounded-xl text-white text-sm transition-all ${F?"bg-gray-600 opacity-50 cursor-not-allowed":"bg-[#a33f1e] hover:bg-[#8f3322]"} `,children:((ae=r.options)==null?void 0:ae.confirmText)||(r.type==="prompt"?"Aceptar":"Sí")})]})]})]})]})},Gy=({product:i,onAdd:u})=>{const o=si(),r=d=>{const m=d.currentTarget.getBoundingClientRect();o.showProduct(i,u,m)};return f.jsxs("div",{onClick:r,className:"group bg-[#2a201c] rounded-xl overflow-hidden border border-white/5 flex flex-col h-full shadow-md hover:border-white/10 transition-colors cursor-pointer",children:[f.jsxs("div",{className:"aspect-square w-full relative overflow-hidden bg-gray-800",children:[f.jsx("div",{className:"absolute inset-0 bg-cover bg-center transition-transform duration-500 group-hover:scale-110",style:{backgroundImage:`url("${i.image||mh}")`}}),i.badges&&i.badges.length>0&&f.jsx("div",{className:"absolute top-2 left-2 flex flex-col gap-1 z-10 pointer-events-none",children:i.badges.map((d,m)=>f.jsx("span",{className:`${d.color} text-white text-[10px] font-bold px-2 py-0.5 rounded uppercase tracking-wide shadow-sm w-fit`,children:d.text},`${d.text}-${m}`))})]}),f.jsxs("div",{className:"p-3 flex flex-col flex-1",children:[f.jsx("h3",{className:"text-white font-bold text-lg leading-tight mb-1 group-hover:text-[#a33f1e] transition-colors",children:i.name}),f.jsx("p",{className:"text-gray-400 text-xs line-clamp-2 mb-3 leading-relaxed",children:i.description}),f.jsx("div",{className:"mt-auto flex items-center justify-between",children:f.jsx("span",{className:"text-white font-bold text-lg",children:qt(i.price)})})]})]})};function Xy(i,u=500){const[o,r]=x.useState(i);return x.useEffect(()=>{const d=setTimeout(()=>{r(i)},u);return()=>{clearTimeout(d)}},[i,u]),o}function pa(i){return Array.isArray?Array.isArray(i):gh(i)==="[object Array]"}function Qy(i){if(typeof i=="string")return i;let u=i+"";return u=="0"&&1/i==-1/0?"-0":u}function Vy(i){return i==null?"":Qy(i)}function Kt(i){return typeof i=="string"}function ph(i){return typeof i=="number"}function Zy(i){return i===!0||i===!1||Ky(i)&&gh(i)=="[object Boolean]"}function yh(i){return typeof i=="object"}function Ky(i){return yh(i)&&i!==null}function _t(i){return i!=null}function yo(i){return!i.trim().length}function gh(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Jy="Incorrect 'index' type",$y=i=>`Invalid value for key ${i}`,Fy=i=>`Pattern length exceeds max of ${i}.`,Wy=i=>`Missing ${i} property in key`,Iy=i=>`Property 'weight' in key '${i}' must be a positive integer`,Wm=Object.prototype.hasOwnProperty;class Py{constructor(u){this._keys=[],this._keyMap={};let o=0;u.forEach(r=>{let d=vh(r);this._keys.push(d),this._keyMap[d.id]=d,o+=d.weight}),this._keys.forEach(r=>{r.weight/=o})}get(u){return this._keyMap[u]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function vh(i){let u=null,o=null,r=null,d=1,m=null;if(Kt(i)||pa(i))r=i,u=Im(i),o=bo(i);else{if(!Wm.call(i,"name"))throw new Error(Wy("name"));const p=i.name;if(r=p,Wm.call(i,"weight")&&(d=i.weight,d<=0))throw new Error(Iy(p));u=Im(p),o=bo(p),m=i.getFn}return{path:u,id:o,weight:d,src:r,getFn:m}}function Im(i){return pa(i)?i:i.split(".")}function bo(i){return pa(i)?i.join("."):i}function eg(i,u){let o=[],r=!1;const d=(m,p,v)=>{if(_t(m))if(!p[v])o.push(m);else{let g=p[v];const y=m[g];if(!_t(y))return;if(v===p.length-1&&(Kt(y)||ph(y)||Zy(y)))o.push(Vy(y));else if(pa(y)){r=!0;for(let E=0,b=y.length;Ei.score===u.score?i.idx{this._keysMap[o.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Kt(this.docs[0])?this.docs.forEach((u,o)=>{this._addString(u,o)}):this.docs.forEach((u,o)=>{this._addObject(u,o)}),this.norm.clear())}add(u){const o=this.size();Kt(u)?this._addString(u,o):this._addObject(u,o)}removeAt(u){this.records.splice(u,1);for(let o=u,r=this.size();o{let p=d.getFn?d.getFn(u):this.getFn(u,d.path);if(_t(p)){if(pa(p)){let v=[];const g=[{nestedArrIndex:-1,value:p}];for(;g.length;){const{nestedArrIndex:y,value:E}=g.pop();if(_t(E))if(Kt(E)&&!yo(E)){let b={v:E,i:y,n:this.norm.get(E)};v.push(b)}else pa(E)&&E.forEach((b,j)=>{g.push({nestedArrIndex:j,value:b})})}r.$[m]=v}else if(Kt(p)&&!yo(p)){let v={v:p,n:this.norm.get(p)};r.$[m]=v}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function xh(i,u,{getFn:o=se.getFn,fieldNormWeight:r=se.fieldNormWeight}={}){const d=new Ro({getFn:o,fieldNormWeight:r});return d.setKeys(i.map(vh)),d.setSources(u),d.create(),d}function ug(i,{getFn:u=se.getFn,fieldNormWeight:o=se.fieldNormWeight}={}){const{keys:r,records:d}=i,m=new Ro({getFn:u,fieldNormWeight:o});return m.setKeys(r),m.setIndexRecords(d),m}function Ms(i,{errors:u=0,currentLocation:o=0,expectedLocation:r=0,distance:d=se.distance,ignoreLocation:m=se.ignoreLocation}={}){const p=u/i.length;if(m)return p;const v=Math.abs(r-o);return d?p+v/d:v?1:p}function rg(i=[],u=se.minMatchCharLength){let o=[],r=-1,d=-1,m=0;for(let p=i.length;m=u&&o.push([r,d]),r=-1)}return i[m-1]&&m-r>=u&&o.push([r,m-1]),o}const hl=32;function og(i,u,o,{location:r=se.location,distance:d=se.distance,threshold:m=se.threshold,findAllMatches:p=se.findAllMatches,minMatchCharLength:v=se.minMatchCharLength,includeMatches:g=se.includeMatches,ignoreLocation:y=se.ignoreLocation}={}){if(u.length>hl)throw new Error(Fy(hl));const E=u.length,b=i.length,j=Math.max(0,Math.min(r,b));let z=m,q=j;const D=v>1||g,X=D?Array(b):[];let B;for(;(B=i.indexOf(u,q))>-1;){let Y=Ms(u,{currentLocation:B,expectedLocation:j,distance:d,ignoreLocation:y});if(z=Math.min(Y,z),q=B+E,D){let F=0;for(;F=V;_e-=1){let Me=_e-1,R=o[i.charAt(Me)];if(D&&(X[Me]=+!!R),ue[_e]=(ue[_e+1]<<1|1)&R,Y&&(ue[_e]|=(k[_e+1]|k[_e])<<1|1|k[_e+1]),ue[_e]&Z&&(M=Ms(u,{errors:Y,currentLocation:Me,expectedLocation:j,distance:d,ignoreLocation:y}),M<=z)){if(z=M,q=Me,q<=j)break;V=Math.max(1,2*j-q)}}if(Ms(u,{errors:Y+1,currentLocation:j,expectedLocation:j,distance:d,ignoreLocation:y})>z)break;k=ue}const K={isMatch:q>=0,score:Math.max(.001,M)};if(D){const Y=rg(X,v);Y.length?g&&(K.indices=Y):K.isMatch=!1}return K}function cg(i){let u={};for(let o=0,r=i.length;oi.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(i=>i);class bh{constructor(u,{location:o=se.location,threshold:r=se.threshold,distance:d=se.distance,includeMatches:m=se.includeMatches,findAllMatches:p=se.findAllMatches,minMatchCharLength:v=se.minMatchCharLength,isCaseSensitive:g=se.isCaseSensitive,ignoreDiacritics:y=se.ignoreDiacritics,ignoreLocation:E=se.ignoreLocation}={}){if(this.options={location:o,threshold:r,distance:d,includeMatches:m,findAllMatches:p,minMatchCharLength:v,isCaseSensitive:g,ignoreDiacritics:y,ignoreLocation:E},u=g?u:u.toLowerCase(),u=y?Ls(u):u,this.pattern=u,this.chunks=[],!this.pattern.length)return;const b=(z,q)=>{this.chunks.push({pattern:z,alphabet:cg(z),startIndex:q})},j=this.pattern.length;if(j>hl){let z=0;const q=j%hl,D=j-q;for(;z{const{isMatch:k,score:M,indices:U}=og(u,D,X,{location:m+B,distance:p,threshold:v,findAllMatches:g,minMatchCharLength:y,includeMatches:d,ignoreLocation:E});k&&(z=!0),j+=M,k&&U&&(b=[...b,...U])});let q={isMatch:z,score:z?j/this.chunks.length:1};return z&&d&&(q.indices=b),q}}class Va{constructor(u){this.pattern=u}static isMultiMatch(u){return Pm(u,this.multiRegex)}static isSingleMatch(u){return Pm(u,this.singleRegex)}search(){}}function Pm(i,u){const o=i.match(u);return o?o[1]:null}class fg extends Va{constructor(u){super(u)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(u){const o=u===this.pattern;return{isMatch:o,score:o?0:1,indices:[0,this.pattern.length-1]}}}class dg extends Va{constructor(u){super(u)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(u){const r=u.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,u.length-1]}}}class mg extends Va{constructor(u){super(u)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(u){const o=u.startsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,this.pattern.length-1]}}}class hg extends Va{constructor(u){super(u)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(u){const o=!u.startsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,u.length-1]}}}class pg extends Va{constructor(u){super(u)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(u){const o=u.endsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[u.length-this.pattern.length,u.length-1]}}}class yg extends Va{constructor(u){super(u)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(u){const o=!u.endsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,u.length-1]}}}class Sh extends Va{constructor(u,{location:o=se.location,threshold:r=se.threshold,distance:d=se.distance,includeMatches:m=se.includeMatches,findAllMatches:p=se.findAllMatches,minMatchCharLength:v=se.minMatchCharLength,isCaseSensitive:g=se.isCaseSensitive,ignoreDiacritics:y=se.ignoreDiacritics,ignoreLocation:E=se.ignoreLocation}={}){super(u),this._bitapSearch=new bh(u,{location:o,threshold:r,distance:d,includeMatches:m,findAllMatches:p,minMatchCharLength:v,isCaseSensitive:g,ignoreDiacritics:y,ignoreLocation:E})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(u){return this._bitapSearch.searchIn(u)}}class Eh extends Va{constructor(u){super(u)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(u){let o=0,r;const d=[],m=this.pattern.length;for(;(r=u.indexOf(this.pattern,o))>-1;)o=r+m,d.push([r,o-1]);const p=!!d.length;return{isMatch:p,score:p?0:1,indices:d}}}const So=[fg,Eh,mg,hg,yg,pg,dg,Sh],eh=So.length,gg=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,vg="|";function xg(i,u={}){return i.split(vg).map(o=>{let r=o.trim().split(gg).filter(m=>m&&!!m.trim()),d=[];for(let m=0,p=r.length;m!!(i[Hs.AND]||i[Hs.OR]),_g=i=>!!i[To.PATH],Tg=i=>!pa(i)&&yh(i)&&!No(i),th=i=>({[Hs.AND]:Object.keys(i).map(u=>({[u]:i[u]}))});function _h(i,u,{auto:o=!0}={}){const r=d=>{let m=Object.keys(d);const p=_g(d);if(!p&&m.length>1&&!No(d))return r(th(d));if(Tg(d)){const g=p?d[To.PATH]:m[0],y=p?d[To.PATTERN]:d[g];if(!Kt(y))throw new Error($y(g));const E={keyId:bo(g),pattern:y};return o&&(E.searcher=_o(y,u)),E}let v={children:[],operator:m[0]};return m.forEach(g=>{const y=d[g];pa(y)&&y.forEach(E=>{v.children.push(r(E))})}),v};return No(i)||(i=th(i)),r(i)}function Ng(i,{ignoreFieldNorm:u=se.ignoreFieldNorm}){i.forEach(o=>{let r=1;o.matches.forEach(({key:d,norm:m,score:p})=>{const v=d?d.weight:null;r*=Math.pow(p===0&&v?Number.EPSILON:p,(v||1)*(u?1:m))}),o.score=r})}function jg(i,u){const o=i.matches;u.matches=[],_t(o)&&o.forEach(r=>{if(!_t(r.indices)||!r.indices.length)return;const{indices:d,value:m}=r;let p={indices:d,value:m};r.key&&(p.key=r.key.src),r.idx>-1&&(p.refIndex=r.idx),u.matches.push(p)})}function Cg(i,u){u.score=i.score}function Ag(i,u,{includeMatches:o=se.includeMatches,includeScore:r=se.includeScore}={}){const d=[];return o&&d.push(jg),r&&d.push(Cg),i.map(m=>{const{idx:p}=m,v={item:u[p],refIndex:p};return d.length&&d.forEach(g=>{g(m,v)}),v})}class an{constructor(u,o={},r){this.options={...se,...o},this.options.useExtendedSearch,this._keyStore=new Py(this.options.keys),this.setCollection(u,r)}setCollection(u,o){if(this._docs=u,o&&!(o instanceof Ro))throw new Error(Jy);this._myIndex=o||xh(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(u){_t(u)&&(this._docs.push(u),this._myIndex.add(u))}remove(u=()=>!1){const o=[];for(let r=0,d=this._docs.length;r-1&&(g=g.slice(0,o)),Ag(g,this._docs,{includeMatches:r,includeScore:d})}_searchStringList(u){const o=_o(u,this.options),{records:r}=this._myIndex,d=[];return r.forEach(({v:m,i:p,n:v})=>{if(!_t(m))return;const{isMatch:g,score:y,indices:E}=o.searchIn(m);g&&d.push({item:m,idx:p,matches:[{score:y,value:m,norm:v,indices:E}]})}),d}_searchLogical(u){const o=_h(u,this.options),r=(v,g,y)=>{if(!v.children){const{keyId:b,searcher:j}=v,z=this._findMatches({key:this._keyStore.get(b),value:this._myIndex.getValueForItemAtKeyId(g,b),searcher:j});return z&&z.length?[{idx:y,item:g,matches:z}]:[]}const E=[];for(let b=0,j=v.children.length;b{if(_t(v)){let y=r(o,v,g);y.length&&(m[g]||(m[g]={idx:g,item:v,matches:[]},p.push(m[g])),y.forEach(({matches:E})=>{m[g].matches.push(...E)}))}}),p}_searchObjectList(u){const o=_o(u,this.options),{keys:r,records:d}=this._myIndex,m=[];return d.forEach(({$:p,i:v})=>{if(!_t(p))return;let g=[];r.forEach((y,E)=>{g.push(...this._findMatches({key:y,value:p[E],searcher:o}))}),g.length&&m.push({idx:v,item:p,matches:g})}),m}_findMatches({key:u,value:o,searcher:r}){if(!_t(o))return[];let d=[];if(pa(o))o.forEach(({v:m,i:p,n:v})=>{if(!_t(m))return;const{isMatch:g,score:y,indices:E}=r.searchIn(m);g&&d.push({score:y,key:u,value:m,idx:p,norm:v,indices:E})});else{const{v:m,n:p}=o,{isMatch:v,score:g,indices:y}=r.searchIn(m);v&&d.push({score:g,key:u,value:m,norm:p,indices:y})}return d}}an.version="7.1.0";an.createIndex=xh;an.parseIndex=ug;an.config=se;an.parseQuery=_h;Eg(Sg);const wg=(i,u,o=.5)=>{const[r,d]=x.useState(""),m=x.useMemo(()=>new an(i,{keys:u,threshold:o,ignoreLocation:!0,minMatchCharLength:2}),[i,u,o]),p=x.useMemo(()=>r?m.search(r).map(v=>v.item):i,[m,r,i]);return{query:r,setQuery:d,results:p}},Gt=window.location.hostname==="localhost"?"http://localhost:6001":"https://kleinexpress.store",Th=i=>{localStorage.setItem("token",i)},Za=()=>localStorage.getItem("token"),zg=async(i,u)=>await(await fetch(`${Gt}/api/users/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,pin:u})})).json(),ln=async()=>(await fetch(`${Gt}/api/users/guest`,{method:"GET",headers:{"Content-Type":"application/json"}})).json(),Mg=async i=>await(await fetch(`${Gt}/api/users/user`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`}})).json(),Og=async i=>{const u=i?Za():(await ln()).data.token;return await(await fetch(`${Gt}/api/products?status=1`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${u}`}})).json()},Rg=async(i,u)=>{const o=u?Za():(await ln()).data.token;return await(await fetch(`${Gt}/api/orders/send`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify(i)})).json()},Nh=async(i,u)=>{const o=u?Za():(await ln()).data.token;return await(await fetch(`${Gt}/api/products/table/${i}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}})).json()},jh=async(i,u,o)=>{const r=i?Za():(await ln()).data.token;return await(await fetch(`${Gt}/api/orders/billing`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({table:u,payment:o})})).json()},Dg=async(i,u)=>{const o=i?Za():(await ln()).data.token,r=await fetch(`${Gt}/api/products/free-beer/${u}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}}),d=await r.json();return{success:r.status===200,message:d.message}},Bg=async i=>{const u=i?Za():(await ln()).data.token,r=await(await fetch(`${Gt}/api/store/state`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${u}`}})).json();return console.log("data",r),r.data.state},Ch=x.createContext(void 0),Ug=({children:i})=>{const[u,o]=x.useState(!1),[r,d]=x.useState(),[m,p]=x.useState(0),[v,g]=x.useState(""),y=x.useCallback((z,q)=>{q&&!q.token&&(q.token=Za()),o(z),d(q),p(q?q.reward_progress:0),g(q?q.token:"")},[]),E=x.useCallback(z=>{g(z)},[]),b=x.useCallback(z=>{p(z)},[]),j=x.useMemo(()=>({isLogged:u,user:r,token:v,setIsLoggedIn:y,promoPercent:m,setPromoPercent:b,setToken:E}),[u,r,v,y,m,b,E]);return f.jsx(Ch.Provider,{value:j,children:i})},Tt=()=>x.useContext(Ch),li=[289,6,885,655,18,27],Os=["Klein Day","Cervezas","Gin Day","Promo Miércoles de Pizza","Promo Miércoles de pizza.","Pizzas Familiares","Pizza Medianas"];function Lg(i){return i.map(u=>{const o={...u};if(o.badges=[],li.includes(u.id)&&o.badges.push({text:"HOT",color:"bg-red-600"}),["Cervezas","Klein Day"].includes(o.type)&&o.description){const m=/IBU\s*:?\s*(\d+(?:\.\d+)?)/i.exec(o.description);m&&o.badges.push({text:"IBU "+m[1],color:"bg-black/60 backdrop-blur"});const v=/(\d+(?:[\.,]\d+)?)\s*(?:º|grados)/i.exec(o.description);if(v){let g=v[1].replace(".",",");g.includes(",")||(g+=",0"),o.badges.push({text:`${g}º`,color:"bg-black/60 backdrop-blur"})}}return["Pizza Medianas","Pizzas Familiares","Sandwich de Autor"].includes(u.type)&&(o.description.toLowerCase().includes("veggie")||o.description.toLowerCase().includes("vegetarian")||o.description.toLowerCase().includes("vegan")||o.name.toLowerCase().includes("veggie")||o.name.toLowerCase().includes("vegetarian")||o.name.toLowerCase().includes("vegan"))&&o.badges.push({text:"VEGGIE",color:"bg-green-600"}),o})}const Hg=(i,u)=>{const o=li.includes(i.id),r=li.includes(u.id);if(o&&!r)return-1;if(!o&&r)return 1;if(o&&r){const d=li.indexOf(i.id),m=li.indexOf(u.id);return d-m}return 0},kg=(i,u)=>{const o=Os.includes(i),r=Os.includes(u);if(o&&!r)return-1;if(!o&&r)return 1;if(o&&r){const d=Os.indexOf(i),m=Os.indexOf(u);return d-m}return 0},Ah=x.createContext(void 0),qg=({children:i})=>{const[u,o]=x.useState(!1),[r,d]=x.useState("Cargando..."),m=(p,v="Cargando...")=>{o(p),setTimeout(()=>{d(v)},p?0:2e3)};return f.jsxs(Ah.Provider,{value:{isLoading:u,setIsLoading:m},children:[f.jsx("div",{children:f.jsx("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background-dark/60 backdrop-blur-sm pointer-events-none transition-opacity duration-300 opacity-0 ${u?"opacity-100":"opacity-0"}`,children:f.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full",children:[f.jsxs("div",{className:"animate-spin relative not-first:animate-spin flex justify-center space-x-8 h-12 w-full max-w-xsrounded-xl",children:[f.jsx("div",{className:"h-2 w-2 rounded-full bg-white"}),f.jsx("div",{className:"h-2 w-2 rounded-full bg-white -translate-y-19"}),f.jsx("div",{className:"h-2 w-2 rounded-full bg-white translate-y-19"}),f.jsx("div",{className:"h-2 w-2 rounded-full bg-white absolute left-1/2 top-1/2 -translate-y-1/2"}),f.jsx("div",{className:"h-2 w-2 rounded-full bg-white"})]}),f.jsx("div",{className:"text-white text-center text-md font-display translate-y-25",children:r})]})})}),i]})},ui=()=>x.useContext(Ah);/** * react-router v7.12.0 * * 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 ah="popstate";function Yg(i={}){function u(r,d){let{pathname:m,search:p,hash:v}=r.location;return jo("",{pathname:m,search:p,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function o(r,d){return typeof d=="string"?d:ni(d)}return Xg(u,o,null,i)}function Le(i,u){if(i===!1||i===null||typeof i>"u")throw new Error(u)}function Yt(i,u){if(!i){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Gg(){return Math.random().toString(36).substring(2,10)}function lh(i,u){return{usr:i.state,key:i.key,idx:u}}function jo(i,u,o=null,r){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof u=="string"?nn(u):u,state:o,key:u&&u.key||r||Gg()}}function ni({pathname:i="/",search:u="",hash:o=""}){return u&&u!=="?"&&(i+=u.charAt(0)==="?"?u:"?"+u),o&&o!=="#"&&(i+=o.charAt(0)==="#"?o:"#"+o),i}function nn(i){let u={};if(i){let o=i.indexOf("#");o>=0&&(u.hash=i.substring(o),i=i.substring(0,o));let r=i.indexOf("?");r>=0&&(u.search=i.substring(r),i=i.substring(0,r)),i&&(u.pathname=i)}return u}function Xg(i,u,o,r={}){let{window:d=document.defaultView,v5Compat:m=!1}=r,p=d.history,v="POP",g=null,y=E();y==null&&(y=0,p.replaceState({...p.state,idx:y},""));function E(){return(p.state||{idx:null}).idx}function b(){v="POP";let X=E(),B=X==null?null:X-y;y=X,g&&g({action:v,location:D.location,delta:B})}function j(X,B){v="PUSH";let k=jo(D.location,X,B);y=E()+1;let M=lh(k,y),U=D.createHref(k);try{p.pushState(M,"",U)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;d.location.assign(U)}m&&g&&g({action:v,location:D.location,delta:1})}function z(X,B){v="REPLACE";let k=jo(D.location,X,B);y=E();let M=lh(k,y),U=D.createHref(k);p.replaceState(M,"",U),m&&g&&g({action:v,location:D.location,delta:0})}function q(X){return Qg(X)}let D={get action(){return v},get location(){return i(d,p)},listen(X){if(g)throw new Error("A history only accepts one active listener");return d.addEventListener(ah,b),g=X,()=>{d.removeEventListener(ah,b),g=null}},createHref(X){return u(d,X)},createURL:q,encodeLocation(X){let B=q(X);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:j,replace:z,go(X){return p.go(X)}};return D}function Qg(i,u=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Le(o,"No window.location.(origin|href) available to create URL");let r=typeof i=="string"?i:ni(i);return r=r.replace(/ $/,"%20"),!u&&r.startsWith("//")&&(r=o+r),new URL(r,o)}function wh(i,u,o="/"){return Vg(i,u,o,!1)}function Vg(i,u,o,r){let d=typeof u=="string"?nn(u):u,m=ya(d.pathname||"/",o);if(m==null)return null;let p=zh(i);Zg(p);let v=null;for(let g=0;v==null&&g{let E={relativePath:y===void 0?p.path||"":y,caseSensitive:p.caseSensitive===!0,childrenIndex:v,route:p};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(r)&&g)return;Le(E.relativePath.startsWith(r),`Absolute route path "${E.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(r.length)}let b=ma([r,E.relativePath]),j=o.concat(E);p.children&&p.children.length>0&&(Le(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),zh(p.children,u,j,b,g)),!(p.path==null&&!p.index)&&u.push({path:b,score:Pg(b,p.index),routesMeta:j})};return i.forEach((p,v)=>{var g;if(p.path===""||!((g=p.path)!=null&&g.includes("?")))m(p,v);else for(let y of Mh(p.path))m(p,v,!0,y)}),u}function Mh(i){let u=i.split("/");if(u.length===0)return[];let[o,...r]=u,d=o.endsWith("?"),m=o.replace(/\?$/,"");if(r.length===0)return d?[m,""]:[m];let p=Mh(r.join("/")),v=[];return v.push(...p.map(g=>g===""?m:[m,g].join("/"))),d&&v.push(...p),v.map(g=>i.startsWith("/")&&g===""?"/":g)}function Zg(i){i.sort((u,o)=>u.score!==o.score?o.score-u.score:ev(u.routesMeta.map(r=>r.childrenIndex),o.routesMeta.map(r=>r.childrenIndex)))}var Kg=/^:[\w-]+$/,Jg=3,$g=2,Fg=1,Wg=10,Ig=-2,nh=i=>i==="*";function Pg(i,u){let o=i.split("/"),r=o.length;return o.some(nh)&&(r+=Ig),u&&(r+=$g),o.filter(d=>!nh(d)).reduce((d,m)=>d+(Kg.test(m)?Jg:m===""?Fg:Wg),r)}function ev(i,u){return i.length===u.length&&i.slice(0,-1).every((r,d)=>r===u[d])?i[i.length-1]-u[u.length-1]:0}function tv(i,u,o=!1){let{routesMeta:r}=i,d={},m="/",p=[];for(let v=0;v{if(E==="*"){let q=v[j]||"";p=m.slice(0,m.length-q.length).replace(/(.)\/+$/,"$1")}const z=v[j];return b&&!z?y[E]=void 0:y[E]=(z||"").replace(/%2F/g,"/"),y},{}),pathname:m,pathnameBase:p,pattern:i}}function av(i,u=!1,o=!0){Yt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let r=[],d="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,v,g)=>(r.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(r.push({paramName:"*"}),d+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?d+="\\/*$":i!==""&&i!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,u?void 0:"i"),r]}function lv(i){try{return i.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Yt(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),i}}function ya(i,u){if(u==="/")return i;if(!i.toLowerCase().startsWith(u.toLowerCase()))return null;let o=u.endsWith("/")?u.length-1:u.length,r=i.charAt(o);return r&&r!=="/"?null:i.slice(o)||"/"}var Oh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nv=i=>Oh.test(i);function iv(i,u="/"){let{pathname:o,search:r="",hash:d=""}=typeof i=="string"?nn(i):i,m;if(o)if(nv(o))m=o;else{if(o.includes("//")){let p=o;o=o.replace(/\/\/+/g,"/"),Yt(!1,`Pathnames cannot have embedded double slashes - normalizing ${p} -> ${o}`)}o.startsWith("/")?m=ih(o.substring(1),"/"):m=ih(o,u)}else m=u;return{pathname:m,search:rv(r),hash:ov(d)}}function ih(i,u){let o=u.replace(/\/+$/,"").split("/");return i.split("/").forEach(d=>{d===".."?o.length>1&&o.pop():d!=="."&&o.push(d)}),o.length>1?o.join("/"):"/"}function go(i,u,o,r){return`Cannot include a '${i}' character in a manually specified \`to.${u}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function sv(i){return i.filter((u,o)=>o===0||u.route.path&&u.route.path.length>0)}function Rh(i){let u=sv(i);return u.map((o,r)=>r===u.length-1?o.pathname:o.pathnameBase)}function Dh(i,u,o,r=!1){let d;typeof i=="string"?d=nn(i):(d={...i},Le(!d.pathname||!d.pathname.includes("?"),go("?","pathname","search",d)),Le(!d.pathname||!d.pathname.includes("#"),go("#","pathname","hash",d)),Le(!d.search||!d.search.includes("#"),go("#","search","hash",d)));let m=i===""||d.pathname==="",p=m?"/":d.pathname,v;if(p==null)v=o;else{let b=u.length-1;if(!r&&p.startsWith("..")){let j=p.split("/");for(;j[0]==="..";)j.shift(),b-=1;d.pathname=j.join("/")}v=b>=0?u[b]:"/"}let g=iv(d,v),y=p&&p!=="/"&&p.endsWith("/"),E=(m||p===".")&&o.endsWith("/");return!g.pathname.endsWith("/")&&(y||E)&&(g.pathname+="/"),g}var ma=i=>i.join("/").replace(/\/\/+/g,"/"),uv=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),rv=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,ov=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,cv=class{constructor(i,u,o,r=!1){this.status=i,this.statusText=u||"",this.internal=r,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function fv(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function dv(i){return i.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Bh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Uh(i,u){let o=i;if(typeof o!="string"||!Oh.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let r=o,d=!1;if(Bh)try{let m=new URL(window.location.href),p=o.startsWith("//")?new URL(m.protocol+o):new URL(o),v=ya(p.pathname,u);p.origin===m.origin&&v!=null?o=v+p.search+p.hash:d=!0}catch{Yt(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:d,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Lh=["POST","PUT","PATCH","DELETE"];new Set(Lh);var mv=["GET",...Lh];new Set(mv);var sn=x.createContext(null);sn.displayName="DataRouter";var qs=x.createContext(null);qs.displayName="DataRouterState";var hv=x.createContext(!1),Hh=x.createContext({isTransitioning:!1});Hh.displayName="ViewTransition";var pv=x.createContext(new Map);pv.displayName="Fetchers";var yv=x.createContext(null);yv.displayName="Await";var Bt=x.createContext(null);Bt.displayName="Navigation";var ri=x.createContext(null);ri.displayName="Location";var va=x.createContext({outlet:null,matches:[],isDataRoute:!1});va.displayName="Route";var Do=x.createContext(null);Do.displayName="RouteError";var kh="REACT_ROUTER_ERROR",gv="REDIRECT",vv="ROUTE_ERROR_RESPONSE";function xv(i){if(i.startsWith(`${kh}:${gv}:{`))try{let u=JSON.parse(i.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function bv(i){if(i.startsWith(`${kh}:${vv}:{`))try{let u=JSON.parse(i.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new cv(u.status,u.statusText,u.data)}catch{}}function Sv(i,{relative:u}={}){Le(oi(),"useHref() may be used only in the context of a component.");let{basename:o,navigator:r}=x.useContext(Bt),{hash:d,pathname:m,search:p}=ci(i,{relative:u}),v=m;return o!=="/"&&(v=m==="/"?o:ma([o,m])),r.createHref({pathname:v,search:p,hash:d})}function oi(){return x.useContext(ri)!=null}function Ka(){return Le(oi(),"useLocation() may be used only in the context of a component."),x.useContext(ri).location}var qh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yh(i){x.useContext(Bt).static||x.useLayoutEffect(i)}function Ja(){let{isDataRoute:i}=x.useContext(va);return i?Dv():Ev()}function Ev(){Le(oi(),"useNavigate() may be used only in the context of a component.");let i=x.useContext(sn),{basename:u,navigator:o}=x.useContext(Bt),{matches:r}=x.useContext(va),{pathname:d}=Ka(),m=JSON.stringify(Rh(r)),p=x.useRef(!1);return Yh(()=>{p.current=!0}),x.useCallback((g,y={})=>{if(Yt(p.current,qh),!p.current)return;if(typeof g=="number"){o.go(g);return}let E=Dh(g,JSON.parse(m),d,y.relative==="path");i==null&&u!=="/"&&(E.pathname=E.pathname==="/"?u:ma([u,E.pathname])),(y.replace?o.replace:o.push)(E,y.state,y)},[u,o,m,d,i])}x.createContext(null);function ci(i,{relative:u}={}){let{matches:o}=x.useContext(va),{pathname:r}=Ka(),d=JSON.stringify(Rh(o));return x.useMemo(()=>Dh(i,JSON.parse(d),r,u==="path"),[i,d,r,u])}function _v(i,u){return Gh(i,u)}function Gh(i,u,o,r,d){var k;Le(oi(),"useRoutes() may be used only in the context of a component.");let{navigator:m}=x.useContext(Bt),{matches:p}=x.useContext(va),v=p[p.length-1],g=v?v.params:{},y=v?v.pathname:"/",E=v?v.pathnameBase:"/",b=v&&v.route;{let M=b&&b.path||"";Qh(y,!b||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${y}" (under ) 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 to .`)}let j=Ka(),z;if(u){let M=typeof u=="string"?nn(u):u;Le(E==="/"||((k=M.pathname)==null?void 0:k.startsWith(E)),`When overriding the location using \`\` 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 "${E}" but pathname "${M.pathname}" was given in the \`location\` prop.`),z=M}else z=j;let q=z.pathname||"/",D=q;if(E!=="/"){let M=E.replace(/^\//,"").split("/");D="/"+q.replace(/^\//,"").split("/").slice(M.length).join("/")}let X=wh(i,{pathname:D});Yt(b||X!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),Yt(X==null||X[X.length-1].route.element!==void 0||X[X.length-1].route.Component!==void 0||X[X.length-1].route.lazy!==void 0,`Matched leaf route at location "${z.pathname}${z.search}${z.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let B=Av(X&&X.map(M=>Object.assign({},M,{params:Object.assign({},g,M.params),pathname:ma([E,m.encodeLocation?m.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?E:ma([E,m.encodeLocation?m.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),p,o,r,d);return u&&B?x.createElement(ri.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},B):B}function Tv(){let i=Rv(),u=fv(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),o=i instanceof Error?i.stack:null,r="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:r},m={padding:"2px 4px",backgroundColor:r},p=null;return console.error("Error handled by React Router default ErrorBoundary:",i),p=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:m},"ErrorBoundary")," or"," ",x.createElement("code",{style:m},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},u),o?x.createElement("pre",{style:d},o):null,p)}var Nv=x.createElement(Tv,null),Xh=class extends x.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,u){return u.location!==i.location||u.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:u.error,location:u.location,revalidation:i.revalidation||u.revalidation}}componentDidCatch(i,u){this.props.onError?this.props.onError(i,u):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const o=bv(i.digest);o&&(i=o)}let u=i!==void 0?x.createElement(va.Provider,{value:this.props.routeContext},x.createElement(Do.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?x.createElement(jv,{error:i},u):u}};Xh.contextType=hv;var vo=new WeakMap;function jv({children:i,error:u}){let{basename:o}=x.useContext(Bt);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let r=xv(u.digest);if(r){let d=vo.get(u);if(d)throw d;let m=Uh(r.location,o);if(Bh&&!vo.get(u))if(m.isExternal||r.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:r.replace}));throw vo.set(u,p),p}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return i}function Cv({routeContext:i,match:u,children:o}){let r=x.useContext(sn);return r&&r.static&&r.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=u.route.id),x.createElement(va.Provider,{value:i},o)}function Av(i,u=[],o=null,r=null,d=null){if(i==null){if(!o)return null;if(o.errors)i=o.matches;else if(u.length===0&&!o.initialized&&o.matches.length>0)i=o.matches;else return null}let m=i,p=o==null?void 0:o.errors;if(p!=null){let E=m.findIndex(b=>b.route.id&&(p==null?void 0:p[b.route.id])!==void 0);Le(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),m=m.slice(0,Math.min(m.length,E+1))}let v=!1,g=-1;if(o)for(let E=0;E=0?m=m.slice(0,g+1):m=[m[0]];break}}}let y=o&&r?(E,b)=>{var j,z;r(E,{location:o.location,params:((z=(j=o.matches)==null?void 0:j[0])==null?void 0:z.params)??{},unstable_pattern:dv(o.matches),errorInfo:b})}:void 0;return m.reduceRight((E,b,j)=>{let z,q=!1,D=null,X=null;o&&(z=p&&b.route.id?p[b.route.id]:void 0,D=b.route.errorElement||Nv,v&&(g<0&&j===0?(Qh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),q=!0,X=null):g===j&&(q=!0,X=b.route.hydrateFallbackElement||null)));let B=u.concat(m.slice(0,j+1)),k=()=>{let M;return z?M=D:q?M=X:b.route.Component?M=x.createElement(b.route.Component,null):b.route.element?M=b.route.element:M=E,x.createElement(Cv,{match:b,routeContext:{outlet:E,matches:B,isDataRoute:o!=null},children:M})};return o&&(b.route.ErrorBoundary||b.route.errorElement||j===0)?x.createElement(Xh,{location:o.location,revalidation:o.revalidation,component:D,error:z,children:k(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:y}):k()},null)}function Bo(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wv(i){let u=x.useContext(sn);return Le(u,Bo(i)),u}function zv(i){let u=x.useContext(qs);return Le(u,Bo(i)),u}function Mv(i){let u=x.useContext(va);return Le(u,Bo(i)),u}function Uo(i){let u=Mv(i),o=u.matches[u.matches.length-1];return Le(o.route.id,`${i} can only be used on routes that contain a unique "id"`),o.route.id}function Ov(){return Uo("useRouteId")}function Rv(){var r;let i=x.useContext(Do),u=zv("useRouteError"),o=Uo("useRouteError");return i!==void 0?i:(r=u.errors)==null?void 0:r[o]}function Dv(){let{router:i}=wv("useNavigate"),u=Uo("useNavigate"),o=x.useRef(!1);return Yh(()=>{o.current=!0}),x.useCallback(async(d,m={})=>{Yt(o.current,qh),o.current&&(typeof d=="number"?await i.navigate(d):await i.navigate(d,{fromRouteId:u,...m}))},[i,u])}var sh={};function Qh(i,u,o){!u&&!sh[i]&&(sh[i]=!0,Yt(!1,o))}x.memo(Bv);function Bv({routes:i,future:u,state:o,onError:r}){return Gh(i,void 0,o,r,u)}function kt(i){Le(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Uv({basename:i="/",children:u=null,location:o,navigationType:r="POP",navigator:d,static:m=!1,unstable_useTransitions:p}){Le(!oi(),"You cannot render a inside another . You should never have more than one in your app.");let v=i.replace(/^\/*/,"/"),g=x.useMemo(()=>({basename:v,navigator:d,static:m,unstable_useTransitions:p,future:{}}),[v,d,m,p]);typeof o=="string"&&(o=nn(o));let{pathname:y="/",search:E="",hash:b="",state:j=null,key:z="default"}=o,q=x.useMemo(()=>{let D=ya(y,v);return D==null?null:{location:{pathname:D,search:E,hash:b,state:j,key:z},navigationType:r}},[v,y,E,b,j,z,r]);return Yt(q!=null,` is not able to match the URL "${y}${E}${b}" because it does not start with the basename, so the won't render anything.`),q==null?null:x.createElement(Bt.Provider,{value:g},x.createElement(ri.Provider,{children:u,value:q}))}function Lv({children:i,location:u}){return _v(Co(i),u)}function Co(i,u=[]){let o=[];return x.Children.forEach(i,(r,d)=>{if(!x.isValidElement(r))return;let m=[...u,d];if(r.type===x.Fragment){o.push.apply(o,Co(r.props.children,m));return}Le(r.type===kt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Le(!r.props.index||!r.props.children,"An index route cannot have child routes.");let p={id:r.props.id||m.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(p.children=Co(r.props.children,m)),o.push(p)}),o}var Bs="get",Us="application/x-www-form-urlencoded";function Ys(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function Hv(i){return Ys(i)&&i.tagName.toLowerCase()==="button"}function kv(i){return Ys(i)&&i.tagName.toLowerCase()==="form"}function qv(i){return Ys(i)&&i.tagName.toLowerCase()==="input"}function Yv(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Gv(i,u){return i.button===0&&(!u||u==="_self")&&!Yv(i)}var Rs=null;function Xv(){if(Rs===null)try{new FormData(document.createElement("form"),0),Rs=!1}catch{Rs=!0}return Rs}var Qv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xo(i){return i!=null&&!Qv.has(i)?(Yt(!1,`"${i}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Us}"`),null):i}function Vv(i,u){let o,r,d,m,p;if(kv(i)){let v=i.getAttribute("action");r=v?ya(v,u):null,o=i.getAttribute("method")||Bs,d=xo(i.getAttribute("enctype"))||Us,m=new FormData(i)}else if(Hv(i)||qv(i)&&(i.type==="submit"||i.type==="image")){let v=i.form;if(v==null)throw new Error('Cannot submit a