PageSourceSearch

https://tourdebaltics.lovable.app/assets/index-yZazw4NL.js

js tourdebaltics.lovable.app collected 2026-10-03 03:50:19 UTC 662,004 bytes, 284 lines download raw bytes

vendor: 2,025 bytes, lines 1-9
1var Hf=t=>{throw TypeError(t)};var $u=(t,e,n)=>e.has(t)||Hf("Cannot "+n);var R=(t,e,n)=>($u(t,e,"read from private field"),n?n.call(t):e.get(t)),se=(t,e,n)=>e.has(t)?Hf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Y=(t,e,n,r)=>($u(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Be=(t,e,n)=>($u(t,e,"access private method"),n);var ia=(t,e,n,r)=>({set _(s){Y(t,e,s,n)},get _(){return R(t,e,r)}});function zx(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Qg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yg={exports:{}},Gl={},Xg={exports:{}},te={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Ho=Symbol.for("react.element"),Vx=Symbol.for("react.portal"),Hx=Symbol.for("react.fragment"),Wx=Symbol.for("react.strict_mode"),K
vendor: 8,192 bytes, lines 9-25
9x=Symbol.for("react.profiler"),qx=Symbol.for("react.provider"),Gx=Symbol.for("react.context"),Jx=Symbol.for("react.forward_ref"),Qx=Symbol.for("react.suspense"),Yx=Symbol.for("react.memo"),Xx=Symbol.for("react.lazy"),Wf=Symbol.iterator;function Zx(t){return t===null||typeof t!="object"?null:(t=Wf&&t[Wf]||t["@@iterator"],typeof t=="function"?t:null)}var Zg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ev=Object.assign,tv={};function vi(t,e,n){this.props=t,this.context=e,this.refs=tv,this.updater=n||Zg}vi.prototype.isReactComponent={};vi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};vi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function nv(){}nv.prototype=vi.prototype;function ch(t,e,n){this.props=t,this.context=e,this.refs=tv,this.updater=n||Zg}var dh=ch.prototype=new nv;dh.constructor=ch;ev(dh,vi.prototype);dh.isPureReactComponent=!0;var Kf=Array.isArray,rv=Object.prototype.hasOwnProperty,hh={current:null},sv={key:!0,ref:!0,__self:!0,__source:!0};function iv(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)rv.call(e,r)&&!sv.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Ho,type:t,key:i,ref:o,props:s,_owner:hh.current}}function eS(t,e){return{$$typeof:Ho,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function fh(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ho}function tS(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var qf=/\/+/g;function Du(t,e){return typeof t=="object"&&t!==null&&t.key!=null?tS(""+t.key):e.toString(36)}function Ba(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Ho:case Vx:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+Du(o,0):r,Kf(s)?(n="",t!=null&&(n=t.replace(qf,"$&/")+"/"),Ba(s,e,n,"",function(u){return u})):s!=null&&(fh(s)&&(s=eS(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(qf,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",Kf(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+Du(i,a);o+=Ba(i,e,n,l,s)}else if(l=Zx(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+Du(i,a++),o+=Ba(i,e,n,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function oa(t,e,n){if(t==null)return t;var r=[],s=0;return Ba(t,r,"","",function(i){return e.call(n,i,s++)}),r}function nS(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Xe={current:null},za={transition:null},rS={ReactCurrentDispatcher:Xe,ReactCurrentBatchConfig:za,ReactCurrentOwner:hh};function ov(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:oa,forEach:function(t,e,n){oa(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return oa(t,function(){e++}),e},toArray:function(t){return oa(t,function(e){return e})||[]},only:function(t){if(!fh(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};te.Component=vi;te.Fragment=Hx;te.Profiler=Kx;te.PureComponent=ch;te.StrictMode=Wx;te.Suspense=Qx;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rS;te.act=ov;te.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=ev({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=hh.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)rv.call(e,l)&&!sv.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Ho,type:t.type,key:s,ref:i,props:r,_owner:o}};te.createContext=function(t){return t={$$typeof:Gx,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:qx,_context:t},t.Consumer=t};te.createElement=iv;te.createFactory=function(t){var e=iv.bind(null,t);return e.type=t,e};te.createRef=function(){return{current:null}};te.forwardRef=function(t){return{$$typeof:Jx,render:t}};te.isValidElement=fh;te.lazy=function(t){return{$$typeof:Xx,_payload:{_status:-1,_result:t},_init:nS}};te.memo=function(t,e){return{$$typeof:Yx,type:t,compare:e===void 0?null:e}};te.startTransition=function(t){var e=za.transition;za.transition={};try{t()}finally{za.transition=e}};te.unstable_act=ov;te.useCallback=function(t,e){return Xe.current.useCallback(t,e)};te.useContext=function(t){return Xe.current.useContext(t)};te.useDebugValue=function(){};te.useDeferredValue=function(t){return Xe.current.useDeferredValue(t)};te.useEffect=function(t,e){return Xe.current.useEffect(t,e)};te.useId=function(){return Xe.current.useId()};te.useImperativeHandle=function(t,e,n){return Xe.current.useImperativeHandle(t,e,n)};te.useInsertionEffect=function(t,e){return Xe.current.useInsertionEffect(t,e)};te.useLayoutEffect=function(t,e){return Xe.current.useLayoutEffect(t,e)};te.useMemo=function(t,e){return Xe.current.useMemo(t,e)};te.useReducer=function(t,e,n){return Xe.current.useReducer(t,e,n)};te.useRef=function(t){return Xe.current.useRef(t)};te.useState=function(t){return Xe.current.useState(t)};te.useSyncExternalStore=function(t,e,n){return Xe.current.useSyncExternalStore(t,e,n)};te.useTransition=function(){return Xe.current.useTransition()};te.version="18.3.1";Xg.exports=te;var y=Xg.exports;const I=Qg(y),ph=zx({__proto__:null,default:I},[y]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var sS=y,iS=Symbol.for("react.element"),oS=Symbol.for("react.fragment"),aS=Object.prototype.hasOwnProperty,lS=sS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uS={key:!0,ref:!0,__self:!0,__source:!0};function av(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)aS.call(e,r)&&!uS.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:iS,type:t,key:i,ref:o,props:s,_owner:lS.current}}Gl.Fragment=oS;Gl.jsx=av;Gl.jsxs=av;Yg.exports=Gl;var p=Yg.exports,lv={exports:{}},bt={},uv={exports:{}},cv={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e(T,P){var M=T.length;T.push(P);e:for(;0<M;){var W=M-1>>>1,z=T[W];if(0<s(z,P))T[W]=P,T[M]=z,M=W;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var P=T[0],M=T.pop();if(M!==P){T[0]=M;e:for(var W=0,z=T.length,J=z>>>1;W<J;){var Z=2*(W+1)-1,ge=T[Z],Ue=Z+1,ie=T[Ue];if(0>s(ge,M))Ue<z&&0>s(ie,ge)?(T[W]=ie,T[Ue]=M,W=Ue):(T[W]=ge,T[Z]=M,W=Z);else if(Ue<z&&0>s(ie,M))T[W]=ie,T[Ue]=M,W=Ue;else break e}}return P}function s(T,P){var M=T.sortIndex-P.sortIndex;
vendor: 10,112 bytes, lines 25-34
25return M!==0?M:T.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,c=null,f=3,h=!1,g=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(T){for(var P=n(u);P!==null;){if(P.callback===null)r(u);else if(P.startTime<=T)r(u),P.sortIndex=P.expirationTime,e(l,P);else break;P=n(u)}}function S(T){if(m=!1,b(T),!g)if(n(l)!==null)g=!0,D(k);else{var P=n(u);P!==null&&H(S,P.startTime-T)}}function k(T,P){g=!1,m&&(m=!1,w(C),C=-1),h=!0;var M=f;try{for(b(P),c=n(l);c!==null&&(!(c.expirationTime>P)||T&&!B());){var W=c.callback;if(typeof W=="function"){c.callback=null,f=c.priorityLevel;var z=W(c.expirationTime<=P);P=t.unstable_now(),typeof z=="function"?c.callback=z:c===n(l)&&r(l),b(P)}else r(l);c=n(l)}if(c!==null)var J=!0;else{var Z=n(u);Z!==null&&H(S,Z.startTime-P),J=!1}return J}finally{c=null,f=M,h=!1}}var _=!1,E=null,C=-1,N=5,j=-1;function B(){return!(t.unstable_now()-j<N)}function A(){if(E!==null){var T=t.unstable_now();j=T;var P=!0;try{P=E(!0,T)}finally{P?$():(_=!1,E=null)}}else _=!1}var $;if(typeof v=="function")$=function(){v(A)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,V=O.port2;O.port1.onmessage=A,$=function(){V.postMessage(null)}}else $=function(){x(A,0)};function D(T){E=T,_||(_=!0,$())}function H(T,P){C=x(function(){T(t.unstable_now())},P)}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(T){T.callback=null},t.unstable_continueExecution=function(){g||h||(g=!0,D(k))},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(T){switch(f){case 1:case 2:case 3:var P=3;break;default:P=f}var M=f;f=P;try{return T()}finally{f=M}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(T,P){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var M=f;f=T;try{return P()}finally{f=M}},t.unstable_scheduleCallback=function(T,P,M){var W=t.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?W+M:W):M=W,T){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=M+z,T={id:d++,callback:P,priorityLevel:T,startTime:M,expirationTime:z,sortIndex:-1},M>W?(T.sortIndex=M,e(u,T),n(l)===null&&T===n(u)&&(m?(w(C),C=-1):m=!0,H(S,M-W))):(T.sortIndex=z,e(l,T),g||h||(g=!0,D(k))),T},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(T){var P=f;return function(){var M=f;f=P;try{return T.apply(this,arguments)}finally{f=M}}}})(cv);uv.exports=cv;var cS=uv.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var dS=y,wt=cS;function L(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var dv=new Set,uo={};function ns(t,e){oi(t,e),oi(t+"Capture",e)}function oi(t,e){for(uo[t]=e,t=0;t<e.length;t++)dv.add(e[t])}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ic=Object.prototype.hasOwnProperty,hS=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gf={},Jf={};function fS(t){return Ic.call(Jf,t)?!0:Ic.call(Gf,t)?!1:hS.test(t)?Jf[t]=!0:(Gf[t]=!0,!1)}function pS(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function mS(t,e,n,r){if(e===null||typeof e>"u"||pS(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ze(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var Fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Fe[t]=new Ze(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Fe[e]=new Ze(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Fe[t]=new Ze(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Fe[t]=new Ze(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Fe[t]=new Ze(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Fe[t]=new Ze(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Fe[t]=new Ze(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Fe[t]=new Ze(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Fe[t]=new Ze(t,5,!1,t.toLowerCase(),null,!1,!1)});var mh=/[\-:]([a-z])/g;function gh(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(mh,gh);Fe[e]=new Ze(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(mh,gh);Fe[e]=new Ze(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(mh,gh);Fe[e]=new Ze(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Fe[t]=new Ze(t,1,!1,t.toLowerCase(),null,!1,!1)});Fe.xlinkHref=new Ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Fe[t]=new Ze(t,1,!1,t.toLowerCase(),null,!0,!0)});function vh(t,e,n,r){var s=Fe.hasOwnProperty(e)?Fe[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(mS(e,n,s,r)&&(n=null),r||s===null?fS(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Ln=dS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,aa=Symbol.for("react.element"),Ts=Symbol.for("react.portal"),Rs=Symbol.for("react.fragment"),yh=Symbol.for("react.strict_mode"),$c=Symbol.for("react.profiler"),hv=Symbol.for("react.provider"),fv=Symbol.for("react.context"),wh=Symbol.for("react.forward_ref"),Dc=Symbol.for("react.suspense"),Mc=Symbol.for("react.suspense_list"),bh=Symbol.for("react.memo"),qn=Symbol.for("react.lazy"),pv=Symbol.for("react.offscreen"),Qf=Symbol.iterator;function Ri(t){return t===null||typeof t!="object"?null:(t=Qf&&t[Qf]||t["@@iterator"],typeof t=="function"?t:null)}var we=Object.assign,Mu;function Ui(t){if(Mu===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Mu=e&&e[1]||""}return`
34`+Mu+t}var Fu=!1;function Uu(t,e){if(!t||Fu)return"";Fu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}
vendor: 16,752 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=r.stack.split(`
36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
37`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Fu=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ui(t):""}function gS(t){switch(t.tag){case 5:return Ui(t.type);case 16:return Ui("Lazy");case 13:return Ui("Suspense");case 19:return Ui("SuspenseList");case 0:case 2:case 15:return t=Uu(t.type,!1),t;case 11:return t=Uu(t.type.render,!1),t;case 1:return t=Uu(t.type,!0),t;default:return""}}function Fc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Rs:return"Fragment";case Ts:return"Portal";case $c:return"Profiler";case yh:return"StrictMode";case Dc:return"Suspense";case Mc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case fv:return(t.displayName||"Context")+".Consumer";case hv:return(t._context.displayName||"Context")+".Provider";case wh:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case bh:return e=t.displayName||null,e!==null?e:Fc(t.type)||"Memo";case qn:e=t._payload,t=t._init;try{return Fc(t(e))}catch{}}return null}function vS(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Fc(e);case 8:return e===yh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function vr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function mv(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function yS(t){var e=mv(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function la(t){t._valueTracker||(t._valueTracker=yS(t))}function gv(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=mv(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function al(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Uc(t,e){var n=e.checked;return we({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Yf(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=vr(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function vv(t,e){e=e.checked,e!=null&&vh(t,"checked",e,!1)}function Bc(t,e){vv(t,e);var n=vr(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?zc(t,e.type,n):e.hasOwnProperty("defaultValue")&&zc(t,e.type,vr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Xf(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function zc(t,e,n){(e!=="number"||al(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Bi=Array.isArray;function Us(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+vr(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Vc(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(L(91));return we({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Zf(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(L(92));if(Bi(n)){if(1<n.length)throw Error(L(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:vr(n)}}function yv(t,e){var n=vr(e.value),r=vr(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function ep(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function wv(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Hc(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?wv(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var ua,bv=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(ua=ua||document.createElement("div"),ua.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=ua.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function co(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var qi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wS=["Webkit","ms","Moz","O"];Object.keys(qi).forEach(function(t){wS.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),qi[e]=qi[t]})});function xv(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||qi.hasOwnProperty(t)&&qi[t]?(""+e).trim():e+"px"}function Sv(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=xv(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var bS=we({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wc(t,e){if(e){if(bS[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(L(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(L(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(L(61))}if(e.style!=null&&typeof e.style!="object")throw Error(L(62))}}function Kc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qc=null;function xh(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Gc=null,Bs=null,zs=null;function tp(t){if(t=qo(t)){if(typeof Gc!="function")throw Error(L(280));var e=t.stateNode;e&&(e=Zl(e),Gc(t.stateNode,t.type,e))}}function kv(t){Bs?zs?zs.push(t):zs=[t]:Bs=t}function _v(){if(Bs){var t=Bs,e=zs;if(zs=Bs=null,tp(t),e)for(t=0;t<e.length;t++)tp(e[t])}}function Ev(t,e){return t(e)}function Cv(){}var Bu=!1;function Tv(t,e,n){if(Bu)return t(e,n);Bu=!0;try{return Ev(t,e,n)}finally{Bu=!1,(Bs!==null||zs!==null)&&(Cv(),_v())}}function ho(t,e){var n=t.stateNode;if(n===null)return null;var r=Zl(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(L(231,e,typeof n));return n}var Jc=!1;if(Tn)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){Jc=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{Jc=!1}function xS(t,e,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(d){this.onError(d)}}var Gi=!1,ll=null,ul=!1,Qc=null,SS={onError:function(t){Gi=!0,ll=t}};function kS(t,e,n,r,s,i,o,a,l){Gi=!1,ll=null,xS.apply(SS,arguments)}function _S(t,e,n,r,s,i,o,a,l){if(kS.apply(this,arguments),Gi){if(Gi){var u=ll;Gi=!1,ll=null}else throw Error(L(198));ul||(ul=!0,Qc=u)}}function rs(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Rv(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function np(t){if(rs(t)!==t)throw Error(L(188))}function ES(t){var e=t.alternate;if(!e){if(e=rs(t),e===null)throw Error(L(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return np(s),t;if(i===r)return np(s),e;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?t:e}function jv(t){return t=ES(t),t!==null?Nv(t):null}function Nv(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Nv(t);if(e!==null)return e;t=t.sibling}return null}var Pv=wt.unstable_scheduleCallback,rp=wt.unstable_cancelCallback,CS=wt.unstable_shouldYield,TS=wt.unstable_requestPaint,Ee=wt.unstable_now,RS=wt.unstable_getCurrentPriorityLevel,Sh=wt.unstable_ImmediatePriority,Ov=wt.unstable_UserBlockingPriority,cl=wt.unstable_NormalPriority,jS=wt.unstable_LowPriority,Av=wt.unstable_IdlePriority,Jl=null,cn=null;function NS(t){if(cn&&typeof cn.onCommitFiberRoot=="function")try{cn.onCommitFiberRoot(Jl,t,void 0,(t.current.flags&128)===128)}catch{}}var Ht=Math.clz32?Math.clz32:AS,PS=Math.log,OS=Math.LN2;function AS(t){return t>>>=0,t===0?32:31-(PS(t)/OS|0)|0}var ca=64,da=4194304;function zi(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function dl(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=zi(a):(i&=o,i!==0&&(r=zi(i)))}else o=n&~s,o!==0?r=zi(o):i!==0&&(r=zi(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Ht(e),s=1<<n,r|=t[n],e&=~s;return r}function LS(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function IS(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-Ht(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=LS(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Yc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Lv(){var t=ca;return ca<<=1,!(ca&4194240)&&(ca=64),t}function zu(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Wo(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ht(e),t[e]=n}function $S(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Ht(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function kh(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Ht(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var oe=0;function Iv(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var $v,_h,Dv,Mv,Fv,Xc=!1,ha=[],ar=null,lr=null,ur=null,fo=new Map,po=new Map,Jn=[],DS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function sp(t,e){switch(t){case"focusin":case"focusout":ar=null;break;case"dragenter":case"dragleave":lr=null;break;case"mouseover":case"mouseout":ur=null;break;case"pointerover":case"pointerout":fo.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":po.delete(e.pointerId)}}function Ni(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=qo(e),e!==null&&_h(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function MS(t,e,n,r,s){switch(e){case"focusin":return ar=Ni(ar,t,e,n,r,s),!0;case"dragenter":return lr=Ni(lr,t,e,n,r,s),!0;case"mouseover":return ur=Ni(ur,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return fo.set(i,Ni(fo.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,po.set(i,Ni(po.get(i)||null,t,e,n,r,s)),!0}return!1}function Uv(t){var e=$r(t.target);if(e!==null){var n=rs(e);if(n!==null){if(e=n.tag,e===13){if(e=Rv(n),e!==null){t.blockedOn=e,Fv(t.priority,function(){Dv(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Va(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Zc(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);qc=r,n.target.dispatchEvent(r),qc=null}else return e=qo(n),e!==null&&_h(e),t.blockedOn=n,!1;e.shift()}return!0}function ip(t,e,n){Va(t)&&n.delete(e)}function FS(){Xc=!1,ar!==null&&Va(ar)&&(ar=null),lr!==null&&Va(lr)&&(lr=null),ur!==null&&Va(ur)&&(ur=null),fo.forEach(ip),po.forEac
vendor: 11,826 bytes, line 37
37h(ip)}function Pi(t,e){t.blockedOn===e&&(t.blockedOn=null,Xc||(Xc=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,FS)))}function mo(t){function e(s){return Pi(s,t)}if(0<ha.length){Pi(ha[0],t);for(var n=1;n<ha.length;n++){var r=ha[n];r.blockedOn===t&&(r.blockedOn=null)}}for(ar!==null&&Pi(ar,t),lr!==null&&Pi(lr,t),ur!==null&&Pi(ur,t),fo.forEach(e),po.forEach(e),n=0;n<Jn.length;n++)r=Jn[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Jn.length&&(n=Jn[0],n.blockedOn===null);)Uv(n),n.blockedOn===null&&Jn.shift()}var Vs=Ln.ReactCurrentBatchConfig,hl=!0;function US(t,e,n,r){var s=oe,i=Vs.transition;Vs.transition=null;try{oe=1,Eh(t,e,n,r)}finally{oe=s,Vs.transition=i}}function BS(t,e,n,r){var s=oe,i=Vs.transition;Vs.transition=null;try{oe=4,Eh(t,e,n,r)}finally{oe=s,Vs.transition=i}}function Eh(t,e,n,r){if(hl){var s=Zc(t,e,n,r);if(s===null)Xu(t,e,r,fl,n),sp(t,r);else if(MS(s,t,e,n,r))r.stopPropagation();else if(sp(t,r),e&4&&-1<DS.indexOf(t)){for(;s!==null;){var i=qo(s);if(i!==null&&$v(i),i=Zc(t,e,n,r),i===null&&Xu(t,e,r,fl,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Xu(t,e,r,null,n)}}var fl=null;function Zc(t,e,n,r){if(fl=null,t=xh(r),t=$r(t),t!==null)if(e=rs(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Rv(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return fl=t,null}function Bv(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(RS()){case Sh:return 1;case Ov:return 4;case cl:case jS:return 16;case Av:return 536870912;default:return 16}default:return 16}}var sr=null,Ch=null,Ha=null;function zv(){if(Ha)return Ha;var t,e=Ch,n=e.length,r,s="value"in sr?sr.value:sr.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return Ha=s.slice(t,1<r?1-r:void 0)}function Wa(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function fa(){return!0}function op(){return!1}function xt(t){function e(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?fa:op,this.isPropagationStopped=op,this}return we(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=fa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=fa)},persist:function(){},isPersistent:fa}),e}var yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Th=xt(yi),Ko=we({},yi,{view:0,detail:0}),zS=xt(Ko),Vu,Hu,Oi,Ql=we({},Ko,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rh,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Oi&&(Oi&&t.type==="mousemove"?(Vu=t.screenX-Oi.screenX,Hu=t.screenY-Oi.screenY):Hu=Vu=0,Oi=t),Vu)},movementY:function(t){return"movementY"in t?t.movementY:Hu}}),ap=xt(Ql),VS=we({},Ql,{dataTransfer:0}),HS=xt(VS),WS=we({},Ko,{relatedTarget:0}),Wu=xt(WS),KS=we({},yi,{animationName:0,elapsedTime:0,pseudoElement:0}),qS=xt(KS),GS=we({},yi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),JS=xt(GS),QS=we({},yi,{data:0}),lp=xt(QS),YS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ZS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ek(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=ZS[t])?!!e[t]:!1}function Rh(){return ek}var tk=we({},Ko,{key:function(t){if(t.key){var e=YS[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Wa(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?XS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rh,charCode:function(t){return t.type==="keypress"?Wa(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Wa(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),nk=xt(tk),rk=we({},Ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),up=xt(rk),sk=we({},Ko,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rh}),ik=xt(sk),ok=we({},yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),ak=xt(ok),lk=we({},Ql,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),uk=xt(lk),ck=[9,13,27,32],jh=Tn&&"CompositionEvent"in window,Ji=null;Tn&&"documentMode"in document&&(Ji=document.documentMode);var dk=Tn&&"TextEvent"in window&&!Ji,Vv=Tn&&(!jh||Ji&&8<Ji&&11>=Ji),cp=" ",dp=!1;function Hv(t,e){switch(t){case"keyup":return ck.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wv(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var js=!1;function hk(t,e){switch(t){case"compositionend":return Wv(e);case"keypress":return e.which!==32?null:(dp=!0,cp);case"textInput":return t=e.data,t===cp&&dp?null:t;default:return null}}function fk(t,e){if(js)return t==="compositionend"||!jh&&Hv(t,e)?(t=zv(),Ha=Ch=sr=null,js=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Vv&&e.locale!=="ko"?null:e.data;default:return null}}var pk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hp(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!pk[t.type]:e==="textarea"}function Kv(t,e,n,r){kv(r),e=pl(e,"onChange"),0<e.length&&(n=new Th("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Qi=null,go=null;function mk(t){ry(t,0)}function Yl(t){var e=Os(t);if(gv(e))return t}function gk(t,e){if(t==="change")return e}var qv=!1;if(Tn){var Ku;if(Tn){var qu="oninput"in document;if(!qu){var fp=document.createElement("div");fp.setAttribute("oninput","return;"),qu=typeof fp.oninput=="function"}Ku=qu}else Ku=!1;qv=Ku&&(!document.documentMode||9<document.documentMode)}function pp(){Qi&&(Qi.detachEvent("onpropertychange",Gv),go=Qi=null)}function Gv(t){if(t.propertyName==="value"&&Yl(go)){var e=[];Kv(e,go,t,xh(t)),Tv(mk,e)}}function vk(t,e,n){t==="focusin"?(pp(),Qi=e,go=n,Qi.attachEvent("onpropertychange",Gv)):t==="focusout"&&pp()}function yk(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Yl(go)}function wk(t,e){if(t==="click")return Yl(e)}function bk(t,e){if(t==="input"||t==="change")return Yl(e)}function xk(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Kt=typeof Object.is=="function"?Object.is:xk;function vo(t,e){if(Kt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Ic.call(e,s)||!Kt(t[s],e[s]))return!1}return!0}function mp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function gp(t,e){var n=mp(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=mp(n)}}function Jv(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Jv(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Qv(){for(var t=window,e=al();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=al(t.document)}return e}function Nh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Sk(t){var e=Qv(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Jv(n.ownerDocument.documentElement,n)){if(r!==null&&Nh(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=gp(n,i);var o=gp(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var kk=Tn&&"documentMode"in document&&11>=document.documentMode,Ns=null,ed=null,Yi=null,td=!1;function vp(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;td||Ns==null||Ns!==al(r)||(r=Ns,"selectionStart"in r&&Nh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),Yi&&vo(Yi,r)||(Yi=r,r=pl(ed,"onSelect"),0<r.length&&(e=new Th("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Ns)))}function pa(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Ps={animationend:pa("Animation","AnimationEnd"),animationiteration:pa("Animation","AnimationIteration"),animationstart:pa("Animation","AnimationStart"),transitionend:pa("Transition","TransitionEnd")},Gu={},Yv={};Tn&&(Yv=document.createElement("div").style,"AnimationEvent"in window||(delete Ps.animationend.animation,delete Ps.animationiteration.animation,delete Ps.animationstart.animation),"TransitionEvent"in window||delete Ps.transitionend.transition);function Xl(t){if(Gu[t])return Gu[t];if(!Ps[t])return t;var e=Ps[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Yv)return Gu[t]=e[n];return t}var Xv=Xl("animationend"),Zv=Xl("animationiteration"),ey=Xl("animationstart"),ty=Xl("transitionend"),ny=new Map,yp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function xr(t,e){ny.set(t,e),ns(e,[t])}for(var Ju=0;Ju<yp.length;Ju++){var Qu=yp[Ju],_k=Qu.toLowerCase(),Ek=Qu[0].toUpperCase()+Qu.slice(1);xr(_k,"on"+Ek)}xr(Xv,"onAnimationEnd");xr(Zv,"onAnimationIteration");xr(ey,"onAnimationStart");xr("dblclick","onDoubleClick");xr("focusin","onFocus");xr("focusout","onBlur");xr(ty,"onTransitionEnd");oi("onMouseEnter",["mouseout","mouseover"]);oi("onMouseLeave",["mouseout","mouseover"]);oi("onPointerEnter",["pointerout","pointerover"]);oi("onPointerLeave",["pointerout","pointerover"]);ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ns("onBeforeInput",["compositionend","keypress","textInput","paste"]);ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ck=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vi));function wp(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,_S(r,e,void 0,t),t.currentTarget=null}function ry(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;wp(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;wp(s,a,u),i=l}}}if(ul)throw t=Qc,ul=!1,Qc=null,t}function he(t,e){var n=e[od];n===void 0&&(n=e[od]=new Set);var r=t+"__bubble";n.has(r)||(sy(e,t,2,!1),n.add(r))}function Yu(t,e,n){var r=0;e&&(r|=4),sy(n,t,r,e)}var ma="_reactListening"+Math.random().toString(36).slice(2);function yo(t){if(!t[ma]){t[ma]=!0,dv.forEach(function(n){n!=="selectionchange"&&(Ck.has(n)||Yu(n,!1,t),Yu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ma]||(e[ma]=!0,Yu("selectionchange",!1,e))}}function sy(t,e,n,r){switch(Bv(e)){case 1:var s=US;break;case 4:s=BS;break;default:s=Eh}n=s.bind(null,e,n,t),s=void 0,!Jc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function Xu(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;
vendor: 5,316 bytes, lines 37-38
37if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=$r(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Tv(function(){var u=i,d=xh(n),c=[];e:{var f=ny.get(t);if(f!==void 0){var h=Th,g=t;switch(t){case"keypress":if(Wa(n)===0)break e;case"keydown":case"keyup":h=nk;break;case"focusin":g="focus",h=Wu;break;case"focusout":g="blur",h=Wu;break;case"beforeblur":case"afterblur":h=Wu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ap;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=HS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=ik;break;case Xv:case Zv:case ey:h=qS;break;case ty:h=ak;break;case"scroll":h=zS;break;case"wheel":h=uk;break;case"copy":case"cut":case"paste":h=JS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=up}var m=(e&4)!==0,x=!m&&t==="scroll",w=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,b;v!==null;){b=v;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,w!==null&&(S=ho(v,w),S!=null&&m.push(wo(v,S,b)))),x)break;v=v.return}0<m.length&&(f=new h(f,g,null,n,d),c.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==qc&&(g=n.relatedTarget||n.fromElement)&&($r(g)||g[Rn]))break e;if((h||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=u,g=g?$r(g):null,g!==null&&(x=rs(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=u),h!==g)){if(m=ap,S="onMouseLeave",w="onMouseEnter",v="mouse",(t==="pointerout"||t==="pointerover")&&(m=up,S="onPointerLeave",w="onPointerEnter",v="pointer"),x=h==null?f:Os(h),b=g==null?f:Os(g),f=new m(S,v+"leave",h,n,d),f.target=x,f.relatedTarget=b,S=null,$r(d)===u&&(m=new m(w,v+"enter",g,n,d),m.target=b,m.relatedTarget=x,S=m),x=S,h&&g)t:{for(m=h,w=g,v=0,b=m;b;b=ds(b))v++;for(b=0,S=w;S;S=ds(S))b++;for(;0<v-b;)m=ds(m),v--;for(;0<b-v;)w=ds(w),b--;for(;v--;){if(m===w||w!==null&&m===w.alternate)break t;m=ds(m),w=ds(w)}m=null}else m=null;h!==null&&bp(c,f,h,m,!1),g!==null&&x!==null&&bp(c,x,g,m,!0)}}e:{if(f=u?Os(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=gk;else if(hp(f))if(qv)k=bk;else{k=yk;var _=vk}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=wk);if(k&&(k=k(t,u))){Kv(c,k,n,d);break e}_&&_(t,f,u),t==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&zc(f,"number",f.value)}switch(_=u?Os(u):window,t){case"focusin":(hp(_)||_.contentEditable==="true")&&(Ns=_,ed=u,Yi=null);break;case"focusout":Yi=ed=Ns=null;break;case"mousedown":td=!0;break;case"contextmenu":case"mouseup":case"dragend":td=!1,vp(c,n,d);break;case"selectionchange":if(kk)break;case"keydown":case"keyup":vp(c,n,d)}var E;if(jh)e:{switch(t){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else js?Hv(t,n)&&(C="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Vv&&n.locale!=="ko"&&(js||C!=="onCompositionStart"?C==="onCompositionEnd"&&js&&(E=zv()):(sr=d,Ch="value"in sr?sr.value:sr.textContent,js=!0)),_=pl(u,C),0<_.length&&(C=new lp(C,t,null,n,d),c.push({event:C,listeners:_}),E?C.data=E:(E=Wv(n),E!==null&&(C.data=E)))),(E=dk?hk(t,n):fk(t,n))&&(u=pl(u,"onBeforeInput"),0<u.length&&(d=new lp("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=E))}ry(c,e)})}function wo(t,e,n){return{instance:t,listener:e,currentTarget:n}}function pl(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ho(t,n),i!=null&&r.unshift(wo(t,i,s)),i=ho(t,e),i!=null&&r.push(wo(t,i,s))),t=t.return}return r}function ds(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function bp(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=ho(n,i),l!=null&&o.unshift(wo(n,l,a))):s||(l=ho(n,i),l!=null&&o.push(wo(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var Tk=/\r\n?/g,Rk=/\u0000|\uFFFD/g;function xp(t){return(typeof t=="string"?t:""+t).replace(Tk,`
38`).replace(Rk,"")}function ga(t,e,n){if(e=xp(e),xp(t)!==e&&n)throw Error(L(425))}function ml(){}var nd=null,rd=null;function sd(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var id=typeof setTimeout=="function"?setTimeout:void 0,jk=typeof clearTimeout=="function"?clearTimeout:void 0,Sp=typeof Promise=="function"?Promise:void 0,Nk=typeof queueMicrotask=="function"?queueMicrotask:typeof Sp<"u"?function(t){return Sp.resolve(null).then(t).cat
vendor: 4,824 bytes, line 38
38ch(Pk)}:id;function Pk(t){setTimeout(function(){throw t})}function Zu(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),mo(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);mo(e)}function cr(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function kp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var wi=Math.random().toString(36).slice(2),on="__reactFiber$"+wi,bo="__reactProps$"+wi,Rn="__reactContainer$"+wi,od="__reactEvents$"+wi,Ok="__reactListeners$"+wi,Ak="__reactHandles$"+wi;function $r(t){var e=t[on];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Rn]||n[on]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=kp(t);t!==null;){if(n=t[on])return n;t=kp(t)}return e}t=n,n=t.parentNode}return null}function qo(t){return t=t[on]||t[Rn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Os(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(L(33))}function Zl(t){return t[bo]||null}var ad=[],As=-1;function Sr(t){return{current:t}}function fe(t){0>As||(t.current=ad[As],ad[As]=null,As--)}function ce(t,e){As++,ad[As]=t.current,t.current=e}var yr={},Ke=Sr(yr),at=Sr(!1),Gr=yr;function ai(t,e){var n=t.type.contextTypes;if(!n)return yr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function lt(t){return t=t.childContextTypes,t!=null}function gl(){fe(at),fe(Ke)}function _p(t,e,n){if(Ke.current!==yr)throw Error(L(168));ce(Ke,e),ce(at,n)}function iy(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(L(108,vS(t)||"Unknown",s));return we({},n,r)}function vl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||yr,Gr=Ke.current,ce(Ke,t),ce(at,at.current),!0}function Ep(t,e,n){var r=t.stateNode;if(!r)throw Error(L(169));n?(t=iy(t,e,Gr),r.__reactInternalMemoizedMergedChildContext=t,fe(at),fe(Ke),ce(Ke,t)):fe(at),ce(at,n)}var Sn=null,eu=!1,ec=!1;function oy(t){Sn===null?Sn=[t]:Sn.push(t)}function Lk(t){eu=!0,oy(t)}function kr(){if(!ec&&Sn!==null){ec=!0;var t=0,e=oe;try{var n=Sn;for(oe=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Sn=null,eu=!1}catch(s){throw Sn!==null&&(Sn=Sn.slice(t+1)),Pv(Sh,kr),s}finally{oe=e,ec=!1}}return null}var Ls=[],Is=0,yl=null,wl=0,Et=[],Ct=0,Jr=null,_n=1,En="";function Or(t,e){Ls[Is++]=wl,Ls[Is++]=yl,yl=t,wl=e}function ay(t,e,n){Et[Ct++]=_n,Et[Ct++]=En,Et[Ct++]=Jr,Jr=t;var r=_n;t=En;var s=32-Ht(r)-1;r&=~(1<<s),n+=1;var i=32-Ht(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,_n=1<<32-Ht(e)+s|n<<s|r,En=i+t}else _n=1<<i|n<<s|r,En=t}function Ph(t){t.return!==null&&(Or(t,1),ay(t,1,0))}function Oh(t){for(;t===yl;)yl=Ls[--Is],Ls[Is]=null,wl=Ls[--Is],Ls[Is]=null;for(;t===Jr;)Jr=Et[--Ct],Et[Ct]=null,En=Et[--Ct],Et[Ct]=null,_n=Et[--Ct],Et[Ct]=null}var vt=null,gt=null,me=!1,Vt=null;function ly(t,e){var n=Tt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Cp(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,vt=t,gt=cr(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,vt=t,gt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Jr!==null?{id:_n,overflow:En}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Tt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,vt=t,gt=null,!0):!1;default:return!1}}function ld(t){return(t.mode&1)!==0&&(t.flags&128)===0}function ud(t){if(me){var e=gt;if(e){var n=e;if(!Cp(t,e)){if(ld(t))throw Error(L(418));e=cr(n.nextSibling);var r=vt;e&&Cp(t,e)?ly(r,n):(t.flags=t.flags&-4097|2,me=!1,vt=t)}}else{if(ld(t))throw Error(L(418));t.flags=t.flags&-4097|2,me=!1,vt=t}}}function Tp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;vt=t}function va(t){if(t!==vt)return!1;if(!me)return Tp(t),me=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!sd(t.type,t.memoizedProps)),e&&(e=gt)){if(ld(t))throw uy(),Error(L(418));for(;e;)ly(t,e),e=cr(e.nextSibling)}if(Tp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(L(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 23,255 bytes, lines 38-40
38){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){gt=cr(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}gt=null}}else gt=vt?cr(t.stateNode.nextSibling):null;return!0}function uy(){for(var t=gt;t;)t=cr(t.nextSibling)}function li(){gt=vt=null,me=!1}function Ah(t){Vt===null?Vt=[t]:Vt.push(t)}var Ik=Ln.ReactCurrentBatchConfig;function Ai(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,t))}return t}function ya(t,e){throw t=Object.prototype.toString.call(e),Error(L(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Rp(t){var e=t._init;return e(t._payload)}function cy(t){function e(w,v){if(t){var b=w.deletions;b===null?(w.deletions=[v],w.flags|=16):b.push(v)}}function n(w,v){if(!t)return null;for(;v!==null;)e(w,v),v=v.sibling;return null}function r(w,v){for(w=new Map;v!==null;)v.key!==null?w.set(v.key,v):w.set(v.index,v),v=v.sibling;return w}function s(w,v){return w=pr(w,v),w.index=0,w.sibling=null,w}function i(w,v,b){return w.index=b,t?(b=w.alternate,b!==null?(b=b.index,b<v?(w.flags|=2,v):b):(w.flags|=2,v)):(w.flags|=1048576,v)}function o(w){return t&&w.alternate===null&&(w.flags|=2),w}function a(w,v,b,S){return v===null||v.tag!==6?(v=ac(b,w.mode,S),v.return=w,v):(v=s(v,b),v.return=w,v)}function l(w,v,b,S){var k=b.type;return k===Rs?d(w,v,b.props.children,S,b.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===qn&&Rp(k)===v.type)?(S=s(v,b.props),S.ref=Ai(w,v,b),S.return=w,S):(S=Xa(b.type,b.key,b.props,null,w.mode,S),S.ref=Ai(w,v,b),S.return=w,S)}function u(w,v,b,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=lc(b,w.mode,S),v.return=w,v):(v=s(v,b.children||[]),v.return=w,v)}function d(w,v,b,S,k){return v===null||v.tag!==7?(v=qr(b,w.mode,S,k),v.return=w,v):(v=s(v,b),v.return=w,v)}function c(w,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=ac(""+v,w.mode,b),v.return=w,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case aa:return b=Xa(v.type,v.key,v.props,null,w.mode,b),b.ref=Ai(w,null,v),b.return=w,b;case Ts:return v=lc(v,w.mode,b),v.return=w,v;case qn:var S=v._init;return c(w,S(v._payload),b)}if(Bi(v)||Ri(v))return v=qr(v,w.mode,b,null),v.return=w,v;ya(w,v)}return null}function f(w,v,b,S){var k=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return k!==null?null:a(w,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case aa:return b.key===k?l(w,v,b,S):null;case Ts:return b.key===k?u(w,v,b,S):null;case qn:return k=b._init,f(w,v,k(b._payload),S)}if(Bi(b)||Ri(b))return k!==null?null:d(w,v,b,S,null);ya(w,b)}return null}function h(w,v,b,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return w=w.get(b)||null,a(v,w,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case aa:return w=w.get(S.key===null?b:S.key)||null,l(v,w,S,k);case Ts:return w=w.get(S.key===null?b:S.key)||null,u(v,w,S,k);case qn:var _=S._init;return h(w,v,b,_(S._payload),k)}if(Bi(S)||Ri(S))return w=w.get(b)||null,d(v,w,S,k,null);ya(v,S)}return null}function g(w,v,b,S){for(var k=null,_=null,E=v,C=v=0,N=null;E!==null&&C<b.length;C++){E.index>C?(N=E,E=null):N=E.sibling;var j=f(w,E,b[C],S);if(j===null){E===null&&(E=N);break}t&&E&&j.alternate===null&&e(w,E),v=i(j,v,C),_===null?k=j:_.sibling=j,_=j,E=N}if(C===b.length)return n(w,E),me&&Or(w,C),k;if(E===null){for(;C<b.length;C++)E=c(w,b[C],S),E!==null&&(v=i(E,v,C),_===null?k=E:_.sibling=E,_=E);return me&&Or(w,C),k}for(E=r(w,E);C<b.length;C++)N=h(E,w,C,b[C],S),N!==null&&(t&&N.alternate!==null&&E.delete(N.key===null?C:N.key),v=i(N,v,C),_===null?k=N:_.sibling=N,_=N);return t&&E.forEach(function(B){return e(w,B)}),me&&Or(w,C),k}function m(w,v,b,S){var k=Ri(b);if(typeof k!="function")throw Error(L(150));if(b=k.call(b),b==null)throw Error(L(151));for(var _=k=null,E=v,C=v=0,N=null,j=b.next();E!==null&&!j.done;C++,j=b.next()){E.index>C?(N=E,E=null):N=E.sibling;var B=f(w,E,j.value,S);if(B===null){E===null&&(E=N);break}t&&E&&B.alternate===null&&e(w,E),v=i(B,v,C),_===null?k=B:_.sibling=B,_=B,E=N}if(j.done)return n(w,E),me&&Or(w,C),k;if(E===null){for(;!j.done;C++,j=b.next())j=c(w,j.value,S),j!==null&&(v=i(j,v,C),_===null?k=j:_.sibling=j,_=j);return me&&Or(w,C),k}for(E=r(w,E);!j.done;C++,j=b.next())j=h(E,w,C,j.value,S),j!==null&&(t&&j.alternate!==null&&E.delete(j.key===null?C:j.key),v=i(j,v,C),_===null?k=j:_.sibling=j,_=j);return t&&E.forEach(function(A){return e(w,A)}),me&&Or(w,C),k}function x(w,v,b,S){if(typeof b=="object"&&b!==null&&b.type===Rs&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case aa:e:{for(var k=b.key,_=v;_!==null;){if(_.key===k){if(k=b.type,k===Rs){if(_.tag===7){n(w,_.sibling),v=s(_,b.props.children),v.return=w,w=v;break e}}else if(_.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===qn&&Rp(k)===_.type){n(w,_.sibling),v=s(_,b.props),v.ref=Ai(w,_,b),v.return=w,w=v;break e}n(w,_);break}else e(w,_);_=_.sibling}b.type===Rs?(v=qr(b.props.children,w.mode,S,b.key),v.return=w,w=v):(S=Xa(b.type,b.key,b.props,null,w.mode,S),S.ref=Ai(w,v,b),S.return=w,w=S)}return o(w);case Ts:e:{for(_=b.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(w,v.sibling),v=s(v,b.children||[]),v.return=w,w=v;break e}else{n(w,v);break}else e(w,v);v=v.sibling}v=lc(b,w.mode,S),v.return=w,w=v}return o(w);case qn:return _=b._init,x(w,v,_(b._payload),S)}if(Bi(b))return g(w,v,b,S);if(Ri(b))return m(w,v,b,S);ya(w,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(w,v.sibling),v=s(v,b),v.return=w,w=v):(n(w,v),v=ac(b,w.mode,S),v.return=w,w=v),o(w)):n(w,v)}return x}var ui=cy(!0),dy=cy(!1),bl=Sr(null),xl=null,$s=null,Lh=null;function Ih(){Lh=$s=xl=null}function $h(t){var e=bl.current;fe(bl),t._currentValue=e}function cd(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Hs(t,e){xl=t,Lh=$s=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ot=!0),t.firstContext=null)}function jt(t){var e=t._currentValue;if(Lh!==t)if(t={context:t,memoizedValue:e,next:null},$s===null){if(xl===null)throw Error(L(308));$s=t,xl.dependencies={lanes:0,firstContext:t}}else $s=$s.next=t;return e}var Dr=null;function Dh(t){Dr===null?Dr=[t]:Dr.push(t)}function hy(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,Dh(e)):(n.next=s.next,s.next=n),e.interleaved=n,jn(t,r)}function jn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Gn=!1;function Mh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fy(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Cn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function dr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,re&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,jn(t,n)}return s=r.interleaved,s===null?(e.next=e,Dh(r)):(e.next=s.next,s.next=e),r.interleaved=e,jn(t,n)}function Ka(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,kh(t,n)}}function jp(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Sl(t,e,n,r){var s=t.updateQueue;Gn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=t.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var c=s.baseState;o=0,d=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,m=a;switch(f=e,h=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){c=g.call(h,c,f);break e}c=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(h,c,f):g,f==null)break e;c=we({},c,f);break e;case 2:Gn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=h,l=c):d=d.next=h,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(l=c),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Yr|=o,t.lanes=o,t.memoizedState=c}}function Np(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var Go={},dn=Sr(Go),xo=Sr(Go),So=Sr(Go);function Mr(t){if(t===Go)throw Error(L(174));return t}function Fh(t,e){switch(ce(So,e),ce(xo,t),ce(dn,Go),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Hc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Hc(e,t)}fe(dn),ce(dn,e)}function ci(){fe(dn),fe(xo),fe(So)}function py(t){Mr(So.current);var e=Mr(dn.current),n=Hc(e,t.type);e!==n&&(ce(xo,t),ce(dn,n))}function Uh(t){xo.current===t&&(fe(dn),fe(xo))}var ve=Sr(0);function kl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var tc=[];function Bh(){for(var t=0;t<tc.length;t++)tc[t]._workInProgressVersionPrimary=null;tc.length=0}var qa=Ln.ReactCurrentDispatcher,nc=Ln.ReactCurrentBatchConfig,Qr=0,ye=null,Re=null,Oe=null,_l=!1,Xi=!1,ko=0,$k=0;function ze(){throw Error(L(321))}function zh(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Kt(t[n],e[n]))return!1;return!0}function Vh(t,e,n,r,s,i){if(Qr=i,ye=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,qa.current=t===null||t.memoizedState===null?Uk:Bk,t=n(r,s),Xi){i=0;do{if(Xi=!1,ko=0,25<=i)throw Error(L(301));i+=1,Oe=Re=null,e.updateQueue=null,qa.current=zk,t=n(r,s)}while(Xi)}if(qa.current=El,e=Re!==null&&Re.next!==null,Qr=0,Oe=Re=ye=null,_l=!1,e)throw Error(L(300));return t}function Hh(){var t=ko!==0;return ko=0,t}function Zt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oe===null?ye.memoizedState=Oe=t:Oe=Oe.next=t,Oe}function Nt(){if(Re===null){var t=ye.alternate;t=t!==null?t.memoizedState:null}else t=Re.next;var e=Oe===null?ye.memoizedState:Oe.next;if(e!==null)Oe=e,Re=t;else{if(t===null)throw Error(L(310));Re=t,t={memoizedState:Re.memoizedState,baseState:Re.baseState,baseQueue:Re.baseQueue,queue:Re.queue,next:null},Oe===null?ye.memoizedState=Oe=t:Oe=Oe.next=t}return Oe}function _o(t,e){return typeof e=="function"?e(t):e}function rc(t){var e=Nt(),n=e.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=t;var r=Re,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var d=u.lane;if((Qr&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,ye.lanes|=d,Yr|=d}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Kt(r,e.memoizedState)||(ot=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,ye.lanes|=i,Yr|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function sc(t){var e=Nt(),n=e.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);Kt(i,e.memoizedState)||(ot=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function my(){}function gy(t,e){var n=ye,r=Nt(),s=e(),i=!Kt(r.memoizedState,s);if(i&&(r.memoizedState=s,ot=!0),r=r.queue,Wh(wy.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||Oe!==null&&Oe.memoizedState.tag&1){if(n.flags|=2048,Eo(9,yy.bind(null,n,r,s,e),void 0,null),Ae===null)throw Error(L(349));Qr&30||vy(n,e,s)}return s}function vy(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ye.updateQueue,e===null?(e={lastEffect:null,stores:null},ye.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function yy(t,e,n,r){e.value=n,e.getSnapshot=r,by(e)&&xy(t)}function wy(t,e,n){return n(function(){by(e)&&xy(t)})}function by(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Kt(t,n)}catch{return!0}}function xy(t){var e=jn(t,1);e!==null&&Wt(e,t,1,-1)}function Pp(t){var e=Zt();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:t},e.queue=t,t=t.dispatch=Fk.bind(null,ye,t),[e.memoizedState,t]}function Eo(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ye.updateQueue,e===null?(e={lastEffect:null,stores:null},ye.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function Sy(){return Nt().memoizedState}function Ga(t,e,n,r){var s=Zt();ye.flags|=t,s.memoizedState=Eo(1|e,n,void 0,r===void 0?null:r)}function tu(t,e,n,r){var s=Nt();r=r===void 0?null:r;var i=void 0;if(Re!==null){var o=Re.memoizedState;if(i=o.destroy,r!==null&&zh(r,o.deps)){s.memoizedState=Eo(e,n,i,r);return}}ye.flags|=t,s.memoizedState=Eo(1|e,n,i,r)}function Op(t,e){return Ga(8390656,8,t,e)}function Wh(t,e){return tu(2048,8,t,e)}function ky(t,e){return tu(4,2,t,e)}function _y(t,e){return tu(4,4,t,e)}function Ey(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Cy(t,e,n){return n=n!=null?n.concat([t]):null,tu(4,4,Ey.bind(null,e,t),n)}function Kh(){}function Ty(t,e){var n=Nt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&zh(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Ry(t,e){var n=Nt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&zh(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function jy(t,e,n){return Qr&21?(Kt(n,e)||(n=Lv(),ye.lanes|=n,Yr|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,ot=!0),t.memoizedState=n)}function Dk(t,e){var n=oe;oe=n!==0&&4>n?n:4,t(!0);var r=nc.transition;nc.transition={};try{t(!1),e()}finally{oe=n,nc.transition=r}}function Ny(){return Nt().memoizedState}function Mk(t,e,n){var r=fr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Py(t))Oy(e,n);else if(n=hy(t,e,n,r),n!==null){var s=Ye();Wt(n,t,r,s),Ay(n,e,r)}}function Fk(t,e,n){var r=fr(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Py(t))Oy(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Kt(a,o)){var l=e.interleaved;l===null?(s.next=s,Dh(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=hy(t,e,s,r),n!==null&&(s=Ye(),Wt(n,t,r,s),Ay(n,e,r))}}function Py(t){var e=t.alternate;return t===ye||e!==null&&e===ye}function Oy(t,e){Xi=_l=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Ay(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,kh(t,n)}}var El={readContext:jt,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useInsertionEffect:ze,useLayoutEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useMutableSource:ze,useSyncExternalStore:ze,useId:ze,unstable_isNewReconciler:!1},Uk={readContext:jt,useCallback:function(t,e){return Zt().memoizedState=[t,e===void 0?null:e],t},useContext:jt,useEffect:Op,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Ga(4194308,4,Ey.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ga(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ga(4,2,t,e)},useMemo:function(t,e){var n=Zt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Zt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Mk.bind(null,ye,t),[r.memoizedState,t]},useRef:function(t){var e=Zt();return t={current:t},e.memoizedState=t},useState:Pp,useDebugValue:Kh,useDeferredValue:function(t){return Zt().memoizedState=t},useTransition:function(){var t=Pp(!1),e=t[0];return t=Dk.bind(null,t[1]),Zt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ye,s=Zt();if(me){if(n===void 0)throw Error(L(407));n=n()}else{if(n=e(),Ae===null)throw Error(L(349));Qr&30||vy(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,Op(wy.bind(null,r,i,t),[t]),r.flags|=2048,Eo(9,yy.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Zt(),e=Ae.identifierPrefix;if(me){var n=En,r=_n;n=(r&~(1<<32-Ht(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=ko++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=$k++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},Bk={readContext:jt,useCallback:Ty,useContext:jt,useEffect:Wh,useImperativeHandle:Cy,useInsertionEffect:ky,useLayoutEffect:_y,useMemo:Ry,useReducer:rc,useRef:Sy,useState:function(){return rc(_o)},useDebugValue:Kh,useDeferredValue:function(t){var e=Nt();return jy(e,Re.memoizedState,t)},useTransition:function(){var t=rc(_o)[0],e=Nt().memoizedState;return[t,e]},useMutableSource:my,useSyncExternalStore:gy,useId:Ny,unstable_isNewReconciler:!1},zk={readContext:jt,useCallback:Ty,useContext:jt,useEffect:Wh,useImperativeHandle:Cy,useInsertionEffect:ky,useLayoutEffect:_y,useMemo:Ry,useReducer:sc,useRef:Sy,useState:function(){return sc(_o)},useDebugValue:Kh,useDeferredValue:function(t){var e=Nt();return Re===null?e.memoizedState=t:jy(e,Re.memoizedState,t)},useTransition:function(){var t=sc(_o)[0],e=Nt().memoizedState;return[t,e]},useMutableSource:my,useSyncExternalStore:gy,useId:Ny,unstable_isNewReconciler:!1};function Dt(t,e){if(t&&t.defaultProps){e=we({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function dd(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:we({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var nu={isMounted:function(t){return(t=t._reactInternals)?rs(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Ye(),s=fr(t),i=Cn(r,s);i.payload=e,n!=null&&(i.callback=n),e=dr(t,i,s),e!==null&&(Wt(e,t,s,r),Ka(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Ye(),s=fr(t),i=Cn(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=dr(t,i,s),e!==null&&(Wt(e,t,s,r),Ka(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Ye(),r=fr(t),s=Cn(n,r);s.tag=2,e!=null&&(s.callback=e),e=dr(t,s,r),e!==null&&(Wt(e,t,r,n),Ka(e,t,r))}};function Ap(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!vo(n,r)||!vo(s,i):!0}function Ly(t,e,n){var r=!1,s=yr,i=e.contextType;return typeof i=="object"&&i!==null?i=jt(i):(s=lt(e)?Gr:Ke.current,r=e.contextTypes,i=(r=r!=null)?ai(t,s):yr),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=nu,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Lp(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&nu.enqueueReplaceState(e,e.state,null)}function hd(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},Mh(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=jt(i):(i=lt(e)?Gr:Ke.current,s.context=ai(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(dd(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&nu.enqueueReplaceState(s,s.state,null),Sl(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function di(t,e){try{var n="",r=e;do n+=gS(r),r=r.return;while(r);var s=n}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function ic(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function fd(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var Vk=typeof WeakMap=="function"?WeakMap:Map;function Iy(t,e,n){n=Cn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Tl||(Tl=!0,kd=r),fd(t,e)},n}function $y(t,e,n){n=Cn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){fd(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){fd(t,e),typeof r!="function"&&(hr===null?hr=ne
vendor: 10,362 bytes, line 40
40w Set([this]):hr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Ip(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new Vk;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=r1.bind(null,t,e,n),e.then(t,t))}function $p(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Dp(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Cn(-1,1),e.tag=2,dr(n,e,1))),n.lanes|=1),t)}var Hk=Ln.ReactCurrentOwner,ot=!1;function Ge(t,e,n,r){e.child=t===null?dy(e,null,n,r):ui(e,t.child,n,r)}function Mp(t,e,n,r,s){n=n.render;var i=e.ref;return Hs(e,s),r=Vh(t,e,n,r,i,s),n=Hh(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Nn(t,e,s)):(me&&n&&Ph(e),e.flags|=1,Ge(t,e,r,s),e.child)}function Fp(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!ef(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,Dy(t,e,i,r,s)):(t=Xa(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:vo,n(o,r)&&t.ref===e.ref)return Nn(t,e,s)}return e.flags|=1,t=pr(i,r),t.ref=e.ref,t.return=e,e.child=t}function Dy(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(vo(i,r)&&t.ref===e.ref)if(ot=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(ot=!0);else return e.lanes=t.lanes,Nn(t,e,s)}return pd(t,e,n,r,s)}function My(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ce(Ms,ft),ft|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ce(Ms,ft),ft|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ce(Ms,ft),ft|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,ce(Ms,ft),ft|=r;return Ge(t,e,s,n),e.child}function Fy(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function pd(t,e,n,r,s){var i=lt(n)?Gr:Ke.current;return i=ai(e,i),Hs(e,s),n=Vh(t,e,n,r,i,s),r=Hh(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Nn(t,e,s)):(me&&r&&Ph(e),e.flags|=1,Ge(t,e,n,s),e.child)}function Up(t,e,n,r,s){if(lt(n)){var i=!0;vl(e)}else i=!1;if(Hs(e,s),e.stateNode===null)Ja(t,e),Ly(e,n,r),hd(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=jt(u):(u=lt(n)?Gr:Ke.current,u=ai(e,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Lp(e,o,r,u),Gn=!1;var f=e.memoizedState;o.state=f,Sl(e,r,o,s),l=e.memoizedState,a!==r||f!==l||at.current||Gn?(typeof d=="function"&&(dd(e,n,d,r),l=e.memoizedState),(a=Gn||Ap(e,n,a,r,f,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,fy(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Dt(e.type,a),o.props=u,c=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=jt(l):(l=lt(n)?Gr:Ke.current,l=ai(e,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||f!==l)&&Lp(e,o,r,l),Gn=!1,f=e.memoizedState,o.state=f,Sl(e,r,o,s);var g=e.memoizedState;a!==c||f!==g||at.current||Gn?(typeof h=="function"&&(dd(e,n,h,r),g=e.memoizedState),(u=Gn||Ap(e,n,u,r,f,g,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return md(t,e,n,r,i,s)}function md(t,e,n,r,s,i){Fy(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&Ep(e,n,!1),Nn(t,e,i);r=e.stateNode,Hk.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=ui(e,t.child,null,i),e.child=ui(e,null,a,i)):Ge(t,e,a,i),e.memoizedState=r.state,s&&Ep(e,n,!0),e.child}function Uy(t){var e=t.stateNode;e.pendingContext?_p(t,e.pendingContext,e.pendingContext!==e.context):e.context&&_p(t,e.context,!1),Fh(t,e.containerInfo)}function Bp(t,e,n,r,s){return li(),Ah(s),e.flags|=256,Ge(t,e,n,r),e.child}var gd={dehydrated:null,treeContext:null,retryLane:0};function vd(t){return{baseLanes:t,cachePool:null,transitions:null}}function By(t,e,n){var r=e.pendingProps,s=ve.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),ce(ve,s&1),t===null)return ud(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=iu(o,r,0,null),t=qr(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=vd(n),e.memoizedState=gd,t):qh(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Wk(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=pr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=pr(a,i):(i=qr(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?vd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=gd,r}return i=t.child,t=i.sibling,r=pr(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function qh(t,e){return e=iu({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function wa(t,e,n,r){return r!==null&&Ah(r),ui(e,t.child,null,n),t=qh(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Wk(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=ic(Error(L(422))),wa(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=iu({mode:"visible",children:r.children},s,0,null),i=qr(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&ui(e,t.child,null,o),e.child.memoizedState=vd(o),e.memoizedState=gd,i);if(!(e.mode&1))return wa(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(L(419)),r=ic(i,r,void 0),wa(t,e,o,r)}if(a=(o&t.childLanes)!==0,ot||a){if(r=Ae,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,jn(t,s),Wt(r,t,s,-1))}return Zh(),r=ic(Error(L(421))),wa(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=s1.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,gt=cr(s.nextSibling),vt=e,me=!0,Vt=null,t!==null&&(Et[Ct++]=_n,Et[Ct++]=En,Et[Ct++]=Jr,_n=t.id,En=t.overflow,Jr=e),e=qh(e,r.children),e.flags|=4096,e)}function zp(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),cd(t.return,e,n)}function oc(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function zy(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(Ge(t,e,r.children,n),r=ve.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&zp(t,n,e);else if(t.tag===19)zp(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ce(ve,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&kl(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),oc(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&kl(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}oc(e,!0,n,null,i);break;case"together":oc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ja(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}
vendor: 4,331 bytes, line 40
40function Nn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Yr|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(L(153));if(e.child!==null){for(t=e.child,n=pr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=pr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Kk(t,e,n){switch(e.tag){case 3:Uy(e),li();break;case 5:py(e);break;case 1:lt(e.type)&&vl(e);break;case 4:Fh(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;ce(bl,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(ce(ve,ve.current&1),e.flags|=128,null):n&e.child.childLanes?By(t,e,n):(ce(ve,ve.current&1),t=Nn(t,e,n),t!==null?t.sibling:null);ce(ve,ve.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return zy(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ce(ve,ve.current),r)break;return null;case 22:case 23:return e.lanes=0,My(t,e,n)}return Nn(t,e,n)}var Vy,yd,Hy,Wy;Vy=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yd=function(){};Hy=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Mr(dn.current);var i=null;switch(n){case"input":s=Uc(t,s),r=Uc(t,r),i=[];break;case"select":s=we({},s,{value:void 0}),r=we({},r,{value:void 0}),i=[];break;case"textarea":s=Vc(t,s),r=Vc(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=ml)}Wc(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(uo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(uo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&he("scroll",t),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};Wy=function(t,e,n,r){n!==r&&(e.flags|=4)};function Li(t,e){if(!me)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ve(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function qk(t,e,n){var r=e.pendingProps;switch(Oh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(e),null;case 1:return lt(e.type)&&gl(),Ve(e),null;case 3:return r=e.stateNode,ci(),fe(at),fe(Ke),Bh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(va(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Vt!==null&&(Cd(Vt),Vt=null))),yd(t,e),Ve(e),null;case 5:Uh(e);var s=Mr(So.current);if(n=e.type,t!==null&&e.stateNode!=null)Hy(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(L(166));return Ve(e),null}if(t=Mr(dn.current),va(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;
vendor: 33,008 bytes, line 40
40switch(r[on]=e,r[bo]=i,t=(e.mode&1)!==0,n){case"dialog":he("cancel",r),he("close",r);break;case"iframe":case"object":case"embed":he("load",r);break;case"video":case"audio":for(s=0;s<Vi.length;s++)he(Vi[s],r);break;case"source":he("error",r);break;case"img":case"image":case"link":he("error",r),he("load",r);break;case"details":he("toggle",r);break;case"input":Yf(r,i),he("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},he("invalid",r);break;case"textarea":Zf(r,i),he("invalid",r)}Wc(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&ga(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ga(r.textContent,a,t),s=["children",""+a]):uo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&he("scroll",r)}switch(n){case"input":la(r),Xf(r,i,!0);break;case"textarea":la(r),ep(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ml)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=wv(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[on]=e,t[bo]=r,Vy(t,e,!1,!1),e.stateNode=t;e:{switch(o=Kc(n,r),n){case"dialog":he("cancel",t),he("close",t),s=r;break;case"iframe":case"object":case"embed":he("load",t),s=r;break;case"video":case"audio":for(s=0;s<Vi.length;s++)he(Vi[s],t);s=r;break;case"source":he("error",t),s=r;break;case"img":case"image":case"link":he("error",t),he("load",t),s=r;break;case"details":he("toggle",t),s=r;break;case"input":Yf(t,r),s=Uc(t,r),he("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=we({},r,{value:void 0}),he("invalid",t);break;case"textarea":Zf(t,r),s=Vc(t,r),he("invalid",t);break;default:s=r}Wc(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Sv(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&bv(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&co(t,l):typeof l=="number"&&co(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(uo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&he("scroll",t):l!=null&&vh(t,i,l,o))}switch(n){case"input":la(t),Xf(t,r,!1);break;case"textarea":la(t),ep(t);break;case"option":r.value!=null&&t.setAttribute("value",""+vr(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?Us(t,!!r.multiple,i,!1):r.defaultValue!=null&&Us(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=ml)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Ve(e),null;case 6:if(t&&e.stateNode!=null)Wy(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(L(166));if(n=Mr(So.current),Mr(dn.current),va(e)){if(r=e.stateNode,n=e.memoizedProps,r[on]=e,(i=r.nodeValue!==n)&&(t=vt,t!==null))switch(t.tag){case 3:ga(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ga(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[on]=e,e.stateNode=r}return Ve(e),null;case 13:if(fe(ve),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(me&&gt!==null&&e.mode&1&&!(e.flags&128))uy(),li(),e.flags|=98560,i=!1;else if(i=va(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(L(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[on]=e}else li(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ve(e),i=!1}else Vt!==null&&(Cd(Vt),Vt=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||ve.current&1?je===0&&(je=3):Zh())),e.updateQueue!==null&&(e.flags|=4),Ve(e),null);case 4:return ci(),yd(t,e),t===null&&yo(e.stateNode.containerInfo),Ve(e),null;case 10:return $h(e.type._context),Ve(e),null;case 17:return lt(e.type)&&gl(),Ve(e),null;case 19:if(fe(ve),i=e.memoizedState,i===null)return Ve(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)Li(i,!1);else{if(je!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=kl(t),o!==null){for(e.flags|=128,Li(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ce(ve,ve.current&1|2),e.child}t=t.sibling}i.tail!==null&&Ee()>hi&&(e.flags|=128,r=!0,Li(i,!1),e.lanes=4194304)}else{if(!r)if(t=kl(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Li(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!me)return Ve(e),null}else 2*Ee()-i.renderingStartTime>hi&&n!==1073741824&&(e.flags|=128,r=!0,Li(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ee(),e.sibling=null,n=ve.current,ce(ve,r?n&1|2:n&1),e):(Ve(e),null);case 22:case 23:return Xh(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?ft&1073741824&&(Ve(e),e.subtreeFlags&6&&(e.flags|=8192)):Ve(e),null;case 24:return null;case 25:return null}throw Error(L(156,e.tag))}function Gk(t,e){switch(Oh(e),e.tag){case 1:return lt(e.type)&&gl(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ci(),fe(at),fe(Ke),Bh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Uh(e),null;case 13:if(fe(ve),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(L(340));li()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return fe(ve),null;case 4:return ci(),null;case 10:return $h(e.type._context),null;case 22:case 23:return Xh(),null;case 24:return null;default:return null}}var ba=!1,We=!1,Jk=typeof WeakSet=="function"?WeakSet:Set,F=null;function Ds(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(t,e,r)}else n.current=null}function wd(t,e,n){try{n()}catch(r){Se(t,e,r)}}var Vp=!1;function Qk(t,e){if(nd=hl,t=Qv(),Nh(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,d=0,c=t,f=null;t:for(;;){for(var h;c!==n||s!==0&&c.nodeType!==3||(a=o+s),c!==i||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)f=c,c=h;for(;;){if(c===t)break t;if(f===n&&++u===s&&(a=o),f===i&&++d===r&&(l=o),(h=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rd={focusedElem:t,selectionRange:n},hl=!1,F=e;F!==null;)if(e=F,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,F=t;else for(;F!==null;){e=F;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,x=g.memoizedState,w=e.stateNode,v=w.getSnapshotBeforeUpdate(e.elementType===e.type?m:Dt(e.type,m),x);w.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(S){Se(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,F=t;break}F=e.return}return g=Vp,Vp=!1,g}function Zi(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&wd(e,n,i)}s=s.next}while(s!==r)}}function ru(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function bd(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Ky(t){var e=t.alternate;e!==null&&(t.alternate=null,Ky(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[on],delete e[bo],delete e[od],delete e[Ok],delete e[Ak])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function qy(t){return t.tag===5||t.tag===3||t.tag===4}function Hp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function xd(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ml));else if(r!==4&&(t=t.child,t!==null))for(xd(t,e,n),t=t.sibling;t!==null;)xd(t,e,n),t=t.sibling}function Sd(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Sd(t,e,n),t=t.sibling;t!==null;)Sd(t,e,n),t=t.sibling}var De=null,zt=!1;function zn(t,e,n){for(n=n.child;n!==null;)Gy(t,e,n),n=n.sibling}function Gy(t,e,n){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(Jl,n)}catch{}switch(n.tag){case 5:We||Ds(n,e);case 6:var r=De,s=zt;De=null,zn(t,e,n),De=r,zt=s,De!==null&&(zt?(t=De,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(zt?(t=De,n=n.stateNode,t.nodeType===8?Zu(t.parentNode,n):t.nodeType===1&&Zu(t,n),mo(t)):Zu(De,n.stateNode));break;case 4:r=De,s=zt,De=n.stateNode.containerInfo,zt=!0,zn(t,e,n),De=r,zt=s;break;case 0:case 11:case 14:case 15:if(!We&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&wd(n,e,o),s=s.next}while(s!==r)}zn(t,e,n);break;case 1:if(!We&&(Ds(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Se(n,e,a)}zn(t,e,n);break;case 21:zn(t,e,n);break;case 22:n.mode&1?(We=(r=We)||n.memoizedState!==null,zn(t,e,n),We=r):zn(t,e,n);break;default:zn(t,e,n)}}function Wp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Jk),e.forEach(function(r){var s=i1.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Lt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:De=a.stateNode,zt=!1;break e;case 3:De=a.stateNode.containerInfo,zt=!0;break e;case 4:De=a.stateNode.containerInfo,zt=!0;break e}a=a.return}if(De===null)throw Error(L(160));Gy(i,o,s),De=null,zt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Se(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Jy(e,t),e=e.sibling}function Jy(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Lt(e,t),Yt(t),r&4){try{Zi(3,t,t.return),ru(3,t)}catch(m){Se(t,t.return,m)}try{Zi(5,t,t.return)}catch(m){Se(t,t.return,m)}}break;case 1:Lt(e,t),Yt(t),r&512&&n!==null&&Ds(n,n.return);break;case 5:if(Lt(e,t),Yt(t),r&512&&n!==null&&Ds(n,n.return),t.flags&32){var s=t.stateNode;try{co(s,"")}catch(m){Se(t,t.return,m)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&vv(s,i),Kc(a,o);var u=Kc(a,i);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?Sv(s,c):d==="dangerouslySetInnerHTML"?bv(s,c):d==="children"?co(s,c):vh(s,d,c,u)}switch(a){case"input":Bc(s,i);break;case"textarea":yv(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Us(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?Us(s,!!i.multiple,i.defaultValue,!0):Us(s,!!i.multiple,i.multiple?[]:"",!1))}s[bo]=i}catch(m){Se(t,t.return,m)}}break;case 6:if(Lt(e,t),Yt(t),r&4){if(t.stateNode===null)throw Error(L(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){Se(t,t.return,m)}}break;case 3:if(Lt(e,t),Yt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{mo(e.containerInfo)}catch(m){Se(t,t.return,m)}break;case 4:Lt(e,t),Yt(t);break;case 13:Lt(e,t),Yt(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Qh=Ee())),r&4&&Wp(t);break;case 22:if(d=n!==null&&n.memoizedState!==null,t.mode&1?(We=(u=We)||d,Lt(e,t),We=u):Lt(e,t),Yt(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!d&&t.mode&1)for(F=t,d=t.child;d!==null;){for(c=F=d;F!==null;){switch(f=F,h=f.child,f.tag){case 0:case 11:case 14:case 15:Zi(4,f,f.return);break;case 1:Ds(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(m){Se(r,n,m)}}break;case 5:Ds(f,f.return);break;case 22:if(f.memoizedState!==null){qp(c);continue}}h!==null?(h.return=f,F=h):qp(c)}d=d.sibling}e:for(d=null,c=t;;){if(c.tag===5){if(d===null){d=c;try{s=c.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=xv("display",o))}catch(m){Se(t,t.return,m)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(m){Se(t,t.return,m)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===t)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Lt(e,t),Yt(t),r&4&&Wp(t);break;case 21:break;default:Lt(e,t),Yt(t)}}function Yt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(qy(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(co(s,""),r.flags&=-33);var i=Hp(t);Sd(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Hp(t);xd(t,a,o);break;default:throw Error(L(161))}}catch(l){Se(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Yk(t,e,n){F=t,Qy(t)}function Qy(t,e,n){for(var r=(t.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||ba;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||We;a=ba;var u=We;if(ba=o,(We=l)&&!u)for(F=s;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Gp(s):l!==null?(l.return=o,F=l):Gp(s);for(;i!==null;)F=i,Qy(i),i=i.sibling;F=s,ba=a,We=u}Kp(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):Kp(t)}}function Kp(t){for(;F!==null;){var e=F;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:We||ru(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!We)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:Dt(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Np(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Np(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&mo(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}We||e.flags&512&&bd(e)}catch(f){Se(e,e.return,f)}}if(e===t){F=null;break}if(n=e.sibling,n!==null){n.return=e.return,F=n;break}F=e.return}}function qp(t){for(;F!==null;){var e=F;if(e===t){F=null;break}var n=e.sibling;if(n!==null){n.return=e.return,F=n;break}F=e.return}}function Gp(t){for(;F!==null;){var e=F;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{ru(4,e)}catch(l){Se(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){Se(e,s,l)}}var i=e.return;try{bd(e)}catch(l){Se(e,i,l)}break;case 5:var o=e.return;try{bd(e)}catch(l){Se(e,o,l)}}}catch(l){Se(e,e.return,l)}if(e===t){F=null;break}var a=e.sibling;if(a!==null){a.return=e.return,F=a;break}F=e.return}}var Xk=Math.ceil,Cl=Ln.ReactCurrentDispatcher,Gh=Ln.ReactCurrentOwner,Rt=Ln.ReactCurrentBatchConfig,re=0,Ae=null,Te=null,Me=0,ft=0,Ms=Sr(0),je=0,Co=null,Yr=0,su=0,Jh=0,eo=null,rt=null,Qh=0,hi=1/0,wn=null,Tl=!1,kd=null,hr=null,xa=!1,ir=null,Rl=0,to=0,_d=null,Qa=-1,Ya=0;function Ye(){return re&6?Ee():Qa!==-1?Qa:Qa=Ee()}function fr(t){return t.mode&1?re&2&&Me!==0?Me&-Me:Ik.transition!==null?(Ya===0&&(Ya=Lv()),Ya):(t=oe,t!==0||(t=window.event,t=t===void 0?16:Bv(t.type)),t):1}function Wt(t,e,n,r){if(50<to)throw to=0,_d=null,Error(L(185));Wo(t,n,r),(!(re&2)||t!==Ae)&&(t===Ae&&(!(re&2)&&(su|=n),je===4&&Qn(t,Me)),ut(t,r),n===1&&re===0&&!(e.mode&1)&&(hi=Ee()+500,eu&&kr()))}function ut(t,e){var n=t.callbackNode;IS(t,e);var r=dl(t,t===Ae?Me:0);if(r===0)n!==null&&rp(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&rp(n),e===1)t.tag===0?Lk(Jp.bind(null,t)):oy(Jp.bind(null,t)),Nk(function(){!(re&6)&&kr()}),n=null;else{switch(Iv(r)){case 1:n=Sh;break;case 4:n=Ov;break;case 16:n=cl;break;case 536870912:n=Av;break;default:n=cl}n=sw(n,Yy.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Yy(t,e){if(Qa=-1,Ya=0,re&6)throw Error(L(327));var n=t.callbackNode;if(Ws()&&t.callbackNode!==n)return null;var r=dl(t,t===Ae?Me:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=jl(t,r);else{e=r;var s=re;re|=2;var i=Zy();(Ae!==t||Me!==e)&&(wn=null,hi=Ee()+500,Kr(t,e));do try{t1();break}catch(a){Xy(t,a)}while(!0);Ih(),Cl.current=i,re=s,Te!==null?e=0:(Ae=null,Me=0,e=je)}if(e!==0){if(e===2&&(s=Yc(t),s!==0&&(r=s,e=Ed(t,s))),e===1)throw n=Co,Kr(t,0),Qn(t,r),ut(t,Ee()),n;if(e===6)Qn(t,r);else{if(s=t.current.alternate,!(r&30)&&!Zk(s)&&(e=jl(t,r),e===2&&(i=Yc(t),i!==0&&(r=i,e=Ed(t,i))),e===1))throw n=Co,Kr(t,0),Qn(t,r),ut(t,Ee()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(L(345));case 2:Ar(t,rt,wn);break;case 3:if(Qn(t,r),(r&130023424)===r&&(e=Qh+500-Ee(),10<e)){if(dl(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){Ye(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=id(Ar.bind(null,t,rt,wn),e);break}Ar(t,rt,wn);break;case 4:if(Qn(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-Ht(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=Ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xk(r/1960))-r,10<r){t.timeoutHandle=id(Ar.bind(null,t,rt,wn),r);break}Ar(t,rt,wn);break;case 5:Ar(t,rt,wn);break;default:throw Error(L(329))}}}return ut(t,Ee()),t.callbackNode===n?Yy.bind(null,t):null}function Ed(t,e){var n=eo;return t.current.memoizedState.isDehydrated&&(Kr(t,e).flags|=256),t=jl(t,e),t!==2&&(e=rt,rt=n,e!==null&&Cd(e)),t}function Cd(t){rt===null?rt=t:rt.push.apply(rt,t)}function Zk(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Kt(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Qn(t,e){for(e&=~Jh,e&=~su,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Ht(e),r=1<<n;t[n]=-1,e&=~r}}function Jp(t){if(re&6)throw Error(L(327));Ws();var e=dl(t,0);if(!(e&1))return ut(t,Ee()),null;var n=jl(t,e);if(t.tag!==0&&n===2){var r=Yc(t);r!==0&&(e=r,n=Ed(t,r))}if(n===1)throw n=Co,Kr(t,0),Qn(t,e),ut(t,Ee()),n;if(n===6)throw Error(L(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Ar(t,rt,wn),ut(t,Ee()),null}function Yh(t,e){var n=re;re|=1;try{return t(e)}finally{re=n,re===0&&(hi=Ee()+500,eu&&kr())}}function Xr(t){ir!==null&&ir.tag===0&&!(re&6)&&Ws();var e=re;re|=1;var n=Rt.transition,r=oe;try{if(Rt.transition=null,oe=1,t)return t()}finally{oe=r,Rt.transition=n,re=e,!(re&6)&&kr()}}function Xh(){ft=Ms.current,fe(Ms)}function Kr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,jk(n)),Te!==null)for(n=Te.return;n!==null;){var r=n;switch(Oh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&gl();break;case 3:ci(),fe(at),fe(Ke),Bh();break;case 5:Uh(r);break;case 4:ci();break;case 13:fe(ve);break;case 19:fe(ve);break;case 10:$h(r.type._context);break;case 22:case 23:Xh()}n=n.return}if(Ae=t,Te=t=pr(t.current,null),Me=ft=e,je=0,Co=null,Jh=su=Yr=0,rt=eo=null,Dr!==null){for(e=0;e<Dr.length;e++)if(n=Dr[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Dr=null}return t}function Xy(t,e){do{var n=Te;try{if(Ih(),qa.current=El,_l){for(var r=ye.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}_l=!1}if(Qr=0,Oe=Re=ye=null,Xi=!1,ko=0,Gh.current=null,n===null||n.return===null){je=1,Co=e,Te=null;break}e:{var i=t,o=n.return,a=n,l=e;if(e=Me,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=$p(o);if(h!==null){h.flags&=-257,Dp(h,o,a,i,e),h.mode&1&&Ip(i,u,e),e=h,l=u;var g=e.updateQueue;if(g===null){var m=new Set;m.add(l),e.updateQueue=m}else g.add(l);break e}else{if(!(e&1)){Ip(i,u,e),Zh();break e}l=Error(L(426))}}else if(me&&a.mode&1){var x=$p(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Dp(x,o,a,i,e),Ah(di(l,a));break e}}i=l=di(l,a),je!==4&&(je=2),eo===null?eo=[i]:eo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var w=Iy(i,l,e);jp(i,w);break e;case 1:a=l;var v=i.type,b=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(hr===null||!hr.has(b)))){i.flags|=65536,e&=-e,i.lanes|=e;var S=$y(i,a,e);jp(i,S);break e}}i=i.return}while(i!==null)}tw(n)}catch(k){e=k,Te===n&&n!==null&&(Te=n=n.return);continue}break}while(!0)}function Zy(){var t=Cl.current;return Cl.current=El,t===null?El:t}function Zh(){(je===0||je===3||je===2)&&(je=4),Ae===null||!(Yr&268435455)&&!(su&268435455)||Qn(Ae,Me)}function jl(t,e){var n=re;re|=2;var r=Zy();(Ae!==t||Me!==e)&&(wn=null,Kr(t,e));do try{e1();break}catch(s){Xy(t,s)}while(!0);if(Ih(),re=n,Cl.current=r,Te!==null)throw Error(L(261));return Ae=null,Me=0,je}function e1(){for(;Te!==null;)ew(Te)}function t1(){for(;Te!==null&&!CS();)ew(Te)}function ew(t){var e=rw(t.alternate,t,ft);t.memoizedProps=t.pendingProps,e===null?tw(t):Te=e,Gh.current=null}function tw(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=Gk(n,e),n!==null){n.flags&=32767,Te=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{je=6,Te=null;return}}else if(n=qk(n,e,ft),n!==null){Te=n;return}if(e=e.sibling,e!==null){Te=e;return}Te=e=t}while(e!==null);je===0&&(je=5)}function Ar(t,e,n){var r=oe,s=Rt.transition;try{Rt.transition=null,oe=1,n1(t,e,n,r)}finally{Rt.transition=s,oe=r}return null}function n1(t,e,n,r){do Ws();while(ir!==null);if(re&6)throw Error(L(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(L(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if($S(t,i),t===Ae&&(Te=Ae=null,Me=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||xa||(xa=!0,sw(cl,function(){return Ws(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Rt.transition,Rt.transition=null;var o=oe;oe=1;var a=re;re|=4,Gh.current=null,Qk(t,n),Jy(n,t),Sk(rd),hl=!!nd,rd=nd=null,t.current=n,Yk(n),TS(),re=a,oe=o,Rt.transition=i}else t.current=n;if(xa&&(xa=!1,ir=t,Rl=s),i=t.pendingLanes,i===0&&(hr=null),NS(n.stateNode),ut(t,Ee()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Tl)throw Tl=!1,t=kd,kd=null,t;return Rl&1&&t.tag!==0&&Ws(),i=t.pendingLanes,i&1?t===_d?to++:(to=0,_d=t):to=0,kr(),null}function Ws(){if(ir!==null){var t=Iv(Rl),e=Rt.transition,n=oe;try{if(Rt.transition=null,oe=16>t?16:t,ir===null)var r=!1;else{if(t=ir,ir=null,Rl=0,re&6)throw Error(L(331));var s=re;for(re|=4,F=t.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var d=F;switch(d.tag){case 0:case 11:case 15:Zi(8,d,i)}var c=d.child;if(c!==null)c.return=d,F=c;else for(;F!==null;){d=F;var f=d.sibling,h=d.return;if(Ky(d),d===u){F=null;break}if(f!==null){f.return=h,F=f;break}F=h}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}F=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,F=o;else e:for(;F!==null;){if(i=F,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Zi(9,i,i.return)}var w=i.sibling;if(w!==null){w.return=i.return,F=w;break e}F=i.return}}var v=t.current;for(F=v;F!==null;){o=F;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,F=b;else e:for(o=v;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ru(9,a)}}catch(k){Se(a,a.return,k)}if(a===o){F=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,F=S;break e}F=a.return}}if(re=s,kr(),cn&&typeof cn.onPostCommitFiberRoot=="function")try{cn.onPostCommitFiberRoot(Jl,t)}catch{}r=!0}return r}finally{oe=n,Rt.transition=e}}return!1}function Qp(t,e,n){e=di(n,e),e=Iy(t,e,1),t=dr(t,e,1),e=Ye(),t!==null&&(Wo(t,1,e),ut(t,e))}function Se(t,e,n){if(t.tag===3)Qp(t,t,n);else for(;e!==null;){if(e.tag===3){Qp(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hr===null||!hr.has(r))){t=di(n,t),t=$y(e,t,1),e=dr(e,t,1),t=Ye(),e!==null&&(Wo(e,1,t),ut(e,t));break}}e=e.return}}function r1(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Ye(),t.pingedLanes|=t.suspendedLanes&n,Ae===t&&(Me&n)===n&&(je===4||je===3&&(Me&130023424)===Me&&500>Ee()-Qh?Kr(t,0):Jh|=n),ut(t,e)}function nw(t,e){e===0&&(t.mode&1?(e=da,da<<=1,!(da&130023424)&&(da=4194304)):e=1);var n=Ye();t=jn(t,e),t!==null&&(Wo(t,e,n),ut(t,n))}function s1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),nw(t,n)}function i1(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(e),nw(t,n)}var rw;rw=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||at.current)ot=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ot=!1,Kk(t,e,n);ot=!!(t.flags&131072)}else ot=!1,me&&e.flags&1048576&&ay(e,wl,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Ja(t,e),t=e.pendingProps;var s=ai(e,Ke.current);Hs(e,n),s=Vh(null,e,r,t,s,n);var i=Hh();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,lt(r)?(i=!0,vl(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Mh(e),s.updater=nu,e.stateNode=s,s._reactInternals=e,hd(e,r,t,n),e=md(null,e,r,!0,i,n)):(e.tag=0,me&&i&&Ph(e),Ge(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Ja(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=a1(r),t=Dt(r,t),s){case 0:e=pd(null,e,r,t,n);break e;case 1:e=Up(null,e,r,t,n);break e;case 11:e=Mp(null,e,r,t,n);break e;case 14:e=Fp(null,e,r,Dt(r.type,t),n);break e}throw Error(L(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Dt(r,s),pd(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Dt(r,s),Up(t,e,r,s,n);case 3:e:{if(Uy(e),t===null)throw Error(L(387));r=e.pendingProps,i=e.memoizedState,s=i.element,fy(t,e),Sl(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=di(Error(L(423)),e),e=Bp(t,e,r,n,s);break e}else if(r!==s){s=di(Error(L(424)),e),e=Bp(t,e,r,n,s);break e}else for(gt=cr(e.stateNode.containerInfo.firstChild),vt=e,me=!0,Vt=null,n=dy(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(li(),r===s){e=Nn(t,e,n);break e}Ge(t,e,r,n)}e=e.child}return e;case 5:return py(e),t===null&&ud(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,sd(r,s)?o=null:i!==null&&sd(r,i)&&(e.flags|=32),Fy(t,e),Ge(t,e,o,n),e.child;case 6:return t===null&&ud(e),null;case 13:return By(t,e,n);case 4:return Fh(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=ui(e,null,r,n):Ge(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Dt(r,s),Mp(t,e,r,s,n);case 7:return Ge(t,e,e.pendingProps,n),e.child;case 8:return Ge(t,e,e.pendingProps.children,n),e.child;case 12:return Ge(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,ce(bl,r._currentValue),r._currentValue=o,i!==null)if(Kt(i.value,o)){if(i.children===s.children&&!at.current){e=Nn(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Cn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),cd(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),cd(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ge(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Hs(e,n),s=jt(s),r=r(s),e.flags|=1,Ge(t,e,r,n),e.child;case 14:return r=e.type,s=Dt(r,e.pendingProps),s=Dt(r.type,s),Fp(t,e,r,s,n);case 15:return Dy(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Dt(r,s),Ja(t,e),e.tag=1,lt(r)?(t=!0,vl(e)):t=!1,Hs(e,n),Ly(e,r,s),hd(e,r,s,n),md(null,e,r,!0,t,n);case 19:return zy(t,e,n);case 22:return My(t,e,n)}throw Error(L(156,e.tag))};function sw(t,e){return Pv(t,e)}function o1(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tt(t,e,n,r){return new o1(t,e,n,r)}function ef(t){return t=t.prototype,!(!t||!t.isReactComponent)}function a1(t){if(typeof t=="function")return ef(t)?1:0;if(t!=null){if(t=t.$$typeof,t===wh)return 11;if(t===bh)return 14}return 2}function pr(t,e){var n=t.alternate;return n===null?(n=Tt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 4,539 bytes, line 40
40ons=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Xa(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")ef(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Rs:return qr(n.children,s,i,e);case yh:o=8,s|=8;break;case $c:return t=Tt(12,n,e,s|2),t.elementType=$c,t.lanes=i,t;case Dc:return t=Tt(13,n,e,s),t.elementType=Dc,t.lanes=i,t;case Mc:return t=Tt(19,n,e,s),t.elementType=Mc,t.lanes=i,t;case pv:return iu(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case hv:o=10;break e;case fv:o=9;break e;case wh:o=11;break e;case bh:o=14;break e;case qn:o=16,r=null;break e}throw Error(L(130,t==null?t:typeof t,""))}return e=Tt(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function qr(t,e,n,r){return t=Tt(7,t,r,e),t.lanes=n,t}function iu(t,e,n,r){return t=Tt(22,t,r,e),t.elementType=pv,t.lanes=n,t.stateNode={isHidden:!1},t}function ac(t,e,n){return t=Tt(6,t,null,e),t.lanes=n,t}function lc(t,e,n){return e=Tt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function l1(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zu(0),this.expirationTimes=zu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zu(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function tf(t,e,n,r,s,i,o,a,l){return t=new l1(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Tt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mh(i),t}function u1(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ts,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function iw(t){if(!t)return yr;t=t._reactInternals;e:{if(rs(t)!==t||t.tag!==1)throw Error(L(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(lt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(L(171))}if(t.tag===1){var n=t.type;if(lt(n))return iy(t,n,e)}return e}function ow(t,e,n,r,s,i,o,a,l){return t=tf(n,r,!0,t,s,i,o,a,l),t.context=iw(null),n=t.current,r=Ye(),s=fr(n),i=Cn(r,s),i.callback=e??null,dr(n,i,s),t.current.lanes=s,Wo(t,s,r),ut(t,r),t}function ou(t,e,n,r){var s=e.current,i=Ye(),o=fr(s);return n=iw(n),e.context===null?e.context=n:e.pendingContext=n,e=Cn(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=dr(s,e,o),t!==null&&(Wt(t,s,o,i),Ka(t,s,o)),o}function Nl(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Yp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function nf(t,e){Yp(t,e),(t=t.alternate)&&Yp(t,e)}function c1(){return null}var aw=typeof reportError=="function"?reportError:function(t){console.error(t)};function rf(t){this._internalRoot=t}au.prototype.render=rf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(L(409));ou(t,e,null,null)};au.prototype.unmount=rf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Xr(function(){ou(null,t,null,null)}),e[Rn]=null}};function au(t){this._internalRoot=t}au.prototype.unstable_scheduleHydration=function(t){if(t){var e=Mv();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Jn.length&&e!==0&&e<Jn[n].priority;n++);Jn.splice(n,0,t),n===0&&Uv(t)}};function sf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function lu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Xp(){}function d1(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Nl(o);i.call(u)}}var o=ow(e,r,t,0,null,!1,!1,"",Xp);return t._reactRootContainer=o,t[Rn]=o.current,yo(t.nodeType===8?t.parentNode:t),Xr(
40),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Nl(l);a.call(u)}}var l=tf(t,0,!1,null,null,!1,!1,"",Xp);return t._reactRootContainer=l,t[Rn]=l.current,yo(t.nodeType===8?t.parentNode:t),Xr(function(){ou(e,l,n,r)}),l}function uu(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Nl(o);a.call(l)}}ou(e,o,t,s)}else o=d1(n,e,t,s,r);return Nl(o)}$v=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=zi(e.pendingLanes);n!==0&&(kh(e,n|1),ut(e,Ee()),!(re&6)&&(hi=Ee()+500,kr()))}break;case 13:Xr(function(){var r=jn(t,1);if(r!==null){var s=Ye();Wt(r,t,1,s)}}),nf(t,1)}};_h=function(t){if(t.tag===13){var e=jn(t,134217728);if(e!==null){var n=Ye();Wt(e,t,134217728,n)}nf(t,134217728)}};Dv=function(t){if(t.tag===13){var e=fr(t),n=jn(t,e);if(n!==null){var r=Ye();Wt(n,t,e,r)}nf(t,e)}};Mv=function(){return oe};Fv=function(t,e){var n=oe;try{return oe=t,e()}finally{oe=n}};Gc=function(t,e,n){switch(e){case"input":if(Bc(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=Zl(r);if(!s)throw Error(L(90));gv(r),Bc(r,s)}}}break;case"textarea":yv(t,n);break;case"select":e=n.value,e!=null&&Us(t,!!n.multiple,e,!1)}};Ev=Yh;Cv=Xr;var h1={usingClientEntryPoint:!1,Events:[qo,Os,Zl,kv,_v,Yh]},Ii={findFiberByHostInstance:$r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},f1={bundleType:Ii.bundleType,version:Ii.version,rendererPackageName:Ii.rendererPackageName,rendererConfig:Ii.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ln.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=jv(t),t===null?null:t.stateNode},findFiberByHostInstance:Ii.findFiberByHostInstance||c1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sa.isDisabled&&Sa.supportsFiber)try{Jl=Sa.inject(f1),cn=Sa}catch{}}bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h1;bt.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sf(e))throw Error(L(200));return u1(t,e,null,n)};bt.createRoot=function(t,e){if(!sf(t))throw Error(L(299));var n=!1,r="",s=aw;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=tf(t,1,!1,null,null,n,!1,r,s),t[Rn]=e.current,yo(t.nodeType===8?t.parentNode:t),new rf(e)};bt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(L(188)):(t=Object.keys(t).join(","),Error(L(268,t)));return t=jv(e),t=t===null?null:t.stateNode,t};bt.flushSync=function(t){return Xr(t)};bt.hydrate=function(t,e,n){if(!lu(e))throw Error(L(200));return uu(null,t,e,!0,n)};bt.hydrateRoot=function(t,e,n){if(!sf(t))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=aw;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=ow(e,null,t,1,n??null,s,!1,i,o),t[Rn]=e.current,yo(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new au(e)};bt.render=function(t,e,n){if(!lu(e))throw Error(L(200));return uu(null,t,e,!1,n)};bt.unmountComponentAtNode=function(t){if(!lu(t))throw Error(L(40));return t._reactRootContainer?(Xr(function(){uu(null,null,t,!1,function(){t._reactRootContainer=null,t[Rn]=null})}),!0):!1};bt.unstable_batchedUpdates=Yh;bt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!lu(n))throw Error(L(200));if(t==null||t._reactInternals===void 0)throw Error(L(38));return uu(t,e,n,!1,r)};bt.version="18.3.1-next-f1338f8080-20240426";function lw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lw)}catch(t){console.error(t)}}lw(),lv.exports=bt;var Jo=lv.exports;const uw=Qg(Jo);var cw,Zp=Jo;cw=Zp.createRoot,Zp.hydrateRoot;var cu=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(){}},du=typeof window>"u"||"Deno"in globalThis;function Mt(){}function p1(t,e){return typeof t=="function"?t(e):t}function m1(t){return typeof t=="number"&&t>=0&&t!==1/0}function g1(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Td(t,e){return typeof t=="function"?t(e):t}function v1(t,e){return typeof t=="function"?t(e):t}function em(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==of(o,e.options))return!1}else if(!Ro(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function tm(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(To(e.options.mutationKey)!==To(i))return!1}else if(!Ro(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function of(t,e){return((e==null?void 0:e.queryKeyHashFn)||To)(t)}function To(t){return JSON.stringify(t,(e,n)=>Rd(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ro(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ro(t[n],e[n])):!1}function dw(t,e){if(t===e)return t;const n=nm(t)&&nm(e);if(n||Rd(t)&&Rd(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{},l=new Set(r);let u=0;for(let d=0;d<o;d++){const c=n?d:i[d];(!n&&l.has(c)||n)&&t[c]===void 0&&e[c]===void 0?(a[c]=void 0,u++):(a[c]=dw(t[c],e[c]),a[c]===t[c]&&t[c]!==void 0&&u++)}return s===o&&u===s?t:a}return e}function nm(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Rd(t){if(!rm(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!rm(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function rm(t){return Object.prototype.toString.call(t)==="[object Object]"}function y1(t){return new Promise(e=>{setTimeout(e,t)})}function w1(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?dw(t,e):e}function b1(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function x1(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var af=Symbol();function hw(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===af?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Ur,Zn,Xs,zg,S1=(zg=class extends cu{constructor(){super();se(this,Ur);se(this,Zn);se(this,Xs);Y(this,Xs,e=>{if(!du&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Zn)||this.setEventListener(R(this,Xs))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,Zn))==null||e.call(this),Y(this,Zn,void 0))}setEventListener(e){var n;Y(this,Xs,e),(n=R(this,Zn))==null||n.call(this),Y(this,Zn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){R(this,Ur)!==e&&(Y(this,Ur,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 14,111 bytes, line 40
40this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof R(this,Ur)=="boolean"?R(this,Ur):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ur=new WeakMap,Zn=new WeakMap,Xs=new WeakMap,zg),fw=new S1,Zs,er,ei,Vg,k1=(Vg=class extends cu{constructor(){super();se(this,Zs,!0);se(this,er);se(this,ei);Y(this,ei,e=>{if(!du&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,er)||this.setEventListener(R(this,ei))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,er))==null||e.call(this),Y(this,er,void 0))}setEventListener(e){var n;Y(this,ei,e),(n=R(this,er))==null||n.call(this),Y(this,er,e(this.setOnline.bind(this)))}setOnline(e){R(this,Zs)!==e&&(Y(this,Zs,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return R(this,Zs)}},Zs=new WeakMap,er=new WeakMap,ei=new WeakMap,Vg),Pl=new k1;function _1(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function E1(t){return Math.min(1e3*2**t,3e4)}function pw(t){return(t??"online")==="online"?Pl.isOnline():!0}var mw=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function uc(t){return t instanceof mw}function gw(t){let e=!1,n=0,r=!1,s;const i=_1(),o=m=>{var x;r||(f(new mw(m)),(x=t.abort)==null||x.call(t))},a=()=>{e=!0},l=()=>{e=!1},u=()=>fw.isFocused()&&(t.networkMode==="always"||Pl.isOnline())&&t.canRun(),d=()=>pw(t.networkMode)&&t.canRun(),c=m=>{var x;r||(r=!0,(x=t.onSuccess)==null||x.call(t,m),s==null||s(),i.resolve(m))},f=m=>{var x;r||(r=!0,(x=t.onError)==null||x.call(t,m),s==null||s(),i.reject(m))},h=()=>new Promise(m=>{var x;s=w=>{(r||u())&&m(w)},(x=t.onPause)==null||x.call(t)}).then(()=>{var m;s=void 0,r||(m=t.onContinue)==null||m.call(t)}),g=()=>{if(r)return;let m;const x=n===0?t.initialPromise:void 0;try{m=x??t.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(c).catch(w=>{var _;if(r)return;const v=t.retry??(du?0:3),b=t.retryDelay??E1,S=typeof b=="function"?b(n,w):b,k=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,w);if(e||!k){f(w);return}n++,(_=t.onFail)==null||_.call(t,n,w),y1(S).then(()=>u()?void 0:h()).then(()=>{e?f(w):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?g():h().then(g),i)}}var C1=t=>setTimeout(t,0);function T1(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=C1;const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Qe=T1(),Br,Hg,vw=(Hg=class{constructor(){se(this,Br)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m1(this.gcTime)&&Y(this,Br,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(du?1/0:5*60*1e3))}clearGcTimeout(){R(this,Br)&&(clearTimeout(R(this,Br)),Y(this,Br,void 0))}},Br=new WeakMap,Hg),ti,zr,_t,Vr,He,zo,Hr,Ut,yn,Wg,R1=(Wg=class extends vw{constructor(e){super();se(this,Ut);se(this,ti);se(this,zr);se(this,_t);se(this,Vr);se(this,He);se(this,zo);se(this,Hr);Y(this,Hr,!1),Y(this,zo,e.defaultOptions),this.setOptions(e.options),this.observers=[],Y(this,Vr,e.client),Y(this,_t,R(this,Vr).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Y(this,ti,N1(this.options)),this.state=e.state??R(this,ti),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=R(this,He))==null?void 0:e.promise}setOptions(e){this.options={...R(this,zo),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,_t).remove(this)}setData(e,n){const r=w1(this.state.data,e,this.options);return Be(this,Ut,yn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Be(this,Ut,yn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=R(this,He))==null?void 0:r.promise;return(s=R(this,He))==null||s.cancel(e),n?n.then(Mt).catch(Mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,ti))}isActive(){return this.observers.some(e=>v1(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===af||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Td(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!g1(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=R(this,He))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=R(this,He))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),R(this,_t).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(R(this,He)&&(R(this,Hr)?R(this,He).cancel({revert:!0}):R(this,He).cancelRetry()),this.scheduleGc()),R(this,_t).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Be(this,Ut,yn).call(this,{type:"invalidate"})}fetch(e,n){var u,d,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,He))return R(this,He).continueRetry(),R(this,He).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Y(this,Hr,!0),r.signal)})},i=()=>{const f=hw(this.options,n),g=(()=>{const m={client:R(this,Vr),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return Y(this,Hr,!1),this.options.persister?this.options.persister(f,g,this):f(g)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,Vr),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),Y(this,zr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&Be(this,Ut,yn).call(this,{type:"fetch",meta:(c=a.fetchOptions)==null?void 0:c.meta});const l=f=>{var h,g,m,x;uc(f)&&f.silent||Be(this,Ut,yn).call(this,{type:"error",error:f}),uc(f)||((g=(h=R(this,_t).config).onError)==null||g.call(h,f,this),(x=(m=R(this,_t).config).onSettled)==null||x.call(m,this.state.data,f,this)),this.scheduleGc()};return Y(this,He,gw({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,g,m,x;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(w){l(w);return}(g=(h=R(this,_t).config).onSuccess)==null||g.call(h,f,this),(x=(m=R(this,_t).config).onSettled)==null||x.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Be(this,Ut,yn).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Be(this,Ut,yn).call(this,{type:"pause"})},onContinue:()=>{Be(this,Ut,yn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),R(this,He).start()}},ti=new WeakMap,zr=new WeakMap,_t=new WeakMap,Vr=new WeakMap,He=new WeakMap,zo=new WeakMap,Hr=new WeakMap,Ut=new WeakSet,yn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...j1(r.data,this.options),fetchMeta:e.meta??null};case"success":return Y(this,zr,void 0),{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return uc(s)&&s.revert&&R(this,zr)?{...R(this,zr),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,_t).notify({query:this,type:"updated",action:e})})},Wg);function j1(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pw(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function N1(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var tn,Kg,P1=(Kg=class extends cu{constructor(e={}){super();se(this,tn);this.config=e,Y(this,tn,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??of(s,n);let o=this.get(i);return o||(o=new R1({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){R(this,tn).has(e.queryHash)||(R(this,tn).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=R(this,tn).get(e.queryHash);n&&(e.destroy(),n===e&&R(this,tn).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Qe.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return R(this,tn).get(e)}getAll(){return[...R(this,tn).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>em(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>em(e,r)):n}notify(e){Qe.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},tn=new WeakMap,Kg),nn,qe,Wr,rn,Wn,qg,O1=(qg=class extends vw{constructor(e){super();se(this,rn);se(this,nn);se(this,qe);se(this,Wr);this.mutationId=e.mutationId,Y(this,qe,e.mutationCache),Y(this,nn,[]),this.state=e.state||A1(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){R(this,nn).includes(e)||(R(this,nn).push(e),this.clearGcTimeout(),R(this,qe).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Y(this,nn,R(this,nn).filter(n=>n!==e)),this.scheduleGc(),R(this,qe).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){R(this,nn).length||(this.state.status==="pending"?this.scheduleGc():R(this,qe).remove(this))}continue(){var e;return((e=R(this,Wr))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,u,d,c,f,h,g,m,x,w,v,b,S,k,_,E,C;const n=()=>{Be(this,rn,Wn).call(this,{type:"continue"})};Y(this,Wr,gw({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(N,j)=>{Be(this,rn,Wn).call(this,{type:"failed",failureCount:N,error:j})},onPause:()=>{Be(this,rn,Wn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,qe).canRun(this)}));const r=this.state.status==="pending",s=!R(this,Wr).canStart();try{if(r)n();else{Be(this,rn,Wn).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=R(this,qe).config).onMutate)==null?void 0:o.call(i,e,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));j!==this.state.context&&Be(this,rn,Wn).call(this,{type:"pending",context:j,variables:e,isPaused:s})}const N=await R(this,Wr).start();return await((d=(u=R(this,qe).config).onSuccess)==null?void 0:d.call(u,N,e,this.state.context,this)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,N,e,this.state.context)),await((g=(h=R(this,qe).config).onSettled)==null?void 0:g.call(h,N,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,N,null,e,this.state.context)),Be(this,rn,Wn).call(this,{type:"success",data:N}),N}catch(N){try{throw await((v=(w=R(this,qe).config).onError)==null?void 0:v.call(w,N,e,this.state.context,this)),await((S=(b=this.options).onError)==null?void 0:S.call(b,N,e,this.state.context)),await((_=(k=R(this,qe).config).onSettled)==null?void 0:_.call(k,void 0,N,this.state.variables,this.state.context,this)),await((C=(E=this.options).onSettled)==null?void 0:C.call(E,void 0,N,e,this.state.context)),N}finally{Be(this,rn,Wn).call(this,{type:"error",error:N})}}finally{R(this,qe).runNext(this)}}},nn=new WeakMap,qe=new WeakMap,Wr=new WeakMap,rn=new WeakSet,Wn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};
40case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>{R(this,nn).forEach(r=>{r.onMutationUpdate(e)}),R(this,qe).notify({mutation:this,type:"updated",action:e})})},qg);function A1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kn,Bt,Vo,Gg,L1=(Gg=class extends cu{constructor(e={}){super();se(this,kn);se(this,Bt);se(this,Vo);this.config=e,Y(this,kn,new Set),Y(this,Bt,new Map),Y(this,Vo,0)}build(e,n,r){const s=new O1({mutationCache:this,mutationId:++ia(this,Vo)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){R(this,kn).add(e);const n=ka(e);if(typeof n=="string"){const r=R(this,Bt).get(n);r?r.push(e):R(this,Bt).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(R(this,kn).delete(e)){const n=ka(e);if(typeof n=="string"){const r=R(this,Bt).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&R(this,Bt).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=ka(e);if(typeof n=="string"){const r=R(this,Bt).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=ka(e);if(typeof n=="string"){const s=(r=R(this,Bt).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{R(this,kn).forEach(e=>{this.notify({type:"removed",mutation:e})}),R(this,kn).clear(),R(this,Bt).clear()})}getAll(){return Array.from(R(this,kn))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>tm(n,r))}findAll(e={}){return this.getAll().filter(n=>tm(e,n))}notify(e){Qe.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(e.map(n=>n.continue().catch(Mt))))}},kn=new WeakMap,Bt=new WeakMap,Vo=new WeakMap,Gg);function ka(t){var e;return(e=t.options.scope)==null?void 0:e.id}function sm(t){return{onFetch:(e,n)=>{var d,c,f,h,g;const r=e.options,s=(f=(c=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,i=((h=e.state.data)==null?void 0:h.pages)||[],o=((g=e.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},w=hw(e.options,e.fetchOptions),v=async(b,S,k)=>{if(m)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const B={client:e.client,queryKey:e.queryKey,pageParam:S,direction:k?"backward":"forward",meta:e.options.meta};return x(B),B})(),C=await w(E),{maxPages:N}=e.options,j=k?x1:b1;return{pages:j(b.pages,C,N),pageParams:j(b.pageParams,S,N)}};if(s&&i.length){const b=s==="backward",S=b?I1:im,k={pages:i,pageParams:o},_=S(r,k);a=await v(k,_,b)}else{const b=t??i.length;do{const S=l===0?o[0]??r.initialPageParam:im(r,a);if(l>0&&S==null)break;a=await v(a,S),l++}while(l<b)}return a};e.options.persister?e.fetchFn=()=>{var m,x;return(x=(m=e.options).persister)==null?void 0:x.call(m,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function im(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function I1(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var be,tr,nr,ni,ri,rr,si,ii,Jg,$1=(Jg=class{constructor(t={}){se(this,be);se(this,tr);se(this,nr);se(this,ni);se(this,ri);se(this,rr);se(this,si);se(this,ii);Y(this,be,t.queryCache||new P1),Y(this,tr,t.mutationCache||new L1),Y(this,nr,t.defaultOptions||{}
vendor: 5,641 bytes, lines 40-49
40),Y(this,ni,new Map),Y(this,ri,new Map),Y(this,rr,0)}mount(){ia(this,rr)._++,R(this,rr)===1&&(Y(this,si,fw.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,be).onFocus())})),Y(this,ii,Pl.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,be).onOnline())})))}unmount(){var t,e;ia(this,rr)._--,R(this,rr)===0&&((t=R(this,si))==null||t.call(this),Y(this,si,void 0),(e=R(this,ii))==null||e.call(this),Y(this,ii,void 0))}isFetching(t){return R(this,be).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,tr).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=R(this,be).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=R(this,be).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Td(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return R(this,be).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=R(this,be).get(r.queryHash),i=s==null?void 0:s.state.data,o=p1(e,i);if(o!==void 0)return R(this,be).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Qe.batch(()=>R(this,be).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=R(this,be).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=R(this,be);Qe.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=R(this,be);return Qe.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Qe.batch(()=>R(this,be).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Mt).catch(Mt)}invalidateQueries(t,e={}){return Qe.batch(()=>(R(this,be).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Qe.batch(()=>R(this,be).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Mt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Mt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=R(this,be).build(this,e);return n.isStaleByTime(Td(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Mt).catch(Mt)}fetchInfiniteQuery(t){return t.behavior=sm(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Mt).catch(Mt)}ensureInfiniteQueryData(t){return t.behavior=sm(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Pl.isOnline()?R(this,tr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,be)}getMutationCache(){return R(this,tr)}getDefaultOptions(){return R(this,nr)}setDefaultOptions(t){Y(this,nr,t)}setQueryDefaults(t,e){R(this,ni).set(To(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...R(this,ni).values()],n={};return e.forEach(r=>{Ro(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){R(this,ri).set(To(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...R(this,ri).values()],n={};return e.forEach(r=>{Ro(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...R(this,nr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=of(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===af&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,nr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,be).clear(),R(this,tr).clear()}},be=new WeakMap,tr=new WeakMap,nr=new WeakMap,ni=new WeakMap,ri=new WeakMap,rr=new WeakMap,si=new WeakMap,ii=new WeakMap,Jg),D1=y.createContext(void 0),M1=({client:t,children:e})=>(y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),p.jsx(D1.Provider,{value:t,children:e}));/**
41 * @remix-run/router v1.23.0
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function jo(){return jo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jo.apply(this,arguments)}var or;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(or||(or={}));const om="popstate";function F1(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return jd("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Ol(s)}return B1(e,n,null,t)}function ke(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function yw(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function U1(){return Math.random().toString(36).substr(2,8)}function am(t,e){return{usr:t.state,key:t.key,idx:e}}
vendor: 4,280 bytes, line 49
49function jd(t,e,n,r){return n===void 0&&(n=null),jo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?bi(e):e,{state:n,key:e&&e.key||r||U1()})}function Ol(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function bi(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function B1(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=or.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(jo({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function c(){a=or.Pop;let x=d(),w=x==null?null:x-u;u=x,l&&l({action:a,location:m.location,delta:w})}function f(x,w){a=or.Push;let v=jd(m.location,x,w);u=d()+1;let b=am(v,u),S=m.createHref(v);try{o.pushState(b,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(S)}i&&l&&l({action:a,location:m.location,delta:1})}function h(x,w){a=or.Replace;let v=jd(m.location,x,w);u=d();let b=am(v,u),S=m.createHref(v);o.replaceState(b,"",S),i&&l&&l({action:a,location:m.location,delta:0})}function g(x){let w=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof x=="string"?x:Ol(x);return v=v.replace(/ $/,"%20"),ke(w,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,w)}let m={get action(){return a},get location(){return t(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(om,c),l=x,()=>{s.removeEventListener(om,c),l=null}},createHref(x){return e(s,x)},createURL:g,encodeLocation(x){let w=g(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:h,go(x){return o.go(x)}};return m}var lm;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(lm||(lm={}));function z1(t,e,n){return n===void 0&&(n="/"),V1(t,e,n,!1)}function V1(t,e,n,r){let s=typeof e=="string"?bi(e):e,i=fi(s.pathname||"/",n);if(i==null)return null;let o=ww(t);H1(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=t_(i);a=Z1(o[l],u,r)}return a}function ww(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(ke(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=mr([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(ke(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ww(i.children,e,d,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:Y1(u,i.index),routesMeta:d})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of bw(i.path))s(i,o,l)}),e}function bw(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=bw(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function H1(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:X1(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const W1=/^:[\w-]+$/,K1=3,q1=2,G1=1,J1=10,Q1=-2,um=t=>t==="*";function Y1(t,e){let n=t.split("/"),r=n.length;return n.some(um)&&(r+=Q1),e&&(r+=q1),n.filter(s=>!um(s)).reduce((s,i)=>s+(W1.test(i)?K1:i===""?G1:J1),r)}function X1(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function Z1(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=i==="/"?e:e.slice(i.length)||"/",c=Al({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=Al({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;
vendor: 6,961 bytes, lines 49-58
49Object.assign(s,c.params),o.push({params:s,pathname:mr([i,c.pathname]),pathnameBase:i_(mr([i,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(i=mr([i,c.pathnameBase]))}return o}function Al(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=e_(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,c)=>{let{paramName:f,isOptional:h}=d;if(f==="*"){let m=a[c]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const g=a[c];return h&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function e_(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),yw(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 r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function t_(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return yw(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function fi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function n_(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?bi(t):t;return{pathname:n?n.startsWith("/")?n:r_(n,e):e,search:o_(r),hash:a_(s)}}function r_(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function cc(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function s_(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function xw(t,e){let n=s_(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Sw(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=bi(t):(s=jo({},t),ke(!s.pathname||!s.pathname.includes("?"),cc("?","pathname","search",s)),ke(!s.pathname||!s.pathname.includes("#"),cc("#","pathname","hash",s)),ke(!s.search||!s.search.includes("#"),cc("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let c=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),c-=1;s.pathname=f.join("/")}a=c>=0?e[c]:"/"}let l=n_(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const mr=t=>t.join("/").replace(/\/\/+/g,"/"),i_=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),o_=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,a_=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function l_(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const kw=["post","put","patch","delete"];new Set(kw);const u_=["get",...kw];new Set(u_);/**
50 * React Router v6.30.1
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function No(){return No=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},No.apply(this,arguments)}const hu=y.createContext(null),_w=y.createContext(null),_r=y.createContext(null),fu=y.createContext(null),Er=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Ew=y.createContext(null);function c_(t,e){let{relative:n}=e===void 0?{}:e;Qo()||ke(!1);let{basename:r,navigator:s}=y.useContext(_r),{hash:i,pathname:o,search:a}=pu(t,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:mr([r,o])),s.createHref({pathname:l,search:a,hash:i})}function Qo(){return y.useContext(fu)!=null}function xi(){return Qo()||ke(!1),y.useContext(fu).location}function Cw(t){y.useContext(_r).static||y.useLayoutEffect(t)}function lf(){let{isDataRoute:t}=y.useContext(Er);return t?E_():d_()}function d_(){Qo()||ke(!1);let t=y.useContext(hu),{basename:e,future:n,navigator:r}=y.useContext(_r),{matches:s}=y.useContext(Er),{pathname:i}=xi(),o=JSON.stringify(xw(s,n.v7_relativeSplatPath)),a=y.useRef(!1);return Cw(()=>{a.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=Sw(u,JSON.parse(o),i,d.relative==="path");t==null&&e!=="/"&&(c.pathname=c.pathname==="/"?e:mr([e,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[e,r,o,i,t])}const h_=y.createContext(null);function f_(t){let e=y.useContext(Er).outlet;return e&&y.createElement(h_.Provider,{value:t},e)}function pu(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=y.useContext(_r),{matches:s}=y.useContext(Er),{pathname:i}=xi(),o=JSON.stringify(xw(s,r.v7_relativeSplatPath));return y.useMemo(()=>Sw(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function p_(t,e){return m_(t,e)}function m_(t,e,n,r){Qo()||ke(!1);let{navigator:s}=y.useContext(_r),{matches:i}=y.useContext(Er),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=xi(),d;if(e){var c;let x=typeof e=="string"?bi(e):e;l==="/"||(c=x.pathname)!=null&&c.startsWith(l)||ke(!1),d=x}else d=u;let f=d.pathname||"/",h=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let g=z1(t,{pathname:h}),m=b_(g&&g.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:mr([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:mr([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return e&&m?y.createElement(fu.Provider,{value:{location:No({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:or.Pop}},m):m}function g_(){let t=__(),e=l_(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application 
58Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),n?y.createElement("pre",{style:s},n):null,null)}const v_=y.createElement(g_,null);class y_ extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?y.createElement(Er.Provider,{value:this.props.routeContext},y.createElement(Ew.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function w_(t){let{routeContext:e,match:n,children:r}=t,s=y.useContext(hu);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Er.Provider,{value:e},r)}function b_(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||ke(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:f,errors:h}=n,g=c.route.loader&&f[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||g){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,f)=>{let h,g=!1,m=null,x=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,m=c.route.errorElement||v_,l&&(u<0&&f===0?(g=!0,x=null):u===f&&(g=!0,x=c.route.hydrateFallbackElement||null)));let w=e.concat(o.slice(0,f+1)),v=()=>{let b;return h?b=m:g?b=x:c.route.Component?b=y.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=d,y.createElement(w_,{match:c,routeContext:{outlet:d,matches:w,isDataRoute:n!=null},children:b})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?y.createElement(y_,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):v()},null)}var Tw=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Tw||{}),Ll=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Ll||{});function x_(t){let e=y.useContext(hu);return e||ke(!1),e}function S_(t){let e=y.useContext(_w);return e||ke(!1),e}function k_(t){let e=y.useContext(Er);return e||ke(!1),e}function Rw(t){let e=k_(),n=e.matches[e.matches.length-1];return n.route.id||ke(!1),n.route.id}function __(){var t;let e=y.useContext(Ew),n=S_(Ll.UseRouteError),r=Rw(Ll.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function E_(){let{router:t}=x_(Tw.UseNavigateStable),e=Rw(Ll.UseNavigateStable),n=y.useRef(!1);return Cw(()=>{n.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,No({fromRouteId:e},i)))},[t,e])}function C_(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function T_(t){return f_(t.context)}function kt(t){ke(!1)}function R_(t){let{basename:e="/",children:n=null,location:r,navigationType:s=or.Pop,navigator:i,static:o=!1,future:a}=t;Qo()&&ke(!1);let l=e.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:i,static:o,future:No({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=bi(r));let{pathname:d="/",search:c="",hash:f="",state:h=null,key:g="default"}=r,m=y.useMemo(()=>{let x=fi(d,l);return x==null?null:{location:{pathname:x,search:c,hash:f,state:h,key:g},navigationType:s}},[l,d,c,f,h,g,s]);return m==null?null:y.createElement(_r.Provider,{value:u},y.createElement(fu.Provider,{children:n,value:m}))}function j_(t){let{children:e,location:n}=t;return p_(Nd(e),n)}new Promise(()=>{});function Nd(t,e){e===void 0&&(e=[]);let n=[];
58return y.Children.forEach(t,(r,s)=>{if(!y.isValidElement(r))return;let i=[...e,s];if(r.type===y.Fragment){n.push.apply(n,Nd(r.props.children,i));return}r.type!==kt&&ke(!1),!r.props.index||!r.props.children||ke(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Nd(r.props.children,i)),n.push(o)}),n}/**
59 * React Router DOM v6.30.1
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function Il(){return Il=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Il.apply(this,arguments)}function jw(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function N_(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function P_(t,e){return t.button===0&&(!e||e==="_self")&&!N_(t)}const O_=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],A_=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],L_="6";try{window.__reactRouterVersion=L_}catch{}const I_=y.createContext({isTransitioning:!1}),$_="startTransition",cm=ph[$_];function D_(t){let{basename:e,children:n,future:r,window:s}=t,i=y.useRef();i.current==null&&(i.current=F1({window:s,v5Compat:!0}));let o=i.current,[a,l]=y.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=y.useCallback(c=>{u&&cm?cm(()=>l(c)):l(c)},[l,u]);return y.useLayoutEffect(()=>o.listen(d),[o,d]),y.useEffect(()=>C_(r),[r]),y.createElement(R_,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const M_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",F_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gr=y.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:c}=e,f=jw(e,O_),{basename:h}=y.useContext(_r),g,m=!1;if(typeof u=="string"&&F_.test(u)&&(g=u,M_))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),k=fi(S.pathname,h);S.origin===b.origin&&k!=null?u=k+S.search+S.hash:m=!0}catch{}let x=c_(u,{relative:s}),w=B_(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:c});function v(b){r&&r(b),b.defaultPrevented||w(b)}return y.createElement("a",Il({},f,{href:g||x,onClick:m||i?r:v,ref:n,target:l}))}),dm=y.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,viewTransition:u,children:d}=e,c=jw(e,A_),f=pu(l,{relative:c.relative}),h=xi(),g=y.useContext(_w),{navigator:m,basename:x}=y.useContext(_r),w=g!=null&&z_(f)&&u===!0,v=m.encodeLocation?m.encodeLocation(f).pathname:f.pathname,b=h.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;s||(b=b.toLowerCase(),S=S?S.toLowerCase():null,v=v.toLowerCase()),S&&x&&(S=fi(S,x)||S);const k=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let _=b===v||!o&&b.startsWith(v)&&b.charAt(k)==="/",E=S!=null&&(S===v||!o&&S.startsWith(v)&&S.charAt(v.length)==="/"),C={isActive:_,isPending:E,isTransitioning:w},N=_?r:void 0,j;typeof i=="function"?j=i(C):j=[i,_?"active":null,E?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let B=typeof a=="function"?a(C):a;return y.createElement(gr,Il({},c,{"aria-current":N,className:j,ref:n,style:B,to:l,viewTransition:u}),typeof d=="function"?d(C):d)});var Pd;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Pd||(Pd={}));var hm;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(hm||(hm={}));function U_(t){let e=y.useContext(hu);return e||ke(!1),e}function B_(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=lf(),u=xi(),d=pu(t,{relative:o});return y.useCallback(c=>{if(P_(c,n)){c.preventDefault();let f=r!==void 0?r:Ol(u)===Ol(d);l(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,d,r,s,n,t,i,o,a])}function z_(t,e){e===void 0&&(e={});let n=y.useContext(I_);n==null&&ke(!1);let{basename:r}=U_(Pd.useViewTransitionState),s=pu(t,{relative:e.relative});if(!n.isTransitioning)return!1;let i=fi(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=fi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Al(s.pathname,o)!=null||Al(s.pathname,i)!=null}
67var fm=["light","dark"],V_="(prefers-color-scheme: dark)",H_=y.createContext(void 0),W_={setTheme:t=>{},themes:[]},K_=()=>{var t;return(t=y.useContext(H_))!=null?t:W_};y.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,c=s?fm.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(g,m=!1,x=!0)=>{let w=o?o[g]:g,v=m?g+"|| ''":`'${w}'`,b="";return s&&x&&!m&&fm.includes(g)&&(b+=`d.style.colorScheme = '${g}';`),n==="class"?m||w?b+=`c.add(${v})`:b+="null":w&&(b+=`d[s](n,${v})`),b},h=t?`!function(){${d}${f(t)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${V_}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${c}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${c}}catch(t){}}();`;return y.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var q_=t=>{switch(t){case"success":return Q_;case"info":return X_;case"warning":return Y_;case"error":return Z_;default:return null}},G_=Array(12).fill(0),J_=({visible:t,className:e})=>I.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},I.createElement("div",{className:"sonner-spinner"},G_.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Q_=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),Y_=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.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"})),X_=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),Z_=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),eE=I.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"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),tE=()=>{let[t,e]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Od=1,nE=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Od++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>
67(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],I.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(sE(l)&&!l.ok){s=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,d=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:u,description:d})}else if(e.success!==void 0){s=!1;let u=typeof e.success=="function"?await e.success(l):e.success,d=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let u=typeof e.error=="function"?await e.error(l):e.error,d=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Od++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},nt=new nE,rE=(t,e)=>{let n=(e==null?void 0:e.id)||Od++;return nt.addToast({title:t,...e,id:n}),n},sE=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",iE=rE,oE=()=>nt.toasts,aE=()=>nt.getActiveToasts();Object.assign(iE,{success:nt.success,info:nt.info,warning:nt.warning,error:nt.error,custom:nt.custom,message:nt.message,promise:nt.promise,dismiss:nt.dismiss,loading:nt.loading},{getHistory:oE,getToasts:aE});function lE(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}lE(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
67left: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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
67:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
67--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)}
68`);function _a(t){return t.label!==void 0}var uE=3,cE="32px",dE="16px",pm=4e3,hE=356,fE=14,pE=20,mE=200;function It(...t){return t.filter(Boolean).join(" ")}function gE(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var vE=t=>{var e,n,r,s,i,o,a,l,u,d,c;let{invert:f,toast:h,unstyled:g,interacting:m,setHeights:x,visibleToasts:w,heights:v,index:b,toasts:S,expanded:k,removeToast:_,defaultRichColors:E,closeButton:C,style:N,cancelButtonStyle:j,actionButtonStyle:B,className:A="",descriptionClassName:$="",duration:O,position:V,gap:D,loadingIcon:H,expandByDefault:T,classNames:P,icons:M,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:z}
vendor: 4,368 bytes, line 68
68=t,[J,Z]=I.useState(null),[ge,Ue]=I.useState(null),[ie,is]=I.useState(!1),[$n,Tr]=I.useState(!1),[Dn,os]=I.useState(!1),[Mn,na]=I.useState(!1),[Ou,ra]=I.useState(!1),[Au,Ci]=I.useState(0),[as,Mf]=I.useState(0),Ti=I.useRef(h.duration||O||pm),Ff=I.useRef(null),Rr=I.useRef(null),Ax=b===0,Lx=b+1<=w,St=h.type,ls=h.dismissible!==!1,Ix=h.className||"",$x=h.descriptionClassName||"",sa=I.useMemo(()=>v.findIndex(Q=>Q.toastId===h.id)||0,[v,h.id]),Dx=I.useMemo(()=>{var Q;return(Q=h.closeButton)!=null?Q:C},[h.closeButton,C]),Uf=I.useMemo(()=>h.duration||O||pm,[h.duration,O]),Lu=I.useRef(0),us=I.useRef(0),Bf=I.useRef(0),cs=I.useRef(null),[Mx,Fx]=V.split("-"),zf=I.useMemo(()=>v.reduce((Q,le,pe)=>pe>=sa?Q:Q+le.height,0),[v,sa]),Vf=tE(),Ux=h.invert||f,Iu=St==="loading";us.current=I.useMemo(()=>sa*D+zf,[sa,zf]),I.useEffect(()=>{Ti.current=Uf},[Uf]),I.useEffect(()=>{is(!0)},[]),I.useEffect(()=>{let Q=Rr.current;if(Q){let le=Q.getBoundingClientRect().height;return Mf(le),x(pe=>[{toastId:h.id,height:le,position:h.position},...pe]),()=>x(pe=>pe.filter(Pt=>Pt.toastId!==h.id))}},[x,h.id]),I.useLayoutEffect(()=>{if(!ie)return;let Q=Rr.current,le=Q.style.height;Q.style.height="auto";let pe=Q.getBoundingClientRect().height;Q.style.height=le,Mf(pe),x(Pt=>Pt.find(Ot=>Ot.toastId===h.id)?Pt.map(Ot=>Ot.toastId===h.id?{...Ot,height:pe}:Ot):[{toastId:h.id,height:pe,position:h.position},...Pt])},[ie,h.title,h.description,x,h.id]);let Fn=I.useCallback(()=>{Tr(!0),Ci(us.current),x(Q=>Q.filter(le=>le.toastId!==h.id)),setTimeout(()=>{_(h)},mE)},[h,_,x,us]);I.useEffect(()=>{if(h.promise&&St==="loading"||h.duration===1/0||h.type==="loading")return;let Q;return k||m||z&&Vf?(()=>{if(Bf.current<Lu.current){let le=new Date().getTime()-Lu.current;Ti.current=Ti.current-le}Bf.current=new Date().getTime()})():Ti.current!==1/0&&(Lu.current=new Date().getTime(),Q=setTimeout(()=>{var le;(le=h.onAutoClose)==null||le.call(h,h),Fn()},Ti.current)),()=>clearTimeout(Q)},[k,m,h,St,z,Vf,Fn]),I.useEffect(()=>{h.delete&&Fn()},[Fn,h.delete]);function Bx(){var Q,le,pe;return M!=null&&M.loading?I.createElement("div",{className:It(P==null?void 0:P.loader,(Q=h==null?void 0:h.classNames)==null?void 0:Q.loader,"sonner-loader"),"data-visible":St==="loading"},M.loading):H?I.createElement("div",{className:It(P==null?void 0:P.loader,(le=h==null?void 0:h.classNames)==null?void 0:le.loader,"sonner-loader"),"data-visible":St==="loading"},H):I.createElement(J_,{className:It(P==null?void 0:P.loader,(pe=h==null?void 0:h.classNames)==null?void 0:pe.loader),visible:St==="loading"})}return I.createElement("li",{tabIndex:0,ref:Rr,className:It(A,Ix,P==null?void 0:P.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,P==null?void 0:P.default,P==null?void 0:P[St],(n=h==null?void 0:h.classNames)==null?void 0:n[St]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:E,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":ie,"data-promise":!!h.promise,"data-swiped":Ou,"data-removed":$n,"data-visible":Lx,"data-y-position":Mx,"data-x-position":Fx,"data-index":b,"data-front":Ax,"data-swiping":Dn,"data-dismissible":ls,"data-type":St,"data-invert":Ux,"data-swipe-out":Mn,"data-swipe-direction":ge,"data-expanded":!!(k||T&&ie),style:{"--index":b,"--toasts-before":b,"--z-index":S.length-b,"--offset":`${$n?Au:us.current}px`,"--initial-height":T?"auto":`${as}px`,...N,...h.style},onDragEnd:()=>{os(!1),Z(null),cs.current=null},onPointerDown:Q=>{Iu||!ls||(Ff.current=new Date,Ci(us.current),Q.target.setPointerCapture(Q.pointerId),Q.target.tagName!=="BUTTON"&&(os(!0),cs.current={x:Q.clientX,y:Q.clientY}))},onPointerUp:()=>{var Q,le,pe,Pt;if(Mn||!ls)return;cs.current=null;let Ot=Number(((Q=Rr.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Un=Number(((le=Rr.current)==null?void 0:le.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),jr=new Date().getTime()-((pe=Ff.current)==null?void 0:pe.getTime()),At=J==="x"?Ot:Un,Bn=Math.abs(At)/jr;if(Math.abs(At)>=pE||Bn>.11){Ci(us.current),(Pt=h.onDismiss)==null||Pt.call(h,h),Ue(J==="x"?Ot>0?"right":"left":Un>0?"down":"up"),Fn(),na(!0),ra(!1);return}os(!1),Z(null)},onPointerMove:Q=>{var le,pe,Pt,Ot;if(!cs.current||!ls||((le=window.getSelection())==null?void 0:le.toString().length)>0)return;let Un=Q.clientY-cs.current.y,jr=Q.clientX-cs.current.x,At=(pe=t.swipeDirections)!=null?pe
68:gE(V);!J&&(Math.abs(jr)>1||Math.abs(Un)>1)&&Z(Math.abs(jr)>Math.abs(Un)?"x":"y");let Bn={x:0,y:0};J==="y"?(At.includes("top")||At.includes("bottom"))&&(At.includes("top")&&Un<0||At.includes("bottom")&&Un>0)&&(Bn.y=Un):J==="x"&&(At.includes("left")||At.includes("right"))&&(At.includes("left")&&jr<0||At.includes("right")&&jr>0)&&(Bn.x=jr),(Math.abs(Bn.x)>0||Math.abs(Bn.y)>0)&&ra(!0),(Pt=Rr.current)==null||Pt.style.setProperty("--swipe-amount-x",`${Bn.x}px`),(Ot=Rr.current)==null||Ot.style.setProperty("--swipe-amount-y",`${Bn.y}px`)}},Dx&&!h.jsx?I.createElement("button",{"aria-label":W,"data-disabled":Iu,"data-close-button":!0,onClick:Iu||!ls?()=>{}:()=>{var Q;Fn(),(Q=h.onDismiss)==null||Q.call(h,h)},className:It(P==null?void 0:P.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:eE):null,h.jsx||y.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:I.createElement(I.Fragment,null,St||h.icon||h.promise?I.createElement("div",{"data-icon":"",className:It(P==null?void 0:P.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Bx():null,h.type!=="loading"?h.icon||(M==null?void 0:M[St])||q_(St):null):null,I.createElement("div",{"data-content":"",className:It(P==null?void 0:P.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:It(P==null?void 0:P.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?I.createElement("div",{"data-description":"",className:It($,$x,P==null?void 0:P.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),y.isValidElement(h.cancel)?h.cancel:h.cancel&&_a(h.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||j,onClick:Q=>{var le,pe;_a(h.cancel)&&ls&&((pe=(le=h.cancel).onClick)==null||pe.call(le,Q),Fn())},className:It(P==null?void 0:P.cancelButton,(d=h==null?void 0:h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,y.isValidElement(h.action)?h.action:h.action&&_a(h.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||B,onClick:Q=>{var le,pe;_a(h.action)&&((pe=(le=h.action).onClick)==null||pe.call(le,Q),!Q.defaultPrevented&&Fn())},className:It(P==null?void 0:P.actionButton,(c=h==null?void 0:h.classNames)==null?void 0:c.actionButton)},h.action.label):null))};function mm(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function yE(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?dE:cE;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var wE=y.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:c,duration:f,style:h,visibleToasts:g=uE,toastOptions:m,dir:x=mm(),gap:w=fE,loadingIcon:v,icons:b,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=t,[_,E]=I.useState([]),C=I.useMemo(()=>Array.from(new Set([r].concat(_.filter(z=>z.position).map(z=>z.position)))),[_,r]),[N,j]=I.useState([]),[B,A]=I.useState(!1),[$,O]=I.useState(!1),[V,D]=I.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=I.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=I.useRef(null),M=I.useRef(!1),W=I.useCallback(z=>{E(J=>{var Z;return(Z=J.find(ge=>ge.id===z.id))!=null&&Z.delete||nt.dismiss(z.id),J.filter(({id:ge})=>ge!==z.id)})},[]);return I.useEffect(()=>nt.subscribe(z=>{if(z.dismiss){E(J=>J.map(Z=>Z.id===z.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{uw.flushSync(()=>{E(J=>{let Z=J.findIndex(ge=>ge.id===z.id);return Z!==-1?[...J.slice(0,Z),{...J[Z],...z},...J.slice(Z+1)]:[z,...J]})})})}),[]),I.useEffect(()=>{if(d!=="system"){D(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:J})=>{D(J?"dark":"light")})}catch{z.addListener(({matches:Z})=>
68{try{D(Z?"dark":"light")}catch(ge){console.error(ge)}})}},[d]),I.useEffect(()=>{_.length<=1&&A(!1)},[_]),I.useEffect(()=>{let z=J=>{var Z,ge;s.every(Ue=>J[Ue]||J.code===Ue)&&(A(!0),(Z=H.current)==null||Z.focus()),J.code==="Escape"&&(document.activeElement===H.current||(ge=H.current)!=null&&ge.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[s]),I.useEffect(()=>{if(H.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,M.current=!1)}},[H.current]),I.createElement("section",{ref:e,"aria-label":`${S} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((z,J)=>{var Z;let[ge,Ue]=z.split("-");return _.length?I.createElement("ol",{key:z,dir:x==="auto"?mm():x,tabIndex:-1,ref:H,className:a,"data-sonner-toaster":!0,"data-theme":V,"data-y-position":ge,"data-lifted":B&&_.length>1&&!i,"data-x-position":Ue,style:{"--front-toast-height":`${((Z=N[0])==null?void 0:Z.height)||0}px`,"--width":`${hE}px`,"--gap":`${w}px`,...h,...yE(l,u)},onBlur:ie=>{M.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(M.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||M.current||(M.current=!0,P.current=ie.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{$||A(!1)},onDragEnd:()=>A(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||O(!0)},onPointerUp:()=>O(!1)},_.filter(ie=>!ie.position&&J===0||ie.position===z).map((ie,is)=>{var $n,Tr;return I.createElement(vE,{key:ie.id,icons:b,index:is,toast:ie,defaultRichColors:c,duration:($n=m==null?void 0:m.duration)!=null?$n:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:g,closeButton:(Tr=m==null?void 0:m.closeButton)!=null?Tr:o,interacting:$,position:z,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:W,toasts:_.filter(Dn=>Dn.position==ie.position),heights:N.filter(Dn=>Dn.position==ie.position),setHeights:j,expandByDefault:i,gap:w,loadingIcon:v,expanded:B,pauseWhenPageIsHidden:k,swipeDirections:t.swipeDirections})})):null}))});const bE=({...t})=>{const{theme:e="system"}=K_();return p.jsx(wE,{theme:e,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})},xE=1,SE=1e6;let dc=0;function kE(){return dc=(dc+1)%Number.MAX_SAFE_INTEGER,dc.toString()}const hc=new Map,gm=t=>{if(hc.has(t))return;const e=setTimeout(()=>{hc.delete(t),no({type:"REMOVE_TOAST",toastId:t})},SE);hc.set(t,e)},_E=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,xE)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?gm(n):t.toasts.forEach(r=>{gm(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Za=[];let el={toasts:[]};function no(t){el=_E(el,t),Za.forEach(e=>{e(el)})}function it({...t}){const e=kE(),n=s=>no({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>no({type:"DISMISS_TOAST",toastId:e});return no({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function EE(){const[t,e]=y.useState(el);return y.useEffect(()=>(Za.push(e),()=>{const n=Za.indexOf(e);n>-1&&Za.splice(n,1)}),[t]),{...t,toast:it,dismiss:n=>no({type:"DISMISS_TOAST",toastId:n})}}function ne(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function vm(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Nw(...t){return e=>{let n=!1;const r=t.map(s=>{const i=vm(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():vm(t[s],null)}}}}function Le(...t){return y.useCallback(Nw(...t),t)}function CE(t,e){const n=y.createContext(e),r=i=>{const{children:o,...a}=i,l=y.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:o})};r.displayName=t+"Provider";function s(i){const o=y.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function Cr(t,e=[]){let n=[];function r(i,o){const a=y.createContext(o),l=n.length;n=[...n,o];const u=c=>{var w;const{scope:f,children:h,...g}=c,m=((w=f==null?void 0:f[t])==null?void 0:w[l])||a,x=y.useMemo(()=>g,Object.values(g));return p.jsx(m.Provider,{value:x,children:h})};u.displayName=i+"Provider";function d(c,f){var m;const h=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,g=y.useContext(h);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return y.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,TE(s,...e)]}function TE(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...a,...c}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Po(t){const e=jE(t),n=y.forwardRef((r,s)=>{const{children:i,...o}=r,a=y.Children.toArray(i),l=a.find(PE);if(l){const u=l.props.children,d=a.map(c=>c===l?y.Children.count(u)>1?y.Children.only(null):y.isValidElement(u)?u.props.children:null:c);return p.jsx(e,{...o,ref:s,children:y.isValidElement(u)?y.cloneElement(u,void 0,d):null})}return p.jsx(e,{...o,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}var RE=Po("Slot");function jE(t){const e=y.forwardRef((n,r)=>{const{children:s,...i}=n;
vendor: 8,636 bytes, line 68
68if(y.isValidElement(s)){const o=AE(s),a=OE(i,s.props);return s.type!==y.Fragment&&(a.ref=r?Nw(r,o):o),y.cloneElement(s,a)}return y.Children.count(s)>1?y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Pw=Symbol("radix.slottable");function NE(t){const e=({children:n})=>p.jsx(p.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=Pw,e}function PE(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Pw}function OE(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function AE(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Ow(t){const e=t+"CollectionProvider",[n,r]=Cr(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:x,children:w}=m,v=I.useRef(null),b=I.useRef(new Map).current;return p.jsx(s,{scope:x,itemMap:b,collectionRef:v,children:w})};o.displayName=e;const a=t+"CollectionSlot",l=Po(a),u=I.forwardRef((m,x)=>{const{scope:w,children:v}=m,b=i(a,w),S=Le(x,b.collectionRef);return p.jsx(l,{ref:S,children:v})});u.displayName=a;const d=t+"CollectionItemSlot",c="data-radix-collection-item",f=Po(d),h=I.forwardRef((m,x)=>{const{scope:w,children:v,...b}=m,S=I.useRef(null),k=Le(x,S),_=i(d,w);return I.useEffect(()=>(_.itemMap.set(S,{ref:S,...b}),()=>void _.itemMap.delete(S))),p.jsx(f,{[c]:"",ref:k,children:v})});h.displayName=d;function g(m){const x=i(t+"CollectionConsumer",m);return I.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${c}]`));return Array.from(x.itemMap.values()).sort((_,E)=>b.indexOf(_.ref.current)-b.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},g,r]}var LE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ae=LE.reduce((t,e)=>{const n=Po(`Primitive.${e}`),r=y.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Aw(t,e){t&&Jo.flushSync(()=>t.dispatchEvent(e))}function qt(t){const e=y.useRef(t);return y.useEffect(()=>{e.current=t}),y.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function IE(t,e=globalThis==null?void 0:globalThis.document){const n=qt(t);y.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var $E="DismissableLayer",Ad="dismissableLayer.update",DE="dismissableLayer.pointerDownOutside",ME="dismissableLayer.focusOutside",ym,Lw=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mu=y.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,u=y.useContext(Lw),[d,c]=y.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=y.useState({}),g=Le(e,E=>c(E)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(x),v=d?m.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=w,k=UE(E=>{const C=E.target,N=[...u.branches].some(j=>j.contains(C));!S||N||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),_=BE(E=>{const C=E.target;[...u.branches].some(j=>j.contains(C))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return IE(E=>{v===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),y.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ym=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),wm(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ym)}},[d,f,n,u]),y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),wm())},[d,u]),y.useEffect(()=>{const E=()=>h({});return document.addEventListener(Ad,E),()=>document.removeEventListener(Ad,E)},[]),p.jsx(ae.div,{...l,ref:g,style:{pointerEvents:b?S?"auto":"none":void 0,...t.style},onFocusCapture:ne(t.onFocusCapture,_.onFocusCapture),onBlurCapture:ne(t.onBlurCapture,_.onBlurCapture),onPointerDownCapture:ne(t.onPointerDownCapture,k.onPointerDownCapture)})});mu.displayName=$E;var FE="DismissableLayerBranch",Iw=y.forwardRef((t,e)=>{const n=y.useContext(Lw),r=y.useRef(null),s=Le(e,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(ae.div,{...t,ref:s})});Iw.displayName=FE;function UE(t,e=globalThis==null?void 0:globalThis.document){const n=qt(t),r=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){$w(DE,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function BE(t,e=globalThis==null?void 0:globalThis.document){const n=qt(t),r=y.useRef(!1);return y.useEffect(()=>{const s=i=>{i.target&&!r.current&&$w(ME,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wm(){const t=new CustomEvent(Ad);document.dispatchEvent(t)}function $w(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Aw(s,i):s.dispatchEvent(i)}var zE=mu,VE=Iw,Pn=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},HE="Portal",uf=y.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=y.useState(!1);Pn(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?uw.createPortal(p.jsx(ae.div,{...r,ref:e}),o):null});uf.displayName=HE;function WE(t,e){return y.useReducer((n,r)=>e[n][r]??n,t)}var ss=t=>{const{present:e,children:n}=t,r=KE(e),s=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=Le(r.ref,qE(s));return typeof n=="function"||r.isPresent?y.cloneElement(s,{ref:i}):null};ss.displayName="Presence";function KE(t){const[e,n]=y.useState(),r=y.useRef(null),s=y.useRef(t),i=y.useRef("none"),o=t?"mounted":"unmounted",[a,l]=WE(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=Ea(r.current);i.current=a==="mounted"?u:"none"},[a]),Pn(()=>{const u=r.current,d=s.current;if(d!==t){const f=i.current,h=Ea(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Pn(()=>{if(e){let u;const d=e.ownerDocument.defaultView??window,c=h=>{const m=Ea(r.current).includes(h.animationName);if(h.target===e&&m&&(l("ANIMATION_END"),!s.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},f=h=>{h.target===e&&(i.current=Ea(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ea(t){return(t==null?void 0:t.animationName)||"none"}function qE(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.
68isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var GE=ph[" useInsertionEffect ".trim().toString()]||Pn;function Yo({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,o]=JE({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:s;{const d=y.useRef(t!==void 0);y.useEffect(()=>{const c=d.current;c!==a&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${a?"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.`),d.current=a},[a,r])}const u=y.useCallback(d=>{var c;if(a){const f=QE(d)?d(t):d;f!==t&&((c=o.current)==null||c.call(o,f))}else i(d)},[a,t,i,o]);return[l,u]}function JE({defaultProp:t,onChange:e}){const[n,r]=y.useState(t),s=y.useRef(n),i=y.useRef(e);return GE(()=>{i.current=e},[e]),y.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function QE(t){return typeof t=="function"}var YE=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"}),XE="VisuallyHidden",gu=y.forwardRef((t,e)=>p.jsx(ae.span,{...t,ref:e,style:{...YE,...t.style}}));gu.displayName=XE;var ZE=gu,cf="ToastProvider",[df,eC,tC]=Ow("Toast"),[Dw,OI]=Cr("Toast",[tC]),[nC,vu]=Dw(cf),Mw=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=y.useState(null),[u,d]=y.useState(0),c=y.useRef(!1),f=y.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${cf}\`. Expected non-empty \`string\`.`),p.jsx(df.Provider,{scope:e,children:p.jsx(nC,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>d(h=>h+1),[]),onToastRemove:y.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:f,children:o})})};Mw.displayName=cf;var Fw="ToastViewport",rC=["F8"],Ld="toast.viewportPause",Id="toast.viewportResume",Uw=y.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=rC,label:s="Notifications ({hotkey})",...i}=t,o=vu(Fw,n),a=eC(n),l=y.useRef(null),u=y.useRef(null),d=y.useRef(null),c=y.useRef(null),f=Le(e,c,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;y.useEffect(()=>{const x=w=>{var b;r.length!==0&&r.every(S=>w[S]||w.code===S)&&((b=c.current)==null||b.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),y.useEffect(()=>{const x=l.current,w=c.current;if(g&&x&&w){const v=()=>{if(!o.isClosePausedRef.current){const _=new CustomEvent(Ld);w.dispatchEvent(_),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const _=new CustomEvent(Id);w.dispatchEvent(_),o.isClosePausedRef.current=!1}},S=_=>{!x.contains(_.relatedTarget)&&b()},k=()=>{x.contains(document.activeElement)||b()};return x.addEventListener("focusin",v),x.addEventListener("focusout",S),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",k),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",k),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[g,o.isClosePausedRef]);const m=y.useCallback(({tabbingDirection:x})=>{const v=a().map(b=>{const S=b.ref.current,k=[S,...gC(S)];return x==="forwards"?k:k.reverse()});return(x==="forwards"?v.reverse():v).flat()},[a]);return y.useEffect(()=>{const x=c.current;if(x){const w=v=>{var k,_,E;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const C=document.activeElement,N=v.shiftKey;if(v.target===x&&N){(k=u.current)==null||k.focus();return}const A=m({tabbingDirection:N?"backwards":"forwards"}),$=A.findIndex(O=>O===C);fc(A.slice($+1))?v.preventDefault():N?(_=u.current)==null||_.focus():(E=d.current)==null||E.focus()}};return x.addEventListener("keydown",w),()=>x.removeEventListener("keydown",w)}},[a,m]),p.jsxs(VE,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&p.jsx($d,{ref:u,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"forwards"});fc(x)}}),p.jsx(df.Slot,{scope:n,children:p.jsx(ae.ol,{tabIndex:-1,...i,ref:f})}),g&&p.jsx($d,{ref:d,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"backwards"});fc(x)}})]})});Uw.displayName=Fw;var Bw="ToastFocusProxy",$d=y.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=vu(Bw,n);return p.jsx(gu,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});$d.displayName=Bw;var Xo="Toast",sC="toast.swipeStart",iC="toast.swipeMove",oC="toast.swipeCancel",aC="toast.swipeEnd",zw=y.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Yo({prop:r,defaultProp:s??!0,onChange:i,caller:Xo});return p.jsx(ss,{present:n||a,children:p.jsx(cC,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:qt(t.onPause),onResume:qt(t.onResume),onSwipeStart:ne(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ne(t.onSwipeMove,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${c}px`)}),onSwipeCancel:ne(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ne(t.onSwipeEnd,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${c}px`),l(!1)})})})});zw.displayName=Xo;var[lC,uC]=Dw(Xo,{onClose(){}}),cC=y.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:f,onSwipeEnd:h,...g}=t,m=vu(Xo,n),[x,w]=y.useState(null),v=Le(e,O=>w(O)),b=y.useRef(null),S=y.useRef(null),k=s||m.duration,_=y.useRef(0),E=y.useRef(k),C=y.useRef(0),{onToastAdd:N,onToastRemove:j}=m,B=qt(()=>{var V;(x==null?void 0:x.contains(document.activeElement))&&((V=m.viewport)==null||V.focus()),o()}),A=y.useCallback(O=>
68{!O||O===1/0||(window.clearTimeout(C.current),_.current=new Date().getTime(),C.current=window.setTimeout(B,O))},[B]);y.useEffect(()=>{const O=m.viewport;if(O){const V=()=>{A(E.current),u==null||u()},D=()=>{const H=new Date().getTime()-_.current;E.current=E.current-H,window.clearTimeout(C.current),l==null||l()};return O.addEventListener(Ld,D),O.addEventListener(Id,V),()=>{O.removeEventListener(Ld,D),O.removeEventListener(Id,V)}}},[m.viewport,k,l,u,A]),y.useEffect(()=>{i&&!m.isClosePausedRef.current&&A(k)},[i,k,m.isClosePausedRef,A]),y.useEffect(()=>(N(),()=>j()),[N,j]);const $=y.useMemo(()=>x?Jw(x):null,[x]);return m.viewport?p.jsxs(p.Fragment,{children:[$&&p.jsx(dC,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),p.jsx(lC,{scope:n,onClose:B,children:Jo.createPortal(p.jsx(df.ItemSlot,{scope:n,children:p.jsx(zE,{asChild:!0,onEscapeKeyDown:ne(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||B(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(ae.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ne(t.onKeyDown,O=>{O.key==="Escape"&&(a==null||a(O.nativeEvent),O.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:ne(t.onPointerDown,O=>{O.button===0&&(b.current={x:O.clientX,y:O.clientY})}),onPointerMove:ne(t.onPointerMove,O=>{if(!b.current)return;const V=O.clientX-b.current.x,D=O.clientY-b.current.y,H=!!S.current,T=["left","right"].includes(m.swipeDirection),P=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,M=T?P(0,V):0,W=T?0:P(0,D),z=O.pointerType==="touch"?10:2,J={x:M,y:W},Z={originalEvent:O,delta:J};H?(S.current=J,Ca(iC,c,Z,{discrete:!1})):bm(J,m.swipeDirection,z)?(S.current=J,Ca(sC,d,Z,{discrete:!1}),O.target.setPointerCapture(O.pointerId)):(Math.abs(V)>z||Math.abs(D)>z)&&(b.current=null)}),onPointerUp:ne(t.onPointerUp,O=>{const V=S.current,D=O.target;if(D.hasPointerCapture(O.pointerId)&&D.releasePointerCapture(O.pointerId),S.current=null,b.current=null,V){const H=O.currentTarget,T={originalEvent:O,delta:V};bm(V,m.swipeDirection,m.swipeThreshold)?Ca(aC,h,T,{discrete:!0}):Ca(oC,f,T,{discrete:!0}),H.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),dC=t=>{const{__scopeToast:e,children:n,...r}=t,s=vu(Xo,e),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return pC(()=>o(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:p.jsx(uf,{asChild:!0,children:p.jsx(gu,{...r,children:i&&p.jsxs(p.Fragment,{children:[s.label," ",n]})})})},hC="ToastTitle",Vw=y.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return p.jsx(ae.div,{...r,ref:e})});Vw.displayName=hC;var fC="ToastDescription",Hw=y.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return p.jsx(ae.div,{...r,ref:e})});Hw.displayName=fC;var Ww="ToastAction",Kw=y.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?p.jsx(Gw,{altText:n,asChild:!0,children:p.jsx(hf,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ww}\`. Expected non-empty \`string\`.`),null)});Kw.displayName=Ww;var qw="ToastClose",hf=y.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=uC(qw,n);return p.jsx(Gw,{asChild:!0,children:p.jsx(ae.button,{type:"button",...r,ref:e,onClick:ne(t.onClick,s.onClose)})})});hf.displayName=qw;var Gw=y.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return p.jsx(ae.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function Jw(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),mC(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...Jw(r))}}),e}function Ca(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Aw(s,i):s.dispatchEvent(i)}var bm=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function pC(t=()=>{}){const e=qt(t);Pn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function mC(t){return t.nodeType===t.ELEMENT_NODE}function gC(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function fc(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var vC=Mw,Qw=Uw,Yw=zw,Xw=Vw,Zw=Hw,e0=Kw,t0=hf;function n0(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=n0(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function r0(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=n0(t))&&(r&&(r+=" "),r+=e);return r}const xm=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Sm=r0,ff=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Sm(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],c=i==null?void 0:i[u];if(d===null)return null;const f=xm(d)||xm(c);return s[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...h}=d;return Object.entries(h).every(g=>{let[m,x]=g;return Array.isArray(x)?x.includes({...i,...a}[m]):{...i,...a}[m]===x})?[...u,c,f]:u},[]);return Sm(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
69 * @license lucide-react v0.462.0 - ISC
70 *
71 * This source code is licensed under the ISC license.
72 * See the LICENSE file in the root directory of this source tree.
73 */const yC=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s0=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
74 * @license lucide-react v0.462.0 - ISC
75 *
76 * This source code is licensed under the ISC license.
77 * See the LICENSE file in the root directory of this source tree.
78 */var wC={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"};/**
79 * @license lucide-react v0.462.0 - ISC
80 *
81 * This source code is licensed under the ISC license.
82 * See the LICENSE file in the root directory of this source tree.
83 */const bC=y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,...wC,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:s0("lucide",s),...a},[...o.map(([u,d])=>y.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
84 * @license lucide-react v0.462.0 - ISC
85 *
86 * This source code is licensed under the ISC license.
87 * See the LICENSE file in the root directory of this source tree.
88 */const Ne=(t,e)=>{const n=y.forwardRef(({className:r,...s},i)=>y.createElement(bC,{ref:i,iconNode:e,className:s0(`lucide-${yC(t)}`,r),...s}));return n.displayName=`${t}`,n};/**
89 * @license lucide-react v0.462.0 - ISC
90 *
91 * This source code is licensed under the ISC license.
92 * See the LICENSE file in the root directory of this source tree.
93 */const km=Ne("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
94 * @license lucide-react v0.462.0 - ISC
95 *
96 * This source code is licensed under the ISC license.
97 * See the LICENSE file in the root directory of this source tree.
98 */const xC=Ne("Bike",[["circle",{cx:"18.5",cy:"17.5",r:"3.5",key:"15x4ox"}],["circle",{cx:"5.5",cy:"17.5",r:"3.5",key:"1noe27"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["path",{d:"M12 17.5V14l-3-3 4-3 2 3h2",key:"1npguv"}]]);/**
99 * @license lucide-react v0.462.0 - ISC
100 *
101 * This source code is licensed under the ISC license.
102 * See the LICENSE file in the root directory of this source tree.
103 */const SC=Ne("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
104 * @license lucide-react v0.462.0 - ISC
105 *
106 * This source code is licensed under the ISC license.
107 * See the LICENSE file in the root directory of this source tree.
108 */const kC=Ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
109 * @license lucide-react v0.462.0 - ISC
110 *
111 * This source code is licensed under the ISC license.
112 * See the LICENSE file in the root directory of this source tree.
113 */const _C=Ne("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
114 * @license lucide-react v0.462.0 - ISC
115 *
116 * This source code is licensed under the ISC license.
117 * See the LICENSE file in the root directory of this source tree.
118 */const i0=Ne("Gavel",[["path",{d:"m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8",key:"15492f"}],["path",{d:"m16 16 6-6",key:"vzrcl6"}],["path",{d:"m8 8 6-6",key:"18bi4p"}],["path",{d:"m9 7 8 8",key:"5jnvq1"}],["path",{d:"m21 11-8-8",key:"z4y7zo"}]]);/**
119 * @license lucide-react v0.462.0 - ISC
120 *
121 * This source code is licensed under the ISC license.
122 * See the LICENSE file in the root directory of this source tree.
123 */const o0=Ne("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
124 * @license lucide-react v0.462.0 - ISC
125 *
126 * This source code is licensed under the ISC license.
127 * See the LICENSE file in the root directory of this source tree.
128 */const pf=Ne("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
129 * @license lucide-react v0.462.0 - ISC
130 *
131 * This source code is licensed under the ISC license.
132 * See the LICENSE file in the root directory of this source tree.
133 */const EC=Ne("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
134 * @license lucide-react v0.462.0 - ISC
135 *
136 * This source code is licensed under the ISC license.
137 * See the LICENSE file in the root directory of this source tree.
138 */const CC=Ne("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
139 * @license lucide-react v0.462.0 - ISC
140 *
141 * This source code is licensed under the ISC license.
142 * See the LICENSE file in the root directory of this source tree.
143 */const a0=Ne("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
144 * @license lucide-react v0.462.0 - ISC
145 *
146 * This source code is licensed under the ISC license.
147 * See the LICENSE file in the root directory of this source tree.
148 */const TC=Ne("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
149 * @license lucide-react v0.462.0 - ISC
150 *
151 * This source code is licensed under the ISC license.
152 * See the LICENSE file in the root directory of this source tree.
153 */const RC=Ne("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
154 * @license lucide-react v0.462.0 - ISC
155 *
156 * This source code is licensed under the ISC license.
157 * See the LICENSE file in the root directory of this source tree.
158 */const jC=Ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
159 * @license lucide-react v0.462.0 - ISC
160 *
161 * This source code is licensed under the ISC license.
162 * See the LICENSE file in the root directory of this source tree.
163 */const NC=Ne("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
164 * @license lucide-react v0.462.0 - ISC
165 *
166 * This source code is licensed under the ISC license.
167 * See the LICENSE file in the root directory of this source tree.
168 */const PC=Ne("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
169 * @license lucide-react v0.462.0 - ISC
170 *
171 * This source code is licensed under the ISC license.
172 * See the LICENSE file in the root directory of this source tree.
173 */const OC=Ne("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 6,729 bytes, lines 173-183
173],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
174 * @license lucide-react v0.462.0 - ISC
175 *
176 * This source code is licensed under the ISC license.
177 * See the LICENSE file in the root directory of this source tree.
178 */const _m=Ne("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
179 * @license lucide-react v0.462.0 - ISC
180 *
181 * This source code is licensed under the ISC license.
182 * See the LICENSE file in the root directory of this source tree.
183 */const mf=Ne("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),gf="-",AC=t=>{const e=IC(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(gf);return a[0]===""&&a.length!==1&&a.shift(),l0(a,e)||LC(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},l0=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?l0(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(gf);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Em=/^\[(.+)\]$/,LC=t=>{if(Em.test(t)){const e=Em.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},IC=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return DC(Object.entries(t.classGroups),n).forEach(([i,o])=>{Dd(o,r,i,e)}),r},Dd=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Cm(e,s);i.classGroupId=n;return}if(typeof s=="function"){if($C(s)){Dd(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Dd(o,Cm(e,i),n,r)})})},Cm=(t,e)=>{let n=t;return e.split(gf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},$C=t=>t.isThemeGetter,DC=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,MC=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},u0="!",FC=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let u=0,d=0,c;for(let x=0;x<a.length;x++){let w=a[x];if(u===0){if(w===s&&(r||a.slice(x,x+i)===e)){l.push(a.slice(d,x)),d=x+i;continue}if(w==="/"){c=x;continue}}w==="["?u++:w==="]"&&u--}const f=l.length===0?a:a.substring(d),h=f.startsWith(u0),g=h?f.substring(1):f,m=c&&c>d?c-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},UC=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},BC=t=>({cache:MC(t.cacheSize),parseClassName:FC(t),...AC(t)}),zC=/\s+/,VC=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(zC);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let g=!!h,m=r(g?f.substring(0,h):f);if(!m){if(!g){a=u+(a.length>0?" "+a:a);continue}if(m=r(f),!m){a=u+(a.length>0?" "+a:a);continue}g=!1}const x=UC(d).join(":"),w=c?x+u0:x,v=w+m;if(i.includes(v))continue;i.push(v);const b=s(m,g);for(let S=0;S<b.length;++S){const k=b[S];i.push(w+k)}a=u+(a.length>0?" "+a:a)}return a};function HC(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=c0(e))&&(r&&(r+=" "),r+=n);return r}const c0=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=c0(t[r]))&&(n&&(n+=" "),n+=e);return n};function WC(t,...e){let n,r,s,i=o;function o(l){const u=e.reduce((d,c)=>c(d),t());return n=BC(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=VC(l,n);return s(l,d),d}return function(){return i(HC.apply(null,arguments))}}const de=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},d0=/^\[(?:([a-z-]+):)?(.+)\]$/i,KC=/^\d+\/\d+$/,qC=new Set(["px","full","screen"]),GC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JC=/\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$/,QC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,YC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gn=t=>Ks(t)||qC.has(t)||KC.test(t),Vn=t=>Si(t,"length",oT),Ks=t=>!!t&&!Number.isNaN(Number(t)),pc=t=>Si(t,"number",Ks),$i=t=>!!t&&Number.isInteger(Number(t)),ZC=t=>t.endsWith("%")&&Ks(t.slice(0,-1)),X=t=>d0.test(t),Hn=t=>GC.test(t),eT=new Set(["length","size","percentage"]),tT=t=>Si(t,eT,h0),nT=t=>Si(t,"position",h0),rT=new Set(["image","url"]),sT=t=>Si(t,rT,lT),iT=t=>Si(t,"",aT),Di=()=>!0,Si=(t,e,n)=>{const r=d0.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},oT=t=>JC.test(t)&&!QC.test(t),h0=()=>!1,aT=t=>YC.test(t),lT=t=>XC.test(t),uT=()=>{const t=de("colors"),e=de("spacing"),n=de("blur"),r=de("brightness"),s=de("borderColor"),i=de("borderRadius"),o=de("borderSpacing"),a=de("borderWidth"),l=de("contrast"),u=de("grayscale"),d=de("hueRotate"),c=de("invert"),f=de("gap"),h=de("gradientColorStops"),g=de("gradientColorStopPositions"),m=de("inset"),x=de("margin"),w=de("opacity"),v=de("padding"),b=de("saturate"),S=de("scale"),k=de("sepia"),_=de("skew"),E=de("space"),C=de("translate"),N=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",X,e],A=()=>[X,e],$=()=>["",gn,Vn],O=()=>["auto",Ks,X],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",X],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[Ks,X];return{cacheSize:500,separator:":",theme:{colors:[Di],spacing:[gn,Vn],blur:["none","",Hn,X],brightness:W(),borderColor:[t],borderRadius:["n
183one","","full",Hn,X],borderSpacing:A(),borderWidth:$(),contrast:W(),grayscale:P(),hueRotate:W(),invert:P(),gap:A(),gradientColorStops:[t],gradientColorStopPositions:[ZC,Vn],inset:B(),margin:B(),opacity:W(),padding:A(),saturate:W(),scale:W(),sepia:P(),skew:W(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",X]}],container:["container"],columns:[{columns:[Hn]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...V(),X]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$i,X]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",X]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",$i,X]}],"grid-cols":[{"grid-cols":[Di]}],"col-start-end":[{col:["auto",{span:["full",$i,X]},X]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Di]}],"row-start-end":[{row:["auto",{span:[$i,X]},X]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",X]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",X]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",X,e]}],"min-w":[{"min-w":[X,e,"min","max","fit"]}],"max-w":[{"max-w":[X,e,"none","full","min","max","fit","prose",{screen:[Hn]},Hn]}],h:[{h:[X,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[X,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[X,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[X,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Hn,Vn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pc]}],"font-family":[{font:[Di]}],"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:["tighter","tight","normal","wide","wider","widest",X]}],"line-clamp":[{"line-clamp":["none",Ks,pc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gn,X]}],"list-image":[{"list-image":["none",X]}],"list-style-type":[{list:["none","disc","decimal",X]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gn,Vn]}],"underline-offset":[{"underline-offset":["auto",gn,X]}],"text-decoration-color":[{decoration:[t]}],"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",X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),nT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sT]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}
vendor: 5,172 bytes, line 183
183],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:D()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[gn,X]}],"outline-w":[{outline:[gn,Vn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[gn,Vn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Hn,iT]}],"shadow-color":[{shadow:[Di]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Hn,X]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[b]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",X]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",X]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",X]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[$i,X]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",X]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",X]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],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-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-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"]}
vendor: 4,646 bytes, line 183
183],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",X]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[gn,Vn,pc]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},cT=WC(uT);function ee(...t){return cT(r0(t))}const dT=vC,f0=y.forwardRef(({className:t,...e},n)=>p.jsx(Qw,{ref:n,className:ee("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),...e}));f0.displayName=Qw.displayName;const hT=ff("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"}}),p0=y.forwardRef(({className:t,variant:e,...n},r)=>p.jsx(Yw,{ref:r,className:ee(hT({variant:e}),t),...n}));p0.displayName=Yw.displayName;const fT=y.forwardRef(({className:t,...e},n)=>p.jsx(e0,{ref:n,className:ee("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 group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));fT.displayName=e0.displayName;const m0=y.forwardRef(({className:t,...e},n)=>p.jsx(t0,{ref:n,className:ee("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 13,891 bytes, line 183
183/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:p.jsx(mf,{className:"h-4 w-4"})}));m0.displayName=t0.displayName;const g0=y.forwardRef(({className:t,...e},n)=>p.jsx(Xw,{ref:n,className:ee("text-sm font-semibold",t),...e}));g0.displayName=Xw.displayName;const v0=y.forwardRef(({className:t,...e},n)=>p.jsx(Zw,{ref:n,className:ee("text-sm opacity-90",t),...e}));v0.displayName=Zw.displayName;function pT(){const{toasts:t}=EE();return p.jsxs(dT,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return p.jsxs(p0,{...i,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(g0,{children:n}),r&&p.jsx(v0,{children:r})]}),s,p.jsx(m0,{})]},e)}),p.jsx(f0,{})]})}var mT=ph[" useId ".trim().toString()]||(()=>{}),gT=0;function ro(t){const[e,n]=y.useState(mT());return Pn(()=>{t||n(r=>r??String(gT++))},[t]),t||(e?`radix-${e}`:"")}const vT=["top","right","bottom","left"],wr=Math.min,pt=Math.max,$l=Math.round,Ta=Math.floor,hn=t=>({x:t,y:t}),yT={left:"right",right:"left",bottom:"top",top:"bottom"},wT={start:"end",end:"start"};function Md(t,e,n){return pt(t,wr(e,n))}function On(t,e){return typeof t=="function"?t(e):t}function An(t){return t.split("-")[0]}function ki(t){return t.split("-")[1]}function vf(t){return t==="x"?"y":"x"}function yf(t){return t==="y"?"height":"width"}const bT=new Set(["top","bottom"]);function ln(t){return bT.has(An(t))?"y":"x"}function wf(t){return vf(ln(t))}function xT(t,e,n){n===void 0&&(n=!1);const r=ki(t),s=wf(t),i=yf(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Dl(o)),[o,Dl(o)]}function ST(t){const e=Dl(t);return[Fd(t),e,Fd(e)]}function Fd(t){return t.replace(/start|end/g,e=>wT[e])}const Tm=["left","right"],Rm=["right","left"],kT=["top","bottom"],_T=["bottom","top"];function ET(t,e,n){switch(t){case"top":case"bottom":return n?e?Rm:Tm:e?Tm:Rm;case"left":case"right":return e?kT:_T;default:return[]}}function CT(t,e,n,r){const s=ki(t);let i=ET(An(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Fd)))),i}function Dl(t){return t.replace(/left|right|bottom|top/g,e=>yT[e])}function TT(t){return{top:0,right:0,bottom:0,left:0,...t}}function y0(t){return typeof t!="number"?TT(t):{top:t,right:t,bottom:t,left:t}}function Ml(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function jm(t,e,n){let{reference:r,floating:s}=t;const i=ln(e),o=wf(e),a=yf(o),l=An(e),u=i==="y",d=r.x+r.width/2-s.width/2,c=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let h;switch(l){case"top":h={x:d,y:r.y-s.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-s.width,y:c};break;default:h={x:r.x,y:r.y}}switch(ki(e)){case"start":h[o]-=f*(n&&u?-1:1);break;case"end":h[o]+=f*(n&&u?-1:1);break}return h}const RT=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:c}=jm(u,r,l),f=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:x,fn:w}=a[m],{x:v,y:b,data:S,reset:k}=await w({x:d,y:c,initialPlacement:r,placement:f,strategy:s,middlewareData:h,rects:u,platform:o,elements:{reference:t,floating:e}});d=v??d,c=b??c,h={...h,[x]:{...h[x],...S}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):k.rects),{x:d,y:c}=jm(u,f,l)),m=-1)}return{x:d,y:c,placement:f,strategy:s,middlewareData:h}};async function Oo(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:f=!1,padding:h=0}=On(e,t),g=y0(h),x=a[f?c==="floating"?"reference":"floating":c],w=Ml(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),v=c==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},k=Ml(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(w.top-k.top+g.top)/S.y,bottom:(k.bottom-w.bottom+g.bottom)/S.y,left:(w.left-k.left+g.left)/S.x,right:(k.right-w.right+g.right)/S.x}}const jT=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:d=0}=On(t,e)||{};if(u==null)return{};const c=y0(d),f={x:n,y:r},h=wf(s),g=yf(h),m=await o.getDimensions(u),x=h==="y",w=x?"top":"left",v=x?"bottom":"right",b=x?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[h]-f[h]-i.floating[g],k=f[h]-i.reference[h],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=_?_[b]:0;(!E||!await(o.isElement==null?void 0:o.isElement(_)))&&(E=a.floating[b]||i.floating[g]);const C=S/2-k/2,N=E/2-m[g]/2-1,j=wr(c[w],N),B=wr(c[v],N),A=j,$=E-m[g]-B,O=E/2-m[g]/2+C,V=Md(A,O,$),D=!l.arrow&&ki(s)!=null&&O!==V&&i.reference[g]/2-(O<A?j:B)-m[g]/2<0,H=D?O<A?O-A:O-$:0;return{[h]:f[h]+H,data:{[h]:V,centerOffset:O-V-H,...D&&{alignmentOffset:H}},reset:D}}}),NT=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=On(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=An(s),v=ln(a),b=An(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=f||(b||!m?[Dl(a)]:ST(a)),_=g!=="none";!f&&_&&k.push(...CT(a,m,g,S));const E=[a,...k],C=await Oo(e,x),N=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&N.push(C[w]),c){const O=xT(s,o,S);N.push(C[O[0]],C[O[1]])}if(j=[...j,{placement:s,overflows:N}],!N.every(O=>O<=0)){var B,A;const O=(((B=i.flip)==null?void 0:B.index)||0)+1,V=E[O];if(V&&(!(c==="alignment"?v!==ln(V):!1)||j.every(T=>T.overflows[0]>0&&ln(T.placement)===v)))return{data:{index:O,overflows:j},reset:{placement:V}};let D=(A=j.filter(H=>H.overflows[0]<=0).sort((H,T)=>H.overflows[1]-T.overflows[1])[0])==null?void 0:A.placement;if(!D)switch(h){case"bestFit":{var $;const H=($=j.filter(T=>{if(_){const P=ln(T.placement);return P===v||P==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(P=>P>0).reduce((P,M)=>P+M,0)]).sort((T,P)=>T[1]-P[1])[0])==null?void 0:$[0];H&&(D=H);break}case"initialPlacement":D=a;break}if(s!==D)return{reset:{placement:D}}}return{}}}};function Nm(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Pm(t){return vT.some(e=>t[e]>=0)}const PT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=On(t,e);switch(r){case"referenceHidden":{const i=await Oo(e,{...s,elementContext:"reference"}),o=Nm(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Pm(o)}}}case"escaped":{const i=await Oo(e,{...s,altBoundary:!0}),o=Nm(i,n.floating);return{data:{escapedOffsets:o,escaped:Pm(o)}}}default:return{}}}}},w0=new Set(["left","top"]);async function OT(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=An(n),a=ki(n),l=ln(n)==="y",u=w0.has(o)?-1:1,d=i&&l?-1:1,c=On(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*d,y:f*u}:{x:f*u,y:h*d}}const AT=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await OT(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},LT=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:w,y:v}=x;return{x:w,y:v}}},...l}=On(t,e),u={x:n,y:r},d=await Oo(e,l),c=ln(An(s)),f=vf(c);let h=u[f],g=u[c];if(i){const x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",v=h+d[x],b=h-d[w];h=Md(v,h,b)}if(o){const x=c==="y"?"top":"left",w=c==="y"?"bottom":"right",v=g+d[x],b=g-d[w];g=Md(v,g,b)}const m=a.fn({...e,[f]:h,[c]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[c]:o}}}}}},IT=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=On(t,e),d={x:n,y:r},c=ln(s),f=vf(c);let h=d[f],g=d[c];const m=On(a,e),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=f==="y"?"height":"width",S=i.reference[f]-i.floating[b]+x.mainAxis,k=i.reference[f]+i.reference[b]-x.mainAxis;h<S?h=S:h>k&&(h=k)}if(u){var w,v;const b=f==="y"?"width":"height",S=w0.has(An(s)),k=i.reference[c]-i.floating[b]+(S&&((w=o.offset)==null?void 0:w[c])||0)+(S?0:x.crossAxis),_=i.reference[c]+i.reference[b]+(S?0:((v=o.offset)==null?void 0:v[c])||0)-(S?x.crossAxis:0);g<k?g=k:g>_&&(g=_)}return{[f]:h,[c]:g}}}},$T=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...u}=On(t,e),d=await Oo(e,u),c=An(s),f=ki(s),h=ln(s)==="y",{width:g,height:m}=i.floating;let x,w;c==="top"||c==="bottom"?(x=c,w=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=c,x=f==="end"?"top":"bottom");const v=m-d.top-d.bottom,b=g-d.left-d.right,S=wr(m-d[x],v),k=wr(g-d[w],b),_=!e.middlewareData.shift;let E=S,C=k;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=b),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(E=v),_&&!f){const j=pt(d.left,0),B=pt(d.right,0),A=pt(d.top,0),$=pt(d.bottom,0);h?C=g-2*(j!==0||B!==0?j+B:pt(d.left,d.right)):E=m-2*(A!==0||$!==0?A+$:pt(d.top,d.bottom))}await l({...e,availableWidth:C,availableHeight:E});const N=await o.getDimensions(a.floating);return g!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function yu(){return typeof window<"u"}function _i(t){return b0(t)?(t.nodeName||"").toLowerCase():"#document"}function yt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pn(t){var e;return(e=(b0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function b0(t){return yu()?t instanceof Node||t instanceof yt(t).Node:!1}function Gt(t){return yu()?t instanceof Element||t instanceof yt(t).Element:!1}function fn(t){return yu()?t instanceof HTMLElement||t instanceof yt(t).HTMLElement:!1}function Om(t){return!yu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof yt(t).ShadowRoot}const DT=new Set(["inline","contents"]);function Zo(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Jt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!DT.has(s)}const MT=new Set(["table","td","th"]);function FT(t){return MT.has(_i(t))}const UT=[":popover-open",":modal"];function wu(t){return UT.some(e=>{try{return t.matches(e)}catch{return!1}})}const BT=["transform","translate","scale","rotate","perspective"],zT=["transform","translate","scale","rotate","perspective","filter"],VT=["paint","layout","strict","content"];function bf(t){const e=xf(),n=Gt(t)?Jt(t):t;return BT.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||zT.some(r=>(n.willChange||"").includes(r))||VT.some(r=>(n.contain||"").includes(r))}function HT(t){let e=br(t);for(;fn(e)&&!pi(e);){if(bf(e))return e;if(wu(e))return null;e=br(e)}return null}function xf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const WT=new Set(["html","body","#document"]);function pi(t){return WT.has(_i(t))}function Jt(t){return yt(t).getComputedStyle(t)}function bu(t){return Gt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function br(t){if(_i(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Om(t)&&t.host||pn(t);return Om(e)?e.host:e}function x0(t){const e=br(t);return pi(e)?t.ownerDocument?t.ownerDocument.body:t.body:fn(e)&&Zo(e)?e:x0(e)}function Ao(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=x0(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=yt(s);if(i){const a=Ud(o);return e.concat(o,o.visualViewport||[],Zo(s)?s:[],a&&n?Ao(a):[])}return e.concat(s,Ao(s,[],n))}function Ud(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function S0(t){const e=Jt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=fn(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=$l(n)!==i||$l(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Sf(t){return Gt(t)?t:t.contextElement}function qs(t){const e=Sf(t);if(!fn(e))return hn(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=S0(e);let o=(i?$l(n.width):n.width)/r,a=(i?$l(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const KT=hn(0);function k0(t){const e=yt(t);
vendor: 3,128 bytes, line 183
183return!xf()||!e.visualViewport?KT:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function qT(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==yt(t)?!1:e}function Zr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=Sf(t);let o=hn(1);e&&(r?Gt(r)&&(o=qs(r)):o=qs(t));const a=qT(i,n,r)?k0(i):hn(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,c=s.height/o.y;if(i){const f=yt(i),h=r&&Gt(r)?yt(r):r;let g=f,m=Ud(g);for(;m&&r&&h!==g;){const x=qs(m),w=m.getBoundingClientRect(),v=Jt(m),b=w.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,S=w.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,c*=x.y,l+=b,u+=S,g=yt(m),m=Ud(g)}}return Ml({width:d,height:c,x:l,y:u})}function kf(t,e){const n=bu(t).scrollLeft;return e?e.left+n:Zr(pn(t)).left+n}function _0(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:kf(t,r)),i=r.top+e.scrollTop;return{x:s,y:i}}function GT(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=pn(r),a=e?wu(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=hn(1);const d=hn(0),c=fn(r);if((c||!c&&!i)&&((_i(r)!=="body"||Zo(o))&&(l=bu(r)),fn(r))){const h=Zr(r);u=qs(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const f=o&&!c&&!i?_0(o,l,!0):hn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-l.scrollTop*u.y+d.y+f.y}}function JT(t){return Array.from(t.getClientRects())}function QT(t){const e=pn(t),n=bu(t),r=t.ownerDocument.body,s=pt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=pt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+kf(t);const a=-n.scrollTop;return Jt(r).direction==="rtl"&&(o+=pt(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function YT(t,e){const n=yt(t),r=pn(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=xf();(!u||u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const XT=new Set(["absolute","fixed"]);function ZT(t,e){const n=Zr(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=fn(t)?qs(t):hn(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function Am(t,e,n){let r;if(e==="viewport")r=YT(t,n);else if(e==="document")r=QT(pn(t));else if(Gt(e))r=ZT(e,n);else{const s=k0(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Ml(r)}function E0(t,e){const n=br(t);return n===e||!Gt(n)||pi(n)?!1:Jt(n).position==="fixed"||E0(n,e)}function eR(t,e){const n=e.get(t);if(n)return n;let r=Ao(t,[],!1).filter(a=>Gt(a)&&_i(a)!=="body"),s=null;const i=Jt(t).position==="fixed";let o=i?br(t):t;for(;Gt(o)&&!pi(o);){const a=Jt(o),l=bf(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&XT.has(s.position)||Zo(o)&&!l&&E0(t,o))?r=r.filter(d=>d!==o):s=a,o=br(o)}return e.set(t,r),r}function tR(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?wu(e)?[]:eR(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const c=Am(e,d,s);
vendor: 9,898 bytes, line 183
183return u.top=pt(c.top,u.top),u.right=wr(c.right,u.right),u.bottom=wr(c.bottom,u.bottom),u.left=pt(c.left,u.left),u},Am(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nR(t){const{width:e,height:n}=S0(t);return{width:e,height:n}}function rR(t,e,n){const r=fn(e),s=pn(e),i=n==="fixed",o=Zr(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=hn(0);function u(){l.x=kf(s)}if(r||!r&&!i)if((_i(e)!=="body"||Zo(s))&&(a=bu(e)),r){const h=Zr(e,!0,i,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else s&&u();i&&!r&&s&&u();const d=s&&!r&&!i?_0(s,a):hn(0),c=o.left+a.scrollLeft-l.x-d.x,f=o.top+a.scrollTop-l.y-d.y;return{x:c,y:f,width:o.width,height:o.height}}function mc(t){return Jt(t).position==="static"}function Lm(t,e){if(!fn(t)||Jt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pn(t)===n&&(n=n.ownerDocument.body),n}function C0(t,e){const n=yt(t);if(wu(t))return n;if(!fn(t)){let s=br(t);for(;s&&!pi(s);){if(Gt(s)&&!mc(s))return s;s=br(s)}return n}let r=Lm(t,e);for(;r&&FT(r)&&mc(r);)r=Lm(r,e);return r&&pi(r)&&mc(r)&&!bf(r)?n:r||HT(t)||n}const sR=async function(t){const e=this.getOffsetParent||C0,n=this.getDimensions,r=await n(t.floating);return{reference:rR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iR(t){return Jt(t).direction==="rtl"}const oR={convertOffsetParentRelativeRectToViewportRelativeRect:GT,getDocumentElement:pn,getClippingRect:tR,getOffsetParent:C0,getElementRects:sR,getClientRects:JT,getDimensions:nR,getScale:qs,isElement:Gt,isRTL:iR};function T0(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function aR(t,e){let n=null,r;const s=pn(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=t.getBoundingClientRect(),{left:d,top:c,width:f,height:h}=u;if(a||e(),!f||!h)return;const g=Ta(c),m=Ta(s.clientWidth-(d+f)),x=Ta(s.clientHeight-(c+h)),w=Ta(d),b={rootMargin:-g+"px "+-m+"px "+-x+"px "+-w+"px",threshold:pt(0,wr(1,l))||1};let S=!0;function k(_){const E=_[0].intersectionRatio;if(E!==l){if(!S)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!T0(u,t.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(k,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,b)}n.observe(t)}return o(!0),i}function lR(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Sf(t),d=s||i?[...u?Ao(u):[],...Ao(e)]:[];d.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const c=u&&a?aR(u,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(w=>{let[v]=w;v&&v.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),n()}),u&&!l&&h.observe(u),h.observe(e));let g,m=l?Zr(t):null;l&&x();function x(){const w=Zr(t);m&&!T0(m,w)&&n(),m=w,g=requestAnimationFrame(x)}return n(),()=>{var w;d.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),c==null||c(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const uR=AT,cR=LT,dR=NT,hR=$T,fR=PT,Im=jT,pR=IT,mR=(t,e,n)=>{const r=new Map,s={platform:oR,...n},i={...s.platform,_c:r};return RT(t,e,{...s,platform:i})};var gR=typeof document<"u",vR=function(){},tl=gR?y.useLayoutEffect:vR;function Fl(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Fl(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!Fl(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function R0(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function $m(t,e){const n=R0(t);return Math.round(e*n)/n}function gc(t){const e=y.useRef(t);return tl(()=>{e.current=t}),e}function yR(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[d,c]=y.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=y.useState(r);Fl(f,r)||h(r);const[g,m]=y.useState(null),[x,w]=y.useState(null),v=y.useCallback(T=>{T!==_.current&&(_.current=T,m(T))},[]),b=y.useCallback(T=>{T!==E.current&&(E.current=T,w(T))},[]),S=i||g,k=o||x,_=y.useRef(null),E=y.useRef(null),C=y.useRef(d),N=l!=null,j=gc(l),B=gc(s),A=gc(u),$=y.useCallback(()=>{if(!_.current||!E.current)return;const T={placement:e,strategy:n,middleware:f};B.current&&(T.platform=B.current),mR(_.current,E.current,T).then(P=>{const M={...P,isPositioned:A.current!==!1};O.current&&!Fl(C.current,M)&&(C.current=M,Jo.flushSync(()=>{c(M)}))})},[f,e,n,B,A]);tl(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,c(T=>({...T,isPositioned:!1})))},[u]);const O=y.useRef(!1);tl(()=>(O.current=!0,()=>{O.current=!1}),[]),tl(()=>{if(S&&(_.current=S),k&&(E.current=k),S&&k){if(j.current)return j.current(S,k,$);$()}},[S,k,$,j,N]);const V=y.useMemo(()=>({reference:_,floating:E,setReference:v,setFloating:b}),[v,b]),D=y.useMemo(()=>({reference:S,floating:k}),[S,k]),H=y.useMemo(()=>{const T={position:n,left:0,top:0};if(!D.floating)return T;const P=$m(D.floating,d.x),M=$m(D.floating,d.y);return a?{...T,transform:"translate("+P+"px, "+M+"px)",...R0(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:M}},[n,a,D.floating,d.x,d.y]);return y.useMemo(()=>({...d,update:$,refs:V,elements:D,floatingStyles:H}),[d,$,V,D,H])}const wR=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Im({element:r.current,padding:s}).fn(n):{}:r?Im({element:r,padding:s}).fn(n):{}}}},bR=(t,e)=>({...uR(t),options:[t,e]}),xR=(t,e)=>({...cR(t),options:[t,e]}),SR=(t,e)=>({...pR(t),options:[t,e]}),kR=(t,e)=>({...dR(t),options:[t,e]}),_R=(t,e)=>({...hR(t),options:[t,e]}),ER=(t,e)=>({...fR(t),options:[t,e]}),CR=(t,e)=>({...wR(t),options:[t,e]});var TR="Arrow",j0=y.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return p.jsx(ae.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});j0.displayName=TR;var RR=j0;function N0(t){const[e,n]=y.useState(void 0);return Pn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var P0="Popper",[O0,A0]=Cr(P0),[AI,L0]=O0(P0),I0="PopperAnchor",$0=y.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=L0(I0,n),o=y.useRef(null),a=Le(e,o);return y.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.jsx(ae.div,{...s,ref:a})});$0.displayName=I0;var _f="PopperContent",[jR,NR]=O0(_f),D0=y.forwardRef((t,e)=>{var ie,is,$n,Tr,Dn,os;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=t,x=L0(_f,n),[w,v]=y.useState(null),b=Le(e,Mn=>v(Mn)),[S,k]=y.useState(null),_=N0(S),E=(_==null?void 0:_.width)??0,C=(_==null?void 0:_.height)??0,N=r+(i!=="center"?"-"+i:""),j=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},B=Array.isArray(u)?u:[u],A=B.length>0,$={padding:j,boundary:B.filter(OR),altBoundary:A},{refs:O,floatingStyles:V,placement:D,isPositioned:H,middlewareData:T}=yR({strategy:"fixed",placement:N,whileElementsMounted:(...Mn)=>lR(...Mn,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[bR({mainAxis:s+C,alignmentAxis:o}),l&&xR({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?SR():void 0,...$}),l&&kR({...$}),_R({...$,apply:({elements:Mn,rects:na,availableWidth:Ou,availableHeight:ra})=>{const{width:Au,height:Ci}=na.reference,as=Mn.floating.style;as.setProperty("--radix-popper-available-width",`${Ou}px`),as.setProperty("--radix-popper-available-height",`${ra}px`),as.setProperty("--radix-popper-anchor-width",`${Au}px`),as.setProperty("--radix-popper-anchor-height",`${Ci}px`)}}),S&&CR({element:S,padding:a}),AR({arrowWidth:E,arrowHeight:C}),f&&ER({strategy:"referenceHidden",...$})]}),[P,M]=U0(D),W=qt(g);Pn(()=>{H&&(W==null||W())},[H,W]);const z=(ie=T.arrow)==null?void 0:ie.x,J=(is=T.arrow)==null?void 0:is.y,Z=(($n=T.arrow)==null?void 0:$n.centerOffset)!==0,[ge,Ue]=y.useState();return Pn(()=>{w&&Ue(window.getComputedStyle(w).zIndex)},[w]),p.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:H?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Tr=T.transformOrigin)==null?void 0:Tr.x,(Dn=T.transformOrigin)==null?void 0:Dn.y].join(" "),...((os=T.hide)==null?void 0:os.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:p.jsx(jR,{scope:n,placedSide:P,onArrowChange:k,arrowX:z,arrowY:J,shouldHideArrow:Z,children:p.jsx(ae.div,{"data-side":P,"data-align":M,...m,ref:b,style:{...m.style,animation:H?void 0:"none"}})})})});D0.displayName=_f;var M0="PopperArrow",PR={top:"bottom",right:"left",bottom:"top",left:"r
183ight"},F0=y.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=NR(M0,r),o=PR[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(RR,{...s,ref:n,style:{...s.style,display:"block"}})})});F0.displayName=M0;function OR(t){return t!==null}var AR=t=>({name:"transformOrigin",options:t,fn(e){var x,w,v;const{placement:n,rects:r,middlewareData:s}=e,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,d]=U0(n),c={start:"0%",center:"50%",end:"100%"}[d],f=(((w=s.arrow)==null?void 0:w.x)??0)+a/2,h=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let g="",m="";return u==="bottom"?(g=o?c:`${f}px`,m=`${-l}px`):u==="top"?(g=o?c:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=o?c:`${h}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=o?c:`${h}px`),{data:{x:g,y:m}}}});function U0(t){const[e,n="center"]=t.split("-");return[e,n]}var LR=$0,IR=D0,$R=F0,[xu,LI]=Cr("Tooltip",[A0]),Ef=A0(),B0="TooltipProvider",DR=700,Dm="tooltip.open",[MR,z0]=xu(B0),V0=t=>{const{__scopeTooltip:e,delayDuration:n=DR,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=y.useRef(!0),a=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(MR,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:y.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};V0.displayName=B0;var H0="Tooltip",[II,Su]=xu(H0),Bd="TooltipTrigger",FR=y.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Su(Bd,n),i=z0(Bd,n),o=Ef(n),a=y.useRef(null),l=Le(e,a,s.onTriggerChange),u=y.useRef(!1),d=y.useRef(!1),c=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),p.jsx(LR,{asChild:!0,...o,children:p.jsx(ae.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ne(t.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ne(t.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ne(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:ne(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:ne(t.onBlur,s.onClose),onClick:ne(t.onClick,s.onClose)})})});FR.displayName=Bd;var UR="TooltipPortal",[$I,BR]=xu(UR,{forceMount:void 0}),mi="TooltipContent",W0=y.forwardRef((t,e)=>{const n=BR(mi,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=Su(mi,t.__scopeTooltip);return p.jsx(ss,{present:r||o.open,children:o.disableHoverableContent?p.jsx(K0,{side:s,...i,ref:e}):p.jsx(zR,{side:s,...i,ref:e})})}),zR=y.forwardRef((t,e)=>{const n=Su(mi,t.__scopeTooltip),r=z0(mi,t.__scopeTooltip),s=y.useRef(null),i=Le(e,s),[o,a]=y.useState(null),{trigger:l,onClose:u}=n,d=s.current,{onPointerInTransitChange:c}=r,f=y.useCallback(()=>{a(null),c(!1)},[c]),h=y.useCallback((g,m)=>{const x=g.currentTarget,w={x:g.clientX,y:g.clientY},v=qR(w,x.getBoundingClientRect()),b=GR(w,v),S=JR(m.getBoundingClientRect()),k=YR([...b,...S]);a(k),c(!0)},[c]);return y.useEffect(()=>()=>f(),[f]),y.useEffect(()=>{if(l&&d){const g=x=>h(x,d),m=x=>h(x,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",m)}}},[l,d,h,f]),y.useEffect(()=>{if(o){const g=m=>{const x=m.target,w={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),b=!QR(w,o);v?f():b&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,o,u,f]),p.jsx(K0,{...t,ref:i})}),[VR,HR]=xu(H0,{isInside:!1}),WR=NE("TooltipContent"),K0=y.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Su(mi,n),u=Ef(n),{onClose:d}=l;return y.useEffect(()=>
183(document.addEventListener(Dm,d),()=>document.removeEventListener(Dm,d)),[d]),y.useEffect(()=>{if(l.trigger){const c=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),p.jsx(mu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:p.jsxs(IR,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.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:[p.jsx(WR,{children:r}),p.jsx(VR,{scope:n,isInside:!0,children:p.jsx(ZE,{id:l.contentId,role:"tooltip",children:s||r})})]})})});W0.displayName=mi;var q0="TooltipArrow",KR=y.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Ef(n);return HR(q0,n).isInside?null:p.jsx($R,{...s,...r,ref:e})});KR.displayName=q0;function qR(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function GR(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function JR(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function QR(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],u=a.x,d=a.y,c=l.x,f=l.y;d>r!=f>r&&n<(c-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function YR(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),XR(e)}function XR(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var ZR=V0,G0=W0;const ej=ZR,tj=y.forwardRef(({className:t,sideOffset:e=4,...n},r)=>p.jsx(G0,{ref:r,sideOffset:e,className:ee("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),...n}));tj.displayName=G0.displayName;const G=t=>typeof t=="string",Mi=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},Mm=t=>t==null?"":String(t),nj=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},rj=/###/g,Fm=t=>t&&t.includes("###")?t.replace(rj,"."):t,Um=t=>!t||G(t),so=(t,e,n)=>{const r=G(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Um(t))return{};const i=Fm(r[s]);!t[i]&&n&&(t[i]=new n),Object.prototype.hasOwnProperty.call(t,i)?t=t[i]:t={},++s}return Um(t)?{}:{obj:t,k:Fm(r[s])}},Bm=(t,e,n)=>{const{obj:r,k:s}=so(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=so(t,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=so(t,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},sj=(t,e,n,r)=>{const{obj:s,k:i}=so(t,e,Object);s[i]=s[i]||[],s[i].push(n)},Ul=(t,e)=>{const{obj:n,k:r}=so(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},ij=(t,e,n)=>{const r=Ul(t,n);return r!==void 0?r:Ul(e,n)},J0=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?G(t[r])||t[r]instanceof String||G(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):J0(t[r],e[r],n):t[r]=e[r]);return t},vn=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),oj={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},aj=t=>
vendor: 5,666 bytes, line 183
183G(t)?t.replace(/[&<>"'\/]/g,e=>oj[e]):t;class lj{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const uj=[" ",",","?","!",";"],cj=new lj(20),dj=(t,e,n)=>{e=e||"",n=n||"";const r=uj.filter(o=>!e.includes(o)&&!n.includes(o));if(r.length===0)return!0;const s=cj.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(t);if(!i){const o=t.indexOf(n);o>0&&!s.test(t.substring(0,o))&&(i=!0)}return i},zd=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let s=t;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let l=i;l<r.length;++l)if(l!==i&&(a+=n),a+=r[l],o=s[a],o!==void 0){if(["string","number","boolean"].includes(typeof o)&&l<r.length-1)continue;i+=l-i+1;break}s=o}return s},Lo=t=>t==null?void 0:t.replace(/_/g,"-"),hj={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var n,r;(r=(n=console==null?void 0:console[t])==null?void 0:n.apply)==null||r.call(n,console,e)}};class Bl{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||hj,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,s){return s&&!this.debug?null:(e=e.map(i=>G(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),G(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Bl(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Bl(this.logger,e)}}var un=new Bl;class ku{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}once(e,n){const r=(...s)=>{n(...s),this.off(e,r)};return this.on(e,r),this}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(e,...n)})}}class zm extends ku{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,s={}){var u,d;const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.includes(".")?a=e.split("."):(a=[e,n],r&&(Array.isArray(r)?a.push(...r):G(r)&&i?a.push(...r.split(i)):a.push(r)));const l=Ul(this.data,a);return!l&&!n&&!r&&e.includes(".")&&(e=a[0],n=a[1],r=a.slice(2).join(".")),l||!o||!G(r)?l:zd((d=(u=this.data)==null?void 0:u[e])==null?void 0:d[n],r,i)}addResource(e,n,r,s,i={silent:!1}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,n];r&&(a=a.concat(o?r.split(o):r)),e.includes(".")&&(a=e.split("."),s=n,n=a[1]),this.addNamespaces(n),Bm(this.data,a,s),i.silent||this.emit("added",e,n,r,s)}addResources(e,n,r,s={silent:!1}){for(const i in r)(G(r[i])||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,i,o={silent:!1,skipCopy:!1}){let a=[e,n];e.includes(".")&&(a=e.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let l=Ul(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?J0(l,r,i):l={...l,...r},Bm(this.data,a,l),o.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Q0={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(i=>{var o;e=((o=this.processors[i])==null?void 0:o.process(e,n,r,s))??e}),e}};const Y0=Symbol("i18next/PATH_KEY");function fj(){const t=[],e=Object.create(null);let n;return e.get=(r,s)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),s===Y0?t:(t.push(s),n=Proxy.revocable(r,e),n.proxy)},Proxy.revocable(Object.create(null),e).proxy}function Gs(t,e){const{[Y0]:n}=t(fj()),r=(e==null?void 0:e.keySeparator)??".",s=(e==null?void 0:e.nsSeparator)??":";if(n.length>1&&s){const i=e==null?void 0:e.ns,o=Array.isArray(i)?i:null;if(o&&o.length>1&&o.slice(1).includes(n[0]))return`${n[0]}${s}${n.slice(1).join(r)}`}return n.join(r)}const vc=t=>!G(t)&&typeof t!="boolean"&&typeof t!="number";class zl extends ku{constructor(e,n={}){super(),nj(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
183i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=un.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const s=this.resolve(e,r);if((s==null?void 0:s.res)===void 0)return!1;const i=vc(s.res);return!(r.returnObjects===!1&&i)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&e.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!dj(e,r,s);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:G(i)?[i]:i};const u=e.split(r);(r!==s||r===s&&this.options.ns.includes(u[0]))&&(i=u.shift()),e=u.join(s)}return{key:e,namespaces:G(i)?[i]:i}}translate(e,n,r){let s=typeof n=="object"?{...n}:n;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=Gs(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]),e=e.map($=>typeof $=="function"?Gs($,{...this.options,...s}):String($));const i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],s),u=l[l.length-1];let d=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const c=s.lng||this.language,f=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return f?i?{res:`${u}${d}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${d}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:a;const h=this.resolve(e,s);let g=h==null?void 0:h.res;const m=(h==null?void 0:h.usedKey)||a,x=(h==null?void 0:h.exactUsedKey)||a,w=["[object Number]","[object Function]","[object RegExp]"],v=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,S=s.count!==void 0&&!G(s.count),k=zl.hasDefaultValue(s),_=S?this.pluralResolver.getSuffix(c,s.count,s):"",E=s.ordinal&&S?this.pluralResolver.getSuffix(c,s.count,{ordinal:!1}):"",C=S&&!s.ordinal&&s.count===0,N=C&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${_}`]||s[`defaultValue${E}`]||s.defaultValue;let j=g;b&&!g&&k&&(j=N);const B=vc(j),A=Object.prototype.toString.apply(j);if(b&&j&&B&&!w.includes(A)&&!(G(v)&&Array.isArray(j))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const $=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,j,{...s,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(h.res=$,h.usedParams=this.getUsedParamsDetails(s),h):$}if(o){const $=Array.isArray(j),O=$?[]:{},V=$?x:m;for(const D in j)if(Object.prototype.hasOwnProperty.call(j,D)){const H=`${V}${o}${D}`;k&&!g?O[D]=this.translate(H,{...s,defaultValue:vc(N)?N[D]:void 0,joinArrays:!1,ns:l}):O[D]=this.translate(H,{...s,joinArrays:!1,ns:l}),O[D]===H&&(O[D]=j[D])}g=O}}else if(b&&G(v)&&Array.isArray(g))g=g.join(v),g&&(g=this.extendTranslation(g,e,s,r));else{let $=!1,O=!1;!this.isValidLookup(g)&&k&&($=!0,g=N),this.isValidLookup(g)||(O=!0,g=a);const D=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:g,H=k&&N!==g&&this.options.updateMissing;if(O||$||H){if(this.logger.log(H?"updateKey":"missingKey",c,u,a,H?N:g),o){const W=this.resolve(a,{...s,keySeparator:!1});W&&W.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 T=[];const P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&P&&P[0])for(let W=0;W<P.length;W++)T.push(P[W]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(s.lng||this.language):T.push(s.lng||this.language);const M=(W,z,J)=>{var ge;const Z=k&&J!==g?J:D;this.options.missingKeyHandler?this.options.missingKeyHandler(W,u,z,Z,H,s):(ge=this.backendConnector)!=null&&ge.saveMissing&&this.backendConnector.saveMissing(W,u,z,Z,H,s),this.emit
vendor: 8,100 bytes, line 183
183("missingKey",W,u,z,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?T.forEach(W=>{const z=this.pluralResolver.getSuffixes(W,s);C&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!z.includes(`${this.options.pluralSeparator}zero`)&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(J=>{M([W],a+J,s[`defaultValue${J}`]||N)})}):M(T,a,N))}g=this.extendTranslation(g,e,s,h,r),O&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${a}`),(O||$)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${a}`:a,$?g:void 0,s))}return i?(h.res=g,h.usedParams=this.getUsedParamsDetails(s),h):g}extendTranslation(e,n,r,s,i){var l,u;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=G(e)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(d){const h=e.match(this.interpolator.nestingRegexp);c=h&&h.length}let f=r.replace&&!G(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,r.lng||this.language||s.usedLng,r),d){const h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;c<g&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(i==null?void 0:i[0])===h[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):this.translate(...h,n),r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,a=G(o)?[o]:o;return e!=null&&(a!=null&&a.length)&&r.applyPostProcessor!==!1&&(e=Q0.handle(a,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,s,i,o,a;return G(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?Gs(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;s=d;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const f=n.count!==void 0&&!G(n.count),h=f&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(G(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);c.forEach(x=>{var w,v;this.isValidLookup(r)||(a=x,!this.checkedLoadedFor[`${m[0]}-${x}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(a))&&(this.checkedLoadedFor[`${m[0]}-${x}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),m.forEach(b=>{var _;if(this.isValidLookup(r))return;o=b;const S=[d];if((_=this.i18nFormat)!=null&&_.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,b,x,n);else{let E;f&&(E=this.pluralResolver.getSuffix(b,n.count,n));const C=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&E.startsWith(N)&&S.push(d+E.replace(N,this.options.pluralSeparator)),S.push(d+E),h&&S.push(d+C)),g){const j=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(j),f&&(n.ordinal&&E.startsWith(N)&&S.push(j+E.replace(N,this.options.pluralSeparator)),S.push(j+E),h&&S.push(j+C))}}let k;for(;k=S.pop();)this.isValidLookup(r)||(i=k,r=this.getResource(b,x,k,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,s={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!G(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith(n)&&e[r]!==void 0)return!0;return!1}}class Vm{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=un.create("languageUtils")}getScriptPartFromCode(e){if(e=Lo(e),!e||!e.includes("-"))return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Lo(e),!e||!e.includes("-"))return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(G(e)&&e.includes("-")){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return n=s;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>o===i?!0:!o.includes("-")&&!i.includes("-")?!1:!!(o.includes("-")&&!i.includes("-")&&o.slice(0,o.indexOf("-"))===i||o.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),G(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return G(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):G(e)&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.includes(o)||i(this.formatLanguageCode(o))}),s}}const Hm={zero:0,one:1,two:2,few:3,many:4,other:5},Wm={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class pj{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=un.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=Lo(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl pol
183yfill!"),Wm;if(!e.match(/-|_/))return Wm;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,n)}return this.pluralRulesCache[i]=o,o}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Hm[s]-Hm[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n,r={}){const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const Km=(t,e,n,r=".",s=!0)=>{let i=ij(t,e,n);return!i&&s&&G(n)&&(i=zd(t,n,r),i===void 0&&(i=zd(e,n,r))),i},yc=t=>t.replace(/\$/g,"$$$$");class qm{constructor(e={}){var n;this.logger=un.create("interpolator"),this.options=e,this.format=((n=e==null?void 0:e.interpolation)==null?void 0:n.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:m,nestingOptionsSeparator:x,maxReplaces:w,alwaysFormat:v}=e.interpolation;this.escape=n!==void 0?n:aj,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?vn(i):o||"{{",this.suffix=a?vn(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":c?vn(c):"-",this.unescapeSuffix=this.unescapePrefix?"":d?vn(d):"",this.nestingPrefix=f?vn(f):h||vn("$t("),this.nestingSuffix=g?vn(g):m||vn(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=w||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,r,s){var h;let i,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(!g.includes(this.formatSeparator)){const v=Km(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...s,...n,interpolationkey:g}):v}const m=g.split(this.formatSeparator),x=m.shift().trim(),w=m.join(this.formatSeparator).trim();return this.format(Km(n,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:x})};this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>yc(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?yc(this.escape(g)):yc(g)}].forEach(g=>{for(a=0;i=g.regex.exec(e);){const m=i[1].trim();if(o=u(m),o===void 0)if(typeof d=="function"){const w=d(e,i,s);o=G(w)?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))o="";else if(c){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),o="";else!G(o)&&!this.useRawValueToEscape&&(o=Mm(o));const x=g.safeValue(o);if(e=e.replace(i[0],x),c?(g.regex.lastIndex+=o.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,n,r={}){let s,i,o;const a=(l,u)=>{const d=this.nestingOptionsSeparator;if(!l.includes(d))return l;const c=l.split(new RegExp(`${vn(d)}[ ]*{`));let f=`{${c[1]}`;l=c[0],f=this.interpolate(f,o);const h=f.match(/'/g),g=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o}
vendor: 16,128 bytes, line 183
183)}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${d}${f}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];o={...r},o=o.replace&&!G(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(l=s[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&!G(i))return i;G(i)||(i=Mm(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),l.length&&(i=l.reduce((d,c)=>this.format(d,c,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const mj=t=>{let e=t.toLowerCase().trim();const n={};if(t.includes("(")){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].slice(0,-1);e==="currency"&&!s.includes(":")?n.currency||(n.currency=s.trim()):e==="relativetime"&&!s.includes(":")?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},Gm=t=>{const e={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=e[o];return a||(a=t(Lo(r),s),e[o]=a),a(n)}},gj=t=>(e,n,r)=>t(Lo(n),r)(e);class vj{constructor(e={}){this.logger=un.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Gm:gj;this.formats={number:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i});return a=>o.format(a)}),currency:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i,style:"currency"});return a=>o.format(a)}),datetime:r((s,i)=>{const o=new Intl.DateTimeFormat(s,{...i});return a=>o.format(a)}),relativetime:r((s,i)=>{const o=new Intl.RelativeTimeFormat(s,{...i});return a=>o.format(a,i.range||"day")}),list:r((s,i)=>{const o=new Intl.ListFormat(s,{...i});return a=>o.format(a)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Gm(n)}format(e,n,r,s={}){if(!n||e==null)return e;const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&!i[0].includes(")")&&i.find(a=>a.includes(")"))){const a=i.findIndex(l=>l.includes(")"));i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,l)=>{var c;const{formatName:u,formatOptions:d}=mj(l);if(this.formats[u]){let f=a;try{const h=((c=s==null?void 0:s.formatParams)==null?void 0:c[s.interpolationkey])||{},g=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](a,g,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}const yj=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class wj extends ku{constructor(e,n,r,s={}){var i,o;super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=un.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(e,n,r,s){const i={},o={},a={},l={};return e.forEach(u=>{let d=!0;n.forEach(c=>{const f=`${u}|${c}`;!r.reload&&this.store.hasResourceBundle(u,c)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,d=!1,o[f]===void 0&&(o[f]=!0),i[f]===void 0&&(i[f]=!0),l[c]===void 0&&(l[c]=!0)))}),d||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const s=e.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const a={};this.queue.forEach(l=>{sj(l.loaded,[i],o),yj(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const d=l.loaded[u];d.length&&d.forEach(c=>{a[u][c]===void 0&&(a[u][c]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,s=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(u&&d&&s<this.maxRetries){setTimeout(()=>{this.read(e,n,r,s+1,i*2,o)},i);return}o(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,n,a)}prepareLoading(e,n,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();G(e)&&(e=this.languageUtils.toResolveHierarchy(e)),G(n)&&(n=[n]);const i=this.queueLoad(e,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,n,r,s,i,o={},a=()=>{}){var l,u,d,c,f;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((c=(d=this.services)==null?void 0:d.utils)!=null&&c.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const h={...o,isUpdate:i},g=this.backend.create.bind(this.backend);if(g.length<6)try{let m;g.length===5?m=g(e,n,r,s,h):m=g(e,n,r,s),m&&typeof m.then=="function"?m.then(x=>a(null,x)).catch(a):a(null,m)}catch(m){a(m)}else g(e,n,r,s,a,h)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const wc=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,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 e={};if(typeof t[1]=="object"&&(e=t[1]),G(t[1])&&(e.defaultValue=t[1]),G(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Jm=t=>(G(t.ns)&&(t.ns=[t.ns]),G(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),G(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&!t.supportedLngs.includes("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Ra=()=>{},bj=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class io extends ku{constructor(e={},n){if(super(),this.options=Jm(e),this.services={},this.logger=un,this.modules={external:[]},bj(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(G(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const r=wc();this.options={...r,...this.options,...Jm(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?un.init(s(this.modules.logger),this.options):un.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=vj;const d=new Vm(this.options);this.store=new zm(this.options.resources,this.options);const c=this.services;c.logger=un,c.resourceStore=this.store,c.languageUtils=d,c.pluralResolver=new pj(d,{prepend:this.options.pluralSeparator}),u&&(c.formatter=s(u),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new qm(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new wj(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new zl(this.services,this.options),this.translator.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ra),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const a=Mi(),l=()=>{const u=(d,c)=>{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),a.resolve(c),n(d,c)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,n=Ra){var i,o;let r=n;const s=G(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(c=>{c!=="cimode"&&(a.includes(c)||a.push(c))})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>l(d)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,u=>l(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,n,r){const s=Mi();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=Ra),this.services.backendConnector.reload(e,n,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Q0.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=Mi();this.emit("languageChanging",e);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(a,(...u)=>this.t(...u))},o=a=>{var d,c;!e&&!a&&this.services.languageDetector&&(a=[]);const l=G(a)?a:a&&a[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(G(a)?[a]:a);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(c=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||c.call(d,u)),this.loadResources(u,f=>{i(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,n,r){const s=(i,o,...a)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([i,o].concat(a)):l={...o},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=Gs(l.keyPrefix,u));const d=this.options.keySeparator||".";let c;return l.keyPrefix&&Array.isArray(i)?c=i.map(f=>(typeof f=="function"&&(f=Gs(f,u)),`${l.keyPrefix}${d}${f}`)):(typeof i=="function"&&(i=Gs(i,u)),c=l.keyPrefix?`${l.keyPrefix}${d}${i}`:i),this.t(c,l)};return G(e)?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=r,s}t(...e){var n;return(n=this.translator)==null?void 0:n.translate(...e)}exists(...e){var n;return(n=this.translator)==null?void 0:n.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
183if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!s||o(i,e)))}loadNamespaces(e,n){const r=Mi();return this.options.ns?(G(e)&&(e=[e]),e.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Mi();G(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>!s.includes(o)&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(e){var s,i;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["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"],r=((i=this.services)==null?void 0:i.languageUtils)||new Vm(wc());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new io(e,n);return r.createInstance=io.createInstance,r}cloneInstance(e={},n=Ra){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new io(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,c)=>(d[c]={...l[u][c]},d),l[u]),l),{});i.store=new zm(a,s),i.services.resourceStore=i.store}if(e.interpolation){const l={...wc().interpolation,...this.options.interpolation,...e.interpolation},u={...s,interpolation:l};i.services.interpolator=new qm(u)}return i.translator=new zl(i.services,s),i.translator.on("*",(a,...l)=>{i.emit(a,...l)}),i.init(s,n),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const et=io.createInstance();et.createInstance;et.dir;et.init;et.loadResources;et.reloadResources;et.use;et.changeLanguage;et.getFixedT;et.t;et.exists;et.setDefaultNamespace;et.hasLoadedNamespace;et.loadNamespaces;et.loadLanguages;const xj=(t,e,n,r)=>{var i,o,a,l;const s=[n,{code:e,...r||{}}];if((o=(i=t==null?void 0:t.services)==null?void 0:i.logger)!=null&&o.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);es(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(a=t==null?void 0:t.services)==null?void 0:a.logger)!=null&&l.warn?t.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},Qm={},Vd=(t,e,n,r)=>{es(n)&&Qm[n]||(es(n)&&(Qm[n]=new Date),xj(t,e,n,r))},X0=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},Hd=(t,e,n)=>{t.loadNamespaces(e,X0(t,n))},Ym=(t,e,n,r)=>{if(es(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return Hd(t,n,r);
183n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,X0(t,r))},Sj=(t,e,n={})=>!e.languages||!e.languages.length?(Vd(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,t))return!1}}),es=t=>typeof t=="string",kj=t=>typeof t=="object"&&t!==null,_j=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ej={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Cj=t=>Ej[t],Tj=t=>t.replace(_j,Cj);let Wd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Tj,transDefaultProps:void 0};const Rj=(t={})=>{Wd={...Wd,...t}},jj=()=>Wd;let Z0;const Nj=t=>{Z0=t},Pj=()=>Z0,Oj={type:"3rdParty",init(t){Rj(t.options.react),Nj(t)}},Aj=y.createContext();class Lj{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var eb={exports:{}},tb={};/**
184 * @license React
185 * use-sync-external-store-shim.production.js
186 *
187 * Copyright (c) Meta Platforms, Inc. and affiliates.
188 *
189 * This source code is licensed under the MIT license found in the
190 * LICENSE file in the root directory of this source tree.
191 */var gi=y;function Ij(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var $j=typeof Object.is=="function"?Object.is:Ij,Dj=gi.useState,Mj=gi.useEffect,Fj=gi.useLayoutEffect,Uj=gi.useDebugValue;function Bj(t,e){var n=e(),r=Dj({inst:{value:n,getSnapshot:e}}),s=r[0].inst,i=r[1];return Fj(function(){s.value=n,s.getSnapshot=e,bc(s)&&i({inst:s})},[t,n,e]),Mj(function(){return bc(s)&&i({inst:s}),t(function(){bc(s)&&i({inst:s})})},[t]),Uj(n),n}function bc(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!$j(t,n)}catch{return!0}}function zj(t,e){return e()}var Vj=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zj:Bj;tb.useSyncExternalStore=gi.useSyncExternalStore!==void 0?gi.useSyncExternalStore:Vj;eb.exports=tb;var Hj=eb.exports;const Wj=(t,e)=>{if(es(e))return e;if(kj(e)&&es(e.defaultValue))return e.defaultValue;if(typeof t=="function")return"";if(Array.isArray(t)){const n=t[t.length-1];return typeof n=="function"?"":n}return t},Kj={t:Wj,ready:!1},qj=()=>()=>{},mn=(t,e={})=>{var N,j,B;const{i18n:n}=e,{i18n:r,defaultNS:s}=y.useContext(Aj)||{},i=n||r||Pj();i&&!i.reportNamespaces&&(i.reportNamespaces=new Lj),i||Vd(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=y.useMemo(()=>{var A;return{...jj(),...(A=i==null?void 0:i.options)==null?void 0:A.react,...e}},[i,e]),{useSuspense:a,keyPrefix:l}=o,u=s||((N=i==null?void 0:i.options)==null?void 0:N.defaultNS),d=es(u)?[u]:u||["translation"],c=y.useMemo(()=>d,d);(B=(j=i==null?void 0:i.reportNamespaces)==null?void 0:j.addUsedNamespaces)==null||B.call(j,c);const f=y.useRef(0),h=y.useCallback(A=>{if(!i)return qj;const{bindI18n:$,bindI18nStore:O}=o,V=()=>{f.current+=1,A()};return $&&i.on($,V),O&&i.store.on(O,V),()=>{$&&$.split(" ").forEach(D=>i.off(D,V)),O&&O.split(" ").forEach(D=>i.store.off(D,V))}},[i,o]),g=y.useRef(),m=y.useCallback(()=>{if(!i)return Kj;const A=!!(i.isInitialized||i.initializedStoreOnce)&&c.every(T=>Sj(T,i,o)),$=e.lng||i.language,O=f.current,V=g.current;if(V&&V.ready===A&&V.lng===$&&V.keyPrefix===l&&V.revision===O)return V;const H={t:i.getFixedT($,o.nsMode==="fallback"?c:c[0],l),ready:A,lng:$,keyPrefix:l,revision:O};return g.current=H,H},[i,c,l,o,e.lng]),[x,w]=y.useState(0),{t:v,ready:b}=Hj.useSyncExternalStore(h,m,m);y.useEffect(()=>{if(i&&!b&&!a){const A=()=>w($=>$+1);e.lng?Ym(i,e.lng,c,A):Hd(i,c,A)}},[i,e.lng,c,b,a,x]);const S=i||{},k=y.useRef(null),_=y.useRef(),E=A=>{const $=Object.getOwnPropertyDescriptors(A);$.__original&&delete $.__original;const O=Object.create(Object.getPrototypeOf(A),$);if(!Object.prototype.hasOwnProperty.call(O,"__original"))try{Object.defineProperty(O,"__original",{value:A,writable:!1,enumerable:!1,
191configurable:!1})}catch{}return O},C=y.useMemo(()=>{const A=S,$=A==null?void 0:A.language;let O=A;A&&(k.current&&k.current.__original===A?_.current!==$?(O=E(A),k.current=O,_.current=$):O=k.current:(O=E(A),k.current=O,_.current=$));const V=!b&&!a?(...H)=>(Vd(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),v(...H)):v,D=[V,O,b];return D.t=V,D.i18n=O,D.ready=b,D},[v,S,b,S.resolvedLanguage,S.language,S.languages]);if(i&&a&&!b)throw new Promise(A=>{const $=()=>A();e.lng?Ym(i,e.lng,c,$):Hd(i,c,$)});return C},Gj=ff("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),_e=y.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?RE:"button";return p.jsx(o,{className:ee(Gj({variant:e,size:n,className:t})),ref:i,...s})});_e.displayName="Button";const Xm=()=>{const{i18n:t,t:e}=mn(),n=t.resolvedLanguage??t.language,r=s=>t.changeLanguage(s);return p.jsxs("div",{className:"inline-flex items-center rounded-full border border-border bg-background/60 p-0.5 backdrop-blur",children:[p.jsx(_e,{type:"button",size:"sm",variant:n==="en"?"default":"ghost",className:"h-7 rounded-full px-3 text-xs",onClick:()=>r("en"),"aria-label":"Switch to English",children:e("common.languageEN")}),p.jsx(_e,{type:"button",size:"sm",variant:n==="lt"?"default":"ghost",className:"h-7 rounded-full px-3 text-xs",onClick:()=>r("lt"),"aria-label":"Perjungti į lietuvių",children:e("common.languageLT")})]})},Cf="/assets/logo-DLbyEnWu.jpeg",Jj=()=>{const{t}=mn(),[e,n]=y.useState(!1),r=[{to:"/",label:t("nav.home"),end:!0},{to:"/about",label:t("nav.about")},{to:"/trips",label:t("nav.trips")},{to:"/tour",label:t("nav.tour")},{to:"/charity",label:t("nav.charity")},{to:"/auction",label:t("nav.auction")},{to:"/contact",label:t("nav.contact")}];return p.jsxs("header",{className:"sticky top-0 z-50 w-full border-b border-border/50 bg-background/85 backdrop-blur-md",children:[p.jsxs("div",{className:"container-tight flex h-16 items-center justify-between gap-4",children:[p.jsxs(gr,{to:"/",className:"flex items-center gap-2 font-display text-lg tracking-wide","aria-label":"Tour de Baltics — home",children:[p.jsx("img",{src:Cf,alt:"Tour de Baltics logo",className:"h-9 w-auto mix-blend-multiply"}),p.jsx("span",{className:"hidden sm:inline",children:"Tour de Baltics"})]}),p.jsx("nav",{className:"hidden items-center gap-1 lg:flex",children:r.map(s=>p.jsx(dm,{to:s.to,end:s.end,className:({isActive:i})=>ee("rounded-md px-3 py-2 text-sm font-medium transition-colors",i?"text-primary":"text-muted-foreground hover:text-foreground"),children:s.label},s.to))}),p.jsxs("div",{className:"hidden items-center gap-3 lg:flex",children:[p.jsx(Xm,{}),p.jsx(_e,{asChild:!0,size:"sm",className:"bg-accent text-accent-foreground hover:bg-accent/90",children:p.jsx(gr,{to:"/charity",children:t("nav.donate")})})]}),p.jsx("button",{type:"button",className:"inline-flex h-10 w-10 items-center justify-center rounded-md lg:hidden",onClick:()=>n(s=>!s),"aria-label":"Toggle menu","aria-expanded":e,children:e?p.jsx(mf,{className:"h-5 w-5"}):p.jsx(TC,{className:"h-5 w-5"})})]}),e&&p.jsx("div",{className:"border-t border-border bg-background lg:hidden",children:p.jsxs("div",{className:"container-tight flex flex-col gap-1 py-4",children:[r.map(s=>p.jsx(dm,{to:s.to,end:s.end,onClick:()=>n(!1),className:({isActive:i})=>ee("rounded-md px-3 py-3 text-base font-medium",i?"bg-muted text-primary":"text-foreground hover:bg-muted"),children:s.label},s.to)),p.jsxs("div",{className:"mt-3 flex items-center justify-between gap-3 border-t border-border pt-4",children:[p.jsx(Xm,{}),p.jsx(_e,{asChild:!0,size:"sm",className:"bg-accent text-accent-foreground hover:bg-accent/90",children:p.jsx(gr,{to:"/charity",onClick:()=>n(!1),children:t("nav.donate")})})]})]})})]})},Qj=t=>
191p.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...t,children:p.jsx("path",{d:"M16.5 3a5.5 5.5 0 0 0 5.5 5.5v3a8.5 8.5 0 0 1-5.5-2v7.25a6.25 6.25 0 1 1-6.25-6.25c.34 0 .67.03 1 .08v3.1a3.25 3.25 0 1 0 2.25 3.07V3h3z"})}),xc={instagram:"https://www.instagram.com/remi.dme",tiktok:"https://www.tiktok.com/@remi.dme",facebook:"https://www.facebook.com/share/1abH3AR81Q/"},nb=({className:t="",iconClassName:e="h-5 w-5",variant:n="default"})=>{const r=n==="muted"?"text-muted-foreground hover:text-foreground":"text-foreground hover:text-primary",s=[{href:xc.instagram,label:"Instagram @Remi.dme",Icon:pf},{href:xc.tiktok,label:"TikTok @remi.dme",Icon:Qj},{href:xc.facebook,label:"Facebook",Icon:_C}];return p.jsx("div",{className:`flex items-center gap-3 ${t}`,children:s.map(({href:i,label:o,Icon:a})=>p.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer","aria-label":o,className:`inline-flex h-9 w-9 items-center justify-center rounded-full border border-border bg-background transition-colors ${r}`,children:p.jsx(a,{className:e})},i))})},Yj=()=>{const{t}=mn();return p.jsx("footer",{className:"border-t border-border bg-muted/40",children:p.jsxs("div",{className:"container-tight grid gap-8 py-12 sm:grid-cols-3",children:[p.jsxs("div",{children:[p.jsxs(gr,{to:"/",className:"flex items-center gap-2 font-display text-lg","aria-label":"Tour de Baltics — home",children:[p.jsx("img",{src:Cf,alt:"Tour de Baltics logo",className:"h-10 w-auto mix-blend-multiply"}),p.jsx("span",{children:"Tour de Baltics"})]}),p.jsx("p",{className:"mt-3 max-w-xs text-sm text-muted-foreground",children:t("footer.tagline")})]}),p.jsxs("div",{children:[p.jsx("h3",{className:"mb-3 text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:t("footer.follow")}),p.jsx(nb,{}),p.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:t("common.followDailyVlog")})]}),p.jsxs("div",{className:"text-sm text-muted-foreground sm:text-right",children:[p.jsxs("p",{children:["© ",new Date().getFullYear()," Remi De Mey"]}),p.jsx("p",{className:"mt-1 text-xs",children:t("footer.rights")})]})]})})},Xj=()=>p.jsxs("div",{className:"flex min-h-screen flex-col",children:[p.jsx(Jj,{}),p.jsx("main",{className:"flex-1",children:p.jsx(T_,{})}),p.jsx(Yj,{})]}),Zj="/assets/remi-portrait-4EUsXOg3.jpeg",eN=()=>{const{t}=mn(),e=t("hero.title").split(`
192`);return p.jsxs(p.Fragment,{children:[p.jsxs("section",{className:"relative overflow-hidden bg-gradient-hero text-primary-foreground",children:[p.jsx("div",{className:"absolute inset-0 opacity-25",style:{backgroundImage:`url(${Zj})`,backgroundSize:"cover",backgroundPosition:"center 70%"},"aria-hidden":"true"}),p.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/95 via-primary/85 to-primary/40","aria-hidden":"true"}),p.jsxs("div",{className:"container-tight relative py-20 sm:py-28 lg:py-36",children:[p.jsxs("p",{className:"mb-6 inline-flex items-center gap-2 rounded-full border border-primary-foreground/20 bg-primary-foreground/5 px-3 py-1 text-xs font-medium uppercase tracking-widest",children:[p.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent"}),t("hero.eyebrow")]}),p.jsx("h1",{className:"font-display text-5xl leading-[0.9] sm:text-7xl lg:text-8xl",children:e.map((n,r)=>p.jsx("span",{className:"block",children:n},r))}),p.jsx("p",{className:"mt-8 max-w-xl text-base text-primary-foreground/80 sm:text-lg",children:t("hero.subtitle")}),p.jsxs("div",{className:"mt-10 flex flex-col gap-3 sm:flex-row",children:[p.jsx(_e,{asChild:!0,size:"lg",className:"bg-accent text-accent-foreground hover:bg-accent/90",children:p.jsxs(gr,{to:"/auction",children:[t("hero.ctaPrimary")," ",p.jsx(km,{className:"ml-1 h-4 w-4"})]})}),p.jsx(_e,{asChild:!0,size:"lg",variant:"outline",className:"border-primary-foreground/30 bg-transparent text-primary-foreground hover:bg-primary-foreground/10 hover:text-primary-foreground",children:p.jsxs(gr,{to:"/charity",children:[p.jsx(o0,{className:"mr-1 h-4 w-4"})," ",t("hero.ctaSecondary")]})})]}),p.jsxs("dl",{className:"mt-16 grid max-w-xl grid-cols-3 gap-6 border-t border-primary-foreground
192/15 pt-8",children:[p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs uppercase tracking-wider text-primary-foreground/60",children:t("hero.stats.km")}),p.jsx("dd",{className:"mt-1 font-display text-3xl text-accent sm:text-4xl",children:"2 211"})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs uppercase tracking-wider text-primary-foreground/60",children:t("hero.stats.days")}),p.jsxs("dd",{className:"mt-1 font-display text-3xl text-accent sm:text-4xl",children:["200",p.jsx("span",{className:"text-base",children:" km"})]})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs uppercase tracking-wider text-primary-foreground/60",children:t("hero.stats.countries")}),p.jsx("dd",{className:"mt-1 font-display text-3xl text-accent sm:text-4xl",children:"3"})]})]})]}),p.jsx("p",{className:"absolute bottom-3 right-4 text-[10px] uppercase tracking-widest text-primary-foreground/50",children:"Photo: Domantas Savanevičius"})]}),p.jsx("section",{className:"border-b border-border bg-accent/10",children:p.jsxs("div",{className:"container-tight flex flex-col items-start justify-between gap-3 py-4 sm:flex-row sm:items-center",children:[p.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[p.jsx(PC,{className:"h-4 w-4 text-primary"}),p.jsx("span",{className:"font-medium",children:t("common.followLive")}),p.jsxs("span",{className:"text-muted-foreground",children:["— ",t("common.comingSoon")]})]}),p.jsx(_e,{asChild:!0,variant:"ghost",size:"sm",disabled:!0,children:p.jsxs("a",{href:"#","aria-disabled":"true",children:[t("common.followLive")," →"]})})]})}),p.jsx("section",{className:"section-y",children:p.jsx("div",{className:"container-tight grid gap-6 md:grid-cols-3",children:[{to:"/about",title:t("nav.about"),body:t("about.paragraph1")},{to:"/tour",title:t("tour.title"),body:t("tour.subtitle")},{to:"/charity",title:t("charity.title"),body:t("charity.intro")}].map(n=>p.jsxs(gr,{to:n.to,className:"group relative overflow-hidden rounded-xl border border-border bg-card p-6 shadow-card transition-all hover:-translate-y-1 hover:shadow-elegant",children:[p.jsx("h2",{className:"font-display text-2xl",children:n.title}),p.jsx("p",{className:"mt-3 line-clamp-4 text-sm text-muted-foreground",children:n.body}),p.jsxs("span",{className:"mt-6 inline-flex items-center gap-1 text-sm font-medium text-primary",children:[t("common.learnMore")," ",p.jsx(km,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})]},n.to))})})]})},tN="/assets/remi-about-BejFeQCR.jpeg",nN=()=>{const{t}=mn();return p.jsx("section",{className:"section-y",children:p.jsxs("div",{className:"container-tight max-w-3xl",children:[p.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-muted-foreground",children:t("nav.about")}),p.jsx("h1",{className:"mt-3 font-display text-5xl sm:text-6xl",children:t("about.title")}),p.jsx("div",{className:"mt-10 overflow-hidden rounded-xl border border-border shadow-card",children:p.jsx("img",{src:tN,alt:"Remi De Mey riding in Vilnius",className:"aspect-[4/3] w-full object-cover",loading:"lazy"})}),p.jsxs("div",{className:"prose prose-neutral mt-10 max-w-none text-base leading-relaxed text-foreground/90",children:[p.jsx("p",{children:t("about.paragraph1")}),p.jsx("p",{children:t("about.paragraph2")})]}),t("about.quote")&&p.jsxs("blockquote",{className:"mt-12 rounded-xl border-l-4 border-accent bg-muted/50 p-6",children:[p.jsx(NC,{className:"mb-3 h-6 w-6 text-accent"}),p.jsx("p",{className:"font-display text-2xl leading-snug",children:t("about.quote")}),p.jsx("footer",{className:"mt-3 text-sm text-muted-foreground",children:"— Remi De Mey"})]}),p.jsxs("div",{className:"mt-10",children:[p.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:t("footer.follow")}),p.jsx(nb,{})]})]})})},rN=()=>{const{t}=mn(),e=[{key:"belltu",route:"BE → LT"},{key:"italtu",route:"LT → IT"}];return p.jsx("section",{className:"section-y",children:p.jsxs("div",{className:"container-tight",children:[p.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-muted-foreground",children:t("nav.trips")}),p.jsx("h1",{className:"mt-3 font-display text-5xl sm:text-6xl",children:t("trips.title")}),p.jsx("p",{className:"mt-4 max-w-2xl text-muted-foreground",children:t("trips.subtitle")}),p.jsx("div",{className:"mt-12 grid gap-6 md:grid-cols-2",children:e.map(n=>p.jsxs("article",{className:"group overflow-hidden rounded-xl border border-border bg-card shadow-card transition-shadow hover:shadow-elegant",children:[p.jsxs("div",{className:"relative aspect-video w-full bg-gradient-hero",children:[p.jsx("div",{className:"absolute inset-0 flex items-center justify-center font-display text-5xl text-primary-foreground
192/40",children:n.route}),p.jsxs("div",{className:"absolute bottom-3 left-3 inline-flex items-center gap-1 rounded-full bg-background/90 px-3 py-1 text-xs font-medium",children:[p.jsx(a0,{className:"h-3 w-3"})," ",n.route]})]}),p.jsxs("div",{className:"p-6",children:[p.jsx("h2",{className:"font-display text-2xl",children:t(`trips.${n.key}.title`)}),p.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:t(`trips.${n.key}.description`)}),p.jsxs("a",{href:"https://instagram.com/Remi.dme",target:"_blank",rel:"noopener noreferrer",className:"mt-4 inline-flex items-center gap-2 text-sm font-medium text-primary hover:underline",children:[p.jsx(pf,{className:"h-4 w-4"})," ",t("trips.instagramNote")]})]})]},n.key))}),p.jsx("div",{className:"mt-12 grid gap-4 sm:grid-cols-3",children:[1,2,3].map(n=>p.jsx("div",{className:"flex aspect-square items-center justify-center rounded-lg border border-dashed border-border bg-muted/30 text-xs text-muted-foreground",children:"Instagram embed slot"},n))})]})})},sN=()=>{const{t}=mn(),e=t("tour.cities",{returnObjects:!0});return p.jsx("section",{className:"section-y",children:p.jsxs("div",{className:"container-tight",children:[p.jsxs("div",{className:"grid gap-10 md:grid-cols-[1fr_auto] md:items-end",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-muted-foreground",children:t("nav.tour")}),p.jsx("h1",{className:"mt-3 font-display text-5xl sm:text-6xl",children:t("tour.title")}),p.jsx("p",{className:"mt-4 max-w-2xl text-lg text-muted-foreground",children:t("tour.subtitle")})]}),p.jsx("img",{src:Cf,alt:"Tour de Baltics route map illustration",className:"hidden h-40 w-auto mix-blend-multiply md:block"})]}),p.jsxs("div",{className:"mt-12 grid gap-6 md:grid-cols-2",children:[p.jsxs("div",{className:"rounded-xl border border-border bg-card p-8 shadow-card",children:[p.jsx("div",{className:"mb-3 inline-flex rounded-full bg-accent/15 p-2 text-accent-foreground",children:p.jsx(a0,{className:"h-5 w-5 text-primary"})}),p.jsx("h2",{className:"font-display text-3xl",children:t("tour.concept")}),p.jsx("p",{className:"mt-3 text-sm leading-relaxed text-muted-foreground",children:t("tour.conceptDesc")})]}),p.jsxs("div",{className:"rounded-xl border border-border bg-card p-8 shadow-card",children:[p.jsx("div",{className:"mb-3 inline-flex rounded-full bg-accent/15 p-2",children:p.jsx(SC,{className:"h-5 w-5 text-primary"})}),p.jsx("h2",{className:"font-display text-3xl",children:t("tour.support")}),p.jsx("p",{className:"mt-3 text-sm leading-relaxed text-muted-foreground",children:t("tour.supportDesc")})]})]}),p.jsxs("div",{className:"mt-16",children:[p.jsx("h2",{className:"font-display text-3xl",children:t("tour.routeTitle")}),p.jsx("ol",{className:"mt-6 space-y-3",children:e.map((n,r)=>
192p.jsxs("li",{className:"flex items-start gap-4 rounded-lg border border-border bg-card p-4 shadow-card",children:[p.jsx("span",{className:"mt-0.5 flex h-9 w-9 flex-none items-center justify-center rounded-full bg-primary font-display text-lg text-primary-foreground",children:r+1}),p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"font-medium",children:n.name}),p.jsx("p",{className:"mt-1 text-sm leading-relaxed text-muted-foreground",children:n.note})]}),r<e.length-1&&p.jsx("span",{className:"ml-auto mt-1 text-xs text-muted-foreground",children:"↓"})]},`${n.name}-${r}`))})]}),p.jsxs("div",{className:"mt-12 grid gap-4 md:grid-cols-2",children:[p.jsx("div",{className:"rounded-xl border border-accent/40 bg-accent/10 p-6",children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(_m,{className:"mt-0.5 h-5 w-5 text-primary"}),p.jsxs("p",{className:"text-sm",children:[p.jsx("span",{className:"font-semibold",children:"Public start: July 24, 2026 · 10:00"})," at Cathedral Square in Vilnius centre. Everyone is welcome. Come cheer me on at the start line!"]})]})}),p.jsx("div",{className:"rounded-xl border border-accent/40 bg-accent/10 p-6",children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(_m,{className:"mt-0.5 h-5 w-5 text-primary"}),p.jsxs("p",{className:"text-sm",children:[p.jsx("span",{className:"font-semibold",children:"Planned finish: July 4th"})," at Cathedral Square in Vilnius centre. The exact arrival time will be announced on social media."]})]})})]})]})})},iN="/assets/rugute-logo-n5nUa7DM.png",oN=()=>{const{t}=mn();return p.jsx("section",{className:"section-y",children:p.jsxs("div",{className:"container-tight",children:[p.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-muted-foreground",children:t("nav.charity")}),p.jsx("h1",{className:"mt-3 font-display text-5xl sm:text-6xl",children:t("charity.title")}),p.jsxs("div",{className:"mt-8 grid gap-10 lg:grid-cols-2",children:[p.jsx("div",{className:"space-y-5 text-base leading-relaxed text-foreground/90",children:p.jsx("p",{children:t("charity.intro")})}),p.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-gradient-hero p-8 text-primary-foreground shadow-elegant",children:p.jsxs("div",{className:"flex items-center gap-5",children:[p.jsx("img",{src:iN,alt:"Rugutė — Labdaros ir paramos fondas logo",className:"h-24 w-24 shrink-0 rounded-full bg-white p-2"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-xs uppercase tracking-widest text-primary-foreground/60",children:"Foundation"}),p.jsx("h2",{className:"mt-2 font-display text-4xl",children:"Rugutė"}),p.jsx("p",{className:"mt-3 text-sm text-primary-foreground/80",children:'Labdaros ir paramos fondas „Rugutė" — Lithuania.'})]})]})})]}),p.jsxs("div",{className:"mt-20",children:[p.jsx("h2",{className:"font-display text-4xl",children:t("charity.donateTitle")}),p.jsx("p",{className:"mt-2 text-muted-foreground",children:t("charity.donateSubtitle")}),p.jsxs("div",{className:"mt-8 grid gap-6 md:grid-cols-2",children:[p.jsxs("article",{className:"flex flex-col rounded-xl border border-border bg-card p-8 shadow-card",children:[p.jsx("div",{className:"mb-4 inline-flex w-fit rounded-full bg-accent/20 p-3",children:p.jsx(o0,{className:"h-5 w-5 text-primary"})}),p.jsx("h3",{className:"font-display text-3xl",children:t("charity.rugute.title")}),p.jsx("p",{className:"mt-3 flex-1 text-sm text-muted-foreground",children:t("charity.rugute.description")}),p.jsx(_e,{asChild:!0,size:"lg",className:"mt-6 bg-accent text-accent-foreground hover:bg-accent/90",children:p.jsx("a",{href:"https://pay.sumup.com/b2c/QGDV6NW1?utm_campaign=pdf&utm_medium=print&utm_source=qr",target:"_blank",rel:"noopener noreferrer",children:t("charity.rugute.cta")})})]}),p.jsxs("article",{className:"flex flex-col rounded-xl border border-border bg-card p-8 shadow-card",children:[p.jsx("div",{className:"mb-4 inline-flex w-fit rounded-full bg-accent/20 p-3",children:p.jsx(xC,{className:"h-5 w-5 text-primary"})}),p.jsx("h3",{className:"font-display text-3xl",children:t("charity.project.title")}),p.jsx("p",{className:"mt-3 flex-1 text-sm text-muted-foreground",children:t("charity.project.description")}),p.jsx(_e,{asChild:!0,size:"lg",variant:"outline",className:"mt-6 border-primary text-primary hover:bg-primary hover:text-primary-foreground",children:p.jsx("a",{href:"https://revolut.me/remicicgc",target:"_blank",rel:"noopener noreferrer",children:t("charity.project.cta")})})]})]})]})]})})};function aN(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
192return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(c){o(c)}}function l(d){try{u(r.throw(d))}catch(c){o(c)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}const lN=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Tf extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class uN extends Tf{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Zm extends Tf{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class eg extends Tf{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Kd;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Kd||(Kd={}));class cN{constructor(e,{headers:n={},customFetch:r,region:s=Kd.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=lN(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return aN(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:d,timeout:c}=r;let f={},{region:h}=r;h||(h=this.region);const g=new URL(`${this.url}/${n}`);h&&h!=="any"&&(f["x-region"]=h,g.searchParams.set("forceFunctionRegion",h));let m;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(f["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(f["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let x=d;c&&(o=new AbortController,i=setTimeout(()=>o.abort(),c),d?(x=o.signal,d.addEventListener("abort",()=>o.abort())):x=o.signal);const w=yield this.fetch(g.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:m,signal:x}).catch(k=>{throw new uN(k)}),v=w.headers.get("x-relay-error");if(v&&v==="true")throw new Zm(w);if(!w.ok)throw new eg(w);let b=((s=w.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return b==="application/json"?S=yield w.json():b==="application/octet-stream"||b==="application/pdf"?S=yield w.blob():b==="text/event-stream"?S=w:b==="multipart/form-data"?S=yield w.formData():S=yield w.text(),{data:S,error:null,response:w}}catch(a){return{data:null,error:a,response:a instanceof eg||a instanceof Zm?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const rb=3,tg=t=>Math.min(1e3*2**t,3e4),dN=[520,503],sb=["GET","HEAD","OPTIONS"];var hN=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
192de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function ng(t,e){return new Promise(n=>{if(e!=null&&e.aborted){n();return}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",s),n()},t);function s(){clearTimeout(r),n()}e==null||e.addEventListener("abort",s)})}function fN(t,e,n,r){return!(!r||n>=rb||!sb.includes(t)||!dN.includes(e))}var pN=class{constructor(t){var e,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=t.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const u=new Headers(n.headers);o>0&&u.set("X-Retry-Count",String(o));let d;try{d=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body,(c,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(c){if((c==null?void 0:c.name)==="AbortError"||(c==null?void 0:c.code)==="ABORT_ERR"||!sb.includes(n.method))throw c;if(n.retryEnabled&&o<rb){const f=tg(o);o++,await ng(f,n.signal);continue}throw c}if(fN(n.method,d.status,o,n.retryEnabled)){var a,l;const c=(a=(l=d.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=c!==null?Math.max(0,parseInt(c,10)||0)*1e3:tg(o);await d.text(),o++,await ng(f,n.signal);continue}return await n.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",u="",d="";const c=o==null?void 0:o.cause;if(c){var f,h,g,m;const v=(f=c==null?void 0:c.message)!==null&&f!==void 0?f:"",b=(h=c==null?void 0:c.code)!==null&&h!==void 0?h:"";l=`${(g=o==null?void 0:o.name)!==null&&g!==void 0?g:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
193
194Caused by: ${(m=c==null?void 0:c.name)!==null&&m!==void 0?m:"Error"}: ${v}`,b&&(l+=` (${b})`),c!=null&&c.stack&&(l+=`
195${c.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const w=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${w} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((c==null?void 0:c.name)==="HeadersOverflowError"||(c==null?void 0:c.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(u+=`. Your request URL is ${w} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:d},data:null,count:null,status:0,statusText:""}}
195)),i.then(t,e)}async processResponse(t){var e=this;let n=null,r=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var u;const f=await t.text();f===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((u=e.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?r=f:r=JSON.parse(f))}const d=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),c=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");d&&c&&c.length>1&&(s=parseInt(c[1])),e.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const d=await t.text();try{n=JSON.parse(d),Array.isArray(n)&&t.status===404&&(r=[],n=null,i=200,o="OK")}catch{t.status===404&&d===""?(i=204,o="No Content"):n={message:d}}if(n&&e.shouldThrowOnError)throw new hN(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},mN=class extends pN{select(t){let e=!1;const n=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const rg=new RegExp("[,()]");var ks=class extends mN{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&rg.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&rg.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>
195n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},gN=class{constructor(t,{headers:e={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:r}=e??{},s=n?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new ks({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),n||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1950){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new ks({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((d,c)=>d.concat(Object.keys(c)),[]);if(u.length>0){const d=[...new Set(u)].map(c=>`"${c}"`);a.searchParams.set("columns",d.join(","))}}return new ks({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new ks({method:r,url:s,headers:i,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new ks({method:n,url:r,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Io(t){"@babel/helpers - typeof";return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Io(t)}function vN(t,e){if(Io(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Io(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yN(t){var e=vN(t,"string");return Io(e)=="symbol"?e:e+""}function wN(t,e,n){return(e=yN(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function ja(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sg(Object(n),!0).forEach(function(r){wN(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var bN=class ib{constructor(e,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,d)=>{const c=new AbortController,f=setTimeout(()=>c.abort(),i),h=d==null?void 0:d.signal;if(h){if(h.aborted)return clearTimeout(f),l(u,d);const g=()=>{clearTimeout(f),c.abort()};return h.addEventListener("abort",g,{once:!0}),l(u,ja(ja({},d),{},{signal:c.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",g)})}return l(u,ja(ja({},d),{},{signal:c.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new gN(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new ib(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let u;const d=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(d)),c=r&&Object.values(n).some(d);c?(a="POST",u=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([h,g])=>g!==void 0).map(([h,g])=>[h,Array.isArray(g)?`{${g.join(",")}}`:`${g}
195`]).forEach(([h,g])=>{l.searchParams.append(h,g)})):(a="POST",u=n);const f=new Headers(this.headers);return c?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new ks({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class xN{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
196import ws from "ws"
197new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=`
198
199Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const SN="2.104.0",kN=`realtime-js/${SN}`,_N="1.0.0",ob="2.0.0",EN=ob,CN=1e4,TN=100,Yn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ab={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},qd={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class RN{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,n,r){var s,i;const o=e.topic,a=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",u=e.payload.event,d=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},c=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`metadata length ${c.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+c.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
199let g=new DataView(h),m=0;g.setUint8(m++,this.KINDS.userBroadcastPush),g.setUint8(m++,l.length),g.setUint8(m++,a.length),g.setUint8(m++,o.length),g.setUint8(m++,u.length),g.setUint8(m++,c.length),g.setUint8(m++,n),Array.from(l,w=>g.setUint8(m++,w.charCodeAt(0))),Array.from(a,w=>g.setUint8(m++,w.charCodeAt(0))),Array.from(o,w=>g.setUint8(m++,w.charCodeAt(0))),Array.from(u,w=>g.setUint8(m++,w.charCodeAt(0))),Array.from(c,w=>g.setUint8(m++,w.charCodeAt(0)));var x=new Uint8Array(h.byteLength+r.byteLength);return x.set(new Uint8Array(h),0),x.set(new Uint8Array(r),h.byteLength),x.buffer}decode(e,n){if(this._isArrayBuffer(e)){let r=this._binaryDecode(e);return n(r)}if(typeof e=="string"){const r=JSON.parse(e),[s,i,o,a,l]=r;return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(e){const n=new DataView(e),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,n,s)}}_decodeUserBroadcast(e,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const u=r.decode(e.slice(l,l+s));l=l+s;const d=r.decode(e.slice(l,l+i));l=l+i;const c=r.decode(e.slice(l,l+o));l=l+o;const f=e.slice(l,e.byteLength),h=a===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,g={type:this.BROADCAST_EVENT,event:d,payload:h};return o>0&&(g.meta=JSON.parse(c)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e==null?void 0:e.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([r])=>n.includes(r)))}}var ue;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(ue||(ue={}));const ig=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=jN(o,t,e,s),i),{}):{}},jN=(t,e,n,r)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=n[t];return i&&!r.includes(i)?lb(i,o):Gd(o)},lb=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return AN(e,n)}switch(t){case ue.bool:return NN(e);case ue.float4:case ue.float8:case ue.int2:case ue.int4:case ue.int8:case ue.numeric:case ue.oid:return PN(e);case ue.json:case ue.jsonb:return ON(e);case ue.timestamp:return LN(e);case ue.abstime:case ue.date:case ue.daterange:case ue.int4range:case ue.int8range:case ue.money:case ue.reltime:case ue.text:case ue.time:case ue.timestamptz:case ue.timetz:case ue.tsrange:case ue.tstzrange:return Gd(e);default:return Gd(e)}},Gd=t=>t,NN=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},PN=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},ON=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},AN=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let i;const o=t.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>lb(e,a))}return t},LN=t=>typeof t=="string"?t.replace(" ","T"):t,ub=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var oo=t=>typeof t=="function"?t:function(){return t},IN=typeof self<"u"?self:null,_s=typeof window<"u"?window:null,en=IN||_s||globalThis,$N="2.0.0",DN=1e4,MN=1e3,sn={connecting:0,open:1,closing:2,closed:3},tt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},bn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Jd={longpoll:"longpoll",websocket:"websocket"},FN={complete:4},Qd="base64url.bearer.phx.",Na=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHo
vendor: 21,658 bytes, lines 199-200
199oks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},cb=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},UN=class{constructor(t,e,n){this.state=tt.closed,this.topic=t,this.params=oo(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Na(this,bn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new cb(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=tt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=tt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=tt.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=tt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Na(this,bn.leave,oo({}),this.timeout).send(),this.state=tt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(bn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=tt.closed,this.bindings=[]}onClose(t){this.on(bn.close,t)}onError(t){return this.on(bn.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Na(this,t,function(){return e},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=tt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(bn.close,"leave")},n=new Na(this,bn.leave,oo({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=tt.joining,this.joinPush.resend(t))}trigger(t,e,n,r){let s=this.onMessage(t,e,n,r);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===t&&this.filterBindings(o,e,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===tt.closed}isErrored(){return this.state===tt.errored}isJoined(){return this.state===tt.joined}isJoining(){return this.state===tt.joining}isLeaving(){return this.state===tt.leaving}},Vl=class{static request(t,e,n,r,s,i,o){if(en.XDomainRequest){let a=new en.XDomainRequest;return this.xdomainRequest(a,t,e,r,s,i,o)}else if(en.XMLHttpRequest){let a=new en.XMLHttpRequest;return this.xhrRequest(a,t,e,n,r,s,i,o)}else{if(en.fetch&&en.AbortController)return this.fetchRequest(t,e,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,r,s,i,o){let a={method:t,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),en.fetch(e,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(t,e,n,r,s,i,o){return t.timeout=s,t.open(e,n),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,n,r,s,i,o,a){t.open(e,n,!0),t.timeout=i;for(let[l,u]of Object.entries(r))t.setRequestHeader(l,u);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===FN.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let s=e?`${e}[${r}]`:r,i=t[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},BN=t=>{let e="",n=new Uint8Array(t),r=n.byteLength;for(let s=0;s<r;s++)e+=String.fromCharCode(n[s]);return btoa(e)},hs=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Qd)&&(this.authToken=atob(e[1].slice(Qd.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=sn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Jd.websocket),"$1/"+Jd.longpoll)}endpointURL(){return Vl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=sn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===sn.open||this.readyState===sn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:r,messages:s}=e;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=sn.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(t){typeof t!="string"&&(t=BN(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
200`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,n){for(let s of this.reqs)s.abort();this.readyState=sn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=Vl.request(t,this.endpointURL(),e,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},zN=class Hi{constructor(e,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Hi.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Hi.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Hi.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Hi.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,r,s){let i=this.clone(e),o={},a={};return this.map(i,(l,u)=>{n[l]||(a[l]=u)}),this.map(n,(l,u)=>{let d=i[l];if(d){let c=u.metas.map(m=>m.phx_ref),f=d.metas.map(m=>m.phx_ref),h=u.metas.filter(m=>f.indexOf(m.phx_ref)<0),g=d.metas.filter(m=>c.indexOf(m.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),g.length>0&&(a[l]=this.clone(d),a[l].metas=g)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(e,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=e[a];if(e[a]=this.clone(l),u){let d=e[a].metas.map(f=>f.phx_ref),c=u.metas.filter(f=>d.indexOf(f.phx_ref)<0);e[a].metas.unshift(...c)}r(a,u,l)}),this.map(o,(a,l)=>{let u=e[a];if(!u)return;let d=l.metas.map(c=>c.phx_ref);u.metas=u.metas.filter(c=>d.indexOf(c.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete e[a]}),e}static list(e,n){return n||(n=function(r,s){return s}),this.map(e,(r,s)=>n(r,s))}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Pa={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,s,i,o]=JSON.parse(t);return e({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:s,payload:i}=t,o=this.META_LENGTH+e.length+n.length+s.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,e.length),l.setUint8(u++,n.length),l.setUint8(u++,s.length),l.setUint8(u++,r.length),Array.from(e,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(n,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(s,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(r,c=>l.setUint8(u++,c.charCodeAt(0)));var d=new Uint8Array(a.byteLength+i.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(i),a.byteLength),d.buffer},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(t.slice(o,o+r));o=o+r;let l=n.decode(t.slice(o,o+s));o=o+s;let u=n.decode(t.slice(o,o+i));o=o+i;let d=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:d}},decodeReply(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(t.slice(a,a+r));a=a+r;let u=n.decode(t.slice(a,a+s));a=a+s;let d=n.decode(t.slice(a,a+i));a=a+i;let c=n.decode(t.slice(a,a+o));a=a+o;let f=t.slice(a,t.byteLength),h={status:c,response:f};return{join_ref:l,ref:u,topic:d,event:bn.reply,payload:h}},decodeBroadcast(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(t.slice(i,i+r));i=i+r;let a=n.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},VN=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||DN,this.transport=e.transport||en.WebSocket||hs,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||en&&en.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Pa.encode.bind(Pa),this.defaultDecoder=Pa.decode.bind(Pa),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==hs?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;_s&&_s.addEventListener&&(_s.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),_s.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),_s.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>e.rejoinAfterMs?e.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>e.reconnectAfterMs?e.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(r,s,i)=>{console.log(`${r}: ${s}`,i)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=oo(e.params||{}),this.endPoint=`${t}/${Jd.websocket}`,this.vsn=e.vsn||$N,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new cb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return hs}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Vl.appendParams(Vl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=oo(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==hs?this.connectWithFallback(hs,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(s=>{s.ref===e&&(this.off([r]),t(Date.now()-n))});return!0}transportName(t){switch(t){case hs:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Qd}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),MN,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const r=this.conn;this.waitForBufferDone(r,()=>{e?r.close(e,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===sn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError()}
200triggerChanError(){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(bn.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case sn.connecting:return"connecting";case sn.open:return"open";case sn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new UN(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:s,join_ref:i}=t;this.log("push",`${e} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=e;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,r])=>{try{r(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class ao{constructor(e,n){const r=WN(n);this.presence=new zN(e.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=ao.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=ao.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return ao.transformState(this.presence.state)}static transformState(e){return e=HN(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return n[r]=nl(s),n},{})}static onJoinPayload(e,n,r){const s=og(n),i=nl(r);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,n,r){const s=og(n),i=nl(r);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function nl(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function HN(t){return JSON.parse(JSON.stringify(t))}function WN(t){return(t==null?void 0:t.events)&&{events:t.events}}function og(t){return t!=null&&t.metas?nl(t):[]}var ag;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(ag||(ag={}));class KN{get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new ao(this.channel.channelAdapter,n)}}class qN{constructor(e,n,r){const s=GN(r);this.channel=e.getSocket().channel(n,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,r){let s;try{s=this.channel.push(e,n,r)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>TN){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===Yn.joined}isJoined(){return this.state===Yn.joined}isJoining(){return this.state===Yn.joining}isClosed(){return this.state===Yn.closed}isLeaving(){return this.state===Yn.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function GN(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var lg;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELET
200E="DELETE"})(lg||(lg={}));var Fs;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Fs||(Fs={}));var xn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(xn||(xn={}));class lo{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,n={config:{}},r){var s,i;if(this.topic=e,this.params=n,this.socket=r,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new qN(this.socket.socketAdapter,e,this.params),this.presence=new KN(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=ub(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(h=>h.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Fs.PRESENCE]&&this.bindings[Fs.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,c={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(c.access_token=this.socket.accessTokenValue),this._onError(h=>{e==null||e(xn.CHANNEL_ERROR,h)}),this._onClose(()=>e==null?void 0:e(xn.CLOSED)),this.updateJoinPayload(Object.assign({config:f},c)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){e==null||e(xn.SUBSCRIBED);return}this._updatePostgresBindings(h,e)}).receive("error",h=>{this.state=Yn.errored,e==null||e(xn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(xn.TIMED_OUT)})}return this}_updatePostgresBindings(e,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:d,table:c,filter:f}}=l,h=e&&e[a];if(h&&h.event===u&&lo.isFilterValueEqual(h.schema,d)&&lo.isFilterValueEqual(h.table,c)&&lo.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Yn.errored,n==null||n(xn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Yn.errored&&n&&n(xn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===Fs.PRESENCE||e===Fs.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,r)}async httpSend(e,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
200try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(e,n={}){var r,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(e,n,r){const s=e.toLocaleLowerCase(),i=this.channelAdapter.on(e,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,r)=>{var s,i,o,a,l,u,d;const c=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(c,r))return!1;const f=(s=this.bindings[c])===null||s===void 0?void 0:s.find(h=>h.ref===e.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(c))if("id"in f){const h=f.id,g=(i=f.filter)===null||i===void 0?void 0:i.event;return h&&((o=n.ids)===null||o===void 0?void 0:o.includes(h))&&(g==="*"||(g==null?void 0:g.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return h==="*"||h===((d=n==null?void 0:n.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===c})}_notThisChannelEvent(e,n){const{close:r,error:s,leave:i,join:o}=ab;return n&&[r,s,i,o].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const r of e.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=ig(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=ig(e.columns,e.old_record)),n}}class JN{constructor(e,n){this.socket=new VN(e,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},n,r)})}push(e){this.socket.push(e)}log(e,n,r){this.socket.log(e,n,r)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==qd.connecting}isDisconnecting(){return this.socket.connectionState()==qd.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const QN={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},YN=[1e3,2e3,5e3,1e4],XN=1e4,ZN=`
201  addEventListener("message", (e) => {
202    if (e.data.event === "start") {
203      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
204    }
205  });`;class eP{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
205,this.ref=0,this.serializer=new RN,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new JN(e,s),this.httpEndpoint=ub(e),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const n=e.message;throw n.includes("Node.js")?new Error(`${n}
206
207To use Realtime in Node.js, you need to provide a WebSocket implementation:
208
209Option 1: Use Node.js 22+ which has native WebSocket support
210Option 2: Install and provide the "ws" package:
211
212  npm install ws
213
214  import ws from "ws"
215  const client = new RealtimeClient(url, {
216    ...options,
217    transport: ws
218  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(e);return this.disconnect(),n}log(e,n,r){this.socketAdapter.log(e,n,r)}connectionState(){return this.socketAdapter.connectionState()||qd.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new lo(`realtime:${e}`,n,this);return this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic)}async _performAuth(e=null){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:kN};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(ab.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,r)=>{n=="sent"&&this._setAuthSafely(),e&&e(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([ZN],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(e){var n,r,s,i,o,a,l,u,d;this.worker=(n=e==null?void 0:e.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=e==null?void 0:e.accessToken)!==null&&r!==void 0?r:null;const c={};
218c.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:CN,c.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:QN.HEARTBEAT_INTERVAL,c.transport=(o=e==null?void 0:e.transport)!==null&&o!==void 0?o:xN.getWebSocketConstructor(),c.params=e==null?void 0:e.params,c.logger=e==null?void 0:e.logger,c.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),c.reconnectAfterMs=(a=e==null?void 0:e.reconnectAfterMs)!==null&&a!==void 0?a:m=>YN[m-1]||XN;let f,h;const g=(l=e==null?void 0:e.vsn)!==null&&l!==void 0?l:EN;switch(g){case _N:f=(m,x)=>x(JSON.stringify(m)),h=(m,x)=>x(JSON.parse(m));break;case ob:f=this.serializer.encode.bind(this.serializer),h=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${c.vsn}`)}if(c.vsn=g,c.encode=(u=e==null?void 0:e.encode)!==null&&u!==void 0?u:f,c.decode=(d=e==null?void 0:e.decode)!==null&&d!==void 0?d:h,c.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,c.params=Object.assign(Object.assign({},c.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,c.autoSendHeartbeat=!this.worker}return c}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var $o=class extends Error{constructor(t,e){var n;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((n=e.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function tP(t,e,n){const r=new URL(e,t);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function nP(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function rP(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=tP(t.baseUrl,r,s),l=await nP(t.auth),u=await e(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),d=await u.text(),c=(u.headers.get("content-type")||"").includes("application/json"),f=c&&d?JSON.parse(d):d;if(!u.ok){const h=c?f:void 0,g=h==null?void 0:h.error;throw new $o((g==null?void 0:g.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Oa(t){return t.join("�")}var sP=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Oa(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Oa(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Oa(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Oa(t.namespace)}`}),!0}catch(e){if(e instanceof $o&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof $o&&n.status===409)return;throw n}}};function fs(t){return t.join("�")}var iP=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${fs(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${fs(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${fs(t.namespace)}
218/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${fs(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${fs(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${fs(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof $o&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof $o&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},oP=class{constructor(t){var r;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=rP({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(r=t.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new sP(this.client,e),this.tableOps=new iP(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Do(t){"@babel/helpers - typeof";return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Do(t)}function aP(t,e){if(Do(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Do(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function lP(t){var e=aP(t,"string");return Do(e)=="symbol"?e:e+""}function uP(t,e,n){return(e=lP(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ug(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ug(Object(n),!0).forEach(function(r){uP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ug(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var _u=class extends Error{constructor(t,e="storage",n,r){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Eu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Yd=class extends _u{constructor(t,e,n,r="storage"){super(t,r,e,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n}toJSON(){return q({},super.toJSON())}},db=class extends _u{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Rf(t,e,n){const r=q({},t),s=e.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function cP(t){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;return e}const dP=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),hP=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);
218return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Xd=t=>{if(Array.isArray(t))return t.map(n=>Xd(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Xd(r)}),e},fP=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),cg=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},pP=async(t,e,n,r)=>{if(t!==null&&typeof t=="object"&&typeof t.json=="function"){const s=t;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new Yd(cg(o),i,a,r))}).catch(()=>{const o=i+"";e(new Yd(s.statusText||`HTTP ${i} error`,i,o,r))})}else e(new db(cg(t),t,r))},mP=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!r)return q(q({},s),n);if(hP(r)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=Rf(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return e!=null&&e.duplex&&(s.duplex=e.duplex),q(q({},s),n)};async function Fi(t,e,n,r,s,i,o){return new Promise((a,l)=>{t(n,mP(e,r,s,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>pP(u,l,r,o))})}function hb(t="storage"){return{get:async(e,n,r,s)=>Fi(e,"GET",n,r,s,void 0,t),post:async(e,n,r,s,i)=>Fi(e,"POST",n,s,i,r,t),put:async(e,n,r,s,i)=>Fi(e,"PUT",n,s,i,r,t),head:async(e,n,r,s)=>Fi(e,"HEAD",n,q(q({},r),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,n,r,s,i)=>Fi(e,"DELETE",n,s,i,r,t)}}const gP=hb("storage"),{get:Mo,post:Ft,put:Zd,head:vP,remove:jf}=gP,mt=hb("vectors");var Ei=class{constructor(t,e={},n,r="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=cP(e),this.fetch=dP(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Rf(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(Eu(n))return{data:null,error:n};throw n}}},yP=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Eu(e))return{data:null,error:e};throw e}}};let fb;fb=Symbol.toStringTag;var wP=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[fb]="BlobDownloadBuilder",this.promise=null}asStream(){return new yP(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Eu(e))return{data:null,error:e};throw e}}};const bP={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},dg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var xP=class extends Ei{constructor(t,e={},n,r){super(t,e,r,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=q(q({},dg),r);let a=q(q({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[f,h]of Object.entries(r.headers))a=Rf(a,f,h);const u=s._removeEmptyFolders(e),d=s._getFinalPath(u),c=await(t=="PUT"?Zd:Ft)(s.fetch,`${s.url}/object/${d}`,i,q({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:c.Id,fullPath:c.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,r){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const u=q(q({},dg),r),d=q(q({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:i,fullPath:(await Zd(s.fetch,a.toString(),l,{headers:d})).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(t);const s=q({},n.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await Ft(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new _u("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var r=this;return r.handleOperation(async()=>await Ft(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(t,e,n){var r=this;return r.handleOperation(async()=>({path:(await Ft(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(t,e,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(t);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await Ft(r.fetch,`${r.url}/object/sign/${s}
218`,q({expiresIn:e},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,n){var r=this;return r.handleOperation(async()=>{const s=await Ft(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:e,paths:t},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>q(q({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(t,e,n){const r=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),o=this._getFinalPath(t),a=()=>Mo(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new wP(a,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>Xd(await Mo(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await vP(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(Eu(s)){var r;const i=s instanceof Yd?s.status:s instanceof db?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(t,e){const n=this._getFinalPath(t),r=new URLSearchParams;e!=null&&e.download&&r.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(r,e.transform),(e==null?void 0:e.cacheNonce)!=null&&r.set("cacheNonce",String(e.cacheNonce));const s=r.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await jf(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,n){var r=this;return r.handleOperation(async()=>{const s=q(q(q({},bP),e),{},{prefix:t||""});return await Ft(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const r=q({},t);return await Ft(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const SP="2.104.0",ea={"X-Client-Info":`storage-js/${SP}`};var kP=class extends Ei{constructor(t,e={},n,r){const s=new URL(t);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=q(q({},ea),e);super(i,o,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await Mo(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Mo(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await Ft(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await Zd(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Ft(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await jf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}}
218,_P=class extends Ei{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=q(q({},ea),e);super(r,s,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Ft(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&n.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&n.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&n.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&n.set("sortOrder",t.sortOrder),t!=null&&t.search&&n.set("search",t.search);const r=n.toString(),s=r?`${e.url}/bucket?${r}`:`${e.url}/bucket`;return await Mo(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await jf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!fP(t))throw new _u("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new oP({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},EP=class extends Ei{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=q(q({},ea),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await mt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await mt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},CP=class extends Ei{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=q(q({},ea),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},TP=class extends Ei{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=q(q({},ea),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await mt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},RP=class extends TP{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new jP(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}}
218,jP=class extends EP{constructor(t,e,n,r){super(t,e,r),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new NP(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},NP=class extends CP{constructor(t,e,n,r,s){super(t,e,s),this.vectorBucketName=n,this.indexName=r}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},PP=class extends kP{constructor(t,e={},n,r){super(t,e,n,r)}from(t){return new xP(this.url,this.headers,t,this.fetch)}get vectors(){return new RP(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new _P(this.url+"/iceberg",this.headers,this.fetch)}};function Cu(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}const pb="2.104.0",Es=30*1e3,eh=3,Sc=eh*Es,OP="http://localhost:9999",AP="supabase.auth.token",LP={"X-Client-Info":`gotrue-js/${pb}`},th="X-Supabase-Api-Version",mb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},IP=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,$P=10*60*1e3;class Fo extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function U(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class DP extends Fo{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function MP(t){return U(t)&&t.name==="AuthApiError"}class Ir extends Fo{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class In extends Fo{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class ct extends In{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Aa(t){return U(t)&&t.name==="AuthSessionMissingError"}class ps extends In{constructor(){super("Auth session or user missing","AuthInvalidToken
218ResponseError",500,void 0)}}class La extends In{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Ia extends In{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function FP(t){return U(t)&&t.name==="AuthImplicitGrantRedirectError"}class hg extends In{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class UP extends In{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class nh extends In{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function kc(t){return U(t)&&t.name==="AuthRetryableFetchError"}class fg extends In{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class rh extends In{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Hl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),pg=` 	
219\r=`.split(""),BP=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<pg.length;e+=1)t[pg[e].charCodeAt(0)]=-2;for(let e=0;e<Hl.length;e+=1)t[Hl[e].charCodeAt(0)]=e;return t})();function mg(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Hl[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Hl[r]),e.queuedBits-=6}}function gb(t,e,n){const r=BP[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function gg(t){const e=[],n=o=>{e.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{HP(o,r,n)};for(let o=0;o<t.length;o+=1)gb(t.charCodeAt(o),s,i);return e.join("")}function zP(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function VP(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}zP(r,e)}}function HP(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function Js(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)gb(t.charCodeAt(s),n,r);return new Uint8Array(e)}function WP(t){const e=[];return VP(t,n=>e.push(n)),new Uint8Array(e)}function Fr(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>mg(s,n,r)),mg(null,n,r),e.join("")}function KP(t){return Math.round(Date.now()/1e3)+t}function qP(){return Symbol("auth-callback")}const $e=()=>typeof window<"u"&&typeof document<"u",Nr={tested:!1,writable:!1},vb=()=>{if(!$e())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Nr.tested)return Nr.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Nr.tested=!0,Nr.writable=!0}catch{Nr.tested=!0,Nr.writable=!1}return Nr.writable};function GP(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
219h((s,i)=>{e[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const yb=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),JP=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Cs=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},Pr=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ie=async(t,e)=>{await t.removeItem(e)};class Tu{constructor(){this.promise=new Tu.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}Tu.promiseConstructor=Promise;function $a(t){const e=t.split(".");if(e.length!==3)throw new rh("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!IP.test(e[r]))throw new rh("JWT not in base64url format");return{header:JSON.parse(gg(e[0])),payload:JSON.parse(gg(e[1])),signature:Js(e[2]),raw:{header:e[0],payload:e[1]}}}async function QP(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function YP(t,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function XP(t){return("0"+t.toString(16)).substr(-2)}function ZP(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(e),Array.from(e,XP).join("")}async function eO(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function tO(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const n=await eO(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ms(t,e,n=!1){const r=ZP();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Cs(t,`${e}-code-verifier`,s);const i=await tO(r);return[i,r===i?"plain":"s256"]}const nO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function rO(t){const e=t.headers.get(th);if(!e||!e.match(nO))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function sO(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function iO(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const oO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function gs(t){if(!oO.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function _c(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function aO(t,e){return new Proxy(t,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!e.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(n,r,s)}})}function vg(t){return JSON.parse(JSON.stringify(t))}const Lr=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),lO=[502,503,504,520,521,522,523,524,530];async function yg(t){var e;if(!JP(t))throw new nh(Lr(t),0);if(lO.includes(t.status))throw new nh(Lr(t),t.status);let n;try{n=await t.json()}catch(i){throw new Ir(Lr(i),i)}let r;const s=rO(t);if(s&&s.getTime()>=mb["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new fg(Lr(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new ct}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>
219i&&typeof o=="string",!0))throw new fg(Lr(n),t.status,n.weak_password.reasons);throw new DP(Lr(n),t.status||500,r)}const uO=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function K(t,e,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[th]||(i[th]=mb["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await cO(t,e,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function cO(t,e,n,r,s,i){const o=uO(e,r,s,i);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw console.error(l),new nh(Lr(l),0)}if(a.ok||await yg(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await yg(l)}}function $t(t){var e;let n=null;fO(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=KP(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:r},error:null}}function wg(t){const e=$t(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Xn(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function dO(t){return{data:t,error:null}}function hO(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=t,o=Cu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function bg(t){return t}function fO(t){return t.access_token&&t.refresh_token&&t.expires_in}const Ec=["global","local","others"];class pO{constructor({url:e="",headers:n={},fetch:r}){this.url=e,this.headers=n,this.fetch=yb(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(e,n=Ec[0]){if(Ec.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Ec.join(", ")}`);try{return await K(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await K(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Xn})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=Cu(e,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await K(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:hO,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(U(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await K(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Xn})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await K(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:bg});if(d.error)throw d.error;const c=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
2190&&(h.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(g.split(";")[1].split("=")[1]);u[`${x}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},c),u),error:null}}catch(u){if(U(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){gs(e);try{return await K(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Xn})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){gs(e);try{return await K(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Xn})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){gs(e);try{return await K(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Xn})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){gs(e.userId);try{const{data:n,error:r}=await K(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _deleteFactor(e){gs(e.userId),gs(e.id);try{return{data:await K(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await K(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:bg});if(d.error)throw d.error;const c=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(g.split(";")[1].split("=")[1]);u[`${x}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},c),u),error:null}}catch(u){if(U(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(e){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await K(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await K(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await K(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e!=null&&e.type&&(n.type=e.type),await K(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(U(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await K(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await K(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await K(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(e){try{return await K(this.fetch,"DELET
219E",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}}function xg(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}const Xt={debug:!!(globalThis&&vb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class wb extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Sg extends wb{}async function mO(t,e,n){Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const r=new globalThis.AbortController;let s;e>0&&(s=setTimeout(()=>{r.abort(),Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await n()}finally{Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Sg(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Xt.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(e>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&e>0){if(r.signal.aborted)return Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async o=>{if(o){Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,o.name);try{return await n()}finally{Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Xt.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new Sg(`Lock "${t}" was released because another request stole it`)}throw i}}function gO(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function bb(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function vO(t){return parseInt(t,16)}function yO(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function wO(t){var e;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:d,uri:c,version:f}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!c)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
220`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=bb(t.address),g=d?`${d}://${r}`:r,m=t.statement?`${t.statement}
221`:"",x=`${g} wants you to sign in with your Ethereum account:
222${h}
223
224${m}`;let w=`URI: ${c}
225Version: ${f}
226Chain ID: ${n}${o?`
227Nonce: ${o}`:""}
228Issued At: ${i.toISOString()}`;if(s&&(w+=`
229Expiration Time: ${s.toISOString()}`),a&&(w+=`
230Not Before: ${a.toISOString()}`),l&&(w+=`
231Request ID: ${l}`),u){let v=`
232Resources:`;for(const b of u){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);v+=`
233- ${b}`}w+=v}return`${x}
234${w}`}
234class Ce extends Error{constructor({message:e,code:n,cause:r,name:s}){var i;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class Wl extends Ce{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function bO({error:t,options:e}){var n,r,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ce({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ce({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ce({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ce({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Ce({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Ce({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ce({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Ce({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(xb(o)){if(i.rp.id!==o)return new Ce({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ce({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ce({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Ce({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ce({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function xO({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ce({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Ce({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(xb(r)){if(n.rpId!==r)return new Ce({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ce({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Ce({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ce({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class SO{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const kO=new SO;function _O(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:r}=t,s=Cu(t,["challenge","user","excludeCredentials"]),i=Js(e).buffer,o=Object.assign(Object.assign({}
234,n),{id:Js(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const u=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Js(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function EO(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,r=Cu(t,["challenge","allowCredentials"]),s=Js(e).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Js(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function CO(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:Fr(new Uint8Array(t.response.attestationObject)),clientDataJSON:Fr(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function TO(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,r=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Fr(new Uint8Array(s.authenticatorData)),clientDataJSON:Fr(new Uint8Array(s.clientDataJSON)),signature:Fr(new Uint8Array(s.signature)),userHandle:s.userHandle?Fr(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function xb(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function kg(){var t,e;return!!($e()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function RO(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Wl("Browser returned unexpected credential type",e)}:{data:null,error:new Wl("Empty credential response",e)}}catch(e){return{data:null,error:bO({error:e,options:t})}}}async function jO(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Wl("Browser returned unexpected credential type",e)}:{data:null,error:new Wl("Empty credential response",e)}}catch(e){return{data:null,error:xO({error:e,options:t})}}}const NO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},PO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Kl(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(e(o)){const a=r[i];e(a)?r[i]=Kl(a,o):r[i]=Kl(o)}else r[i]=o}return r}function OO(t,e){return Kl(NO,t,e||{})}function AO(t,e){return Kl(PO,t,e||{})}class LO{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!a)return{data:null,error:l};const u=s??kO.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const c=r;if(c)d.name=`${d.id}:${c}`;else{const h=(await this.client.getUser()).data.user,g=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";d.name=`${d.id}:${g}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=OO(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:c,error:f}=await RO({publicKey:d,signal:u});return c?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:c}},error:null}:{data:null,error:f}}case"request":{const d=AO(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:c,error:f}=await jO(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:u}));return c?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:c}},error:null}:{data:null,error:f}}}}catch(a){return U(a)?{data:null,error:a}:{data:null,error:new Ir("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Fo("rpId is required for WebAuthn authentication")};try{if(!kg())return{data:null,error:new Ir("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return U(o)?{data:null,error:o}:{data:null,error:new Ir("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Fo("rpId is required for WebAuthn registration")};try{if(!kg())return{data:null,error:new Ir("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(d=>{var c;return(c=d.data)===null||c===void 0?void 0:c.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===e&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return U(o)?{data:null,error:o}:{data:null,error:new Ir("Unexpected error in register",o)}}}}gO();const IO={url:OP,storageKey:AP,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:LP,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function _g(t,e,n){return await n()}const vs={};class Uo{get jwks(){var e,n;return(n=(e=vs[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){vs[this.storageKey]=Object.assign(Object.assign({},vs[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=vs[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){vs[this.storageKey]=Object.assign(Object.assign({},vs[this.storageKey]),{cachedAt:e})}constructor(e){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},IO),e);if(this.storageKey=i.storageKey,this.instanceID=(n=Uo.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Uo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&$e()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new pO({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=yb(i.fetch),this.lock=i.lock||_g,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&$e()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=mO:this.lock=_g,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new LO(this)}
234,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:vb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=xg(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=xg(this.memoryStorage)),$e()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${pb}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let n={},r="none";if($e()&&(n=GP(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),$e()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),FP(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return U(n)?this._returnResult({error:n}):this._returnResult({error:new Ir("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:$t}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(U(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var n,r,s;try{let i;if("email"in e){const{email:d,password:c,options:f}=e;let h=null,g=null;this.flowType==="pkce"&&([h,g]=await ms(this.storage,this.storageKey)),i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:c,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:g},xform:$t})}else if("phone"in e){const{phone:d,password:c,options:f}=e;i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:c,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:$t})}else throw new La("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ie(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let n;if("email"in e){const{email:i,password:o,options:a}=e;n=await K(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:wg})}else if("phone"in e){const{phone:i,password:o,options:a}=e;n=await K(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:wg})}else throw new La("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new ps;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,r,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,s,i,o,a,l,u,d,c,f;let h,g;if("message"in e)h=e.message,g=e.signature;else{const{chain:m,wallet:x,statement:w,options:v}=e;let b;if($e())if(typeof x=="object")b=x;else{const N=window;if("ethereum"in N&&typeof N.ethereum=="object"&&"request"in N.ethereum&&typeof N.ethereum.request=="function")b=N.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=x}const S=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href),k=await b.request({method:"eth_requestAccounts"}).then(N=>N).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=bb(k[0]);let E=(r=v==null?void 0:v.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const N=await b.request({method:"eth_chainId"});E=vO(N)}const C={domain:S.host,address:_,statement:w,uri:S.href,version:"1",chainId:E,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.resources};
234h=wO(C),g=await b.request({method:"personal_sign",params:[yO(h),_]})}try{const{data:m,error:x}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:g},!((c=e.options)===null||c===void 0)&&c.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:$t});if(x)throw x;if(!m||!m.session||!m.user){const w=new ps;return this._returnResult({data:{user:null,session:null},error:w})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:x})}catch(m){if(U(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(e){var n,r,s,i,o,a,l,u,d,c,f,h;let g,m;if("message"in e)g=e.message,m=e.signature;else{const{chain:x,wallet:w,statement:v,options:b}=e;let S;if($e())if(typeof w=="object")S=w;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))S=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=w}const k=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const _=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),v?{statement:v}:null));let E;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")E=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)E=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)g=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),m=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${k.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(r=b==null?void 0:b.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=b==null?void 0:b.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((a=b==null?void 0:b.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((u=b==null?void 0:b.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((c=(d=b==null?void 0:b.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||c===void 0)&&c.length?["Resources",...b.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(`
235`);const _=await S.signMessage(new TextEncoder().encode(g),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=_}}try{const{data:x,error:w}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Fr(m)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:$t});if(w)throw w;if(!x||!x.session||!x.user){const v=new ps;return this._returnResult({data:{user:null,session:null},error:v})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:w})}
235catch(x){if(U(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(e){const n=await Pr(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new UP;const{data:i,error:o}=await K(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:$t});if(await Ie(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new ps;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=e,a=await K(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:$t}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new ps;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,r,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await ms(this.storage,this.storageKey));const{error:c}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}if("phone"in e){const{phone:a,options:l}=e,{data:u,error:d}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new La("You must provide either an email or phone number.")}catch(a){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var n,r;try{let s,i;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await K(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:$t});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await ms(this.storage,this.storageKey));const u=await K(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:dO});return!((i=u.data)===null||i===void 0)&&i.url&&$e()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new ct;const{error:s}=await K(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:r,type:s,options:i}=e,{error:o}=await K(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in e){const{phone:r,type:s,options:i}=e,{data:o,error:a}=await K(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new La("You must provide either an email or phone number and a type")}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const n=await Pr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
235id"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<Sc:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const o=await Pr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=_c()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=aO(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Xn}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ct}:await K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Xn})})}catch(n){if(U(n))return Aa(n)&&(await this._removeSession(),await Ie(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new ct;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await ms(this.storage,this.storageKey));const{data:u,error:d}=await K(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Xn});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ct;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=$a(e.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(U(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:o,error:a}=n;if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new ct;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){try{if(!$e())throw new Ia("No browser detected.");
235if(e.error||e.error_description||e.error_code)throw new Ia(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new hg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ia("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new hg("No code detected.");const{data:v,error:b}=await this._exchangeCodeForSession(e.code);if(b)throw b;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=e;if(!i||!a||!o||!u)throw new Ia("No session defined in URL");const d=Math.round(Date.now()/1e3),c=parseInt(a);let f=d+c;l&&(f=parseInt(l));const h=f-d;h*1e3<=Es&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${c}s`);const g=f-c;d-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,f,d):d-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,f,d);const{data:m,error:x}=await this._getUser(i);if(x)throw x;const w={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:c,expires_at:f,refresh_token:o,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:w,redirectType:e.type},error:null})}catch(r){if(U(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await Pr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!Aa(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(MP(a)&&(a.status===404||a.status===401||a.status===403)||Aa(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await Ie(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const n=qP(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),Aa(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await ms(this.storage,this.storageKey,!0));try{return await K(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,u,d;const{data:c,error:f}=i;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await K(this.fetch,"GET",h,{headers:this.headers,jwt:(d=(u=c.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return $e()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:e.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(U(r))return this._returnResult({data:{provider:e.provider,url:null},error:r});throw r}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
235if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:d}=e,c=await K(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:$t}),{data:f,error:h}=c;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new ps}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await K(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await YP(async s=>(s>0&&await QP(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await K(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:$t})),(s,i)=>{const o=200*Math.pow(2,s);return i&&kc(i)&&Date.now()+o-r<Es})}catch(r){if(this._debug(n,"error",r),U(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),$e()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Pr(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Pr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Cs(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:_c()}else if(s&&!s.user&&!s.user){const o=await Pr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ie(this.storage,this.storageKey+"-user"),await Cs(this.storage,this.storageKey,s)):s.user=_c()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Sc;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Sc}
235s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),kc(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new ct;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Tu;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new ct;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),U(i)){const o={data:null,error:i};return kc(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,n,r=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Ie(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Cs(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=vg(s);await Cs(this.storage,this.storageKey,i)}else{const s=vg(n);await Cs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ie(this.storage,this.storageKey),await Ie(this.storage,this.storageKey+"-code-verifier"),await Ie(this.storage,this.storageKey+"-user"),this.userStorage&&await Ie(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&$e()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Es);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/Es);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Es}ms, refresh threshold is ${eh} ticks`),s<=eh&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof wb)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!$e()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(
235await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await ms(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await K(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:u}=await K(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?CO(e.webauthn.credential_response):TO(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await K(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await K(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:_O(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:EO(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=n==null?void 0:n.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,r,s,i;if(e)try{const{payload:h}=$a(e);let g=null;h.aal&&(g=h.aal);let m=g;const{data:{user:x},error:w}=await this.getUser(e);if(w)return this._returnResult({data:null,error:w});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const b=h.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:b},error:null}}catch(h){if(U(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
235=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=$a(o.access_token);let u=null;l.aal&&(u=l.aal);let d=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await K(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new ct})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ct});const o=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&$e()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ct});const o=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&$e()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;return r?this._returnResult({data:null,error:r}):n?await K(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new ct})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await K(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ct})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+$P>s)return r;const{data:i,error:o}=await K(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:h,error:g}
235=await this.getSession();if(g||!h.session)return this._returnResult({data:null,error:g});r=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=$a(r);n!=null&&n.allowExpired||sO(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:h}=await this.getUser(r);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const d=iO(s.alg),c=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,c,o,WP(`${a}.${l}`)))throw new rh("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}}Uo.nextInstanceID={};const $O=Uo,DO="2.104.0";let Wi="";typeof Deno<"u"?Wi="deno":typeof document<"u"?Wi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Wi="react-native":Wi="node";const MO={"X-Client-Info":`supabase-js-${Wi}/${DO}`},FO={headers:MO},UO={schema:"public"},BO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},zO={};function Bo(t){"@babel/helpers - typeof";return Bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bo(t)}function VO(t,e){if(Bo(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Bo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function HO(t){var e=VO(t,"string");return Bo(e)=="symbol"?e:e+""}function WO(t,e,n){return(e=HO(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Eg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function xe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Eg(Object(n),!0).forEach(function(r){WO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Eg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const KO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),qO=()=>Headers,GO=(t,e,n)=>{const r=KO(n),s=qO();return async(i,o)=>{var a;const l=(a=await e())!==null&&a!==void 0?a:t;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",t),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(i,xe(xe({},o),{},{headers:u}))}};function JO(t){return t.endsWith("/")?t:t+"/"}function QO(t,e){var n,r;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:u,realtime:d,global:c}=e,f={db:xe(xe({},l),s),auth:xe(xe({},u),i),realtime:xe(xe({},d),o),storage:{},global:xe(xe(xe({},c),a),{},{headers:xe(xe({},(n=c==null?void 0:c.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return t.accessToken?f.accessToken=t.accessToken:delete f.accessToken,f}function YO(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(JO(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var XO=class extends $O{constructor(t){super(t)}},ZO=class{constructor(t,e,n){var r,s;this.supabaseUrl=t,this.supabaseKey=e;const i=YO(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:UO,realtime:zO,auth:xe(xe({},BO),{},{storageKey:o}),global:FO},l=QO(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,c)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(c)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=GO(e,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(xe({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new bN(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new PP(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new cN(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:r}=await t.auth.getSession();
235return(e=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u},d,c){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new XO({url:this.authUrl.href,headers:xe(xe({},f),d),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,fetch:c,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new eP(this.realtimeUrl.href,xe(xe({},t),{},{params:xe(xe({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const eA=(t,e,n)=>new ZO(t,e,n);function tA(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}tA()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const nA="https://cxizqbruyvjadecuibui.supabase.co",rA="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImN4aXpxYnJ1eXZqYWRlY3VpYnVpIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzY2NjY0MTMsImV4cCI6MjA5MjI0MjQxM30.TkCMWJ3GWOCdonXEzm_vNJWYipxAeevDEHmd8rHO2Zc",Pe=eA(nA,rA,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),st=y.forwardRef(({className:t,type:e,...n},r)=>p.jsx("input",{type:e,className:ee("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));st.displayName="Input";var sA="Label",Sb=y.forwardRef((t,e)=>p.jsx(ae.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Sb.displayName=sA;var kb=Sb;const iA=ff("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Je=y.forwardRef(({className:t,...e},n)=>p.jsx(kb,{ref:n,className:ee(iA(),t),...e}));Je.displayName=kb.displayName;const Qs=y.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:ee("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Qs.displayName="Card";const oA=y.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:ee("flex flex-col space-y-1.5 p-6",t),...e}));oA.displayName="CardHeader";const aA=y.forwardRef(({className:t,...e},n)=>p.jsx("h3",{ref:n,className:ee("text-2xl font-semibold leading-none tracking-tight",t),...e}));aA.displayName="CardTitle";const lA=y.forwardRef(({className:t,...e},n)=>p.jsx("p",{ref:n,className:ee("text-sm text-muted-foreground",t),...e}));lA.displayName="CardDescription";const uA=y.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:ee("p-6 pt-0",t),...e}));uA.displayName="CardContent";const cA=y.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:ee("flex items-center p-6 pt-0",t),...e}));cA.displayName="CardFooter";var Cc="focusScope.autoFocusOnMount",Tc="focusScope.autoFocusOnUnmount",Cg={bubbles:!1,cancelable:!0},dA="FocusScope",_b=y.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=y.useState(null),u=qt(s),d=qt(i),c=y.useRef(null),f=Le(e,m=>l(m)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(b){if(h.paused||!a)return;const S=b.target;a.contains(S)?c.current=S:Kn(c.current,{select:!0})},x=function(b){if(h.paused||!a)return;const S=b.relatedTarget;S!==null&&(a.contains(S)||Kn(c.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const k of b)k.removedNodes.length>0&&Kn(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const v=new MutationObserver(w);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),v.disconnect()}}},[r,a,h.paused]),y.useEffect(()=>{if(a){Rg.add(h);
vendor: 4,102 bytes, line 235
235const m=document.activeElement;if(!a.contains(m)){const w=new CustomEvent(Cc,Cg);a.addEventListener(Cc,u),a.dispatchEvent(w),w.defaultPrevented||(hA(vA(Eb(a)),{select:!0}),document.activeElement===m&&Kn(a))}return()=>{a.removeEventListener(Cc,u),setTimeout(()=>{const w=new CustomEvent(Tc,Cg);a.addEventListener(Tc,d),a.dispatchEvent(w),w.defaultPrevented||Kn(m??document.body,{select:!0}),a.removeEventListener(Tc,d),Rg.remove(h)},0)}}},[a,u,d,h]);const g=y.useCallback(m=>{if(!n&&!r||h.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(x&&w){const v=m.currentTarget,[b,S]=fA(v);b&&S?!m.shiftKey&&w===S?(m.preventDefault(),n&&Kn(b,{select:!0})):m.shiftKey&&w===b&&(m.preventDefault(),n&&Kn(S,{select:!0})):w===v&&m.preventDefault()}},[n,r,h.paused]);return p.jsx(ae.div,{tabIndex:-1,...o,ref:f,onKeyDown:g})});_b.displayName=dA;function hA(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Kn(r,{select:e}),document.activeElement!==n)return}function fA(t){const e=Eb(t),n=Tg(e,t),r=Tg(e.reverse(),t);return[n,r]}function Eb(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Tg(t,e){for(const n of t)if(!pA(n,{upTo:e}))return n}function pA(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function mA(t){return t instanceof HTMLInputElement&&"select"in t}function Kn(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&mA(t)&&e&&t.select()}}var Rg=gA();function gA(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=jg(t,e),t.unshift(e)},remove(e){var n;t=jg(t,e),(n=t[0])==null||n.resume()}}}function jg(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function vA(t){return t.filter(e=>e.tagName!=="A")}var Rc=0;function yA(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Ng()),document.body.insertAdjacentElement("beforeend",t[1]??Ng()),Rc++,()=>{Rc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Rc--}},[])}function Ng(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var an=function(){return an=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},an.apply(this,arguments)};function Cb(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function wA(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var rl="right-scroll-bar-position",sl="width-before-scroll-bar",bA="with-scroll-bars-hidden",xA="--removed-body-scroll-bar-size";function jc(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function SA(t,e){var n=y.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var kA=typeof window<"u"?y.useLayoutEffect:y.useEffect,Pg=new WeakMap;function _A(t,e){var n=SA(null,function(r){return t.forEach(function(s){return jc(s,r)})});return kA(function(){var r=Pg.get(n);if(r){var s=new Set(r),i=new Set(t),o=n.current;
vendor: 4,196 bytes, lines 235-250
235s.forEach(function(a){i.has(a)||jc(a,null)}),i.forEach(function(a){s.has(a)||jc(a,o)})}Pg.set(n,t)},[t]),n}function EA(t){return t}function CA(t,e){e===void 0&&(e=EA);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var o=e(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function TA(t){t===void 0&&(t={});var e=CA(null);return e.options=an({async:!0,ssr:!1},t),e}var Tb=function(t){var e=t.sideCar,n=Cb(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,an({},n))};Tb.isSideCarExport=!0;function RA(t,e){return t.useMedium(e),Tb}var Rb=TA(),Nc=function(){},Ru=y.forwardRef(function(t,e){var n=y.useRef(null),r=y.useState({onScrollCapture:Nc,onWheelCapture:Nc,onTouchMoveCapture:Nc}),s=r[0],i=r[1],o=t.forwardProps,a=t.children,l=t.className,u=t.removeScrollBar,d=t.enabled,c=t.shards,f=t.sideCar,h=t.noRelative,g=t.noIsolation,m=t.inert,x=t.allowPinchZoom,w=t.as,v=w===void 0?"div":w,b=t.gapMode,S=Cb(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,_=_A([n,e]),E=an(an({},S),s);return y.createElement(y.Fragment,null,d&&y.createElement(k,{sideCar:Rb,removeScrollBar:u,shards:c,noRelative:h,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:b}),o?y.cloneElement(y.Children.only(a),an(an({},E),{ref:_})):y.createElement(v,an({},E,{className:l,ref:_}),a))});Ru.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ru.classNames={fullWidth:sl,zeroRight:rl};var jA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function NA(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=jA();return e&&t.setAttribute("nonce",e),t}function PA(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function OA(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var AA=function(){var t=0,e=null;return{add:function(n){t==0&&(e=NA())&&(PA(e,n),OA(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},LA=function(){var t=AA();return function(e,n){y.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},jb=function(){var t=LA(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},IA={left:0,top:0,right:0,gap:0},Pc=function(t){return parseInt(t||"",10)||0},$A=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[Pc(n),Pc(r),Pc(s)]},DA=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return IA;var e=$A(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},MA=jb(),Ys="data-scroll-locked",FA=function(t,e,n,r){var s=t.left,i=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),`
236  .`.concat(bA,` {
237   overflow: hidden `).concat(r,`;
238   padding-right: `).concat(a,"px ").concat(r,`;
239  }
240  body[`).concat(Ys,`] {
241    overflow: hidden `).concat(r,`;
242    overscroll-behavior: contain;
243    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
244    padding-left: `.concat(s,`px;
245    padding-top: `).concat(i,`px;
246    padding-right: `).concat(o,`px;
247    margin-left:0;
248    margin-top:0;
249    margin-right: `).concat(a,"px ").concat(r,`;
250    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
250")].filter(Boolean).join(""),`
251  }
252  
253  .`).concat(rl,` {
254    right: `).concat(a,"px ").concat(r,`;
255  }
256  
257  .`).concat(sl,` {
258    margin-right: `).concat(a,"px ").concat(r,`;
259  }
260  
261  .`).concat(rl," .").concat(rl,` {
262    right: 0 `).concat(r,`;
263  }
264  
265  .`).concat(sl," .").concat(sl,` {
266    margin-right: 0 `).concat(r,`;
267  }
268  
269  body[`).concat(Ys,`] {
270    `).concat(xA,": ").concat(a,`px;
271  }
272`)},Og=function(){var t=parseInt(document.body.getAttribute(Ys)||"0",10);return isFinite(t)?t:0},UA=function(){y.useEffect(function(){return document.body.setAttribute(Ys,(Og()+1).toString()),function(){var t=Og()-1;t<=0?document.body.removeAttribute(Ys):document.body.setAttribute(Ys,t.toString())}},[])},BA=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;UA();var i=y.useMemo(function(){return DA(s)},[s]);return y.createElement(MA,{styles:FA(i,!e,s,n?"":"!important")})},sh=!1;if(typeof window<"u")try{var Da=Object.defineProperty({},"passive",{get:function(){return sh=!0,!0}});window.addEventListener("test",Da,Da),window.removeEventListener("test",Da,Da)}catch{sh=!1}var ys=sh?{passive:!1}:!1,zA=function(t){return t.tagName==="TEXTAREA"},Nb=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!zA(t)&&n[e]==="visible")},VA=function(t){return Nb(t,"overflowY")},HA=function(t){return Nb(t,"overflowX")},Ag=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Pb(t,r);if(s){var i=Ob(t,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},WA=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},KA=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Pb=function(t,e){return t==="v"?VA(e):HA(e)},Ob=function(t,e){return t==="v"?WA(e):KA(e)},qA=function(t,e){return t==="h"&&e==="rtl"?-1:1},GA=function(t,e,n,r,s){var i=qA(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,l=e.contains(a),u=!1,d=o>0,c=0,f=0;do{if(!a)break;var h=Ob(t,a),g=h[0],m=h[1],x=h[2],w=m-x-i*g;(g||w)&&Pb(t,a)&&(c+=w,f+=g);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(d&&(Math.abs(c)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},Ma=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Lg=function(t){return[t.deltaX,t.deltaY]},Ig=function(t){return t&&"current"in t?t.current:t},JA=function(t,e){return t[0]===e[0]&&t[1]===e[1]},QA=function(t){return`
273  .block-interactivity-`.concat(t,` {pointer-events: none;}
274  .allow-interactivity-`).concat(t,` {pointer-events: all;}
275`)},YA=0,ws=[];function XA(t){var e=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),s=y.useState(YA++)[0],i=y.useState(jb)[0],o=y.useRef(t);y.useEffect(function(){o.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=wA([t.lockRef.current],(t.shards||[]).map(Ig),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=y.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var w=Ma(m),v=n.current,b="deltaX"in m?m.deltaX:v[0]-w[0],S="deltaY"in m?m.deltaY:v[1]-w[1],k,_=m.target,E=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in m&&E==="h"&&_.type==="range")return!1;var C=Ag(E,_);if(!C)return!0;if(C?k=E:(k=E==="v"?"h":"v",C=Ag(E,_)),!C)return!1;if(!r.current&&"changedTouches"in m&&(b||S)&&(r.current=k),!k)return!0;var N=r.current||k;return GA(N,x,m,N==="h"?b:S,!0)},[]),l=y.useCallback(function(m){var x=m;if(!(!ws.length||ws[ws.length-1]!==i)){var w="deltaY"in x?Lg(x):Ma(x),v=e.current.filter(function(k){return k.name===x.type&&(k.target===x.target||x.target===k.shadowParent)&&JA(k.delta,w)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}
vendor: 4,483 bytes, line 275
275if(!v){var b=(o.current.shards||[]).map(Ig).filter(Boolean).filter(function(k){return k.contains(x.target)}),S=b.length>0?a(x,b[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=y.useCallback(function(m,x,w,v){var b={name:m,delta:x,target:w,should:v,shadowParent:ZA(w)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(S){return S!==b})},1)},[]),d=y.useCallback(function(m){n.current=Ma(m),r.current=void 0},[]),c=y.useCallback(function(m){u(m.type,Lg(m),m.target,a(m,t.lockRef.current))},[]),f=y.useCallback(function(m){u(m.type,Ma(m),m.target,a(m,t.lockRef.current))},[]);y.useEffect(function(){return ws.push(i),t.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ys),document.addEventListener("touchmove",l,ys),document.addEventListener("touchstart",d,ys),function(){ws=ws.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,ys),document.removeEventListener("touchmove",l,ys),document.removeEventListener("touchstart",d,ys)}},[]);var h=t.removeScrollBar,g=t.inert;return y.createElement(y.Fragment,null,g?y.createElement(i,{styles:QA(s)}):null,h?y.createElement(BA,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function ZA(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const eL=RA(Rb,XA);var Ab=y.forwardRef(function(t,e){return y.createElement(Ru,an({},t,{ref:e,sideCar:eL}))});Ab.classNames=Ru.classNames;var tL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},bs=new WeakMap,Fa=new WeakMap,Ua={},Oc=0,Lb=function(t){return t&&(t.host||Lb(t.parentNode))},nL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Lb(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},rL=function(t,e,n,r){var s=nL(e,Array.isArray(t)?t:[t]);Ua[n]||(Ua[n]=new WeakMap);var i=Ua[n],o=[],a=new Set,l=new Set(s),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};s.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(f){if(a.has(f))d(f);else try{var h=f.getAttribute(r),g=h!==null&&h!=="false",m=(bs.get(f)||0)+1,x=(i.get(f)||0)+1;bs.set(f,m),i.set(f,x),o.push(f),m===1&&g&&Fa.set(f,!0),x===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",f,w)}})};return d(e),a.clear(),Oc++,function(){o.forEach(function(c){var f=bs.get(c)-1,h=i.get(c)-1;bs.set(c,f),i.set(c,h),f||(Fa.has(c)||c.removeAttribute(r),Fa.delete(c)),h||c.removeAttribute(n)}),Oc--,Oc||(bs=new WeakMap,bs=new WeakMap,Fa=new WeakMap,Ua={})}},sL=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=tL(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),rL(r,s,n,"aria-hidden")):function(){return null}},ju="Dialog",[Ib,DI]=Cr(ju),[iL,Qt]=Ib(ju),$b=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=y.useRef(null),l=y.useRef(null),[u,d]=Yo({prop:r,defaultProp:s??!1,onChange:i,caller:ju});return p.jsx(iL,{scope:e,triggerRef:a,contentRef:l,contentId:ro(),titleId:ro(),descriptionId:ro(),open:u,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(c=>!c),[d]),modal:o,children:n})};$b.displayName=ju;var Db="DialogTrigger",Mb=y.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Qt(Db,n),i=Le(e,s.triggerRef);return p.jsx(ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Of(s.open),...r,ref:i,onClick:ne(t.onClick,s.onOpenToggle)})});Mb.displayName=Db;var Nf="DialogPortal",[oL,Fb]=Ib(Nf,{forceMount:void 0}),Ub=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Qt(Nf,e);return p.jsx(oL,{scope:e,forceMount:n,children:y.Children.map(r,o=>p.jsx(ss,{present:n||i.open,children:p.jsx(uf,{asChild:!0,container:s,children:o})}))})};Ub.displayName=Nf;var ql="DialogOverlay",Bb=y.forwardRef((t,e)=>{const n=Fb(ql,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Qt(ql,t.__scopeDialog);return i.modal?p.jsx(ss,{present:r||i.open,children:p.jsx(lL,{...s,ref:e})}):null});Bb.displayName=ql;var aL=Po("DialogOverlay.RemoveScroll"),lL=y.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Qt(ql,n);return p.jsx(Ab,{as:aL,allowPinchZoom:!0,shards:[s.contentRef],children:p.jsx(ae.div,{"data-state":Of(s.open
vendor: 4,490 bytes, lines 275-279
275),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),ts="DialogContent",zb=y.forwardRef((t,e)=>{const n=Fb(ts,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Qt(ts,t.__scopeDialog);return p.jsx(ss,{present:r||i.open,children:i.modal?p.jsx(uL,{...s,ref:e}):p.jsx(cL,{...s,ref:e})})});zb.displayName=ts;var uL=y.forwardRef((t,e)=>{const n=Qt(ts,t.__scopeDialog),r=y.useRef(null),s=Le(e,n.contentRef,r);return y.useEffect(()=>{const i=r.current;if(i)return sL(i)},[]),p.jsx(Vb,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ne(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ne(t.onFocusOutside,i=>i.preventDefault())})}),cL=y.forwardRef((t,e)=>{const n=Qt(ts,t.__scopeDialog),r=y.useRef(!1),s=y.useRef(!1);return p.jsx(Vb,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=t.onInteractOutside)==null||l.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),Vb=y.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Qt(ts,n),l=y.useRef(null),u=Le(e,l);return yA(),p.jsxs(p.Fragment,{children:[p.jsx(_b,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:p.jsx(mu,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Of(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(dL,{titleId:a.titleId}),p.jsx(fL,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Pf="DialogTitle",Hb=y.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Qt(Pf,n);return p.jsx(ae.h2,{id:s.titleId,...r,ref:e})});Hb.displayName=Pf;var Wb="DialogDescription",Kb=y.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Qt(Wb,n);return p.jsx(ae.p,{id:s.descriptionId,...r,ref:e})});Kb.displayName=Wb;var qb="DialogClose",Gb=y.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Qt(qb,n);return p.jsx(ae.button,{type:"button",...r,ref:e,onClick:ne(t.onClick,()=>s.onOpenChange(!1))})});Gb.displayName=qb;function Of(t){return t?"open":"closed"}var Jb="DialogTitleWarning",[MI,Qb]=CE(Jb,{contentName:ts,titleName:Pf,docsSlug:"dialog"}),dL=({titleId:t})=>{const e=Qb(Jb),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
276
277If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
278
279For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},hL="DialogDescriptionWarning",fL=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Qb(hL).contentName}}.`;return y.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},pL=$b,mL=Mb,gL=Ub,Yb=Bb,Xb=zb,Zb=Hb,ex=Kb,vL=Gb;const tx=pL,yL=mL,wL=gL,nx=y.forwardRef(({className:t,...e},n)=>p.jsx(Yb,{ref:n,className:ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));nx.displayName=Yb.displayName;const Af=y.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(wL,{children:[p.jsx(nx,{}),p.jsxs(Xb,{ref:r,className:ee("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
279nded-lg",t),...n,children:[e,p.jsxs(vL,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[p.jsx(mf,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Af.displayName=Xb.displayName;const Lf=({className:t,...e})=>p.jsx("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Lf.displayName="DialogHeader";const If=y.forwardRef(({className:t,...e},n)=>p.jsx(Zb,{ref:n,className:ee("text-lg font-semibold leading-none tracking-tight",t),...e}));If.displayName=Zb.displayName;const bL=y.forwardRef(({className:t,...e},n)=>p.jsx(ex,{ref:n,className:ee("text-sm text-muted-foreground",t),...e}));bL.displayName=ex.displayName;const Ac="tdb_bidder_session",xL=t=>{const[e,n]=y.useState(Date.now());if(y.useEffect(()=>{const l=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(l)},[]),!t)return null;const r=new Date(t).getTime()-e;if(r<=0)return"Auction ended";const s=Math.floor(r/864e5),i=Math.floor(r%864e5/36e5),o=Math.floor(r%36e5/6e4),a=Math.floor(r%6e4/1e3);return`${s}d ${i}h ${o}m ${a}s`},SL=()=>{const{t}=mn(),[e,n]=y.useState([]),[r,s]=y.useState(null),[i,o]=y.useState(()=>{const h=localStorage.getItem(Ac);return h?JSON.parse(h):null}),[a,l]=y.useState(null),u=xL((r==null?void 0:r.end_time)??null),d=async()=>{const[{data:h},{data:g}]=await Promise.all([Pe.from("auction_items").select("*").eq("is_active",!0).order("sort_order"),Pe.from("auction_settings").select("*").eq("id",1).single()]);n(h||[]),g&&s({end_time:g.end_time,is_open:g.is_open})};y.useEffect(()=>{d();const h=Pe.channel("auction-public").on("postgres_changes",{event:"*",schema:"public",table:"auction_items"},d).on("postgres_changes",{event:"*",schema:"public",table:"auction_settings"},d).subscribe();return()=>{Pe.removeChannel(h)}},[]);const c=y.useMemo(()=>r!=null&&r.end_time?new Date(r.end_time).getTime()<Date.now():!1,[r,u]),f=(r==null?void 0:r.is_open)&&!c;return p.jsxs("section",{className:"section-y",children:[p.jsxs("div",{className:"container-tight",children:[p.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-muted-foreground",children:t("nav.auction")}),p.jsx("h1",{className:"mt-3 font-display text-5xl sm:text-6xl",children:t("auction.title")}),p.jsx("p",{className:"mt-4 max-w-2xl text-muted-foreground",children:t("auction.subtitle")}),p.jsxs(Qs,{className:"mt-6 border-primary/10 bg-primary/5 p-6",children:[p.jsx("h2",{className:"font-display text-xl",children:t("auction.info.title")}),p.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:t("auction.info.description")})]}),r&&p.jsxs(Qs,{className:"mt-8 flex flex-col items-start justify-between gap-3 p-5 sm:flex-row sm:items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(kC,{className:"h-4 w-4 text-primary"}),p.jsxs("span",{className:"text-sm",children:[!r.is_open&&"Bidding not yet open",r.is_open&&c&&"Auction ended",r.is_open&&!c&&u&&p.jsxs(p.Fragment,{children:["Closes in ",p.jsx("strong",{children:u})]}),r.is_open&&!c&&!u&&"Bidding is live"]})]}),i&&p.jsxs("span",{className:"text-xs text-muted-foreground",children:["Bidding as ",p.jsx("strong",{children:i.displayName})," ·"," ",p.jsx("button",{className:"underline",onClick:()=>{localStorage.removeItem(Ac),o(null)},children:"switch"})]})]}),p.jsxs("div",{className:"mt-10 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[e.length===0&&p.jsx("p",{className:"col-span-full text-sm text-muted-foreground",children:t("auction.soon")}),e.map(h=>{const g=h.current_bid?Number(h.current_bid)+Number(h.min_increment):Number(h.starting_bid);return p.jsxs(Qs,{className:"overflow-hidden",children:[h.image_url?p.jsx("div",{className:"aspect-[4/3] bg-muted",children:p.jsx("img",{src:h.image_url,alt:h.title,className:"h-full w-full object-cover object-top",loading:"lazy"})}):p.jsx("div",{className:"aspect-[4/3] bg-muted/40"}),h.additional_images&&h.additional_images.length>0&&p.jsx("div",{className:"grid grid-cols-3 gap-1 bg-muted/40 p-1",children:h.additional_images.map((m,x)=>p.jsx("div",{className:"aspect-square overflow-hidden bg-muted",children:p.jsx("img",{src:m,alt:`${h.title} ${x+2}`,className:"h-full w-full object-cover",loading:"lazy"})},x))}),p.jsxs("div",{className:"p-5",children:[p.jsx("h3",{className:"font-display text-xl",children:h.title}),h.description&&p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:h.description}),p.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:"Current bid"}),p.jsx("p",{className:"font-display text-2xl",children:h.current_bid?`€${h.current_bid}`:`€${h.starting_bid} start`}),h.current_bidder_name&&p.jsxs("p",{className:"text-xs text-muted-foreground",children:["by ",h.current_bidder_name]})]}),p.jsxs(_e,{size:"sm",disabled:!f,onClick:()=>l(h),children:[p.jsx(i0,{className:"h-4 w-4"})," Bid €",g,"+"]})]})]})]}
279,h.id)})]})]}),a&&p.jsx(kL,{item:a,session:i,onSession:h=>{o(h),localStorage.setItem(Ac,JSON.stringify(h))},onClose:()=>l(null)})]})},kL=({item:t,session:e,onSession:n,onClose:r})=>{const[s,i]=y.useState((e==null?void 0:e.email)??""),[o,a]=y.useState((e==null?void 0:e.displayName)??""),[l,u]=y.useState(""),[d,c]=y.useState(!1),f=t.current_bid?Number(t.current_bid)+Number(t.min_increment):Number(t.starting_bid);y.useEffect(()=>{u(String(f))},[f]);const h=async()=>{if(!s||!o){it({title:"Name and email required",variant:"destructive"});return}const g=Number(l);if(!Number.isFinite(g)||g<f){it({title:`Minimum bid is €${f}`,variant:"destructive"});return}c(!0);try{const{data:m,error:x}=await Pe.functions.invoke("place-bid",{body:{itemId:t.id,amount:g,email:s,displayName:o}});if(x)throw x;if(m!=null&&m.error)throw new Error(m.error);n({email:s,displayName:o}),it({title:"Bid placed!",description:`€${g} on ${t.title}`}),r()}catch(m){it({title:"Bid failed",description:m.message,variant:"destructive"})}finally{c(!1)}};return p.jsx(tx,{open:!0,onOpenChange:r,children:p.jsxs(Af,{children:[p.jsx(Lf,{children:p.jsx(If,{children:t.title})}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{children:[p.jsx(Je,{children:"Your name"}),p.jsx(st,{value:o,onChange:g=>a(g.target.value)})]}),p.jsxs("div",{children:[p.jsx(Je,{children:"Email"}),p.jsx(st,{type:"email",value:s,onChange:g=>i(g.target.value)})]}),p.jsxs("div",{children:[p.jsxs(Je,{children:["Your bid (€) — minimum €",f]}),p.jsx(st,{type:"number",min:f,step:t.min_increment,value:l,onChange:g=>u(g.target.value)})]}),p.jsxs(_e,{onClick:h,disabled:d,className:"w-full",children:[p.jsx(i0,{className:"h-4 w-4"})," ",d?"...":`Place bid €${l}`]})]})]})})},$f=y.forwardRef(({className:t,...e},n)=>p.jsx("textarea",{className:ee("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
279ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));$f.displayName="Textarea";const _L="/assets/bikko-BIX6VYEm.jpeg",EL="/assets/sportland-BfKnQLQ5.png",CL="/assets/autojuta-Cy3i7jMy.png",TL="/assets/cupra-DvFPmnTx.png",RL="/assets/voltas-BmyIYJrf.png",jL="/assets/wahoo-C_-JyUFt.png",NL="/assets/smile-silence-BLErH6bi.png",PL="/assets/ra-barber-9I8aCK8_.png",OL="/assets/hookusbookus-D6lf40rp.png",AL="/assets/go-botanicals-CSfI7WZy.png",LL="/assets/true-story-DGid4PaV.jpeg",IL=[{name:"Voltas",logo:RL,url:"https://voltas.lt"},{name:"RA Barber",logo:PL,url:"https://www.instagram.com/ra.barber"},{name:"Go Botanicals",logo:AL,url:"https://gobotanicals.eu"}],$L=[{name:"Bikko.lt",logo:_L,url:"https://bikko.lt"},{name:"Sportland",logo:EL,url:"https://sportland.lt"},{name:"Autojuta",logo:CL,url:"https://autojuta.lt"},{name:"Cupra",logo:TL,url:"https://www.cupraofficial.com"},{name:"Wahoo",logo:jL,url:"https://www.wahoofitness.com"},{name:"Smile & Silence",logo:NL,url:"https://smileandsilence.com"},{name:"Hookusbookus.com",logo:OL,url:"https://hookusbookus.com"},{name:"True Story",logo:LL,url:"https://truestory.lt"}],DL=()=>{const{t}=mn(),[e,n]=y.useState({name:"",email:"",message:""});return p.jsx("section",{className:"section-y",children:p.jsxs("div",{className:"container-tight grid gap-12 lg:grid-cols-2",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-muted-foreground",children:t("nav.contact")}),p.jsx("h1",{className:"mt-3 font-display text-5xl sm:text-6xl",children:t("contact.title")}),p.jsx("p",{className:"mt-4 max-w-md text-muted-foreground",children:t("contact.subtitle")}),p.jsxs("div",{className:"mt-6 flex flex-col gap-3",children:[p.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-2 text-sm font-medium text-primary hover:underline",children:[p.jsx(CC,{className:"h-4 w-4"})," [email protected]"]}),p.jsxs("a",{href:"https://www.instagram.com/remi.dme",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm font-medium text-primary hover:underline",children:[p.jsx(pf,{className:"h-4 w-4"})," @Remi.dme"]})]}),p.jsxs("div",{className:"mt-10",children:[p.jsx("h2",{className:"font-display text-2xl",children:t("contact.mainSponsorsTitle")}),p.jsx("div",{className:"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-3",children:IL.map(r=>p.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"flex aspect-square items-center justify-center rounded-xl border-2 border-primary/30 bg-card p-6 shadow-card transition-transform hover:-translate-y-0.5",children:p.jsx("img",{src:r.logo,alt:`${r.name} logo`,className:"h-full w-full object-contain",loading:"lazy"})},r.name))}),p.jsx("h2",{className:"mt-10 font-display text-2xl",children:t("contact.sponsorsTitle")}),p.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:t("contact.sponsorsSoon")}),p.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-4 sm:grid-cols-3",children:[$L.map(r=>p.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"flex aspect-square items-center justify-center rounded-lg border border-border bg-card p-4 shadow-card transition-transform hover:-translate-y-0.5",children:p.jsx("img",{src:r.logo,alt:`${r.name} logo`,className:"h-full w-full object-contain",loading:"lazy"})},r.name)),[1,2].map(r=>p.jsx("div",{className:"flex aspect-square items-center justify-center rounded-lg border border-dashed border-border bg-muted/30 text-xs text-muted-foreground",children:t("common.comingSoon")},r))]})]})]}),p.jsx("form",{className:"rounded-xl border border-border bg-card p-6 shadow-card sm:p-8",onSubmit:r=>{r.preventDefault(),it({title:t("contact.sent")}),n({name:"",email:"",message:""})},children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("label",{htmlFor:"name",className:"mb-1.5 block text-sm font-medium",children:t("contact.name")}),p.jsx(st,{id:"name",required:!0,value:e.name,onChange:r=>n({...e,name:r.target.value})})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"email",className:"mb-1.5 block text-sm font-medium",children:t("contact.email")}),p.jsx(st,{id:"email",type:"email",required:!0,value:e.email,onChange:r=>n({...e,email:r.target.value})})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"message",className:"mb-1.5 block text-sm font-medium",children:t("contact.message")}),p.jsx($f,{id:"message",rows:5,required:!0,value:e.message,onChange:r=>n({...e,message:r.target.value})})]}),p.jsx(_e,{type:"submit",size:"lg",className:"w-full bg-primary text-primary-foreground hover:bg-primary/90",children:t("contact.send")})]})})]})})};function ML(t){const e=y.useRef({value:t,previous:t});return y.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var Nu="Switch",[FL,FI]=Cr(Nu),[UL,BL]=FL(Nu),rx=y.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:u,form:d,...c}=t,[f,h]=y.useState(null),g=Le(e,b=>h(b)),m=y.useRef(!1),x=f?d||!!f.closest("form"):!0,[w,v]=Yo({prop:s,defaultProp:i??!1,onChange:u,caller:Nu});return p.jsxs(UL,{scope:n,checked:w,disabled:a,children:[p.jsx(ae.button,{type:"button",role:"switch","aria-checked":w,"aria-required":o,"data-state":ax(w),"data-disabled":a?"":void 0,disabled:a,value:l,...c,ref:g,onClick:ne(t.onClick,b=>{v(S=>!S),x&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),x&&p.jsx(ox,{control:f,bubbles:!m.current,name:r,value:l,checked:w,required:o,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});rx.displayName=Nu;var sx="SwitchThumb",ix=y.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=BL(sx,n);return p.jsx(ae.span,{"data-state":ax(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});ix.displayName=sx;var zL="SwitchBubbleInput",ox=y.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:r=!0,...s},i)=>{const o=y.useRef(null),a=Le(o,i),l=ML(n),u=N0(e);return y.useEffect(()=>{const d=o.current;if(!d)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&h){const g=new Event("click",{bubbles:r});
vendor: 7,273 bytes, line 279
279h.call(d,n),d.dispatchEvent(g)}},[l,n,r]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:a,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ox.displayName=zL;function ax(t){return t?"checked":"unchecked"}var lx=rx,VL=ix;const ih=y.forwardRef(({className:t,...e},n)=>p.jsx(lx,{className:ee("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...e,ref:n,children:p.jsx(VL,{className:ee("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));ih.displayName=lx.displayName;var HL=y.createContext(void 0);function ux(t){const e=y.useContext(HL);return t||e||"ltr"}var Lc="rovingFocusGroup.onEntryFocus",WL={bubbles:!1,cancelable:!0},ta="RovingFocusGroup",[oh,cx,KL]=Ow(ta),[qL,dx]=Cr(ta,[KL]),[GL,JL]=qL(ta),hx=y.forwardRef((t,e)=>p.jsx(oh.Provider,{scope:t.__scopeRovingFocusGroup,children:p.jsx(oh.Slot,{scope:t.__scopeRovingFocusGroup,children:p.jsx(QL,{...t,ref:e})})}));hx.displayName=ta;var QL=y.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=t,f=y.useRef(null),h=Le(e,f),g=ux(i),[m,x]=Yo({prop:o,defaultProp:a??null,onChange:l,caller:ta}),[w,v]=y.useState(!1),b=qt(u),S=cx(n),k=y.useRef(!1),[_,E]=y.useState(0);return y.useEffect(()=>{const C=f.current;if(C)return C.addEventListener(Lc,b),()=>C.removeEventListener(Lc,b)},[b]),p.jsx(GL,{scope:n,orientation:r,dir:g,loop:s,currentTabStopId:m,onItemFocus:y.useCallback(C=>x(C),[x]),onItemShiftTab:y.useCallback(()=>v(!0),[]),onFocusableItemAdd:y.useCallback(()=>E(C=>C+1),[]),onFocusableItemRemove:y.useCallback(()=>E(C=>C-1),[]),children:p.jsx(ae.div,{tabIndex:w||_===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...t.style},onMouseDown:ne(t.onMouseDown,()=>{k.current=!0}),onFocus:ne(t.onFocus,C=>{const N=!k.current;if(C.target===C.currentTarget&&N&&!w){const j=new CustomEvent(Lc,WL);if(C.currentTarget.dispatchEvent(j),!j.defaultPrevented){const B=S().filter(D=>D.focusable),A=B.find(D=>D.active),$=B.find(D=>D.id===m),V=[A,$,...B].filter(Boolean).map(D=>D.ref.current);mx(V,d)}}k.current=!1}),onBlur:ne(t.onBlur,()=>v(!1))})})}),fx="RovingFocusGroupItem",px=y.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,children:o,...a}=t,l=ro(),u=i||l,d=JL(fx,n),c=d.currentTabStopId===u,f=cx(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:m}=d;return y.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),p.jsx(oh.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:p.jsx(ae.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...a,ref:e,onMouseDown:ne(t.onMouseDown,x=>{r?d.onItemFocus(u):x.preventDefault()}),onFocus:ne(t.onFocus,()=>d.onItemFocus(u)),onKeyDown:ne(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=ZL(x,d.orientation,d.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=f().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const S=b.indexOf(x.currentTarget);b=d.loop?eI(b,S+1):b.slice(S+1)}setTimeout(()=>mx(b))}}),children:typeof o=="function"?o({isCurrentTabStop:c,hasTabStop:m!=null}):o})})});px.displayName=fx;var YL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XL(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function ZL(t,e,n){const r=XL(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return YL[r]}function mx(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function eI(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var tI=hx,nI=px,Pu="Tabs",[rI,UI]=Cr(Pu,[dx]),gx=dx(),[sI,Df]=rI(Pu),vx=y.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=t,d=ux(a),[c,f]=Yo({prop:r,onChange:s,defaultProp:i??"",caller:Pu});return p.jsx(sI,{scope:n,baseId:ro(),value:c,onValueChange:f,orientation:o,dir:d,activationMode:l,children:p.jsx(ae.div,{dir:d,"data-orientation":o,...u,ref:e})})});vx.displayName=Pu;var yx="TabsList",wx=y.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...s}=t,i=Df(yx,n),o=gx(n);return p.jsx(tI,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:p.jsx(ae.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});wx.displayName=yx;var bx="TabsTrigger",xx=y.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=t,o=Df(bx,n),a=gx(n),l=_x(o.baseId,r),u=Ex(o.baseId,r),d=r===o.value;return p.jsx(nI,{asChild:!0,...a,focusable:!s,active:d,children:p.jsx(ae.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:e,onMouseDown:ne(t.onMouseDown,c=>{!s&&c.button===0&&c.ctrlKey===!1?o.onValueChange(r):c.preventDefault()}),onKeyDown:ne(t.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(r)}),onFocus:ne(t.onFocus,()=>{const c=o.activationMode!=="manual";!d&&!s&&c&&o.onValueChange(r)})})})});xx.displayName=bx;var Sx="TabsContent",kx=y.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=t,a=Df(Sx,n),l=_x(a.baseId,r),u=Ex(a.baseId,r),d=r===a.value,c=y.useRef(d);return y.useEffect(()=>{const f=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(f)},[]),p.jsx(ss,{present:s||d,children:({present:f})=>p.jsx(ae.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:c.current?"0s":void 0},children:f&&i})})});kx.displayName=Sx;function _x(t,e){return`${t}-trigger-${e}`}function Ex(t,e){return`${t}-content-${e}`}var iI=vx,Cx=wx,Tx=xx,Rx=kx;const oI=iI,jx=y.forwardRef(({className:t,...e},n)=>p.jsx(Cx,{ref:n,className:ee("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));jx.displayName=Cx.displayName;const il=y.forwardRef(({className:t,...e},n)=>p.jsx(Tx,{ref:n,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",t),...e}));
279il.displayName=Tx.displayName;const ol=y.forwardRef(({className:t,...e},n)=>p.jsx(Rx,{ref:n,className:ee("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));ol.displayName=Rx.displayName;const ah=y.forwardRef(({className:t,...e},n)=>p.jsx("div",{className:"relative w-full overflow-auto",children:p.jsx("table",{ref:n,className:ee("w-full caption-bottom text-sm",t),...e})}));ah.displayName="Table";const lh=y.forwardRef(({className:t,...e},n)=>p.jsx("thead",{ref:n,className:ee("[&_tr]:border-b",t),...e}));lh.displayName="TableHeader";const uh=y.forwardRef(({className:t,...e},n)=>p.jsx("tbody",{ref:n,className:ee("[&_tr:last-child]:border-0",t),...e}));uh.displayName="TableBody";const aI=y.forwardRef(({className:t,...e},n)=>p.jsx("tfoot",{ref:n,className:ee("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));aI.displayName="TableFooter";const Ki=y.forwardRef(({className:t,...e},n)=>p.jsx("tr",{ref:n,className:ee("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",t),...e}));Ki.displayName="TableRow";const dt=y.forwardRef(({className:t,...e},n)=>p.jsx("th",{ref:n,className:ee("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));dt.displayName="TableHead";const ht=y.forwardRef(({className:t,...e},n)=>p.jsx("td",{ref:n,className:ee("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));ht.displayName="TableCell";const lI=y.forwardRef(({className:t,...e},n)=>p.jsx("caption",{ref:n,className:ee("mt-4 text-sm text-muted-foreground",t),...e}));lI.displayName="TableCaption";const $g="[email protected]",uI=()=>{const t=lf(),[e,n]=y.useState(!1),[r,s]=y.useState([]),[i,o]=y.useState([]),[a,l]=y.useState(""),[u,d]=y.useState(!1),[c,f]=y.useState(null),[h,g]=y.useState(!1);y.useEffect(()=>{const{data:k}=Pe.auth.onAuthStateChange((_,E)=>{(E==null?void 0:E.user.email)!==$g&&t("/admin/login")});return Pe.auth.getSession().then(({data:_})=>{var E;((E=_.session)==null?void 0:E.user.email)!==$g?t("/admin/login"):n(!0)}),()=>k.subscription.unsubscribe()},[t]);const m=async()=>{const[{data:k},{data:_},{data:E}]=await Promise.all([Pe.from("auction_items").select("*").order("sort_order"),Pe.from("bids").select("*").order("created_at",{ascending:!1}),Pe.from("auction_settings").select("*").eq("id",1).single()]);s(k||[]),o(_||[]),E&&(l(E.end_time?new Date(E.end_time).toISOString().slice(0,16):""),d(E.is_open))};y.useEffect(()=>{e&&m()},[e]);const x=async()=>{if(!(c!=null&&c.title)){it({title:"Title required",variant:"destructive"});return}const k={title:c.title,description:c.description||null,image_url:c.image_url||null,starting_bid:Number(c.starting_bid)||0,min_increment:Number(c.min_increment)||5,sort_order:Number(c.sort_order)||0,is_active:c.is_active??!0},{error:_}=c.id?await Pe.from("auction_items").update(k).eq("id",c.id):await Pe.from("auction_items").insert(k);_?it({title:"Error",description:_.message,variant:"destructive"}):(it({title:"Saved"}),g(!1),f(null),m())},w=async k=>{confirm("Delete this item and all its bids?")&&(await Pe.from("auction_items").delete().eq("id",k),m())},v=async()=>{const{error:k}=await Pe.from("auction_settings").update({end_time:a?new Date(a).toISOString():null,is_open:u}).eq("id",1);it(k?{title:"Error",description:k.message,variant:"destructive"}:{title:"Settings saved"})},b=()=>{const k=[["Item","Bidder","Email","Amount","Time"]];i.forEach(j=>{const B=r.find(A=>A.id===j.item_id);k.push([(B==null?void 0:B.title)||"?",j.bidder_name,j.bidder_email,String(j.amount),j.created_at])});const _=k.map(j=>j.map(B=>`"${String(B).replace(/"/g,'""')}"`).join(",")).join(`
280`),E=new Blob([_],{type:"text/csv"}),C=URL.createObjectURL(E),N=document.createElement("a");N.href=C,N.download=`bids-${new Date().toISOString().slice(0,10)}.csv`,N.click()},S=async()=>{await Pe.auth.signOut(),t("/admin/login")};return e?p.jsx("section",{className:"section-y",children:p.jsxs("div",{className:"container-tight",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h1",{className:"font-display text-4xl",children:"Admin"}),p.jsxs(_e,{variant:"ghost",size:"sm",onClick:S,children:[p.jsx(EC,{className:"h-4 w-4"})," Sign out"]})]}),p.jsxs(oI,{defaultValue:"items",className:"mt-8",children:[p.jsxs(jx,{children:[p.jsxs(il,{value:"items",children:["Items (",r.length,")"]}),p.jsxs(il,{value:"bids",children:["Bids (",i.length,")"]}),p.jsx(il,{value:"settings",children:"Settings"})]}),p.jsxs(ol,{value:"items",className:"mt-6 space-y-4",children:[p.jsxs(tx,{open:h,onOpenChange:g,children:[p.jsx(yL,{asChild:!0,children:p.jsxs(_e,{onClick:()=>f({starting_bid:0,min_increment:5,sort_order:r.length,is_active:!0}),children:[p.jsx(jC,{className:"h-4 w-4"})," Add item"]})}),p.jsxs(Af,{className:"max-h-[90vh] overflow-y-auto",children:[p.jsx(Lf,{children:p.jsx(If,{children:c!=null&&c.id?"Edit item":"New item"})}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{children:[p.jsx(Je,{children:"Title"}),p.jsx(st,{value:(c==null?void 0:c.title)||"",onChange:k=>f({...c,title:k.target.value})})]}),p.jsxs("div",{children:[p.jsx(Je,{children:"Description"}),p.jsx($f,{value:(c==null?void 0:c.description)||"",onChange:k=>f({...c,description:k.target.value})})]}),p.jsxs("div",{children:[p.jsx(Je,{children:"Image URL"}),p.jsx(st,{value:(c==null?void 0:c.image_url)||"",onChange:k=>f({...c,image_url:k.target.value}),placeholder:"https://..."})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[p.jsxs("div",{children:[p.jsx(Je,{children:"Starting bid (€)"}),p.jsx(st,{type:"number",value:(c==null?void 0:c.starting_bid)??0,onChange:k=>f({...c,starting_bid:Number(k.target.value)})})]}),p.jsxs("div",{children:[p.jsx(Je,{children:"Min increment (€)"}),p.jsx(st,{type:"number",value:(c==null?void 0:c.min_increment)??5,onChange:k=>f({...c,min_increment:Number(k.target.value)})})]})]}),p.jsxs("div",{children:[p.jsx(Je,{children:"Sort order"}),p.jsx(st,{type:"number",value:(c==null?void 0:c.sort_order)??0,onChange:k=>f({...c,sort_order:Number(k.target.value)})})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(ih,{checked:(c==null?void 0:c.is_active)??!0,onCheckedChange:k=>f({...c,is_active:k})}),p.jsx(Je,{children:"Active"})]}),p.jsx(_e,{onClick:x,className:"w-full",children:"Save"})]})]})]}),p.jsxs(ah,{children:[p.jsx(lh,{children:p.jsxs(Ki,{children:[p.jsx(dt,{children:"#"}),p.jsx(dt,{children:"Title"}),p.jsx(dt,{children:"Start"}),p.jsx(dt,{children:"Current"}),p.jsx(dt,{children:"Bidder"}),p.jsx(dt,{children:"Active"}),p.jsx(dt,{})]})}),p.jsx(uh,{children:r.map(k=>p.jsxs(Ki,{children:[p.jsx(ht,{children:k.sort_order}),p.jsx(ht,{className:"font-medium",children:k.title}),p.jsxs(ht,{children:["€",k.starting_bid]}),p.jsx(ht,{children:k.current_bid?`€${k.current_bid}`:"—"}),p.jsx(ht,{className:"text-xs",children:k.current_bidder_name||"—"}),p.jsx(ht,{children:k.is_active?"✓":"—"}),p.jsxs(ht,{className:"flex gap-1",children:[p.jsx(_e,{size:"icon",variant:"ghost",onClick:()=>{f(k),g(!0)},children:p.jsx(RC,{className:"h-4 w-4"})}),p.jsx(_e,{size:"icon",variant:"ghost",onClick:()=>w(k.id),children:p.jsx(OC,{className:"h-4 w-4"})})]})]},k.id))})]})]}),p.jsxs(ol,{value:"bids",className:"mt-6 space-y-4",children:[p.jsx(_e,{onClick:b,variant:"outline",size:"sm",children:"Export CSV"}),p.jsxs(ah,{children:[p.jsx(lh,{children:p.jsxs(Ki,{children:[p.jsx(dt,{children:"Item"}),p.jsx(dt,{children:"Bidder"}),p.jsx(dt,{children:"Email"}),p.jsx(dt,{children:"Amount"}),p.jsx(dt,{children:"When"})]})}),p.jsx(uh,{children:i.map(k=>{var _;return p.jsxs(Ki,{children:[p.jsx(ht,{children:((_=r.find(E=>E.id===k.item_id))==null?void 0:_.title)||"—"}),p.jsx(ht,{children:k.bidder_name}),p.jsx(ht,{className:"text-xs",children:k.bidder_email}),p.jsxs(ht,{className:"font-semibold",children:["€",k.amount]}),p.jsx(ht,{className:"text-xs text-muted-foreground",children:new Date(k.created_at).toLocaleStr
280ing()})]},k.id)})})]})]}),p.jsx(ol,{value:"settings",className:"mt-6 space-y-4",children:p.jsxs(Qs,{className:"p-6 space-y-4",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(ih,{checked:u,onCheckedChange:d}),p.jsx(Je,{children:"Auction is open for bidding"})]}),p.jsxs("div",{children:[p.jsx(Je,{children:"End time"}),p.jsx(st,{type:"datetime-local",value:a,onChange:k=>l(k.target.value)})]}),p.jsx(_e,{onClick:v,children:"Save settings"})]})})]})]})}):null},Dg="[email protected]",cI=()=>{const t=lf(),[e,n]=y.useState(""),[r,s]=y.useState(""),[i,o]=y.useState("login"),[a,l]=y.useState(!1);y.useEffect(()=>{Pe.auth.getSession().then(({data:d})=>{var c;((c=d.session)==null?void 0:c.user.email)===Dg&&t("/admin")})},[t]);const u=async d=>{if(d.preventDefault(),e.toLowerCase()!==Dg){it({title:"Access denied",description:"This account is not an admin.",variant:"destructive"});return}l(!0);try{const c=i==="login"?Pe.auth.signInWithPassword({email:e,password:r}):Pe.auth.signUp({email:e,password:r,options:{emailRedirectTo:`${window.location.origin}/admin`}}),{error:f}=await c;if(f)throw f;it({title:i==="login"?"Welcome back":"Account created — you're in"}),t("/admin")}catch(c){it({title:"Error",description:c.message,variant:"destructive"})}finally{l(!1)}};return p.jsx("section",{className:"section-y",children:p.jsxs("div",{className:"container-tight max-w-md",children:[p.jsx("h1",{className:"font-display text-4xl",children:"Admin"}),p.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Sign in to manage the auction."}),p.jsx(Qs,{className:"mt-6 p-6",children:p.jsxs("form",{onSubmit:u,className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx(Je,{htmlFor:"email",children:"Email"}),p.jsx(st,{id:"email",type:"email",value:e,onChange:d=>n(d.target.value),required:!0})]}),p.jsxs("div",{children:[p.jsx(Je,{htmlFor:"password",children:"Password"}),p.jsx(st,{id:"password",type:"password",value:r,onChange:d=>s(d.target.value),required:!0,minLength:8})]}),p.jsx(_e,{type:"submit",className:"w-full",disabled:a,children:a?"...":i==="login"?"Sign in":"Create admin account"}),p.jsx("button",{type:"button",onClick:()=>o(i==="login"?"signup":"login"),className:"block w-full text-center text-xs text-muted-foreground hover:text-foreground",children:i==="login"?"First time? Create your admin account":"Have an account? Sign in"})]})})]})})},dI=()=>{const t=xi();return y.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),p.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),p.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},hI=new $1,fI=()=>p.jsx(M1,{client:hI,children:p.jsxs(ej,{children:[p.jsx(pT,{}),p.jsx(bE,{}),p.jsx(D_,{children:p.jsxs(j_,{children:[p.jsxs(kt,{element:p.jsx(Xj,{}),children:[p.jsx(kt,{path:"/",element:p.jsx(eN,{})}),p.jsx(kt,{path:"/about",element:p.jsx(nN,{})}),p.jsx(kt,{path:"/trips",element:p.jsx(rN,{})}),p.jsx(kt,{path:"/tour",element:p.jsx(sN,{})}),p.jsx(kt,{path:"/charity",element:p.jsx(oN,{})}),p.jsx(kt,{path:"/auction",element:p.jsx(SL,{})}),p.jsx(kt,{path:"/contact",element:p.jsx(DL,{})}),p.jsx(kt,{path:"/admin/login",element:p.jsx(cI,{})}),p.jsx(kt,{path:"/admin",element:p.jsx(uI,{})})]}),p.jsx(kt,{path:"*",element:p.jsx(dI,{})})]})})]})}
vendor: 1,071 bytes, line 280
280),{slice:pI,forEach:mI}=[];function gI(t){return mI.call(pI.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function vI(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(n=>n.test(t))}const Mg=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,yI=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let i=`${t}=${s}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!Mg.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!Mg.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invali
280d");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},Fg={create(t,e,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=yI(t,e,s)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var wI={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return Fg.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:i}=e;n&&typeof document<"u"&&Fg.create(n,t,r,s,i)}},bI={name:"querystring",lookup(t){var r;let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let a=0;a<o.length;a++){const l=o[a].indexOf("=");l>0&&o[a].substring(0,l)===e&&(n=o[a].substring(l+1))}}return n}},xI={name:"hash",lookup(t){var s;let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:i}=window.location;if(i&&i.length>2){const o=i.substring(1);if(e){const a=o.split("&");for(let l=0;l<a.length;l++){const u=a[l].indexOf("=");u>0&&a[l].substring(0,u)===e&&(r=a[l].substring(u+1))}}if(r)return r;if(!r&&n>-1){const a=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(s=a[typeof n=="number"?n:0])==null?void 0:s.replace("/",""):void 0}}}return r}};let xs=null;const Ug=()=>{if(xs!==null)return xs;try{if(xs=typeof window<"u"&&window.localStorage!==null,!xs)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{xs=!1}return xs};var SI={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&Ug())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&Ug()&&window.localStorage.setItem(n,t)}};let Ss=null;const Bg=()=>{if(Ss!==null)return Ss;try{if(Ss=typeof window<"u"&&window.sessionStorage!==null,!Ss)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Ss=!1}return Ss};var kI={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&Bg())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&Bg()&&window.sessionStorage.setItem(n,t)}},_I={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let i=0;i<n.length;i++)e.push(n[i]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},EI={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},CI={name:"path",lookup(t){var s;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof e=="number"?e:0])==null?void 0:s.replace("/",""):void 0}},TI={name:"subdomain",lookup(t){var s,i;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let Nx=!1;try{document.cookie,Nx=!0}catch{}const Px=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Nx||Px.splice(1,1);const RI=()=>({order:Px,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class Ox{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=gI(n,this.options||{},RI()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(wI),this.addDetector(bI),this.addDetector(SI),this.addDetector(kI),this.addDetector(_I),this.addDetector(EI),this.addDetector(CI),this.addDetector(TI),this.addDetector(xI)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!vI(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}
280cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}Ox.type="languageDetector";const jI={nav:{home:"Home",about:"About Remi",trips:"Previous Trips",tour:"Tour de Baltics",charity:"Charity",auction:"Auction",contact:"Contact",donate:"Donate"},common:{viewAuction:"View Auction",supportCause:"Support the Cause",followLive:"Follow Live",followDailyVlog:"Follow the daily vlog on Instagram",learnMore:"Learn more",comingSoon:"Coming soon",backHome:"Back to home",languageEN:"EN",languageLT:"LT"},hero:{eyebrow:"Charity ride · Starts July 24, 2026",title:`2,211 KM
281AROUND
282THE BALTICS`,subtitle:"One Belgian rider. +200 km average daily. Three countries. Supporting Labdaros ir paramos fondas „Rugutė“. Public start July 24 at 10:00 at Cathedral Square in Vilnius centre. Come cheer me on at the start line!",ctaPrimary:"Bid in the auction",ctaSecondary:"Donate to the cause",stats:{km:"Kilometres",days:"Average daily distance",countries:"Countries"}},about:{title:"About Remi",paragraph1:"Remi is a Belgian cyclist who has called Lithuania home for the past four years. He is now active as a content creator in Lithuania, combined with being a cyclist. Now he is bringing these two things together by doing this long trip around the Baltic countries, while making content, and exploring this beautiful countries by bicycle.",paragraph2:"Tour de Baltics is his biggest project so far. The aim is to raise money for the charity & to spread positive energy through the socials.",quote:""},trips:{title:"Previous Charity Trips",subtitle:"Two long-distance rides that paved the way.",belltu:{title:"BELLTU Tour",description:"Belgium → Lithuania. Solo, fully loaded, across Europe."},italtu:{title:"ITALTU Tour",description:"Lithuania → Italy with three friends. A brotherhood on wheels."},instagramNote:"Watch the full story on Instagram"},tour:{title:"The Route",subtitle:"2,211 km. One loop around the Baltics.",concept:"+200 km average daily",conceptDesc:"A consistent rhythm — long enough to hurt, repeatable enough to finish. Planned as an 11-day journey, finishing July 4th at Cathedral Square in Vilnius centre. The exact arrival time will be announced on social media. Public start July 24, 2026 at 10:00 at Cathedral Square in Vilnius centre. Everyone is welcome to roll out with us. Come cheer me on at the start line!",routeTitle:"Cities on the route",cities:[{name:"Vilnius (LT)",note:"Lithuania's capital and the start line — baroque old town, hilltop castle and a buzzing café scene."},{name:"Marijampolė (LT)",note:"Quiet southern Lithuanian town near the Polish border, surrounded by farmland and forests."},{name:"Klaipėda (LT)",note:"Lithuania's port city on the Baltic coast, with a German-flavoured old town and the Curonian Spit nearby."},{name:"Ventspils (LV)",note:"Latvian seaside town known for its sandy beaches, sculptures and a tidy, walkable centre."},{name:"Riga (LV)",note:"Latvia's capital — Art Nouveau facades, a UNESCO old town and the largest market in the Baltics."},{name:"Pärnu (EE)",note:"Estonia's summer capital, a relaxed beach resort on the Gulf of Riga."},{name:"Tallinn (EE)",note:"Estonia's capital — medieval walls, cobblestone lanes and a sharp tech-driven modern side."},{name:"Jõhvi (EE)",note:"Small north-eastern Estonian town close to the Russian border and the rugged Baltic coast."},{name:"Põlva (EE)",note:"Tiny town in southern Estonia, set among lakes, hills and the wooded Setomaa region."},{name:"Rēzekne (LV)",note:"Cultural heart of Latgale in eastern Latvia, with a striking castle hill and modern arts centre."},{name:"Daugavpils (LV)",note:"Latvia's second city on the Daugava river, home to a 19th-century fortress and Mark Rothko's birthplace."},{name:"Visaginas (LT)",note:"Planned town in north-east Lithuania, built around the now-closed Ignalina nuclear plant."},{name:"Vilnius (LT)",note:"Back where it started — finish line in the city centre after 2,211 km around the Baltics."}],support:"Support team & content",supportDesc:"A small support crew follows the ride to capture every kilometre. Daily vlogs go up on Instagram, and a full YouTube documentary lands after the finish."},charity:{title:"Why Rugutė",intro:'Labdaros ir paramos fondas „Rugutė" supports Lithuanian children fighting cancer and their families. They cover treatment costs, psychological support, and the small things that make the hardest days bearable.',motivation:"",donateTitle:"Two ways to give",donateSubtitle:"Pick the one that speaks to you. Every euro counts.",rugute:{title:"Donate to Rugutė",description:"100% goes to the foundation supporting children with cancer and their families.",cta:"Donate to charity"},project:{title:"Support the project",description:"Help cover the cost of the ride itself — food, lodging, support vehicle, gear.",cta:"Support the ride"},raised:"raised of",goal:"goal"},auction:{title:"Charity Auction",subtitle:"Signed jerseys, and other gear from athletes who joined the cause. All proceeds go to Rugutė.",soon:"The auction opens closer to the start. Items and athletes are being confirmed weekly — 
282check back soon.",notify:"Notify me when bidding opens",info:{title:"What's on auction?",description:"Professional athletes from various sports have donated their signed gear for this cause — football jerseys, cycling kit, basketball gear, and more. Every item supports the charity Rugutė. More info soon."}},contact:{title:"Contact & Sponsors",subtitle:"Want to support Tour de Baltics as a sponsor, partner, or media?",name:"Full name",email:"Email",message:"Tell us about your interest",send:"Send message",sponsorsTitle:"Project sponsors",sponsorsSoon:"More partners are joining every week.",mainSponsorsTitle:"Main sponsors",sent:"Thanks — we'll get back to you soon."},footer:{tagline:"A charity endurance ride for Rugutė.",follow:"Follow the journey",rights:"All rights reserved."}},NI={nav:{home:"Pradžia",about:"Apie Remi",trips:"Ankstesnės kelionės",tour:"Tour de Baltics",charity:"Labdara",auction:"Aukcionas",contact:"Kontaktai",donate:"Aukoti"},common:{viewAuction:"Peržiūrėti aukcioną",supportCause:"Paremk tikslą",followLive:"Sek tiesiogiai",followDailyVlog:"Stebėk kasdienį vlogą Instagrame",learnMore:"Sužinoti daugiau",comingSoon:"Greitai",backHome:"Į pradžią",languageEN:"EN",languageLT:"LT"},hero:{eyebrow:"Labdaros žygis · Startas liepos 24, 2026",title:`2 211 KM
283APLINK
284BALTIJOS ŠALIS`,subtitle:"Vienas belgas dviratininkas. +200 km vidutiniškai per dieną. Trys šalys. Palaikydami Labdaros ir paramos fondą „Rugutė“. Viešas startas liepos 24 d. 10:00 Vilniaus Katedros aikštėje. Ateikite palaikyti manęs starto linijoje!",ctaPrimary:"Dalyvauti aukcione",ctaSecondary:"Aukoti tikslui",stats:{km:"Kilometrai",days:"Vidutinis dienos atstumas",countries:"Šalys"}},about:{title:"Apie Remi",paragraph1:"Remi — belgas dviratininkas, jau ketverius metus gyvenantis Lietuvoje. Dabar jis aktyviai dirba turinio kūrėju Lietuvoje, kartu būdamas dviratininku. Šiuo metu jis sujungia šias dvi veiklas — leidžiasi į ilgą kelionę aplink Baltijos šalis, kuria turinį ir atranda šias gražias šalis dviračiu.",paragraph2:"Tour de Baltics — jo didžiausias projektas iki šiol. Tikslas — surinkti lėšų labdarai ir per socialinius tinklus skleisti pozityvią energiją.",quote:""},trips:{title:"Ankstesnės labdaros kelionės",subtitle:"Du tolimieji žygiai, paklojusieji pamatus.",belltu:{title:"BELLTU žygis",description:"Belgija → Lietuva. Vienas, su pilna įranga, per Europą."},italtu:{title:"ITALTU žygis",description:"Lietuva → Italija su trimis draugais. Brolija ant ratų."},instagramNote:"Pilną istoriją žiūrėk Instagrame"},tour:{title:"Maršrutas",subtitle:"2 211 km. Vienas ratas aplink Baltijos šalis.",concept:"Vidutiniškai per dieną: 200+ km",conceptDesc:"Pastovus ritmas — pakankamai ilgas, kad skaudėtų, pakankamai pasikartojantis, kad pavyktų. Suplanuota kaip 11 dienų kelionė, baigianti liepos 4 d. Vilniaus Katedros aikštėje. Tikslus atvykimo laikas bus paskelbtas socialiniuose tinkluose. Viešas startas 2026 m. liepos 24 d. 10:00 Vilniaus Katedros aikštėje. Visi kviečiami prisijungti. Ateikite palaikyti manęs starto linijoje!",routeTitle:"Maršruto miestai",cities:[{name:"Vilnius (LT)",note:"Lietuvos sostinė ir starto linija — barokinis senamiestis, pilies kalnas ir gyvas kavinių gyvenimas."},{name:"Marijampolė (LT)",note:"Ramus pietų Lietuvos miestas netoli Lenkijos sienos, apsuptas laukų ir miškų."},{name:"Klaipėda (LT)",note:"Lietuvos uostas prie Baltijos jūros — vokiško stiliaus senamiestis ir netoliese esanti Kuršių nerija."},{name:"Ventspilis (LV)",note:"Latvijos pajūrio miestas, garsėjantis smėlio paplūdimiais, skulptūromis ir tvarkingu centru."},{name:"Ryga (LV)",note:"Latvijos sostinė — modernizmo fasadai, UNESCO senamiestis ir didžiausias turgus Baltijos šalyse."},{name:"Pernu (EE)",note:"Estijos vasaros sostinė — ramus paplūdimio kurortas prie Rygos įlankos."},{name:"Talinas (EE)",note:"Estijos sostinė — viduramžių sienos, akmenimis grįstos gatvelės ir stipri technologijų dvasia."},{name:"Jehvis (EE)",note:"Mažas šiaurės rytų Estijos miestelis netoli Rusijos sienos ir laukinės Baltijos pakrantės."},{name:"Pelva (EE)",note:"Mažytis pietų Estijos miestelis tarp ežerų, kalvų ir miškingo Setomaa regiono."},{name:"Rėzeknė (LV)",note:"Latgalos kultūrinis centras rytų Latvijoje su įspūdinga pilies kalva ir modernių menų centru."},{name:"Daugpilis (LV)",note:"Antras pagal dydį Latvijos miestas prie Dauguvos — XIX a. tvirtovė ir Marko Rothko gimtinė."},{name:"Visaginas (LT)",note:"Suplanuotas miestas šiaurės rytų Lietuvoje, pastatytas šalia uždarytos Ignalinos AE."},{name:"Vilnius (LT)",note:"Vėl ten, kur viskas prasidėjo — finišas miesto centre po 2 211 km aplink Baltijos šalis."}
284],support:"Komanda ir turinys",supportDesc:"Nedidelė palaikymo komanda lydi žygį ir fiksuoja kiekvieną kilometrą. Kasdieniai vlogai keliasi į Instagramą, o pilnas YouTube dokumentinis filmas pasirodo po finišo."},charity:{title:"Kodėl Rugutė",intro:"Labdaros ir paramos fondas Rugutė remia Lietuvos vaikus, kovojančius su vėžiu, ir jų šeimas. Fondas dengia gydymo išlaidas, teikia psichologinę pagalbą ir tas mažas dovanas, kurios padeda ištverti sunkiausias dienas.",motivation:"",donateTitle:"Du būdai paaukoti",donateSubtitle:"Pasirink tau artimesnį. Kiekvienas euras svarbus.",rugute:{title:"Aukoti Rugutei",description:"100% lėšų keliauja fondui, remiančiam vaikus su onkologinėmis ligomis ir jų šeimas.",cta:"Aukoti labdarai"},project:{title:"Paremti projektą",description:"Padėk padengti paties žygio išlaidas — maistą, nakvynę, palaikymo automobilį, įrangą.",cta:"Paremti žygį"},raised:"surinkta iš",goal:"tikslo"},auction:{title:"Labdaros aukcionas",subtitle:"Pasirašyti marškinėliai ir kita įranga iš sportininkų, prisijungusių prie tikslo. Visos lėšos keliauja Rugutei.",soon:"Aukcionas atsidarys arčiau starto. Daiktai ir sportininkai patvirtinami kas savaitę — užsuk netrukus.",notify:"Pranešk man, kai prasidės aukcionas",info:{title:"Kas parduodama aukcione?",description:"Profesionalūs sportininkai iš įvairių sporto šakų paaukojo savo pasirašytus daiktus šiam tikslui — futbolo marškinėliai, dviračių apranga, krepšinio įranga ir daugiau. Kiekvienas daiktas paremia labdaros fondą Rugutė. Daugiau informacijos netrukus."}},contact:{title:"Kontaktai ir rėmėjai",subtitle:"Nori paremti Tour de Baltics kaip rėmėjas, partneris ar žiniasklaida?",name:"Vardas ir pavardė",email:"El. paštas",message:"Papasakok apie savo susidomėjimą",send:"Siųsti žinutę",sponsorsTitle:"Projekto rėmėjai",sponsorsSoon:"Kas savaitę prisijungia daugiau partnerių.",mainSponsorsTitle:"Pagrindiniai rėmėjai",sent:"Ačiū — netrukus susisieksime."},footer:{tagline:"Labdaros ištvermės žygis fondui Rugutė.",follow:"Sek kelionę",rights:"Visos teisės saugomos."}};et.use(Ox).use(Oj).init({resources:{en:{translation:jI},lt:{translation:NI}},fallbackLng:"en",supportedLngs:["en","lt"],interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});cw(document.getElementById("root")).render(p.jsx(fI,{}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.