function s1(t,a){for(var r=0;ro[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function r(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(l){if(l.ep)return;l.ep=!0;const u=r(l);fetch(l.href,u)}})();var qN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function i0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Uf={exports:{}},$o={};var Wg;function l1(){if(Wg)return $o;Wg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(o,l,u){var f=null;if(u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),"key"in l){u={};for(var h in l)h!=="key"&&(u[h]=l[h])}else u=l;return l=u.ref,{$$typeof:t,type:o,key:f,ref:l!==void 0?l:null,props:u}}return $o.Fragment=a,$o.jsx=r,$o.jsxs=r,$o}var ey;function u1(){return ey||(ey=1,Uf.exports=l1()),Uf.exports}var N=u1(),kf={exports:{}},Go={},Hf={exports:{}},Bf={};var ty;function c1(){return ty||(ty=1,(function(t){function a(D,q){var Z=D.length;D.push(q);e:for(;0>>1,J=D[ie];if(0>>1;iel(K,Z))tel(se,K)?(D[ie]=se,D[te]=Z,ie=te):(D[ie]=K,D[Y]=Z,ie=Y);else if(tel(se,Z))D[ie]=se,D[te]=Z,ie=te;else break e}}return q}function l(D,q){var Z=D.sortIndex-q.sortIndex;return Z!==0?Z:D.id-q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var p=[],m=[],y=1,g=null,b=3,w=!1,E=!1,R=!1,T=!1,M=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function V(D){for(var q=r(m);q!==null;){if(q.callback===null)o(m);else if(q.startTime<=D)o(m),q.sortIndex=q.expirationTime,a(p,q);else break;q=r(m)}}function Q(D){if(R=!1,V(D),!E)if(r(p)!==null)E=!0,X||(X=!0,he());else{var q=r(m);q!==null&&re(Q,q.startTime-D)}}var X=!1,$=-1,A=5,ne=-1;function ce(){return T?!0:!(t.unstable_now()-neD&&ce());){var ie=g.callback;if(typeof ie=="function"){g.callback=null,b=g.priorityLevel;var J=ie(g.expirationTime<=D);if(D=t.unstable_now(),typeof J=="function"){g.callback=J,V(D),q=!0;break t}g===r(p)&&o(p),V(D)}else o(p);g=r(p)}if(g!==null)q=!0;else{var O=r(m);O!==null&&re(Q,O.startTime-D),q=!1}}break e}finally{g=null,b=Z,w=!1}q=void 0}}finally{q?he():X=!1}}}var he;if(typeof k=="function")he=function(){k(ve)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ae=fe.port2;fe.port1.onmessage=ve,he=function(){ae.postMessage(null)}}else he=function(){M(ve,0)};function re(D,q){$=M(function(){D(t.unstable_now())},q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(D){D.callback=null},t.unstable_forceFrameRate=function(D){0>D||125ie?(D.sortIndex=Z,a(m,D),r(p)===null&&D===r(m)&&(R?(z($),$=-1):R=!0,re(Q,Z-ie))):(D.sortIndex=J,a(p,D),E||w||(E=!0,X||(X=!0,he()))),D},t.unstable_shouldYield=ce,t.unstable_wrapCallback=function(D){var q=b;return function(){var Z=b;b=q;try{return D.apply(this,arguments)}finally{b=Z}}}})(Bf)),Bf}var ny;function f1(){return ny||(ny=1,Hf.exports=c1()),Hf.exports}var Pf={exports:{}},Le={};var ay;function d1(){if(ay)return Le;ay=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,T={};function M(O,Y,K){this.props=O,this.context=Y,this.refs=T,this.updater=K||E}M.prototype.isReactComponent={},M.prototype.setState=function(O,Y){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,Y,"setState")},M.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function z(){}z.prototype=M.prototype;function k(O,Y,K){this.props=O,this.context=Y,this.refs=T,this.updater=K||E}var V=k.prototype=new z;V.constructor=k,R(V,M.prototype),V.isPureReactComponent=!0;var Q=Array.isArray;function X(){}var $={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function ne(O,Y,K){var te=K.ref;return{$$typeof:t,type:O,key:Y,ref:te!==void 0?te:null,props:K}}function ce(O,Y){return ne(O.type,Y,O.props)}function ve(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function he(O){var Y={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(K){return Y[K]})}var fe=/\/+/g;function ae(O,Y){return typeof O=="object"&&O!==null&&O.key!=null?he(""+O.key):Y.toString(36)}function re(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(X,X):(O.status="pending",O.then(function(Y){O.status==="pending"&&(O.status="fulfilled",O.value=Y)},function(Y){O.status==="pending"&&(O.status="rejected",O.reason=Y)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function D(O,Y,K,te,se){var de=typeof O;(de==="undefined"||de==="boolean")&&(O=null);var Re=!1;if(O===null)Re=!0;else switch(de){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(O.$$typeof){case t:case a:Re=!0;break;case y:return Re=O._init,D(Re(O._payload),Y,K,te,se)}}if(Re)return se=se(O),Re=te===""?"."+ae(O,0):te,Q(se)?(K="",Re!=null&&(K=Re.replace(fe,"$&/")+"/"),D(se,Y,K,"",function(Pt){return Pt})):se!=null&&(ve(se)&&(se=ce(se,K+(se.key==null||O&&O.key===se.key?"":(""+se.key).replace(fe,"$&/")+"/")+Re)),Y.push(se)),1;Re=0;var _e=te===""?".":te+":";if(Q(O))for(var Ce=0;Ce"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Vf.exports=h1(),Vf.exports}var sy;function m1(){if(sy)return Go;sy=1;var t=f1(),a=Md(),r=r0();function o(e){var n="https://react.dev/errors/"+e;if(1J||(e.current=ie[J],ie[J]=null,J--)}function K(e,n){J++,ie[J]=e.current,e.current=n}var te=O(null),se=O(null),de=O(null),Re=O(null);function _e(e,n){switch(K(de,n),K(se,e),K(te,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Sg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Sg(n),e=Eg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(te),K(te,e)}function Ce(){Y(te),Y(se),Y(de)}function Pt(e){e.memoizedState!==null&&K(Re,e);var n=te.current,i=Eg(n,e.type);n!==i&&(K(se,e),K(te,i))}function kt(e){se.current===e&&(Y(te),Y(se)),Re.current===e&&(Y(Re),Vo._currentValue=Z)}var _t,Ze;function ht(e){if(_t===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);_t=n&&n[1]||"",Ze=-1)":-1c||_[s]!==P[c]){var I=` `+_[s].replace(" at new "," at ");return e.displayName&&I.includes("")&&(I=I.replace("",e.displayName)),I}while(1<=s&&0<=c);break}}}finally{Ya=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ht(i):""}function en(e,n){switch(e.tag){case 26:case 27:case 5:return ht(e.type);case 16:return ht("Lazy");case 13:return e.child!==n&&n!==null?ht("Suspense Fallback"):ht("Suspense");case 19:return ht("SuspenseList");case 0:case 15:return $a(e.type,!1);case 11:return $a(e.type.render,!1);case 1:return $a(e.type,!0);case 31:return ht("Activity");default:return""}}function _i(e){try{var n="",i=null;do n+=en(e,i),i=e,e=e.return;while(e);return n}catch(s){return` Error generating stack: `+s.message+` `+s.stack}}var tn=Object.prototype.hasOwnProperty,Ga=t.unstable_scheduleCallback,Di=t.unstable_cancelCallback,Vt=t.unstable_shouldYield,na=t.unstable_requestPaint,qt=t.unstable_now,qn=t.unstable_getCurrentPriorityLevel,gn=t.unstable_ImmediatePriority,Ni=t.unstable_UserBlockingPriority,Fn=t.unstable_NormalPriority,nn=t.unstable_LowPriority,Dt=t.unstable_IdlePriority,Mi=t.log,aa=t.unstable_setDisableYieldValue,Yn=null,Ft=null;function yt(e){if(typeof Mi=="function"&&aa(e),Ft&&typeof Ft.setStrictMode=="function")try{Ft.setStrictMode(Yn,e)}catch{}}var Nt=Math.clz32?Math.clz32:An,sr=Math.log,Ka=Math.LN2;function An(e){return e>>>=0,e===0?32:31-(sr(e)/Ka|0)|0}var ba=256,$n=262144,ia=4194304;function on(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ne(e,n,i){var s=e.pendingLanes;if(s===0)return 0;var c=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var x=s&134217727;return x!==0?(s=x&~d,s!==0?c=on(s):(v&=x,v!==0?c=on(v):i||(i=x&~e,i!==0&&(c=on(i))))):(x=s&~d,x!==0?c=on(x):v!==0?c=on(v):i||(i=s&~e,i!==0&&(c=on(i)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,i=n&-n,d>=i||d===32&&(i&4194048)!==0)?n:c}function it(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function wt(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Mt(){var e=ia;return ia<<=1,(ia&62914560)===0&&(ia=4194304),e}function yn(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function et(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Yt(e,n,i,s,c,d){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var x=e.entanglements,_=e.expirationTimes,P=e.hiddenUpdates;for(i=v&~i;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var tw=/[\n"\\]/g;function _n(e){return e.replace(tw,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function _u(e,n,i,s,c,d,v,x){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Et(n)):e.value!==""+Et(n)&&(e.value=""+Et(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?Du(e,v,Et(n)):i!=null?Du(e,v,Et(i)):s!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Et(x):e.removeAttribute("name")}function gh(e,n,i,s,c,d,v,x){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){cr(e);return}i=i!=null?""+Et(i):"",n=n!=null?""+Et(n):i,x||n===e.value||(e.value=n),e.defaultValue=n}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=x?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),cr(e)}function Du(e,n,i){n==="number"&&Es(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function fr(e,n,i,s){if(e=e.options,n){n={};for(var c=0;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ju=!1;if(Sa)try{var io={};Object.defineProperty(io,"passive",{get:function(){ju=!0}}),window.addEventListener("test",io,io),window.removeEventListener("test",io,io)}catch{ju=!1}var Qa=null,Uu=null,Rs=null;function Eh(){if(Rs)return Rs;var e,n=Uu,i=n.length,s,c="value"in Qa?Qa.value:Qa.textContent,d=c.length;for(e=0;e=so),_h=" ",Dh=!1;function Nh(e,n){switch(e){case"keyup":return _w.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pr=!1;function Nw(e,n){switch(e){case"compositionend":return Mh(n);case"keypress":return n.which!==32?null:(Dh=!0,_h);case"textInput":return e=n.data,e===_h&&Dh?null:e;default:return null}}function Mw(e,n){if(pr)return e==="compositionend"||!Vu&&Nh(e,n)?(e=Eh(),Rs=Uu=Qa=null,pr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:i,offset:n-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ph(i)}}function qh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?qh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Fh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Es(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=Es(e.document)}return n}function Yu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var Pw=Sa&&"documentMode"in document&&11>=document.documentMode,gr=null,$u=null,fo=null,Gu=!1;function Yh(e,n,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Gu||gr==null||gr!==Es(s)||(s=gr,"selectionStart"in s&&Yu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),fo&&co(fo,s)||(fo=s,s=vl($u,"onSelect"),0>=v,c-=v,sa=1<<32-Nt(n)+c|i<je?(Ye=Ee,Ee=null):Ye=Ee.sibling;var Qe=F(U,Ee,B[je],W);if(Qe===null){Ee===null&&(Ee=Ye);break}e&&Ee&&Qe.alternate===null&&n(U,Ee),L=d(Qe,L,je),Xe===null?Oe=Qe:Xe.sibling=Qe,Xe=Qe,Ee=Ye}if(je===B.length)return i(U,Ee),$e&&Ta(U,je),Oe;if(Ee===null){for(;jeje?(Ye=Ee,Ee=null):Ye=Ee.sibling;var yi=F(U,Ee,Qe.value,W);if(yi===null){Ee===null&&(Ee=Ye);break}e&&Ee&&yi.alternate===null&&n(U,Ee),L=d(yi,L,je),Xe===null?Oe=yi:Xe.sibling=yi,Xe=yi,Ee=Ye}if(Qe.done)return i(U,Ee),$e&&Ta(U,je),Oe;if(Ee===null){for(;!Qe.done;je++,Qe=B.next())Qe=ee(U,Qe.value,W),Qe!==null&&(L=d(Qe,L,je),Xe===null?Oe=Qe:Xe.sibling=Qe,Xe=Qe);return $e&&Ta(U,je),Oe}for(Ee=s(Ee);!Qe.done;je++,Qe=B.next())Qe=G(Ee,U,je,Qe.value,W),Qe!==null&&(e&&Qe.alternate!==null&&Ee.delete(Qe.key===null?je:Qe.key),L=d(Qe,L,je),Xe===null?Oe=Qe:Xe.sibling=Qe,Xe=Qe);return e&&Ee.forEach(function(o1){return n(U,o1)}),$e&&Ta(U,je),Oe}function at(U,L,B,W){if(typeof B=="object"&&B!==null&&B.type===R&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case w:e:{for(var Oe=B.key;L!==null;){if(L.key===Oe){if(Oe=B.type,Oe===R){if(L.tag===7){i(U,L.sibling),W=c(L,B.props.children),W.return=U,U=W;break e}}else if(L.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===A&&Yi(Oe)===L.type){i(U,L.sibling),W=c(L,B.props),vo(W,B),W.return=U,U=W;break e}i(U,L);break}else n(U,L);L=L.sibling}B.type===R?(W=Bi(B.props.children,U.mode,W,B.key),W.return=U,U=W):(W=js(B.type,B.key,B.props,null,U.mode,W),vo(W,B),W.return=U,U=W)}return v(U);case E:e:{for(Oe=B.key;L!==null;){if(L.key===Oe)if(L.tag===4&&L.stateNode.containerInfo===B.containerInfo&&L.stateNode.implementation===B.implementation){i(U,L.sibling),W=c(L,B.children||[]),W.return=U,U=W;break e}else{i(U,L);break}else n(U,L);L=L.sibling}W=Wu(B,U.mode,W),W.return=U,U=W}return v(U);case A:return B=Yi(B),at(U,L,B,W)}if(re(B))return ye(U,L,B,W);if(he(B)){if(Oe=he(B),typeof Oe!="function")throw Error(o(150));return B=Oe.call(B),De(U,L,B,W)}if(typeof B.then=="function")return at(U,L,qs(B),W);if(B.$$typeof===k)return at(U,L,Hs(U,B),W);Fs(U,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,L!==null&&L.tag===6?(i(U,L.sibling),W=c(L,B),W.return=U,U=W):(i(U,L),W=Ju(B,U.mode,W),W.return=U,U=W),v(U)):i(U,L)}return function(U,L,B,W){try{yo=0;var Oe=at(U,L,B,W);return Or=null,Oe}catch(Ee){if(Ee===Cr||Ee===Ps)throw Ee;var Xe=bn(29,Ee,null,U.mode);return Xe.lanes=W,Xe.return=U,Xe}}}var Gi=hm(!0),mm=hm(!1),ei=!1;function fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dc(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ti(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ni(e,n,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ie&2)!==0){var c=s.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),s.pending=n,n=zs(e),Zh(e,null,i),n}return Ls(e,s,n,i),zs(e)}function bo(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,i|=s,n.lanes=i,It(e,i)}}function hc(e,n){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var c=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?c=d=v:d=d.next=v,i=i.next}while(i!==null);d===null?c=d=n:d=d.next=n}else c=d=n;i={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var mc=!1;function xo(){if(mc){var e=Rr;if(e!==null)throw e}}function wo(e,n,i,s){mc=!1;var c=e.updateQueue;ei=!1;var d=c.firstBaseUpdate,v=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var _=x,P=_.next;_.next=null,v===null?d=P:v.next=P,v=_;var I=e.alternate;I!==null&&(I=I.updateQueue,x=I.lastBaseUpdate,x!==v&&(x===null?I.firstBaseUpdate=P:x.next=P,I.lastBaseUpdate=_))}if(d!==null){var ee=c.baseState;v=0,I=P=_=null,x=d;do{var F=x.lane&-536870913,G=F!==x.lane;if(G?(Fe&F)===F:(s&F)===F){F!==0&&F===Tr&&(mc=!0),I!==null&&(I=I.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ye=e,De=x;F=n;var at=i;switch(De.tag){case 1:if(ye=De.payload,typeof ye=="function"){ee=ye.call(at,ee,F);break e}ee=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=De.payload,F=typeof ye=="function"?ye.call(at,ee,F):ye,F==null)break e;ee=g({},ee,F);break e;case 2:ei=!0}}F=x.callback,F!==null&&(e.flags|=64,G&&(e.flags|=8192),G=c.callbacks,G===null?c.callbacks=[F]:G.push(F))}else G={lane:F,tag:x.tag,payload:x.payload,callback:x.callback,next:null},I===null?(P=I=G,_=ee):I=I.next=G,v|=F;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;G=x,x=G.next,G.next=null,c.lastBaseUpdate=G,c.shared.pending=null}}while(!0);I===null&&(_=ee),c.baseState=_,c.firstBaseUpdate=P,c.lastBaseUpdate=I,d===null&&(c.shared.lanes=0),si|=v,e.lanes=v,e.memoizedState=ee}}function pm(e,n){if(typeof e!="function")throw Error(o(191,e));e.call(n)}function gm(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;ed?d:8;var v=D.T,x={};D.T=x,Lc(e,!1,n,i);try{var _=c(),P=D.S;if(P!==null&&P(x,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var I=Qw(_,s);To(e,n,I,Tn(e))}else To(e,n,s,Tn(e))}catch(ee){To(e,n,{then:function(){},status:"rejected",reason:ee},Tn())}finally{q.p=d,v!==null&&x.types!==null&&(v.types=x.types),D.T=v}}function tS(){}function Nc(e,n,i,s){if(e.tag!==5)throw Error(o(476));var c=Xm(e).queue;Km(e,c,n,Z,i===null?tS:function(){return Qm(e),i(s)})}function Xm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Aa,lastRenderedState:Z},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Aa,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Qm(e){var n=Xm(e);n.next===null&&(n=e.alternate.memoizedState),To(e,n.next.queue,{},Tn())}function Mc(){return Gt(Vo)}function Im(){return xt().memoizedState}function Zm(){return xt().memoizedState}function nS(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=Tn();e=ti(i);var s=ni(n,e,i);s!==null&&(dn(s,n,i),bo(s,n,i)),n={cache:sc()},e.payload=n;return}n=n.return}}function aS(e,n,i){var s=Tn();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ws(e)?Wm(n,i):(i=Iu(e,n,i,s),i!==null&&(dn(i,e,s),ep(i,n,s)))}function Jm(e,n,i){var s=Tn();To(e,n,i,s)}function To(e,n,i,s){var c={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ws(e))Wm(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var v=n.lastRenderedState,x=d(v,i);if(c.hasEagerState=!0,c.eagerState=x,vn(x,v))return Ls(e,n,c,0),ot===null&&Ms(),!1}catch{}if(i=Iu(e,n,c,s),i!==null)return dn(i,e,s),ep(i,n,s),!0}return!1}function Lc(e,n,i,s){if(s={lane:2,revertLane:df(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ws(e)){if(n)throw Error(o(479))}else n=Iu(e,i,s,2),n!==null&&dn(n,e,2)}function Ws(e){var n=e.alternate;return e===ze||n!==null&&n===ze}function Wm(e,n){_r=Gs=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function ep(e,n,i){if((i&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,i|=s,n.lanes=i,It(e,i)}}var Ro={readContext:Gt,use:Qs,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};Ro.useEffectEvent=pt;var tp={readContext:Gt,use:Qs,useCallback:function(e,n){return an().memoizedState=[e,n===void 0?null:n],e},useContext:Gt,useEffect:Hm,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Zs(4194308,4,qm.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Zs(4194308,4,e,n)},useInsertionEffect:function(e,n){Zs(4,2,e,n)},useMemo:function(e,n){var i=an();n=n===void 0?null:n;var s=e();if(Ki){yt(!0);try{e()}finally{yt(!1)}}return i.memoizedState=[s,n],s},useReducer:function(e,n,i){var s=an();if(i!==void 0){var c=i(n);if(Ki){yt(!0);try{i(n)}finally{yt(!1)}}}else c=n;return s.memoizedState=s.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},s.queue=e,e=e.dispatch=aS.bind(null,ze,e),[s.memoizedState,e]},useRef:function(e){var n=an();return e={current:e},n.memoizedState=e},useState:function(e){e=Cc(e);var n=e.queue,i=Jm.bind(null,ze,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:_c,useDeferredValue:function(e,n){var i=an();return Dc(i,e,n)},useTransition:function(){var e=Cc(!1);return e=Km.bind(null,ze,e.queue,!0,!1),an().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var s=ze,c=an();if($e){if(i===void 0)throw Error(o(407));i=i()}else{if(i=n(),ot===null)throw Error(o(349));(Fe&127)!==0||Sm(s,n,i)}c.memoizedState=i;var d={value:i,getSnapshot:n};return c.queue=d,Hm(Tm.bind(null,s,d,e),[e]),s.flags|=2048,Nr(9,{destroy:void 0},Em.bind(null,s,d,i,n),null),i},useId:function(){var e=an(),n=ot.identifierPrefix;if($e){var i=la,s=sa;i=(s&~(1<<32-Nt(s)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Ks++,0<\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?v.createElement(c,{is:s.is}):v.createElement(c)}}d[me]=n,d[pe]=s;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=d;e:switch(Xt(d,c,s),c){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Da(n)}}return ft(n),Kc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&Da(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(o(166));if(e=de.current,Sr(n)){if(e=n.stateNode,i=n.memoizedProps,s=null,c=$t,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}e[me]=n,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||xg(e.nodeValue,i)),e||Ja(n,!0)}else e=bl(e).createTextNode(s),e[me]=n,n.stateNode=e}return ft(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(s=Sr(n),i!==null){if(e===null){if(!s)throw Error(o(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[me]=n}else Pi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),e=!1}else i=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(wn(n),n):(wn(n),null);if((n.flags&128)!==0)throw Error(o(558))}return ft(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Sr(n),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[me]=n}else Pi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),c=!1}else c=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(wn(n),n):(wn(n),null)}return wn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=n.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==c&&(s.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),il(n,n.updateQueue),ft(n),null);case 4:return Ce(),e===null&&gf(n.stateNode.containerInfo),ft(n),null;case 10:return Ca(n.type),ft(n),null;case 19:if(Y(bt),s=n.memoizedState,s===null)return ft(n),null;if(c=(n.flags&128)!==0,d=s.rendering,d===null)if(c)Oo(s,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=$s(e),d!==null){for(n.flags|=128,Oo(s,!1),e=d.updateQueue,n.updateQueue=e,il(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)Jh(i,e),i=i.sibling;return K(bt,bt.current&1|2),$e&&Ta(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&qt()>ul&&(n.flags|=128,c=!0,Oo(s,!1),n.lanes=4194304)}else{if(!c)if(e=$s(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,il(n,e),Oo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!$e)return ft(n),null}else 2*qt()-s.renderingStartTime>ul&&i!==536870912&&(n.flags|=128,c=!0,Oo(s,!1),n.lanes=4194304);s.isBackwards?(d.sibling=n.child,n.child=d):(e=s.last,e!==null?e.sibling=d:n.child=d,s.last=d)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=qt(),e.sibling=null,i=bt.current,K(bt,c?i&1|2:i&1),$e&&Ta(n,s.treeForkCount),e):(ft(n),null);case 22:case 23:return wn(n),gc(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(i&536870912)!==0&&(n.flags&128)===0&&(ft(n),n.subtreeFlags&6&&(n.flags|=8192)):ft(n),i=n.updateQueue,i!==null&&il(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==i&&(n.flags|=2048),e!==null&&Y(Fi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),Ca(Tt),ft(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function lS(e,n){switch(tc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ca(Tt),Ce(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return kt(n),null;case 31:if(n.memoizedState!==null){if(wn(n),n.alternate===null)throw Error(o(340));Pi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(wn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));Pi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Y(bt),null;case 4:return Ce(),null;case 10:return Ca(n.type),null;case 22:case 23:return wn(n),gc(),e!==null&&Y(Fi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Ca(Tt),null;case 25:return null;default:return null}}function Rp(e,n){switch(tc(n),n.tag){case 3:Ca(Tt),Ce();break;case 26:case 27:case 5:kt(n);break;case 4:Ce();break;case 31:n.memoizedState!==null&&wn(n);break;case 13:wn(n);break;case 19:Y(bt);break;case 10:Ca(n.type);break;case 22:case 23:wn(n),gc(),e!==null&&Y(Fi);break;case 24:Ca(Tt)}}function Ao(e,n){try{var i=n.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var c=s.next;i=c;do{if((i.tag&e)===e){s=void 0;var d=i.create,v=i.inst;s=d(),v.destroy=s}i=i.next}while(i!==c)}}catch(x){We(n,n.return,x)}}function ri(e,n,i){try{var s=n.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var d=c.next;s=d;do{if((s.tag&e)===e){var v=s.inst,x=v.destroy;if(x!==void 0){v.destroy=void 0,c=n;var _=i,P=x;try{P()}catch(I){We(c,_,I)}}}s=s.next}while(s!==d)}}catch(I){We(n,n.return,I)}}function Cp(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{gm(n,i)}catch(s){We(e,e.return,s)}}}function Op(e,n,i){i.props=Xi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){We(e,n,s)}}function _o(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(c){We(e,n,c)}}function ua(e,n){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(c){We(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(c){We(e,n,c)}else i.current=null}function Ap(e){var n=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(c){We(e,e.return,c)}}function Xc(e,n,i){try{var s=e.stateNode;DS(s,e.type,i,n),s[pe]=n}catch(c){We(e,e.return,c)}}function _p(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&di(e.type)||e.tag===4}function Qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_p(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&&di(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 Ic(e,n,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=wa));else if(s!==4&&(s===27&&di(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(Ic(e,n,i),e=e.sibling;e!==null;)Ic(e,n,i),e=e.sibling}function rl(e,n,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(s!==4&&(s===27&&di(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(rl(e,n,i),e=e.sibling;e!==null;)rl(e,n,i),e=e.sibling}function Dp(e){var n=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Xt(n,s,i),n[me]=e,n[pe]=i}catch(d){We(e,e.return,d)}}var Na=!1,Ot=!1,Zc=!1,Np=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function uS(e,n){if(e=e.containerInfo,bf=Cl,e=Fh(e),Yu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var c=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var v=0,x=-1,_=-1,P=0,I=0,ee=e,F=null;t:for(;;){for(var G;ee!==i||c!==0&&ee.nodeType!==3||(x=v+c),ee!==d||s!==0&&ee.nodeType!==3||(_=v+s),ee.nodeType===3&&(v+=ee.nodeValue.length),(G=ee.firstChild)!==null;)F=ee,ee=G;for(;;){if(ee===e)break t;if(F===i&&++P===c&&(x=v),F===d&&++I===s&&(_=v),(G=ee.nextSibling)!==null)break;ee=F,F=ee.parentNode}ee=G}i=x===-1||_===-1?null:{start:x,end:_}}else i=null}i=i||{start:0,end:0}}else i=null;for(xf={focusedElem:e,selectionRange:i},Cl=!1,Bt=n;Bt!==null;)if(n=Bt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Bt=e;else for(;Bt!==null;){switch(n=Bt,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i title"))),Xt(d,s,i),d[me]=e,st(d),s=d;break e;case"link":var v=kg("link","href",c).get(s+(i.href||""));if(v){for(var x=0;xat&&(v=at,at=De,De=v);var U=Vh(x,De),L=Vh(x,at);if(U&&L&&(G.rangeCount!==1||G.anchorNode!==U.node||G.anchorOffset!==U.offset||G.focusNode!==L.node||G.focusOffset!==L.offset)){var B=ee.createRange();B.setStart(U.node,U.offset),G.removeAllRanges(),De>at?(G.addRange(B),G.extend(L.node,L.offset)):(B.setEnd(L.node,L.offset),G.addRange(B))}}}}for(ee=[],G=x;G=G.parentNode;)G.nodeType===1&&ee.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;xi?32:i,D.T=null,i=rf,rf=null;var d=ui,v=Ua;if(Lt=0,Ur=ui=null,Ua=0,(Ie&6)!==0)throw Error(o(331));var x=Ie;if(Ie|=4,qp(d.current),Bp(d,d.current,v,i),Ie=x,jo(0,!1),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(Yn,d)}catch{}return!0}finally{q.p=c,D.T=s,og(e,n)}}function lg(e,n,i){n=Nn(i,n),n=kc(e.stateNode,n,2),e=ni(e,n,2),e!==null&&(et(e,2),ca(e))}function We(e,n,i){if(e.tag===3)lg(e,e,i);else for(;n!==null;){if(n.tag===3){lg(n,e,i);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(li===null||!li.has(s))){e=Nn(i,e),i=up(2),s=ni(n,i,2),s!==null&&(cp(i,s,n,e),et(s,2),ca(s));break}}n=n.return}}function uf(e,n,i){var s=e.pingCache;if(s===null){s=e.pingCache=new dS;var c=new Set;s.set(n,c)}else c=s.get(n),c===void 0&&(c=new Set,s.set(n,c));c.has(i)||(ef=!0,c.add(i),e=yS.bind(null,e,n,i),n.then(e,e))}function yS(e,n,i){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ot===e&&(Fe&i)===i&&(gt===4||gt===3&&(Fe&62914560)===Fe&&300>qt()-ll?(Ie&2)===0&&kr(e,0):tf|=i,jr===Fe&&(jr=0)),ca(e)}function ug(e,n){n===0&&(n=Mt()),e=Hi(e,n),e!==null&&(et(e,n),ca(e))}function vS(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),ug(e,i)}function bS(e,n){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(n),ug(e,i)}function xS(e,n){return Ga(e,n)}var pl=null,Br=null,cf=!1,gl=!1,ff=!1,fi=0;function ca(e){e!==Br&&e.next===null&&(Br===null?pl=Br=e:Br=Br.next=e),gl=!0,cf||(cf=!0,SS())}function jo(e,n){if(!ff&&gl){ff=!0;do for(var i=!1,s=pl;s!==null;){if(e!==0){var c=s.pendingLanes;if(c===0)var d=0;else{var v=s.suspendedLanes,x=s.pingedLanes;d=(1<<31-Nt(42|e)+1)-1,d&=c&~(v&~x),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,hg(s,d))}else d=Fe,d=Ne(s,s===ot?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||it(s,d)||(i=!0,hg(s,d));s=s.next}while(i);ff=!1}}function wS(){cg()}function cg(){gl=cf=!1;var e=0;fi!==0&&MS()&&(e=fi);for(var n=qt(),i=null,s=pl;s!==null;){var c=s.next,d=fg(s,n);d===0?(s.next=null,i===null?pl=c:i.next=c,c===null&&(Br=i)):(i=s,(e!==0||(d&3)!==0)&&(gl=!0)),s=c}Lt!==0&&Lt!==5||jo(e),fi!==0&&(fi=0)}function fg(e,n){for(var i=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0x)break;var I=_.transferSize,ee=_.initiatorType;I&&wg(ee)&&(_=_.responseEnd,v+=I*(_"u"?null:document;function Lg(e,n,i){var s=Pr;if(s&&typeof n=="string"&&n){var c=_n(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof i=="string"&&(c+='[crossorigin="'+i+'"]'),Mg.has(c)||(Mg.add(c),e={rel:e,crossOrigin:i,href:n},s.querySelector(c)===null&&(n=s.createElement("link"),Xt(n,"link",e),st(n),s.head.appendChild(n)))}}function VS(e){ka.D(e),Lg("dns-prefetch",e,null)}function qS(e,n){ka.C(e,n),Lg("preconnect",e,n)}function FS(e,n,i){ka.L(e,n,i);var s=Pr;if(s&&e&&n){var c='link[rel="preload"][as="'+_n(n)+'"]';n==="image"&&i&&i.imageSrcSet?(c+='[imagesrcset="'+_n(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(c+='[imagesizes="'+_n(i.imageSizes)+'"]')):c+='[href="'+_n(e)+'"]';var d=c;switch(n){case"style":d=Vr(e);break;case"script":d=qr(e)}kn.has(d)||(e=g({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),kn.set(d,e),s.querySelector(c)!==null||n==="style"&&s.querySelector(Bo(d))||n==="script"&&s.querySelector(Po(d))||(n=s.createElement("link"),Xt(n,"link",e),st(n),s.head.appendChild(n)))}}function YS(e,n){ka.m(e,n);var i=Pr;if(i&&e){var s=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+_n(s)+'"][href="'+_n(e)+'"]',d=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=qr(e)}if(!kn.has(d)&&(e=g({rel:"modulepreload",href:e},n),kn.set(d,e),i.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Po(d)))return}s=i.createElement("link"),Xt(s,"link",e),st(s),i.head.appendChild(s)}}}function $S(e,n,i){ka.S(e,n,i);var s=Pr;if(s&&e){var c=St(s).hoistableStyles,d=Vr(e);n=n||"default";var v=c.get(d);if(!v){var x={loading:0,preload:null};if(v=s.querySelector(Bo(d)))x.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},i),(i=kn.get(d))&&Of(e,i);var _=v=s.createElement("link");st(_),Xt(_,"link",e),_._p=new Promise(function(P,I){_.onload=P,_.onerror=I}),_.addEventListener("load",function(){x.loading|=1}),_.addEventListener("error",function(){x.loading|=2}),x.loading|=4,wl(v,n,s)}v={type:"stylesheet",instance:v,count:1,state:x},c.set(d,v)}}}function GS(e,n){ka.X(e,n);var i=Pr;if(i&&e){var s=St(i).hoistableScripts,c=qr(e),d=s.get(c);d||(d=i.querySelector(Po(c)),d||(e=g({src:e,async:!0},n),(n=kn.get(c))&&Af(e,n),d=i.createElement("script"),st(d),Xt(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function KS(e,n){ka.M(e,n);var i=Pr;if(i&&e){var s=St(i).hoistableScripts,c=qr(e),d=s.get(c);d||(d=i.querySelector(Po(c)),d||(e=g({src:e,async:!0,type:"module"},n),(n=kn.get(c))&&Af(e,n),d=i.createElement("script"),st(d),Xt(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function zg(e,n,i,s){var c=(c=de.current)?xl(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=Vr(i.href),i=St(c).hoistableStyles,s=i.get(n),s||(s={type:"style",instance:null,count:0,state:null},i.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Vr(i.href);var d=St(c).hoistableStyles,v=d.get(e);if(v||(c=c.ownerDocument||c,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=c.querySelector(Bo(e)))&&!d._p&&(v.instance=d,v.state.loading=5),kn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},kn.set(e,i),d||XS(c,e,i,v.state))),n&&s===null)throw Error(o(528,""));return v}if(n&&s!==null)throw Error(o(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=qr(i),i=St(c).hoistableScripts,s=i.get(n),s||(s={type:"script",instance:null,count:0,state:null},i.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Vr(e){return'href="'+_n(e)+'"'}function Bo(e){return'link[rel="stylesheet"]['+e+"]"}function jg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function XS(e,n,i,s){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=e.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Xt(n,"link",i),st(n),e.head.appendChild(n))}function qr(e){return'[src="'+_n(e)+'"]'}function Po(e){return"script[async]"+e}function Ug(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+_n(i.href)+'"]');if(s)return n.instance=s,st(s),s;var c=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),Xt(s,"style",c),wl(s,i.precedence,e),n.instance=s;case"stylesheet":c=Vr(i.href);var d=e.querySelector(Bo(c));if(d)return n.state.loading|=4,n.instance=d,st(d),d;s=jg(i),(c=kn.get(c))&&Of(s,c),d=(e.ownerDocument||e).createElement("link"),st(d);var v=d;return v._p=new Promise(function(x,_){v.onload=x,v.onerror=_}),Xt(d,"link",s),n.state.loading|=4,wl(d,i.precedence,e),n.instance=d;case"script":return d=qr(i.src),(c=e.querySelector(Po(d)))?(n.instance=c,st(c),c):(s=i,(c=kn.get(d))&&(s=g({},i),Af(s,c)),e=e.ownerDocument||e,c=e.createElement("script"),st(c),Xt(c,"link",s),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,wl(s,i.precedence,e));return n.instance}function wl(e,n,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,d=c,v=0;v title"):null)}function QS(e,n,i){if(i===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Bg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function IS(e,n,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var c=Vr(s.href),d=n.querySelector(Bo(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=El.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=d,st(d);return}d=n.ownerDocument||n,s=jg(s),(c=kn.get(c))&&Of(s,c),d=d.createElement("link"),st(d);var v=d;v._p=new Promise(function(x,_){v.onload=x,v.onerror=_}),Xt(d,"link",s),i.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=El.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var _f=0;function ZS(e,n){return e.stylesheets&&e.count===0&&Rl(e,e.stylesheets),0_f?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(c)}}:null}function El(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Rl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tl=null;function Rl(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tl=new Map,n.forEach(JS,e),Tl=null,El.call(e))}function JS(e,n){if(!(n.state.loading&4)){var i=Tl.get(e);if(i)var s=i.get(null);else{i=new Map,Tl.set(e,i);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),kf.exports=m1(),kf.exports}var g1=p1();const y1={"common.appName":"Your App Name","home.hero.title":"Welcome to your blank app","home.hero.subtitle":"Make any App yours with ease.","notFound.title":"Oops! Page not found","notFound.actions.backHome":"Return to Home"},v1={"common.appName":"你的应用名称","home.hero.title":"欢迎来到你的空白应用","home.hero.subtitle":"轻松把任何 App 变成你的作品。","notFound.title":"哎呀,页面不存在","notFound.actions.backHome":"返回首页"};var qf={};const Me=t=>typeof t=="string",Ko=()=>{let t,a;const r=new Promise((o,l)=>{t=o,a=l});return r.resolve=t,r.reject=a,r},uy=t=>t==null?"":""+t,b1=(t,a,r)=>{t.forEach(o=>{a[o]&&(r[o]=a[o])})},x1=/###/g,cy=t=>t&&t.indexOf("###")>-1?t.replace(x1,"."):t,fy=t=>!t||Me(t),ns=(t,a,r)=>{const o=Me(a)?a.split("."):a;let l=0;for(;l{const{obj:o,k:l}=ns(t,a,Object);if(o!==void 0||a.length===1){o[l]=r;return}let u=a[a.length-1],f=a.slice(0,a.length-1),h=ns(t,f,Object);for(;h.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),h=ns(t,f,Object),h?.obj&&typeof h.obj[`${h.k}.${u}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${u}`]=r},w1=(t,a,r,o)=>{const{obj:l,k:u}=ns(t,a,Object);l[u]=l[u]||[],l[u].push(r)},tu=(t,a)=>{const{obj:r,k:o}=ns(t,a);if(r&&Object.prototype.hasOwnProperty.call(r,o))return r[o]},S1=(t,a,r)=>{const o=tu(t,r);return o!==void 0?o:tu(a,r)},o0=(t,a,r)=>{for(const o in a)o!=="__proto__"&&o!=="constructor"&&(o in t?Me(t[o])||t[o]instanceof String||Me(a[o])||a[o]instanceof String?r&&(t[o]=a[o]):o0(t[o],a[o],r):t[o]=a[o]);return t},Zi=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var E1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const T1=t=>Me(t)?t.replace(/[&<>"'\/]/g,a=>E1[a]):t;class R1{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const r=this.regExpMap.get(a);if(r!==void 0)return r;const o=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,o),this.regExpQueue.push(a),o}}const C1=[" ",",","?","!",";"],O1=new R1(20),A1=(t,a,r)=>{a=a||"",r=r||"";const o=C1.filter(f=>a.indexOf(f)<0&&r.indexOf(f)<0);if(o.length===0)return!0;const l=O1.getRegExp(`(${o.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!l.test(t);if(!u){const f=t.indexOf(r);f>0&&!l.test(t.substring(0,f))&&(u=!0)}return u},ld=(t,a,r=".")=>{if(!t)return;if(t[a])return Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;const o=a.split(r);let l=t;for(let u=0;u-1&&pt?.replace(/_/g,"-"),_1={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,a){console?.[t]?.apply?.(console,a)}};class nu{constructor(a,r={}){this.init(a,r)}init(a,r={}){this.prefix=r.prefix||"i18next:",this.logger=a||_1,this.options=r,this.debug=r.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,r,o,l){return l&&!this.debug?null:(Me(a[0])&&(a[0]=`${o}${this.prefix} ${a[0]}`),this.logger[r](a))}create(a){return new nu(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new nu(this.logger,a)}}var da=new nu;class pu{constructor(){this.observers={}}on(a,r){return a.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const l=this.observers[o].get(r)||0;this.observers[o].set(r,l+1)}),this}off(a,r){if(this.observers[a]){if(!r){delete this.observers[a];return}this.observers[a].delete(r)}}emit(a,...r){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([l,u])=>{for(let f=0;f{for(let f=0;f-1&&this.options.ns.splice(r,1)}getResource(a,r,o,l={}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,f=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;a.indexOf(".")>-1?h=a.split("."):(h=[a,r],o&&(Array.isArray(o)?h.push(...o):Me(o)&&u?h.push(...o.split(u)):h.push(o)));const p=tu(this.data,h);return!p&&!r&&!o&&a.indexOf(".")>-1&&(a=h[0],r=h[1],o=h.slice(2).join(".")),p||!f||!Me(o)?p:ld(this.data?.[a]?.[r],o,u)}addResource(a,r,o,l,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let h=[a,r];o&&(h=h.concat(f?o.split(f):o)),a.indexOf(".")>-1&&(h=a.split("."),l=r,r=h[1]),this.addNamespaces(r),dy(this.data,h,l),u.silent||this.emit("added",a,r,o,l)}addResources(a,r,o,l={silent:!1}){for(const u in o)(Me(o[u])||Array.isArray(o[u]))&&this.addResource(a,r,u,o[u],{silent:!0});l.silent||this.emit("added",a,r,o)}addResourceBundle(a,r,o,l,u,f={silent:!1,skipCopy:!1}){let h=[a,r];a.indexOf(".")>-1&&(h=a.split("."),l=o,o=r,r=h[1]),this.addNamespaces(r);let p=tu(this.data,h)||{};f.skipCopy||(o=JSON.parse(JSON.stringify(o))),l?o0(p,o,u):p={...p,...o},dy(this.data,h,p),f.silent||this.emit("added",a,r,o)}removeResourceBundle(a,r){this.hasResourceBundle(a,r)&&delete this.data[a][r],this.removeNamespaces(r),this.emit("removed",a,r)}hasResourceBundle(a,r){return this.getResource(a,r)!==void 0}getResourceBundle(a,r){return r||(r=this.options.defaultNS),this.getResource(a,r)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const r=this.getDataByLanguage(a);return!!(r&&Object.keys(r)||[]).find(l=>r[l]&&Object.keys(r[l]).length>0)}toJSON(){return this.data}}var s0={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,a,r,o,l){return t.forEach(u=>{a=this.processors[u]?.process(a,r,o,l)??a}),a}};const l0=Symbol("i18next/PATH_KEY");function D1(){const t=[],a=Object.create(null);let r;return a.get=(o,l)=>(r?.revoke?.(),l===l0?t:(t.push(l),r=Proxy.revocable(o,a),r.proxy)),Proxy.revocable(Object.create(null),a).proxy}function Xr(t,a){const{[l0]:r}=t(D1()),o=a?.keySeparator??".",l=a?.nsSeparator??":";if(r.length>1&&l){const u=a?.ns,f=Array.isArray(u)?u:null;if(f&&f.length>1&&f.slice(1).includes(r[0]))return`${r[0]}${l}${r.slice(1).join(o)}`}return r.join(o)}const my={},Ff=t=>!Me(t)&&typeof t!="boolean"&&typeof t!="number";class au extends pu{constructor(a,r={}){super(),b1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=da.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,r={interpolation:{}}){const o={...r};if(a==null)return!1;const l=this.resolve(a,o);if(l?.res===void 0)return!1;const u=Ff(l.res);return!(o.returnObjects===!1&&u)}extractFromKey(a,r){let o=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const l=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let u=r.ns||this.options.defaultNS||[];const f=o&&a.indexOf(o)>-1,h=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!A1(a,o,l);if(f&&!h){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:Me(u)?[u]:u};const m=a.split(o);(o!==l||o===l&&this.options.ns.indexOf(m[0])>-1)&&(u=m.shift()),a=m.join(l)}return{key:a,namespaces:Me(u)?[u]:u}}translate(a,r,o){let l=typeof r=="object"?{...r}:r;if(typeof l!="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),typeof l=="object"&&(l={...l}),l||(l={}),a==null)return"";typeof a=="function"&&(a=Xr(a,{...this.options,...l})),Array.isArray(a)||(a=[String(a)]),a=a.map(fe=>typeof fe=="function"?Xr(fe,{...this.options,...l}):String(fe));const u=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,f=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,{key:h,namespaces:p}=this.extractFromKey(a[a.length-1],l),m=p[p.length-1];let y=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const g=l.lng||this.language,b=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g?.toLowerCase()==="cimode")return b?u?{res:`${m}${y}${h}`,usedKey:h,exactUsedKey:h,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(l)}:`${m}${y}${h}`:u?{res:h,usedKey:h,exactUsedKey:h,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(l)}:h;const w=this.resolve(a,l);let E=w?.res;const R=w?.usedKey||h,T=w?.exactUsedKey||h,M=["[object Number]","[object Function]","[object RegExp]"],z=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,V=l.count!==void 0&&!Me(l.count),Q=au.hasDefaultValue(l),X=V?this.pluralResolver.getSuffix(g,l.count,l):"",$=l.ordinal&&V?this.pluralResolver.getSuffix(g,l.count,{ordinal:!1}):"",A=V&&!l.ordinal&&l.count===0,ne=A&&l[`defaultValue${this.options.pluralSeparator}zero`]||l[`defaultValue${X}`]||l[`defaultValue${$}`]||l.defaultValue;let ce=E;k&&!E&&Q&&(ce=ne);const ve=Ff(ce),he=Object.prototype.toString.apply(ce);if(k&&ce&&ve&&M.indexOf(he)<0&&!(Me(z)&&Array.isArray(ce))){if(!l.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const fe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,ce,{...l,ns:p}):`key '${h} (${this.language})' returned an object instead of string.`;return u?(w.res=fe,w.usedParams=this.getUsedParamsDetails(l),w):fe}if(f){const fe=Array.isArray(ce),ae=fe?[]:{},re=fe?T:R;for(const D in ce)if(Object.prototype.hasOwnProperty.call(ce,D)){const q=`${re}${f}${D}`;Q&&!E?ae[D]=this.translate(q,{...l,defaultValue:Ff(ne)?ne[D]:void 0,joinArrays:!1,ns:p}):ae[D]=this.translate(q,{...l,joinArrays:!1,ns:p}),ae[D]===q&&(ae[D]=ce[D])}E=ae}}else if(k&&Me(z)&&Array.isArray(E))E=E.join(z),E&&(E=this.extendTranslation(E,a,l,o));else{let fe=!1,ae=!1;!this.isValidLookup(E)&&Q&&(fe=!0,E=ne),this.isValidLookup(E)||(ae=!0,E=h);const D=(l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ae?void 0:E,q=Q&&ne!==E&&this.options.updateMissing;if(ae||fe||q){if(this.logger.log(q?"updateKey":"missingKey",g,m,h,q?ne:E),f){const O=this.resolve(h,{...l,keySeparator:!1});O&&O.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Z=[];const ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(let O=0;O{const te=Q&&K!==E?K:D;this.options.missingKeyHandler?this.options.missingKeyHandler(O,m,Y,te,q,l):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(O,m,Y,te,q,l),this.emit("missingKey",O,m,Y,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&V?Z.forEach(O=>{const Y=this.pluralResolver.getSuffixes(O,l);A&&l[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(K=>{J([O],h+K,l[`defaultValue${K}`]||ne)})}):J(Z,h,ne))}E=this.extendTranslation(E,a,l,w,o),ae&&E===h&&this.options.appendNamespaceToMissingKey&&(E=`${m}${y}${h}`),(ae||fe)&&this.options.parseMissingKeyHandler&&(E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${y}${h}`:h,fe?E:void 0,l))}return u?(w.res=E,w.usedParams=this.getUsedParamsDetails(l),w):E}extendTranslation(a,r,o,l,u){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const p=Me(a)&&(o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(p){const g=a.match(this.interpolator.nestingRegexp);m=g&&g.length}let y=o.replace&&!Me(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),a=this.interpolator.interpolate(a,y,o.lng||this.language||l.usedLng,o),p){const g=a.match(this.interpolator.nestingRegexp),b=g&&g.length;mu?.[0]===g[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${r[0]}`),null):this.translate(...g,r),o)),o.interpolation&&this.interpolator.reset()}const f=o.postProcess||this.options.postProcess,h=Me(f)?[f]:f;return a!=null&&h?.length&&o.applyPostProcessor!==!1&&(a=s0.handle(h,a,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),a}resolve(a,r={}){let o,l,u,f,h;return Me(a)&&(a=[a]),Array.isArray(a)&&(a=a.map(p=>typeof p=="function"?Xr(p,{...this.options,...r}):p)),a.forEach(p=>{if(this.isValidLookup(o))return;const m=this.extractFromKey(p,r),y=m.key;l=y;let g=m.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const b=r.count!==void 0&&!Me(r.count),w=b&&!r.ordinal&&r.count===0,E=r.context!==void 0&&(Me(r.context)||typeof r.context=="number")&&r.context!=="",R=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);g.forEach(T=>{this.isValidLookup(o)||(h=T,!my[`${R[0]}-${T}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(h)&&(my[`${R[0]}-${T}`]=!0,this.logger.warn(`key "${l}" for languages "${R.join(", ")}" won't get resolved as namespace "${h}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),R.forEach(M=>{if(this.isValidLookup(o))return;f=M;const z=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(z,y,M,T,r);else{let V;b&&(V=this.pluralResolver.getSuffix(M,r.count,r));const Q=`${this.options.pluralSeparator}zero`,X=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(r.ordinal&&V.indexOf(X)===0&&z.push(y+V.replace(X,this.options.pluralSeparator)),z.push(y+V),w&&z.push(y+Q)),E){const $=`${y}${this.options.contextSeparator||"_"}${r.context}`;z.push($),b&&(r.ordinal&&V.indexOf(X)===0&&z.push($+V.replace(X,this.options.pluralSeparator)),z.push($+V),w&&z.push($+Q))}}let k;for(;k=z.pop();)this.isValidLookup(o)||(u=k,o=this.getResource(M,T,k,r))}))})}),{res:o,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:h}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,r,o,l={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,r,o,l):this.resourceStore.getResource(a,r,o,l)}getUsedParamsDetails(a={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=a.replace&&!Me(a.replace);let l=o?a.replace:a;if(o&&typeof a.count<"u"&&(l.count=a.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!o){l={...l};for(const u of r)delete l[u]}return l}static hasDefaultValue(a){const r="defaultValue";for(const o in a)if(Object.prototype.hasOwnProperty.call(a,o)&&r===o.substring(0,r.length)&&a[o]!==void 0)return!0;return!1}}class py{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=da.create("languageUtils")}getScriptPartFromCode(a){if(a=os(a),!a||a.indexOf("-")<0)return null;const r=a.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(a){if(a=os(a),!a||a.indexOf("-")<0)return a;const r=a.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(a){if(Me(a)&&a.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(a)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let r;return a.forEach(o=>{if(r)return;const l=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(l))&&(r=l)}),!r&&this.options.supportedLngs&&a.forEach(o=>{if(r)return;const l=this.getScriptPartFromCode(o);if(this.isSupportedCode(l))return r=l;const u=this.getLanguagePartFromCode(o);if(this.isSupportedCode(u))return r=u;r=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(a,r){if(!a)return[];if(typeof a=="function"&&(a=a(r)),Me(a)&&(a=[a]),Array.isArray(a))return a;if(!r)return a.default||[];let o=a[r];return o||(o=a[this.getScriptPartFromCode(r)]),o||(o=a[this.formatLanguageCode(r)]),o||(o=a[this.getLanguagePartFromCode(r)]),o||(o=a.default),o||[]}toResolveHierarchy(a,r){const o=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],a),l=[],u=f=>{f&&(this.isSupportedCode(f)?l.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return Me(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(a))):Me(a)&&u(this.formatLanguageCode(a)),o.forEach(f=>{l.indexOf(f)<0&&u(this.formatLanguageCode(f))}),l}}const gy={zero:0,one:1,two:2,few:3,many:4,other:5},yy={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class N1{constructor(a,r={}){this.languageUtils=a,this.options=r,this.logger=da.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(a,r={}){const o=os(a==="dev"?"en":a),l=r.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:o,type:l});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(o,{type:l})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),yy;if(!a.match(/-|_/))return yy;const p=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(p,r)}return this.pluralRulesCache[u]=f,f}needsPlural(a,r={}){let o=this.getRule(a,r);return o||(o=this.getRule("dev",r)),o?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,r,o={}){return this.getSuffixes(a,o).map(l=>`${r}${l}`)}getSuffixes(a,r={}){let o=this.getRule(a,r);return o||(o=this.getRule("dev",r)),o?o.resolvedOptions().pluralCategories.sort((l,u)=>gy[l]-gy[u]).map(l=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(a,r,o={}){const l=this.getRule(a,o);return l?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${l.select(r)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",r,o))}}const vy=(t,a,r,o=".",l=!0)=>{let u=S1(t,a,r);return!u&&l&&Me(r)&&(u=ld(t,r,o),u===void 0&&(u=ld(a,r,o))),u},Yf=t=>t.replace(/\$/g,"$$$$");class by{constructor(a={}){this.logger=da.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(r=>r),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:r,escapeValue:o,useRawValueToEscape:l,prefix:u,prefixEscaped:f,suffix:h,suffixEscaped:p,formatSeparator:m,unescapeSuffix:y,unescapePrefix:g,nestingPrefix:b,nestingPrefixEscaped:w,nestingSuffix:E,nestingSuffixEscaped:R,nestingOptionsSeparator:T,maxReplaces:M,alwaysFormat:z}=a.interpolation;this.escape=r!==void 0?r:T1,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=u?Zi(u):f||"{{",this.suffix=h?Zi(h):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=y?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=b?Zi(b):w||Zi("$t("),this.nestingSuffix=E?Zi(E):R||Zi(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=M||1e3,this.alwaysFormat=z!==void 0?z:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(r,o)=>r?.source===o?(r.lastIndex=0,r):new RegExp(o,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(a,r,o,l){let u,f,h;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=w=>{if(w.indexOf(this.formatSeparator)<0){const M=vy(r,p,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,o,{...l,...r,interpolationkey:w}):M}const E=w.split(this.formatSeparator),R=E.shift().trim(),T=E.join(this.formatSeparator).trim();return this.format(vy(r,p,R,this.options.keySeparator,this.options.ignoreJSONStructure),T,o,{...l,...r,interpolationkey:R})};this.resetRegExp();const y=l?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>Yf(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?Yf(this.escape(w)):Yf(w)}].forEach(w=>{for(h=0;u=w.regex.exec(a);){const E=u[1].trim();if(f=m(E),f===void 0)if(typeof y=="function"){const T=y(a,u,l);f=Me(T)?T:""}else if(l&&Object.prototype.hasOwnProperty.call(l,E))f="";else if(g){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${E} for interpolating ${a}`),f="";else!Me(f)&&!this.useRawValueToEscape&&(f=uy(f));const R=w.safeValue(f);if(a=a.replace(u[0],R),g?(w.regex.lastIndex+=f.length,w.regex.lastIndex-=u[0].length):w.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),a}nest(a,r,o={}){let l,u,f;const h=(p,m)=>{const y=this.nestingOptionsSeparator;if(p.indexOf(y)<0)return p;const g=p.split(new RegExp(`${Zi(y)}[ ]*{`));let b=`{${g[1]}`;p=g[0],b=this.interpolate(b,f);const w=b.match(/'/g),E=b.match(/"/g);((w?.length??0)%2===0&&!E||(E?.length??0)%2!==0)&&(b=b.replace(/'/g,'"'));try{f=JSON.parse(b),m&&(f={...m,...f})}catch(R){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,R),`${p}${y}${b}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,p};for(;l=this.nestingRegexp.exec(a);){let p=[];f={...o},f=f.replace&&!Me(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const m=/{.*}/.test(l[1])?l[1].lastIndexOf("}")+1:l[1].indexOf(this.formatSeparator);if(m!==-1&&(p=l[1].slice(m).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),l[1]=l[1].slice(0,m)),u=r(h.call(this,l[1].trim(),f),f),u&&l[0]===a&&!Me(u))return u;Me(u)||(u=uy(u)),u||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${a}`),u=""),p.length&&(u=p.reduce((y,g)=>this.format(y,g,o.lng,{...o,interpolationkey:l[1].trim()}),u.trim())),a=a.replace(l[0],u),this.regexp.lastIndex=0}return a}}const M1=t=>{let a=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const o=t.split("(");a=o[0].toLowerCase().trim();const l=o[1].substring(0,o[1].length-1);a==="currency"&&l.indexOf(":")<0?r.currency||(r.currency=l.trim()):a==="relativetime"&&l.indexOf(":")<0?r.range||(r.range=l.trim()):l.split(";").forEach(f=>{if(f){const[h,...p]=f.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),y=h.trim();r[y]||(r[y]=m),m==="false"&&(r[y]=!1),m==="true"&&(r[y]=!0),isNaN(m)||(r[y]=parseInt(m,10))}})}return{formatName:a,formatOptions:r}},xy=t=>{const a={};return(r,o,l)=>{let u=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(u={...u,[l.interpolationkey]:void 0});const f=o+JSON.stringify(u);let h=a[f];return h||(h=t(os(o),l),a[f]=h),h(r)}},L1=t=>(a,r,o)=>t(os(r),o)(a);class z1{constructor(a={}){this.logger=da.create("formatter"),this.options=a,this.init(a)}init(a,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const o=r.cacheInBuiltFormats?xy:L1;this.formats={number:o((l,u)=>{const f=new Intl.NumberFormat(l,{...u});return h=>f.format(h)}),currency:o((l,u)=>{const f=new Intl.NumberFormat(l,{...u,style:"currency"});return h=>f.format(h)}),datetime:o((l,u)=>{const f=new Intl.DateTimeFormat(l,{...u});return h=>f.format(h)}),relativetime:o((l,u)=>{const f=new Intl.RelativeTimeFormat(l,{...u});return h=>f.format(h,u.range||"day")}),list:o((l,u)=>{const f=new Intl.ListFormat(l,{...u});return h=>f.format(h)})}}add(a,r){this.formats[a.toLowerCase().trim()]=r}addCached(a,r){this.formats[a.toLowerCase().trim()]=xy(r)}format(a,r,o,l={}){const u=r.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(h=>h.indexOf(")")>-1)){const h=u.findIndex(p=>p.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,h)].join(this.formatSeparator)}return u.reduce((h,p)=>{const{formatName:m,formatOptions:y}=M1(p);if(this.formats[m]){let g=h;try{const b=l?.formatParams?.[l.interpolationkey]||{},w=b.locale||b.lng||l.locale||l.lng||o;g=this.formats[m](h,w,{...y,...l,...b})}catch(b){this.logger.warn(b)}return g}else this.logger.warn(`there was no format function for ${m}`);return h},a)}}const j1=(t,a)=>{t.pending[a]!==void 0&&(delete t.pending[a],t.pendingCount--)};class U1 extends pu{constructor(a,r,o,l={}){super(),this.backend=a,this.store=r,this.services=o,this.languageUtils=o.languageUtils,this.options=l,this.logger=da.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(o,l.backend,l)}queueLoad(a,r,o,l){const u={},f={},h={},p={};return a.forEach(m=>{let y=!0;r.forEach(g=>{const b=`${m}|${g}`;!o.reload&&this.store.hasResourceBundle(m,g)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?f[b]===void 0&&(f[b]=!0):(this.state[b]=1,y=!1,f[b]===void 0&&(f[b]=!0),u[b]===void 0&&(u[b]=!0),p[g]===void 0&&(p[g]=!0)))}),y||(h[m]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}loaded(a,r,o){const l=a.split("|"),u=l[0],f=l[1];r&&this.emit("failedLoading",u,f,r),!r&&o&&this.store.addResourceBundle(u,f,o,void 0,void 0,{skipCopy:!0}),this.state[a]=r?-1:2,r&&o&&(this.state[a]=0);const h={};this.queue.forEach(p=>{w1(p.loaded,[u],f),j1(p,a),r&&p.errors.push(r),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{h[m]||(h[m]={});const y=p.loaded[m];y.length&&y.forEach(g=>{h[m][g]===void 0&&(h[m][g]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(p=>!p.done)}read(a,r,o,l=0,u=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:r,fcName:o,tried:l,wait:u,callback:f});return}this.readingCalls++;const h=(m,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(m&&y&&l{this.read.call(this,a,r,o,l+1,u*2,f)},u);return}f(m,y)},p=this.backend[o].bind(this.backend);if(p.length===2){try{const m=p(a,r);m&&typeof m.then=="function"?m.then(y=>h(null,y)).catch(h):h(null,m)}catch(m){h(m)}return}return p(a,r,h)}prepareLoading(a,r,o={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();Me(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Me(r)&&(r=[r]);const u=this.queueLoad(a,r,o,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(a,r,o){this.prepareLoading(a,r,{},o)}reload(a,r,o){this.prepareLoading(a,r,{reload:!0},o)}loadOne(a,r=""){const o=a.split("|"),l=o[0],u=o[1];this.read(l,u,"read",void 0,void 0,(f,h)=>{f&&this.logger.warn(`${r}loading namespace ${u} for language ${l} failed`,f),!f&&h&&this.logger.log(`${r}loaded namespace ${u} for language ${l}`,h),this.loaded(a,f,h)})}saveMissing(a,r,o,l,u,f={},h=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${o}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend?.create){const p={...f,isUpdate:u},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(a,r,o,l,p):y=m(a,r,o,l),y&&typeof y.then=="function"?y.then(g=>h(null,g)).catch(h):h(null,y)}catch(y){h(y)}else m(a,r,o,l,h,p)}!a||!a[0]||this.store.addResource(a[0],r,o,l)}}}const $f=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let a={};if(typeof t[1]=="object"&&(a=t[1]),Me(t[1])&&(a.defaultValue=t[1]),Me(t[2])&&(a.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{a[o]=r[o]})}return a},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),wy=t=>(Me(t.ns)&&(t.ns=[t.ns]),Me(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Me(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),Ll=()=>{},k1=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})},u0="__i18next_supportNoticeShown",H1=()=>!!(typeof globalThis<"u"&&globalThis[u0]||typeof process<"u"&&qf&&qf.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&qf),B1=()=>{typeof globalThis<"u"&&(globalThis[u0]=!0)},P1=t=>!!(t?.modules?.backend?.name?.indexOf("Locize")>0||t?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||t?.options?.backend?.backends&&t.options.backend.backends.some(a=>a?.name?.indexOf("Locize")>0||a?.constructor?.name?.indexOf("Locize")>0)||t?.options?.backend?.projectId||t?.options?.backend?.backendOptions&&t.options.backend.backendOptions.some(a=>a?.projectId));class as extends pu{constructor(a={},r){if(super(),this.options=wy(a),this.services={},this.logger=da,this.modules={external:[]},k1(this),r&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,r),this;setTimeout(()=>{this.init(a,r)},0)}}init(a={},r){this.isInitializing=!0,typeof a=="function"&&(r=a,a={}),a.defaultNS==null&&a.ns&&(Me(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const o=$f();this.options={...o,...this.options,...wy(a)},this.options.interpolation={...o.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=o.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!P1(this)&&!H1()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),B1());const l=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?da.init(l(this.modules.logger),this.options):da.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=z1;const y=new py(this.options);this.store=new hy(this.options.resources,this.options);const g=this.services;g.logger=da,g.resourceStore=this.store,g.languageUtils=y,g.pluralResolver=new N1(y,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(g.formatter=l(m),g.formatter.init&&g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new by(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new U1(l(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",(w,...E)=>{this.emit(w,...E)}),this.modules.languageDetector&&(g.languageDetector=l(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=l(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new au(this.services,this.options),this.translator.on("*",(w,...E)=>{this.emit(w,...E)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ll),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=(...y)=>this.store[m](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...y)=>(this.store[m](...y),this)});const h=Ko(),p=()=>{const m=(y,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(g),r(y,g)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),h}loadResources(a,r=Ll){let o=r;const l=Me(a)?a:this.language;if(typeof a=="function"&&(o=a),!this.options.resources||this.options.partialBundledLanguages){if(l?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const u=[],f=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(m=>{m!=="cimode"&&u.indexOf(m)<0&&u.push(m)})};l?f(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>f(p)),this.options.preload?.forEach?.(h=>f(h)),this.services.backendConnector.load(u,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(h)})}else o(null)}reloadResources(a,r,o){const l=Ko();return typeof a=="function"&&(o=a,a=void 0),typeof r=="function"&&(o=r,r=void 0),a||(a=this.languages),r||(r=this.options.ns),o||(o=Ll),this.services.backendConnector.reload(a,r,u=>{l.resolve(),o(u)}),l}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&s0.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,r){this.isLanguageChangingTo=a;const o=Ko();this.emit("languageChanging",a);const l=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},u=(h,p)=>{p?this.isLanguageChangingTo===a&&(l(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,o.resolve((...m)=>this.t(...m)),r&&r(h,(...m)=>this.t(...m))},f=h=>{!a&&!h&&this.services.languageDetector&&(h=[]);const p=Me(h)?h:h&&h[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Me(h)?[h]:h);m&&(this.language||l(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,y=>{u(y,m)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(a),o}getFixedT(a,r,o){const l=(u,f,...h)=>{let p;typeof f!="object"?p=this.options.overloadTranslationOptionHandler([u,f].concat(h)):p={...f},p.lng=p.lng||l.lng,p.lngs=p.lngs||l.lngs,p.ns=p.ns||l.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||o||l.keyPrefix);const m={...this.options,...p};typeof p.keyPrefix=="function"&&(p.keyPrefix=Xr(p.keyPrefix,m));const y=this.options.keySeparator||".";let g;return p.keyPrefix&&Array.isArray(u)?g=u.map(b=>(typeof b=="function"&&(b=Xr(b,m)),`${p.keyPrefix}${y}${b}`)):(typeof u=="function"&&(u=Xr(u,m)),g=p.keyPrefix?`${p.keyPrefix}${y}${u}`:u),this.t(g,p)};return Me(a)?l.lng=a:l.lngs=a,l.ns=r,l.keyPrefix=o,l}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=r.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const f=(h,p)=>{const m=this.services.backendConnector.state[`${h}|${p}`];return m===-1||m===0||m===2};if(r.precheck){const h=r.precheck(this,f);if(h!==void 0)return h}return!!(this.hasResourceBundle(o,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(o,a)&&(!l||f(u,a)))}loadNamespaces(a,r){const o=Ko();return this.options.ns?(Me(a)&&(a=[a]),a.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{o.resolve(),r&&r(l)}),o):(r&&r(),Promise.resolve())}loadLanguages(a,r){const o=Ko();Me(a)&&(a=[a]);const l=this.options.preload||[],u=a.filter(f=>l.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=l.concat(u),this.loadResources(f=>{o.resolve(),r&&r(f)}),o):(r&&r(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const l=new Intl.Locale(a);if(l&&l.getTextInfo){const u=l.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services?.languageUtils||new py($f());return a.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(o.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},r){const o=new as(a,r);return o.createInstance=as.createInstance,o}cloneInstance(a={},r=Ll){const o=a.forkResourceStore;o&&delete a.forkResourceStore;const l={...this.options,...a,isClone:!0},u=new as(l);if((a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a)),["store","services","language"].forEach(h=>{u[h]=this[h]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},o){const h=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((y,g)=>(y[g]={...p[m][g]},y),p[m]),p),{});u.store=new hy(h,l),u.services.resourceStore=u.store}if(a.interpolation){const p={...$f().interpolation,...this.options.interpolation,...a.interpolation},m={...l,interpolation:p};u.services.interpolator=new by(m)}return u.translator=new au(u.services,l),u.translator.on("*",(h,...p)=>{u.emit(h,...p)}),u.init(l,r),u.translator.options=l,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ut=as.createInstance();Ut.createInstance;Ut.dir;Ut.init;Ut.loadResources;Ut.reloadResources;Ut.use;Ut.changeLanguage;Ut.getFixedT;Ut.t;Ut.exists;Ut.setDefaultNamespace;Ut.hasLoadedNamespace;Ut.loadNamespaces;Ut.loadLanguages;function V1(t,a){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=q1(t))||a){r&&(t=r);var o=0,l=function(){};return{s:l,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(m){throw m},f:l}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u,f=!0,h=!1;return{s:function(){r=r.call(t)},n:function(){var m=r.next();return f=m.done,m},e:function(m){h=!0,u=m},f:function(){try{f||r.return==null||r.return()}finally{if(h)throw u}}}}function q1(t,a){if(t){if(typeof t=="string")return Sy(t,a);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sy(t,a):void 0}}function Sy(t,a){(a==null||a>t.length)&&(a=t.length);for(var r=0,o=Array(a);r128||c0.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function d0(t){return!(!f0(t)||t.indexOf("/")>-1)}function F1(t){return f0(t)}var Y1={lng:d0,ns:F1};function zl(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function $1(t){if(typeof t!="string"||t.length===0)return t;try{var a=new URL(t);return a.username||a.password?(a.username="",a.password="",a.toString()):t}catch{return t.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function h0(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":ud(XMLHttpRequest))==="object"}function G1(t){return!!t&&typeof t.then=="function"}function K1(t){return G1(t)?t:Promise.resolve(t)}var X1=/\{\{(.+?)\}\}/g;function Ey(t,a){var r=!1,o=t.replace(X1,function(l,u){var f=u.trim();if(c0.indexOf(f)>-1)return l;var h=a[f];if(h==null)return l;var p=Y1[f]||d0,m=String(h).split("+"),y=V1(m),g;try{for(y.s();!(g=y.n()).done;){var b=g.value;if(!p(b))return r=!0,l}}catch(w){y.e(w)}finally{y.f()}return m.join("+")});return r?null:o}const Q1="modulepreload",I1=function(t){return"/"+t},Ty={},Z1=function(a,r,o){let l=Promise.resolve();if(r&&r.length>0){let p=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=f?.nonce||f?.getAttribute("nonce");l=p(r.map(m=>{if(m=I1(m),m in Ty)return;Ty[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":Q1,y||(b.as="script"),b.crossOrigin="",b.href=m,h&&b.setAttribute("nonce",h),document.head.appendChild(b),y)return new Promise((w,E)=>{b.addEventListener("load",w),b.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return l.then(f=>{for(const h of f||[])h.status==="rejected"&&u(h.reason);return a().catch(u)})};function Ry(t,a){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);a&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,o)}return r}function Cy(t){for(var a=1;aimport("./browser-ponyfill-TLIPyXeP.js").then(t=>t.b),[]).then(function(t){Ei=t.default}).catch(function(){})}catch{}var m0=["__proto__","constructor","prototype"],cd=function(a,r){if(r&&ar(r)==="object"){for(var o="",l=0,u=Object.keys(r);l-1||(o+="&"+encodeURIComponent(f)+"="+encodeURIComponent(r[f]))}if(!o)return a;a=a+(a.indexOf("?")!==-1?"&":"?")+o.slice(1)}return a},Oy=function(a,r,o,l){var u=function(p){if(!p.ok)return o(p.statusText||"Error",{status:p.status});p.text().then(function(m){o(null,{status:p.status,data:m})}).catch(o)};if(l){var f=l(a,r);if(f instanceof Promise){f.then(u).catch(o);return}}typeof fetch=="function"?fetch(a,r).then(u).catch(o):Ei(a,r).then(u).catch(o)},tE=function(a,r,o,l){a.queryStringParams&&(r=cd(r,a.queryStringParams));var u=Cy({},typeof a.customHeaders=="function"?a.customHeaders():a.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(u["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),o&&(u["Content-Type"]="application/json");var f=typeof a.requestOptions=="function"?a.requestOptions(o):a.requestOptions,h=Cy({method:o?"POST":"GET",body:o?a.stringify(o):void 0,headers:u},a._omitFetchOptions?{}:f),p=typeof a.alternateFetch=="function"&&a.alternateFetch.length>=1?a.alternateFetch:void 0;try{Oy(r,h,l,p)}catch(m){if(!f||Object.keys(f).length===0||!m.message||m.message.indexOf("not implemented")<0)return l(m);try{Object.keys(f).forEach(function(y){delete h[y]}),Oy(r,h,l,p),a._omitFetchOptions=!0}catch(y){l(y)}}},nE=function(a,r,o,l){o&&ar(o)==="object"&&(o=cd("",o).slice(1)),a.queryStringParams&&(r=cd(r,a.queryStringParams));try{var u=ss?new ss:new iu("MSXML2.XMLHTTP.3.0");u.open(o?"POST":"GET",r,1),a.crossDomain||u.setRequestHeader("X-Requested-With","XMLHttpRequest"),u.withCredentials=!!a.withCredentials,o&&u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.overrideMimeType&&u.overrideMimeType("application/json");var f=a.customHeaders;if(f=typeof f=="function"?f():f,f)for(var h=0,p=Object.keys(f);h-1||u.setRequestHeader(m,f[m])}u.onreadystatechange=function(){u.readyState>3&&l(u.status>=400?u.statusText:null,{status:u.status,data:u.responseText})},u.send(o)}catch(y){console&&console.log(y)}},aE=function(a,r,o,l){if(typeof o=="function"&&(l=o,o=void 0),l=l||function(){},Ei&&r.indexOf("file:")!==0)return tE(a,r,o,l);if(h0()||typeof ActiveXObject=="function")return nE(a,r,o,l);l(new Error("No fetch and no xhr implementation found!"))};function Zr(t){"@babel/helpers - typeof";return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Zr(t)}function Ay(t,a){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);a&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,o)}return r}function Gf(t){for(var a=1;a1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};iE(this,t),this.services=a,this.options=r,this.allOptions=o,this.type="backend",this.init(a,r,o)}return oE(t,[{key:"init",value:function(r){var o=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=Gf(Gf(Gf({},lE()),this.options||{}),l),this.allOptions=u,this.services&&this.options.reloadInterval){var f=setInterval(function(){return o.reload()},this.options.reloadInterval);Zr(f)==="object"&&typeof f.unref=="function"&&f.unref()}}},{key:"readMulti",value:function(r,o,l){this._readAny(r,r,o,o,l)}},{key:"read",value:function(r,o,l){this._readAny([r],r,[o],o,l)}},{key:"_readAny",value:function(r,o,l,u,f){var h=this,p=this.options.loadPath;typeof this.options.loadPath=="function"&&(p=this.options.loadPath(r,l)),p=K1(p),p.then(function(m){if(!m)return f(null,{});var y=Ey(m,{lng:r.join("+"),ns:l.join("+")});if(y==null){var g=r.map(zl).join(", "),b=l.map(zl).join(", ");return f(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+g+"] namespaces=["+b+"]"),!1)}h.loadUrl(y,f,o,u)})}},{key:"loadUrl",value:function(r,o,l,u){var f=this,h=typeof l=="string"?[l]:l,p=typeof u=="string"?[u]:u,m=this.options.parseLoadPayload(h,p),y=zl($1(r));this.options.request(this.options,r,m,function(g,b){if(b&&(b.status>=500&&b.status<600||!b.status))return o("failed loading "+y+"; status code: "+b.status,!0);if(b&&b.status>=400&&b.status<500)return o("failed loading "+y+"; status code: "+b.status,!1);if(!b&&g&&g.message){var w=g.message.toLowerCase(),E=["failed","fetch","network","load"].find(function(M){return w.indexOf(M)>-1});if(E)return o("failed loading "+y+": "+zl(g.message),!0)}if(g)return o(g,!1);var R,T;try{typeof b.data=="string"?R=f.options.parse(b.data,l,u):R=b.data}catch{T="failed parsing "+y+" to json"}if(T)return o(T,!1);o(null,R)})}},{key:"create",value:function(r,o,l,u,f){var h=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var p=this.options.parsePayload(o,l,u),m=0,y=[],g=[];r.forEach(function(b){var w=h.options.addPath;typeof h.options.addPath=="function"&&(w=h.options.addPath(b,o));var E=Ey(w,{lng:b,ns:o});if(E==null){m+=1,f&&m===r.length&&f(y,g);return}h.options.request(h.options,E,p,function(R,T){m+=1,y.push(R),g.push(T),m===r.length&&typeof f=="function"&&f(y,g)})})}}},{key:"reload",value:function(){var r=this,o=this.services,l=o.backendConnector,u=o.languageUtils,f=o.logger,h=l.language;if(!(h&&h.toLowerCase()==="cimode")){var p=[],m=function(g){var b=u.toResolveHierarchy(g);b.forEach(function(w){p.indexOf(w)<0&&p.push(w)})};m(h),this.allOptions.preload&&this.allOptions.preload.forEach(function(y){return m(y)}),p.forEach(function(y){r.allOptions.ns.forEach(function(g){l.read(y,g,"read",null,null,function(b,w){b&&f.warn("loading namespace ".concat(g," for language ").concat(y," failed"),b),!b&&w&&f.log("loaded namespace ".concat(g," for language ").concat(y),w),l.loaded("".concat(y,"|").concat(g),b,w)})})})}}}])})();y0.type="backend";const{slice:uE,forEach:cE}=[];function fE(t){return cE.call(uE.call(arguments,1),a=>{if(a)for(const r in a)t[r]===void 0&&(t[r]=a[r])}),t}function dE(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(t))}const _y=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,hE=function(t,a){const o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},l=encodeURIComponent(a);let u=`${t}=${l}`;if(o.maxAge>0){const f=o.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");u+=`; Max-Age=${Math.floor(f)}`}if(o.domain){if(!_y.test(o.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${o.domain}`}if(o.path){if(!_y.test(o.path))throw new TypeError("option path is invalid");u+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(u+="; HttpOnly"),o.secure&&(u+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(u+="; Partitioned"),u},Dy={create(t,a,r,o){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(l.expires=new Date,l.expires.setTime(l.expires.getTime()+r*60*1e3)),o&&(l.domain=o),document.cookie=hE(t,a,l)},read(t){const a=`${t}=`,r=document.cookie.split(";");for(let o=0;o-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const u=o.substring(1).split("&");for(let f=0;f0&&u[f].substring(0,h)===a&&(r=u[f].substring(h+1))}}return r}},gE={name:"hash",lookup(t){let{lookupHash:a,lookupFromHashIndex:r}=t,o;if(typeof window<"u"){const{hash:l}=window.location;if(l&&l.length>2){const u=l.substring(1);if(a){const f=u.split("&");for(let h=0;h0&&f[h].substring(0,p)===a&&(o=f[h].substring(p+1))}}if(o)return o;if(!o&&r>-1){const f=l.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?f[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return o}};let Yr=null;const Ny=()=>{if(Yr!==null)return Yr;try{if(Yr=typeof window<"u"&&window.localStorage!==null,!Yr)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Yr=!1}return Yr};var yE={name:"localStorage",lookup(t){let{lookupLocalStorage:a}=t;if(a&&Ny())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(t,a){let{lookupLocalStorage:r}=a;r&&Ny()&&window.localStorage.setItem(r,t)}};let $r=null;const My=()=>{if($r!==null)return $r;try{if($r=typeof window<"u"&&window.sessionStorage!==null,!$r)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{$r=!1}return $r};var vE={name:"sessionStorage",lookup(t){let{lookupSessionStorage:a}=t;if(a&&My())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(t,a){let{lookupSessionStorage:r}=a;r&&My()&&window.sessionStorage.setItem(r,t)}},bE={name:"navigator",lookup(t){const a=[];if(typeof navigator<"u"){const{languages:r,userLanguage:o,language:l}=navigator;if(r)for(let u=0;u0?a:void 0}},xE={name:"htmlTag",lookup(t){let{htmlTag:a}=t,r;const o=a||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(r=o.getAttribute("lang")),r}},wE={name:"path",lookup(t){let{lookupFromPathIndex:a}=t;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?r[typeof a=="number"?a:0]?.replace("/",""):void 0}},SE={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:a}=t;const r=typeof a=="number"?a+1:1,o=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(o)return o[r]}};let v0=!1;try{document.cookie,v0=!0}catch{}const b0=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];v0||b0.splice(1,1);const EE=()=>({order:b0,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class x0{constructor(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(a,r)}init(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=fE(r,this.options||{},EE()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=l=>l.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(mE),this.addDetector(pE),this.addDetector(yE),this.addDetector(vE),this.addDetector(bE),this.addDetector(xE),this.addDetector(wE),this.addDetector(SE),this.addDetector(gE)}addDetector(a){return this.detectors[a.name]=a,this}detect(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return a.forEach(o=>{if(this.detectors[o]){let l=this.detectors[o].lookup(this.options);l&&typeof l=="string"&&(l=[l]),l&&(r=r.concat(l))}}),r=r.filter(o=>o!=null&&!dE(o)).map(o=>this.options.convertDetectedLanguage(o)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(a)>-1||r.forEach(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(a,this.options)}))}}x0.type="languageDetector";var S=Md();const le=i0(S),Ld=s1({__proto__:null,default:le},[S]),TE=(t,a,r,o)=>{const l=[r,{code:a,...o||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(l,"warn","react-i18next::",!0);nr(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...l):console?.warn&&console.warn(...l)},Ly={},fd=(t,a,r,o)=>{nr(r)&&Ly[r]||(nr(r)&&(Ly[r]=new Date),TE(t,a,r,o))},w0=(t,a)=>()=>{if(t.isInitialized)a();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),a()};t.on("initialized",r)}},dd=(t,a,r)=>{t.loadNamespaces(a,w0(t,r))},zy=(t,a,r,o)=>{if(nr(r)&&(r=[r]),t.options.preload&&t.options.preload.indexOf(a)>-1)return dd(t,r,o);r.forEach(l=>{t.options.ns.indexOf(l)<0&&t.options.ns.push(l)}),t.loadLanguages(a,w0(t,o))},RE=(t,a,r={})=>!a.languages||!a.languages.length?(fd(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(t,{lng:r.lng,precheck:(o,l)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!l(o.isLanguageChangingTo,t))return!1}}),nr=t=>typeof t=="string",CE=t=>typeof t=="object"&&t!==null,OE=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,AE={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},_E=t=>AE[t],DE=t=>t.replace(OE,_E);let hd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:DE};const NE=(t={})=>{hd={...hd,...t}},ME=()=>hd;let S0;const LE=t=>{S0=t},zE=()=>S0,jE={type:"3rdParty",init(t){NE(t.options.react),LE(t)}},UE=S.createContext();class kE{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const HE=(t,a)=>{const r=S.useRef();return S.useEffect(()=>{r.current=t},[t,a]),r.current},E0=(t,a,r,o)=>t.getFixedT(a,r,o),BE=(t,a,r,o)=>S.useCallback(E0(t,a,r,o),[t,a,r,o]),PE=(t,a={})=>{const{i18n:r}=a,{i18n:o,defaultNS:l}=S.useContext(UE)||{},u=r||o||zE();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new kE),!u){fd(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const V=(X,$)=>nr($)?$:CE($)&&nr($.defaultValue)?$.defaultValue:Array.isArray(X)?X[X.length-1]:X,Q=[V,{},!1];return Q.t=V,Q.i18n={},Q.ready=!1,Q}u.options.react?.wait&&fd(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...ME(),...u.options.react,...a},{useSuspense:h,keyPrefix:p}=f;let m=l||u.options?.defaultNS;m=nr(m)?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces?.(m);const y=(u.isInitialized||u.initializedStoreOnce)&&m.every(V=>RE(V,u,f)),g=BE(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),b=()=>g,w=()=>E0(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),[E,R]=S.useState(b);let T=m.join();a.lng&&(T=`${a.lng}${T}`);const M=HE(T),z=S.useRef(!0);S.useEffect(()=>{const{bindI18n:V,bindI18nStore:Q}=f;z.current=!0,!y&&!h&&(a.lng?zy(u,a.lng,m,()=>{z.current&&R(w)}):dd(u,m,()=>{z.current&&R(w)})),y&&M&&M!==T&&z.current&&R(w);const X=()=>{z.current&&R(w)};return V&&u?.on(V,X),Q&&u?.store.on(Q,X),()=>{z.current=!1,u&&V&&V?.split(" ").forEach($=>u.off($,X)),Q&&u&&Q.split(" ").forEach($=>u.store.off($,X))}},[u,T]),S.useEffect(()=>{z.current&&y&&R(b)},[u,p,y]);const k=[E,u,y];if(k.t=E,k.i18n=u,k.ready=y,y||!y&&!h)return k;throw new Promise(V=>{a.lng?zy(u,a.lng,m,()=>V()):dd(u,m,()=>V())})},VE="en",qE=[{code:"en",label:"English",detect:["en"],dir:"ltr"},{code:"zh-CN",label:"简体中文",detect:["zh","zh-CN","zh-Hans"],dir:"ltr"}],FE={fallbackLng:VE,languages:qE},eo=FE,ru=eo.fallbackLng,YE=eo.languages.map(t=>t.code);eo.languages.map(({code:t,label:a})=>({value:t,label:a}));const $E=new Map(eo.languages.map(t=>[t.code,t.dir])),T0=new Map(eo.languages.map(t=>[t.code.toLowerCase(),t.code])),R0=new Map(eo.languages.flatMap(t=>t.detect.map(a=>[a.toLowerCase(),t.code]))),GE=[...new Map([...R0,...T0]).entries()].sort(([t],[a])=>a.length-t.length);function zd(t){if(!t)return null;const a=t.trim().toLowerCase();return a?T0.get(a)??R0.get(a)??GE.find(([r])=>a.startsWith(`${r}-`))?.[1]??null:null}function KE(t){return $E.get(zd(t)??ru)??"ltr"}const XE="/".endsWith("/")?"/":"//",QE=Object.fromEntries(Object.entries(Object.assign({"../../public/locales/en.json":y1,"../../public/locales/zh-CN.json":v1})).map(([t,a])=>[t.match(/([^/]+)\.json$/)?.[1]??"",{translation:a}]));Ut.use(y0).use(x0).use(jE).init({fallbackLng:ru,supportedLngs:YE,resources:QE,partialBundledLanguages:!0,backend:{loadPath:`${XE}locales/{{lng}}.json`},detection:{order:["cookie","navigator","htmlTag"],lookupCookie:"i18next",caches:["cookie"],convertDetectedLanguage:t=>zd(t)??ru},keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const C0=t=>{const a=zd(t)??ru;document.documentElement.lang=a,document.documentElement.dir=KE(a)};Ut.on("initialized",()=>C0(Ut.resolvedLanguage??Ut.language));Ut.on("languageChanged",C0);const IE={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var ZE="0.0.8",JE="1.0.0",Xo={enabled:"VITE_ENTER_ANALYTICS_ENABLED",endpoint:"VITE_ENTER_ANALYTICS_ENDPOINT",token:"VITE_ENTER_ANALYTICS_TOKEN",projectId:"VITE_ENTER_PROJECT_ID",debug:"VITE_ENTER_ANALYTICS_DEBUG"},jy="https://api.enter.pro",Uy="/code/api/v1/track",Qt={visitorId:"enter.analytics.visitor_id",visitorFirstSeenAt:"enter.analytics.visitor_first_seen_at",session:"enter.analytics.session",outbox:"enter.analytics.outbox"},O0=1800*1e3,WE=500,eT=20,tT=5e3,nT=7,aT=4320*60*1e3,iT=2e3;function rT(t){const a=t.eventName==="page_view"||t.eventName==="session_start",r={};t.device?.device_type!==void 0&&(r.device_type=t.device.device_type),t.device?.browser!==void 0&&(r.browser=t.device.browser),t.device?.os!==void 0&&(r.os=t.device.os),t.device?.language!==void 0&&(r.language=t.device.language),a&&t.device?.screen_resolution!==void 0&&(r.screen_resolution=t.device.screen_resolution);const o={...r,...t.options?.context??{}};return{event_id:t.eventId,event_name:t.eventName,event_type:t.eventType,timestamp:new Date().toISOString(),schema_version:JE,sdk_version:ZE,enter_pid:t.projectId,visitor_id:t.identity.visitor_id,session_id:t.identity.session_id,is_new_visitor:t.isNewVisitor,page_url:t.page.url||void 0,page_path:t.page.path||void 0,page_title:t.page.title,referrer:t.page.referrer,utm_source:t.acquisition?.utm_source,utm_medium:t.acquisition?.utm_medium,utm_campaign:t.acquisition?.utm_campaign,utm_content:t.acquisition?.utm_content,utm_term:t.acquisition?.utm_term,context:o,properties:t.options?.properties??{}}}function oT(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`v_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`}function ky(t){try{return window.localStorage.getItem(t)}catch{return null}}function jl(t,a){try{window.localStorage.setItem(t,a)}catch{}}function Hy(t){if(typeof document>"u")return null;const a=`${t}=`,r=document.cookie.split(";").map(o=>o.trim()).find(o=>o.startsWith(a));return r?decodeURIComponent(r.slice(a.length)):null}function Ul(t,a){if(typeof document>"u")return;const r=3600*24*365;document.cookie=`${t}=${encodeURIComponent(a)}; Max-Age=${r}; Path=/; SameSite=Lax`}function sT(t=Date.now()){const a=ky(Qt.visitorId)??Hy(Qt.visitorId),r=a&&a.trim()?a:null,o=Number(ky(Qt.visitorFirstSeenAt)??Hy(Qt.visitorFirstSeenAt));if(r&&Number.isFinite(o)&&o>0)return jl(Qt.visitorId,r),jl(Qt.visitorFirstSeenAt,String(o)),Ul(Qt.visitorId,r),Ul(Qt.visitorFirstSeenAt,String(o)),{visitorId:r,firstSeenAt:o,isNewVisitor:!1};const l=r??oT();return jl(Qt.visitorId,l),jl(Qt.visitorFirstSeenAt,String(t)),Ul(Qt.visitorId,l),Ul(Qt.visitorFirstSeenAt,String(t)),{visitorId:l,firstSeenAt:t,isNewVisitor:!0}}function lT(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`s_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`}function Qo(){try{const t=window.sessionStorage.getItem(Qt.session);if(!t)return null;const a=JSON.parse(t);return!a.sessionId||!a.startedAt||!a.lastActivityAt?null:a}catch{return null}}function kl(t){try{if(!t){window.sessionStorage.removeItem(Qt.session);return}window.sessionStorage.setItem(Qt.session,JSON.stringify(t))}catch{}}var uT=class{constructor(t=O0){this.session=null,this.inactivityTimeoutMs=t,this.session=typeof window<"u"?Qo():null}ensureActiveSession(t=Date.now()){const a=this.session??Qo();return a?t-a.lastActivityAt>this.inactivityTimeoutMs?{sessionId:this.createSession(t).sessionId,started:!0,reason:"expired"}:(a.lastActivityAt=t,this.session=a,kl(a),{sessionId:a.sessionId,started:!1,reason:"continued"}):{sessionId:this.createSession(t).sessionId,started:!0,reason:"first_visit"}}touch(t=Date.now()){if(!this.session){this.ensureActiveSession(t);return}this.session.lastActivityAt=t,kl(this.session)}getCurrentSessionId(){return this.session?.sessionId??Qo()?.sessionId}endCurrentSession(){const t=this.session?.sessionId??Qo()?.sessionId;return this.session=null,typeof window<"u"&&kl(null),t}hasExpired(t=Date.now()){const a=this.session??Qo();return a?t-a.lastActivityAt>this.inactivityTimeoutMs:!1}createSession(t){const a={sessionId:lT(),startedAt:t,lastActivityAt:t};return this.session=a,typeof window<"u"&&kl(a),a}};function cT(t=typeof window<"u"?window.location.href:""){if(!t)return{};let a;try{a=new URL(t).searchParams}catch{return{}}const r={},o=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"];for(const l of o){const u=a.get(l);u&&(r[l]=u)}return r}function fT(){if(typeof navigator>"u")return{};const t=navigator.userAgent,a=navigator.language,r=typeof screen<"u"?screen.width:void 0,o=typeof screen<"u"?screen.height:void 0;return{device_type:dT(t),browser:hT(t),os:mT(t),language:a,screen_resolution:r&&o?`${r}x${o}`:void 0}}function dT(t){return/bot|crawler|spider/i.test(t)?"bot":/tablet|ipad/i.test(t)?"tablet":/mobi|iphone|android/i.test(t)?"mobile":"desktop"}function hT(t){return/edg/i.test(t)?"Edge":/chrome|crios/i.test(t)?"Chrome":/safari/i.test(t)&&!/chrome|crios/i.test(t)?"Safari":/firefox|fxios/i.test(t)?"Firefox":"Unknown"}function mT(t){return/windows/i.test(t)?"Windows":/mac os|macintosh/i.test(t)?"macOS":/android/i.test(t)?"Android":/iphone|ipad|ios/i.test(t)?"iOS":/linux/i.test(t)?"Linux":"Unknown"}function pT(t,a){return a?t?`${t}${a}`:`/${a}`:t}function gT(t,a=!1){const r=t.pathname||"";return a?pT(r,t.hash||""):r}function yT(t,a=!1){const r=t.pathname||"",o=t.search||"";if(!a)return`${r}${o}`;const l=t.hash||"";return r||o?`${r}${o}${l}`:l?`/${l}`:""}function vT(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`p_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`}function bT(t=vT(),a=!1){return typeof window>"u"||typeof document>"u"?{url:"",path:"",page_instance_id:t}:{url:window.location.href,path:gT(window.location,a),title:document.title||void 0,referrer:document.referrer||void 0,page_instance_id:t}}function A0(t,a=!1){const r=bT(t,a);return{page:r,acquisition:cT(r.url),device:fT()}}var xT=["password","token","cookie","authorization","auth","email","phone"];function wT(t){return{...t,properties:By(t.properties??{}),context:By(t.context??{})}}function By(t){const a={};for(const[r,o]of Object.entries(t))if(!xT.some(l=>r.toLowerCase().includes(l))){if(typeof o=="string"){a[r]=o.slice(0,256);continue}a[r]=o}return a}function Py(t){return["INVALID_SCHEMA","UNAUTHORIZED","FORBIDDEN","BAD_REQUEST"].includes(t)}function ST(t){const a=t.toLowerCase();return["required","invalid","not registered","unauthorized","forbidden","disabled","origin","missing"].some(r=>a.includes(r))}function Hl(t,a=iT){const r=Math.floor(Math.random()*250);return a*Math.pow(2,t)+r}var ET=class{constructor(t=WE,a=nT,r=aT){this.maxItems=t,this.maxRetries=a,this.maxAgeMs=r}enqueue(t,a=Date.now()){const r=this.readRecords(),o={event:t,status:"queued",retryCount:0,nextRetryAt:a,createdAt:a};for(r.push(o);r.length>this.maxItems;)r.shift();this.writeRecords(r)}getDueRecords(t,a=Date.now()){return this.readRecords().filter(r=>r.status==="queued"||r.status==="retryable_failed"&&r.nextRetryAt<=a).filter(r=>a-r.createdAt<=this.maxAgeMs).slice(0,t)}acknowledge(t){const a=new Set(t);this.writeRecords(this.readRecords().filter(r=>!a.has(r.event.event_id)))}markRetryable(t,a,r,o=Date.now()){const l=new Set(t),u=this.readRecords().flatMap(f=>{if(!l.has(f.event.event_id))return[f];const h=f.retryCount+1;if(h>this.maxRetries)return[];const p=typeof r=="function"?r(h,f):r;return[{...f,status:"retryable_failed",retryCount:h,nextRetryAt:o+p,lastError:a}]});this.writeRecords(u)}markPermanentFailed(t){const a=new Set(t);this.writeRecords(this.readRecords().map(r=>a.has(r.event.event_id)?{...r,status:"permanent_failed"}:r))}size(){return this.readRecords().length}readRecords(){try{const t=window.localStorage.getItem(Qt.outbox);return t?JSON.parse(t):[]}catch{return[]}}writeRecords(t){try{window.localStorage.setItem(Qt.outbox,JSON.stringify(t))}catch{}}};function TT(t){if(t.length===0)return"";let a=2166136261;for(const o of t){const l=o.event.event_id;for(let u=0;u>>0).toString(16).padStart(8,"0");return`idem_${t.length}_${t[0].event.event_id}_${r}`}var RT=class{constructor(t){this.options=t,this.outbox=new ET,this.flushTimer=null,this.handlePageHide=()=>{this.flushBatch({keepalive:!0})},this.handleVisibilityChange=()=>{document.visibilityState==="hidden"&&this.flushBatch({keepalive:!0})},this.batchSize=t.batchSize??eT,this.flushIntervalMs=t.flushIntervalMs??tT}start(){this.flushTimer||(this.flushTimer=setInterval(()=>{this.flush()},this.flushIntervalMs),window.addEventListener("pagehide",this.handlePageHide),document.addEventListener("visibilitychange",this.handleVisibilityChange))}stop(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),window.removeEventListener("pagehide",this.handlePageHide),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}enqueue(t){this.outbox.enqueue(wT(t))}async flush(){await this.flushBatch()}getHealth(){return{outboxSize:this.outbox.size(),lastFlushAt:this.lastFlushAt,lastError:this.lastError}}async flushBatch(t={}){const a=this.outbox.getDueRecords(this.batchSize);if(a.length===0)return;const r=TT(a);try{const o=await fetch(this.options.endpoint,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.options.token}`,"X-Idempotency-Key":r},keepalive:t.keepalive===!0,body:JSON.stringify({events:a.map(u=>u.event),idempotency_key:r})});if(!o.ok){const u=`HTTP ${o.status}`,f=a.map(h=>h.event.event_id);if([400,401,403].includes(o.status)){this.outbox.markPermanentFailed(f),this.lastError=u;return}throw new Error(u)}const l=await o.json();this.handleResponsePayload(a,l),this.lastFlushAt=Date.now(),this.lastError=void 0}catch(o){const l=a.map(u=>u.event.event_id);this.lastError=o instanceof Error?o.message:"Unknown error",this.outbox.markRetryable(l,this.lastError,u=>Hl(u))}}handleResponsePayload(t,a){if(Array.isArray(a.accepted_ids)||Array.isArray(a.rejected)){const r=a.accepted_ids??t.map(l=>l.event.event_id);this.outbox.acknowledge(r);const o=Array.isArray(a.rejected)?a.rejected:[];if(o.length>0){const l=o.filter(f=>Py(f.code)).map(f=>f.event_id),u=o.filter(f=>!Py(f.code)).map(f=>f.event_id);l.length>0&&this.outbox.markPermanentFailed(l),u.length>0&&this.outbox.markRetryable(u,"Retryable reject",f=>Hl(f))}return}if(typeof a.accepted=="number"||Array.isArray(a.errors)){const r=[...t],o=[],l=[];for(const p of a.errors??[]){const m=r.findIndex(g=>g.event.event_name===p.event_name);if(m===-1)continue;const[y]=r.splice(m,1);ST(p.reason)?o.push(y.event.event_id):l.push(y.event.event_id)}const u=typeof a.accepted=="number"?a.accepted:r.length,f=r.slice(0,u).map(p=>p.event.event_id),h=r.slice(u).map(p=>p.event.event_id);f.length>0&&this.outbox.acknowledge(f),o.length>0&&this.outbox.markPermanentFailed(o),l.length>0&&this.outbox.markRetryable(l,"Retryable reject",p=>Hl(p)),h.length>0&&this.outbox.markRetryable(h,"Rejected without detailed error",p=>Hl(p));return}this.outbox.acknowledge(t.map(r=>r.event.event_id))}},CT=class{constructor(){this.seen=new Map}shouldEmit(t,a=Date.now(),r=300){const o=this.seen.get(t);return o&&a-o{const r=yT(window.location,this.options.hashRouting);r!==this.lastPath&&this.dedupe.shouldEmit(`page:${r}`,Date.now(),50)&&(this.lastPath=r,this.onPageView())}}start(){this.emitIfChanged(),this.patchHistory(),window.addEventListener("popstate",this.emitIfChanged),this.options.hashRouting&&window.addEventListener("hashchange",this.emitIfChanged)}stop(){this.cleanupHistoryPatch?.(),window.removeEventListener("popstate",this.emitIfChanged),this.options.hashRouting&&window.removeEventListener("hashchange",this.emitIfChanged)}patchHistory(){const t=history.pushState.bind(history),a=history.replaceState.bind(history);history.pushState=(...r)=>{t(...r),this.emitIfChanged()},history.replaceState=(...r)=>{a(...r),this.emitIfChanged()},this.cleanupHistoryPatch=()=>{history.pushState=t,history.replaceState=a}}},AT=class{constructor(t,a,r=O0,o,l){this.onInactive=t,this.onActivity=a,this.timeoutMs=r,this.onIdleSuspend=o,this.onResume=l,this.inactivityTimer=null,this.hiddenAt=null,this.handleActivity=()=>{this.onActivity(),this.resetTimer()},this.handleBeforeUnload=()=>{this.onInactive("beforeunload")},this.handleVisibilityChange=()=>{if(document.visibilityState==="hidden"){this.hiddenAt=Date.now(),this.inactivityTimer&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=null),this.onIdleSuspend?.();return}if(document.visibilityState==="visible"){const u=this.hiddenAt;if(this.hiddenAt=null,u!==null){const f=Math.max(0,Date.now()-u);if(f>=this.timeoutMs){this.onInactive("inactivity");return}this.onResume?.(f)}this.handleActivity()}}}start(){this.resetTimer(),window.addEventListener("click",this.handleActivity,!0),window.addEventListener("keydown",this.handleActivity,!0),window.addEventListener("scroll",this.handleActivity,!0),window.addEventListener("beforeunload",this.handleBeforeUnload),document.addEventListener("visibilitychange",this.handleVisibilityChange)}stop(){this.inactivityTimer&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=null),this.hiddenAt=null,window.removeEventListener("click",this.handleActivity,!0),window.removeEventListener("keydown",this.handleActivity,!0),window.removeEventListener("scroll",this.handleActivity,!0),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}resetTimer(){this.inactivityTimer&&clearTimeout(this.inactivityTimer),this.inactivityTimer=setTimeout(()=>{this.onInactive("inactivity")},this.timeoutMs)}},_T=[/facebook\.com\/(?:tr\/|privacy_sandbox\/)/i,/connect\.facebook\.net/i,/analytics\.twitter\.com/i,/googletagmanager\.com/i,/doubleclick\.net/i];function Vy(t){return t?_T.some(a=>a.test(t)):!1}var DT=class{constructor(t){this.onError=t,this.boundError=this.handleError.bind(this),this.boundRejection=this.handleRejection.bind(this)}start(){window.addEventListener("error",this.boundError),window.addEventListener("unhandledrejection",this.boundRejection)}stop(){window.removeEventListener("error",this.boundError),window.removeEventListener("unhandledrejection",this.boundRejection)}handleError(t){const a=t.error?.message??t.message;Vy(a)||this.onError(a,{source:t.filename,lineno:t.lineno,colno:t.colno})}handleRejection(t){const a=t.reason instanceof Error?t.reason.message:String(t.reason);Vy(a)||this.onError(a,{error_type:"unhandledrejection"})}};function qy(){const t=globalThis.webVitals??globalThis.WebVitals;return t?.onLCP&&t.onFCP&&t.onCLS&&t.onTTFB&&t.onINP?t:null}var NT=class{constructor(t){this.onPerformance=t,this.started=!1,this.stopped=!1,this.observers=[],this.accumulatedCls=0,this.handleLoad=()=>{if(this.stopped)return;const a=performance.getEntriesByType("navigation")[0];a&&this.onPerformance({dom_content_loaded_ms:Math.round(a.domContentLoadedEventEnd-a.startTime),load_event_ms:Math.round(a.loadEventEnd-a.startTime),ttfb_ms:Math.round(a.responseStart-a.requestStart)})},this.emitLargestContentfulPaint=()=>{},this.handleVisibilityChange=()=>{document.visibilityState!=="hidden"||this.stopped||(this.emitLargestContentfulPaint(),this.accumulatedCls>0&&(this.onPerformance({metric_name:"CLS",metric_value:Number(this.accumulatedCls.toFixed(4)),metric_rating:"needs-improvement",metric_source:"performance_api_fallback"}),this.accumulatedCls=0))},this.handleWebVital=a=>{this.stopped||this.onPerformance({metric_name:a.name,metric_value:a.value,metric_rating:a.rating,metric_delta:a.delta,metric_id:a.id,navigation_type:a.navigationType,metric_source:"web_vitals"})}}start(){typeof window>"u"||this.started||(this.started=!0,this.stopped=!1,window.addEventListener("load",this.handleLoad,{once:!0}),this.initWebVitals())}stop(){this.stopped=!0,window.removeEventListener("load",this.handleLoad),document.removeEventListener("visibilitychange",this.handleVisibilityChange);for(const t of this.observers)t.disconnect();this.observers=[]}async initWebVitals(){const t=await this.waitForInjectedWebVitals();if(!this.stopped){if(t){this.registerWebVitals(t);return}this.initNativePerformanceFallback()}}async waitForInjectedWebVitals(t=1500,a=100){const r=qy();if(r)return r;const o=Date.now()+t;for(;!this.stopped&&Date.now(){window.setTimeout(u,a)});const l=qy();if(l)return l}return null}registerWebVitals(t){t.onLCP(this.handleWebVital),t.onFCP(this.handleWebVital),t.onCLS(this.handleWebVital),t.onTTFB(this.handleWebVital),t.onINP(this.handleWebVital)}initNativePerformanceFallback(){typeof PerformanceObserver>"u"||(this.observePaintMetrics(),this.observeLargestContentfulPaint(),this.observeLayoutShift())}observePaintMetrics(){try{const t=new PerformanceObserver(a=>{if(!this.stopped)for(const r of a.getEntries())r.name==="first-contentful-paint"&&this.onPerformance({metric_name:"FCP",metric_value:Math.round(r.startTime),metric_rating:"needs-improvement",metric_source:"performance_api_fallback"})});t.observe({type:"paint",buffered:!0}),this.observers.push(t)}catch{}}observeLargestContentfulPaint(){try{let t;const a=new PerformanceObserver(r=>{const o=r.getEntries();t=o[o.length-1]??t});a.observe({type:"largest-contentful-paint",buffered:!0}),this.observers.push(a),document.addEventListener("visibilitychange",this.handleVisibilityChange),this.emitLargestContentfulPaint=()=>{!t||this.stopped||(this.onPerformance({metric_name:"LCP",metric_value:Math.round(t.startTime),metric_rating:"needs-improvement",metric_source:"performance_api_fallback"}),t=void 0)}}catch{}}observeLayoutShift(){try{const t=new PerformanceObserver(a=>{if(!this.stopped)for(const r of a.getEntries())r.hadRecentInput||(this.accumulatedCls+=r.value??0)});t.observe({type:"layout-shift",buffered:!0}),this.observers.push(t)}catch{}}},MT=class{constructor(){this.definitions=new Map}register(t){this.definitions.set(t.event_name,t)}registerMany(t){for(const a of t)this.register(a)}replaceAll(t){this.clear(),this.registerMany(t)}get(t){return this.definitions.get(t)}list(){return[...this.definitions.values()]}unregister(t){this.definitions.delete(t)}clear(){this.definitions.clear()}};function LT(t,a){const r={},o=t.property_bindings??{};for(const[l,u]of Object.entries(o)){if(u.type==="constant"){r[l]=u.value;continue}if(a){if(u.type==="textContent"){const f=Kf(a,u.selector);r[l]=(f?.textContent??"").trim().slice(0,256);continue}if(u.type==="attribute"){const f=Kf(a,u.selector);r[l]=f?.getAttribute(u.attribute)??void 0;continue}if(u.type==="dataset"){const f=Kf(a,u.selector);r[l]=f?.dataset?.[u.key]??void 0;continue}if(u.type==="closestAttribute"){const f=a.closest(u.selector);r[l]=f?.getAttribute(u.attribute)??void 0;continue}if(u.type==="formField"){r[l]=D0(a,u.field,u.valueType??"value");continue}u.type==="formFields"&&(r[l]=zT(a,u.fields,u.includeAll??!1,u.valueType??"value"))}}return r}function Kf(t,a){return!a||t.matches(a)?t:t.closest(a)}function _0(t){return t instanceof HTMLFormElement?t:t.closest("form")}function D0(t,a,r){const o=_0(t);if(!o)return;const l=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(a):a,u=o.querySelector(`[name="${l}"]`);if(u)return r==="checked"&&"checked"in u?u.checked:"value"in u?u.value:void 0}function zT(t,a,r,o){const l=_0(t);if(!l)return;const u={};if(r){const f=l.querySelectorAll("[name]");for(const h of f){const p=h.getAttribute("name");p&&(o==="checked"&&"checked"in h?u[p]=h.checked:u[p]="value"in h?h.value:void 0)}return u}for(const f of a??[])u[f]=D0(t,f,o);return u}var jT=class{constructor(t){this.adapter=t,this.boundClick=this.handleClick.bind(this),this.boundSubmit=this.handleSubmit.bind(this),this.started=!1}start(){this.started||typeof document>"u"||(this.started=!0,document.addEventListener("click",this.boundClick,!0),document.addEventListener("submit",this.boundSubmit,!0))}stop(){!this.started||typeof document>"u"||(this.started=!1,document.removeEventListener("click",this.boundClick,!0),document.removeEventListener("submit",this.boundSubmit,!0))}handleClick(t){const a=t.target instanceof Element?t.target:null;if(a)for(const r of this.adapter.getDefinitions()){if(r.enabled===!1||r.trigger.kind!=="click"||!r.trigger.selector)continue;const o=a.closest(r.trigger.selector);o&&this.adapter.emitDefinedEvent(r.event_name,o)}}handleSubmit(t){const a=t.target instanceof HTMLFormElement?t.target:null;if(a)for(const r of this.adapter.getDefinitions()){if(r.enabled===!1||r.trigger.kind!=="submit"||!r.trigger.selector)continue;const o=a.matches(r.trigger.selector)?a:a.closest(r.trigger.selector);o&&this.adapter.emitDefinedEvent(r.event_name,o)}}},Ue=null;function N0(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${t}_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`}function UT(){const t=globalThis.__ENTER_ANALYTICS_ENV__??IE??{},a=t[Xo.enabled],r=t[Xo.projectId];return{enabled:a!=="false",endpoint:kT(t[Xo.endpoint]),token:t[Xo.token],projectId:r,debug:t[Xo.debug]==="true"}}function kT(t=jy){try{const a=t.endsWith("/")?t:`${t}/`;return new URL(Uy,a).toString()}catch{return`${jy}${Uy}`}}function HT(t={}){if(typeof window>"u"||Ue?.initialized)return;const a=UT(),r=sT(),o=new uT(t.inactivityTimeoutMs),l=N0("page"),u=new MT,f=new jT({getDefinitions:()=>u.list(),emitDefinedEvent:(m,y)=>{PT(m,y)}});if(Ue={config:a,hashRouting:t.hashRouting===!0,pageInstanceId:l,visitorId:r.visitorId,isNewVisitor:r.isNewVisitor,pageTiming:null,sessionManager:o,registry:u,eventDefinitionManager:f,initialized:!1},!a.enabled||!a.endpoint||!a.token)return;const h=new RT({endpoint:a.endpoint,token:a.token,debug:a.debug});Ue.transport=h;const p=o.ensureActiveSession();p.started&&er("session_start",{properties:{session_reason:p.reason}}),Ue.pageViewCollector=new OT(()=>{const m=Yy("route_change");z0(),Fy(),er("page_view",{properties:qT(m)})},{hashRouting:t.hashRouting===!0}),Ue.pageViewCollector.start(),Ue.sessionCollector=new AT(m=>{const y=Yy(m),g=o.endCurrentSession();g&&er("session_end",{properties:{ended_by:m,...y},overrideSessionId:g})},()=>{Fy()},t.inactivityTimeoutMs,()=>{U0()},()=>{k0()}),Ue.sessionCollector.start(),Ue.errorCollector=new DT((m,y)=>{er("error",{eventType:"traffic",properties:{error_message:m,...y}})}),Ue.errorCollector.start(),Ue.performanceCollector=new NT(m=>{er("performance",{eventType:"traffic",properties:m})}),Ue.performanceCollector.start(),Ue.eventDefinitionManager?.start(),h.start(),Ue.initialized=!0,t.disableVerifyPing!==!0&&er("enter_verify",{properties:{bootstrap_at:new Date().toISOString()}}),t.eventDefinitionsUrl&&BT(t.eventDefinitionsUrl,t.eventDefinitionsFetcher)}async function BT(t,a){const r=a??(typeof fetch=="function"?fetch.bind(globalThis):void 0);if(!r)return Xf("Skip loading remote event definitions because fetch is unavailable."),[];try{const o=await r(t,{method:"GET",credentials:"omit"});if(!o.ok)return Xf(`Failed to load remote event definitions: HTTP ${o.status}.`),[];const l=await o.json(),u=Array.isArray(l)?l:l.definitions??l.data?.definitions??[];return M0(u),u}catch(o){return Xf("Failed to load remote event definitions.",o),[]}}function M0(t){Ue?.registry.replaceAll(t)}function PT(t,a){const r=Ue?.registry.get(t);r&&VT(r.event_name,{eventType:r.event_type,context:r.context,properties:{...r.properties??{},...LT(r,a)}})}function VT(t,a={}){!Ue?.initialized||!Ue.config.enabled||L0(t,a.eventType??"custom",a)}function er(t,a={}){Ue?.config.enabled&&L0(t,a.eventType??"traffic",a)}function L0(t,a,r={}){if(!Ue?.transport)return;const{page:o,acquisition:l,device:u}=A0(Ue.pageInstanceId,Ue.hashRouting),f=rT({eventId:N0("evt"),eventName:t,eventType:a,identity:{visitor_id:Ue.visitorId,session_id:FT(t,r.overrideSessionId)},projectId:Ue.config.projectId,isNewVisitor:YT(t)?Ue.isNewVisitor:void 0,page:o,acquisition:l,device:u,options:r});Ue.transport.enqueue(f)}function Fy(){if(!Ue)return;const t=Ue.sessionManager.ensureActiveSession();t.started&&H0(t.reason),Ue.pageTiming||z0(),k0()}function z0(t=Date.now()){if(!Ue)return;const{page:a}=A0(Ue.pageInstanceId,Ue.hashRouting);Ue.pageTiming={url:a.url,path:a.path,startedAt:t,visibleStartedAt:j0()?t:void 0,visibleDurationMs:0}}function Yy(t,a=Date.now()){if(!Ue?.pageTiming)return{};const r=Ue.pageTiming;return U0(a),Ue.pageTiming=null,{lifecycle_reason:t,page_duration_ms:Math.max(0,a-r.startedAt),time_on_page_ms:r.visibleDurationMs,exit_page:r.url||void 0,exit_page_path:r.path||void 0}}function qT(t){return!t.page_duration_ms&&t.page_duration_ms!==0?{}:{previous_page_duration_ms:t.page_duration_ms,previous_time_on_page_ms:t.time_on_page_ms,previous_page_url:t.exit_page,previous_page_path:t.exit_page_path}}function j0(){return typeof document>"u"||document.visibilityState!=="hidden"}function U0(t=Date.now()){const a=Ue?.pageTiming;!a||a.visibleStartedAt===void 0||(a.visibleDurationMs+=Math.max(0,t-a.visibleStartedAt),a.visibleStartedAt=void 0)}function k0(t=Date.now()){const a=Ue?.pageTiming;!a||a.visibleStartedAt!==void 0||!j0()||(a.visibleStartedAt=t)}function FT(t,a){if(!Ue||a)return a??"";const r=Ue.sessionManager.ensureActiveSession();return r.started&&t!=="session_start"&&H0(r.reason),r.sessionId}function H0(t){er("session_start",{properties:{session_reason:t}})}function Xf(t,a){if(!(!Ue?.config.debug||typeof console>"u")){if(a===void 0){console.warn(`[enter-analytics] ${t}`);return}console.warn(`[enter-analytics] ${t}`,a)}}function YT(t){return t==="session_start"||t==="page_view"}async function $T(){return typeof window<"u"&&Array.isArray(window.__ENTER_ANALYTICS_DEFINITIONS__)?window.__ENTER_ANALYTICS_DEFINITIONS__:[]}function GT(){HT(),$T().then(t=>{t.length>0&&M0(t)})}const KT=1,XT=1e6;let Qf=0;function QT(){return Qf=(Qf+1)%Number.MAX_SAFE_INTEGER,Qf.toString()}const If=new Map,$y=t=>{if(If.has(t))return;const a=setTimeout(()=>{If.delete(t),is({type:"REMOVE_TOAST",toastId:t})},XT);If.set(t,a)},IT=(t,a)=>{switch(a.type){case"ADD_TOAST":return{...t,toasts:[a.toast,...t.toasts].slice(0,KT)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===a.toast.id?{...r,...a.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=a;return r?$y(r):t.toasts.forEach(o=>{$y(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return a.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==a.toastId)}}},Ql=[];let Il={toasts:[]};function is(t){Il=IT(Il,t),Ql.forEach(a=>{a(Il)})}function ZT({...t}){const a=QT(),r=l=>is({type:"UPDATE_TOAST",toast:{...l,id:a}}),o=()=>is({type:"DISMISS_TOAST",toastId:a});return is({type:"ADD_TOAST",toast:{...t,id:a,open:!0,onOpenChange:l=>{l||o()}}}),{id:a,dismiss:o,update:r}}function JT(){const[t,a]=S.useState(Il);return S.useEffect(()=>(Ql.push(a),()=>{const r=Ql.indexOf(a);r>-1&&Ql.splice(r,1)}),[t]),{...t,toast:ZT,dismiss:r=>is({type:"DISMISS_TOAST",toastId:r})}}var ms=r0();const B0=i0(ms);function jt(t,a,{checkForDefaultPrevented:r=!0}={}){return function(l){if(t?.(l),r===!1||!l.defaultPrevented)return a?.(l)}}function Gy(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function jd(...t){return a=>{let r=!1;const o=t.map(l=>{const u=Gy(l,a);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let l=0;l{const{scope:b,children:w,...E}=g,R=b?.[t]?.[p]||h,T=S.useMemo(()=>E,Object.values(E));return N.jsx(R.Provider,{value:T,children:w})};m.displayName=u+"Provider";function y(g,b){const w=b?.[t]?.[p]||h,E=S.useContext(w);if(E)return E;if(f!==void 0)return f;throw new Error(`\`${g}\` must be used within \`${u}\``)}return[m,y]}const l=()=>{const u=r.map(f=>S.createContext(f));return function(h){const p=h?.[t]||u;return S.useMemo(()=>({[`__scope${t}`]:{...h,[t]:p}}),[h,p])}};return l.scopeName=t,[o,WT(l,...a)]}function WT(...t){const a=t[0];if(t.length===1)return a;const r=()=>{const o=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(u){const f=o.reduce((h,{useScope:p,scopeName:m})=>{const g=p(u)[`__scope${m}`];return{...h,...g}},{});return S.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return r.scopeName=a.scopeName,r}function md(t){const a=eR(t),r=S.forwardRef((o,l)=>{const{children:u,...f}=o,h=S.Children.toArray(u),p=h.find(nR);if(p){const m=p.props.children,y=h.map(g=>g===p?S.Children.count(m)>1?S.Children.only(null):S.isValidElement(m)?m.props.children:null:g);return N.jsx(a,{...f,ref:l,children:S.isValidElement(m)?S.cloneElement(m,void 0,y):null})}return N.jsx(a,{...f,ref:l,children:u})});return r.displayName=`${t}.Slot`,r}function eR(t){const a=S.forwardRef((r,o)=>{const{children:l,...u}=r;if(S.isValidElement(l)){const f=iR(l),h=aR(u,l.props);return l.type!==S.Fragment&&(h.ref=o?jd(o,f):f),S.cloneElement(l,h)}return S.Children.count(l)>1?S.Children.only(null):null});return a.displayName=`${t}.SlotClone`,a}var P0=Symbol("radix.slottable");function tR(t){const a=({children:r})=>N.jsx(N.Fragment,{children:r});return a.displayName=`${t}.Slottable`,a.__radixId=P0,a}function nR(t){return S.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===P0}function aR(t,a){const r={...a};for(const o in a){const l=t[o],u=a[o];/^on[A-Z]/.test(o)?l&&u?r[o]=(...h)=>{const p=u(...h);return l(...h),p}:l&&(r[o]=l):o==="style"?r[o]={...l,...u}:o==="className"&&(r[o]=[l,u].filter(Boolean).join(" "))}return{...t,...r}}function iR(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function rR(t){const a=t+"CollectionProvider",[r,o]=gu(a),[l,u]=r(a,{collectionRef:{current:null},itemMap:new Map}),f=R=>{const{scope:T,children:M}=R,z=le.useRef(null),k=le.useRef(new Map).current;return N.jsx(l,{scope:T,itemMap:k,collectionRef:z,children:M})};f.displayName=a;const h=t+"CollectionSlot",p=md(h),m=le.forwardRef((R,T)=>{const{scope:M,children:z}=R,k=u(h,M),V=Zn(T,k.collectionRef);return N.jsx(p,{ref:V,children:z})});m.displayName=h;const y=t+"CollectionItemSlot",g="data-radix-collection-item",b=md(y),w=le.forwardRef((R,T)=>{const{scope:M,children:z,...k}=R,V=le.useRef(null),Q=Zn(T,V),X=u(y,M);return le.useEffect(()=>(X.itemMap.set(V,{ref:V,...k}),()=>{X.itemMap.delete(V)})),N.jsx(b,{[g]:"",ref:Q,children:z})});w.displayName=y;function E(R){const T=u(t+"CollectionConsumer",R);return le.useCallback(()=>{const z=T.collectionRef.current;if(!z)return[];const k=Array.from(z.querySelectorAll(`[${g}]`));return Array.from(T.itemMap.values()).sort((X,$)=>k.indexOf(X.ref.current)-k.indexOf($.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:f,Slot:m,ItemSlot:w},E,o]}var oR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pn=oR.reduce((t,a)=>{const r=md(`Primitive.${a}`),o=S.forwardRef((l,u)=>{const{asChild:f,...h}=l,p=f?r:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),N.jsx(p,{...h,ref:u})});return o.displayName=`Primitive.${a}`,{...t,[a]:o}},{});function V0(t,a){t&&ms.flushSync(()=>t.dispatchEvent(a))}function Ti(t){const a=S.useRef(t);return S.useEffect(()=>{a.current=t}),S.useMemo(()=>(...r)=>a.current?.(...r),[])}function sR(t,a=globalThis?.document){const r=Ti(t);S.useEffect(()=>{const o=l=>{l.key==="Escape"&&r(l)};return a.addEventListener("keydown",o,{capture:!0}),()=>a.removeEventListener("keydown",o,{capture:!0})},[r,a])}var lR="DismissableLayer",pd="dismissableLayer.update",uR="dismissableLayer.pointerDownOutside",cR="dismissableLayer.focusOutside",Ky,q0=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ud=S.forwardRef((t,a)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:f,onDismiss:h,...p}=t,m=S.useContext(q0),[y,g]=S.useState(null),b=y?.ownerDocument??globalThis?.document,[,w]=S.useState({}),E=Zn(a,$=>g($)),R=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),M=R.indexOf(T),z=y?R.indexOf(y):-1,k=m.layersWithOutsidePointerEventsDisabled.size>0,V=z>=M,Q=dR($=>{const A=$.target,ne=[...m.branches].some(ce=>ce.contains(A));!V||ne||(l?.($),f?.($),$.defaultPrevented||h?.())},b),X=hR($=>{const A=$.target;[...m.branches].some(ce=>ce.contains(A))||(u?.($),f?.($),$.defaultPrevented||h?.())},b);return sR($=>{z===m.layers.size-1&&(o?.($),!$.defaultPrevented&&h&&($.preventDefault(),h()))},b),S.useEffect(()=>{if(y)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Ky=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),Xy(),()=>{r&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Ky)}},[y,b,r,m]),S.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),Xy())},[y,m]),S.useEffect(()=>{const $=()=>w({});return document.addEventListener(pd,$),()=>document.removeEventListener(pd,$)},[]),N.jsx(pn.div,{...p,ref:E,style:{pointerEvents:k?V?"auto":"none":void 0,...t.style},onFocusCapture:jt(t.onFocusCapture,X.onFocusCapture),onBlurCapture:jt(t.onBlurCapture,X.onBlurCapture),onPointerDownCapture:jt(t.onPointerDownCapture,Q.onPointerDownCapture)})});Ud.displayName=lR;var fR="DismissableLayerBranch",F0=S.forwardRef((t,a)=>{const r=S.useContext(q0),o=S.useRef(null),l=Zn(a,o);return S.useEffect(()=>{const u=o.current;if(u)return r.branches.add(u),()=>{r.branches.delete(u)}},[r.branches]),N.jsx(pn.div,{...t,ref:l})});F0.displayName=fR;function dR(t,a=globalThis?.document){const r=Ti(t),o=S.useRef(!1),l=S.useRef(()=>{});return S.useEffect(()=>{const u=h=>{if(h.target&&!o.current){let p=function(){Y0(uR,r,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(a.removeEventListener("click",l.current),l.current=p,a.addEventListener("click",l.current,{once:!0})):p()}else a.removeEventListener("click",l.current);o.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",u),a.removeEventListener("click",l.current)}},[a,r]),{onPointerDownCapture:()=>o.current=!0}}function hR(t,a=globalThis?.document){const r=Ti(t),o=S.useRef(!1);return S.useEffect(()=>{const l=u=>{u.target&&!o.current&&Y0(cR,r,{originalEvent:u},{discrete:!1})};return a.addEventListener("focusin",l),()=>a.removeEventListener("focusin",l)},[a,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Xy(){const t=new CustomEvent(pd);document.dispatchEvent(t)}function Y0(t,a,r,{discrete:o}){const l=r.originalEvent.target,u=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});a&&l.addEventListener(t,a,{once:!0}),o?V0(l,u):l.dispatchEvent(u)}var mR=Ud,pR=F0,Ri=globalThis?.document?S.useLayoutEffect:()=>{},gR="Portal",$0=S.forwardRef((t,a)=>{const{container:r,...o}=t,[l,u]=S.useState(!1);Ri(()=>u(!0),[]);const f=r||l&&globalThis?.document?.body;return f?B0.createPortal(N.jsx(pn.div,{...o,ref:a}),f):null});$0.displayName=gR;function yR(t,a){return S.useReducer((r,o)=>a[r][o]??r,t)}var kd=t=>{const{present:a,children:r}=t,o=vR(a),l=typeof r=="function"?r({present:o.isPresent}):S.Children.only(r),u=Zn(o.ref,bR(l));return typeof r=="function"||o.isPresent?S.cloneElement(l,{ref:u}):null};kd.displayName="Presence";function vR(t){const[a,r]=S.useState(),o=S.useRef(null),l=S.useRef(t),u=S.useRef("none"),f=t?"mounted":"unmounted",[h,p]=yR(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const m=Bl(o.current);u.current=h==="mounted"?m:"none"},[h]),Ri(()=>{const m=o.current,y=l.current;if(y!==t){const b=u.current,w=Bl(m);t?p("MOUNT"):w==="none"||m?.display==="none"?p("UNMOUNT"):p(y&&b!==w?"ANIMATION_OUT":"UNMOUNT"),l.current=t}},[t,p]),Ri(()=>{if(a){let m;const y=a.ownerDocument.defaultView??window,g=w=>{const R=Bl(o.current).includes(CSS.escape(w.animationName));if(w.target===a&&R&&(p("ANIMATION_END"),!l.current)){const T=a.style.animationFillMode;a.style.animationFillMode="forwards",m=y.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=T)})}},b=w=>{w.target===a&&(u.current=Bl(o.current))};return a.addEventListener("animationstart",b),a.addEventListener("animationcancel",g),a.addEventListener("animationend",g),()=>{y.clearTimeout(m),a.removeEventListener("animationstart",b),a.removeEventListener("animationcancel",g),a.removeEventListener("animationend",g)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:S.useCallback(m=>{o.current=m?getComputedStyle(m):null,r(m)},[])}}function Bl(t){return t?.animationName||"none"}function bR(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var xR=Ld[" useInsertionEffect ".trim().toString()]||Ri;function wR({prop:t,defaultProp:a,onChange:r=()=>{},caller:o}){const[l,u,f]=SR({defaultProp:a,onChange:r}),h=t!==void 0,p=h?t:l;{const y=S.useRef(t!==void 0);S.useEffect(()=>{const g=y.current;g!==h&&console.warn(`${o} is changing from ${g?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=h},[h,o])}const m=S.useCallback(y=>{if(h){const g=ER(y)?y(t):y;g!==t&&f.current?.(g)}else u(y)},[h,t,u,f]);return[p,m]}function SR({defaultProp:t,onChange:a}){const[r,o]=S.useState(t),l=S.useRef(r),u=S.useRef(a);return xR(()=>{u.current=a},[a]),S.useEffect(()=>{l.current!==r&&(u.current?.(r),l.current=r)},[r,l]),[r,o,u]}function ER(t){return typeof t=="function"}var TR=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),RR="VisuallyHidden",yu=S.forwardRef((t,a)=>N.jsx(pn.span,{...t,ref:a,style:{...TR,...t.style}}));yu.displayName=RR;var CR=yu,Hd="ToastProvider",[Bd,OR,AR]=rR("Toast"),[G0]=gu("Toast",[AR]),[_R,vu]=G0(Hd),K0=t=>{const{__scopeToast:a,label:r="Notification",duration:o=5e3,swipeDirection:l="right",swipeThreshold:u=50,children:f}=t,[h,p]=S.useState(null),[m,y]=S.useState(0),g=S.useRef(!1),b=S.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Hd}\`. Expected non-empty \`string\`.`),N.jsx(Bd.Provider,{scope:a,children:N.jsx(_R,{scope:a,label:r,duration:o,swipeDirection:l,swipeThreshold:u,toastCount:m,viewport:h,onViewportChange:p,onToastAdd:S.useCallback(()=>y(w=>w+1),[]),onToastRemove:S.useCallback(()=>y(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:b,children:f})})};K0.displayName=Hd;var X0="ToastViewport",DR=["F8"],gd="toast.viewportPause",yd="toast.viewportResume",Q0=S.forwardRef((t,a)=>{const{__scopeToast:r,hotkey:o=DR,label:l="Notifications ({hotkey})",...u}=t,f=vu(X0,r),h=OR(r),p=S.useRef(null),m=S.useRef(null),y=S.useRef(null),g=S.useRef(null),b=Zn(a,g,f.onViewportChange),w=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=f.toastCount>0;S.useEffect(()=>{const T=M=>{o.length!==0&&o.every(k=>M[k]||M.code===k)&&g.current?.focus()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[o]),S.useEffect(()=>{const T=p.current,M=g.current;if(E&&T&&M){const z=()=>{if(!f.isClosePausedRef.current){const X=new CustomEvent(gd);M.dispatchEvent(X),f.isClosePausedRef.current=!0}},k=()=>{if(f.isClosePausedRef.current){const X=new CustomEvent(yd);M.dispatchEvent(X),f.isClosePausedRef.current=!1}},V=X=>{!T.contains(X.relatedTarget)&&k()},Q=()=>{T.contains(document.activeElement)||k()};return T.addEventListener("focusin",z),T.addEventListener("focusout",V),T.addEventListener("pointermove",z),T.addEventListener("pointerleave",Q),window.addEventListener("blur",z),window.addEventListener("focus",k),()=>{T.removeEventListener("focusin",z),T.removeEventListener("focusout",V),T.removeEventListener("pointermove",z),T.removeEventListener("pointerleave",Q),window.removeEventListener("blur",z),window.removeEventListener("focus",k)}}},[E,f.isClosePausedRef]);const R=S.useCallback(({tabbingDirection:T})=>{const z=h().map(k=>{const V=k.ref.current,Q=[V,...FR(V)];return T==="forwards"?Q:Q.reverse()});return(T==="forwards"?z.reverse():z).flat()},[h]);return S.useEffect(()=>{const T=g.current;if(T){const M=z=>{const k=z.altKey||z.ctrlKey||z.metaKey;if(z.key==="Tab"&&!k){const Q=document.activeElement,X=z.shiftKey;if(z.target===T&&X){m.current?.focus();return}const ne=R({tabbingDirection:X?"backwards":"forwards"}),ce=ne.findIndex(ve=>ve===Q);Zf(ne.slice(ce+1))?z.preventDefault():X?m.current?.focus():y.current?.focus()}};return T.addEventListener("keydown",M),()=>T.removeEventListener("keydown",M)}},[h,R]),N.jsxs(pR,{ref:p,role:"region","aria-label":l.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&N.jsx(vd,{ref:m,onFocusFromOutsideViewport:()=>{const T=R({tabbingDirection:"forwards"});Zf(T)}}),N.jsx(Bd.Slot,{scope:r,children:N.jsx(pn.ol,{tabIndex:-1,...u,ref:b})}),E&&N.jsx(vd,{ref:y,onFocusFromOutsideViewport:()=>{const T=R({tabbingDirection:"backwards"});Zf(T)}})]})});Q0.displayName=X0;var I0="ToastFocusProxy",vd=S.forwardRef((t,a)=>{const{__scopeToast:r,onFocusFromOutsideViewport:o,...l}=t,u=vu(I0,r);return N.jsx(yu,{tabIndex:0,...l,ref:a,style:{position:"fixed"},onFocus:f=>{const h=f.relatedTarget;!u.viewport?.contains(h)&&o()}})});vd.displayName=I0;var ps="Toast",NR="toast.swipeStart",MR="toast.swipeMove",LR="toast.swipeCancel",zR="toast.swipeEnd",Z0=S.forwardRef((t,a)=>{const{forceMount:r,open:o,defaultOpen:l,onOpenChange:u,...f}=t,[h,p]=wR({prop:o,defaultProp:l??!0,onChange:u,caller:ps});return N.jsx(kd,{present:r||h,children:N.jsx(kR,{open:h,...f,ref:a,onClose:()=>p(!1),onPause:Ti(t.onPause),onResume:Ti(t.onResume),onSwipeStart:jt(t.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:jt(t.onSwipeMove,m=>{const{x:y,y:g}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:jt(t.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:jt(t.onSwipeEnd,m=>{const{x:y,y:g}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),p(!1)})})})});Z0.displayName=ps;var[jR,UR]=G0(ps,{onClose(){}}),kR=S.forwardRef((t,a)=>{const{__scopeToast:r,type:o="foreground",duration:l,open:u,onClose:f,onEscapeKeyDown:h,onPause:p,onResume:m,onSwipeStart:y,onSwipeMove:g,onSwipeCancel:b,onSwipeEnd:w,...E}=t,R=vu(ps,r),[T,M]=S.useState(null),z=Zn(a,ae=>M(ae)),k=S.useRef(null),V=S.useRef(null),Q=l||R.duration,X=S.useRef(0),$=S.useRef(Q),A=S.useRef(0),{onToastAdd:ne,onToastRemove:ce}=R,ve=Ti(()=>{T?.contains(document.activeElement)&&R.viewport?.focus(),f()}),he=S.useCallback(ae=>{!ae||ae===1/0||(window.clearTimeout(A.current),X.current=new Date().getTime(),A.current=window.setTimeout(ve,ae))},[ve]);S.useEffect(()=>{const ae=R.viewport;if(ae){const re=()=>{he($.current),m?.()},D=()=>{const q=new Date().getTime()-X.current;$.current=$.current-q,window.clearTimeout(A.current),p?.()};return ae.addEventListener(gd,D),ae.addEventListener(yd,re),()=>{ae.removeEventListener(gd,D),ae.removeEventListener(yd,re)}}},[R.viewport,Q,p,m,he]),S.useEffect(()=>{u&&!R.isClosePausedRef.current&&he(Q)},[u,Q,R.isClosePausedRef,he]),S.useEffect(()=>(ne(),()=>ce()),[ne,ce]);const fe=S.useMemo(()=>T?ib(T):null,[T]);return R.viewport?N.jsxs(N.Fragment,{children:[fe&&N.jsx(HR,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:fe}),N.jsx(jR,{scope:r,onClose:ve,children:ms.createPortal(N.jsx(Bd.ItemSlot,{scope:r,children:N.jsx(mR,{asChild:!0,onEscapeKeyDown:jt(h,()=>{R.isFocusedToastEscapeKeyDownRef.current||ve(),R.isFocusedToastEscapeKeyDownRef.current=!1}),children:N.jsx(pn.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":R.swipeDirection,...E,ref:z,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:jt(t.onKeyDown,ae=>{ae.key==="Escape"&&(h?.(ae.nativeEvent),ae.nativeEvent.defaultPrevented||(R.isFocusedToastEscapeKeyDownRef.current=!0,ve()))}),onPointerDown:jt(t.onPointerDown,ae=>{ae.button===0&&(k.current={x:ae.clientX,y:ae.clientY})}),onPointerMove:jt(t.onPointerMove,ae=>{if(!k.current)return;const re=ae.clientX-k.current.x,D=ae.clientY-k.current.y,q=!!V.current,Z=["left","right"].includes(R.swipeDirection),ie=["left","up"].includes(R.swipeDirection)?Math.min:Math.max,J=Z?ie(0,re):0,O=Z?0:ie(0,D),Y=ae.pointerType==="touch"?10:2,K={x:J,y:O},te={originalEvent:ae,delta:K};q?(V.current=K,Pl(MR,g,te,{discrete:!1})):Qy(K,R.swipeDirection,Y)?(V.current=K,Pl(NR,y,te,{discrete:!1}),ae.target.setPointerCapture(ae.pointerId)):(Math.abs(re)>Y||Math.abs(D)>Y)&&(k.current=null)}),onPointerUp:jt(t.onPointerUp,ae=>{const re=V.current,D=ae.target;if(D.hasPointerCapture(ae.pointerId)&&D.releasePointerCapture(ae.pointerId),V.current=null,k.current=null,re){const q=ae.currentTarget,Z={originalEvent:ae,delta:re};Qy(re,R.swipeDirection,R.swipeThreshold)?Pl(zR,w,Z,{discrete:!0}):Pl(LR,b,Z,{discrete:!0}),q.addEventListener("click",ie=>ie.preventDefault(),{once:!0})}})})})}),R.viewport)})]}):null}),HR=t=>{const{__scopeToast:a,children:r,...o}=t,l=vu(ps,a),[u,f]=S.useState(!1),[h,p]=S.useState(!1);return VR(()=>f(!0)),S.useEffect(()=>{const m=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(m)},[]),h?null:N.jsx($0,{asChild:!0,children:N.jsx(yu,{...o,children:u&&N.jsxs(N.Fragment,{children:[l.label," ",r]})})})},BR="ToastTitle",J0=S.forwardRef((t,a)=>{const{__scopeToast:r,...o}=t;return N.jsx(pn.div,{...o,ref:a})});J0.displayName=BR;var PR="ToastDescription",W0=S.forwardRef((t,a)=>{const{__scopeToast:r,...o}=t;return N.jsx(pn.div,{...o,ref:a})});W0.displayName=PR;var eb="ToastAction",tb=S.forwardRef((t,a)=>{const{altText:r,...o}=t;return r.trim()?N.jsx(ab,{altText:r,asChild:!0,children:N.jsx(Pd,{...o,ref:a})}):(console.error(`Invalid prop \`altText\` supplied to \`${eb}\`. Expected non-empty \`string\`.`),null)});tb.displayName=eb;var nb="ToastClose",Pd=S.forwardRef((t,a)=>{const{__scopeToast:r,...o}=t,l=UR(nb,r);return N.jsx(ab,{asChild:!0,children:N.jsx(pn.button,{type:"button",...o,ref:a,onClick:jt(t.onClick,l.onClose)})})});Pd.displayName=nb;var ab=S.forwardRef((t,a)=>{const{__scopeToast:r,altText:o,...l}=t;return N.jsx(pn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...l,ref:a})});function ib(t){const a=[];return Array.from(t.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&a.push(o.textContent),qR(o)){const l=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!l)if(u){const f=o.dataset.radixToastAnnounceAlt;f&&a.push(f)}else a.push(...ib(o))}}),a}function Pl(t,a,r,{discrete:o}){const l=r.originalEvent.currentTarget,u=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});a&&l.addEventListener(t,a,{once:!0}),o?V0(l,u):l.dispatchEvent(u)}var Qy=(t,a,r=0)=>{const o=Math.abs(t.x),l=Math.abs(t.y),u=o>l;return a==="left"||a==="right"?u&&o>r:!u&&l>r};function VR(t=()=>{}){const a=Ti(t);Ri(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(a)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[a])}function qR(t){return t.nodeType===t.ELEMENT_NODE}function FR(t){const a=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)a.push(r.currentNode);return a}function Zf(t){const a=document.activeElement;return t.some(r=>r===a?!0:(r.focus(),document.activeElement!==a))}var YR=K0,rb=Q0,ob=Z0,sb=J0,lb=W0,ub=tb,cb=Pd;function fb(t){var a,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(a=0;atypeof t=="boolean"?`${t}`:t===0?"0":t,Zy=db,hb=(t,a)=>r=>{var o;if(a?.variants==null)return Zy(t,r?.class,r?.className);const{variants:l,defaultVariants:u}=a,f=Object.keys(l).map(m=>{const y=r?.[m],g=u?.[m];if(y===null)return null;const b=Iy(y)||Iy(g);return l[m][b]}),h=r&&Object.entries(r).reduce((m,y)=>{let[g,b]=y;return b===void 0||(m[g]=b),m},{}),p=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((m,y)=>{let{class:g,className:b,...w}=y;return Object.entries(w).every(E=>{let[R,T]=E;return Array.isArray(T)?T.includes({...u,...h}[R]):{...u,...h}[R]===T})?[...m,g,b]:m},[]);return Zy(t,f,p,r?.class,r?.className)};const $R=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),GR=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,r,o)=>o?o.toUpperCase():r.toLowerCase()),Jy=t=>{const a=GR(t);return a.charAt(0).toUpperCase()+a.slice(1)},mb=(...t)=>t.filter((a,r,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===r).join(" ").trim(),KR=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var XR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const QR=S.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:l="",children:u,iconNode:f,...h},p)=>S.createElement("svg",{ref:p,...XR,width:a,height:a,stroke:t,strokeWidth:o?Number(r)*24/Number(a):r,className:mb("lucide",l),...!u&&!KR(h)&&{"aria-hidden":"true"},...h},[...f.map(([m,y])=>S.createElement(m,y)),...Array.isArray(u)?u:[u]]));const ea=(t,a)=>{const r=S.forwardRef(({className:o,...l},u)=>S.createElement(QR,{ref:u,iconNode:a,className:mb(`lucide-${$R(Jy(t))}`,`lucide-${t}`,o),...l}));return r.displayName=Jy(t),r};const IR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ZR=ea("arrow-right",IR);const JR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],WR=ea("check",JR);const eC=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],tC=ea("gift",eC);const nC=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],aC=ea("lock",nC);const iC=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Vd=ea("mail",iC);const rC=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],qd=ea("shield-check",rC);const oC=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],sC=ea("shopping-cart",oC);const lC=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],uC=ea("sparkles",lC);const cC=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],fC=ea("trending-up",cC);const dC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hC=ea("x",dC);const mC=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],pC=ea("zap",mC),gC=(t,a)=>{const r=new Array(t.length+a.length);for(let o=0;o({classGroupId:t,validator:a}),pb=(t=new Map,a=null,r)=>({nextPart:t,validators:a,classGroupId:r}),ou="-",Wy=[],vC="arbitrary..",bC=t=>{const a=wC(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return xC(f);const h=f.split(ou),p=h[0]===""&&h.length>1?1:0;return gb(h,p,a)},getConflictingClassGroupIds:(f,h)=>{if(h){const p=o[f],m=r[f];return p?m?gC(m,p):p:m||Wy}return r[f]||Wy}}},gb=(t,a,r)=>{if(t.length-a===0)return r.classGroupId;const l=t[a],u=r.nextPart.get(l);if(u){const m=gb(t,a+1,u);if(m)return m}const f=r.validators;if(f===null)return;const h=a===0?t.join(ou):t.slice(a).join(ou),p=f.length;for(let m=0;mt.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=t.slice(1,-1),r=a.indexOf(":"),o=a.slice(0,r);return o?vC+o:void 0})(),wC=t=>{const{theme:a,classGroups:r}=t;return SC(r,a)},SC=(t,a)=>{const r=pb();for(const o in t){const l=t[o];Fd(l,r,o,a)}return r},Fd=(t,a,r,o)=>{const l=t.length;for(let u=0;u{if(typeof t=="string"){TC(t,a,r);return}if(typeof t=="function"){RC(t,a,r,o);return}CC(t,a,r,o)},TC=(t,a,r)=>{const o=t===""?a:yb(a,t);o.classGroupId=r},RC=(t,a,r,o)=>{if(OC(t)){Fd(t(o),a,r,o);return}a.validators===null&&(a.validators=[]),a.validators.push(yC(r,t))},CC=(t,a,r,o)=>{const l=Object.entries(t),u=l.length;for(let f=0;f{let r=t;const o=a.split(ou),l=o.length;for(let u=0;u"isThemeGetter"in t&&t.isThemeGetter===!0,AC=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,r=Object.create(null),o=Object.create(null);const l=(u,f)=>{r[u]=f,a++,a>t&&(a=0,o=r,r=Object.create(null))};return{get(u){let f=r[u];if(f!==void 0)return f;if((f=o[u])!==void 0)return l(u,f),f},set(u,f){u in r?r[u]=f:l(u,f)}}},bd="!",ev=":",_C=[],tv=(t,a,r,o,l)=>({modifiers:t,hasImportantModifier:a,baseClassName:r,maybePostfixModifierPosition:o,isExternal:l}),DC=t=>{const{prefix:a,experimentalParseClassName:r}=t;let o=l=>{const u=[];let f=0,h=0,p=0,m;const y=l.length;for(let R=0;Rp?m-p:void 0;return tv(u,w,b,E)};if(a){const l=a+ev,u=o;o=f=>f.startsWith(l)?u(f.slice(l.length)):tv(_C,!1,f,void 0,!0)}if(r){const l=o;o=u=>r({className:u,parseClassName:l})}return o},NC=t=>{const a=new Map;return t.orderSensitiveModifiers.forEach((r,o)=>{a.set(r,1e6+o)}),r=>{const o=[];let l=[];for(let u=0;u0&&(l.sort(),o.push(...l),l=[]),o.push(f)):l.push(f)}return l.length>0&&(l.sort(),o.push(...l)),o}},MC=t=>({cache:AC(t.cacheSize),parseClassName:DC(t),sortModifiers:NC(t),...bC(t)}),LC=/\s+/,zC=(t,a)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l,sortModifiers:u}=a,f=[],h=t.trim().split(LC);let p="";for(let m=h.length-1;m>=0;m-=1){const y=h[m],{isExternal:g,modifiers:b,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:R}=r(y);if(g){p=y+(p.length>0?" "+p:p);continue}let T=!!R,M=o(T?E.substring(0,R):E);if(!M){if(!T){p=y+(p.length>0?" "+p:p);continue}if(M=o(E),!M){p=y+(p.length>0?" "+p:p);continue}T=!1}const z=b.length===0?"":b.length===1?b[0]:u(b).join(":"),k=w?z+bd:z,V=k+M;if(f.indexOf(V)>-1)continue;f.push(V);const Q=l(M,T);for(let X=0;X0?" "+p:p)}return p},jC=(...t)=>{let a=0,r,o,l="";for(;a{if(typeof t=="string")return t;let a,r="";for(let o=0;o{let r,o,l,u;const f=p=>{const m=a.reduce((y,g)=>g(y),t());return r=MC(m),o=r.cache.get,l=r.cache.set,u=h,h(p)},h=p=>{const m=o(p);if(m)return m;const y=zC(p,r);return l(p,y),y};return u=f,(...p)=>u(jC(...p))},kC=[],zt=t=>{const a=r=>r[t]||kC;return a.isThemeGetter=!0,a},bb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,BC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,VC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vi=t=>HC.test(t),ke=t=>!!t&&!Number.isNaN(Number(t)),bi=t=>!!t&&Number.isInteger(Number(t)),Jf=t=>t.endsWith("%")&&ke(t.slice(0,-1)),Ha=t=>BC.test(t),wb=()=>!0,YC=t=>PC.test(t)&&!VC.test(t),Yd=()=>!1,$C=t=>qC.test(t),GC=t=>FC.test(t),KC=t=>!xe(t)&&!we(t),XC=t=>Ai(t,Tb,Yd),xe=t=>bb.test(t),Ji=t=>Ai(t,Rb,YC),nv=t=>Ai(t,nO,ke),QC=t=>Ai(t,Ob,wb),IC=t=>Ai(t,Cb,Yd),av=t=>Ai(t,Sb,Yd),ZC=t=>Ai(t,Eb,GC),Vl=t=>Ai(t,Ab,$C),we=t=>xb.test(t),Io=t=>rr(t,Rb),JC=t=>rr(t,Cb),iv=t=>rr(t,Sb),WC=t=>rr(t,Tb),eO=t=>rr(t,Eb),ql=t=>rr(t,Ab,!0),tO=t=>rr(t,Ob,!0),Ai=(t,a,r)=>{const o=bb.exec(t);return o?o[1]?a(o[1]):r(o[2]):!1},rr=(t,a,r=!1)=>{const o=xb.exec(t);return o?o[1]?a(o[1]):r:!1},Sb=t=>t==="position"||t==="percentage",Eb=t=>t==="image"||t==="url",Tb=t=>t==="length"||t==="size"||t==="bg-size",Rb=t=>t==="length",nO=t=>t==="number",Cb=t=>t==="family-name",Ob=t=>t==="number"||t==="weight",Ab=t=>t==="shadow",aO=()=>{const t=zt("color"),a=zt("font"),r=zt("text"),o=zt("font-weight"),l=zt("tracking"),u=zt("leading"),f=zt("breakpoint"),h=zt("container"),p=zt("spacing"),m=zt("radius"),y=zt("shadow"),g=zt("inset-shadow"),b=zt("text-shadow"),w=zt("drop-shadow"),E=zt("blur"),R=zt("perspective"),T=zt("aspect"),M=zt("ease"),z=zt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...V(),we,xe],X=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],A=()=>[we,xe,p],ne=()=>[vi,"full","auto",...A()],ce=()=>[bi,"none","subgrid",we,xe],ve=()=>["auto",{span:["full",bi,we,xe]},bi,we,xe],he=()=>[bi,"auto",we,xe],fe=()=>["auto","min","max","fr",we,xe],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...A()],q=()=>[vi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],Z=()=>[vi,"screen","full","dvw","lvw","svw","min","max","fit",...A()],ie=()=>[vi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],J=()=>[t,we,xe],O=()=>[...V(),iv,av,{position:[we,xe]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",WC,XC,{size:[we,xe]}],te=()=>[Jf,Io,Ji],se=()=>["","none","full",m,we,xe],de=()=>["",ke,Io,Ji],Re=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ce=()=>[ke,Jf,iv,av],Pt=()=>["","none",E,we,xe],kt=()=>["none",ke,we,xe],_t=()=>["none",ke,we,xe],Ze=()=>[ke,we,xe],ht=()=>[vi,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ha],breakpoint:[Ha],color:[wb],container:[Ha],"drop-shadow":[Ha],ease:["in","out","in-out"],font:[KC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ha],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ha],shadow:[Ha],spacing:["px",ke],text:[Ha],"text-shadow":[Ha],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vi,xe,we,T]}],container:["container"],columns:[{columns:[ke,xe,we,h]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Q()}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{"inset-s":ne(),start:ne()}],end:[{"inset-e":ne(),end:ne()}],"inset-bs":[{"inset-bs":ne()}],"inset-be":[{"inset-be":ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[bi,"auto",we,xe]}],basis:[{basis:[vi,"full","auto",h,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,vi,"auto","initial","none",xe]}],grow:[{grow:["",ke,we,xe]}],shrink:[{shrink:["",ke,we,xe]}],order:[{order:[bi,"first","last","none",we,xe]}],"grid-cols":[{"grid-cols":ce()}],"col-start-end":[{col:ve()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":ce()}],"row-start-end":[{row:ve()}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":fe()}],"auto-rows":[{"auto-rows":fe()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pbs:[{pbs:A()}],pbe:[{pbe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[h,"screen",...q()]}],"min-w":[{"min-w":[h,"screen","none",...q()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,Io,Ji]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,tO,QC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jf,xe]}],"font-family":[{font:[JC,IC,a]}],"font-features":[{"font-features":[xe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,we,xe]}],"line-clamp":[{"line-clamp":[ke,"none",we,nv]}],leading:[{leading:[u,...A()]}],"list-image":[{"list-image":["none",we,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",we,Ji]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[ke,"auto",we,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},bi,we,xe],radial:["",we,xe],conic:[bi,we,xe]},eO,ZC]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-bs":[{"border-bs":J()}],"border-color-be":[{"border-be":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,we,xe]}],"outline-w":[{outline:["",ke,Io,Ji]}],"outline-color":[{outline:J()}],shadow:[{shadow:["","none",y,ql,Vl]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",g,ql,Vl]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[ke,Ji]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":J()}],"text-shadow":[{"text-shadow":["none",b,ql,Vl]}],"text-shadow-color":[{"text-shadow":J()}],opacity:[{opacity:[ke,we,xe]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ce()}],"mask-image-linear-from-color":[{"mask-linear-from":J()}],"mask-image-linear-to-color":[{"mask-linear-to":J()}],"mask-image-t-from-pos":[{"mask-t-from":Ce()}],"mask-image-t-to-pos":[{"mask-t-to":Ce()}],"mask-image-t-from-color":[{"mask-t-from":J()}],"mask-image-t-to-color":[{"mask-t-to":J()}],"mask-image-r-from-pos":[{"mask-r-from":Ce()}],"mask-image-r-to-pos":[{"mask-r-to":Ce()}],"mask-image-r-from-color":[{"mask-r-from":J()}],"mask-image-r-to-color":[{"mask-r-to":J()}],"mask-image-b-from-pos":[{"mask-b-from":Ce()}],"mask-image-b-to-pos":[{"mask-b-to":Ce()}],"mask-image-b-from-color":[{"mask-b-from":J()}],"mask-image-b-to-color":[{"mask-b-to":J()}],"mask-image-l-from-pos":[{"mask-l-from":Ce()}],"mask-image-l-to-pos":[{"mask-l-to":Ce()}],"mask-image-l-from-color":[{"mask-l-from":J()}],"mask-image-l-to-color":[{"mask-l-to":J()}],"mask-image-x-from-pos":[{"mask-x-from":Ce()}],"mask-image-x-to-pos":[{"mask-x-to":Ce()}],"mask-image-x-from-color":[{"mask-x-from":J()}],"mask-image-x-to-color":[{"mask-x-to":J()}],"mask-image-y-from-pos":[{"mask-y-from":Ce()}],"mask-image-y-to-pos":[{"mask-y-to":Ce()}],"mask-image-y-from-color":[{"mask-y-from":J()}],"mask-image-y-to-color":[{"mask-y-to":J()}],"mask-image-radial":[{"mask-radial":[we,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ce()}],"mask-image-radial-from-color":[{"mask-radial-from":J()}],"mask-image-radial-to-color":[{"mask-radial-to":J()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ce()}],"mask-image-conic-from-color":[{"mask-conic-from":J()}],"mask-image-conic-to-color":[{"mask-conic-to":J()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,xe]}],filter:[{filter:["","none",we,xe]}],blur:[{blur:Pt()}],brightness:[{brightness:[ke,we,xe]}],contrast:[{contrast:[ke,we,xe]}],"drop-shadow":[{"drop-shadow":["","none",w,ql,Vl]}],"drop-shadow-color":[{"drop-shadow":J()}],grayscale:[{grayscale:["",ke,we,xe]}],"hue-rotate":[{"hue-rotate":[ke,we,xe]}],invert:[{invert:["",ke,we,xe]}],saturate:[{saturate:[ke,we,xe]}],sepia:[{sepia:["",ke,we,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,xe]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,we,xe]}],"backdrop-contrast":[{"backdrop-contrast":[ke,we,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,we,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,we,xe]}],"backdrop-invert":[{"backdrop-invert":["",ke,we,xe]}],"backdrop-opacity":[{"backdrop-opacity":[ke,we,xe]}],"backdrop-saturate":[{"backdrop-saturate":[ke,we,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,we,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",we,xe]}],ease:[{ease:["linear","initial",M,we,xe]}],delay:[{delay:[ke,we,xe]}],animate:[{animate:["none",z,we,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,we,xe]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:kt()}],"rotate-x":[{"rotate-x":kt()}],"rotate-y":[{"rotate-y":kt()}],"rotate-z":[{"rotate-z":kt()}],scale:[{scale:_t()}],"scale-x":[{"scale-x":_t()}],"scale-y":[{"scale-y":_t()}],"scale-z":[{"scale-z":_t()}],"scale-3d":["scale-3d"],skew:[{skew:Ze()}],"skew-x":[{"skew-x":Ze()}],"skew-y":[{"skew-y":Ze()}],transform:[{transform:[we,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ht()}],"translate-x":[{"translate-x":ht()}],"translate-y":[{"translate-y":ht()}],"translate-z":[{"translate-z":ht()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mbs":[{"scroll-mbs":A()}],"scroll-mbe":[{"scroll-mbe":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pbs":[{"scroll-pbs":A()}],"scroll-pbe":[{"scroll-pbe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,xe]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[ke,Io,Ji,nv]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},iO=UC(aO);function ta(...t){return iO(db(t))}const rO=YR,_b=S.forwardRef(({className:t,...a},r)=>N.jsx(rb,{ref:r,className:ta("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...a}));_b.displayName=rb.displayName;const oO=hb("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Db=S.forwardRef(({className:t,variant:a,...r},o)=>N.jsx(ob,{ref:o,className:ta(oO({variant:a}),t),...r}));Db.displayName=ob.displayName;const sO=S.forwardRef(({className:t,...a},r)=>N.jsx(ub,{ref:r,className:ta("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...a}));sO.displayName=ub.displayName;const Nb=S.forwardRef(({className:t,...a},r)=>N.jsx(cb,{ref:r,className:ta("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...a,children:N.jsx(hC,{className:"h-4 w-4"})}));Nb.displayName=cb.displayName;const Mb=S.forwardRef(({className:t,...a},r)=>N.jsx(sb,{ref:r,className:ta("text-sm font-semibold",t),...a}));Mb.displayName=sb.displayName;const Lb=S.forwardRef(({className:t,...a},r)=>N.jsx(lb,{ref:r,className:ta("text-sm opacity-90",t),...a}));Lb.displayName=lb.displayName;function lO(){const{toasts:t}=JT();return N.jsxs(rO,{children:[t.map(function({id:a,title:r,description:o,action:l,...u}){return N.jsxs(Db,{...u,children:[N.jsxs("div",{className:"grid gap-1",children:[r&&N.jsx(Mb,{children:r}),o&&N.jsx(Lb,{children:o})]}),l,N.jsx(Nb,{})]},a)}),N.jsx(_b,{})]})}var uO=(t,a,r,o,l,u,f,h)=>{let p=document.documentElement,m=["light","dark"];function y(w){(Array.isArray(t)?t:[t]).forEach(E=>{let R=E==="class",T=R&&u?l.map(M=>u[M]||M):l;R?(p.classList.remove(...T),p.classList.add(u&&u[w]?u[w]:w)):p.setAttribute(E,w)}),g(w)}function g(w){h&&m.includes(w)&&(p.style.colorScheme=w)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)y(o);else try{let w=localStorage.getItem(a)||r,E=f&&w==="system"?b():w;y(E)}catch{}},cO=S.createContext(void 0),fO={setTheme:t=>{},themes:[]},dO=()=>{var t;return(t=S.useContext(cO))!=null?t:fO};S.memo(({forcedTheme:t,storageKey:a,attribute:r,enableSystem:o,enableColorScheme:l,defaultTheme:u,value:f,themes:h,nonce:p,scriptProps:m})=>{let y=JSON.stringify([r,a,u,t,h,f,o,l]).slice(1,-1);return S.createElement("script",{...m,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${uO.toString()})(${y})`}})});function hO(t){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const mO=t=>{switch(t){case"success":return yO;case"info":return bO;case"warning":return vO;case"error":return xO;default:return null}},pO=Array(12).fill(0),gO=({visible:t,className:a})=>le.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":t},le.createElement("div",{className:"sonner-spinner"},pO.map((r,o)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),yO=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),vO=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),bO=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),xO=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),wO=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),SO=()=>{const[t,a]=le.useState(document.hidden);return le.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let xd=1;class EO{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const r=this.subscribers.indexOf(a);this.subscribers.splice(r,1)}),this.publish=a=>{this.subscribers.forEach(r=>r(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var r;const{message:o,...l}=a,u=typeof a?.id=="number"||((r=a.id)==null?void 0:r.length)>0?a.id:xd++,f=this.toasts.find(p=>p.id===u),h=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),f?this.toasts=this.toasts.map(p=>p.id===u?(this.publish({...p,...a,id:u,title:o}),{...p,...a,id:u,dismissible:h,title:o}):p):this.addToast({title:o,...l,dismissible:h,id:u}),u},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:a,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),a),this.message=(a,r)=>this.create({...r,message:a}),this.error=(a,r)=>this.create({...r,message:a,type:"error"}),this.success=(a,r)=>this.create({...r,type:"success",message:a}),this.info=(a,r)=>this.create({...r,type:"info",message:a}),this.warning=(a,r)=>this.create({...r,type:"warning",message:a}),this.loading=(a,r)=>this.create({...r,type:"loading",message:a}),this.promise=(a,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:a,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const l=Promise.resolve(a instanceof Function?a():a);let u=o!==void 0,f;const h=l.then(async m=>{if(f=["resolve",m],le.isValidElement(m))u=!1,this.create({id:o,type:"default",message:m});else if(RO(m)&&!m.ok){u=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,E=typeof g=="object"&&!le.isValidElement(g)?g:{message:g};this.create({id:o,type:"error",description:b,...E})}else if(m instanceof Error){u=!1;const g=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,E=typeof g=="object"&&!le.isValidElement(g)?g:{message:g};this.create({id:o,type:"error",description:b,...E})}else if(r.success!==void 0){u=!1;const g=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,E=typeof g=="object"&&!le.isValidElement(g)?g:{message:g};this.create({id:o,type:"success",description:b,...E})}}).catch(async m=>{if(f=["reject",m],r.error!==void 0){u=!1;const y=typeof r.error=="function"?await r.error(m):r.error,g=typeof r.description=="function"?await r.description(m):r.description,w=typeof y=="object"&&!le.isValidElement(y)?y:{message:y};this.create({id:o,type:"error",description:g,...w})}}).finally(()=>{u&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((m,y)=>h.then(()=>f[0]==="reject"?y(f[1]):m(f[1])).catch(y));return typeof o!="string"&&typeof o!="number"?{unwrap:p}:Object.assign(o,{unwrap:p})},this.custom=(a,r)=>{const o=r?.id||xd++;return this.create({jsx:a(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const hn=new EO,TO=(t,a)=>{const r=a?.id||xd++;return hn.addToast({title:t,...a,id:r}),r},RO=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",CO=TO,OO=()=>hn.toasts,AO=()=>hn.getActiveToasts();Object.assign(CO,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:OO,getToasts:AO});hO("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Fl(t){return t.label!==void 0}const _O=3,DO="24px",NO="16px",rv=4e3,MO=356,LO=14,zO=45,jO=200;function fa(...t){return t.filter(Boolean).join(" ")}function UO(t){const[a,r]=t.split("-"),o=[];return a&&o.push(a),r&&o.push(r),o}const kO=t=>{var a,r,o,l,u,f,h,p,m;const{invert:y,toast:g,unstyled:b,interacting:w,setHeights:E,visibleToasts:R,heights:T,index:M,toasts:z,expanded:k,removeToast:V,defaultRichColors:Q,closeButton:X,style:$,cancelButtonStyle:A,actionButtonStyle:ne,className:ce="",descriptionClassName:ve="",duration:he,position:fe,gap:ae,expandByDefault:re,classNames:D,icons:q,closeButtonAriaLabel:Z="Close toast"}=t,[ie,J]=le.useState(null),[O,Y]=le.useState(null),[K,te]=le.useState(!1),[se,de]=le.useState(!1),[Re,_e]=le.useState(!1),[Ce,Pt]=le.useState(!1),[kt,_t]=le.useState(!1),[Ze,ht]=le.useState(0),[Ya,$a]=le.useState(0),en=le.useRef(g.duration||he||rv),_i=le.useRef(null),tn=le.useRef(null),Ga=M===0,Di=M+1<=R,Vt=g.type,na=g.dismissible!==!1,qt=g.className||"",qn=g.descriptionClassName||"",gn=le.useMemo(()=>T.findIndex(Ne=>Ne.toastId===g.id)||0,[T,g.id]),Ni=le.useMemo(()=>{var Ne;return(Ne=g.closeButton)!=null?Ne:X},[g.closeButton,X]),Fn=le.useMemo(()=>g.duration||he||rv,[g.duration,he]),nn=le.useRef(0),Dt=le.useRef(0),Mi=le.useRef(0),aa=le.useRef(null),[Yn,Ft]=fe.split("-"),yt=le.useMemo(()=>T.reduce((Ne,it,wt)=>wt>=gn?Ne:Ne+it.height,0),[T,gn]),Nt=SO(),sr=g.invert||y,Ka=Vt==="loading";Dt.current=le.useMemo(()=>gn*ae+yt,[gn,yt]),le.useEffect(()=>{en.current=Fn},[Fn]),le.useEffect(()=>{te(!0)},[]),le.useEffect(()=>{const Ne=tn.current;if(Ne){const it=Ne.getBoundingClientRect().height;return $a(it),E(wt=>[{toastId:g.id,height:it,position:g.position},...wt]),()=>E(wt=>wt.filter(Mt=>Mt.toastId!==g.id))}},[E,g.id]),le.useLayoutEffect(()=>{if(!K)return;const Ne=tn.current,it=Ne.style.height;Ne.style.height="auto";const wt=Ne.getBoundingClientRect().height;Ne.style.height=it,$a(wt),E(Mt=>Mt.find(et=>et.toastId===g.id)?Mt.map(et=>et.toastId===g.id?{...et,height:wt}:et):[{toastId:g.id,height:wt,position:g.position},...Mt])},[K,g.title,g.description,E,g.id,g.jsx,g.action,g.cancel]);const An=le.useCallback(()=>{de(!0),ht(Dt.current),E(Ne=>Ne.filter(it=>it.toastId!==g.id)),setTimeout(()=>{V(g)},jO)},[g,V,E,Dt]);le.useEffect(()=>{if(g.promise&&Vt==="loading"||g.duration===1/0||g.type==="loading")return;let Ne;return k||w||Nt?(()=>{if(Mi.current{g.onAutoClose==null||g.onAutoClose.call(g,g),An()},en.current)),()=>clearTimeout(Ne)},[k,w,g,Vt,Nt,An]),le.useEffect(()=>{g.delete&&(An(),g.onDismiss==null||g.onDismiss.call(g,g))},[An,g.delete]);function ba(){var Ne;if(q?.loading){var it;return le.createElement("div",{className:fa(D?.loader,g==null||(it=g.classNames)==null?void 0:it.loader,"sonner-loader"),"data-visible":Vt==="loading"},q.loading)}return le.createElement(gO,{className:fa(D?.loader,g==null||(Ne=g.classNames)==null?void 0:Ne.loader),visible:Vt==="loading"})}const $n=g.icon||q?.[Vt]||mO(Vt);var ia,on;return le.createElement("li",{tabIndex:0,ref:tn,className:fa(ce,qt,D?.toast,g==null||(a=g.classNames)==null?void 0:a.toast,D?.default,D?.[Vt],g==null||(r=g.classNames)==null?void 0:r[Vt]),"data-sonner-toast":"","data-rich-colors":(ia=g.richColors)!=null?ia:Q,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":K,"data-promise":!!g.promise,"data-swiped":kt,"data-removed":se,"data-visible":Di,"data-y-position":Yn,"data-x-position":Ft,"data-index":M,"data-front":Ga,"data-swiping":Re,"data-dismissible":na,"data-type":Vt,"data-invert":sr,"data-swipe-out":Ce,"data-swipe-direction":O,"data-expanded":!!(k||re&&K),"data-testid":g.testId,style:{"--index":M,"--toasts-before":M,"--z-index":z.length-M,"--offset":`${se?Ze:Dt.current}px`,"--initial-height":re?"auto":`${Ya}px`,...$,...g.style},onDragEnd:()=>{_e(!1),J(null),aa.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Ka||!na||(_i.current=new Date,ht(Dt.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(_e(!0),aa.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,it,wt;if(Ce||!na)return;aa.current=null;const Mt=Number(((Ne=tn.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),yn=Number(((it=tn.current)==null?void 0:it.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((wt=_i.current)==null?void 0:wt.getTime()),Yt=ie==="x"?Mt:yn,xa=Math.abs(Yt)/et;if(Math.abs(Yt)>=zO||xa>.11){ht(Dt.current),g.onDismiss==null||g.onDismiss.call(g,g),Y(ie==="x"?Mt>0?"right":"left":yn>0?"down":"up"),An(),Pt(!0);return}else{var It,C;(It=tn.current)==null||It.style.setProperty("--swipe-amount-x","0px"),(C=tn.current)==null||C.style.setProperty("--swipe-amount-y","0px")}_t(!1),_e(!1),J(null)},onPointerMove:Ne=>{var it,wt,Mt;if(!aa.current||!na||((it=window.getSelection())==null?void 0:it.toString().length)>0)return;const et=Ne.clientY-aa.current.y,Yt=Ne.clientX-aa.current.x;var xa;const It=(xa=t.swipeDirections)!=null?xa:UO(fe);!ie&&(Math.abs(Yt)>1||Math.abs(et)>1)&&J(Math.abs(Yt)>Math.abs(et)?"x":"y");let C={x:0,y:0};const j=H=>1/(1.5+Math.abs(H)/20);if(ie==="y"){if(It.includes("top")||It.includes("bottom"))if(It.includes("top")&&et<0||It.includes("bottom")&&et>0)C.y=et;else{const H=et*j(et);C.y=Math.abs(H)0)C.x=Yt;else{const H=Yt*j(Yt);C.x=Math.abs(H)0||Math.abs(C.y)>0)&&_t(!0),(wt=tn.current)==null||wt.style.setProperty("--swipe-amount-x",`${C.x}px`),(Mt=tn.current)==null||Mt.style.setProperty("--swipe-amount-y",`${C.y}px`)}},Ni&&!g.jsx&&Vt!=="loading"?le.createElement("button",{"aria-label":Z,"data-disabled":Ka,"data-close-button":!0,onClick:Ka||!na?()=>{}:()=>{An(),g.onDismiss==null||g.onDismiss.call(g,g)},className:fa(D?.closeButton,g==null||(o=g.classNames)==null?void 0:o.closeButton)},(on=q?.close)!=null?on:wO):null,(Vt||g.icon||g.promise)&&g.icon!==null&&(q?.[Vt]!==null||g.icon)?le.createElement("div",{"data-icon":"",className:fa(D?.icon,g==null||(l=g.classNames)==null?void 0:l.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||ba():null,g.type!=="loading"?$n:null):null,le.createElement("div",{"data-content":"",className:fa(D?.content,g==null||(u=g.classNames)==null?void 0:u.content)},le.createElement("div",{"data-title":"",className:fa(D?.title,g==null||(f=g.classNames)==null?void 0:f.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?le.createElement("div",{"data-description":"",className:fa(ve,qn,D?.description,g==null||(h=g.classNames)==null?void 0:h.description)},typeof g.description=="function"?g.description():g.description):null),le.isValidElement(g.cancel)?g.cancel:g.cancel&&Fl(g.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||A,onClick:Ne=>{Fl(g.cancel)&&na&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Ne),An())},className:fa(D?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,le.isValidElement(g.action)?g.action:g.action&&Fl(g.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||ne,onClick:Ne=>{Fl(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Ne),!Ne.defaultPrevented&&An())},className:fa(D?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function ov(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function HO(t,a){const r={};return[t,a].forEach((o,l)=>{const u=l===1,f=u?"--mobile-offset":"--offset",h=u?NO:DO;function p(m){["top","right","bottom","left"].forEach(y=>{r[`${f}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof o=="number"||typeof o=="string"?p(o):typeof o=="object"?["top","right","bottom","left"].forEach(m=>{o[m]===void 0?r[`${f}-${m}`]=h:r[`${f}-${m}`]=typeof o[m]=="number"?`${o[m]}px`:o[m]}):p(h)}),r}const BO=le.forwardRef(function(a,r){const{id:o,invert:l,position:u="bottom-right",hotkey:f=["altKey","KeyT"],expand:h,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:w,duration:E,style:R,visibleToasts:T=_O,toastOptions:M,dir:z=ov(),gap:k=LO,icons:V,containerAriaLabel:Q="Notifications"}=a,[X,$]=le.useState([]),A=le.useMemo(()=>o?X.filter(K=>K.toasterId===o):X.filter(K=>!K.toasterId),[X,o]),ne=le.useMemo(()=>Array.from(new Set([u].concat(A.filter(K=>K.position).map(K=>K.position)))),[A,u]),[ce,ve]=le.useState([]),[he,fe]=le.useState(!1),[ae,re]=le.useState(!1),[D,q]=le.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=le.useRef(null),ie=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),J=le.useRef(null),O=le.useRef(!1),Y=le.useCallback(K=>{$(te=>{var se;return(se=te.find(de=>de.id===K.id))!=null&&se.delete||hn.dismiss(K.id),te.filter(({id:de})=>de!==K.id)})},[]);return le.useEffect(()=>hn.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{$(te=>te.map(se=>se.id===K.id?{...se,delete:!0}:se))});return}setTimeout(()=>{B0.flushSync(()=>{$(te=>{const se=te.findIndex(de=>de.id===K.id);return se!==-1?[...te.slice(0,se),{...te[se],...K},...te.slice(se+1)]:[K,...te]})})})}),[X]),le.useEffect(()=>{if(b!=="system"){q(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:te})=>{q(te?"dark":"light")})}catch{K.addListener(({matches:se})=>{try{q(se?"dark":"light")}catch(de){console.error(de)}})}},[b]),le.useEffect(()=>{X.length<=1&&fe(!1)},[X]),le.useEffect(()=>{const K=te=>{var se;if(f.every(_e=>te[_e]||te.code===_e)){var Re;fe(!0),(Re=Z.current)==null||Re.focus()}te.code==="Escape"&&(document.activeElement===Z.current||(se=Z.current)!=null&&se.contains(document.activeElement))&&fe(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[f]),le.useEffect(()=>{if(Z.current)return()=>{J.current&&(J.current.focus({preventScroll:!0}),J.current=null,O.current=!1)}},[Z.current]),le.createElement("section",{ref:r,"aria-label":`${Q} ${ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ne.map((K,te)=>{var se;const[de,Re]=K.split("-");return A.length?le.createElement("ol",{key:K,dir:z==="auto"?ov():z,tabIndex:-1,ref:Z,className:m,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":de,"data-x-position":Re,style:{"--front-toast-height":`${((se=ce[0])==null?void 0:se.height)||0}px`,"--width":`${MO}px`,"--gap":`${k}px`,...R,...HO(y,g)},onBlur:_e=>{O.current&&!_e.currentTarget.contains(_e.relatedTarget)&&(O.current=!1,J.current&&(J.current.focus({preventScroll:!0}),J.current=null))},onFocus:_e=>{_e.target instanceof HTMLElement&&_e.target.dataset.dismissible==="false"||O.current||(O.current=!0,J.current=_e.relatedTarget)},onMouseEnter:()=>fe(!0),onMouseMove:()=>fe(!0),onMouseLeave:()=>{ae||fe(!1)},onDragEnd:()=>fe(!1),onPointerDown:_e=>{_e.target instanceof HTMLElement&&_e.target.dataset.dismissible==="false"||re(!0)},onPointerUp:()=>re(!1)},A.filter(_e=>!_e.position&&te===0||_e.position===K).map((_e,Ce)=>{var Pt,kt;return le.createElement(kO,{key:_e.id,icons:V,index:Ce,toast:_e,defaultRichColors:w,duration:(Pt=M?.duration)!=null?Pt:E,className:M?.className,descriptionClassName:M?.descriptionClassName,invert:l,visibleToasts:T,closeButton:(kt=M?.closeButton)!=null?kt:p,interacting:ae,position:K,style:M?.style,unstyled:M?.unstyled,classNames:M?.classNames,cancelButtonStyle:M?.cancelButtonStyle,actionButtonStyle:M?.actionButtonStyle,closeButtonAriaLabel:M?.closeButtonAriaLabel,removeToast:Y,toasts:A.filter(_t=>_t.position==_e.position),heights:ce.filter(_t=>_t.position==_e.position),setHeights:ve,expandByDefault:h,gap:k,expanded:he,swipeDirections:a.swipeDirections})})):null}))}),PO=({...t})=>{const{theme:a="system"}=dO();return N.jsx(BO,{theme:a,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})},VO=["top","right","bottom","left"],Ci=Math.min,Cn=Math.max,su=Math.round,Yl=Math.floor,ma=t=>({x:t,y:t}),qO={left:"right",right:"left",bottom:"top",top:"bottom"};function wd(t,a,r){return Cn(t,Ci(a,r))}function Pa(t,a){return typeof t=="function"?t(a):t}function Va(t){return t.split("-")[0]}function to(t){return t.split("-")[1]}function $d(t){return t==="x"?"y":"x"}function Gd(t){return t==="y"?"height":"width"}function ha(t){const a=t[0];return a==="t"||a==="b"?"y":"x"}function Kd(t){return $d(ha(t))}function FO(t,a,r){r===void 0&&(r=!1);const o=to(t),l=Kd(t),u=Gd(l);let f=l==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(f=lu(f)),[f,lu(f)]}function YO(t){const a=lu(t);return[Sd(t),a,Sd(a)]}function Sd(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const sv=["left","right"],lv=["right","left"],$O=["top","bottom"],GO=["bottom","top"];function KO(t,a,r){switch(t){case"top":case"bottom":return r?a?lv:sv:a?sv:lv;case"left":case"right":return a?$O:GO;default:return[]}}function XO(t,a,r,o){const l=to(t);let u=KO(Va(t),r==="start",o);return l&&(u=u.map(f=>f+"-"+l),a&&(u=u.concat(u.map(Sd)))),u}function lu(t){const a=Va(t);return qO[a]+t.slice(a.length)}function QO(t){return{top:0,right:0,bottom:0,left:0,...t}}function zb(t){return typeof t!="number"?QO(t):{top:t,right:t,bottom:t,left:t}}function uu(t){const{x:a,y:r,width:o,height:l}=t;return{width:o,height:l,top:r,left:a,right:a+o,bottom:r+l,x:a,y:r}}function uv(t,a,r){let{reference:o,floating:l}=t;const u=ha(a),f=Kd(a),h=Gd(f),p=Va(a),m=u==="y",y=o.x+o.width/2-l.width/2,g=o.y+o.height/2-l.height/2,b=o[h]/2-l[h]/2;let w;switch(p){case"top":w={x:y,y:o.y-l.height};break;case"bottom":w={x:y,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y:g};break;case"left":w={x:o.x-l.width,y:g};break;default:w={x:o.x,y:o.y}}switch(to(a)){case"start":w[f]-=b*(r&&m?-1:1);break;case"end":w[f]+=b*(r&&m?-1:1);break}return w}async function IO(t,a){var r;a===void 0&&(a={});const{x:o,y:l,platform:u,rects:f,elements:h,strategy:p}=t,{boundary:m="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:b=!1,padding:w=0}=Pa(a,t),E=zb(w),T=h[b?g==="floating"?"reference":"floating":g],M=uu(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(T)))==null||r?T:T.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:m,rootBoundary:y,strategy:p})),z=g==="floating"?{x:o,y:l,width:f.floating.width,height:f.floating.height}:f.reference,k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),V=await(u.isElement==null?void 0:u.isElement(k))?await(u.getScale==null?void 0:u.getScale(k))||{x:1,y:1}:{x:1,y:1},Q=uu(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:z,offsetParent:k,strategy:p}):z);return{top:(M.top-Q.top+E.top)/V.y,bottom:(Q.bottom-M.bottom+E.bottom)/V.y,left:(M.left-Q.left+E.left)/V.x,right:(Q.right-M.right+E.right)/V.x}}const ZO=50,JO=async(t,a,r)=>{const{placement:o="bottom",strategy:l="absolute",middleware:u=[],platform:f}=r,h=f.detectOverflow?f:{...f,detectOverflow:IO},p=await(f.isRTL==null?void 0:f.isRTL(a));let m=await f.getElementRects({reference:t,floating:a,strategy:l}),{x:y,y:g}=uv(m,o,p),b=o,w=0;const E={};for(let R=0;R({name:"arrow",options:t,async fn(a){const{x:r,y:o,placement:l,rects:u,platform:f,elements:h,middlewareData:p}=a,{element:m,padding:y=0}=Pa(t,a)||{};if(m==null)return{};const g=zb(y),b={x:r,y:o},w=Kd(l),E=Gd(w),R=await f.getDimensions(m),T=w==="y",M=T?"top":"left",z=T?"bottom":"right",k=T?"clientHeight":"clientWidth",V=u.reference[E]+u.reference[w]-b[w]-u.floating[E],Q=b[w]-u.reference[w],X=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m));let $=X?X[k]:0;(!$||!await(f.isElement==null?void 0:f.isElement(X)))&&($=h.floating[k]||u.floating[E]);const A=V/2-Q/2,ne=$/2-R[E]/2-1,ce=Ci(g[M],ne),ve=Ci(g[z],ne),he=ce,fe=$-R[E]-ve,ae=$/2-R[E]/2+A,re=wd(he,ae,fe),D=!p.arrow&&to(l)!=null&&ae!==re&&u.reference[E]/2-(aeae<=0)){var ve,he;const ae=(((ve=u.flip)==null?void 0:ve.index)||0)+1,re=$[ae];if(re&&(!(g==="alignment"?z!==ha(re):!1)||ce.every(Z=>ha(Z.placement)===z?Z.overflows[0]>0:!0)))return{data:{index:ae,overflows:ce},reset:{placement:re}};let D=(he=ce.filter(q=>q.overflows[0]<=0).sort((q,Z)=>q.overflows[1]-Z.overflows[1])[0])==null?void 0:he.placement;if(!D)switch(w){case"bestFit":{var fe;const q=(fe=ce.filter(Z=>{if(X){const ie=ha(Z.placement);return ie===z||ie==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ie=>ie>0).reduce((ie,J)=>ie+J,0)]).sort((Z,ie)=>Z[1]-ie[1])[0])==null?void 0:fe[0];q&&(D=q);break}case"initialPlacement":D=h;break}if(l!==D)return{reset:{placement:D}}}return{}}}};function cv(t,a){return{top:t.top-a.height,right:t.right-a.width,bottom:t.bottom-a.height,left:t.left-a.width}}function fv(t){return VO.some(a=>t[a]>=0)}const tA=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(a){const{rects:r,platform:o}=a,{strategy:l="referenceHidden",...u}=Pa(t,a);switch(l){case"referenceHidden":{const f=await o.detectOverflow(a,{...u,elementContext:"reference"}),h=cv(f,r.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:fv(h)}}}case"escaped":{const f=await o.detectOverflow(a,{...u,altBoundary:!0}),h=cv(f,r.floating);return{data:{escapedOffsets:h,escaped:fv(h)}}}default:return{}}}}},jb=new Set(["left","top"]);async function nA(t,a){const{placement:r,platform:o,elements:l}=t,u=await(o.isRTL==null?void 0:o.isRTL(l.floating)),f=Va(r),h=to(r),p=ha(r)==="y",m=jb.has(f)?-1:1,y=u&&p?-1:1,g=Pa(a,t);let{mainAxis:b,crossAxis:w,alignmentAxis:E}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return h&&typeof E=="number"&&(w=h==="end"?E*-1:E),p?{x:w*y,y:b*m}:{x:b*m,y:w*y}}const aA=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(a){var r,o;const{x:l,y:u,placement:f,middlewareData:h}=a,p=await nA(a,t);return f===((r=h.offset)==null?void 0:r.placement)&&(o=h.arrow)!=null&&o.alignmentOffset?{}:{x:l+p.x,y:u+p.y,data:{...p,placement:f}}}}},iA=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(a){const{x:r,y:o,placement:l,platform:u}=a,{mainAxis:f=!0,crossAxis:h=!1,limiter:p={fn:M=>{let{x:z,y:k}=M;return{x:z,y:k}}},...m}=Pa(t,a),y={x:r,y:o},g=await u.detectOverflow(a,m),b=ha(Va(l)),w=$d(b);let E=y[w],R=y[b];if(f){const M=w==="y"?"top":"left",z=w==="y"?"bottom":"right",k=E+g[M],V=E-g[z];E=wd(k,E,V)}if(h){const M=b==="y"?"top":"left",z=b==="y"?"bottom":"right",k=R+g[M],V=R-g[z];R=wd(k,R,V)}const T=p.fn({...a,[w]:E,[b]:R});return{...T,data:{x:T.x-r,y:T.y-o,enabled:{[w]:f,[b]:h}}}}}},rA=function(t){return t===void 0&&(t={}),{options:t,fn(a){const{x:r,y:o,placement:l,rects:u,middlewareData:f}=a,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=Pa(t,a),y={x:r,y:o},g=ha(l),b=$d(g);let w=y[b],E=y[g];const R=Pa(h,a),T=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(p){const k=b==="y"?"height":"width",V=u.reference[b]-u.floating[k]+T.mainAxis,Q=u.reference[b]+u.reference[k]-T.mainAxis;wQ&&(w=Q)}if(m){var M,z;const k=b==="y"?"width":"height",V=jb.has(Va(l)),Q=u.reference[g]-u.floating[k]+(V&&((M=f.offset)==null?void 0:M[g])||0)+(V?0:T.crossAxis),X=u.reference[g]+u.reference[k]+(V?0:((z=f.offset)==null?void 0:z[g])||0)-(V?T.crossAxis:0);EX&&(E=X)}return{[b]:w,[g]:E}}}},oA=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(a){var r,o;const{placement:l,rects:u,platform:f,elements:h}=a,{apply:p=()=>{},...m}=Pa(t,a),y=await f.detectOverflow(a,m),g=Va(l),b=to(l),w=ha(l)==="y",{width:E,height:R}=u.floating;let T,M;g==="top"||g==="bottom"?(T=g,M=b===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(M=g,T=b==="end"?"top":"bottom");const z=R-y.top-y.bottom,k=E-y.left-y.right,V=Ci(R-y[T],z),Q=Ci(E-y[M],k),X=!a.middlewareData.shift;let $=V,A=Q;if((r=a.middlewareData.shift)!=null&&r.enabled.x&&(A=k),(o=a.middlewareData.shift)!=null&&o.enabled.y&&($=z),X&&!b){const ce=Cn(y.left,0),ve=Cn(y.right,0),he=Cn(y.top,0),fe=Cn(y.bottom,0);w?A=E-2*(ce!==0||ve!==0?ce+ve:Cn(y.left,y.right)):$=R-2*(he!==0||fe!==0?he+fe:Cn(y.top,y.bottom))}await p({...a,availableWidth:A,availableHeight:$});const ne=await f.getDimensions(h.floating);return E!==ne.width||R!==ne.height?{reset:{rects:!0}}:{}}}};function bu(){return typeof window<"u"}function no(t){return Ub(t)?(t.nodeName||"").toLowerCase():"#document"}function On(t){var a;return(t==null||(a=t.ownerDocument)==null?void 0:a.defaultView)||window}function ga(t){var a;return(a=(Ub(t)?t.ownerDocument:t.document)||window.document)==null?void 0:a.documentElement}function Ub(t){return bu()?t instanceof Node||t instanceof On(t).Node:!1}function Jn(t){return bu()?t instanceof Element||t instanceof On(t).Element:!1}function qa(t){return bu()?t instanceof HTMLElement||t instanceof On(t).HTMLElement:!1}function dv(t){return!bu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof On(t).ShadowRoot}function gs(t){const{overflow:a,overflowX:r,overflowY:o,display:l}=Wn(t);return/auto|scroll|overlay|hidden|clip/.test(a+o+r)&&l!=="inline"&&l!=="contents"}function sA(t){return/^(table|td|th)$/.test(no(t))}function xu(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const lA=/transform|translate|scale|rotate|perspective|filter/,uA=/paint|layout|strict|content/,Wi=t=>!!t&&t!=="none";let Wf;function Xd(t){const a=Jn(t)?Wn(t):t;return Wi(a.transform)||Wi(a.translate)||Wi(a.scale)||Wi(a.rotate)||Wi(a.perspective)||!Qd()&&(Wi(a.backdropFilter)||Wi(a.filter))||lA.test(a.willChange||"")||uA.test(a.contain||"")}function cA(t){let a=Oi(t);for(;qa(a)&&!Jr(a);){if(Xd(a))return a;if(xu(a))return null;a=Oi(a)}return null}function Qd(){return Wf==null&&(Wf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Wf}function Jr(t){return/^(html|body|#document)$/.test(no(t))}function Wn(t){return On(t).getComputedStyle(t)}function wu(t){return Jn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Oi(t){if(no(t)==="html")return t;const a=t.assignedSlot||t.parentNode||dv(t)&&t.host||ga(t);return dv(a)?a.host:a}function kb(t){const a=Oi(t);return Jr(a)?t.ownerDocument?t.ownerDocument.body:t.body:qa(a)&&gs(a)?a:kb(a)}function ls(t,a,r){var o;a===void 0&&(a=[]),r===void 0&&(r=!0);const l=kb(t),u=l===((o=t.ownerDocument)==null?void 0:o.body),f=On(l);if(u){const h=Ed(f);return a.concat(f,f.visualViewport||[],gs(l)?l:[],h&&r?ls(h):[])}else return a.concat(l,ls(l,[],r))}function Ed(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hb(t){const a=Wn(t);let r=parseFloat(a.width)||0,o=parseFloat(a.height)||0;const l=qa(t),u=l?t.offsetWidth:r,f=l?t.offsetHeight:o,h=su(r)!==u||su(o)!==f;return h&&(r=u,o=f),{width:r,height:o,$:h}}function Id(t){return Jn(t)?t:t.contextElement}function Qr(t){const a=Id(t);if(!qa(a))return ma(1);const r=a.getBoundingClientRect(),{width:o,height:l,$:u}=Hb(a);let f=(u?su(r.width):r.width)/o,h=(u?su(r.height):r.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const fA=ma(0);function Bb(t){const a=On(t);return!Qd()||!a.visualViewport?fA:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function dA(t,a,r){return a===void 0&&(a=!1),!r||a&&r!==On(t)?!1:a}function ir(t,a,r,o){a===void 0&&(a=!1),r===void 0&&(r=!1);const l=t.getBoundingClientRect(),u=Id(t);let f=ma(1);a&&(o?Jn(o)&&(f=Qr(o)):f=Qr(t));const h=dA(u,r,o)?Bb(u):ma(0);let p=(l.left+h.x)/f.x,m=(l.top+h.y)/f.y,y=l.width/f.x,g=l.height/f.y;if(u){const b=On(u),w=o&&Jn(o)?On(o):o;let E=b,R=Ed(E);for(;R&&o&&w!==E;){const T=Qr(R),M=R.getBoundingClientRect(),z=Wn(R),k=M.left+(R.clientLeft+parseFloat(z.paddingLeft))*T.x,V=M.top+(R.clientTop+parseFloat(z.paddingTop))*T.y;p*=T.x,m*=T.y,y*=T.x,g*=T.y,p+=k,m+=V,E=On(R),R=Ed(E)}}return uu({width:y,height:g,x:p,y:m})}function Su(t,a){const r=wu(t).scrollLeft;return a?a.left+r:ir(ga(t)).left+r}function Pb(t,a){const r=t.getBoundingClientRect(),o=r.left+a.scrollLeft-Su(t,r),l=r.top+a.scrollTop;return{x:o,y:l}}function hA(t){let{elements:a,rect:r,offsetParent:o,strategy:l}=t;const u=l==="fixed",f=ga(o),h=a?xu(a.floating):!1;if(o===f||h&&u)return r;let p={scrollLeft:0,scrollTop:0},m=ma(1);const y=ma(0),g=qa(o);if((g||!g&&!u)&&((no(o)!=="body"||gs(f))&&(p=wu(o)),g)){const w=ir(o);m=Qr(o),y.x=w.x+o.clientLeft,y.y=w.y+o.clientTop}const b=f&&!g&&!u?Pb(f,p):ma(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-p.scrollLeft*m.x+y.x+b.x,y:r.y*m.y-p.scrollTop*m.y+y.y+b.y}}function mA(t){return Array.from(t.getClientRects())}function pA(t){const a=ga(t),r=wu(t),o=t.ownerDocument.body,l=Cn(a.scrollWidth,a.clientWidth,o.scrollWidth,o.clientWidth),u=Cn(a.scrollHeight,a.clientHeight,o.scrollHeight,o.clientHeight);let f=-r.scrollLeft+Su(t);const h=-r.scrollTop;return Wn(o).direction==="rtl"&&(f+=Cn(a.clientWidth,o.clientWidth)-l),{width:l,height:u,x:f,y:h}}const hv=25;function gA(t,a){const r=On(t),o=ga(t),l=r.visualViewport;let u=o.clientWidth,f=o.clientHeight,h=0,p=0;if(l){u=l.width,f=l.height;const y=Qd();(!y||y&&a==="fixed")&&(h=l.offsetLeft,p=l.offsetTop)}const m=Su(o);if(m<=0){const y=o.ownerDocument,g=y.body,b=getComputedStyle(g),w=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(o.clientWidth-g.clientWidth-w);E<=hv&&(u-=E)}else m<=hv&&(u+=m);return{width:u,height:f,x:h,y:p}}function yA(t,a){const r=ir(t,!0,a==="fixed"),o=r.top+t.clientTop,l=r.left+t.clientLeft,u=qa(t)?Qr(t):ma(1),f=t.clientWidth*u.x,h=t.clientHeight*u.y,p=l*u.x,m=o*u.y;return{width:f,height:h,x:p,y:m}}function mv(t,a,r){let o;if(a==="viewport")o=gA(t,r);else if(a==="document")o=pA(ga(t));else if(Jn(a))o=yA(a,r);else{const l=Bb(t);o={x:a.x-l.x,y:a.y-l.y,width:a.width,height:a.height}}return uu(o)}function Vb(t,a){const r=Oi(t);return r===a||!Jn(r)||Jr(r)?!1:Wn(r).position==="fixed"||Vb(r,a)}function vA(t,a){const r=a.get(t);if(r)return r;let o=ls(t,[],!1).filter(h=>Jn(h)&&no(h)!=="body"),l=null;const u=Wn(t).position==="fixed";let f=u?Oi(t):t;for(;Jn(f)&&!Jr(f);){const h=Wn(f),p=Xd(f);!p&&h.position==="fixed"&&(l=null),(u?!p&&!l:!p&&h.position==="static"&&!!l&&(l.position==="absolute"||l.position==="fixed")||gs(f)&&!p&&Vb(t,f))?o=o.filter(y=>y!==f):l=h,f=Oi(f)}return a.set(t,o),o}function bA(t){let{element:a,boundary:r,rootBoundary:o,strategy:l}=t;const f=[...r==="clippingAncestors"?xu(a)?[]:vA(a,this._c):[].concat(r),o],h=mv(a,f[0],l);let p=h.top,m=h.right,y=h.bottom,g=h.left;for(let b=1;b{f(!1,1e-7)},1e3)}$===1&&!Fb(m,t.getBoundingClientRect())&&f(),V=!1}try{r=new IntersectionObserver(Q,{...k,root:l.ownerDocument})}catch{r=new IntersectionObserver(Q,k)}r.observe(t)}return f(!0),u}function CA(t,a,r,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,m=Id(t),y=l||u?[...m?ls(m):[],...a?ls(a):[]]:[];y.forEach(M=>{l&&M.addEventListener("scroll",r,{passive:!0}),u&&M.addEventListener("resize",r)});const g=m&&h?RA(m,r):null;let b=-1,w=null;f&&(w=new ResizeObserver(M=>{let[z]=M;z&&z.target===m&&w&&a&&(w.unobserve(a),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=w)==null||k.observe(a)})),r()}),m&&!p&&w.observe(m),a&&w.observe(a));let E,R=p?ir(t):null;p&&T();function T(){const M=ir(t);R&&!Fb(R,M)&&r(),R=M,E=requestAnimationFrame(T)}return r(),()=>{var M;y.forEach(z=>{l&&z.removeEventListener("scroll",r),u&&z.removeEventListener("resize",r)}),g?.(),(M=w)==null||M.disconnect(),w=null,p&&cancelAnimationFrame(E)}}const OA=aA,AA=iA,_A=eA,DA=oA,NA=tA,gv=WO,MA=rA,LA=(t,a,r)=>{const o=new Map,l={platform:TA,...r},u={...l.platform,_c:o};return JO(t,a,{...l,platform:u})};var zA=typeof document<"u",jA=function(){},Zl=zA?S.useLayoutEffect:jA;function cu(t,a){if(t===a)return!0;if(typeof t!=typeof a)return!1;if(typeof t=="function"&&t.toString()===a.toString())return!0;let r,o,l;if(t&&a&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==a.length)return!1;for(o=r;o--!==0;)if(!cu(t[o],a[o]))return!1;return!0}if(l=Object.keys(t),r=l.length,r!==Object.keys(a).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(a,l[o]))return!1;for(o=r;o--!==0;){const u=l[o];if(!(u==="_owner"&&t.$$typeof)&&!cu(t[u],a[u]))return!1}return!0}return t!==t&&a!==a}function Yb(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yv(t,a){const r=Yb(t);return Math.round(a*r)/r}function td(t){const a=S.useRef(t);return Zl(()=>{a.current=t}),a}function UA(t){t===void 0&&(t={});const{placement:a="bottom",strategy:r="absolute",middleware:o=[],platform:l,elements:{reference:u,floating:f}={},transform:h=!0,whileElementsMounted:p,open:m}=t,[y,g]=S.useState({x:0,y:0,strategy:r,placement:a,middlewareData:{},isPositioned:!1}),[b,w]=S.useState(o);cu(b,o)||w(o);const[E,R]=S.useState(null),[T,M]=S.useState(null),z=S.useCallback(Z=>{Z!==X.current&&(X.current=Z,R(Z))},[]),k=S.useCallback(Z=>{Z!==$.current&&($.current=Z,M(Z))},[]),V=u||E,Q=f||T,X=S.useRef(null),$=S.useRef(null),A=S.useRef(y),ne=p!=null,ce=td(p),ve=td(l),he=td(m),fe=S.useCallback(()=>{if(!X.current||!$.current)return;const Z={placement:a,strategy:r,middleware:b};ve.current&&(Z.platform=ve.current),LA(X.current,$.current,Z).then(ie=>{const J={...ie,isPositioned:he.current!==!1};ae.current&&!cu(A.current,J)&&(A.current=J,ms.flushSync(()=>{g(J)}))})},[b,a,r,ve,he]);Zl(()=>{m===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,g(Z=>({...Z,isPositioned:!1})))},[m]);const ae=S.useRef(!1);Zl(()=>(ae.current=!0,()=>{ae.current=!1}),[]),Zl(()=>{if(V&&(X.current=V),Q&&($.current=Q),V&&Q){if(ce.current)return ce.current(V,Q,fe);fe()}},[V,Q,fe,ce,ne]);const re=S.useMemo(()=>({reference:X,floating:$,setReference:z,setFloating:k}),[z,k]),D=S.useMemo(()=>({reference:V,floating:Q}),[V,Q]),q=S.useMemo(()=>{const Z={position:r,left:0,top:0};if(!D.floating)return Z;const ie=yv(D.floating,y.x),J=yv(D.floating,y.y);return h?{...Z,transform:"translate("+ie+"px, "+J+"px)",...Yb(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ie,top:J}},[r,h,D.floating,y.x,y.y]);return S.useMemo(()=>({...y,update:fe,refs:re,elements:D,floatingStyles:q}),[y,fe,re,D,q])}const kA=t=>{function a(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:o,padding:l}=typeof t=="function"?t(r):t;return o&&a(o)?o.current!=null?gv({element:o.current,padding:l}).fn(r):{}:o?gv({element:o,padding:l}).fn(r):{}}}},HA=(t,a)=>{const r=OA(t);return{name:r.name,fn:r.fn,options:[t,a]}},BA=(t,a)=>{const r=AA(t);return{name:r.name,fn:r.fn,options:[t,a]}},PA=(t,a)=>({fn:MA(t).fn,options:[t,a]}),VA=(t,a)=>{const r=_A(t);return{name:r.name,fn:r.fn,options:[t,a]}},qA=(t,a)=>{const r=DA(t);return{name:r.name,fn:r.fn,options:[t,a]}},FA=(t,a)=>{const r=NA(t);return{name:r.name,fn:r.fn,options:[t,a]}},YA=(t,a)=>{const r=kA(t);return{name:r.name,fn:r.fn,options:[t,a]}};var $A="Arrow",$b=S.forwardRef((t,a)=>{const{children:r,width:o=10,height:l=5,...u}=t;return N.jsx(pn.svg,{...u,ref:a,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:N.jsx("polygon",{points:"0,0 30,0 15,10"})})});$b.displayName=$A;var GA=$b;function KA(t){const[a,r]=S.useState(void 0);return Ri(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let f,h;if("borderBoxSize"in u){const p=u.borderBoxSize,m=Array.isArray(p)?p[0]:p;f=m.inlineSize,h=m.blockSize}else f=t.offsetWidth,h=t.offsetHeight;r({width:f,height:h})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else r(void 0)},[t]),a}var Gb="Popper",[Kb,Xb]=gu(Gb),[FN,Qb]=Kb(Gb),Ib="PopperAnchor",Zb=S.forwardRef((t,a)=>{const{__scopePopper:r,virtualRef:o,...l}=t,u=Qb(Ib,r),f=S.useRef(null),h=Zn(a,f),p=S.useRef(null);return S.useEffect(()=>{const m=p.current;p.current=o?.current||f.current,m!==p.current&&u.onAnchorChange(p.current)}),o?null:N.jsx(pn.div,{...l,ref:h})});Zb.displayName=Ib;var Zd="PopperContent",[XA,QA]=Kb(Zd),Jb=S.forwardRef((t,a)=>{const{__scopePopper:r,side:o="bottom",sideOffset:l=0,align:u="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:E,...R}=t,T=Qb(Zd,r),[M,z]=S.useState(null),k=Zn(a,Re=>z(Re)),[V,Q]=S.useState(null),X=KA(V),$=X?.width??0,A=X?.height??0,ne=o+(u!=="center"?"-"+u:""),ce=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ve=Array.isArray(m)?m:[m],he=ve.length>0,fe={padding:ce,boundary:ve.filter(ZA),altBoundary:he},{refs:ae,floatingStyles:re,placement:D,isPositioned:q,middlewareData:Z}=UA({strategy:"fixed",placement:ne,whileElementsMounted:(...Re)=>CA(...Re,{animationFrame:w==="always"}),elements:{reference:T.anchor},middleware:[HA({mainAxis:l+A,alignmentAxis:f}),p&&BA({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?PA():void 0,...fe}),p&&VA({...fe}),qA({...fe,apply:({elements:Re,rects:_e,availableWidth:Ce,availableHeight:Pt})=>{const{width:kt,height:_t}=_e.reference,Ze=Re.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ce}px`),Ze.setProperty("--radix-popper-available-height",`${Pt}px`),Ze.setProperty("--radix-popper-anchor-width",`${kt}px`),Ze.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),V&&YA({element:V,padding:h}),JA({arrowWidth:$,arrowHeight:A}),b&&FA({strategy:"referenceHidden",...fe})]}),[ie,J]=tx(D),O=Ti(E);Ri(()=>{q&&O?.()},[q,O]);const Y=Z.arrow?.x,K=Z.arrow?.y,te=Z.arrow?.centerOffset!==0,[se,de]=S.useState();return Ri(()=>{M&&de(window.getComputedStyle(M).zIndex)},[M]),N.jsx("div",{ref:ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:q?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[Z.transformOrigin?.x,Z.transformOrigin?.y].join(" "),...Z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:N.jsx(XA,{scope:r,placedSide:ie,onArrowChange:Q,arrowX:Y,arrowY:K,shouldHideArrow:te,children:N.jsx(pn.div,{"data-side":ie,"data-align":J,...R,ref:k,style:{...R.style,animation:q?void 0:"none"}})})})});Jb.displayName=Zd;var Wb="PopperArrow",IA={top:"bottom",right:"left",bottom:"top",left:"right"},ex=S.forwardRef(function(a,r){const{__scopePopper:o,...l}=a,u=QA(Wb,o),f=IA[u.placedSide];return N.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:N.jsx(GA,{...l,ref:r,style:{...l.style,display:"block"}})})});ex.displayName=Wb;function ZA(t){return t!==null}var JA=t=>({name:"transformOrigin",options:t,fn(a){const{placement:r,rects:o,middlewareData:l}=a,f=l.arrow?.centerOffset!==0,h=f?0:t.arrowWidth,p=f?0:t.arrowHeight,[m,y]=tx(r),g={start:"0%",center:"50%",end:"100%"}[y],b=(l.arrow?.x??0)+h/2,w=(l.arrow?.y??0)+p/2;let E="",R="";return m==="bottom"?(E=f?g:`${b}px`,R=`${-p}px`):m==="top"?(E=f?g:`${b}px`,R=`${o.floating.height+p}px`):m==="right"?(E=`${-p}px`,R=f?g:`${w}px`):m==="left"&&(E=`${o.floating.width+p}px`,R=f?g:`${w}px`),{data:{x:E,y:R}}}});function tx(t){const[a,r="center"]=t.split("-");return[a,r]}var WA=Zb,e2=Jb,t2=ex,[Eu]=gu("Tooltip",[Xb]),Jd=Xb(),nx="TooltipProvider",n2=700,vv="tooltip.open",[a2,ax]=Eu(nx),ix=t=>{const{__scopeTooltip:a,delayDuration:r=n2,skipDelayDuration:o=300,disableHoverableContent:l=!1,children:u}=t,f=S.useRef(!0),h=S.useRef(!1),p=S.useRef(0);return S.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),N.jsx(a2,{scope:a,isOpenDelayedRef:f,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(p.current),f.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>f.current=!0,o)},[o]),isPointerInTransitRef:h,onPointerInTransitChange:S.useCallback(m=>{h.current=m},[]),disableHoverableContent:l,children:u})};ix.displayName=nx;var rx="Tooltip",[YN,Tu]=Eu(rx),Td="TooltipTrigger",i2=S.forwardRef((t,a)=>{const{__scopeTooltip:r,...o}=t,l=Tu(Td,r),u=ax(Td,r),f=Jd(r),h=S.useRef(null),p=Zn(a,h,l.onTriggerChange),m=S.useRef(!1),y=S.useRef(!1),g=S.useCallback(()=>m.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),N.jsx(WA,{asChild:!0,...f,children:N.jsx(pn.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:p,onPointerMove:jt(t.onPointerMove,b=>{b.pointerType!=="touch"&&!y.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),y.current=!0)}),onPointerLeave:jt(t.onPointerLeave,()=>{l.onTriggerLeave(),y.current=!1}),onPointerDown:jt(t.onPointerDown,()=>{l.open&&l.onClose(),m.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:jt(t.onFocus,()=>{m.current||l.onOpen()}),onBlur:jt(t.onBlur,l.onClose),onClick:jt(t.onClick,l.onClose)})})});i2.displayName=Td;var r2="TooltipPortal",[$N,o2]=Eu(r2,{forceMount:void 0}),Wr="TooltipContent",ox=S.forwardRef((t,a)=>{const r=o2(Wr,t.__scopeTooltip),{forceMount:o=r.forceMount,side:l="top",...u}=t,f=Tu(Wr,t.__scopeTooltip);return N.jsx(kd,{present:o||f.open,children:f.disableHoverableContent?N.jsx(sx,{side:l,...u,ref:a}):N.jsx(s2,{side:l,...u,ref:a})})}),s2=S.forwardRef((t,a)=>{const r=Tu(Wr,t.__scopeTooltip),o=ax(Wr,t.__scopeTooltip),l=S.useRef(null),u=Zn(a,l),[f,h]=S.useState(null),{trigger:p,onClose:m}=r,y=l.current,{onPointerInTransitChange:g}=o,b=S.useCallback(()=>{h(null),g(!1)},[g]),w=S.useCallback((E,R)=>{const T=E.currentTarget,M={x:E.clientX,y:E.clientY},z=d2(M,T.getBoundingClientRect()),k=h2(M,z),V=m2(R.getBoundingClientRect()),Q=g2([...k,...V]);h(Q),g(!0)},[g]);return S.useEffect(()=>()=>b(),[b]),S.useEffect(()=>{if(p&&y){const E=T=>w(T,y),R=T=>w(T,p);return p.addEventListener("pointerleave",E),y.addEventListener("pointerleave",R),()=>{p.removeEventListener("pointerleave",E),y.removeEventListener("pointerleave",R)}}},[p,y,w,b]),S.useEffect(()=>{if(f){const E=R=>{const T=R.target,M={x:R.clientX,y:R.clientY},z=p?.contains(T)||y?.contains(T),k=!p2(M,f);z?b():k&&(b(),m())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[p,y,f,m,b]),N.jsx(sx,{...t,ref:u})}),[l2,u2]=Eu(rx,{isInside:!1}),c2=tR("TooltipContent"),sx=S.forwardRef((t,a)=>{const{__scopeTooltip:r,children:o,"aria-label":l,onEscapeKeyDown:u,onPointerDownOutside:f,...h}=t,p=Tu(Wr,r),m=Jd(r),{onClose:y}=p;return S.useEffect(()=>(document.addEventListener(vv,y),()=>document.removeEventListener(vv,y)),[y]),S.useEffect(()=>{if(p.trigger){const g=b=>{b.target?.contains(p.trigger)&&y()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[p.trigger,y]),N.jsx(Ud,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:g=>g.preventDefault(),onDismiss:y,children:N.jsxs(e2,{"data-state":p.stateAttribute,...m,...h,ref:a,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[N.jsx(c2,{children:o}),N.jsx(l2,{scope:r,isInside:!0,children:N.jsx(CR,{id:p.contentId,role:"tooltip",children:l||o})})]})})});ox.displayName=Wr;var lx="TooltipArrow",f2=S.forwardRef((t,a)=>{const{__scopeTooltip:r,...o}=t,l=Jd(r);return u2(lx,r).isInside?null:N.jsx(t2,{...l,...o,ref:a})});f2.displayName=lx;function d2(t,a){const r=Math.abs(a.top-t.y),o=Math.abs(a.bottom-t.y),l=Math.abs(a.right-t.x),u=Math.abs(a.left-t.x);switch(Math.min(r,o,l,u)){case u:return"left";case l:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function h2(t,a,r=5){const o=[];switch(a){case"top":o.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":o.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":o.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":o.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return o}function m2(t){const{top:a,right:r,bottom:o,left:l}=t;return[{x:l,y:a},{x:r,y:a},{x:r,y:o},{x:l,y:o}]}function p2(t,a){const{x:r,y:o}=t;let l=!1;for(let u=0,f=a.length-1;uo!=b>o&&r<(g-m)*(o-y)/(b-y)+m&&(l=!l)}return l}function g2(t){const a=t.slice();return a.sort((r,o)=>r.xo.x?1:r.yo.y?1:0),y2(a)}function y2(t){if(t.length<=1)return t.slice();const a=[];for(let o=0;o=2;){const u=a[a.length-1],f=a[a.length-2];if((u.x-f.x)*(l.y-f.y)>=(u.y-f.y)*(l.x-f.x))a.pop();else break}a.push(l)}a.pop();const r=[];for(let o=t.length-1;o>=0;o--){const l=t[o];for(;r.length>=2;){const u=r[r.length-1],f=r[r.length-2];if((u.x-f.x)*(l.y-f.y)>=(u.y-f.y)*(l.x-f.x))r.pop();else break}r.push(l)}return r.pop(),a.length===1&&r.length===1&&a[0].x===r[0].x&&a[0].y===r[0].y?a:a.concat(r)}var v2=ix,ux=ox;const b2=v2,x2=S.forwardRef(({className:t,sideOffset:a=4,...r},o)=>N.jsx(ux,{ref:o,sideOffset:a,className:ta("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));x2.displayName=ux.displayName;var Ru=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},w2=class extends Ru{#e;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(a=>{a(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},cx=new w2,S2={setTimeout:(t,a)=>setTimeout(t,a),clearTimeout:t=>clearTimeout(t),setInterval:(t,a)=>setInterval(t,a),clearInterval:t=>clearInterval(t)},E2=class{#e=S2;#n=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,a){return this.#e.setTimeout(t,a)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,a){return this.#e.setInterval(t,a)}clearInterval(t){this.#e.clearInterval(t)}},Rd=new E2;function T2(t){setTimeout(t,0)}var R2=typeof window>"u"||"Deno"in globalThis;function In(){}function C2(t,a){return typeof t=="function"?t(a):t}function O2(t){return typeof t=="number"&&t>=0&&t!==1/0}function A2(t,a){return Math.max(t+(a||0)-Date.now(),0)}function Cd(t,a){return typeof t=="function"?t(a):t}function _2(t,a){return typeof t=="function"?t(a):t}function bv(t,a){const{type:r="all",exact:o,fetchStatus:l,predicate:u,queryKey:f,stale:h}=t;if(f){if(o){if(a.queryHash!==Wd(f,a.options))return!1}else if(!cs(a.queryKey,f))return!1}if(r!=="all"){const p=a.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof h=="boolean"&&a.isStale()!==h||l&&l!==a.state.fetchStatus||u&&!u(a))}function xv(t,a){const{exact:r,status:o,predicate:l,mutationKey:u}=t;if(u){if(!a.options.mutationKey)return!1;if(r){if(us(a.options.mutationKey)!==us(u))return!1}else if(!cs(a.options.mutationKey,u))return!1}return!(o&&a.state.status!==o||l&&!l(a))}function Wd(t,a){return(a?.queryKeyHashFn||us)(t)}function us(t){return JSON.stringify(t,(a,r)=>Od(r)?Object.keys(r).sort().reduce((o,l)=>(o[l]=r[l],o),{}):r)}function cs(t,a){return t===a?!0:typeof t!=typeof a?!1:t&&a&&typeof t=="object"&&typeof a=="object"?Object.keys(a).every(r=>cs(t[r],a[r])):!1}var D2=Object.prototype.hasOwnProperty;function fx(t,a,r=0){if(t===a)return t;if(r>500)return a;const o=wv(t)&&wv(a);if(!o&&!(Od(t)&&Od(a)))return a;const u=(o?t:Object.keys(t)).length,f=o?a:Object.keys(a),h=f.length,p=o?new Array(h):{};let m=0;for(let y=0;y{Rd.setTimeout(a,t)})}function M2(t,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,a):r.structuralSharing!==!1?fx(t,a):a}function L2(t,a,r=0){const o=[...t,a];return r&&o.length>r?o.slice(1):o}function z2(t,a,r=0){const o=[a,...t];return r&&o.length>r?o.slice(0,-1):o}var eh=Symbol();function dx(t,a){return!t.queryFn&&a?.initialPromise?()=>a.initialPromise:!t.queryFn||t.queryFn===eh?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function j2(t,a,r){let o=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??=a(),o||(o=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),t}var hx=(()=>{let t=()=>R2;return{isServer(){return t()},setIsServer(a){t=a}}})();function U2(){let t,a;const r=new Promise((l,u)=>{t=l,a=u});r.status="pending",r.catch(()=>{});function o(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{o({status:"fulfilled",value:l}),t(l)},r.reject=l=>{o({status:"rejected",reason:l}),a(l)},r}var k2=T2;function H2(){let t=[],a=0,r=h=>{h()},o=h=>{h()},l=k2;const u=h=>{a?t.push(h):l(()=>{r(h)})},f=()=>{const h=t;t=[],h.length&&l(()=>{o(()=>{h.forEach(p=>{r(p)})})})};return{batch:h=>{let p;a++;try{p=h()}finally{a--,a||f()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{l=h}}}var rn=H2(),B2=class extends Ru{#e=!0;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#e}},fu=new B2;function P2(t){return Math.min(1e3*2**t,3e4)}function mx(t){return(t??"online")==="online"?fu.isOnline():!0}var Ad=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function px(t){let a=!1,r=0,o;const l=U2(),u=()=>l.status!=="pending",f=R=>{if(!u()){const T=new Ad(R);b(T),t.onCancel?.(T)}},h=()=>{a=!0},p=()=>{a=!1},m=()=>cx.isFocused()&&(t.networkMode==="always"||fu.isOnline())&&t.canRun(),y=()=>mx(t.networkMode)&&t.canRun(),g=R=>{u()||(o?.(),l.resolve(R))},b=R=>{u()||(o?.(),l.reject(R))},w=()=>new Promise(R=>{o=T=>{(u()||m())&&R(T)},t.onPause?.()}).then(()=>{o=void 0,u()||t.onContinue?.()}),E=()=>{if(u())return;let R;const T=r===0?t.initialPromise:void 0;try{R=T??t.fn()}catch(M){R=Promise.reject(M)}Promise.resolve(R).then(g).catch(M=>{if(u())return;const z=t.retry??(hx.isServer()?0:3),k=t.retryDelay??P2,V=typeof k=="function"?k(r,M):k,Q=z===!0||typeof z=="number"&&rm()?void 0:w()).then(()=>{a?b(M):E()})})};return{promise:l,status:()=>l.status,cancel:f,continue:()=>(o?.(),l),cancelRetry:h,continueRetry:p,canStart:y,start:()=>(y()?E():w().then(E),l)}}var gx=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),O2(this.gcTime)&&(this.#e=Rd.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(hx.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Rd.clearTimeout(this.#e),this.#e=void 0)}},V2=class extends gx{#e;#n;#t;#i;#a;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#t=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=Tv(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(t){if(this.options={...this.#r,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Tv(this.options);a.data!==void 0&&(this.setState(Ev(a.data,a.dataUpdatedAt)),this.#e=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(t,a){const r=M2(this.state.data,t,this.options);return this.#s({data:r,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),r}setState(t,a){this.#s({type:"setState",state:t,setStateOptions:a})}cancel(t){const a=this.#a?.promise;return this.#a?.cancel(t),a?a.then(In).catch(In):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>_2(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Cd(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!A2(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(a=>a.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(a=>a.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(a=>a!==t),this.observers.length||(this.#a&&(this.#o||this.#l()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,a){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,o=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#o=!0,r.signal)})},l=()=>{const h=dx(this.options,a),m=(()=>{const y={client:this.#i,queryKey:this.queryKey,meta:this.meta};return o(y),y})();return this.#o=!1,this.options.persister?this.options.persister(h,m,this):h(m)},f=(()=>{const h={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return o(h),h})();this.options.behavior?.onFetch(f,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.meta)&&this.#s({type:"fetch",meta:f.fetchOptions?.meta}),this.#a=px({initialPromise:a?.initialPromise,fn:f.fetchFn,onCancel:h=>{h instanceof Ad&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(h,p)=>{this.#s({type:"failed",failureCount:h,error:p})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0});try{const h=await this.#a.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#t.config.onSuccess?.(h,this),this.#t.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Ad){if(h.silent)return this.#a.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#s({type:"error",error:h}),this.#t.config.onError?.(h,this),this.#t.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#s(t){const a=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...q2(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...Ev(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?o:void 0,o;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=a(this.state),rn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:t})})}};function q2(t,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mx(a.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Ev(t,a){return{data:t,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tv(t){const a=typeof t.initialData=="function"?t.initialData():t.initialData,r=a!==void 0,o=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function Rv(t){return{onFetch:(a,r)=>{const o=a.options,l=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],f=a.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let y=!1;const g=E=>{j2(E,()=>a.signal,()=>y=!0)},b=dx(a.options,a.fetchOptions),w=async(E,R,T)=>{if(y)return Promise.reject();if(R==null&&E.pages.length)return Promise.resolve(E);const z=(()=>{const X={client:a.client,queryKey:a.queryKey,pageParam:R,direction:T?"backward":"forward",meta:a.options.meta};return g(X),X})(),k=await b(z),{maxPages:V}=a.options,Q=T?z2:L2;return{pages:Q(E.pages,k,V),pageParams:Q(E.pageParams,R,V)}};if(l&&u.length){const E=l==="backward",R=E?F2:Cv,T={pages:u,pageParams:f},M=R(o,T);h=await w(T,M,E)}else{const E=t??u.length;do{const R=p===0?f[0]??o.initialPageParam:Cv(o,h);if(p>0&&R==null)break;h=await w(h,R),p++}while(pa.options.persister?.(m,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r):a.fetchFn=m}}}function Cv(t,{pages:a,pageParams:r}){const o=a.length-1;return a.length>0?t.getNextPageParam(a[o],a,r[o],r):void 0}function F2(t,{pages:a,pageParams:r}){return a.length>0?t.getPreviousPageParam?.(a[0],a,r[0],r):void 0}var Y2=class extends gx{#e;#n;#t;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#n=[],this.state=t.state||$2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#n.includes(t)||(this.#n.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#n=this.#n.filter(a=>a!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const a=()=>{this.#a({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=px({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(u,f)=>{this.#a({type:"failed",failureCount:u,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const o=this.state.status==="pending",l=!this.#i.canStart();try{if(o)a();else{this.#a({type:"pending",variables:t,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(t,this,r);const f=await this.options.onMutate?.(t,r);f!==this.state.context&&this.#a({type:"pending",context:f,variables:t,isPaused:l})}const u=await this.#i.start();return await this.#t.config.onSuccess?.(u,t,this.state.context,this,r),await this.options.onSuccess?.(u,t,this.state.context,r),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,t,this.state.context,r),this.#a({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,t,this.state.context,this,r)}catch(f){Promise.reject(f)}try{await this.options.onError?.(u,t,this.state.context,r)}catch(f){Promise.reject(f)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r)}catch(f){Promise.reject(f)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,r)}catch(f){Promise.reject(f)}throw this.#a({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#a(t){const a=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=a(this.state),rn.batch(()=>{this.#n.forEach(r=>{r.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function $2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var G2=class extends Ru{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(t,a,r){const o=new Y2({client:t,mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(a),state:r});return this.add(o),o}add(t){this.#e.add(t);const a=$l(t);if(typeof a=="string"){const r=this.#n.get(a);r?r.push(t):this.#n.set(a,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const a=$l(t);if(typeof a=="string"){const r=this.#n.get(a);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&this.#n.delete(a)}}this.notify({type:"removed",mutation:t})}canRun(t){const a=$l(t);if(typeof a=="string"){const o=this.#n.get(a)?.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){const a=$l(t);return typeof a=="string"?this.#n.get(a)?.find(o=>o!==t&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){rn.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(t){const a={exact:!0,...t};return this.getAll().find(r=>xv(a,r))}findAll(t={}){return this.getAll().filter(a=>xv(t,a))}notify(t){rn.batch(()=>{this.listeners.forEach(a=>{a(t)})})}resumePausedMutations(){const t=this.getAll().filter(a=>a.state.isPaused);return rn.batch(()=>Promise.all(t.map(a=>a.continue().catch(In))))}};function $l(t){return t.options.scope?.id}var K2=class extends Ru{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,a,r){const o=a.queryKey,l=a.queryHash??Wd(o,a);let u=this.get(l);return u||(u=new V2({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(a),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(u)),u}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const a=this.#e.get(t.queryHash);a&&(t.destroy(),a===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){rn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const a={exact:!0,...t};return this.getAll().find(r=>bv(a,r))}findAll(t={}){const a=this.getAll();return Object.keys(t).length>0?a.filter(r=>bv(t,r)):a}notify(t){rn.batch(()=>{this.listeners.forEach(a=>{a(t)})})}onFocus(){rn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){rn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},X2=class{#e;#n;#t;#i;#a;#r;#o;#l;constructor(t={}){this.#e=t.queryCache||new K2,this.#n=t.mutationCache||new G2,this.#t=t.defaultOptions||{},this.#i=new Map,this.#a=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#o=cx.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=fu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#o?.(),this.#o=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#n.findAll({...t,status:"pending"}).length}getQueryData(t){const a=this.defaultQueryOptions({queryKey:t});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(t){const a=this.defaultQueryOptions(t),r=this.#e.build(this,a),o=r.state.data;return o===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Cd(a.staleTime,r))&&this.prefetchQuery(a),Promise.resolve(o))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:a,state:r})=>{const o=r.data;return[a,o]})}setQueryData(t,a,r){const o=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(o.queryHash)?.state.data,f=C2(a,u);if(f!==void 0)return this.#e.build(this,o).setData(f,{...r,manual:!0})}setQueriesData(t,a,r){return rn.batch(()=>this.#e.findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,a,r)]))}getQueryState(t){const a=this.defaultQueryOptions({queryKey:t});return this.#e.get(a.queryHash)?.state}removeQueries(t){const a=this.#e;rn.batch(()=>{a.findAll(t).forEach(r=>{a.remove(r)})})}resetQueries(t,a){const r=this.#e;return rn.batch(()=>(r.findAll(t).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...t},a)))}cancelQueries(t,a={}){const r={revert:!0,...a},o=rn.batch(()=>this.#e.findAll(t).map(l=>l.cancel(r)));return Promise.all(o).then(In).catch(In)}invalidateQueries(t,a={}){return rn.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},a)))}refetchQueries(t,a={}){const r={...a,cancelRefetch:a.cancelRefetch??!0},o=rn.batch(()=>this.#e.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,r);return r.throwOnError||(u=u.catch(In)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(In)}fetchQuery(t){const a=this.defaultQueryOptions(t);a.retry===void 0&&(a.retry=!1);const r=this.#e.build(this,a);return r.isStaleByTime(Cd(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(In).catch(In)}fetchInfiniteQuery(t){return t.behavior=Rv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(In).catch(In)}ensureInfiniteQueryData(t){return t.behavior=Rv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return fu.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(t){this.#t=t}setQueryDefaults(t,a){this.#i.set(us(t),{queryKey:t,defaultOptions:a})}getQueryDefaults(t){const a=[...this.#i.values()],r={};return a.forEach(o=>{cs(t,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(t,a){this.#a.set(us(t),{mutationKey:t,defaultOptions:a})}getMutationDefaults(t){const a=[...this.#a.values()],r={};return a.forEach(o=>{cs(t,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const a={...this.#t.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return a.queryHash||(a.queryHash=Wd(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===eh&&(a.enabled=!1),a}defaultMutationOptions(t){return t?._defaulted?t:{...this.#t.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},Q2=S.createContext(void 0),I2=({client:t,children:a})=>(S.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),N.jsx(Q2.Provider,{value:t,children:a}));var yx=t=>{throw TypeError(t)},Z2=(t,a,r)=>a.has(t)||yx("Cannot "+r),nd=(t,a,r)=>(Z2(t,a,"read from private field"),r?r.call(t):a.get(t)),J2=(t,a,r)=>a.has(t)?yx("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,r),Ov="popstate";function Av(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function W2(t={}){function a(o,l){let u=l.state?.masked,{pathname:f,search:h,hash:p}=u||o.location;return fs("",{pathname:f,search:h,hash:p},l.state&&l.state.usr||null,l.state&&l.state.key||"default",u?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function r(o,l){return typeof l=="string"?l:pa(l)}return t_(a,r,null,t)}function Pe(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function At(t,a){if(!t){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function e_(){return Math.random().toString(36).substring(2,10)}function _v(t,a){return{usr:t.state,key:t.key,idx:a,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function fs(t,a,r=null,o,l){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof a=="string"?ya(a):a,state:r,key:a&&a.key||o||e_(),unstable_mask:l}}function pa({pathname:t="/",search:a="",hash:r=""}){return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ya(t){let a={};if(t){let r=t.indexOf("#");r>=0&&(a.hash=t.substring(r),t=t.substring(0,r));let o=t.indexOf("?");o>=0&&(a.search=t.substring(o),t=t.substring(0,o)),t&&(a.pathname=t)}return a}function t_(t,a,r,o={}){let{window:l=document.defaultView,v5Compat:u=!1}=o,f=l.history,h="POP",p=null,m=y();m==null&&(m=0,f.replaceState({...f.state,idx:m},""));function y(){return(f.state||{idx:null}).idx}function g(){h="POP";let T=y(),M=T==null?null:T-m;m=T,p&&p({action:h,location:R.location,delta:M})}function b(T,M){h="PUSH";let z=Av(T)?T:fs(R.location,T,M);m=y()+1;let k=_v(z,m),V=R.createHref(z.unstable_mask||z);try{f.pushState(k,"",V)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;l.location.assign(V)}u&&p&&p({action:h,location:R.location,delta:1})}function w(T,M){h="REPLACE";let z=Av(T)?T:fs(R.location,T,M);m=y();let k=_v(z,m),V=R.createHref(z.unstable_mask||z);f.replaceState(k,"",V),u&&p&&p({action:h,location:R.location,delta:0})}function E(T){return vx(T)}let R={get action(){return h},get location(){return t(l,f)},listen(T){if(p)throw new Error("A history only accepts one active listener");return l.addEventListener(Ov,g),p=T,()=>{l.removeEventListener(Ov,g),p=null}},createHref(T){return a(l,T)},createURL:E,encodeLocation(T){let M=E(T);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:b,replace:w,go(T){return f.go(T)}};return R}function vx(t,a=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(r,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:pa(t);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=r+o),new URL(o,r)}var es,Dv=class{constructor(t){if(J2(this,es,new Map),t)for(let[a,r]of t)this.set(a,r)}get(t){if(nd(this,es).has(t))return nd(this,es).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,a){nd(this,es).set(t,a)}};es=new WeakMap;var n_=new Set(["lazy","caseSensitive","path","id","index","children"]);function a_(t){return n_.has(t)}var i_=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function r_(t){return i_.has(t)}function o_(t){return t.index===!0}function ds(t,a,r=[],o={},l=!1){return t.map((u,f)=>{let h=[...r,String(f)],p=typeof u.id=="string"?u.id:h.join("-");if(Pe(u.index!==!0||!u.children,"Cannot specify children on an index route"),Pe(l||!o[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),o_(u)){let m={...u,id:p};return o[p]=Nv(m,a(m)),m}else{let m={...u,id:p,children:void 0};return o[p]=Nv(m,a(m)),u.children&&(m.children=ds(u.children,a,h,o,l)),m}})}function Nv(t,a){return Object.assign(t,{...a,...typeof a.lazy=="object"&&a.lazy!=null?{lazy:{...t.lazy,...a.lazy}}:{}})}function xi(t,a,r="/"){return ts(t,a,r,!1)}function ts(t,a,r,o){let l=typeof a=="string"?ya(a):a,u=Pn(l.pathname||"/",r);if(u==null)return null;let f=bx(t);l_(f);let h=null;for(let p=0;h==null&&p{let y={relativePath:m===void 0?f.path||"":m,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;Pe(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let g=Bn([o,y.relativePath]),b=r.concat(y);f.children&&f.children.length>0&&(Pe(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),bx(f.children,a,b,g,p)),!(f.path==null&&!f.index)&&a.push({path:g,score:p_(g,f.index),routesMeta:b})};return t.forEach((f,h)=>{if(f.path===""||!f.path?.includes("?"))u(f,h);else for(let p of xx(f.path))u(f,h,!0,p)}),a}function xx(t){let a=t.split("/");if(a.length===0)return[];let[r,...o]=a,l=r.endsWith("?"),u=r.replace(/\?$/,"");if(o.length===0)return l?[u,""]:[u];let f=xx(o.join("/")),h=[];return h.push(...f.map(p=>p===""?u:[u,p].join("/"))),l&&h.push(...f),h.map(p=>t.startsWith("/")&&p===""?"/":p)}function l_(t){t.sort((a,r)=>a.score!==r.score?r.score-a.score:g_(a.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var u_=/^:[\w-]+$/,c_=3,f_=2,d_=1,h_=10,m_=-2,Mv=t=>t==="*";function p_(t,a){let r=t.split("/"),o=r.length;return r.some(Mv)&&(o+=m_),a&&(o+=f_),r.filter(l=>!Mv(l)).reduce((l,u)=>l+(u_.test(u)?c_:u===""?d_:h_),o)}function g_(t,a){return t.length===a.length&&t.slice(0,-1).every((o,l)=>o===a[l])?t[t.length-1]-a[a.length-1]:0}function y_(t,a,r=!1){let{routesMeta:o}=t,l={},u="/",f=[];for(let h=0;h{if(y==="*"){let E=h[b]||"";f=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const w=h[b];return g&&!w?m[y]=void 0:m[y]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:f,pattern:t}}function v_(t,a=!1,r=!0){At(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let o=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,p,m,y)=>{if(o.push({paramName:h,isOptional:p!=null}),p){let g=y.charAt(m+f.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(o.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,a?void 0:"i"),o]}function b_(t){try{return t.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return At(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),t}}function Pn(t,a){if(a==="/")return t;if(!t.toLowerCase().startsWith(a.toLowerCase()))return null;let r=a.endsWith("/")?a.length-1:a.length,o=t.charAt(r);return o&&o!=="/"?null:t.slice(r)||"/"}function x_({basename:t,pathname:a}){return a==="/"?t:Bn([t,a])}var wx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,th=t=>wx.test(t);function w_(t,a="/"){let{pathname:r,search:o="",hash:l=""}=typeof t=="string"?ya(t):t,u;return r?(r=ah(r),r.startsWith("/")?u=Lv(r.substring(1),"/"):u=Lv(r,a)):u=a,{pathname:u,search:E_(o),hash:T_(l)}}function Lv(t,a){let r=hu(a).split("/");return t.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function ad(t,a,r,o){return`Cannot include a '${t}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Sx(t){return t.filter((a,r)=>r===0||a.route.path&&a.route.path.length>0)}function nh(t){let a=Sx(t);return a.map((r,o)=>o===a.length-1?r.pathname:r.pathnameBase)}function Cu(t,a,r,o=!1){let l;typeof t=="string"?l=ya(t):(l={...t},Pe(!l.pathname||!l.pathname.includes("?"),ad("?","pathname","search",l)),Pe(!l.pathname||!l.pathname.includes("#"),ad("#","pathname","hash",l)),Pe(!l.search||!l.search.includes("#"),ad("#","search","hash",l)));let u=t===""||l.pathname==="",f=u?"/":l.pathname,h;if(f==null)h=r;else{let g=a.length-1;if(!o&&f.startsWith("..")){let b=f.split("/");for(;b[0]==="..";)b.shift(),g-=1;l.pathname=b.join("/")}h=g>=0?a[g]:"/"}let p=w_(l,h),m=f&&f!=="/"&&f.endsWith("/"),y=(u||f===".")&&r.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}var ah=t=>t.replace(/\/\/+/g,"/"),Bn=t=>ah(t.join("/")),hu=t=>t.replace(/\/+$/,""),S_=t=>hu(t).replace(/^\/*/,"/"),E_=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,T_=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,ys=class{constructor(t,a,r,o=!1){this.status=t,this.statusText=a||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function hs(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function vs(t){let a=t.map(r=>r.route.path).filter(Boolean);return Bn(a)||"/"}var Ex=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Tx(t,a){let r=t;if(typeof r!="string"||!wx.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let o=r,l=!1;if(Ex)try{let u=new URL(window.location.href),f=r.startsWith("//")?new URL(u.protocol+r):new URL(r),h=Pn(f.pathname,a);f.origin===u.origin&&h!=null?r=h+f.search+f.hash:l=!0}catch{At(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:l,to:r}}var Si=Symbol("Uninstrumented");function R_(t,a){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(l=>l({id:a.id,index:a.index,path:a.path,instrument(u){let f=Object.keys(r);for(let h of f)u[h]&&r[h].push(u[h])}}));let o={};if(typeof a.lazy=="function"&&r.lazy.length>0){let l=Kr(r.lazy,a.lazy,()=>{});l&&(o.lazy=l)}if(typeof a.lazy=="object"){let l=a.lazy;["middleware","loader","action"].forEach(u=>{let f=l[u],h=r[`lazy.${u}`];if(typeof f=="function"&&h.length>0){let p=Kr(h,f,()=>{});p&&(o.lazy=Object.assign(o.lazy||{},{[u]:p}))}})}return["loader","action"].forEach(l=>{let u=a[l];if(typeof u=="function"&&r[l].length>0){let f=u[Si]??u,h=Kr(r[l],f,(...p)=>zv(p[0]));h&&(l==="loader"&&f.hydrate===!0&&(h.hydrate=!0),h[Si]=f,o[l]=h)}}),a.middleware&&a.middleware.length>0&&r.middleware.length>0&&(o.middleware=a.middleware.map(l=>{let u=l[Si]??l,f=Kr(r.middleware,u,(...h)=>zv(h[0]));return f?(f[Si]=u,f):l})),o}function C_(t,a){let r={navigate:[],fetch:[]};if(a.forEach(o=>o({instrument(l){let u=Object.keys(l);for(let f of u)l[f]&&r[f].push(l[f])}})),r.navigate.length>0){let o=t.navigate[Si]??t.navigate,l=Kr(r.navigate,o,(...u)=>{let[f,h]=u;return{to:typeof f=="number"||typeof f=="string"?f:f?pa(f):".",...jv(t,h??{})}});l&&(l[Si]=o,t.navigate=l)}if(r.fetch.length>0){let o=t.fetch[Si]??t.fetch,l=Kr(r.fetch,o,(...u)=>{let[f,,h,p]=u;return{href:h??".",fetcherKey:f,...jv(t,p??{})}});l&&(l[Si]=o,t.fetch=l)}return t}function Kr(t,a,r){return t.length===0?null:async(...o)=>{let l=await Rx(t,r(...o),()=>a(...o),t.length-1);if(l.type==="error")throw l.value;return l.value}}async function Rx(t,a,r,o){let l=t[o],u;if(l){let f,h=async()=>(f?console.error("You cannot call instrumented handlers more than once"):f=Rx(t,a,r,o-1),u=await f,Pe(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await l(h,a)}catch(p){console.error("An instrumentation function threw an error:",p)}f||await h(),await f}else try{u={type:"success",value:await r()}}catch(f){u={type:"error",value:f}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function zv(t){let{request:a,context:r,params:o,unstable_pattern:l}=t;return{request:O_(a),params:{...o},unstable_pattern:l,context:A_(r)}}function jv(t,a){return{currentUrl:pa(t.state.location),..."formMethod"in a?{formMethod:a.formMethod}:{},..."formEncType"in a?{formEncType:a.formEncType}:{},..."formData"in a?{formData:a.formData}:{},..."body"in a?{body:a.body}:{}}}function O_(t){return{method:t.method,url:t.url,headers:{get:(...a)=>t.headers.get(...a)}}}function A_(t){if(D_(t)){let a={...t};return Object.freeze(a),a}else return{get:a=>t.get(a)}}var __=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function D_(t){if(t===null||typeof t!="object")return!1;const a=Object.getPrototypeOf(t);return a===Object.prototype||a===null||Object.getOwnPropertyNames(a).sort().join("\0")===__}var Cx=["POST","PUT","PATCH","DELETE"],N_=new Set(Cx),M_=["GET",...Cx],L_=new Set(M_),Ox=new Set([301,302,303,307,308]),z_=new Set([307,308]),id={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},j_={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Zo={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},U_=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Ax="remix-router-transitions",_x=Symbol("ResetLoaderData");function k_(t){const a=t.window?t.window:typeof window<"u"?window:void 0,r=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";Pe(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=t.hydrationRouteProperties||[],l=t.mapRouteProperties||U_,u=l;if(t.unstable_instrumentations){let C=t.unstable_instrumentations;u=j=>({...l(j),...R_(C.map(H=>H.route).filter(Boolean),j)})}let f={},h=ds(t.routes,u,void 0,f),p,m=t.basename||"/";m.startsWith("/")||(m=`/${m}`);let y=t.dataStrategy||q_,g={unstable_passThroughRequests:!1,...t.future},b=null,w=new Set,E=null,R=null,T=null,M=t.hydrationData!=null,z=xi(h,t.history.location,m),k=!1,V=null,Q,X;if(z==null&&!t.patchRoutesOnNavigation){let C=Hn(404,{pathname:t.history.location.pathname}),{matches:j,route:H}=Gl(h);Q=!0,X=!Q,z=j,V={[H.id]:C}}else if(z&&!t.hydrationData&&yn(z,h,t.history.location.pathname).active&&(z=null),z)if(z.some(C=>C.route.lazy))Q=!1,X=!Q;else if(!z.some(C=>ih(C.route)))Q=!0,X=!Q;else{let C=t.hydrationData?t.hydrationData.loaderData:null,j=t.hydrationData?t.hydrationData.errors:null,H=z;if(j){let oe=z.findIndex(ue=>j[ue.route.id]!==void 0);H=H.slice(0,oe+1)}X=!1,Q=!0,H.forEach(oe=>{let ue=Dx(oe.route,C,j);X=X||ue.renderFallback,Q=Q&&!ue.shouldLoad})}else{Q=!1,X=!Q,z=[];let C=yn(null,h,t.history.location.pathname);C.active&&C.matches&&(k=!0,z=C.matches)}let $,A={historyAction:t.history.action,location:t.history.location,matches:z,initialized:Q,renderFallback:X,navigation:id,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||V,fetchers:new Map,blockers:new Map},ne="POP",ce=null,ve=!1,he,fe=!1,ae=new Map,re=null,D=!1,q=!1,Z=new Set,ie=new Map,J=0,O=-1,Y=new Map,K=new Set,te=new Map,se=new Map,de=new Set,Re=new Map,_e,Ce=null;function Pt(){if(b=t.history.listen(({action:C,location:j,delta:H})=>{if(_e){_e(),_e=void 0;return}At(Re.size===0||H!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let oe=ia({currentLocation:A.location,nextLocation:j,historyAction:C});if(oe&&H!=null){let ue=new Promise(be=>{_e=be});t.history.go(H*-1),$n(oe,{state:"blocked",location:j,proceed(){$n(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),ue.then(()=>t.history.go(H))},reset(){let be=new Map(A.blockers);be.set(oe,Zo),Ze({blockers:be})}}),ce?.resolve(),ce=null;return}return en(C,j)}),r){oD(a,ae);let C=()=>sD(a,ae);a.addEventListener("pagehide",C),re=()=>a.removeEventListener("pagehide",C)}return A.initialized||en("POP",A.location,{initialHydration:!0}),$}function kt(){b&&b(),re&&re(),w.clear(),he&&he.abort(),A.fetchers.forEach((C,j)=>Yn(j)),A.blockers.forEach((C,j)=>ba(j))}function _t(C){return w.add(C),()=>w.delete(C)}function Ze(C,j={}){C.matches&&(C.matches=C.matches.map(ue=>{let be=f[ue.route.id],me=ue.route;return me.element!==be.element||me.errorElement!==be.errorElement||me.hydrateFallbackElement!==be.hydrateFallbackElement?{...ue,route:be}:ue})),A={...A,...C};let H=[],oe=[];A.fetchers.forEach((ue,be)=>{ue.state==="idle"&&(de.has(be)?H.push(be):oe.push(be))}),de.forEach(ue=>{!A.fetchers.has(ue)&&!ie.has(ue)&&H.push(ue)}),[...w].forEach(ue=>ue(A,{deletedFetchers:H,newErrors:C.errors??null,viewTransitionOpts:j.viewTransitionOpts,flushSync:j.flushSync===!0})),H.forEach(ue=>Yn(ue)),oe.forEach(ue=>A.fetchers.delete(ue))}function ht(C,j,{flushSync:H}={}){let oe=A.actionData!=null&&A.navigation.formMethod!=null&&Wt(A.navigation.formMethod)&&A.navigation.state==="loading"&&C.state?._isRedirect!==!0,ue;j.actionData?Object.keys(j.actionData).length>0?ue=j.actionData:ue=null:oe?ue=A.actionData:ue=null;let be=j.loaderData?Gv(A.loaderData,j.loaderData,j.matches||[],j.errors):A.loaderData,me=A.blockers;me.size>0&&(me=new Map(me),me.forEach((Ae,Te)=>me.set(Te,Zo)));let pe=D?!1:Mt(C,j.matches||A.matches),Se=ve===!0||A.navigation.formMethod!=null&&Wt(A.navigation.formMethod)&&C.state?._isRedirect!==!0;p&&(h=p,p=void 0),D||ne==="POP"||(ne==="PUSH"?t.history.push(C,C.state):ne==="REPLACE"&&t.history.replace(C,C.state));let ge;if(ne==="POP"){let Ae=ae.get(A.location.pathname);Ae&&Ae.has(C.pathname)?ge={currentLocation:A.location,nextLocation:C}:ae.has(C.pathname)&&(ge={currentLocation:C,nextLocation:A.location})}else if(fe){let Ae=ae.get(A.location.pathname);Ae?Ae.add(C.pathname):(Ae=new Set([C.pathname]),ae.set(A.location.pathname,Ae)),ge={currentLocation:A.location,nextLocation:C}}Ze({...j,actionData:ue,loaderData:be,historyAction:ne,location:C,initialized:!0,renderFallback:!1,navigation:id,revalidation:"idle",restoreScrollPosition:pe,preventScrollReset:Se,blockers:me},{viewTransitionOpts:ge,flushSync:H===!0}),ne="POP",ve=!1,fe=!1,D=!1,q=!1,ce?.resolve(),ce=null,Ce?.resolve(),Ce=null}async function Ya(C,j){if(ce?.resolve(),ce=null,typeof C=="number"){ce||(ce=Iv());let rt=ce.promise;return t.history.go(C),rt}let H=_d(A.location,A.matches,m,C,j?.fromRouteId,j?.relative),{path:oe,submission:ue,error:be}=Uv(!1,H,j),me;j?.unstable_mask&&(me={pathname:"",search:"",hash:"",...typeof j.unstable_mask=="string"?ya(j.unstable_mask):{...A.location.unstable_mask,...j.unstable_mask}});let pe=A.location,Se=fs(pe,oe,j&&j.state,void 0,me);Se={...Se,...t.history.encodeLocation(Se)};let ge=j&&j.replace!=null?j.replace:void 0,Ae="PUSH";ge===!0?Ae="REPLACE":ge===!1||ue!=null&&Wt(ue.formMethod)&&ue.formAction===A.location.pathname+A.location.search&&(Ae="REPLACE");let Te=j&&"preventScrollReset"in j?j.preventScrollReset===!0:void 0,Ke=(j&&j.flushSync)===!0,He=ia({currentLocation:pe,nextLocation:Se,historyAction:Ae});if(He){$n(He,{state:"blocked",location:Se,proceed(){$n(He,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),Ya(C,j)},reset(){let rt=new Map(A.blockers);rt.set(He,Zo),Ze({blockers:rt})}});return}await en(Ae,Se,{submission:ue,pendingError:be,preventScrollReset:Te,replace:j&&j.replace,enableViewTransition:j&&j.viewTransition,flushSync:Ke,callSiteDefaultShouldRevalidate:j&&j.unstable_defaultShouldRevalidate})}function $a(){Ce||(Ce=Iv()),Fn(),Ze({revalidation:"loading"});let C=Ce.promise;return A.navigation.state==="submitting"?C:A.navigation.state==="idle"?(en(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),C):(en(ne||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:fe===!0}),C)}async function en(C,j,H){he&&he.abort(),he=null,ne=C,D=(H&&H.startUninterruptedRevalidation)===!0,wt(A.location,A.matches),ve=(H&&H.preventScrollReset)===!0,fe=(H&&H.enableViewTransition)===!0;let oe=p||h,ue=H&&H.overrideNavigation,be=H?.initialHydration&&A.matches&&A.matches.length>0&&!k?A.matches:xi(oe,j,m),me=(H&&H.flushSync)===!0;if(be&&A.initialized&&!q&&I_(A.location,j)&&!(H&&H.submission&&Wt(H.submission.formMethod))){ht(j,{matches:be},{flushSync:me});return}let pe=yn(be,oe,j.pathname);if(pe.active&&pe.matches&&(be=pe.matches),!be){let{error:lt,notFoundMatches:mt,route:Ge}=on(j.pathname);ht(j,{matches:mt,loaderData:{},errors:{[Ge.id]:lt}},{flushSync:me});return}he=new AbortController;let Se=Gr(t.history,j,he.signal,H&&H.submission),ge=t.getContext?await t.getContext():new Dv,Ae;if(H&&H.pendingError)Ae=[wi(be).route.id,{type:"error",error:H.pendingError}];else if(H&&H.submission&&Wt(H.submission.formMethod)){let lt=await _i(Se,j,H.submission,be,ge,pe.active,H&&H.initialHydration===!0,{replace:H.replace,flushSync:me});if(lt.shortCircuited)return;if(lt.pendingActionResult){let[mt,Ge]=lt.pendingActionResult;if(Rn(Ge)&&hs(Ge.error)&&Ge.error.status===404){he=null,ht(j,{matches:lt.matches,loaderData:{},errors:{[mt]:Ge.error}});return}}be=lt.matches||be,Ae=lt.pendingActionResult,ue=rd(j,H.submission),me=!1,pe.active=!1,Se=Gr(t.history,Se.url,Se.signal)}let{shortCircuited:Te,matches:Ke,loaderData:He,errors:rt}=await tn(Se,j,be,ge,pe.active,ue,H&&H.submission,H&&H.fetcherSubmission,H&&H.replace,H&&H.initialHydration===!0,me,Ae,H&&H.callSiteDefaultShouldRevalidate);Te||(he=null,ht(j,{matches:Ke||be,...Kv(Ae),loaderData:He,errors:rt}))}async function _i(C,j,H,oe,ue,be,me,pe={}){Fn();let Se=iD(j,H);if(Ze({navigation:Se},{flushSync:pe.flushSync===!0}),be){let Te=await et(oe,j.pathname,C.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){if(Te.partialMatches.length===0){let{matches:He,route:rt}=Gl(h);return{matches:He,pendingActionResult:[rt.id,{type:"error",error:Te.error}]}}let Ke=wi(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ke,{type:"error",error:Te.error}]}}else if(Te.matches)oe=Te.matches;else{let{notFoundMatches:Ke,error:He,route:rt}=on(j.pathname);return{matches:Ke,pendingActionResult:[rt.id,{type:"error",error:He}]}}}let ge,Ae=Jl(oe,j);if(!Ae.route.action&&!Ae.route.lazy)ge={type:"error",error:Hn(405,{method:C.method,pathname:j.pathname,routeId:Ae.route.id})};else{let Te=Ir(u,f,C,j,oe,Ae,me?[]:o,ue),Ke=await gn(C,j,Te,ue,null);if(ge=Ke[Ae.route.id],!ge){for(let He of oe)if(Ke[He.route.id]){ge=Ke[He.route.id];break}}if(C.signal.aborted)return{shortCircuited:!0}}if(tr(ge)){let Te;return pe&&pe.replace!=null?Te=pe.replace:Te=Fv(ge.response.headers.get("Location"),new URL(C.url),m,t.history)===A.location.pathname+A.location.search,await qn(C,ge,!0,{submission:H,replace:Te}),{shortCircuited:!0}}if(Rn(ge)){let Te=wi(oe,Ae.route.id);return(pe&&pe.replace)!==!0&&(ne="PUSH"),{matches:oe,pendingActionResult:[Te.route.id,ge,Ae.route.id]}}return{matches:oe,pendingActionResult:[Ae.route.id,ge]}}async function tn(C,j,H,oe,ue,be,me,pe,Se,ge,Ae,Te,Ke){let He=be||rd(j,me),rt=me||pe||Qv(He),lt=!D&&!ge;if(ue){if(lt){let vt=Ga(Te);Ze({navigation:He,...vt!==void 0?{actionData:vt}:{}},{flushSync:Ae})}let Be=await et(H,j.pathname,C.signal);if(Be.type==="aborted")return{shortCircuited:!0};if(Be.type==="error"){if(Be.partialMatches.length===0){let{matches:Zt,route:Et}=Gl(h);return{matches:Zt,loaderData:{},errors:{[Et.id]:Be.error}}}let vt=wi(Be.partialMatches).route.id;return{matches:Be.partialMatches,loaderData:{},errors:{[vt]:Be.error}}}else if(Be.matches)H=Be.matches;else{let{error:vt,notFoundMatches:Zt,route:Et}=on(j.pathname);return{matches:Zt,loaderData:{},errors:{[Et.id]:vt}}}}let mt=p||h,{dsMatches:Ge,revalidatingFetchers:St}=kv(C,oe,u,f,t.history,A,H,rt,j,ge?[]:o,ge===!0,q,Z,de,te,K,mt,m,t.patchRoutesOnNavigation!=null,Te,Ke);if(O=++J,!t.dataStrategy&&!Ge.some(Be=>Be.shouldLoad)&&!Ge.some(Be=>Be.route.middleware&&Be.route.middleware.length>0)&&St.length===0){let Be=sr();return ht(j,{matches:H,loaderData:{},errors:Te&&Rn(Te[1])?{[Te[0]]:Te[1].error}:null,...Kv(Te),...Be?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Ae}),{shortCircuited:!0}}if(lt){let Be={};if(!ue){Be.navigation=He;let vt=Ga(Te);vt!==void 0&&(Be.actionData=vt)}St.length>0&&(Be.fetchers=Di(St)),Ze(Be,{flushSync:Ae})}St.forEach(Be=>{yt(Be.key),Be.controller&&ie.set(Be.key,Be.controller)});let st=()=>St.forEach(Be=>yt(Be.key));he&&he.signal.addEventListener("abort",st);let{loaderResults:Xa,fetcherResults:Gn}=await Ni(Ge,St,C,j,oe);if(C.signal.aborted)return{shortCircuited:!0};he&&he.signal.removeEventListener("abort",st),St.forEach(Be=>ie.delete(Be.key));let Ht=Kl(Xa);if(Ht)return await qn(C,Ht.result,!0,{replace:Se}),{shortCircuited:!0};if(Ht=Kl(Gn),Ht)return K.add(Ht.key),await qn(C,Ht.result,!0,{replace:Se}),{shortCircuited:!0};let{loaderData:ra,errors:Li}=$v(A,H,Xa,Te,St,Gn);ge&&A.errors&&(Li={...A.errors,...Li});let oa=sr(),zi=Ka(O),lr=oa||zi||St.length>0;return{matches:H,loaderData:ra,errors:Li,...lr?{fetchers:new Map(A.fetchers)}:{}}}function Ga(C){if(C&&!Rn(C[1]))return{[C[0]]:C[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Di(C){return C.forEach(j=>{let H=A.fetchers.get(j.key),oe=Jo(void 0,H?H.data:void 0);A.fetchers.set(j.key,oe)}),new Map(A.fetchers)}async function Vt(C,j,H,oe){yt(C);let ue=(oe&&oe.flushSync)===!0,be=p||h,me=_d(A.location,A.matches,m,H,j,oe?.relative),pe=xi(be,me,m),Se=yn(pe,be,me);if(Se.active&&Se.matches&&(pe=Se.matches),!pe){Dt(C,j,Hn(404,{pathname:me}),{flushSync:ue});return}let{path:ge,submission:Ae,error:Te}=Uv(!0,me,oe);if(Te){Dt(C,j,Te,{flushSync:ue});return}let Ke=t.getContext?await t.getContext():new Dv,He=(oe&&oe.preventScrollReset)===!0;if(Ae&&Wt(Ae.formMethod)){await na(C,j,ge,pe,Ke,Se.active,ue,He,Ae,oe&&oe.unstable_defaultShouldRevalidate);return}te.set(C,{routeId:j,path:ge}),await qt(C,j,ge,pe,Ke,Se.active,ue,He,Ae)}async function na(C,j,H,oe,ue,be,me,pe,Se,ge){Fn(),te.delete(C);let Ae=A.fetchers.get(C);nn(C,rD(Se,Ae),{flushSync:me});let Te=new AbortController,Ke=Gr(t.history,H,Te.signal,Se);if(be){let ut=await et(oe,new URL(Ke.url).pathname,Ke.signal,C);if(ut.type==="aborted")return;if(ut.type==="error"){Dt(C,j,ut.error,{flushSync:me});return}else if(ut.matches)oe=ut.matches;else{Dt(C,j,Hn(404,{pathname:H}),{flushSync:me});return}}let He=Jl(oe,H);if(!He.route.action&&!He.route.lazy){let ut=Hn(405,{method:Se.formMethod,pathname:H,routeId:j});Dt(C,j,ut,{flushSync:me});return}ie.set(C,Te);let rt=J,lt=Ir(u,f,Ke,H,oe,He,o,ue),mt=await gn(Ke,H,lt,ue,C),Ge=mt[He.route.id];if(!Ge){for(let ut of lt)if(mt[ut.route.id]){Ge=mt[ut.route.id];break}}if(Ke.signal.aborted){ie.get(C)===Te&&ie.delete(C);return}if(de.has(C)){if(tr(Ge)||Rn(Ge)){nn(C,Ba(void 0));return}}else{if(tr(Ge))if(ie.delete(C),O>rt){nn(C,Ba(void 0));return}else return K.add(C),nn(C,Jo(Se)),qn(Ke,Ge,!1,{fetcherSubmission:Se,preventScrollReset:pe});if(Rn(Ge)){Dt(C,j,Ge.error);return}}let St=A.navigation.location||A.location,st=Gr(t.history,St,Te.signal),Xa=p||h,Gn=A.navigation.state!=="idle"?xi(Xa,A.navigation.location,m):A.matches;Pe(Gn,"Didn't find any matches after fetcher action");let Ht=++J;Y.set(C,Ht);let ra=Jo(Se,Ge.data);A.fetchers.set(C,ra);let{dsMatches:Li,revalidatingFetchers:oa}=kv(st,ue,u,f,t.history,A,Gn,Se,St,o,!1,q,Z,de,te,K,Xa,m,t.patchRoutesOnNavigation!=null,[He.route.id,Ge],ge);oa.filter(ut=>ut.key!==C).forEach(ut=>{let ur=ut.key,cr=A.fetchers.get(ur),Ss=Jo(void 0,cr?cr.data:void 0);A.fetchers.set(ur,Ss),yt(ur),ut.controller&&ie.set(ur,ut.controller)}),Ze({fetchers:new Map(A.fetchers)});let zi=()=>oa.forEach(ut=>yt(ut.key));Te.signal.addEventListener("abort",zi);let{loaderResults:lr,fetcherResults:Be}=await Ni(Li,oa,st,St,ue);if(Te.signal.aborted)return;if(Te.signal.removeEventListener("abort",zi),Y.delete(C),ie.delete(C),oa.forEach(ut=>ie.delete(ut.key)),A.fetchers.has(C)){let ut=Ba(Ge.data);A.fetchers.set(C,ut)}let vt=Kl(lr);if(vt)return qn(st,vt.result,!1,{preventScrollReset:pe});if(vt=Kl(Be),vt)return K.add(vt.key),qn(st,vt.result,!1,{preventScrollReset:pe});let{loaderData:Zt,errors:Et}=$v(A,Gn,lr,void 0,oa,Be);Ka(Ht),A.navigation.state==="loading"&&Ht>O?(Pe(ne,"Expected pending action"),he&&he.abort(),ht(A.navigation.location,{matches:Gn,loaderData:Zt,errors:Et,fetchers:new Map(A.fetchers)})):(Ze({errors:Et,loaderData:Gv(A.loaderData,Zt,Gn,Et),fetchers:new Map(A.fetchers)}),q=!1)}async function qt(C,j,H,oe,ue,be,me,pe,Se){let ge=A.fetchers.get(C);nn(C,Jo(Se,ge?ge.data:void 0),{flushSync:me});let Ae=new AbortController,Te=Gr(t.history,H,Ae.signal);if(be){let Ge=await et(oe,new URL(Te.url).pathname,Te.signal,C);if(Ge.type==="aborted")return;if(Ge.type==="error"){Dt(C,j,Ge.error,{flushSync:me});return}else if(Ge.matches)oe=Ge.matches;else{Dt(C,j,Hn(404,{pathname:H}),{flushSync:me});return}}let Ke=Jl(oe,H);ie.set(C,Ae);let He=J,rt=Ir(u,f,Te,H,oe,Ke,o,ue),mt=(await gn(Te,H,rt,ue,C))[Ke.route.id];if(ie.get(C)===Ae&&ie.delete(C),!Te.signal.aborted){if(de.has(C)){nn(C,Ba(void 0));return}if(tr(mt))if(O>He){nn(C,Ba(void 0));return}else{K.add(C),await qn(Te,mt,!1,{preventScrollReset:pe});return}if(Rn(mt)){Dt(C,j,mt.error);return}nn(C,Ba(mt.data))}}async function qn(C,j,H,{submission:oe,fetcherSubmission:ue,preventScrollReset:be,replace:me}={}){H||(ce?.resolve(),ce=null),j.response.headers.has("X-Remix-Revalidate")&&(q=!0);let pe=j.response.headers.get("Location");Pe(pe,"Expected a Location header on the redirect Response"),pe=Fv(pe,new URL(C.url),m,t.history);let Se=fs(A.location,pe,{_isRedirect:!0});if(r){let rt=!1;if(j.response.headers.has("X-Remix-Reload-Document"))rt=!0;else if(th(pe)){const lt=vx(pe,!0);rt=lt.origin!==a.location.origin||Pn(lt.pathname,m)==null}if(rt){me?a.location.replace(pe):a.location.assign(pe);return}}he=null;let ge=me===!0||j.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ae,formAction:Te,formEncType:Ke}=A.navigation;!oe&&!ue&&Ae&&Te&&Ke&&(oe=Qv(A.navigation));let He=oe||ue;if(z_.has(j.response.status)&&He&&Wt(He.formMethod))await en(ge,Se,{submission:{...He,formAction:pe},preventScrollReset:be||ve,enableViewTransition:H?fe:void 0});else{let rt=rd(Se,oe);await en(ge,Se,{overrideNavigation:rt,fetcherSubmission:ue,preventScrollReset:be||ve,enableViewTransition:H?fe:void 0})}}async function gn(C,j,H,oe,ue){let be,me={};try{be=await Y_(y,C,j,H,ue,oe,!1)}catch(pe){return H.filter(Se=>Se.shouldLoad).forEach(Se=>{me[Se.route.id]={type:"error",error:pe}}),me}if(C.signal.aborted)return me;if(!Wt(C.method))for(let pe of H){if(be[pe.route.id]?.type==="error")break;!be.hasOwnProperty(pe.route.id)&&!A.loaderData.hasOwnProperty(pe.route.id)&&(!A.errors||!A.errors.hasOwnProperty(pe.route.id))&&pe.shouldCallHandler()&&(be[pe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${pe.route.id}`)})}for(let[pe,Se]of Object.entries(be))if(eD(Se)){let ge=Se.result;me[pe]={type:"redirect",response:X_(ge,C,pe,H,m)}}else me[pe]=await K_(Se);return me}async function Ni(C,j,H,oe,ue){let be=gn(H,oe,C,ue,null),me=Promise.all(j.map(async ge=>{if(ge.matches&&ge.match&&ge.request&&ge.controller){let Te=(await gn(ge.request,ge.path,ge.matches,ue,ge.key))[ge.match.route.id];return{[ge.key]:Te}}else return Promise.resolve({[ge.key]:{type:"error",error:Hn(404,{pathname:ge.path})}})})),pe=await be,Se=(await me).reduce((ge,Ae)=>Object.assign(ge,Ae),{});return{loaderResults:pe,fetcherResults:Se}}function Fn(){q=!0,te.forEach((C,j)=>{ie.has(j)&&Z.add(j),yt(j)})}function nn(C,j,H={}){A.fetchers.set(C,j),Ze({fetchers:new Map(A.fetchers)},{flushSync:(H&&H.flushSync)===!0})}function Dt(C,j,H,oe={}){let ue=wi(A.matches,j);Yn(C),Ze({errors:{[ue.route.id]:H},fetchers:new Map(A.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function Mi(C){return se.set(C,(se.get(C)||0)+1),de.has(C)&&de.delete(C),A.fetchers.get(C)||j_}function aa(C,j){yt(C,j?.reason),nn(C,Ba(null))}function Yn(C){let j=A.fetchers.get(C);ie.has(C)&&!(j&&j.state==="loading"&&Y.has(C))&&yt(C),te.delete(C),Y.delete(C),K.delete(C),de.delete(C),Z.delete(C),A.fetchers.delete(C)}function Ft(C){let j=(se.get(C)||0)-1;j<=0?(se.delete(C),de.add(C)):se.set(C,j),Ze({fetchers:new Map(A.fetchers)})}function yt(C,j){let H=ie.get(C);H&&(H.abort(j),ie.delete(C))}function Nt(C){for(let j of C){let H=Mi(j),oe=Ba(H.data);A.fetchers.set(j,oe)}}function sr(){let C=[],j=!1;for(let H of K){let oe=A.fetchers.get(H);Pe(oe,`Expected fetcher: ${H}`),oe.state==="loading"&&(K.delete(H),C.push(H),j=!0)}return Nt(C),j}function Ka(C){let j=[];for(let[H,oe]of Y)if(oe0}function An(C,j){let H=A.blockers.get(C)||Zo;return Re.get(C)!==j&&Re.set(C,j),H}function ba(C){A.blockers.delete(C),Re.delete(C)}function $n(C,j){let H=A.blockers.get(C)||Zo;Pe(H.state==="unblocked"&&j.state==="blocked"||H.state==="blocked"&&j.state==="blocked"||H.state==="blocked"&&j.state==="proceeding"||H.state==="blocked"&&j.state==="unblocked"||H.state==="proceeding"&&j.state==="unblocked",`Invalid blocker state transition: ${H.state} -> ${j.state}`);let oe=new Map(A.blockers);oe.set(C,j),Ze({blockers:oe})}function ia({currentLocation:C,nextLocation:j,historyAction:H}){if(Re.size===0)return;Re.size>1&&At(!1,"A router only supports one blocker at a time");let oe=Array.from(Re.entries()),[ue,be]=oe[oe.length-1],me=A.blockers.get(ue);if(!(me&&me.state==="proceeding")&&be({currentLocation:C,nextLocation:j,historyAction:H}))return ue}function on(C){let j=Hn(404,{pathname:C}),H=p||h,{matches:oe,route:ue}=Gl(H);return{notFoundMatches:oe,route:ue,error:j}}function Ne(C,j,H){if(E=C,T=j,R=H||null,!M&&A.navigation===id){M=!0;let oe=Mt(A.location,A.matches);oe!=null&&Ze({restoreScrollPosition:oe})}return()=>{E=null,T=null,R=null}}function it(C,j){return R&&R(C,j.map(oe=>s_(oe,A.loaderData)))||C.key}function wt(C,j){if(E&&T){let H=it(C,j);E[H]=T()}}function Mt(C,j){if(E){let H=it(C,j),oe=E[H];if(typeof oe=="number")return oe}return null}function yn(C,j,H){if(t.patchRoutesOnNavigation)if(C){if(Object.keys(C[0].params).length>0)return{active:!0,matches:ts(j,H,m,!0)}}else return{active:!0,matches:ts(j,H,m,!0)||[]};return{active:!1,matches:null}}async function et(C,j,H,oe){if(!t.patchRoutesOnNavigation)return{type:"success",matches:C};let ue=C;for(;;){let be=p==null,me=p||h,pe=f;try{await t.patchRoutesOnNavigation({signal:H,path:j,matches:ue,fetcherKey:oe,patch:(Ae,Te)=>{H.aborted||Hv(Ae,Te,me,pe,u,!1)}})}catch(Ae){return{type:"error",error:Ae,partialMatches:ue}}finally{be&&!H.aborted&&(h=[...h])}if(H.aborted)return{type:"aborted"};let Se=xi(me,j,m),ge=null;if(Se){if(Object.keys(Se[0].params).length===0)return{type:"success",matches:Se};if(ge=ts(me,j,m,!0),!(ge&&ue.lengthH.route.id===j[oe].route.id)}function xa(C){f={},p=ds(C,u,void 0,f)}function It(C,j,H=!1){let oe=p==null;Hv(C,j,p||h,f,u,H),oe&&(h=[...h],Ze({}))}return $={get basename(){return m},get future(){return g},get state(){return A},get routes(){return h},get window(){return a},initialize:Pt,subscribe:_t,enableScrollRestoration:Ne,navigate:Ya,fetch:Vt,revalidate:$a,createHref:C=>t.history.createHref(C),encodeLocation:C=>t.history.encodeLocation(C),getFetcher:Mi,resetFetcher:aa,deleteFetcher:Ft,dispose:kt,getBlocker:An,deleteBlocker:ba,patchRoutes:It,_internalFetchControllers:ie,_internalSetRoutes:xa,_internalSetStateDoNotUseOrYouWillBreakYourApp(C){Ze(C)}},t.unstable_instrumentations&&($=C_($,t.unstable_instrumentations.map(C=>C.router).filter(Boolean))),$}function H_(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function _d(t,a,r,o,l,u){let f,h;if(l){f=[];for(let m of a)if(f.push(m),m.route.id===l){h=m;break}}else f=a,h=a[a.length-1];let p=Cu(o||".",nh(f),Pn(t.pathname,r)||t.pathname,u==="path");if(o==null&&(p.search=t.search,p.hash=t.hash),(o==null||o===""||o===".")&&h){let m=oh(p.search);if(h.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&m){let y=new URLSearchParams(p.search),g=y.getAll("index");y.delete("index"),g.filter(w=>w).forEach(w=>y.append("index",w));let b=y.toString();p.search=b?`?${b}`:""}}return r!=="/"&&(p.pathname=x_({basename:r,pathname:p.pathname})),pa(p)}function Uv(t,a,r){if(!r||!H_(r))return{path:a};if(r.formMethod&&!aD(r.formMethod))return{path:a,error:Hn(405,{method:r.formMethod})};let o=()=>({path:a,error:Hn(400,{type:"invalid-body"})}),u=(r.formMethod||"get").toUpperCase(),f=kx(a);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Wt(u))return o();let g=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((b,[w,E])=>`${b}${w}=${E} `,""):String(r.body);return{path:a,submission:{formMethod:u,formAction:f,formEncType:r.formEncType,formData:void 0,json:void 0,text:g}}}else if(r.formEncType==="application/json"){if(!Wt(u))return o();try{let g=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:a,submission:{formMethod:u,formAction:f,formEncType:r.formEncType,formData:void 0,json:g,text:void 0}}}catch{return o()}}}Pe(typeof FormData=="function","FormData is not available in this environment");let h,p;if(r.formData)h=Nd(r.formData),p=r.formData;else if(r.body instanceof FormData)h=Nd(r.body),p=r.body;else if(r.body instanceof URLSearchParams)h=r.body,p=Yv(h);else if(r.body==null)h=new URLSearchParams,p=new FormData;else try{h=new URLSearchParams(r.body),p=Yv(h)}catch{return o()}let m={formMethod:u,formAction:f,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Wt(m.formMethod))return{path:a,submission:m};let y=ya(a);return t&&y.search&&oh(y.search)&&h.append("index",""),y.search=`?${h}`,{path:pa(y),submission:m}}function kv(t,a,r,o,l,u,f,h,p,m,y,g,b,w,E,R,T,M,z,k,V){let Q=k?Rn(k[1])?k[1].error:k[1].data:void 0,X=l.createURL(u.location),$=l.createURL(p),A;if(y&&u.errors){let re=Object.keys(u.errors)[0];A=f.findIndex(D=>D.route.id===re)}else if(k&&Rn(k[1])){let re=k[0];A=f.findIndex(D=>D.route.id===re)-1}let ne=k?k[1].statusCode:void 0,ce=ne&&ne>=400,ve={currentUrl:X,currentParams:u.matches[0]?.params||{},nextUrl:$,nextParams:f[0].params,...h,actionResult:Q,actionStatus:ne},he=vs(f),fe=f.map((re,D)=>{let{route:q}=re,Z=null;if(A!=null&&D>A)Z=!1;else if(q.lazy)Z=!0;else if(!ih(q))Z=!1;else if(y){let{shouldLoad:Y}=Dx(q,u.loaderData,u.errors);Z=Y}else B_(u.loaderData,u.matches[D],re)&&(Z=!0);if(Z!==null)return Dd(r,o,t,p,he,re,m,a,Z);let ie=!1;typeof V=="boolean"?ie=V:ce?ie=!1:(g||X.pathname+X.search===$.pathname+$.search||X.search!==$.search||P_(u.matches[D],re))&&(ie=!0);let J={...ve,defaultShouldRevalidate:ie},O=rs(re,J);return Dd(r,o,t,p,he,re,m,a,O,J,V)}),ae=[];return E.forEach((re,D)=>{if(y||!f.some(te=>te.route.id===re.routeId)||w.has(D))return;let q=u.fetchers.get(D),Z=q&&q.state!=="idle"&&q.data===void 0,ie=xi(T,re.path,M);if(!ie){if(z&&Z)return;ae.push({key:D,routeId:re.routeId,path:re.path,matches:null,match:null,request:null,controller:null});return}if(R.has(D))return;let J=Jl(ie,re.path),O=new AbortController,Y=Gr(l,re.path,O.signal),K=null;if(b.has(D))b.delete(D),K=Ir(r,o,Y,re.path,ie,J,m,a);else if(Z)g&&(K=Ir(r,o,Y,re.path,ie,J,m,a));else{let te;typeof V=="boolean"?te=V:ce?te=!1:te=g;let se={...ve,defaultShouldRevalidate:te};rs(J,se)&&(K=Ir(r,o,Y,re.path,ie,J,m,a,se))}K&&ae.push({key:D,routeId:re.routeId,path:re.path,matches:K,match:J,request:Y,controller:O})}),{dsMatches:fe,revalidatingFetchers:ae}}function ih(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function Dx(t,a,r){if(t.lazy)return{shouldLoad:!0,renderFallback:!0};if(!ih(t))return{shouldLoad:!1,renderFallback:!1};let o=a!=null&&t.id in a,l=r!=null&&r[t.id]!==void 0;if(!o&&l)return{shouldLoad:!1,renderFallback:!1};if(typeof t.loader=="function"&&t.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!o};let u=!o&&!l;return{shouldLoad:u,renderFallback:u}}function B_(t,a,r){let o=!a||r.route.id!==a.route.id,l=!t.hasOwnProperty(r.route.id);return o||l}function P_(t,a){let r=t.route.path;return t.pathname!==a.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==a.params["*"]}function rs(t,a){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(a);if(typeof r=="boolean")return r}return a.defaultShouldRevalidate}function Hv(t,a,r,o,l,u){let f;if(t){let m=o[t];Pe(m,`No route found to patch children into: routeId = ${t}`),m.children||(m.children=[]),f=m.children}else f=r;let h=[],p=[];if(a.forEach(m=>{let y=f.find(g=>Nx(m,g));y?p.push({existingRoute:y,newRoute:m}):h.push(m)}),h.length>0){let m=ds(h,l,[t||"_","patch",String(f?.length||"0")],o);f.push(...m)}if(u&&p.length>0)for(let m=0;ma.children?.some(l=>Nx(r,l)))??!1:!1}var Bv=new WeakMap,Mx=({key:t,route:a,manifest:r,mapRouteProperties:o})=>{let l=r[a.id];if(Pe(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let u=l.lazy[t];if(!u)return;let f=Bv.get(l);f||(f={},Bv.set(l,f));let h=f[t];if(h)return h;let p=(async()=>{let m=a_(t),g=l[t]!==void 0&&t!=="hasErrorBoundary";if(m)At(!m,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),f[t]=Promise.resolve();else if(g)At(!1,`Route "${l.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let b=await u();b!=null&&(Object.assign(l,{[t]:b}),Object.assign(l,o(l)))}typeof l.lazy=="object"&&(l.lazy[t]=void 0,Object.values(l.lazy).every(b=>b===void 0)&&(l.lazy=void 0))})();return f[t]=p,p},Pv=new WeakMap;function V_(t,a,r,o,l){let u=r[t.id];if(Pe(u,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let y=Pv.get(u);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let g=(async()=>{Pe(typeof t.lazy=="function","No lazy route function found");let b=await t.lazy(),w={};for(let E in b){let R=b[E];if(R===void 0)continue;let T=r_(E),z=u[E]!==void 0&&E!=="hasErrorBoundary";T?At(!T,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):z?At(!z,`Route "${u.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):w[E]=R}Object.assign(u,w),Object.assign(u,{...o(u),lazy:void 0})})();return Pv.set(u,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let f=Object.keys(t.lazy),h=[],p;for(let y of f){if(l&&l.includes(y))continue;let g=Mx({key:y,route:t,manifest:r,mapRouteProperties:o});g&&(h.push(g),y===a&&(p=g))}let m=h.length>0?Promise.all(h).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Vv(t){let a=t.matches.filter(l=>l.shouldLoad),r={};return(await Promise.all(a.map(l=>l.resolve()))).forEach((l,u)=>{r[a[u].route.id]=l}),r}async function q_(t){return t.matches.some(a=>a.route.middleware)?Lx(t,()=>Vv(t)):Vv(t)}function Lx(t,a){return F_(t,a,o=>{if(nD(o))throw o;return o},J_,r);function r(o,l,u){if(u)return Promise.resolve(Object.assign(u.value,{[l]:{type:"error",result:o}}));{let{matches:f}=t,h=Math.min(Math.max(f.findIndex(m=>m.route.id===l),0),Math.max(f.findIndex(m=>m.shouldCallHandler()),0)),p=wi(f,f[h].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:o}})}}}async function F_(t,a,r,o,l){let{matches:u,...f}=t,h=u.flatMap(m=>m.route.middleware?m.route.middleware.map(y=>[m.route.id,y]):[]);return await zx(f,h,a,r,o,l)}async function zx(t,a,r,o,l,u,f=0){let{request:h}=t;if(h.signal.aborted)throw h.signal.reason??new Error(`Request aborted: ${h.method} ${h.url}`);let p=a[f];if(!p)return await r();let[m,y]=p,g,b=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await zx(t,a,r,o,l,u,f+1)},g.value}catch(w){return g={value:await u(w,m,g)},g.value}};try{let w=await y(t,b),E=w!=null?o(w):void 0;return l(E)?E:g?E??g.value:(g={value:await b()},g.value)}catch(w){return await u(w,m,g)}}function jx(t,a,r,o,l){let u=Mx({key:"middleware",route:o.route,manifest:a,mapRouteProperties:t}),f=V_(o.route,Wt(r.method)?"action":"loader",a,t,l);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function Dd(t,a,r,o,l,u,f,h,p,m=null,y){let g=!1,b=jx(t,a,r,u,f);return{...u,_lazyPromises:b,shouldLoad:p,shouldRevalidateArgs:m,shouldCallHandler(w){return g=!0,m?typeof y=="boolean"?rs(u,{...m,defaultShouldRevalidate:y}):typeof w=="boolean"?rs(u,{...m,defaultShouldRevalidate:w}):rs(u,m):p},resolve(w){let{lazy:E,loader:R,middleware:T}=u.route,M=g||p||w&&!Wt(r.method)&&(E||R),z=T&&T.length>0&&!R&&!E;return M&&(Wt(r.method)||!z)?$_({request:r,path:o,unstable_pattern:l,match:u,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:w,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function Ir(t,a,r,o,l,u,f,h,p=null){return l.map(m=>m.route.id!==u.route.id?{...m,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:jx(t,a,r,m,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Dd(t,a,r,o,vs(l),m,f,h,!0,p))}async function Y_(t,a,r,o,l,u,f){o.some(y=>y._lazyPromises?.middleware)&&await Promise.all(o.map(y=>y._lazyPromises?.middleware));let h={request:a,unstable_url:Ux(a,r),unstable_pattern:vs(o),params:o[0].params,context:u,matches:o},m=await t({...h,fetcherKey:l,runClientMiddleware:y=>{let g=h;return Lx(g,()=>y({...g,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return m}async function $_({request:t,path:a,unstable_pattern:r,match:o,lazyHandlerPromise:l,lazyRoutePromise:u,handlerOverride:f,scopedContext:h}){let p,m,y=Wt(t.method),g=y?"action":"loader",b=w=>{let E,R=new Promise((z,k)=>E=k);m=()=>E(),t.signal.addEventListener("abort",m);let T=z=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${o.route.id}]`)):w({request:t,unstable_url:Ux(t,a),unstable_pattern:r,params:o.params,context:h},...z!==void 0?[z]:[]),M=(async()=>{try{return{type:"data",result:await(f?f(k=>T(k)):T())}}catch(z){return{type:"error",result:z}}})();return Promise.race([M,R])};try{let w=y?o.route.action:o.route.loader;if(l||u)if(w){let E,[R]=await Promise.all([b(w).catch(T=>{E=T}),l,u]);if(E!==void 0)throw E;p=R}else{await l;let E=y?o.route.action:o.route.loader;if(E)[p]=await Promise.all([b(E),u]);else if(g==="action"){let R=new URL(t.url),T=R.pathname+R.search;throw Hn(405,{method:t.method,pathname:T,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(w)p=await b(w);else{let E=new URL(t.url),R=E.pathname+E.search;throw Hn(404,{pathname:R})}}catch(w){return{type:"error",result:w}}finally{m&&t.signal.removeEventListener("abort",m)}return p}async function G_(t){let a=t.headers.get("Content-Type");return a&&/\bapplication\/json\b/.test(a)?t.body==null?null:t.json():t.text()}async function K_(t){let{result:a,type:r}=t;if(rh(a)){let o;try{o=await G_(a)}catch(l){return{type:"error",error:l}}return r==="error"?{type:"error",error:new ys(a.status,a.statusText,o),statusCode:a.status,headers:a.headers}:{type:"data",data:o,statusCode:a.status,headers:a.headers}}return r==="error"?Xv(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:Z_(a),statusCode:hs(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:hs(a)?a.status:void 0}:Xv(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function X_(t,a,r,o,l){let u=t.headers.get("Location");if(Pe(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!th(u)){let f=o.slice(0,o.findIndex(h=>h.route.id===r)+1);u=_d(new URL(a.url),f,l,u),t.headers.set("Location",u)}return t}var qv=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Fv(t,a,r,o){if(th(t)){let l=t,u=l.startsWith("//")?new URL(a.protocol+l):new URL(l);if(qv.includes(u.protocol))throw new Error("Invalid redirect location");let f=Pn(u.pathname,r)!=null;if(u.origin===a.origin&&f)return ah(u.pathname)+u.search+u.hash}try{let l=o.createURL(t);if(qv.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Gr(t,a,r,o){let l=t.createURL(kx(a)).toString(),u={signal:r};if(o&&Wt(o.formMethod)){let{formMethod:f,formEncType:h}=o;u.method=f.toUpperCase(),h==="application/json"?(u.headers=new Headers({"Content-Type":h}),u.body=JSON.stringify(o.json)):h==="text/plain"?u.body=o.text:h==="application/x-www-form-urlencoded"&&o.formData?u.body=Nd(o.formData):u.body=o.formData}return new Request(l,u)}function Ux(t,a){let r=new URL(t.url),o=typeof a=="string"?ya(a):a;if(r.pathname=o.pathname||"/",o.search){let l=new URLSearchParams(o.search),u=l.getAll("index");l.delete("index");for(let f of u.filter(Boolean))l.append("index",f);r.search=l.size?`?${l.toString()}`:""}else r.search="";return r.hash=o.hash||"",r}function Nd(t){let a=new URLSearchParams;for(let[r,o]of t.entries())a.append(r,typeof o=="string"?o:o.name);return a}function Yv(t){let a=new FormData;for(let[r,o]of t.entries())a.append(r,o);return a}function Q_(t,a,r,o=!1,l=!1){let u={},f=null,h,p=!1,m={},y=r&&Rn(r[1])?r[1].error:void 0;return t.forEach(g=>{if(!(g.route.id in a))return;let b=g.route.id,w=a[b];if(Pe(!tr(w),"Cannot handle redirect results in processLoaderData"),Rn(w)){let E=w.error;if(y!==void 0&&(E=y,y=void 0),f=f||{},l)f[b]=E;else{let R=wi(t,b);f[R.route.id]==null&&(f[R.route.id]=E)}o||(u[b]=_x),p||(p=!0,h=hs(w.error)?w.error.status:500),w.headers&&(m[b]=w.headers)}else u[b]=w.data,w.statusCode&&w.statusCode!==200&&!p&&(h=w.statusCode),w.headers&&(m[b]=w.headers)}),y!==void 0&&r&&(f={[r[0]]:y},r[2]&&(u[r[2]]=void 0)),{loaderData:u,errors:f,statusCode:h||200,loaderHeaders:m}}function $v(t,a,r,o,l,u){let{loaderData:f,errors:h}=Q_(a,r,o);return l.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:y,controller:g}=p;if(g&&g.signal.aborted)return;let b=u[m];if(Pe(b,"Did not find corresponding fetcher result"),Rn(b)){let w=wi(t.matches,y?.route.id);h&&h[w.route.id]||(h={...h,[w.route.id]:b.error}),t.fetchers.delete(m)}else if(tr(b))Pe(!1,"Unhandled fetcher revalidation redirect");else{let w=Ba(b.data);t.fetchers.set(m,w)}}),{loaderData:f,errors:h}}function Gv(t,a,r,o){let l=Object.entries(a).filter(([,u])=>u!==_x).reduce((u,[f,h])=>(u[f]=h,u),{});for(let u of r){let f=u.route.id;if(!a.hasOwnProperty(f)&&t.hasOwnProperty(f)&&u.route.loader&&(l[f]=t[f]),o&&o.hasOwnProperty(f))break}return l}function Kv(t){return t?Rn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function wi(t,a){return(a?t.slice(0,t.findIndex(o=>o.route.id===a)+1):[...t]).reverse().find(o=>o.route.hasErrorBoundary===!0)||t[0]}function Gl(t){let a=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function Hn(t,{pathname:a,routeId:r,method:o,type:l,message:u}={}){let f="Unknown Server Error",h="Unknown @remix-run/router error";return t===400?(f="Bad Request",o&&a&&r?h=`You made a ${o} request to "${a}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:l==="invalid-body"&&(h="Unable to encode submission body")):t===403?(f="Forbidden",h=`Route "${r}" does not match URL "${a}"`):t===404?(f="Not Found",h=`No route matches URL "${a}"`):t===405&&(f="Method Not Allowed",o&&a&&r?h=`You made a ${o.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:o&&(h=`Invalid request method "${o.toUpperCase()}"`)),new ys(t||500,f,new Error(h),!0)}function Kl(t){let a=Object.entries(t);for(let r=a.length-1;r>=0;r--){let[o,l]=a[r];if(tr(l))return{key:o,result:l}}}function kx(t){let a=typeof t=="string"?ya(t):t;return pa({...a,hash:""})}function I_(t,a){return t.pathname!==a.pathname||t.search!==a.search?!1:t.hash===""?a.hash!=="":t.hash===a.hash?!0:a.hash!==""}function Z_(t){return new ys(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function J_(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([a,r])=>typeof a=="string"&&W_(r))}function W_(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function eD(t){return rh(t.result)&&Ox.has(t.result.status)}function Rn(t){return t.type==="error"}function tr(t){return(t&&t.type)==="redirect"}function Xv(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function rh(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function tD(t){return Ox.has(t)}function nD(t){return rh(t)&&tD(t.status)&&t.headers.has("Location")}function aD(t){return L_.has(t.toUpperCase())}function Wt(t){return N_.has(t.toUpperCase())}function oh(t){return new URLSearchParams(t).getAll("index").some(a=>a==="")}function Jl(t,a){let r=typeof a=="string"?ya(a).search:a.search;if(t[t.length-1].route.index&&oh(r||""))return t[t.length-1];let o=Sx(t);return o[o.length-1]}function Qv(t){let{formMethod:a,formAction:r,formEncType:o,text:l,formData:u,json:f}=t;if(!(!a||!r||!o)){if(l!=null)return{formMethod:a,formAction:r,formEncType:o,formData:void 0,json:void 0,text:l};if(u!=null)return{formMethod:a,formAction:r,formEncType:o,formData:u,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:r,formEncType:o,formData:void 0,json:f,text:void 0}}}function rd(t,a){return a?{state:"loading",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function iD(t,a){return{state:"submitting",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Jo(t,a){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function rD(t,a){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a?a.data:void 0}}function Ba(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function oD(t,a){try{let r=t.sessionStorage.getItem(Ax);if(r){let o=JSON.parse(r);for(let[l,u]of Object.entries(o||{}))u&&Array.isArray(u)&&a.set(l,new Set(u||[]))}}catch{}}function sD(t,a){if(a.size>0){let r={};for(let[o,l]of a)r[o]=[...l];try{t.sessionStorage.setItem(Ax,JSON.stringify(r))}catch(o){At(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Iv(){let t,a,r=new Promise((o,l)=>{t=async u=>{o(u);try{await r}catch{}},a=async u=>{l(u);try{await r}catch{}}});return{promise:r,resolve:t,reject:a}}var or=S.createContext(null);or.displayName="DataRouter";var bs=S.createContext(null);bs.displayName="DataRouterState";var Hx=S.createContext(!1);function Bx(){return S.useContext(Hx)}var sh=S.createContext({isTransitioning:!1});sh.displayName="ViewTransition";var Px=S.createContext(new Map);Px.displayName="Fetchers";var lD=S.createContext(null);lD.displayName="Await";var Vn=S.createContext(null);Vn.displayName="Navigation";var Ou=S.createContext(null);Ou.displayName="Location";var Fa=S.createContext({outlet:null,matches:[],isDataRoute:!1});Fa.displayName="Route";var lh=S.createContext(null);lh.displayName="RouteError";var Vx="REACT_ROUTER_ERROR",uD="REDIRECT",cD="ROUTE_ERROR_RESPONSE";function fD(t){if(t.startsWith(`${Vx}:${uD}:{`))try{let a=JSON.parse(t.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function dD(t){if(t.startsWith(`${Vx}:${cD}:{`))try{let a=JSON.parse(t.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new ys(a.status,a.statusText,a.data)}catch{}}function hD(t,{relative:a}={}){Pe(xs(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:o}=S.useContext(Vn),{hash:l,pathname:u,search:f}=ws(t,{relative:a}),h=u;return r!=="/"&&(h=u==="/"?r:Bn([r,u])),o.createHref({pathname:h,search:f,hash:l})}function xs(){return S.useContext(Ou)!=null}function va(){return Pe(xs(),"useLocation() may be used only in the context of a component."),S.useContext(Ou).location}var qx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fx(t){S.useContext(Vn).static||S.useLayoutEffect(t)}function mD(){let{isDataRoute:t}=S.useContext(Fa);return t?OD():pD()}function pD(){Pe(xs(),"useNavigate() may be used only in the context of a component.");let t=S.useContext(or),{basename:a,navigator:r}=S.useContext(Vn),{matches:o}=S.useContext(Fa),{pathname:l}=va(),u=JSON.stringify(nh(o)),f=S.useRef(!1);return Fx(()=>{f.current=!0}),S.useCallback((p,m={})=>{if(At(f.current,qx),!f.current)return;if(typeof p=="number"){r.go(p);return}let y=Cu(p,JSON.parse(u),l,m.relative==="path");t==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:Bn([a,y.pathname])),(m.replace?r.replace:r.push)(y,m.state,m)},[a,r,u,l,t])}S.createContext(null);function ws(t,{relative:a}={}){let{matches:r}=S.useContext(Fa),{pathname:o}=va(),l=JSON.stringify(nh(r));return S.useMemo(()=>Cu(t,JSON.parse(l),o,a==="path"),[t,l,o,a])}function gD(t,a,r){Pe(xs(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=S.useContext(Vn),{matches:l}=S.useContext(Fa),u=l[l.length-1],f=u?u.params:{},h=u?u.pathname:"/",p=u?u.pathnameBase:"/",m=u&&u.route;{let T=m&&m.path||"";$x(h,!m||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${h}" (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 y=va(),g;g=y;let b=g.pathname||"/",w=b;if(p!=="/"){let T=p.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(T.length).join("/")}let E=xi(t,{pathname:w});return At(m||E!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),At(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.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.`),wD(E&&E.map(T=>Object.assign({},T,{params:Object.assign({},f,T.params),pathname:Bn([p,o.encodeLocation?o.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?p:Bn([p,o.encodeLocation?o.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),l,r)}function yD(){let t=CD(),a=hs(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),r?S.createElement("pre",{style:l},r):null,f)}var vD=S.createElement(yD,null),Yx=class extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){this.props.onError?this.props.onError(t,a):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=dD(t.digest);r&&(t=r)}let a=t!==void 0?S.createElement(Fa.Provider,{value:this.props.routeContext},S.createElement(lh.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?S.createElement(bD,{error:t},a):a}};Yx.contextType=Hx;var od=new WeakMap;function bD({children:t,error:a}){let{basename:r}=S.useContext(Vn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=fD(a.digest);if(o){let l=od.get(a);if(l)throw l;let u=Tx(o.location,r);if(Ex&&!od.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw od.set(a,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return t}function xD({routeContext:t,match:a,children:r}){let o=S.useContext(or);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Fa.Provider,{value:t},r)}function wD(t,a=[],r){let o=r?.state;if(t==null){if(!o)return null;if(o.errors)t=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)t=o.matches;else return null}let l=t,u=o?.errors;if(u!=null){let y=l.findIndex(g=>g.route.id&&u?.[g.route.id]!==void 0);Pe(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),l=l.slice(0,Math.min(l.length,y+1))}let f=!1,h=-1;if(r&&o){f=o.renderFallback;for(let y=0;y=0?l=l.slice(0,h+1):l=[l[0]];break}}}}let p=r?.onError,m=o&&p?(y,g)=>{p(y,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:vs(o.matches),errorInfo:g})}:void 0;return l.reduceRight((y,g,b)=>{let w,E=!1,R=null,T=null;o&&(w=u&&g.route.id?u[g.route.id]:void 0,R=g.route.errorElement||vD,f&&(h<0&&b===0?($x("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,T=null):h===b&&(E=!0,T=g.route.hydrateFallbackElement||null)));let M=a.concat(l.slice(0,b+1)),z=()=>{let k;return w?k=R:E?k=T:g.route.Component?k=S.createElement(g.route.Component,null):g.route.element?k=g.route.element:k=y,S.createElement(xD,{match:g,routeContext:{outlet:y,matches:M,isDataRoute:o!=null},children:k})};return o&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?S.createElement(Yx,{location:o.location,revalidation:o.revalidation,component:R,error:w,children:z(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:m}):z()},null)}function uh(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function SD(t){let a=S.useContext(or);return Pe(a,uh(t)),a}function ED(t){let a=S.useContext(bs);return Pe(a,uh(t)),a}function TD(t){let a=S.useContext(Fa);return Pe(a,uh(t)),a}function ch(t){let a=TD(t),r=a.matches[a.matches.length-1];return Pe(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function RD(){return ch("useRouteId")}function CD(){let t=S.useContext(lh),a=ED("useRouteError"),r=ch("useRouteError");return t!==void 0?t:a.errors?.[r]}function OD(){let{router:t}=SD("useNavigate"),a=ch("useNavigate"),r=S.useRef(!1);return Fx(()=>{r.current=!0}),S.useCallback(async(l,u={})=>{At(r.current,qx),r.current&&(typeof l=="number"?await t.navigate(l):await t.navigate(l,{fromRouteId:a,...u}))},[t,a])}var Zv={};function $x(t,a,r){!a&&!Zv[t]&&(Zv[t]=!0,At(!1,r))}var Jv={};function Wv(t,a){!t&&!Jv[a]&&(Jv[a]=!0,console.warn(a))}var AD="useOptimistic",e0=Ld[AD],_D=()=>{};function DD(t){return e0?e0(t):[t,_D]}function ND(t){let a={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&At(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:S.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&At(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:S.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&At(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:S.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),a}var MD=["HydrateFallback","hydrateFallbackElement"],LD=class{constructor(){this.status="pending",this.promise=new Promise((t,a)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",a(r))}})}};function zD({router:t,flushSync:a,onError:r,unstable_useTransitions:o}){o=Bx()||o;let[u,f]=S.useState(t.state),[h,p]=DD(u),[m,y]=S.useState(),[g,b]=S.useState({isTransitioning:!1}),[w,E]=S.useState(),[R,T]=S.useState(),[M,z]=S.useState(),k=S.useRef(new Map),V=S.useCallback((ne,{deletedFetchers:ce,newErrors:ve,flushSync:he,viewTransitionOpts:fe})=>{ve&&r&&Object.values(ve).forEach(re=>r(re,{location:ne.location,params:ne.matches[0]?.params??{},unstable_pattern:vs(ne.matches)})),ne.fetchers.forEach((re,D)=>{re.data!==void 0&&k.current.set(D,re.data)}),ce.forEach(re=>k.current.delete(re)),Wv(he===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ae=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(Wv(fe==null||ae,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!fe||!ae){a&&he?a(()=>f(ne)):o===!1?f(ne):S.startTransition(()=>{o===!0&&p(re=>t0(re,ne)),f(ne)});return}if(a&&he){a(()=>{R&&(w?.resolve(),R.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:fe.currentLocation,nextLocation:fe.nextLocation})});let re=t.window.document.startViewTransition(()=>{a(()=>f(ne))});re.finished.finally(()=>{a(()=>{E(void 0),T(void 0),y(void 0),b({isTransitioning:!1})})}),a(()=>T(re));return}R?(w?.resolve(),R.skipTransition(),z({state:ne,currentLocation:fe.currentLocation,nextLocation:fe.nextLocation})):(y(ne),b({isTransitioning:!0,flushSync:!1,currentLocation:fe.currentLocation,nextLocation:fe.nextLocation}))},[t.window,a,R,w,o,p,r]);S.useLayoutEffect(()=>t.subscribe(V),[t,V]);let Q=h.initialized;S.useLayoutEffect(()=>{!Q&&t.state.initialized&&V(t.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[Q,V,t.state]),S.useEffect(()=>{g.isTransitioning&&!g.flushSync&&E(new LD)},[g]),S.useEffect(()=>{if(w&&m&&t.window){let ne=m,ce=w.promise,ve=t.window.document.startViewTransition(async()=>{o===!1?f(ne):S.startTransition(()=>{o===!0&&p(he=>t0(he,ne)),f(ne)}),await ce});ve.finished.finally(()=>{E(void 0),T(void 0),y(void 0),b({isTransitioning:!1})}),T(ve)}},[m,w,t.window,o,p]),S.useEffect(()=>{w&&m&&h.location.key===m.location.key&&w.resolve()},[w,R,h.location,m]),S.useEffect(()=>{!g.isTransitioning&&M&&(y(M.state),b({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}),z(void 0))},[g.isTransitioning,M]);let X=S.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:ne=>t.navigate(ne),push:(ne,ce,ve)=>t.navigate(ne,{state:ce,preventScrollReset:ve?.preventScrollReset}),replace:(ne,ce,ve)=>t.navigate(ne,{replace:!0,state:ce,preventScrollReset:ve?.preventScrollReset})}),[t]),$=t.basename||"/",A=S.useMemo(()=>({router:t,navigator:X,static:!1,basename:$,onError:r}),[t,X,$,r]);return S.createElement(S.Fragment,null,S.createElement(or.Provider,{value:A},S.createElement(bs.Provider,{value:h},S.createElement(Px.Provider,{value:k.current},S.createElement(sh.Provider,{value:g},S.createElement(kD,{basename:$,location:h.location,navigationType:h.historyAction,navigator:X,unstable_useTransitions:o},S.createElement(jD,{routes:t.routes,future:t.future,state:h,isStatic:!1,onError:r})))))),null)}function t0(t,a){return{...t,navigation:a.navigation.state!=="idle"?a.navigation:t.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:t.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:t.actionData,fetchers:a.fetchers}}var jD=S.memo(UD);function UD({routes:t,future:a,state:r,isStatic:o,onError:l}){return gD(t,void 0,{state:r,isStatic:o,onError:l})}function kD({basename:t="/",children:a=null,location:r,navigationType:o="POP",navigator:l,static:u=!1,unstable_useTransitions:f}){Pe(!xs(),"You cannot render a inside another . You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:h,navigator:l,static:u,unstable_useTransitions:f,future:{}}),[h,l,u,f]);typeof r=="string"&&(r=ya(r));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:w="default",unstable_mask:E}=r,R=S.useMemo(()=>{let T=Pn(m,h);return T==null?null:{location:{pathname:T,search:y,hash:g,state:b,key:w,unstable_mask:E},navigationType:o}},[h,m,y,g,b,w,o,E]);return At(R!=null,` is not able to match the URL "${m}${y}${g}" because it does not start with the basename, so the won't render anything.`),R==null?null:S.createElement(Vn.Provider,{value:p},S.createElement(Ou.Provider,{children:a,value:R}))}var Wl="get",eu="application/x-www-form-urlencoded";function Au(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function HD(t){return Au(t)&&t.tagName.toLowerCase()==="button"}function BD(t){return Au(t)&&t.tagName.toLowerCase()==="form"}function PD(t){return Au(t)&&t.tagName.toLowerCase()==="input"}function VD(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function qD(t,a){return t.button===0&&(!a||a==="_self")&&!VD(t)}var Xl=null;function FD(){if(Xl===null)try{new FormData(document.createElement("form"),0),Xl=!1}catch{Xl=!0}return Xl}var YD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sd(t){return t!=null&&!YD.has(t)?(At(!1,`"${t}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${eu}"`),null):t}function $D(t,a){let r,o,l,u,f;if(BD(t)){let h=t.getAttribute("action");o=h?Pn(h,a):null,r=t.getAttribute("method")||Wl,l=sd(t.getAttribute("enctype"))||eu,u=new FormData(t)}else if(HD(t)||PD(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a