vendor: 4,137 bytes, lines 1-9
1var Th=e=>{throw TypeError(e)};var Kl=(e,t,n)=>t.has(e)||Th("Cannot "+n);var R=(e,t,n)=>(Kl(e,t,"read from private field"),n?n.call(e):t.get(e)),te=(e,t,n)=>t.has(e)?Th("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),G=(e,t,n,r)=>(Kl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),De=(e,t,n)=>(Kl(e,t,"access private method"),n);var ko=(e,t,n,r)=>({set _(s){G(e,t,s,n)},get _(){return R(e,t,r)}});function Ew(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 hm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fm={exports:{}},ol={},pm={exports:{}},Y={};/** 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"),kw=Symbol.for("react.portal"),Cw=Symbol.for("react.fragment"),Tw=Symbol.for("react.strict_mode"),Rw=Symbol.for("react.profiler"),Pw=Symbol.for("react.provider"),Nw=Symbol.for("react.context"),Aw=Symbol.for("react.forward_ref"),Ow=Symbol.for("react.suspense"),jw=Symbol.for("react.memo"),Iw=Symbol.for("react.lazy"),Rh=Symbol.iterator;function Lw(e){return e===null||typeof e!="object"?null:(e=Rh&&e[Rh]||e["@@iterator"],typeof e=="function"?e:null)}var mm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gm=Object.assign,vm={};function Bs(e,t,n){this.props=e,this.context=t,this.refs=vm,this.updater=n||mm}Bs.prototype.isReactComponent={};Bs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Bs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ym(){}ym.prototype=Bs.prototype;function rd(e,t,n){this.props=e,this.context=t,this.refs=vm,this.updater=n||mm}var sd=rd.prototype=new ym;sd.constructor=rd;gm(sd,Bs.prototype);sd.isPureReactComponent=!0;var Ph=Array.isArray,wm=Object.prototype.hasOwnProperty,id={current:null},bm={key:!0,ref:!0,__self:!0,__source:!0};function xm(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)wm.call(t,r)&&!bm.hasOwnProperty(r)&&(s[r]=t[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(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:ho,type:e,key:i,ref:o,props:s,_owner:id.current}}function $w(e,t){return{$$typeof:ho,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function od(e){return typeof e=="object"&&e!==null&&e.$$typeof===ho}function Dw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Nh=/\/+/g;function ql(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Dw(""+e.key):t.toString(36)}
vendor: 4,749 bytes, lines 9-17
9function sa(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ho:case kw:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+ql(o,0):r,Ph(s)?(n="",e!=null&&(n=e.replace(Nh,"$&/")+"/"),sa(s,t,n,"",function(u){return u})):s!=null&&(od(s)&&(s=$w(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Nh,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Ph(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+ql(i,a);o+=sa(i,t,n,l,s)}else if(l=Lw(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+ql(i,a++),o+=sa(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Co(e,t,n){if(e==null)return e;var r=[],s=0;return sa(e,r,"","",function(i){return t.call(n,i,s++)}),r}function Mw(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ge={current:null},ia={transition:null},Uw={ReactCurrentDispatcher:Ge,ReactCurrentBatchConfig:ia,ReactCurrentOwner:id};function _m(){throw Error("act(...) is not supported in production builds of React.")}Y.Children={map:Co,forEach:function(e,t,n){Co(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Co(e,function(){t++}),t},toArray:function(e){return Co(e,function(t){return t})||[]},only:function(e){if(!od(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=Bs;Y.Fragment=Cw;Y.Profiler=Rw;Y.PureComponent=rd;Y.StrictMode=Tw;Y.Suspense=Ow;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Uw;Y.act=_m;Y.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=gm({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=id.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)wm.call(t,l)&&!bm.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[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:e.type,key:s,ref:i,props:r,_owner:o}};Y.createContext=function(e){return e={$$typeof:Nw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Pw,_context:e},e.Consumer=e};Y.createElement=xm;Y.createFactory=function(e){var t=xm.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:Aw,render:e}};Y.isValidElement=od;Y.lazy=function(e){return{$$typeof:Iw,_payload:{_status:-1,_result:e},_init:Mw}};Y.memo=function(e,t){return{$$typeof:jw,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=ia.transition;ia.transition={};try{e()}finally{ia.transition=t}};Y.unstable_act=_m;Y.useCallback=function(e,t){return Ge.current.useCallback(e,t)};Y.useContext=function(e){return Ge.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return Ge.current.useDeferredValue(e)};Y.useEffect=function(e,t){return Ge.current.useEffect(e,t)};Y.useId=function(){return Ge.current.useId()};Y.useImperativeHandle=function(e,t,n){return Ge.current.useImperativeHandle(e,t,n)};Y.useInsertionEffect=function(e,t){return Ge.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return Ge.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return Ge.current.useMemo(e,t)};Y.useReducer=function(e,t,n){return Ge.current.useReducer(e,t,n)};Y.useRef=function(e){return Ge.current.useRef(e)};Y.useState=function(e){return Ge.current.useState(e)};Y.useSyncExternalStore=function(e,t,n){return Ge.current.useSyncExternalStore(e,t,n)};Y.useTransition=function(){return Ge.current.useTransition()};Y.version="18.3.1";pm.exports=Y;var b=pm.exports;const A=hm(b),Sm=Ew({__proto__:null,default:A},[b]);/** 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 Fw=b,Bw=Symbol.for("react.element"),zw=Symbol.for("react.fragment"),Ww=Object.prototype.hasOwnProperty,Hw=Fw.__SECRET_INT
vendor: 8,834 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Vw={key:!0,ref:!0,__self:!0,__source:!0};function Em(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Ww.call(t,r)&&!Vw.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Bw,type:e,key:i,ref:o,props:s,_owner:Hw.current}}ol.Fragment=zw;ol.jsx=Em;ol.jsxs=Em;fm.exports=ol;var p=fm.exports,km={exports:{}},pt={},Cm={exports:{}},Tm={};/** 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(e){function t(T,N){var F=T.length;T.push(N);e:for(;0<F;){var D=F-1>>>1,H=T[D];if(0<s(H,N))T[D]=N,T[F]=H,F=D;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var N=T[0],F=T.pop();if(F!==N){T[0]=F;e:for(var D=0,H=T.length,X=H>>>1;D<X;){var he=2*(D+1)-1,rt=T[he],ne=he+1,kt=T[ne];if(0>s(rt,F))ne<H&&0>s(kt,rt)?(T[D]=kt,T[ne]=F,D=ne):(T[D]=rt,T[he]=F,D=he);else if(ne<H&&0>s(kt,F))T[D]=kt,T[ne]=F,D=ne;else break e}}return N}function s(T,N){var F=T.sortIndex-N.sortIndex;return F!==0?F:T.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,c=null,h=3,f=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(T){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=T)r(u),N.sortIndex=N.expirationTime,t(l,N);else break;N=n(u)}}function _(T){if(y=!1,w(T),!v)if(n(l)!==null)v=!0,B(S);else{var N=n(u);N!==null&&Q(_,N.startTime-T)}}function S(T,N){v=!1,y&&(y=!1,g(C),C=-1),f=!0;var F=h;try{for(w(N),c=n(l);c!==null&&(!(c.expirationTime>N)||T&&!W());){var D=c.callback;if(typeof D=="function"){c.callback=null,h=c.priorityLevel;var H=D(c.expirationTime<=N);N=e.unstable_now(),typeof H=="function"?c.callback=H:c===n(l)&&r(l),w(N)}else r(l);c=n(l)}if(c!==null)var X=!0;else{var he=n(u);he!==null&&Q(_,he.startTime-N),X=!1}return X}finally{c=null,h=F,f=!1}}var k=!1,E=null,C=-1,O=5,j=-1;function W(){return!(e.unstable_now()-j<O)}function U(){if(E!==null){var T=e.unstable_now();j=T;var N=!0;try{N=E(!0,T)}finally{N?V():(k=!1,E=null)}}else k=!1}var V;if(typeof m=="function")V=function(){m(U)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,J=L.port2;L.port1.onmessage=U,V=function(){J.postMessage(null)}}else V=function(){x(U,0)};function B(T){E=T,k||(k=!0,V())}function Q(T,N){C=x(function(){T(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){v||f||(v=!0,B(S))},e.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"):O=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(T){switch(h){case 1:case 2:case 3:var N=3;break;default:N=h}var F=h;h=N;try{return T()}finally{h=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,N){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var F=h;h=T;try{return N()}finally{h=F}},e.unstable_scheduleCallback=function(T,N,F){var D=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?D+F:D):F=D,T){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=F+H,T={id:d++,callback:N,priorityLevel:T,startTime:F,expirationTime:H,sortIndex:-1},F>D?(T.sortIndex=F,t(u,T),n(l)===null&&T===n(u)&&(y?(g(C),C=-1):y=!0,Q(_,F-D))):(T.sortIndex=H,t(l,T),v||f||(v=!0,B(S))),T},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(T){var N=h;return function(){var F=h;h=N;try{return T.apply(this,arguments)}finally{h=F}}}})(Tm);Cm.exports=Tm;var Kw=Cm.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 qw=b,ht=Kw;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Rm=new Set,Ni={};function Mr(e,t){As(e,t),As(e+"Capture",t)}function As(e,t){for(Ni[e]=t,e=0;e<t.length;e++)Rm.add(t[e])}var wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lu=Object.prototype.hasOwnProperty,Gw=/^[: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]*$/,Ah={},Oh={};function Jw(e){return Lu.call(Oh,e)?!0:Lu.call(Ah,e)?!1:Gw.test(e)?Oh[e]=!0:(Ah[e]=!0,!1)}function Qw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Yw(e,t,n,r){if(t===null||typeof t>"u"||Qw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Je(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new Je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new Je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new Je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new Je(e,2,!1,e,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(e){Le[e]=new Je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new Je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new Je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new Je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new Je(e,5,!1,e.toLowerCase(),null,!1,!1)});var ad=/[\-:]([a-z])/g;function ld(e){return e[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
33-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(e){var t=e.replace(ad,ld);Le[t]=new Je(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ad,ld);Le[t]=new Je(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ad,ld);Le[t]=new Je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new Je(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new Je(e,1,!1,e.toLowerCase(),null,!0,!0)});function ud(e,t,n,r){var s=Le.hasOwnProperty(t)?Le[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Yw(t,n,s,r)&&(n=null),r||s===null?Jw(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var kn=qw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,To=Symbol.for("react.element"),Zr=Symbol.for("react.portal"),es=Symbol.for("react.fragment"),cd=Symbol.for("react.strict_mode"),$u=Symbol.for("react.profiler"),Pm=Symbol.for("react.provider"),Nm=Symbol.for("react.context"),dd=Symbol.for("react.forward_ref"),Du=Symbol.for("react.suspense"),Mu=Symbol.for("react.suspense_list"),hd=Symbol.for("react.memo"),Ln=Symbol.for("react.lazy"),Am=Symbol.for("react.offscreen"),jh=Symbol.iterator;function Xs(e){return e===null||typeof e!="object"?null:(e=jh&&e[jh]||e["@@iterator"],typeof e=="function"?e:null)}var me=Object.assign,Gl;function ui(e){if(Gl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Gl=t&&t[1]||""}return` 34`+Gl+e}var Jl=!1;function Ql(e,t){if(!e||Jl)return"";Jl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(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 e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Jl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ui(e):""}function Xw(e){switch(e.tag){case 5:return ui(e.type);case 16:return ui("Lazy");case 13:return ui("Suspense");case 19:return ui("SuspenseList");case 0:case 2:case 15:return e=Ql(e.type,!1),e;case 11:return e=Ql(e.type.render,!1),e;case 1:return e=Ql(e.type,!0),e;default:return""}}function Uu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case es:return"Fragment";case Zr:return"Portal";case $u:return"Profiler";case cd:return"StrictMode";case Du:return"Suspense";case Mu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Nm:return(e.displayName||"Context")+".Consumer";case Pm:return(e._context.displayName||"Context")+".Provider";case dd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hd:return t=e.displayName||null,t!==null?t:Uu(e.type)||"Memo";case Ln:t=e._payload,e=e._init;try{return Uu(e(t))}catch{}}return null}function Zw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Uu(t);case 8:return t===cd?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function sr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}
vendor: 13,270 bytes, line 37
37function Om(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eb(e){var t=Om(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ro(e){e._valueTracker||(e._valueTracker=eb(e))}function jm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Om(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function xa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fu(e,t){var n=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ih(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=sr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Im(e,t){t=t.checked,t!=null&&ud(e,"checked",t,!1)}function Bu(e,t){Im(e,t);var n=sr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zu(e,t.type,n):t.hasOwnProperty("defaultValue")&&zu(e,t.type,sr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function zu(e,t,n){(t!=="number"||xa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ci=Array.isArray;function hs(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+sr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Wu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $h(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(P(92));if(ci(n)){if(1<n.length)throw Error(P(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:sr(n)}}function Lm(e,t){var n=sr(t.value),r=sr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Dh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $m(e){switch(e){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 Hu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$m(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Po,Dm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Po=Po||document.createElement("div"),Po.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Po.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ai(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vi={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},tb=["Webkit","ms","Moz","O"];Object.keys(vi).forEach(function(e){tb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vi[t]=vi[e]})});function Mm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vi.hasOwnProperty(e)&&vi[e]?(""+t).trim():t+"px"}function Um(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Mm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var nb=me({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 Vu(e,t){if(t){if(nb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Ku(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qu=null;function fd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gu=null,fs=null,ps=null;function Mh(e){if(e=mo(e)){if(typeof Gu!="function")throw Error(P(280));var t=e.stateNode;t&&(t=dl(t),Gu(e.stateNode,e.type,t))}}function Fm(e){fs?ps?ps.push(e):ps=[e]:fs=e}function Bm(){if(fs){var e=fs,t=ps;if(ps=fs=null,Mh(e),t)for(e=0;e<t.length;e++)Mh(t[e])}}function zm(e,t){return e(t)}function Wm(){}var Yl=!1;function Hm(e,t,n){if(Yl)return e(t,n);Yl=!0;try{return zm(e,t,n)}finally{Yl=!1,(fs!==null||ps!==null)&&(Wm(),Bm())}}function Oi(e,t){var n=e.stateNode;if(n===null)return null;var r=dl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(P(231,t,typeof n));return n}var Ju=!1;if(wn)try{var Zs={};Object.defineProperty(Zs,"passive",{get:function(){Ju=!0}}),window.addEventListener("test",Zs,Zs),window.removeEventListener("test",Zs,Zs)}catch{Ju=!1}function rb(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var yi=!1,_a=null,Sa=!1,Qu=null,sb={onError:function(e){yi=!0,_a=e}};function ib(e,t,n,r,s,i,o,a,l){yi=!1,_a=null,rb.apply(sb,arguments)}function ob(e,t,n,r,s,i,o,a,l){if(ib.apply(this,arguments),yi){if(yi){var u=_a;yi=!1,_a=null}else throw Error(P(198));Sa||(Sa=!0,Qu=u)}}function Ur(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Vm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Uh(e){if(Ur(e)!==e)throw Error(P(188))}function ab(e){var t=e.alternate;if(!t){if(t=Ur(e),t===null)throw Error(P(188));return t!==e?null:e}for(var n=e,r=t;;){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 Uh(s),e;if(i===r)return Uh(s),t;i=i.sibling}throw Error(P(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(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function Km(e){return e=ab(e),e!==null?qm(e):null}function qm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=qm(e);if(t!==null)return t;e=e.sibling}return null}var Gm=ht.unstable_scheduleCallback,Fh=ht.unstable_cancelCallback,lb=ht.unstable_shouldYield,ub=ht.unstable_requestPaint,be=ht.unstable_now,cb=ht.unstable_getCurrentPriorityLevel,pd=ht.unstable_ImmediatePriority,Jm=ht.unstable_UserBlockingPriority,Ea=ht.unstable_NormalPriority,db=ht.unstable_LowPriority,Qm=ht.unstable_IdlePriority,al=null,Zt=null;function hb(e){if(Zt&&typeof Zt.onCommitFiberRoot=="function")try{Zt.onCommitFiberRoot(al,e,void 0,(e.current.flags&128)===128)}catch{}}var $t=Math.clz32?Math.clz32:mb,fb=Math.log,pb=Math.LN2;function mb(e){return e>>>=0,e===0?32:31-(fb(e)/pb|0)|0}var No=64,Ao=4194304;function di(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ka(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=di(a):(i&=o,i!==0&&(r=di(i)))}else o=n&~s,o!==0?r=di(o):i!==0&&(r=di(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-$t(t),s=1<<n,r|=e[n],t&=~s;return r}function gb(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 vb(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-$t(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=gb(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Yu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ym(){var e=No;return No<<=1,!(No&4194240)&&(No=64),e}function Xl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function fo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$t(t),e[t]=n}function yb(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-$t(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function md(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$t(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var re=0;function Xm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Zm,gd,eg,tg,ng,Xu=!1,Oo=[],Jn=null,Qn=null,Yn=null,ji=new Map,Ii=new Map,Dn=[],wb="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 Bh(e,t){switch(e){case"focusin":case"focusout":Jn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":ji.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ii.delete(t.pointerId)}}function ei(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=mo(t),t!==null&&gd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function bb(e,t,n,r,s){switch(t){case"focusin":return Jn=ei(Jn,e,t,n,r,s),!0;
vendor: 10,354 bytes, line 37
37case"dragenter":return Qn=ei(Qn,e,t,n,r,s),!0;case"mouseover":return Yn=ei(Yn,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ji.set(i,ei(ji.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Ii.set(i,ei(Ii.get(i)||null,e,t,n,r,s)),!0}return!1}function rg(e){var t=wr(e.target);if(t!==null){var n=Ur(t);if(n!==null){if(t=n.tag,t===13){if(t=Vm(n),t!==null){e.blockedOn=t,ng(e.priority,function(){eg(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function oa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qu=r,n.target.dispatchEvent(r),qu=null}else return t=mo(n),t!==null&&gd(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){oa(e)&&n.delete(t)}function xb(){Xu=!1,Jn!==null&&oa(Jn)&&(Jn=null),Qn!==null&&oa(Qn)&&(Qn=null),Yn!==null&&oa(Yn)&&(Yn=null),ji.forEach(zh),Ii.forEach(zh)}function ti(e,t){e.blockedOn===t&&(e.blockedOn=null,Xu||(Xu=!0,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,xb)))}function Li(e){function t(s){return ti(s,e)}if(0<Oo.length){ti(Oo[0],e);for(var n=1;n<Oo.length;n++){var r=Oo[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jn!==null&&ti(Jn,e),Qn!==null&&ti(Qn,e),Yn!==null&&ti(Yn,e),ji.forEach(t),Ii.forEach(t),n=0;n<Dn.length;n++)r=Dn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Dn.length&&(n=Dn[0],n.blockedOn===null);)rg(n),n.blockedOn===null&&Dn.shift()}var ms=kn.ReactCurrentBatchConfig,Ca=!0;function _b(e,t,n,r){var s=re,i=ms.transition;ms.transition=null;try{re=1,vd(e,t,n,r)}finally{re=s,ms.transition=i}}function Sb(e,t,n,r){var s=re,i=ms.transition;ms.transition=null;try{re=4,vd(e,t,n,r)}finally{re=s,ms.transition=i}}function vd(e,t,n,r){if(Ca){var s=Zu(e,t,n,r);if(s===null)lu(e,t,r,Ta,n),Bh(e,r);else if(bb(s,e,t,n,r))r.stopPropagation();else if(Bh(e,r),t&4&&-1<wb.indexOf(e)){for(;s!==null;){var i=mo(s);if(i!==null&&Zm(i),i=Zu(e,t,n,r),i===null&&lu(e,t,r,Ta,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else lu(e,t,r,null,n)}}var Ta=null;function Zu(e,t,n,r){if(Ta=null,e=fd(r),e=wr(e),e!==null)if(t=Ur(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Vm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ta=e,null}function sg(e){switch(e){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(cb()){case pd:return 1;case Jm:return 4;case Ea:case db:return 16;case Qm:return 536870912;default:return 16}default:return 16}}var Kn=null,yd=null,aa=null;function ig(){if(aa)return aa;var e,t=yd,n=t.length,r,s="value"in Kn?Kn.value:Kn.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return aa=s.slice(e,1<r?1-r:void 0)}function la(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function jo(){return!0}function Wh(){return!1}function mt(e){function t(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 e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?jo:Wh,this.isPropagationStopped=Wh,this}return me(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=jo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=jo)},persist:function(){},isPersistent:jo}),t}var zs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wd=mt(zs),po=me({},zs,{view:0,detail:0}),Eb=mt(po),Zl,eu,ni,ll=me({},po,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ni&&(ni&&e.type==="mousemove"?(Zl=e.screenX-ni.screenX,eu=e.screenY-ni.screenY):eu=Zl=0,ni=e),Zl)},movementY:function(e){return"movementY"in e?e.movementY:eu}}),Hh=mt(ll),kb=me({},ll,{dataTransfer:0}),Cb=mt(kb),Tb=me({},po,{relatedTarget:0}),tu=mt(Tb),Rb=me({},zs,{animationName:0,elapsedTime:0,pseudoElement:0}),Pb=mt(Rb),Nb=me({},zs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ab=mt(Nb),Ob=me({},zs,{data:0}),Vh=mt(Ob),jb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ib={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"},Lb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $b(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Lb[e])?!!t[e]:!1}function bd(){return $b}var Db=me({},po,{key:function(e){if(e.key){var t=jb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=la(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ib[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bd,charCode:function(e){return e.type==="keypress"?la(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?la(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mb=mt(Db),Ub=me({},ll,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kh=mt(Ub),Fb=me({},po,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bd}),Bb=mt(Fb),zb=me({},zs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wb=mt(zb),Hb=me({},ll,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Vb=mt(Hb),Kb=[9,13,27,32],xd=wn&&"CompositionEvent"in window,wi=null;wn&&"documentMode"in document&&(wi=document.documentMode);var qb=wn&&"TextEvent"in window&&!wi,og=wn&&(!xd||wi&&8<wi&&11>=wi),qh=" ",Gh=!1;function ag(e,t){switch(e){case"keyup":return Kb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ts=!1;function Gb(e,t){switch(e){case"compositionend":return lg(t);case"keypress":return t.which!==32?null:(Gh=!0,qh);case"textInput":return e=t.data,e===qh&&Gh?null:e;default:return null}}function Jb(e,t){if(ts)return e==="compositionend"||!xd&&ag(e,t)?(e=ig(),aa=yd=Kn=null,ts=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return og&&t.locale!=="ko"?null:t.data;default:return null}}var Qb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Jh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qb[e.type]:t==="textarea"}function ug(e,t,n,r){Fm(r),t=Ra(t,"onChange"),0<t.length&&(n=new wd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var bi=null,$i=null;function Yb(e){bg(e,0)}function ul(e){var t=ss(e);if(jm(t))return e}function Xb(e,t){if(e==="change")return t}var cg=!1;if(wn){var nu;if(wn){var ru="oninput"in document;if(!ru){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),ru=typeof Qh.oninput=="function"}nu=ru}else nu=!1;cg=nu&&(!document.documentMode||9<document.documentMode)}function Yh(){bi&&(bi.detachEvent("onpropertychange",dg),$i=bi=null)}function dg(e){if(e.propertyName==="value"&&ul($i)){var t=[];ug(t,$i,e,fd(e)),Hm(Yb,t)}}function Zb(e,t,n){e==="focusin"?(Yh(),bi=t,$i=n,bi.attachEvent("onpropertychange",dg)):e==="focusout"&&Yh()}function ex(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ul($i)}function tx(e,t){if(e==="click")return ul(t)}function nx(e,t){if(e==="input"||e==="change")return ul(t)}function rx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:rx;function Di(e,t){if(Mt(e,t))return!0;
vendor: 4,808 bytes, line 37
37if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Lu.call(t,s)||!Mt(e[s],t[s]))return!1}return!0}function Xh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zh(e,t){var n=Xh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xh(n)}}function hg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fg(){for(var e=window,t=xa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xa(e.document)}return t}function _d(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function sx(e){var t=fg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hg(n.ownerDocument.documentElement,n)){if(r!==null&&_d(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Zh(n,i);var o=Zh(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ix=wn&&"documentMode"in document&&11>=document.documentMode,ns=null,ec=null,xi=null,tc=!1;function ef(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tc||ns==null||ns!==xa(r)||(r=ns,"selectionStart"in r&&_d(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xi&&Di(xi,r)||(xi=r,r=Ra(ec,"onSelect"),0<r.length&&(t=new wd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ns)))}function Io(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var rs={animationend:Io("Animation","AnimationEnd"),animationiteration:Io("Animation","AnimationIteration"),animationstart:Io("Animation","AnimationStart"),transitionend:Io("Transition","TransitionEnd")},su={},pg={};wn&&(pg=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function cl(e){if(su[e])return su[e];if(!rs[e])return e;var t=rs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in pg)return su[e]=t[n];return e}var mg=cl("animationend"),gg=cl("animationiteration"),vg=cl("animationstart"),yg=cl("transitionend"),wg=new Map,tf="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 cr(e,t){wg.set(e,t),Mr(t,[e])}for(var iu=0;iu<tf.length;iu++){var ou=tf[iu],ox=ou.toLowerCase(),ax=ou[0].toUpperCase()+ou.slice(1);cr(ox,"on"+ax)}cr(mg,"onAnimationEnd");cr(gg,"onAnimationIteration");cr(vg,"onAnimationStart");cr("dblclick","onDoubleClick");cr("focusin","onFocus");cr("focusout","onBlur");cr(yg,"onTransitionEnd");As("onMouseEnter",["mouseout","mouseover"]);As("onMouseLeave",["mouseout","mouseover"]);As("onPointerEnter",["pointerout","pointerover"]);As("onPointerLeave",["pointerout","pointerover"]);Mr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,227 bytes, line 37
37Mr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Mr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Mr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Mr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Mr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="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(" "),lx=new Set("cancel close invalid load scroll toggle".split(" ").concat(hi));function nf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ob(r,t,void 0,e),e.currentTarget=null}function bg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)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;nf(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;nf(s,a,u),i=l}}}if(Sa)throw e=Qu,Sa=!1,Qu=null,e}function ue(e,t){var n=t[oc];n===void 0&&(n=t[oc]=new Set);var r=e+"__bubble";n.has(r)||(xg(t,e,2,!1),n.add(r))}function au(e,t,n){var r=0;t&&(r|=4),xg(n,e,r,t)}var Lo="_reactListening"+Math.random().toString(36).slice(2);function Mi(e){if(!e[Lo]){e[Lo]=!0,Rm.forEach(function(n){n!=="selectionchange"&&(lx.has(n)||au(n,!1,e),au(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Lo]||(t[Lo]=!0,au("selectionchange",!1,t))}}function xg(e,t,n,r){switch(sg(t)){case 1:var s=_b;break;case 4:s=Sb;break;default:s=vd}n=s.bind(null,t,n,e),s=void 0,!Ju||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function lu(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(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=wr(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Hm(function(){var u=i,d=fd(n),c=[];e:{var h=wg.get(e);if(h!==void 0){var f=wd,v=e;switch(e){case"keypress":if(la(n)===0)break e;case"keydown":case"keyup":f=Mb;break;case"focusin":v="focus",f=tu;break;case"focusout":v="blur",f=tu;break;case"beforeblur":case"afterblur":f=tu;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":f=Hh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Cb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Bb;break;case mg:case gg:case vg:f=Pb;break;case yg:f=Wb;break;case"scroll":f=Eb;break;case"wheel":f=Vb;break;case"copy":case"cut":case"paste":f=Ab;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Kh}var y=(t&4)!==0,x=!y&&e==="scroll",g=y?h!==null?h+"Capture":null:h;y=[];for(var m=u,w;m!==null;){w=m;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,g!==null&&(_=Oi(m,g),_!=null&&y.push(Ui(m,_,w)))),x)break;m=m.return}0<y.length&&(h=new f(h,v,null,n,d),c.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",h&&n!==qu&&(v=n.relatedTarget||n.fromElement)&&(wr(v)||v[bn]))break e;if((f||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,f?(v=n.relatedTarget||n.toElement,f=u,v=v?wr(v):null,v!==null&&(x=Ur(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(f=null,v=u),f!==v)){if(y=Hh,_="onMouseLeave",g="onMouseEnter",m="mou
37se",(e==="pointerout"||e==="pointerover")&&(y=Kh,_="onPointerLeave",g="onPointerEnter",m="pointer"),x=f==null?h:ss(f),w=v==null?h:ss(v),h=new y(_,m+"leave",f,n,d),h.target=x,h.relatedTarget=w,_=null,wr(d)===u&&(y=new y(g,m+"enter",v,n,d),y.target=w,y.relatedTarget=x,_=y),x=_,f&&v)t:{for(y=f,g=v,m=0,w=y;w;w=Kr(w))m++;for(w=0,_=g;_;_=Kr(_))w++;for(;0<m-w;)y=Kr(y),m--;for(;0<w-m;)g=Kr(g),w--;for(;m--;){if(y===g||g!==null&&y===g.alternate)break t;y=Kr(y),g=Kr(g)}y=null}else y=null;f!==null&&rf(c,h,f,y,!1),v!==null&&x!==null&&rf(c,x,v,y,!0)}}e:{if(h=u?ss(u):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var S=Xb;else if(Jh(h))if(cg)S=nx;else{S=ex;var k=Zb}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=tx);if(S&&(S=S(e,u))){ug(c,S,n,d);break e}k&&k(e,h,u),e==="focusout"&&(k=h._wrapperState)&&k.controlled&&h.type==="number"&&zu(h,"number",h.value)}switch(k=u?ss(u):window,e){case"focusin":(Jh(k)||k.contentEditable==="true")&&(ns=k,ec=u,xi=null);break;case"focusout":xi=ec=ns=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,ef(c,n,d);break;case"selectionchange":if(ix)break;case"keydown":case"keyup":ef(c,n,d)}var E;if(xd)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else ts?ag(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(og&&n.locale!=="ko"&&(ts||C!=="onCompositionStart"?C==="onCompositionEnd"&&ts&&(E=ig()):(Kn=d,yd="value"in Kn?Kn.value:Kn.textContent,ts=!0)),k=Ra(u,C),0<k.length&&(C=new Vh(C,e,null,n,d),c.push({event:C,listeners:k}),E?C.data=E:(E=lg(n),E!==null&&(C.data=E)))),(E=qb?Gb(e,n):Jb(e,n))&&(u=Ra(u,"onBeforeInput"),0<u.length&&(d=new Vh("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=E))}bg(c,t)})}function Ui(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ra(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Oi(e,n),i!=null&&r.unshift(Ui(e,i,s)),i=Oi(e,t),i!=null&&r.push(Ui(e,i,s))),e=e.return}return r}function Kr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rf(e,t,n,r,s){for(var i=t._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=Oi(n,i),l!=null&&o.unshift(Ui(n,l,a))):s||(l=Oi(n,i),l!=null&&o.push(Ui(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ux=/\r\n?/g,cx=/\u0000|\uFFFD/g;function sf(e){return(typeof e=="string"?e:""+e).replace(ux,` 38`).replace(cx,"")}function $o(e,t,n){if(t=sf(t),sf(e)!==t&&n)throw Error(P(425))}function Pa(){}var nc=null,rc=null;function sc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ic=typeof setTimeout=="function"?setTimeout:void 0,dx=typeof clearTimeout=="function"?clearTimeout:void 0,of=typeof Promise=="function"?Promise:void 0,hx=typeof queueMicrotask=="function"?queueMicrotask:typeof of<"u"?function(e){return of.resolve(null).then(e).catch(fx)}:ic;function fx(e){setTimeout(function(){throw e})}function uu(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Li(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Li(t)}function Xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function af(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ws=Math.random().toString(36).slice(2),Qt="__reactFiber$"+Ws,Fi="__reactProps$"+Ws,bn="__reactContainer$"+Ws,oc="__reactEvents$"+Ws,px="__reactListeners$"+Ws,mx="__reactHandles$"+Ws;function wr(e){var t=e[Qt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[bn]||n[Qt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=af(e);e!==null;){if(n=e[Qt])return n;e=af(e)}return t}e=n,n=e.parentNode}return null}function mo(e){return e=e[Qt]||e[bn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function dl(e){return e[Fi]||null}var ac=[],is=-1;function dr(e){return{current:e}}function ce(e){0>is||(e.current=ac[is],ac[is]=null,is--)}function oe(e,t){is++,ac[is]=e.current,e.current=t}var ir={},We=dr(ir),et=dr(!1),Or=ir;function Os(e,t){var n=e.type.contextTypes;if(!n)return ir;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function tt(e){return e=e.childContextTypes,e!=null}function Na(){ce(et),ce(We)}function lf(e,t,n){if(We.current!==ir)throw Error(P(168));oe(We,t),oe(et,n)}function _g(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(P(108,Zw(e)||"Unknown",s));return me({},n,r)}function Aa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ir,Or=We.current,oe(We,e),oe(et,et.current),!0}function uf(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=_g(e,t,Or),r.__reactInternalMemoizedMergedChildContext=e,ce(et),ce(We),oe(We,e)):ce(et),oe(et,n)}var fn=null,hl=!1,cu=!1;function Sg(e){fn===null?fn=[e]:fn.push(e)}function gx(e){hl=!0,Sg(e)}function hr(){if(!cu&&fn!==null){cu=!0;var e=0,t=re;try{var n=fn;for(re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}fn=null,hl=!1}catch(s){throw fn!==null&&(fn=fn.slice(e+1)),Gm(pd,hr),s}finally{re=t,cu=!1}}return null}var os=[],as=0,Oa=null,ja=0,yt=[],wt=0,jr=null,gn=1,vn="";function mr(e,t){os[as++]=ja,os[as++]=Oa,Oa=e,ja=t}function Eg(e,t,n){yt[wt++]=gn,yt[wt++]=vn,yt[wt++]=jr,jr=e;var r=gn;e=vn;var s=32-$t(r)-1;r&=~(1<<s),n+=1;var i=32-$t(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,gn=1<<32-$t(t)+s|n<<s|r,vn=i+e}else gn=1<<i|n<<s|r,vn=e}function Sd(e){e.return!==null&&(mr(e,1),Eg(e,1,0))}function Ed(e){for(;e===Oa;)Oa=os[--as],os[as]=null,ja=os[--as],os[as]=null;for(;e===jr;
vendor: 12,613 bytes, line 38
38)jr=yt[--wt],yt[wt]=null,vn=yt[--wt],yt[wt]=null,gn=yt[--wt],yt[wt]=null}var ct=null,ut=null,de=!1,It=null;function kg(e,t){var n=xt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function cf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ct=e,ut=Xn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ct=e,ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=jr!==null?{id:gn,overflow:vn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ct=e,ut=null,!0):!1;default:return!1}}function lc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function uc(e){if(de){var t=ut;if(t){var n=t;if(!cf(e,t)){if(lc(e))throw Error(P(418));t=Xn(n.nextSibling);var r=ct;t&&cf(e,t)?kg(r,n):(e.flags=e.flags&-4097|2,de=!1,ct=e)}}else{if(lc(e))throw Error(P(418));e.flags=e.flags&-4097|2,de=!1,ct=e}}}function df(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ct=e}function Do(e){if(e!==ct)return!1;if(!de)return df(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!sc(e.type,e.memoizedProps)),t&&(t=ut)){if(lc(e))throw Cg(),Error(P(418));for(;t;)kg(e,t),t=Xn(t.nextSibling)}if(df(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ut=Xn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ut=null}}else ut=ct?Xn(e.stateNode.nextSibling):null;return!0}function Cg(){for(var e=ut;e;)e=Xn(e.nextSibling)}function js(){ut=ct=null,de=!1}function kd(e){It===null?It=[e]:It.push(e)}var vx=kn.ReactCurrentBatchConfig;function ri(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(P(309));var r=n.stateNode}if(!r)throw Error(P(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,e))}return e}function Mo(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function hf(e){var t=e._init;return t(e._payload)}function Tg(e){function t(g,m){if(e){var w=g.deletions;w===null?(g.deletions=[m],g.flags|=16):w.push(m)}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function s(g,m){return g=nr(g,m),g.index=0,g.sibling=null,g}function i(g,m,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<m?(g.flags|=2,m):w):(g.flags|=2,m)):(g.flags|=1048576,m)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,m,w,_){return m===null||m.tag!==6?(m=vu(w,g.mode,_),m.return=g,m):(m=s(m,w),m.return=g,m)}function l(g,m,w,_){var S=w.type;return S===es?d(g,m,w.props.children,_,w.key):m!==null&&(m.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ln&&hf(S)===m.type)?(_=s(m,w.props),_.ref=ri(g,m,w),_.return=g,_):(_=ma(w.type,w.key,w.props,null,g.mode,_),_.ref=ri(g,m,w),_.return=g,_)}function u(g,m,w,_){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=yu(w,g.mode,_),m.return=g,m):(m=s(m,w.children||[]),m.return=g,m)}function d(g,m,w,_,S){return m===null||m.tag!==7?(m=Nr(w,g.mode,_,S),m.return=g,m):(m=s(m,w),m.return=g,m)}function c(g,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=vu(""+m,g.mode,w),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case To:return w=ma(m.type,m.key,m.props,null,g.mode,w),w.ref=ri(g,null,m),w.return=g,w;case Zr:return m=yu(m,g.mode,w),m.return=g,m;case Ln:var _=m._init;return c(g,_(m._payload),w)}if(ci(m)||Xs(m))return m=Nr(m,g.mode,w,null),m.return=g,m;Mo(g,m)}return null}function h(g,m,w,_){var S=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(g,m,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case To:return w.key===S?l(g,m,w,_):null;case Zr:return w.key===S?u(g,m,w,_):null;case Ln:return S=w._init,h(g,m,S(w._payload),_)}if(ci(w)||Xs(w))return S!==null?null:d(g,m,w,_,null);Mo(g,w)}return null}function f(g,m,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return g=g.get(w)||null,a(m,g,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case To:return g=g.get(_.key===null?w:_.key)||null,l(m,g,_,S);case Zr:return g=g.get(_.key===null?w:_.key)||null,u(m,g,_,S);case Ln:var k=_._init;return f(g,m,w,k(_._payload),S)}if(ci(_)||Xs(_))return g=g.get(w)||null,d(m,g,_,S,null);Mo(m,_)}return null}function v(g,m,w,_){for(var S=null,k=null,E=m,C=m=0,O=null;E!==null&&C<w.length;C++){E.index>C?(O=E,E=null):O=E.sibling;var j=h(g,E,w[C],_);if(j===null){E===null&&(E=O);break}e&&E&&j.alternate===null&&t(g,E),m=i(j,m,C),k===null?S=j:k.sibling=j,k=j,E=O}if(C===w.length)return n(g,E),de&&mr(g,C),S;if(E===null){for(;C<w.length;C++)E=c(g,w[C],_),E!==null&&(m=i(E,m,C),k===null?S=E:k.sibling=E,k=E);return de&&mr(g,C),S}for(E=r(g,E);C<w.length;C++)O=f(E,g,C,w[C],_),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?C:O.key),m=i(O,m,C),k===null?S=O:k.sibling=O,k=O);return e&&E.forEach(function(W){return t(g,W)}),de&&mr(g,C),S}function y(g,m,w,_){var S=Xs(w);if(typeof S!="function")throw Error(P(150));if(w=S.call(w),w==null)throw Error(P(151));for(var k=S=null,E=m,C=m=0,O=null,j=w.next();E!==null&&!j.done;C++,j=w.next()){E.index>C?(O=E,E=null):O=E.sibling;var W=h(g,E,j.value,_);if(W===null){E===null&&(E=O);break}e&&E&&W.alternate===null&&t(g,E),m=i(W,m,C),k===null?S=W:k.sibling=W,k=W,E=O}if(j.done)return n(g,E),de&&mr(g,C),S;if(E===null){for(;!j.done;C++,j=w.next())j=c(g,j.value,_),j!==null&&(m=i(j,m,C),k===null?S=j:k.sibling=j,k=j);return de&&mr(g,C),S}for(E=r(g,E);!j.done;C++,j=w.next())j=f(E,g,C,j.value,_),j!==null&&(e&&j.alternate!==null&&E.delete(j.key===null?C:j.key),m=i(j,m,C),k===null?S=j:k.sibling=j,k=j);return e&&E.forEach(function(U){return t(g,U)}),de&&mr(g,C),S}function x(g,m,w,_){if(typeof w=="object"&&w!==null&&w.type===es&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case To:e:{for(var S=w.key,k=m;k!==null;){if(k.key===S){if(S=w.type,S===es){if(k.tag===7){n(g,k.sibling),m=s(k,w.props.children),m.return=g,g=m;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ln&&hf(S)===k.type){n(g,k.sibling),m=s(k,w.props),m.ref=ri(g,k,w),m.return=g,g=m;break e}n(g,k);break}else t(g,k);k=k.sibling}w.type===es?(m=Nr(w.props.children,g.mode,_,w.key),m.return=g,g=m):(_=ma(w.type,w.key,w.props,null,g.mode,_),_.ref=ri(g,m,w),_.return=g,g=_)}return o(g);case Zr:e:{for(k=w.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(g,m.sibling),m=s(m,w.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=yu(w,g.mode,_),m.return=g,g=m}return o(g);case Ln:return k=w._init,x(g,m,k(w._payload),_)}if(ci(w))return v(g,m,w,_);if(Xs(w))return y(g,m,w,_);Mo(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(g,m.sibling),m=s(m,w),m.return=g,g=m):(n(g,m),m=vu(w,g.mode,_),m.return=g,g=m),o(g)):n(g,m)}return x}var Is=Tg(!0),Rg=Tg(!1),Ia=dr(null),La=null,ls=null,Cd=null;function Td(){Cd=ls=La=null}function Rd(e){var t=Ia.current;ce(Ia),e._currentValue=t}function cc(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gs(e,t){La=e,Cd=ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ze=!0),e.firstContext=null)}function St(e){var t=e._currentValue;if(Cd!==e)if(e={context:e,memoizedValue:t,next:null},ls===null){if(La===null)throw Error(P(308));ls=e,La.dependencies={lanes:0,firstContext:e}}else ls=ls.next=e;return t}var br=null;function Pd(e){br===null?br=[e]:br.push(e)}function Pg(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Pd(t)):(n.next=s.next,s.next=n),t.interleaved=n,xn(e,r)}function xn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $n=!1;function Nd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ng(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Z&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,xn(e,n)}return s=r.interleaved,s===null?(t.next=t,Pd(r)):(t.next=s.next,s.next=t),r.interleaved=t,xn(e,n)}function ua(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,md(e,n)}}function ff(e,t){var n=e.updateQueue,r=e.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=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $a(e,t,n,r){var s=e.updateQueue;$n=!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=e.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 h=a.lane,f=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,y=a;switch(h=t,f=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){c=v.call(f,c,h);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,h=typeof v=="function"?v.call(f,c,h):v,h==null)break e;c=me({},c,h);break e;case 2:$n=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=f,l=c):d=d.next=f,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(l=c),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Lr|=o,e.lanes=o,e.memoizedState=c}}function pf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(P(191,s));s.call(r)}}}var go={},en=dr(go),Bi=dr(go),zi=dr(go);function xr(e){if(e===go)throw Error(P(174));return e}function Ad(e,t){switch(oe(zi,t),oe(Bi,e),oe(en,go),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Hu(t,e)}ce(en),oe(en,t)}function Ls(){ce(en),ce(Bi),ce(zi)}function Ag(e){xr(zi.current);var t=xr(en.current),n=Hu(t,e.type);t!==n&&(oe(Bi,e),oe(en,n))}function Od(e){Bi.current===e&&(ce(en),ce(Bi))}var fe=dr(0);function Da(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var du=[];
vendor: 5,393 bytes, line 38
38function jd(){for(var e=0;e<du.length;e++)du[e]._workInProgressVersionPrimary=null;du.length=0}var ca=kn.ReactCurrentDispatcher,hu=kn.ReactCurrentBatchConfig,Ir=0,pe=null,Ee=null,Re=null,Ma=!1,_i=!1,Wi=0,yx=0;function Me(){throw Error(P(321))}function Id(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mt(e[n],t[n]))return!1;return!0}function Ld(e,t,n,r,s,i){if(Ir=i,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ca.current=e===null||e.memoizedState===null?_x:Sx,e=n(r,s),_i){i=0;do{if(_i=!1,Wi=0,25<=i)throw Error(P(301));i+=1,Re=Ee=null,t.updateQueue=null,ca.current=Ex,e=n(r,s)}while(_i)}if(ca.current=Ua,t=Ee!==null&&Ee.next!==null,Ir=0,Re=Ee=pe=null,Ma=!1,t)throw Error(P(300));return e}function $d(){var e=Wi!==0;return Wi=0,e}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Re===null?pe.memoizedState=Re=e:Re=Re.next=e,Re}function Et(){if(Ee===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=Re===null?pe.memoizedState:Re.next;if(t!==null)Re=t,Ee=e;else{if(e===null)throw Error(P(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Re===null?pe.memoizedState=Re=e:Re=Re.next=e}return Re}function Hi(e,t){return typeof t=="function"?t(e):t}function fu(e){var t=Et(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=Ee,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((Ir&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:e(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,pe.lanes|=d,Lr|=d}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Mt(r,t.memoizedState)||(Ze=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,pe.lanes|=i,Lr|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pu(e){var t=Et(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Mt(i,t.memoizedState)||(Ze=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Og(){}function jg(e,t){var n=pe,r=Et(),s=t(),i=!Mt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ze=!0),r=r.queue,Dd($g.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Re!==null&&Re.memoizedState.tag&1){if(n.flags|=2048,Vi(9,Lg.bind(null,n,r,s,t),void 0,null),Pe===null)throw Error(P(349));Ir&30||Ig(n,t,s)}return s}function Ig(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lg(e,t,n,r){t.value=n,t.getSnapshot=r,Dg(t)&&Mg(e)}function $g(e,t,n){return n(function(){Dg(t)&&Mg(e)})}function Dg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mt(e,n)}catch{return!0}}function Mg(e){var t=xn(e,1);t!==null&&Dt(t,e,1,-1)}function mf(e){var t=Ht();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:e},t.queue=e,e=e.dispatch=xx.bind(null,pe,e),[t.memoizedState,e]}function Vi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Ug(){return Et().memoizedState}function da(e,t,n,r){var s=Ht();pe.flags|=e,s.memoizedState=Vi(1|t,n,void 0,r===void 0?null:r)}function fl(e,t,n,r){var s=Et();r=r===void 0?null:r;var i=void 0;if(Ee!==null){var o=Ee.memoizedState;if(i=o.destroy,r!==null&&Id(r,o.deps)){s.memoizedState=Vi(t,n,i,r);return}}pe.flags|=e,s.memoizedState=Vi(1|t,n,i,r)}function gf(e,t){return da(8390656,8,e,t)}function Dd(e,t){return fl(2048,8,e,t)}function Fg(e,t){return fl(4,2,e,t)}function Bg(e,t){return fl(4,4,e,t)}function zg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wg(e,t,n){return n=n!=null?n.concat([e]):null,fl(4,4,zg.bind(null,t,e),n)}function Md(){}function Hg(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Id(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Vg(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Id(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Kg(e,t,n){return Ir&21?(Mt(n,t)||(n=Ym(),pe.lanes|=n,Lr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ze=!0),e.memoizedState=n)}function wx(e,t){var n=re;re=n!==0&&4>n?n:4,e(!0);var r=hu.transition;hu.transition={};try{e(!1),t()}finally{re=n,hu.transition=r}}function qg(){return Et().memoizedState}function bx(e,t,n){var r=tr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Gg(e))Jg(t,n);else if(n=Pg(e,t,n,r),n!==null){var s=qe();Dt(n,e,r,s),Qg(n,t,r)}}
vendor: 7,258 bytes, lines 38-40
38function xx(e,t,n){var r=tr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gg(e))Jg(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Mt(a,o)){var l=t.interleaved;l===null?(s.next=s,Pd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Pg(e,t,s,r),n!==null&&(s=qe(),Dt(n,e,r,s),Qg(n,t,r))}}function Gg(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Jg(e,t){_i=Ma=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,md(e,n)}}var Ua={readContext:St,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useInsertionEffect:Me,useLayoutEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useMutableSource:Me,useSyncExternalStore:Me,useId:Me,unstable_isNewReconciler:!1},_x={readContext:St,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:gf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,da(4194308,4,zg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return da(4194308,4,e,t)},useInsertionEffect:function(e,t){return da(4,2,e,t)},useMemo:function(e,t){var n=Ht();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ht();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bx.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:mf,useDebugValue:Md,useDeferredValue:function(e){return Ht().memoizedState=e},useTransition:function(){var e=mf(!1),t=e[0];return e=wx.bind(null,e[1]),Ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,s=Ht();if(de){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),Pe===null)throw Error(P(349));Ir&30||Ig(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,gf($g.bind(null,r,i,e),[e]),r.flags|=2048,Vi(9,Lg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ht(),t=Pe.identifierPrefix;if(de){var n=vn,r=gn;n=(r&~(1<<32-$t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=yx++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Sx={readContext:St,useCallback:Hg,useContext:St,useEffect:Dd,useImperativeHandle:Wg,useInsertionEffect:Fg,useLayoutEffect:Bg,useMemo:Vg,useReducer:fu,useRef:Ug,useState:function(){return fu(Hi)},useDebugValue:Md,useDeferredValue:function(e){var t=Et();return Kg(t,Ee.memoizedState,e)},useTransition:function(){var e=fu(Hi)[0],t=Et().memoizedState;return[e,t]},useMutableSource:Og,useSyncExternalStore:jg,useId:qg,unstable_isNewReconciler:!1},Ex={readContext:St,useCallback:Hg,useContext:St,useEffect:Dd,useImperativeHandle:Wg,useInsertionEffect:Fg,useLayoutEffect:Bg,useMemo:Vg,useReducer:pu,useRef:Ug,useState:function(){return pu(Hi)},useDebugValue:Md,useDeferredValue:function(e){var t=Et();return Ee===null?t.memoizedState=e:Kg(t,Ee.memoizedState,e)},useTransition:function(){var e=pu(Hi)[0],t=Et().memoizedState;return[e,t]},useMutableSource:Og,useSyncExternalStore:jg,useId:qg,unstable_isNewReconciler:!1};function Pt(e,t){if(e&&e.defaultProps){t=me({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function dc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:me({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var pl={isMounted:function(e){return(e=e._reactInternals)?Ur(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=qe(),s=tr(e),i=yn(r,s);i.payload=t,n!=null&&(i.callback=n),t=Zn(e,i,s),t!==null&&(Dt(t,e,s,r),ua(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=qe(),s=tr(e),i=yn(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Zn(e,i,s),t!==null&&(Dt(t,e,s,r),ua(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=qe(),r=tr(e),s=yn(n,r);s.tag=2,t!=null&&(s.callback=t),t=Zn(e,s,r),t!==null&&(Dt(t,e,r,n),ua(t,e,r))}};function vf(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Di(n,r)||!Di(s,i):!0}function Yg(e,t,n){var r=!1,s=ir,i=t.contextType;return typeof i=="object"&&i!==null?i=St(i):(s=tt(t)?Or:We.current,r=t.contextTypes,i=(r=r!=null)?Os(e,s):ir),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=pl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function yf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&pl.enqueueReplaceState(t,t.state,null)}function hc(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Nd(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=St(i):(i=tt(t)?Or:We.current,s.context=Os(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(dc(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&pl.enqueueReplaceState(s,s.state,null),$a(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t){try{var n="",r=t;do n+=Xw(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function mu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var kx=typeof WeakMap=="function"?WeakMap:Map;function Xg(e,t,n){n=yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ba||(Ba=!0,Sc=r),fc(e,t)},n}function Zg(e,t,n){n=yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){fc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){fc(e,t),typeof r!="function"&&(er===null?er=new Set([this]):er.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function wf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new kx;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Ux.bind(null,e,t,n),t.then(e,e))}function bf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}
vendor: 9,904 bytes, line 40
40function xf(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yn(-1,1),t.tag=2,Zn(n,t,1))),n.lanes|=1),e)}var Cx=kn.ReactCurrentOwner,Ze=!1;function Ve(e,t,n,r){t.child=e===null?Rg(t,null,n,r):Is(t,e.child,n,r)}function _f(e,t,n,r,s){n=n.render;var i=t.ref;return gs(t,s),r=Ld(e,t,n,r,i,s),n=$d(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_n(e,t,s)):(de&&n&&Sd(t),t.flags|=1,Ve(e,t,r,s),t.child)}function Sf(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Kd(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ev(e,t,i,r,s)):(e=ma(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Di,n(o,r)&&e.ref===t.ref)return _n(e,t,s)}return t.flags|=1,e=nr(i,r),e.ref=t.ref,e.return=t,t.child=e}function ev(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Di(i,r)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ze=!0);else return t.lanes=e.lanes,_n(e,t,s)}return pc(e,t,n,r,s)}function tv(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(cs,ot),ot|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(cs,ot),ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,oe(cs,ot),ot|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,oe(cs,ot),ot|=r;return Ve(e,t,s,n),t.child}function nv(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pc(e,t,n,r,s){var i=tt(n)?Or:We.current;return i=Os(t,i),gs(t,s),n=Ld(e,t,n,r,i,s),r=$d(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_n(e,t,s)):(de&&r&&Sd(t),t.flags|=1,Ve(e,t,n,s),t.child)}function Ef(e,t,n,r,s){if(tt(n)){var i=!0;Aa(t)}else i=!1;if(gs(t,s),t.stateNode===null)ha(e,t),Yg(t,n,r),hc(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=St(u):(u=tt(n)?Or:We.current,u=Os(t,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)&&yf(t,o,r,u),$n=!1;var h=t.memoizedState;o.state=h,$a(t,r,o,s),l=t.memoizedState,a!==r||h!==l||et.current||$n?(typeof d=="function"&&(dc(t,n,d,r),l=t.memoizedState),(a=$n||vf(t,n,a,r,h,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"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ng(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Pt(t.type,a),o.props=u,c=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=St(l):(l=tt(n)?Or:We.current,l=Os(t,l));var f=n.getDerivedStateFromProps;(d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||h!==l)&&yf(t,o,r,l),$n=!1,h=t.memoizedState,o.state=h,$a(t,r,o,s);var v=t.memoizedState;a!==c||h!==v||et.current||$n?(typeof f=="function"&&(dc(t,n,f,r),v=t.memoizedState),(u=$n||vf(t,n,u,r,h,v,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return mc(e,t,n,r,i,s)}function mc(e,t,n,r,s,i){nv(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&uf(t,n,!1),_n(e,t,i);r=t.stateNode,Cx.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Is(t,e.child,null,i),t.child=Is(t,null,a,i)):Ve(e,t,a,i),t.memoizedState=r.state,s&&uf(t,n,!0),t.child}function rv(e){var t=e.stateNode;t.pendingContext?lf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lf(e,t.context,!1),Ad(e,t.containerInfo)}function kf(e,t,n,r,s){return js(),kd(s),t.flags|=256,Ve(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0};function vc(e){return{baseLanes:e,cachePool:null,transitions:null}}function sv(e,t,n){var r=t.pendingProps,s=fe.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),oe(fe,s&1),e===null)return uc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=vl(o,r,0,null),e=Nr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=vc(n),t.memoizedState=gc,e):Ud(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Tx(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=nr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=nr(a,i):(i=Nr(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?vc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=gc,r}return i=e.child,e=i.sibling,r=nr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ud(e,t){return t=vl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Uo(e,t,n,r){return r!==null&&kd(r),Is(t,e.child,null,n),e=Ud(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tx(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=mu(Error(P(422))),Uo(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=vl({mode:"visible",children:r.children},s,0,null),i=Nr(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Is(t,e.child,null,o),t.child.memoizedState=vc(o),t.memoizedState=gc,i);if(!(t.mode&1))return Uo(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(P(419)),r=mu(i,r,void 0),Uo(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ze||a){if(r=Pe,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,xn(e,s),Dt(r,e,s,-1))}return Vd(),r=mu(Error(P(421))),Uo(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Fx.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,ut=Xn(s.nextSibling),ct=t,de=!0,It=null,e!==null&&(yt[wt++]=gn,yt[wt++]=vn,yt[wt++]=jr,gn=e.id,vn=e.overflow,jr=t),t=Ud(t,r.children),t.flags|=4096,t)}function Cf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cc(e.return,t,n)}function gu(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function iv(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ve(e,t,r.children,n),r=fe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cf(e,n,t);else if(e.tag===19)Cf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(fe,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Da(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),gu(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Da(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}gu(t,!0,n,null,i);break;case"together":gu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ha(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}
vendor: 4,086 bytes, line 40
40function _n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Lr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=nr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=nr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Rx(e,t,n){switch(t.tag){case 3:rv(t),js();break;case 5:Ag(t);break;case 1:tt(t.type)&&Aa(t);break;case 4:Ad(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;oe(Ia,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(fe,fe.current&1),t.flags|=128,null):n&t.child.childLanes?sv(e,t,n):(oe(fe,fe.current&1),e=_n(e,t,n),e!==null?e.sibling:null);oe(fe,fe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return iv(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),oe(fe,fe.current),r)break;return null;case 22:case 23:return t.lanes=0,tv(e,t,n)}return _n(e,t,n)}var ov,yc,av,lv;ov=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yc=function(){};av=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,xr(en.current);var i=null;switch(n){case"input":s=Fu(e,s),r=Fu(e,r),i=[];break;case"select":s=me({},s,{value:void 0}),r=me({},r,{value:void 0}),i=[];break;case"textarea":s=Wu(e,s),r=Wu(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Pa)}Vu(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"&&(Ni.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"&&(Ni.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ue("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};lv=function(e,t,n,r){n!==r&&(t.flags|=4)};function si(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Px(e,t,n){var r=t.pendingProps;switch(Ed(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return tt(t.type)&&Na(),Ue(t),null;case 3:return r=t.stateNode,Ls(),ce(et),ce(We),jd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Do(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,It!==null&&(Cc(It),It=null))),yc(e,t),Ue(t),null;case 5:Od(t);var s=xr(zi.current);
vendor: 33,221 bytes, line 40
40if(n=t.type,e!==null&&t.stateNode!=null)av(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(P(166));return Ue(t),null}if(e=xr(en.current),Do(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Qt]=t,r[Fi]=i,e=(t.mode&1)!==0,n){case"dialog":ue("cancel",r),ue("close",r);break;case"iframe":case"object":case"embed":ue("load",r);break;case"video":case"audio":for(s=0;s<hi.length;s++)ue(hi[s],r);break;case"source":ue("error",r);break;case"img":case"image":case"link":ue("error",r),ue("load",r);break;case"details":ue("toggle",r);break;case"input":Ih(r,i),ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ue("invalid",r);break;case"textarea":$h(r,i),ue("invalid",r)}Vu(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&&$o(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&$o(r.textContent,a,e),s=["children",""+a]):Ni.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ue("scroll",r)}switch(n){case"input":Ro(r),Lh(r,i,!0);break;case"textarea":Ro(r),Dh(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Pa)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$m(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Qt]=t,e[Fi]=r,ov(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ku(n,r),n){case"dialog":ue("cancel",e),ue("close",e),s=r;break;case"iframe":case"object":case"embed":ue("load",e),s=r;break;case"video":case"audio":for(s=0;s<hi.length;s++)ue(hi[s],e);s=r;break;case"source":ue("error",e),s=r;break;case"img":case"image":case"link":ue("error",e),ue("load",e),s=r;break;case"details":ue("toggle",e),s=r;break;case"input":Ih(e,r),s=Fu(e,r),ue("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=me({},r,{value:void 0}),ue("invalid",e);break;case"textarea":$h(e,r),s=Wu(e,r),ue("invalid",e);break;default:s=r}Vu(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Um(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Dm(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ai(e,l):typeof l=="number"&&Ai(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ni.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ue("scroll",e):l!=null&&ud(e,i,l,o))}switch(n){case"input":Ro(e),Lh(e,r,!1);break;case"textarea":Ro(e),Dh(e);break;case"option":r.value!=null&&e.setAttribute("value",""+sr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?hs(e,!!r.multiple,i,!1):r.defaultValue!=null&&hs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Pa)}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&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ue(t),null;case 6:if(e&&t.stateNode!=null)lv(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(n=xr(zi.current),xr(en.current),Do(t)){if(r=t.stateNode,n=t.memoizedProps,r[Qt]=t,(i=r.nodeValue!==n)&&(e=ct,e!==null))switch(e.tag){case 3:$o(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$o(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Qt]=t,t.stateNode=r}return Ue(t),null;case 13:if(ce(fe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&ut!==null&&t.mode&1&&!(t.flags&128))Cg(),js(),t.flags|=98560,i=!1;else if(i=Do(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(P(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(P(317));i[Qt]=t}else js(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ue(t),i=!1}else It!==null&&(Cc(It),It=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||fe.current&1?ke===0&&(ke=3):Vd())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return Ls(),yc(e,t),e===null&&Mi(t.stateNode.containerInfo),Ue(t),null;case 10:return Rd(t.type._context),Ue(t),null;case 17:return tt(t.type)&&Na(),Ue(t),null;case 19:if(ce(fe),i=t.memoizedState,i===null)return Ue(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)si(i,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Da(e),o!==null){for(t.flags|=128,si(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,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,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oe(fe,fe.current&1|2),t.child}e=e.sibling}i.tail!==null&&be()>Ds&&(t.flags|=128,r=!0,si(i,!1),t.lanes=4194304)}else{if(!r)if(e=Da(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),si(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!de)return Ue(t),null}else 2*be()-i.renderingStartTime>Ds&&n!==1073741824&&(t.flags|=128,r=!0,si(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=be(),t.sibling=null,n=fe.current,oe(fe,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return Hd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ot&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Nx(e,t){switch(Ed(t),t.tag){case 1:return tt(t.type)&&Na(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ls(),ce(et),ce(We),jd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Od(t),null;case 13:if(ce(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));js()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(fe),null;case 4:return Ls(),null;case 10:return Rd(t.type._context),null;case 22:case 23:return Hd(),null;case 24:return null;default:return null}}var Fo=!1,ze=!1,Ax=typeof WeakSet=="function"?WeakSet:Set,$=null;function us(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ye(e,t,r)}else n.current=null}function wc(e,t,n){try{n()}catch(r){ye(e,t,r)}}var Tf=!1;function Ox(e,t){if(nc=Ca,e=fg(),_d(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.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=e,h=null;t:for(;;){for(var f;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),(f=c.firstChild)!==null;)h=c,c=f;for(;;){if(c===e)break t;if(h===n&&++u===s&&(a=o),h===i&&++d===r&&(l=o),(f=c.nextSibling)!==null)break;c=h,h=c.parentNode}c=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rc={focusedElem:e,selectionRange:n},Ca=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,x=v.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:Pt(t.type,y),x);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(_){ye(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return v=Tf,Tf=!1,v}function Si(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&wc(t,n,i)}s=s.next}while(s!==r)}}function ml(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function bc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function uv(e){var t=e.alternate;t!==null&&(e.alternate=null,uv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qt],delete t[Fi],delete t[oc],delete t[px],delete t[mx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cv(e){return e.tag===5||e.tag===3||e.tag===4}function Rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pa));else if(r!==4&&(e=e.child,e!==null))for(xc(e,t,n),e=e.sibling;e!==null;)xc(e,t,n),e=e.sibling}function _c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(_c(e,t,n),e=e.sibling;e!==null;)_c(e,t,n),e=e.sibling}var je=null,jt=!1;function An(e,t,n){for(n=n.child;n!==null;)dv(e,t,n),n=n.sibling}function dv(e,t,n){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(al,n)}catch{}switch(n.tag){case 5:ze||us(n,t);case 6:var r=je,s=jt;je=null,An(e,t,n),je=r,jt=s,je!==null&&(jt?(e=je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):je.removeChild(n.stateNode));break;case 18:je!==null&&(jt?(e=je,n=n.stateNode,e.nodeType===8?uu(e.parentNode,n):e.nodeType===1&&uu(e,n),Li(e)):uu(je,n.stateNode));break;case 4:r=je,s=jt,je=n.stateNode.containerInfo,jt=!0,An(e,t,n),je=r,jt=s;break;case 0:case 11:case 14:case 15:if(!ze&&(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)&&wc(n,t,o),s=s.next}while(s!==r)}An(e,t,n);break;case 1:if(!ze&&(us(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ye(n,t,a)}An(e,t,n);break;case 21:An(e,t,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,An(e,t,n),ze=r):An(e,t,n);break;default:An(e,t,n)}}function Pf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ax),t.forEach(function(r){var s=Bx.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:je=a.stateNode,jt=!1;break e;case 3:je=a.stateNode.containerInfo,jt=!0;break e;case 4:je=a.stateNode.containerInfo,jt=!0;break e}a=a.return}if(je===null)throw Error(P(160));dv(i,o,s),je=null,jt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ye(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)hv(t,e),t=t.sibling}function hv(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ct(t,e),Wt(e),r&4){try{Si(3,e,e.return),ml(3,e)}catch(y){ye(e,e.return,y)}try{Si(5,e,e.return)}catch(y){ye(e,e.return,y)}}break;case 1:Ct(t,e),Wt(e),r&512&&n!==null&&us(n,n.return);break;case 5:if(Ct(t,e),Wt(e),r&512&&n!==null&&us(n,n.return),e.flags&32){var s=e.stateNode;try{Ai(s,"")}catch(y){ye(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Im(s,i),Ku(a,o);var u=Ku(a,i);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?Um(s,c):d==="dangerouslySetInnerHTML"?Dm(s,c):d==="children"?Ai(s,c):ud(s,d,c,u)}switch(a){case"input":Bu(s,i);break;case"textarea":Lm(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?hs(s,!!i.multiple,f,!1):h!==!!i.multiple&&(i.defaultValue!=null?hs(s,!!i.multiple,i.defaultValue,!0):hs(s,!!i.multiple,i.multiple?[]:"",!1))}s[Fi]=i}catch(y){ye(e,e.return,y)}}break;case 6:if(Ct(t,e),Wt(e),r&4){if(e.stateNode===null)throw Error(P(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){ye(e,e.return,y)}}break;case 3:if(Ct(t,e),Wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Li(t.containerInfo)}catch(y){ye(e,e.return,y)}break;case 4:Ct(t,e),Wt(e);break;case 13:Ct(t,e),Wt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(zd=be())),r&4&&Pf(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(ze=(u=ze)||d,Ct(t,e),ze=u):Ct(t,e),Wt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for($=e,d=e.child;d!==null;){for(c=$=d;$!==null;){switch(h=$,f=h.child,h.tag){case 0:case 11:case 14:case 15:Si(4,h,h.return);break;case 1:us(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){ye(r,n,y)}}break;case 5:us(h,h.return);break;case 22:if(h.memoizedState!==null){Af(c);continue}}f!==null?(f.return=h,$=f):Af(c)}d=d.sibling}e:for(d=null,c=e;;){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=Mm("display",o))}catch(y){ye(e,e.return,y)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(y){ye(e,e.return,y)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Ct(t,e),Wt(e),r&4&&Pf(e);break;case 21:break;default:Ct(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(cv(n)){var r=n;break e}n=n.return}throw Error(P(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ai(s,""),r.flags&=-33);var i=Rf(e);_c(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Rf(e);xc(e,a,o);break;default:throw Error(P(161))}}catch(l){ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jx(e,t,n){$=e,fv(e)}function fv(e,t,n){for(var r=(e.mode&1)!==0;$!==null;){var s=$,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Fo;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||ze;a=Fo;var u=ze;if(Fo=o,(ze=l)&&!u)for($=s;$!==null;)o=$,l=o.child,o.tag===22&&o.memoizedState!==null?Of(s):l!==null?(l.return=o,$=l):Of(s);for(;i!==null;)$=i,fv(i),i=i.sibling;$=s,Fo=a,ze=u}Nf(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,$=i):Nf(e)}}function Nf(e){for(;$!==null;){var t=$;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ze||ml(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ze)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Pt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&pf(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}pf(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.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(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&Li(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}ze||t.flags&512&&bc(t)}catch(h){ye(t,t.return,h)}}if(t===e){$=null;break}if(n=t.sibling,n!==null){n.return=t.return,$=n;break}$=t.return}}function Af(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$=n;break}$=t.return}}function Of(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ml(4,t)}catch(l){ye(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){ye(t,s,l)}}var i=t.return;try{bc(t)}catch(l){ye(t,i,l)}break;case 5:var o=t.return;try{bc(t)}catch(l){ye(t,o,l)}}}catch(l){ye(t,t.return,l)}if(t===e){$=null;break}var a=t.sibling;if(a!==null){a.return=t.return,$=a;break}$=t.return}}var Ix=Math.ceil,Fa=kn.ReactCurrentDispatcher,Fd=kn.ReactCurrentOwner,_t=kn.ReactCurrentBatchConfig,Z=0,Pe=null,_e=null,Ie=0,ot=0,cs=dr(0),ke=0,Ki=null,Lr=0,gl=0,Bd=0,Ei=null,Ye=null,zd=0,Ds=1/0,un=null,Ba=!1,Sc=null,er=null,Bo=!1,qn=null,za=0,ki=0,Ec=null,fa=-1,pa=0;function qe(){return Z&6?be():fa!==-1?fa:fa=be()}function tr(e){return e.mode&1?Z&2&&Ie!==0?Ie&-Ie:vx.transition!==null?(pa===0&&(pa=Ym()),pa):(e=re,e!==0||(e=window.event,e=e===void 0?16:sg(e.type)),e):1}function Dt(e,t,n,r){if(50<ki)throw ki=0,Ec=null,Error(P(185));fo(e,n,r),(!(Z&2)||e!==Pe)&&(e===Pe&&(!(Z&2)&&(gl|=n),ke===4&&Mn(e,Ie)),nt(e,r),n===1&&Z===0&&!(t.mode&1)&&(Ds=be()+500,hl&&hr()))}function nt(e,t){var n=e.callbackNode;vb(e,t);var r=ka(e,e===Pe?Ie:0);if(r===0)n!==null&&Fh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Fh(n),t===1)e.tag===0?gx(jf.bind(null,e)):Sg(jf.bind(null,e)),hx(function(){!(Z&6)&&hr()}),n=null;else{switch(Xm(r)){case 1:n=pd;break;case 4:n=Jm;break;case 16:n=Ea;break;case 536870912:n=Qm;break;default:n=Ea}n=xv(n,pv.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function pv(e,t){if(fa=-1,pa=0,Z&6)throw Error(P(327));var n=e.callbackNode;if(vs()&&e.callbackNode!==n)return null;var r=ka(e,e===Pe?Ie:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Wa(e,r);else{t=r;var s=Z;Z|=2;var i=gv();(Pe!==e||Ie!==t)&&(un=null,Ds=be()+500,Pr(e,t));do try{Dx();break}catch(a){mv(e,a)}while(!0);Td(),Fa.current=i,Z=s,_e!==null?t=0:(Pe=null,Ie=0,t=ke)}if(t!==0){if(t===2&&(s=Yu(e),s!==0&&(r=s,t=kc(e,s))),t===1)throw n=Ki,Pr(e,0),Mn(e,r),nt(e,be()),n;if(t===6)Mn(e,r);else{if(s=e.current.alternate,!(r&30)&&!Lx(s)&&(t=Wa(e,r),t===2&&(i=Yu(e),i!==0&&(r=i,t=kc(e,i))),t===1))throw n=Ki,Pr(e,0),Mn(e,r),nt(e,be()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(P(345));case 2:gr(e,Ye,un);break;case 3:if(Mn(e,r),(r&130023424)===r&&(t=zd+500-be(),10<t)){if(ka(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){qe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ic(gr.bind(null,e,Ye,un),t);break}gr(e,Ye,un);break;case 4:if(Mn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-$t(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ix(r/1960))-r,10<r){e.timeoutHandle=ic(gr.bind(null,e,Ye,un),r);break}gr(e,Ye,un);break;case 5:gr(e,Ye,un);break;default:throw Error(P(329))}}}return nt(e,be()),e.callbackNode===n?pv.bind(null,e):null}function kc(e,t){var n=Ei;return e.current.memoizedState.isDehydrated&&(Pr(e,t).flags|=256),e=Wa(e,t),e!==2&&(t=Ye,Ye=n,t!==null&&Cc(t)),e}function Cc(e){Ye===null?Ye=e:Ye.push.apply(Ye,e)}function Lx(e){for(var t=e;;){if(t.flags&16384){var n=t.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(!Mt(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Mn(e,t){for(t&=~Bd,t&=~gl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$t(t),r=1<<n;e[n]=-1,t&=~r}}function jf(e){if(Z&6)throw Error(P(327));vs();var t=ka(e,0);if(!(t&1))return nt(e,be()),null;var n=Wa(e,t);if(e.tag!==0&&n===2){var r=Yu(e);r!==0&&(t=r,n=kc(e,r))}if(n===1)throw n=Ki,Pr(e,0),Mn(e,t),nt(e,be()),n;if(n===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gr(e,Ye,un),nt(e,be()),null}function Wd(e,t){var n=Z;Z|=1;try{return e(t)}finally{Z=n,Z===0&&(Ds=be()+500,hl&&hr())}}function $r(e){qn!==null&&qn.tag===0&&!(Z&6)&&vs();var t=Z;Z|=1;var n=_t.transition,r=re;try{if(_t.transition=null,re=1,e)return e()}finally{re=r,_t.transition=n,Z=t,!(Z&6)&&hr()}}function Hd(){ot=cs.current,ce(cs)}function Pr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dx(n)),_e!==null)for(n=_e.return;n!==null;){var r=n;switch(Ed(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Na();break;case 3:Ls(),ce(et),ce(We),jd();break;case 5:Od(r);break;case 4:Ls();break;case 13:ce(fe);break;case 19:ce(fe);break;case 10:Rd(r.type._context);break;case 22:case 23:Hd()}n=n.return}if(Pe=e,_e=e=nr(e.current,null),Ie=ot=t,ke=0,Ki=null,Bd=gl=Lr=0,Ye=Ei=null,br!==null){for(t=0;t<br.length;t++)if(n=br[t],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}br=null}return e}function mv(e,t){do{var n=_e;try{if(Td(),ca.current=Ua,Ma){for(var r=pe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ma=!1}if(Ir=0,Re=Ee=pe=null,_i=!1,Wi=0,Fd.current=null,n===null||n.return===null){ke=1,Ki=t,_e=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Ie,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 h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=bf(o);if(f!==null){f.flags&=-257,xf(f,o,a,i,t),f.mode&1&&wf(i,u,t),t=f,l=u;var v=t.updateQueue;if(v===null){var y=new Set;y.add(l),t.updateQueue=y}else v.add(l);break e}else{if(!(t&1)){wf(i,u,t),Vd();break e}l=Error(P(426))}}else if(de&&a.mode&1){var x=bf(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),xf(x,o,a,i,t),kd($s(l,a));break e}}i=l=$s(l,a),ke!==4&&(ke=2),Ei===null?Ei=[i]:Ei.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=Xg(i,l,t);ff(i,g);break e;case 1:a=l;var m=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(er===null||!er.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=Zg(i,a,t);ff(i,_);break e}}i=i.return}while(i!==null)}yv(n)}catch(S){t=S,_e===n&&n!==null&&(_e=n=n.return);continue}break}while(!0)}function gv(){var e=Fa.current;return Fa.current=Ua,e===null?Ua:e}function Vd(){(ke===0||ke===3||ke===2)&&(ke=4),Pe===null||!(Lr&268435455)&&!(gl&268435455)||Mn(Pe,Ie)}function Wa(e,t){var n=Z;Z|=2;var r=gv();(Pe!==e||Ie!==t)&&(un=null,Pr(e,t));do try{$x();break}catch(s){mv(e,s)}while(!0);if(Td(),Z=n,Fa.current=r,_e!==null)throw Error(P(261));return Pe=null,Ie=0,ke}function $x(){for(;_e!==null;)vv(_e)}function Dx(){for(;_e!==null&&!lb();)vv(_e)}function vv(e){var t=bv(e.alternate,e,ot);e.memoizedProps=e.pendingProps,t===null?yv(e):_e=t,Fd.current=null}function yv(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Nx(n,t),n!==null){n.flags&=32767,_e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,_e=null;return}}else if(n=Px(n,t,ot),n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);ke===0&&(ke=5)}function gr(e,t,n){var r=re,s=_t.transition;try{_t.transition=null,re=1,Mx(e,t,n,r)}finally{_t.transition=s,re=r}return null}function Mx(e,t,n,r){do vs();while(qn!==null);if(Z&6)throw Error(P(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(yb(e,i),e===Pe&&(_e=Pe=null,Ie=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Bo||(Bo=!0,xv(Ea,function(){return vs(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=_t.transition,_t.transition=null;var o=re;re=1;var a=Z;Z|=4,Fd.current=null,Ox(e,n),hv(n,e),sx(rc),Ca=!!nc,rc=nc=null,e.current=n,jx(n),ub(),Z=a,re=o,_t.transition=i}else e.current=n;if(Bo&&(Bo=!1,qn=e,za=s),i=e.pendingLanes,i===0&&(er=null),hb(n.stateNode),nt(e,be()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ba)throw Ba=!1,e=Sc,Sc=null,e;return za&1&&e.tag!==0&&vs(),i=e.pendingLanes,i&1?e===Ec?ki++:(ki=0,Ec=e):ki=0,hr(),null}function vs(){if(qn!==null){var e=Xm(za),t=_t.transition,n=re;try{if(_t.transition=null,re=16>e?16:e,qn===null)var r=!1;else{if(e=qn,qn=null,za=0,Z&6)throw Error(P(331));var s=Z;for(Z|=4,$=e.current;$!==null;){var i=$,o=i.child;if($.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for($=u;$!==null;){var d=$;switch(d.tag){case 0:case 11:case 15:Si(8,d,i)}var c=d.child;if(c!==null)c.return=d,$=c;else for(;$!==null;){d=$;var h=d.sibling,f=d.return;if(uv(d),d===u){$=null;break}if(h!==null){h.return=f,$=h;break}$=f}}}var v=i.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var x=y.sibling;y.sibling=null,y=x}while(y!==null)}}$=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,$=o;else e:for(;$!==null;){if(i=$,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Si(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,$=g;break e}$=i.return}}var m=e.current;for($=m;$!==null;){o=$;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,$=w;else e:for(o=m;$!==null;){if(a=$,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ml(9,a)}}catch(S){ye(a,a.return,S)}if(a===o){$=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,$=_;break e}$=a.return}}if(Z=s,hr(),Zt&&typeof Zt.onPostCommitFiberRoot=="function")try{Zt.onPostCommitFiberRoot(al,e)}catch{}r=!0}return r}finally{re=n,_t.transition=t}}return!1}function If(e,t,n){t=$s(n,t),t=Xg(e,t,1),e=Zn(e,t,1),t=qe(),e!==null&&(fo(e,1,t),nt(e,t))}function ye(e,t,n){if(e.tag===3)If(e,e,n);else for(;t!==null;){if(t.tag===3){If(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(er===null||!er.has(r))){e=$s(n,e),e=Zg(t,e,1),t=Zn(t,e,1),e=qe(),t!==null&&(fo(t,1,e),nt(t,e));break}}t=t.return}}function Ux(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=qe(),e.pingedLanes|=e.suspendedLanes&n,Pe===e&&(Ie&n)===n&&(ke===4||ke===3&&(Ie&130023424)===Ie&&500>be()-zd?Pr(e,0):Bd|=n),nt(e,t)}function wv(e,t){t===0&&(e.mode&1?(t=Ao,Ao<<=1,!(Ao&130023424)&&(Ao=4194304)):t=1);var n=qe();e=xn(e,t),e!==null&&(fo(e,t,n),nt(e,n))}function Fx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wv(e,n)}function Bx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),wv(e,n)}var bv;bv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)Ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ze=!1,Rx(e,t,n);Ze=!!(e.flags&131072)}else Ze=!1,de&&t.flags&1048576&&Eg(t,ja,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ha(e,t),e=t.pendingProps;var s=Os(t,We.current);gs(t,n),s=Ld(null,t,r,e,s,n);var i=$d();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tt(r)?(i=!0,Aa(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Nd(t),s.updater=pl,t.stateNode=s,s._reactInternals=t,hc(t,r,e,n),t=mc(null,t,r,!0,i,n)):(t.tag=0,de&&i&&Sd(t),Ve(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ha(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Wx(r),e=Pt(r,e),s){case 0:t=pc(null,t,r,e,n);break e;case 1:t=Ef(null,t,r,e,n);break e;case 11:t=_f(null,t,r,e,n);break e;case 14:t=Sf(null,t,r,Pt(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Pt(r,s),pc(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Pt(r,s),Ef(e,t,r,s,n);case 3:e:{if(rv(t),e===null)throw Error(P(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Ng(e,t),$a(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=$s(Error(P(423)),t),t=kf(e,t,r,n,s);break e}else if(r!==s){s=$s(Error(P(424)),t),t=kf(e,t,r,n,s);break e}else for(ut=Xn(t.stateNode.containerInfo.firstChild),ct=t,de=!0,It=null,n=Rg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(js(),r===s){t=_n(e,t,n);break e}Ve(e,t,r,n)}t=t.child}return t;case 5:return Ag(t),e===null&&uc(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,sc(r,s)?o=null:i!==null&&sc(r,i)&&(t.flags|=32),nv(e,t),Ve(e,t,o,n),t.child;case 6:return e===null&&uc(t),null;case 13:return sv(e,t,n);case 4:return Ad(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Is(t,null,r,n):Ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Pt(r,s),_f(e,t,r,s,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,oe(Ia,r._currentValue),r._currentValue=o,i!==null)if(Mt(i.value,o)){if(i.children===s.children&&!et.current){t=_n(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);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=yn(-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),cc(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(P(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),cc(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,gs(t,n),s=St(s),r=r(s),t.flags|=1,Ve(e,t,r,n),t.child;case 14:return r=t.type,s=Pt(r,t.pendingProps),s=Pt(r.type,s),Sf(e,t,r,s,n);case 15:return ev(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Pt(r,s),ha(e,t),t.tag=1,tt(r)?(e=!0,Aa(t)):e=!1,gs(t,n),Yg(t,r,s),hc(t,r,s,n),mc(null,t,r,!0,e,n);case 19:return iv(e,t,n);case 22:return tv(e,t,n)}throw Error(P(156,t.tag))};function xv(e,t){return Gm(e,t)}function zx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 xt(e,t,n,r){return new zx(e,t,n,r)}function Kd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wx(e){if(typeof e=="function")return Kd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dd)return 11;if(e===hd)return 14}return 2}function nr(e,t){var n=e.alternate;return n===null?(n=xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 8,895 bytes, line 40
40ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ma(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Kd(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case es:return Nr(n.children,s,i,t);case cd:o=8,s|=8;break;case $u:return e=xt(12,n,t,s|2),e.elementType=$u,e.lanes=i,e;case Du:return e=xt(13,n,t,s),e.elementType=Du,e.lanes=i,e;case Mu:return e=xt(19,n,t,s),e.elementType=Mu,e.lanes=i,e;case Am:return vl(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pm:o=10;break e;case Nm:o=9;break e;case dd:o=11;break e;case hd:o=14;break e;case Ln:o=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=xt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Nr(e,t,n,r){return e=xt(7,e,r,t),e.lanes=n,e}function vl(e,t,n,r){return e=xt(22,e,r,t),e.elementType=Am,e.lanes=n,e.stateNode={isHidden:!1},e}function vu(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function yu(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hx(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xl(0),this.expirationTimes=Xl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function qd(e,t,n,r,s,i,o,a,l){return e=new Hx(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=xt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nd(i),e}function Vx(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Zr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function _v(e){if(!e)return ir;e=e._reactInternals;e:{if(Ur(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var n=e.type;if(tt(n))return _g(e,n,t)}return t}function Sv(e,t,n,r,s,i,o,a,l){return e=qd(n,r,!0,e,s,i,o,a,l),e.context=_v(null),n=e.current,r=qe(),s=tr(n),i=yn(r,s),i.callback=t??null,Zn(n,i,s),e.current.lanes=s,fo(e,s,r),nt(e,r),e}function yl(e,t,n,r){var s=t.current,i=qe(),o=tr(s);return n=_v(n),t.context===null?t.context=n:t.pendingContext=n,t=yn(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Zn(s,t,o),e!==null&&(Dt(e,s,o,i),ua(e,s,o)),o}function Ha(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Lf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gd(e,t){Lf(e,t),(e=e.alternate)&&Lf(e,t)}function Kx(){return null}var Ev=typeof reportError=="function"?reportError:function(e){console.error(e)};function Jd(e){this._internalRoot=e}wl.prototype.render=Jd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));yl(e,t,null,null)};wl.prototype.unmount=Jd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$r(function(){yl(null,e,null,null)}),t[bn]=null}};function wl(e){this._internalRoot=e}wl.prototype.unstable_scheduleHydration=function(e){if(e){var t=tg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dn.length&&t!==0&&t<Dn[n].priority;n++);Dn.splice(n,0,e),n===0&&rg(e)}};function Qd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function bl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $f(){}function qx(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Ha(o);i.call(u)}}var o=Sv(t,r,e,0,null,!1,!1,"",$f);return e._reactRootContainer=o,e[bn]=o.current,Mi(e.nodeType===8?e.parentNode:e),$r(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Ha(l);a.call(u)}}var l=qd(e,0,!1,null,null,!1,!1,"",$f);return e._reactRootContainer=l,e[bn]=l.current,Mi(e.nodeType===8?e.parentNode:e),$r(function(){yl(t,l,n,r)}),l}function xl(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Ha(o);a.call(l)}}yl(t,o,e,s)}else o=qx(n,t,e,s,r);return Ha(o)}Zm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=di(t.pendingLanes);n!==0&&(md(t,n|1),nt(t,be()),!(Z&6)&&(Ds=be()+500,hr()))}break;case 13:$r(function(){var r=xn(e,1);if(r!==null){var s=qe();Dt(r,e,1,s)}}),Gd(e,1)}};gd=function(e){if(e.tag===13){var t=xn(e,134217728);if(t!==null){var n=qe();Dt(t,e,134217728,n)}Gd(e,134217728)}};eg=function(e){if(e.tag===13){var t=tr(e),n=xn(e,t);if(n!==null){var r=qe();Dt(n,e,t,r)}Gd(e,t)}};tg=function(){return re};ng=function(e,t){var n=re;try{return re=e,t()}finally{re=n}};Gu=function(e,t,n){switch(t){case"input":if(Bu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=dl(r);if(!s)throw Error(P(90));jm(r),Bu(r,s)}}}break;case"textarea":Lm(e,n);break;case"select":t=n.value,t!=null&&hs(e,!!n.multiple,t,!1)}};zm=Wd;Wm=$r;var Gx={usingClientEntryPoint:!1,Events:[mo,ss,dl,Fm,Bm,Wd]},ii={findFiberByHostInstance:wr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Jx={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:kn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Km(e),e===null?null:e.stateNode},findFiberByHostInstance:ii.findFiberByHostInstance||Kx,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 zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zo.isDisabled&&zo.supportsFiber)try{al=zo.inject(Jx),Zt=zo}catch{}}pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gx;pt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qd(t))throw Error(P(200));return Vx(e,t,null,n)};pt.createRoot=function(e,t){if(!Qd(e))throw Error(P(299));var n=!1,r="",s=Ev;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=qd(e,1,!1,null,null,n,!1,r,s),e[bn]=t.current,Mi(e.nodeType===8?e.parentNode:e),new Jd(t)};pt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=Km(t),e=e===null?null:e.stateNode,e};pt.flushSync=function(e){return $r(e)};pt.hydrate=function(e,t,n){if(!bl(t))throw Error(P(200));return xl(null,e,t,!0,n)};pt.hydrateRoot=function(e,t,n){if(!Qd(e))throw Error(P(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Ev;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Sv(t,null,e,1,n??null,s,!1,i,o),e[bn]=t.current,Mi(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new wl(t)};pt.render=function(e,t,n){if(!bl(t))throw Error(P(200));return xl(null,e,t,!1,n)};pt.unmountComponentAtNode=function(e){if(!bl(e))throw Error(P(40));return e._reactRootContainer?($r(function(){xl(null,null,e,!1,function(){e._reactRootContainer=null,e[bn]=null})}),!0):!1};pt.unstable_batchedUpdates=Wd;pt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!bl(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return xl(e,t,n,!1,r)};
40pt.version="18.3.1-next-f1338f8080-20240426";function kv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kv)}catch(e){console.error(e)}}kv(),km.exports=pt;var Hs=km.exports;const Cv=hm(Hs);var Tv,Df=Hs;Tv=Df.createRoot,Df.hydrateRoot;const Qx=1,Yx=1e6;let wu=0;function Xx(){return wu=(wu+1)%Number.MAX_SAFE_INTEGER,wu.toString()}const bu=new Map,Mf=e=>{if(bu.has(e))return;const t=setTimeout(()=>{bu.delete(e),Ci({type:"REMOVE_TOAST",toastId:e})},Yx);bu.set(e,t)},Zx=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Qx)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Mf(n):e.toasts.forEach(r=>{Mf(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ga=[];let va={toasts:[]};function Ci(e){va=Zx(va,e),ga.forEach(t=>{t(va)})}function e_({...e}){const t=Xx(),n=s=>Ci({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Ci({type:"DISMISS_TOAST",toastId:t});return Ci({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Rv(){const[e,t]=b.useState(va);return b.useEffect(()=>(ga.push(t),()=>{const n=ga.indexOf(t);n>-1&&ga.splice(n,1)}),[e]),{...e,toast:e_,dismiss:n=>Ci({type:"DISMISS_TOAST",toastId:n})}}function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function t_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Pv(...e){return t=>e.forEach(n=>t_(n,t))}function $e(...e){return b.useCallback(Pv(...e),e)}function Vs(e,t=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];function u(c){const{scope:h,children:f,...v}=c,y=(h==null?void 0:h[e][l])||a,x=b.useMemo(()=>v,Object.values(v));return p.jsx(y.Provider,{value:x,children:f})}function d(c,h){const f=(h==null?void 0:h[e][l])||a,v=b.useContext(f);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,n_(s,...t)]}function n_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.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 b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var qi=b.forwardRef((e,t)=>{const{children:n,...r}=e,s=b.Children.toArray(n),i=s.find(r_);if(i){const o=i.props.children,a=s.map(l=>l===i?b.Children.count(o)>1?b.Children.only(null):b.isValidElement(o)?o.props.children:null:l);return p.jsx(Tc,{...r,ref:t,children:b.isValidElement(o)?b.cloneElement(o,void 0,a):null})}return p.jsx(Tc,{...r,ref:t,children:n})});qi.displayName="Slot";var Tc=b.forwardRef((e,t)=>{const{children:n,...r}=e;if(b.isValidElement(n)){const s=i_(n);return b.cloneElement(n,{...s_(r,n.props),ref:t?Pv(t,s):s})}return b.Children.count(n)>1?b.Children.only(null):null});Tc.displayName="SlotClone";var Nv=({children:e})=>p.jsx(p.Fragment,{children:e});function r_(e){return b.isValidElement(e)&&e.type===Nv}function s_(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function i_(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Av(e){const t=e+"CollectionProvider",[n,r]=Vs(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=f=>{const{scope:v,children:y}=f,x=A.useRef(null),g=A.useRef(new Map).current;return p.jsx(s,{scope:v,itemMap:g,collectionRef:x,children:y})};o.displayName=t;const a=e+"CollectionSlot",l=A.forwardRef((f,v)=>{const{scope:y,children:x}=f,g=i(a,y),m=$e(v,g.collectionRef);return p.jsx(qi,{ref:m,children:x})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",c=A.forwardRef((f,v)=>{const{scope:y,children:x,...g}=f,m=A.useRef(null),w=$e(v,m),_=i(u,y);return A.useEffect(()=>(_.itemMap.set(m,{ref:m,...g}),()=>void _.itemMap.delete(m))),p.jsx(qi,{[d]:"",ref:w,children:x})});c.displayName=u;function h(f){const v=i(e+"CollectionConsumer",f);return A.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const g=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((_,S)=>g.indexOf(_.ref.current)-g.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:c},h,r]}var o_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],we=o_.reduce((e,t)=>
vendor: 4,235 bytes, line 40
40{const n=b.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?qi:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(a,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Yd(e,t){e&&Hs.flushSync(()=>e.dispatchEvent(t))}function ft(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ov(e,t=globalThis==null?void 0:globalThis.document){const n=ft(e);b.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var a_="DismissableLayer",Rc="dismissableLayer.update",l_="dismissableLayer.pointerDownOutside",u_="dismissableLayer.focusOutside",Uf,jv=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Iv=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=b.useContext(jv),[d,c]=b.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),v=$e(t,E=>c(E)),y=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(x),m=d?y.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,_=m>=g,S=d_(E=>{const C=E.target,O=[...u.branches].some(j=>j.contains(C));!_||O||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},h),k=h_(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())},h);return Ov(E=>{m===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Uf=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ff(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Uf)}},[d,h,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ff())},[d,u]),b.useEffect(()=>{const E=()=>f({});return document.addEventListener(Rc,E),()=>document.removeEventListener(Rc,E)},[]),p.jsx(we.div,{...l,ref:v,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,S.onPointerDownCapture)})});Iv.displayName=a_;var c_="DismissableLayerBranch",Lv=b.forwardRef((e,t)=>{const n=b.useContext(jv),r=b.useRef(null),s=$e(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(we.div,{...e,ref:s})});Lv.displayName=c_;function d_(e,t=globalThis==null?void 0:globalThis.document){const n=ft(e),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){$v(l_,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function h_(e,t=globalThis==null?void 0:globalThis.document){const n=ft(e),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&$v(u_,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ff(){const e=new CustomEvent(Rc);document.dispatchEvent(e)}function $v(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Yd(s,i):s.dispatchEvent(i)}var f_=Iv,p_=Lv,tn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},m_="Portal",Dv=b.forwardRef((e,t)=>
40{var a;const{container:n,...r}=e,[s,i]=b.useState(!1);tn(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Cv.createPortal(p.jsx(we.div,{...r,ref:t}),o):null});Dv.displayName=m_;function g_(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Xd=e=>{const{present:t,children:n}=e,r=v_(t),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=$e(r.ref,y_(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}):null};Xd.displayName="Presence";function v_(e){const[t,n]=b.useState(),r=b.useRef({}),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=g_(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Wo(r.current);i.current=a==="mounted"?u:"none"},[a]),tn(()=>{const u=r.current,d=s.current;if(d!==e){const h=i.current,f=Wo(u);e?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),tn(()=>{if(t){const u=c=>{const f=Wo(r.current).includes(c.animationName);c.target===t&&f&&Hs.flushSync(()=>l("ANIMATION_END"))},d=c=>{c.target===t&&(i.current=Wo(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Wo(e){return(e==null?void 0:e.animationName)||"none"}function y_(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Zd({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=w_({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,a=ft(n),l=b.useCallback(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else s(u)},[i,e,s,a]);return[o,l]}function w_({defaultProp:e,onChange:t}){const n=b.useState(e),[r]=n,s=b.useRef(r),i=ft(t);return b.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var b_="VisuallyHidden",_l=b.forwardRef((e,t)=>p.jsx(we.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));_l.displayName=b_;var x_=_l,eh="ToastProvider",[th,__,S_]=Av("Toast"),[Mv,mN]=Vs("Toast",[S_]),[E_,Sl]=Mv(eh),Uv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=b.useState(null),[u,d]=b.useState(0),c=b.useRef(!1),h=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${eh}\`. Expected non-empty \`string\`.`),p.jsx(th.Provider,{scope:t,children:p.jsx(E_,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>d(f=>f+1),[]),onToastRemove:b.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:h,children:o})})};Uv.displayName=eh;var Fv="ToastViewport",k_=["F8"],Pc="toast.viewportPause",Nc="toast.viewportResume",Bv=b.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=k_,label:s="Notifications ({hotkey})",...i}=e,o=Sl(Fv,n),a=__(n),l=b.useRef(null),u=b.useRef(null),d=b.useRef(null),c=b.useRef(null),h=$e(t,c,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;b.useEffect(()=>{const x=g=>{var w;r.every(_=>g[_]||g.code===_)&&((w=c.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),b.useEffect(()=>{const x=l.current,g=c.current;if(v&&x&&g){const m=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(Pc);g.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>
40{if(o.isClosePausedRef.current){const k=new CustomEvent(Nc);g.dispatchEvent(k),o.isClosePausedRef.current=!1}},_=k=>{!x.contains(k.relatedTarget)&&w()},S=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",m),x.addEventListener("focusout",_),x.addEventListener("pointermove",m),x.addEventListener("pointerleave",S),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",m),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",m),x.removeEventListener("pointerleave",S),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[v,o.isClosePausedRef]);const y=b.useCallback(({tabbingDirection:x})=>{const m=a().map(w=>{const _=w.ref.current,S=[_,...M_(_)];return x==="forwards"?S:S.reverse()});return(x==="forwards"?m.reverse():m).flat()},[a]);return b.useEffect(()=>{const x=c.current;if(x){const g=m=>{var S,k,E;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const C=document.activeElement,O=m.shiftKey;if(m.target===x&&O){(S=u.current)==null||S.focus();return}const U=y({tabbingDirection:O?"backwards":"forwards"}),V=U.findIndex(L=>L===C);xu(U.slice(V+1))?m.preventDefault():O?(k=u.current)==null||k.focus():(E=d.current)==null||E.focus()}};return x.addEventListener("keydown",g),()=>x.removeEventListener("keydown",g)}},[a,y]),p.jsxs(p_,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&p.jsx(Ac,{ref:u,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"forwards"});xu(x)}}),p.jsx(th.Slot,{scope:n,children:p.jsx(we.ol,{tabIndex:-1,...i,ref:h})}),v&&p.jsx(Ac,{ref:d,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"backwards"});xu(x)}})]})});Bv.displayName=Fv;var zv="ToastFocusProxy",Ac=b.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=Sl(zv,n);return p.jsx(_l,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});Ac.displayName=zv;var El="Toast",C_="toast.swipeStart",T_="toast.swipeMove",R_="toast.swipeCancel",P_="toast.swipeEnd",Wv=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=Zd({prop:r,defaultProp:s,onChange:i});return p.jsx(Xd,{present:n||a,children:p.jsx(O_,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:ft(e.onPause),onResume:ft(e.onResume),onSwipeStart:ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.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:ee(e.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:ee(e.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)})})})});Wv.displayName=El;var[N_,A_]=Mv(El,{onClose(){}}),O_=b.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:h,onSwipeEnd:f,...v}=e,y=Sl(El,n),[x,g]=b.useState(null),m=$e(t,L=>g(L)),w=b.useRef(null),_=b.useRef(null),S=s||y.duration,k=b.useRef(0),E=b.useRef(S),C=b.useRef(0),{onToastAdd:O,onToastRemove:j}=y,W=ft(()=>{var J;(x==null?void 0:x.contains(document.activeElement))&&((J=y.viewport)==null||J.focus()),o()}),U=b.useCallback(L=>
vendor: 4,524 bytes, line 40
40{!L||L===1/0||(window.clearTimeout(C.current),k.current=new Date().getTime(),C.current=window.setTimeout(W,L))},[W]);b.useEffect(()=>{const L=y.viewport;if(L){const J=()=>{U(E.current),u==null||u()},B=()=>{const Q=new Date().getTime()-k.current;E.current=E.current-Q,window.clearTimeout(C.current),l==null||l()};return L.addEventListener(Pc,B),L.addEventListener(Nc,J),()=>{L.removeEventListener(Pc,B),L.removeEventListener(Nc,J)}}},[y.viewport,S,l,u,U]),b.useEffect(()=>{i&&!y.isClosePausedRef.current&&U(S)},[i,S,y.isClosePausedRef,U]),b.useEffect(()=>(O(),()=>j()),[O,j]);const V=b.useMemo(()=>x?Qv(x):null,[x]);return y.viewport?p.jsxs(p.Fragment,{children:[V&&p.jsx(j_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),p.jsx(N_,{scope:n,onClose:W,children:Hs.createPortal(p.jsx(th.ItemSlot,{scope:n,children:p.jsx(f_,{asChild:!0,onEscapeKeyDown:ee(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||W(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(we.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...v,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,W()))}),onPointerDown:ee(e.onPointerDown,L=>{L.button===0&&(w.current={x:L.clientX,y:L.clientY})}),onPointerMove:ee(e.onPointerMove,L=>{if(!w.current)return;const J=L.clientX-w.current.x,B=L.clientY-w.current.y,Q=!!_.current,T=["left","right"].includes(y.swipeDirection),N=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=T?N(0,J):0,D=T?0:N(0,B),H=L.pointerType==="touch"?10:2,X={x:F,y:D},he={originalEvent:L,delta:X};Q?(_.current=X,Ho(T_,c,he,{discrete:!1})):Bf(X,y.swipeDirection,H)?(_.current=X,Ho(C_,d,he,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(J)>H||Math.abs(B)>H)&&(w.current=null)}),onPointerUp:ee(e.onPointerUp,L=>{const J=_.current,B=L.target;if(B.hasPointerCapture(L.pointerId)&&B.releasePointerCapture(L.pointerId),_.current=null,w.current=null,J){const Q=L.currentTarget,T={originalEvent:L,delta:J};Bf(J,y.swipeDirection,y.swipeThreshold)?Ho(P_,f,T,{discrete:!0}):Ho(R_,h,T,{discrete:!0}),Q.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),j_=e=>{const{__scopeToast:t,children:n,...r}=e,s=Sl(El,t),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return $_(()=>o(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:p.jsx(Dv,{asChild:!0,children:p.jsx(_l,{...r,children:i&&p.jsxs(p.Fragment,{children:[s.label," ",n]})})})},I_="ToastTitle",Hv=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(we.div,{...r,ref:t})});Hv.displayName=I_;var L_="ToastDescription",Vv=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(we.div,{...r,ref:t})});Vv.displayName=L_;var Kv="ToastAction",qv=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?p.jsx(Jv,{altText:n,asChild:!0,children:p.jsx(nh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Kv}\`. Expected non-empty \`string\`.`),null)});qv.displayName=Kv;var Gv="ToastClose",nh=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=A_(Gv,n);return p.jsx(Jv,{asChild:!0,children:p.jsx(we.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,s.onClose)})})});nh.displayName=Gv;var Jv=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return p.jsx(we.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Qv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),D_(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&&t.push(o)}else t.push(...Qv(r))}}),t}function Ho(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Yd(s,i):s.dispatchEvent(i)}var Bf=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function $_(e=()=>{}){const t=ft(e);tn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}
vendor: 9,852 bytes, lines 40-150
40function D_(e){return e.nodeType===e.ELEMENT_NODE}function M_(e){const t=[],n=document.createTreeWalker(e,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();)t.push(n.currentNode);return t}function xu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var U_=Uv,Yv=Bv,Xv=Wv,Zv=Hv,ey=Vv,ty=qv,ny=nh;function ry(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=ry(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function sy(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=ry(e))&&(r&&(r+=" "),r+=t);return r}const zf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wf=sy,rh=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Wf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,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 h=zf(d)||zf(c);return s[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:h,...f}=d;return Object.entries(f).every(v=>{let[y,x]=v;return Array.isArray(x)?x.includes({...i,...a}[y]):{...i,...a}[y]===x})?[...u,c,h]:u},[]);return Wf(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const F_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),iy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var B_={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"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const z_=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...B_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:iy("lucide",s),...a},[...o.map(([u,d])=>b.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Ne=(e,t)=>{const n=b.forwardRef(({className:r,...s},i)=>b.createElement(z_,{ref:i,iconNode:t,className:iy(`lucide-${F_(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const oy=Ne("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const W_=Ne("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const kl=Ne("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const H_=Ne("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const ay=Ne("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const Hf=Ne("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const V_=Ne("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const ly=Ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const uy=Ne("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const K_=Ne("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const q_=Ne("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const G_=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"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const cy=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"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const Cl=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"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const sh=Ne("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const J_=Ne("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const vr=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"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const Q_=Ne("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 4,998 bytes, line 150
150],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ih="-",Y_=e=>{const t=Z_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(ih);return a[0]===""&&a.length!==1&&a.shift(),dy(a,t)||X_(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},dy=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?dy(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(ih);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Vf=/^\[(.+)\]$/,X_=e=>{if(Vf.test(e)){const t=Vf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Z_=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return tS(Object.entries(e.classGroups),n).forEach(([i,o])=>{Oc(o,r,i,t)}),r},Oc=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Kf(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(eS(s)){Oc(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Oc(o,Kf(t,i),n,r)})})},Kf=(e,t)=>{let n=e;return t.split(ih).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},eS=e=>e.isThemeGetter,tS=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,nS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=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)}}},hy="!",rS=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,d=0,c;for(let x=0;x<a.length;x++){let g=a[x];if(u===0){if(g===s&&(r||a.slice(x,x+i)===t)){l.push(a.slice(d,x)),d=x+i;continue}if(g==="/"){c=x;continue}}g==="["?u++:g==="]"&&u--}const h=l.length===0?a:a.substring(d),f=h.startsWith(hy),v=f?h.substring(1):h,y=c&&c>d?c-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},sS=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},iS=e=>({cache:nS(e.cacheSize),parseClassName:rS(e),...Y_(e)}),oS=/\s+/,aS=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(oS);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:f}=n(u);let v=!!f,y=r(v?h.substring(0,f):h);if(!y){if(!v){a=u+(a.length>0?" "+a:a);continue}if(y=r(h),!y){a=u+(a.length>0?" "+a:a);continue}v=!1}const x=sS(d).join(":"),g=c?x+hy:x,m=g+y;if(i.includes(m))continue;i.push(m);const w=s(y,v);for(let _=0;_<w.length;++_){const S=w[_];i.push(g+S)}a=u+(a.length>0?" "+a:a)}return a};function lS(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=fy(t))&&(r&&(r+=" "),r+=n);return r}const fy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fy(e[r]))&&(n&&(n+=" "),n+=t);return n};function uS(e,...t){let n,r,s,i=o;function o(l){const u=t.reduce((d,c)=>c(d),e());return n=iS(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=aS(l,n);return s(l,d),d}return function(){return i(lS.apply(null,arguments))}}const le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},py=/^\[(?:([a-z-]+):)?(.+)\]$/i,cS=/^\d+\/\d+$/,dS=new Set(["px","full","screen"]),hS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fS=/\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$/,pS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,mS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,on=e=>ys(e)||dS.has(e)||cS.test(e),On=e=>Ks(e,"length",ES),ys=e=>!!e&&!Number.isNaN(Number(e)),_u=e=>Ks(e,"number",ys),oi=e=>!!e&&Number.isInteger(Number(e)),vS=e=>e.endsWith("%")&&ys(e.slice(0,-1)),q=e=>py.test(e),jn=e=>hS.test(e),yS=new Set(["length","size","percentage"]),wS=e=>Ks(e,yS,my),bS=e=>Ks(e,"position",my),xS=new Set(["image","url"]),_S=e=>Ks(e,xS,CS),SS=e=>Ks(e,"",kS),ai=()=>!0,Ks=(e,t,n)=>{const r=py.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},ES=e=>fS.test(e)&&!pS.test(e),my=()=>!1,kS=e=>mS.test(e),CS=e=>gS.test(e),TS=()=>{const e=le("colors"),t=le("spacing"),n=le("blur"),r=le("brightness"),s=le("borderColor"),i=le("borderRadius"),o=le("borderSpacing"),a=le("borderWidth"),l=le("contrast"),u=le("grayscale"),d=le("hueRotate"),c=le("invert"),h=le("gap"),f=le("gradientColorStops"),v=le("gradientColorStopPositions"),y=le("inset"),x=le("margin"),g=le("op
150acity"),m=le("padding"),w=le("saturate"),_=le("scale"),S=le("sepia"),k=le("skew"),E=le("space"),C=le("translate"),O=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",q,t],U=()=>[q,t],V=()=>["",on,On],L=()=>["auto",ys,q],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],Q=()=>["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"],N=()=>["","0",q],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[ys,q];return{cacheSize:500,separator:":",theme:{colors:[ai],spacing:[on,On],blur:["none","",jn,q],brightness:D(),borderColor:[e],borderRadius:["none","","full",jn,q],borderSpacing:U(),borderWidth:V(),contrast:D(),grayscale:N(),hueRotate:D(),invert:N(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[vS,On],inset:W(),margin:W(),opacity:D(),padding:U(),saturate:D(),scale:D(),sepia:N(),skew:D(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",q]}],container:["container"],columns:[{columns:[jn]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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:[...J(),q]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",oi,q]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",q]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",oi,q]}],"grid-cols":[{"grid-cols":[ai]}],"col-start-end":[{col:["auto",{span:["full",oi,q]},q]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[ai]}],"row-start-end":[{row:["auto",{span:[oi,q]},q]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",q]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"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:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],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",q,t]}],"min-w":[{"min-w":[q,t,"min","max","fit"]}],"max-w":[{"max-w":[q,t,"none","full","min","max","fit","prose",{screen:[jn]},jn]}],h:[{h:[q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",jn,On]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_u]}],"font-family":[{font:[ai]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",q]}],"line-clamp":[{"line-clamp":["none",ys,_u]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",on,q]}],"list-image":[{"list-image":["none",q]}],"list-style-type":[{list:["none","disc","decimal",q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",on,On]}],"underline-offset":[{"underline-offset":["auto",on,q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q]}],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",q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),bS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_S]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
vendor: 5,100 bytes, line 150
150],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],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":[g]}],"border-style":[{border:[...B(),"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":[g]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[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:["",...B()]}],"outline-offset":[{"outline-offset":[on,q]}],"outline-w":[{outline:[on,On]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[on,On]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",jn,SS]}],"shadow-color":[{shadow:[ai]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",jn,q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"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":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",q]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",q]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[oi,q]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",q]}],accent:[{accent:["auto",e]}],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",q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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,612 bytes, line 150
150],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",q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[on,On,_u]}],stroke:[{stroke:[e,"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-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"]}}},RS=uS(TS);function Ce(...e){return RS(sy(e))}const PS=U_,gy=b.forwardRef(({className:e,...t},n)=>p.jsx(Yv,{ref:n,className:Ce("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]",e),...t}));gy.displayName=Yv.displayName;const NS=rh("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"}}),vy=b.forwardRef(({className:e,variant:t,...n},r)=>p.jsx(Xv,{ref:r,className:Ce(NS({variant:t}),e),...n}));vy.displayName=Xv.displayName;const AS=b.forwardRef(({className:e,...t},n)=>p.jsx(ty,{ref:n,className:Ce("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));AS.displayName=ty.displayName;const yy=b.forwardRef(({className:e,...t},n)=>p.jsx(ny,{ref:n,className:Ce("absolute right-2 top-2 rounded-md p-1 text-foreground
150/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(Q_,{className:"h-4 w-4"})}));yy.displayName=ny.displayName;const wy=b.forwardRef(({className:e,...t},n)=>p.jsx(Zv,{ref:n,className:Ce("text-sm font-semibold",e),...t}));wy.displayName=Zv.displayName;const by=b.forwardRef(({className:e,...t},n)=>p.jsx(ey,{ref:n,className:Ce("text-sm opacity-90",e),...t}));by.displayName=ey.displayName;function OS(){const{toasts:e}=Rv();return p.jsxs(PS,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return p.jsxs(vy,{...i,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(wy,{children:n}),r&&p.jsx(by,{children:r})]}),s,p.jsx(yy,{})]},t)}),p.jsx(gy,{})]})}var qf=["light","dark"],jS="(prefers-color-scheme: dark)",IS=b.createContext(void 0),LS={setTheme:e=>{},themes:[]},$S=()=>{var e;return(e=b.useContext(IS))!=null?e:LS};b.memo(({forcedTheme:e,storageKey:t,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;
150${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,c=s?qf.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(v,y=!1,x=!0)=>{let g=o?o[v]:v,m=y?v+"|| ''":`'${g}'`,w="";return s&&x&&!y&&qf.includes(v)&&(w+=`d.style.colorScheme = '${v}';`),n==="class"?y||g?w+=`c.add(${m})`:w+="null":g&&(w+=`d[s](n,${m})`),w},f=e?`!function(){${d}${h(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${jS}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${u?"":"else{"+h(i,!1,!1)+"}"}${c}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${c}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var DS=e=>{switch(e){case"success":return FS;case"info":return zS;case"warning":return BS;case"error":return WS;default:return null}},MS=Array(12).fill(0),US=({visible:e})=>A.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},A.createElement("div",{className:"sonner-spinner"},MS.map((t,n)=>A.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),FS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),BS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},A.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"})),zS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),WS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),HS=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},jc=1,VS=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:jc++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>
150this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0;return r.then(async i=>{if(qS(i)&&!i.ok){s=!1;let o=typeof t.error=="function"?await t.error(`HTTP error! status: ${i.status}`):t.error,a=typeof t.description=="function"?await t.description(`HTTP error! status: ${i.status}`):t.description;this.create({id:n,type:"error",message:o,description:a})}else if(t.success!==void 0){s=!1;let o=typeof t.success=="function"?await t.success(i):t.success,a=typeof t.description=="function"?await t.description(i):t.description;this.create({id:n,type:"success",message:o,description:a})}}).catch(async i=>{if(t.error!==void 0){s=!1;let o=typeof t.error=="function"?await t.error(i):t.error,a=typeof t.description=="function"?await t.description(i):t.description;this.create({id:n,type:"error",message:o,description:a})}}).finally(()=>{var i;s&&(this.dismiss(n),n=void 0),(i=t.finally)==null||i.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||jc++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},it=new VS,KS=(e,t)=>{let n=(t==null?void 0:t.id)||jc++;return it.addToast({title:e,...t,id:n}),n},qS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",GS=KS,JS=()=>it.toasts,pn=Object.assign(GS,{success:it.success,info:it.info,warning:it.warning,error:it.error,custom:it.custom,message:it.message,promise:it.promise,dismiss:it.dismiss,loading:it.loading},{getHistory:JS});function QS(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}QS(`: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}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-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;
150left: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;background:var(--gray1);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}: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:0;right:0;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}
150: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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);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-border: hsl(0, 0%, 20%);--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%);--error-text: hsl(358, 100%, 81%)}[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%)} 151`);function Vo(e){return e.label!==void 0}var YS=3,XS="32px",ZS=4e3,e1=356,t1=14,n1=20,r1=200;function s1(...e){return e.filter(Boolean).join(" ")}var i1=e=>{var t,n,r,s,i,o,a,l,u,d;let{invert:c,toast:h,unstyled:f,interacting:v,setHeights:y,visibleToasts:x,heights:g,index:m,toasts:w,expanded:_,removeToast:S,defaultRichColors:k,closeButton:E,style:C,cancelButtonStyle:O,actionButtonStyle:j,className:W="",descriptionClassName:U="",duration:V,position:L,gap:J,loadingIcon:B,expandByDefault:Q,classNames:T,icons:N,closeButtonAriaLabel:F="Close toast",pauseWhenPageIsHidden:D,cn:H}=e,[X,he]=A.useState(!1),[rt,ne]=A.useState(!1),[kt,Cn]=A.useState(!1),[Tn,Rn]=A.useState(!1),[xo,zr]=A.useState(0),[fr,Ys]=A.useState(0),_o=A.useRef(null),Pn=A.useRef(null),zl=m===0,Wl=m+1<=x,Ae=h.type,Wr=h.dismissible!==!1,vw=h.className||"",yw=h.descriptionClassName||"",So=A.useMemo(()=>g.findIndex(K=>
151K.toastId===h.id)||0,[g,h.id]),ww=A.useMemo(()=>{var K;return(K=h.closeButton)!=null?K:E},[h.closeButton,E]),_h=A.useMemo(()=>h.duration||V||ZS,[h.duration,V]),Hl=A.useRef(0),Hr=A.useRef(0),Sh=A.useRef(0),Vr=A.useRef(null),[Eh,bw]=L.split("-"),kh=A.useMemo(()=>g.reduce((K,ae,se)=>se>=So?K:K+ae.height,0),[g,So]),Ch=HS(),xw=h.invert||c,Vl=Ae==="loading";Hr.current=A.useMemo(()=>So*J+kh,[So,kh]),A.useEffect(()=>{he(!0)},[]),A.useLayoutEffect(()=>{if(!X)return;let K=Pn.current,ae=K.style.height;K.style.height="auto";let se=K.getBoundingClientRect().height;K.style.height=ae,Ys(se),y(Bt=>Bt.find(zt=>zt.toastId===h.id)?Bt.map(zt=>zt.toastId===h.id?{...zt,height:se}:zt):[{toastId:h.id,height:se,position:h.position},...Bt])},[X,h.title,h.description,y,h.id]);let Nn=A.useCallback(()=>{ne(!0),zr(Hr.current),y(K=>K.filter(ae=>ae.toastId!==h.id)),setTimeout(()=>{S(h)},r1)},[h,S,y,Hr]);A.useEffect(()=>{if(h.promise&&Ae==="loading"||h.duration===1/0||h.type==="loading")return;let K,ae=_h;return _||v||D&&Ch?(()=>{if(Sh.current<Hl.current){let se=new Date().getTime()-Hl.current;ae=ae-se}Sh.current=new Date().getTime()})():ae!==1/0&&(Hl.current=new Date().getTime(),K=setTimeout(()=>{var se;(se=h.onAutoClose)==null||se.call(h,h),Nn()},ae)),()=>clearTimeout(K)},[_,v,Q,h,_h,Nn,h.promise,Ae,D,Ch]),A.useEffect(()=>{let K=Pn.current;if(K){let ae=K.getBoundingClientRect().height;return Ys(ae),y(se=>[{toastId:h.id,height:ae,position:h.position},...se]),()=>y(se=>se.filter(Bt=>Bt.toastId!==h.id))}},[y,h.id]),A.useEffect(()=>{h.delete&&Nn()},[Nn,h.delete]);function _w(){return N!=null&&N.loading?A.createElement("div",{className:"sonner-loader","data-visible":Ae==="loading"},N.loading):B?A.createElement("div",{className:"sonner-loader","data-visible":Ae==="loading"},B):A.createElement(US,{visible:Ae==="loading"})}return A.createElement("li",{"aria-live":h.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Pn,className:H(W,vw,T==null?void 0:T.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[Ae],(n=h==null?void 0:h.classNames)==null?void 0:n[Ae]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:k,"data-styled":!(h.jsx||h.unstyled||f),"data-mounted":X,"data-promise":!!h.promise,"data-removed":rt,"data-visible":Wl,"data-y-position":Eh,"data-x-position":bw,"data-index":m,"data-front":zl,"data-swiping":kt,"data-dismissible":Wr,"data-type":Ae,"data-invert":xw,"data-swipe-out":Tn,"data-expanded":!!(_||Q&&X),style:{"--index":m,"--toasts-before":m,"--z-index":w.length-m,"--offset":`${rt?xo:Hr.current}px`,"--initial-height":Q?"auto":`${fr}px`,...C,...h.style},onPointerDown:K=>{Vl||!Wr||(_o.current=new Date,zr(Hr.current),K.target.setPointerCapture(K.pointerId),K.target.tagName!=="BUTTON"&&(Cn(!0),Vr.current={x:K.clientX,y:K.clientY}))},onPointerUp:()=>{var K,ae,se,Bt;if(Tn||!Wr)return;Vr.current=null;let zt=Number(((K=Pn.current)==null?void 0:K.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Eo=new Date().getTime()-((ae=_o.current)==null?void 0:ae.getTime()),Sw=Math.abs(zt)/Eo;if(Math.abs(zt)>=n1||Sw>.11){zr(Hr.current),(se=h.onDismiss)==null||se.call(h,h),Nn(),Rn(!0);return}(Bt=Pn.current)==null||Bt.style.setProperty("--swipe-amount","0px"),Cn(!1)},onPointerMove:K=>{var ae;if(!Vr.current||!Wr)return;let se=K.clientY-Vr.current.y,Bt=K.clientX-Vr.current.x,zt=(Eh==="top"?Math.min:Math.max)(0,se),Eo=K.pointerType==="touch"?10:2;Math.abs(zt)>Eo?(ae=Pn.current)==null||ae.style.setProperty("--swipe-amount",`${se}px`):Math.abs(Bt)>Eo&&(Vr.current=null)}},ww&&!h.jsx?A.createElement("button",{"aria-label":F,"data-disabled":Vl,"data-close-button":!0,onClick:Vl||!Wr?()=>{}:()=>{var K;Nn(),(K=h.onDismiss)==null||K.call(h,h)},className:H(T==null?void 0:T.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},A.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"},A.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,h.jsx||A.isValidElement(h.title)?h.jsx||h.title:A.createElement(A.Fragment,null,Ae||h.icon||h.promise?A.createElement("div",{"data-icon":"",className:H(T==null?void 0:T.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||_w():null,h.type!=="loading"?h.icon||(N==null?void 0:N[Ae])||DS(Ae):null):null,A.createElement("div",{"data-content":"",className:H(T==null?void 0:T.content,(o=h==null?void 0:h.classNames)==null?void 0:o.content)},A.createElement("div",{"data-title":"",className:H(T==null?void 0:T.title,(a=h==null?void 0:h.classNames)==null?void 0:a.title)},h.title),h.description?A.createElement("div",{"data-description":"",className:H(U,yw,T==null?void 0:T.description,(l=h==null?void 0:h.classNames)==null?void 0:l.description)},h.description):null),A.isValidElement(h.cancel)?h.cancel:h.cancel&&Vo(h.cancel)?A.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:K=>{var ae,se;
151Vo(h.cancel)&&Wr&&((se=(ae=h.cancel).onClick)==null||se.call(ae,K),Nn())},className:H(T==null?void 0:T.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,A.isValidElement(h.action)?h.action:h.action&&Vo(h.action)?A.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||j,onClick:K=>{var ae,se;Vo(h.action)&&(K.defaultPrevented||((se=(ae=h.action).onClick)==null||se.call(ae,K),Nn()))},className:H(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function Gf(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var o1=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:i,className:o,offset:a,theme:l="light",richColors:u,duration:d,style:c,visibleToasts:h=YS,toastOptions:f,dir:v=Gf(),gap:y=t1,loadingIcon:x,icons:g,containerAriaLabel:m="Notifications",pauseWhenPageIsHidden:w,cn:_=s1}=e,[S,k]=A.useState([]),E=A.useMemo(()=>Array.from(new Set([n].concat(S.filter(D=>D.position).map(D=>D.position)))),[S,n]),[C,O]=A.useState([]),[j,W]=A.useState(!1),[U,V]=A.useState(!1),[L,J]=A.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=A.useRef(null),Q=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=A.useRef(null),N=A.useRef(!1),F=A.useCallback(D=>{var H;(H=S.find(X=>X.id===D.id))!=null&&H.delete||it.dismiss(D.id),k(X=>X.filter(({id:he})=>he!==D.id))},[S]);return A.useEffect(()=>it.subscribe(D=>{if(D.dismiss){k(H=>H.map(X=>X.id===D.id?{...X,delete:!0}:X));return}setTimeout(()=>{Cv.flushSync(()=>{k(H=>{let X=H.findIndex(he=>he.id===D.id);return X!==-1?[...H.slice(0,X),{...H[X],...D},...H.slice(X+1)]:[D,...H]})})})}),[]),A.useEffect(()=>{if(l!=="system"){J(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:D})=>{J(D?"dark":"light")})},[l]),A.useEffect(()=>{S.length<=1&&W(!1)},[S]),A.useEffect(()=>{let D=H=>{var X,he;r.every(rt=>H[rt]||H.code===rt)&&(W(!0),(X=B.current)==null||X.focus()),H.code==="Escape"&&(document.activeElement===B.current||(he=B.current)!=null&&he.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[r]),A.useEffect(()=>{if(B.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,N.current=!1)}},[B.current]),S.length?A.createElement("section",{"aria-label":`${m} ${Q}`,tabIndex:-1},E.map((D,H)=>{var X;let[he,rt]=D.split("-");return A.createElement("ol",{key:D,dir:v==="auto"?Gf():v,tabIndex:-1,ref:B,className:o,"data-sonner-toaster":!0,"data-theme":L,"data-y-position":he,"data-x-position":rt,style:{"--front-toast-height":`${((X=C[0])==null?void 0:X.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||XS,"--width":`${e1}px`,"--gap":`${y}px`,...c},onBlur:ne=>{N.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(N.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||N.current||(N.current=!0,T.current=ne.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{U||W(!1)},onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},S.filter(ne=>!ne.position&&H===0||ne.position===D).map((ne,kt)=>{var Cn,Tn;return A.createElement(i1,{key:ne.id,icons:g,index:kt,toast:ne,defaultRichColors:u,duration:(Cn=f==null?void 0:f.duration)!=null?Cn:d,className:f==null?void 0:f.className,descriptionClassName:f==null?void 0:f.descriptionClassName,invert:t,visibleToasts:h,closeButton:(Tn=f==null?void 0:f.closeButton)!=null?Tn:i,interacting:U,position:D,style:f==null?void 0:f.style,unstyled:f==null?void 0:f.unstyled,classNames:f==null?void 0:f.classNames,cancelButtonStyle:f==null?void 0:f.cancelButtonStyle,actionButtonStyle:f==null?void 0:f.actionButtonStyle,removeToast:F,toasts:S.filter(Rn=>Rn.position==ne.position),heights:C.filter(Rn=>Rn.position==ne.position),setHeights:O,expandByDefault:s,gap:y,loadingIcon:x,expanded:j,pauseWhenPageIsHidden:w,cn:_})}))})):null};const a1=({...e})=>{const{theme:t="system"}=$S();return p.jsx(o1,{theme:t,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"}},...e})};function l1(e,t=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];const u=c=>{var g;const{scope:h,children:f,...v}=c,y=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,x=b.useMemo(()=>v,Object.values(v));return p.jsx(y.Provider,{value:x,children:f})};u.displayName=i+"Provider";function d(c,h){var y;const f=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,v=b.useContext(f);if(v)return v;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=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,u1(s,...t)]}function u1(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.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 b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var c1="DismissableLayer",Ic="dismissableLayer.update",d1="dismissableLayer.pointerDownOutside",h1="dismissableLayer.focusOutside",Jf,xy=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_y=b.forwardRef((e,t)=>
vendor: 14,950 bytes, line 151
151{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=b.useContext(xy),[d,c]=b.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),v=$e(t,E=>c(E)),y=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(x),m=d?y.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,_=m>=g,S=m1(E=>{const C=E.target,O=[...u.branches].some(j=>j.contains(C));!_||O||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},h),k=g1(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())},h);return Ov(E=>{m===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Jf=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Qf(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Jf)}},[d,h,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Qf())},[d,u]),b.useEffect(()=>{const E=()=>f({});return document.addEventListener(Ic,E),()=>document.removeEventListener(Ic,E)},[]),p.jsx(we.div,{...l,ref:v,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,S.onPointerDownCapture)})});_y.displayName=c1;var f1="DismissableLayerBranch",p1=b.forwardRef((e,t)=>{const n=b.useContext(xy),r=b.useRef(null),s=$e(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(we.div,{...e,ref:s})});p1.displayName=f1;function m1(e,t=globalThis==null?void 0:globalThis.document){const n=ft(e),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Sy(d1,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function g1(e,t=globalThis==null?void 0:globalThis.document){const n=ft(e),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&Sy(h1,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Qf(){const e=new CustomEvent(Ic);document.dispatchEvent(e)}function Sy(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Yd(s,i):s.dispatchEvent(i)}var v1=Sm.useId||(()=>{}),y1=0;function w1(e){const[t,n]=b.useState(v1());return tn(()=>{n(r=>r??String(y1++))},[e]),t?`radix-${t}`:""}const b1=["top","right","bottom","left"],or=Math.min,at=Math.max,Va=Math.round,Ko=Math.floor,ar=e=>({x:e,y:e}),x1={left:"right",right:"left",bottom:"top",top:"bottom"},_1={start:"end",end:"start"};function Lc(e,t,n){return at(e,or(t,n))}function Sn(e,t){return typeof e=="function"?e(t):e}function En(e){return e.split("-")[0]}function qs(e){return e.split("-")[1]}function oh(e){return e==="x"?"y":"x"}function ah(e){return e==="y"?"height":"width"}function lr(e){return["top","bottom"].includes(En(e))?"y":"x"}function lh(e){return oh(lr(e))}function S1(e,t,n){n===void 0&&(n=!1);const r=qs(e),s=lh(e),i=ah(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ka(o)),[o,Ka(o)]}function E1(e){const t=Ka(e);return[$c(e),t,$c(t)]}function $c(e){return e.replace(/start|end/g,t=>_1[t])}function k1(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function C1(e,t,n,r){const s=qs(e);let i=k1(En(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map($c)))),i}function Ka(e){return e.replace(/left|right|bottom|top/g,t=>x1[t])}function T1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ey(e){return typeof e!="number"?T1(e):{top:e,right:e,bottom:e,left:e}}function qa(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Yf(e,t,n){let{reference:r,floating:s}=e;const i=lr(t),o=lh(t),a=ah(o),l=En(t),u=i==="y",d=r.x+r.width/2-s.width/2,c=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-s.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:c};break;case"left":f={x:r.x-s.width,y:c};break;default:f={x:r.x,y:r.y}}switch(qs(t)){case"start":f[o]-=h*(n&&u?-1:1);break;case"end":f[o]+=h*(n&&u?-1:1);break}return f}const R1=async(e,t,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(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:c}=Yf(u,r,l),h=r,f={},v=0;for(let y=0;y<a.length;y++){const{name:x,fn:g}=a[y],{x:m,y:w,data:_,reset:S}=await g({x:d,y:c,initialPlacement:r,placement:h,strategy:s,middlewareData:f,rects:u,platform:o,elements:{reference:e,floating:t}});d=m??d,c=w??c,f={...f,[x]:{...f[x],..._}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:d,y:c}=Yf(u,h,l)),y=-1)}return{x:d,y:c,placement:h,strategy:s,middlewareData:f}};async function Gi(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:f=0}=Sn(t,e),v=Ey(f),x=a[h?c==="floating"?"reference":"floating":c],g=qa(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})),m=c==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},S=qa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:l}):m);return{top:(g.top-S.top+v.top)/_.y,bottom:(S.bottom-g.bottom+v.bottom)/_.y,left:(g.left-S.left+v.left)/_.x,right:(S.right-g.right+v.right)/_.x}}const P1=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Sn(e,t)||{};if(u==null)return{};const c=Ey(d),h={x:n,y:r},f=lh(s),v=ah(f),y=await o.getDimensions(u),x=f==="y",g=x?"top":"left",m=x?"bottom":"right",w=x?"clientHeight":"clientWidth",_=i.reference[v]+i.reference[f]-h[f]-i.floating[v],S=h[f]-i.reference[f],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=k?k[w]:0;(!E||!await(o.isElement==null?void 0:o.isElement(k)))&&(E=a.floating[w]||i.floating[v]);const C=_/2-S/2,O=E/2-y[v]/2-1,j=or(c[g],O),W=or(c[m],O),U=j,V=E-y[v]-W,L=E/2-y[v]/2+C,J=Lc(U,L,V),B=!l.arrow&&qs(s)!=null&&L!==J&&i.reference[v]/2-(L<U?j:W)-y[v]/2<0,Q=B?L<U?L-U:L-V:0;return{[f]:h[f]+Q,data:{[f]:J,centerOffset:L-J-Q,...B&&{alignmentOffset:Q}},reset:B}}}),N1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...x}=Sn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=En(s),m=lr(a),w=En(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=h||(w||!y?[Ka(a)]:E1(a)),k=v!=="none";!h&&k&&S.push(...C1(a,y,v,_));const E=[a,...S],C=await Gi(t,x),O=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&O.push(C[g]),c){const L=S1(s,o,_);O.push(C[L[0]],C[L[1]])}if(j=[...j,{placement:s,overflows:O}],!O.every(L=>L<=0)){var W,U;const L=(((W=i.flip)==null?void 0:W.index)||0)+1,J=E[L];if(J)return{data:{index:L,overflows:j},reset:{placement:J}};let B=(U=j.filter(Q=>Q.overflows[0]<=0).sort((Q,T)=>Q.overflows[1]-T.overflows[1])[0])==null?void 0:U.placement;if(!B)switch(f){case"bestFit":{var V;const Q=(V=j.filter(T=>{if(k){const N=lr(T.placement);return N===m||N==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(N=>N>0).reduce((N,F)=>N+F,0)]).sort((T,N)=>T[1]-N[1])[0])==null?void 0:V[0];Q&&(B=Q);break}case"initialPlacement":B=a;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function Xf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zf(e){return b1.some(t=>e[t]>=0)}const A1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Sn(e,t);switch(r){case"referenceHidden":{const i=await Gi(t,{...s,elementContext:"reference"}),o=Xf(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Zf(o)}}}case"escaped":{const i=await Gi(t,{...s,altBoundary:!0}),o=Xf(i,n.floating);return{data:{escapedOffsets:o,escaped:Zf(o)}}}default:return{}}}}};async function O1(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=En(n),a=qs(n),l=lr(n)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,c=Sn(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof v=="number"&&(f=a==="end"?v*-1:v),l?{x:f*d,y:h*u}:{x:h*u,y:f*d}}const j1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await O1(t,e);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}}}}},I1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:g,y:m}=x;return{x:g,y:m}}},...l}=Sn(e,t),u={x:n,y:r},d=await Gi(t,l),c=lr(En(s)),h=oh(c);let f=u[h],v=u[c];if(i){const x=h==="y"?"top":"left",g=h==="y"?"bottom":"right",m=f+d[x],w=f-d[g];f=Lc(m,f,w)}if(o){const x=c==="y"?"top":"left",g=c==="y"?"bottom":"right",m=v+d[x],w=v-d[g];v=Lc(m,v,w)}const y=a.fn({...t,[h]:f,[c]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:i,[c]:o}}}}}},L1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Sn(e,t),d={x:n,y:r},c=lr(s),h=oh(c);let f=d[h],v=d[c];const y=Sn(a,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=h==="y"?"height":"width",_=i.reference[h]-i.floating[w]+x.mainAxis,S=i.reference[h]+i.reference[w]-x.mainAxis;f<_?f=_:f>S&&(f=S)}if(u){var g,m;const w=h==="y"?"width":"height",_=["top","left"].includes(En(s)),S=i.reference[c]-i.floating[w]+(_&&((g=o.offset)==null?void 0:g[c])||0)+(_?0:x.crossAxis),k=i.reference[c]+i.reference[w]+(_?0:((m=o.offset)==null?void 0:m[c])||0)-(_?x.crossAxis:0);v<S?v=S:v>k&&(v=k)}return{[h]:f,[c]:v}}}},$1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Sn(e,t),d=await Gi(t,u),c=En(s),h=qs(s),f=lr(s)==="y",{width:v,height:y}=i.floating;let x,g;c==="top"||c==="bottom"?(x=c,g=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=c,x=h==="end"?"top":"bottom");const m=y-d.top-d.bottom,w=v-d.left-d.right,_=or(y-d[x],m),S=or(v-d[g],w),k=!t.middlewareData.shift;let E=_,C=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=m),k&&!h){const j=at(d.left,0),W=at(d.right,0),U=at(d.top,0),V=at(d.bottom,0);f?C=v-2*(j!==0||W!==0?j+W:at(d.left,d.right)):E=y-2*(U!==0||V!==0?U+V:at(d.top,d.bottom))}await l({...t,availableWidth:C,availableHeight:E});const O=await o.getDimensions(a.floating);return v!==O.width||y!==O.height?{reset:{rects:!0}}:{}}}};function Tl(){return typeof window<"u"}function Gs(e){return ky(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rn(e){var t;return(t=(ky(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ky(e){return Tl()?e instanceof Node||e instanceof dt(e).Node:!1}function Ut(e){return Tl()?e instanceof Element||e instanceof dt(e).Element:!1}function nn(e){return Tl()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function ep(e){return!Tl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}function vo(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function D1(e){return["table","td","th"].includes(Gs(e))}function Rl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function uh(e){const t=ch(),n=Ut(e)?Ft(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function M1(e){let t=ur(e);for(;nn(t)&&!Ms(t);){if(uh(t))return t;if(Rl(t))return null;t=ur(t)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ms(e){return["html","body","#document"].includes(Gs(e))}function Ft(e){return dt(e).getComputedStyle(e)}function Pl(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ur(e){if(Gs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ep(e)&&e.host||rn(e);return ep(t)?t.host:t}function Cy(e){const t=ur(e);return Ms(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&vo(t)?t:Cy(t)}
vendor: 3,787 bytes, line 151
151function Ji(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Cy(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=dt(s);if(i){const a=Dc(o);return t.concat(o,o.visualViewport||[],vo(s)?s:[],a&&n?Ji(a):[])}return t.concat(s,Ji(s,[],n))}function Dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ty(e){const t=Ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=nn(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Va(n)!==i||Va(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function dh(e){return Ut(e)?e:e.contextElement}function ws(e){const t=dh(e);if(!nn(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=Ty(t);let o=(i?Va(n.width):n.width)/r,a=(i?Va(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const U1=ar(0);function Ry(e){const t=dt(e);return!ch()||!t.visualViewport?U1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function F1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==dt(e)?!1:t}function Dr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=dh(e);let o=ar(1);t&&(r?Ut(r)&&(o=ws(r)):o=ws(e));const a=F1(i,n,r)?Ry(i):ar(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 h=dt(i),f=r&&Ut(r)?dt(r):r;let v=h,y=Dc(v);for(;y&&r&&f!==v;){const x=ws(y),g=y.getBoundingClientRect(),m=Ft(y),w=g.left+(y.clientLeft+parseFloat(m.paddingLeft))*x.x,_=g.top+(y.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,c*=x.y,l+=w,u+=_,v=dt(y),y=Dc(v)}}return qa({width:d,height:c,x:l,y:u})}function B1(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=rn(r),a=t?Rl(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ar(1);const d=ar(0),c=nn(r);if((c||!c&&!i)&&((Gs(r)!=="body"||vo(o))&&(l=Pl(r)),nn(r))){const h=Dr(r);u=ws(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function z1(e){return Array.from(e.getClientRects())}function Mc(e,t){const n=Pl(e).scrollLeft;return t?t.left+n:Dr(rn(e)).left+n}function W1(e){const t=rn(e),n=Pl(e),r=e.ownerDocument.body,s=at(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=at(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Mc(e);const a=-n.scrollTop;return Ft(r).direction==="rtl"&&(o+=at(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function H1(e,t){const n=dt(e),r=rn(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=ch();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function V1(e,t){const n=Dr(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=nn(e)?ws(e):ar(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function tp(e,t,n){let r;if(t==="viewport")r=H1(e,n);else if(t==="document")r=W1(rn(e));else if(Ut(t))r=V1(t,n);else{const s=Ry(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return qa(r)}function Py(e,t){const n=ur(e);return n===t||!Ut(n)||Ms(n)?!1:Ft(n).position==="fixed"||Py(n,t)}function K1(e,t){const n=t.get(e);if(n)return n;let r=Ji(e,[],!1).filter(a=>Ut(a)&&Gs(a)!=="body"),s=null;const i=Ft(e).position==="fixed";let o=i?ur(e):e;for(;Ut(o)&&!Ms(o);){const a=Ft(o),l=uh(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||vo(o)&&!l&&Py(e,o))?r=r.filter(d=>d!==o):s=a,o=ur(o)}return t.set(e,r),r}function q1(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Rl(t)?[]:K1(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const c=tp(t,d,s);
vendor: 9,857 bytes, line 151
151return u.top=at(c.top,u.top),u.right=or(c.right,u.right),u.bottom=or(c.bottom,u.bottom),u.left=at(c.left,u.left),u},tp(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function G1(e){const{width:t,height:n}=Ty(e);return{width:t,height:n}}function J1(e,t,n){const r=nn(t),s=rn(t),i=n==="fixed",o=Dr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ar(0);if(r||!r&&!i)if((Gs(t)!=="body"||vo(s))&&(a=Pl(t)),r){const f=Dr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&(l.x=Mc(s));let u=0,d=0;if(s&&!r&&!i){const f=s.getBoundingClientRect();d=f.top+a.scrollTop,u=f.left+a.scrollLeft-Mc(s,f)}const c=o.left+a.scrollLeft-l.x-u,h=o.top+a.scrollTop-l.y-d;return{x:c,y:h,width:o.width,height:o.height}}function Su(e){return Ft(e).position==="static"}function np(e,t){if(!nn(e)||Ft(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return rn(e)===n&&(n=n.ownerDocument.body),n}function Ny(e,t){const n=dt(e);if(Rl(e))return n;if(!nn(e)){let s=ur(e);for(;s&&!Ms(s);){if(Ut(s)&&!Su(s))return s;s=ur(s)}return n}let r=np(e,t);for(;r&&D1(r)&&Su(r);)r=np(r,t);return r&&Ms(r)&&Su(r)&&!uh(r)?n:r||M1(e)||n}const Q1=async function(e){const t=this.getOffsetParent||Ny,n=this.getDimensions,r=await n(e.floating);return{reference:J1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Y1(e){return Ft(e).direction==="rtl"}const X1={convertOffsetParentRelativeRectToViewportRelativeRect:B1,getDocumentElement:rn,getClippingRect:q1,getOffsetParent:Ny,getElementRects:Q1,getClientRects:z1,getDimensions:G1,getScale:ws,isElement:Ut,isRTL:Y1};function Z1(e,t){let n=null,r;const s=rn(e);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{left:u,top:d,width:c,height:h}=e.getBoundingClientRect();if(a||t(),!c||!h)return;const f=Ko(d),v=Ko(s.clientWidth-(u+c)),y=Ko(s.clientHeight-(d+h)),x=Ko(u),m={rootMargin:-f+"px "+-v+"px "+-y+"px "+-x+"px",threshold:at(0,or(1,l))||1};let w=!0;function _(S){const k=S[0].intersectionRatio;if(k!==l){if(!w)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(_,{...m,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,m)}n.observe(e)}return o(!0),i}function eE(e,t,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=dh(e),d=s||i?[...u?Ji(u):[],...Ji(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const c=u&&a?Z1(u,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(g=>{let[m]=g;m&&m.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),u&&!l&&f.observe(u),f.observe(t));let v,y=l?Dr(e):null;l&&x();function x(){const g=Dr(e);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&n(),y=g,v=requestAnimationFrame(x)}return n(),()=>{var g;d.forEach(m=>{s&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),c==null||c(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(v)}}const tE=j1,nE=I1,rE=N1,sE=$1,iE=A1,rp=P1,oE=L1,aE=(e,t,n)=>{const r=new Map,s={platform:X1,...n},i={...s.platform,_c:r};return R1(e,t,{...s,platform:i})};var ya=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Ga(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ga(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!Ga(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ay(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sp(e,t){const n=Ay(e);return Math.round(t*n)/n}function Eu(e){const t=b.useRef(e);return ya(()=>{t.current=e}),t}function lE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=b.useState(r);Ga(h,r)||f(r);const[v,y]=b.useState(null),[x,g]=b.useState(null),m=b.useCallback(T=>{T!==k.current&&(k.current=T,y(T))},[]),w=b.useCallback(T=>{T!==E.current&&(E.current=T,g(T))},[]),_=i||v,S=o||x,k=b.useRef(null),E=b.useRef(null),C=b.useRef(d),O=l!=null,j=Eu(l),W=Eu(s),U=Eu(u),V=b.useCallback(()=>{if(!k.current||!E.current)return;const T={placement:t,strategy:n,middleware:h};W.current&&(T.platform=W.current),aE(k.current,E.current,T).then(N=>{const F={...N,isPositioned:U.current!==!1};L.current&&!Ga(C.current,F)&&(C.current=F,Hs.flushSync(()=>{c(F)}))})},[h,t,n,W,U]);ya(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,c(T=>({...T,isPositioned:!1})))},[u]);const L=b.useRef(!1);ya(()=>(L.current=!0,()=>{L.current=!1}),[]),ya(()=>{if(_&&(k.current=_),S&&(E.current=S),_&&S){if(j.current)return j.current(_,S,V);V()}},[_,S,V,j,O]);const J=b.useMemo(()=>({reference:k,floating:E,setReference:m,setFloating:w}),[m,w]),B=b.useMemo(()=>({reference:_,floating:S}),[_,S]),Q=b.useMemo(()=>{const T={position:n,left:0,top:0};if(!B.floating)return T;const N=sp(B.floating,d.x),F=sp(B.floating,d.y);return a?{...T,transform:"translate("+N+"px, "+F+"px)",...Ay(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:F}},[n,a,B.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:V,refs:J,elements:B,floatingStyles:Q}),[d,V,J,B,Q])}const uE=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?rp({element:r.current,padding:s}).fn(n):{}:r?rp({element:r,padding:s}).fn(n):{}}}},cE=(e,t)=>({...tE(e),options:[e,t]}),dE=(e,t)=>({...nE(e),options:[e,t]}),hE=(e,t)=>({...oE(e),options:[e,t]}),fE=(e,t)=>({...rE(e),options:[e,t]}),pE=(e,t)=>({...sE(e),options:[e,t]}),mE=(e,t)=>({...iE(e),options:[e,t]}),gE=(e,t)=>({...uE(e),options:[e,t]});var vE="Arrow",Oy=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return p.jsx(we.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Oy.displayName=vE;var yE=Oy;function jy(e){const[t,n]=b.useState(void 0);return tn(()=>{if(e){n({width:e.offsetWidth,height:e.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=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Iy="Popper",[Ly,$y]=Vs(Iy),[gN,Dy]=Ly(Iy),My="PopperAnchor",Uy=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=Dy(My,n),o=b.useRef(null),a=$e(t,o);return b.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.jsx(we.div,{...s,ref:a})});Uy.displayName=My;var hh="PopperContent",[wE,bE]=Ly(hh),Fy=b.forwardRef((e,t)=>{var kt,Cn,Tn,Rn,xo,zr;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:h=!1,updatePositionStrategy:f="optimized",onPlaced:v,...y}=e,x=Dy(hh,n),[g,m]=b.useState(null),w=$e(t,fr=>m(fr)),[_,S]=b.useState(null),k=jy(_),E=(k==null?void 0:k.width)??0,C=(k==null?void 0:k.height)??0,O=r+(i!=="center"?"-"+i:""),j=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},W=Array.isArray(u)?u:[u],U=W.length>0,V={padding:j,boundary:W.filter(_E),altBoundary:U},{refs:L,floatingStyles:J,placement:B,isPositioned:Q,middlewareData:T}=lE({strategy:"fixed",placement:O,whileElementsMounted:(...fr)=>eE(...fr,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[cE({mainAxis:s+C,alignmentAxis:o}),l&&dE({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?hE():void 0,...V}),l&&fE({...V}),pE({...V,apply:({elements:fr,rects:Ys,availableWidth:_o,availableHeight:Pn})=>{const{width:zl,height:Wl}=Ys.reference,Ae=fr.floating.style;Ae.setProperty("--radix-popper-available-width",`${_o}px`),Ae.setProperty("--radix-popper-available-height",`${Pn}px`),Ae.setProperty("--radix-popper-anchor-width",`${zl}px`),Ae.setProperty("--radix-popper-anchor-height",`${Wl}px`)}}),_&&gE({element:_,padding:a}),SE({arrowWidth:E,arrowHeight:C}),h&&mE({strategy:"referenceHidden",...V})]}),[N,F]=Wy(B),D=ft(v);tn(()=>{Q&&(D==null||D())},[Q,D]);const H=(kt=T.arrow)==null?void 0:kt.x,X=(Cn=T.arrow)==null?void 0:Cn.y,he=((Tn=T.arrow)==null?void 0:Tn.centerOffset)!==0,[rt,ne]=b.useState();return tn(()=>{g&&ne(window.getComputedStyle(g).zIndex)},[g]),p.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:Q?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:rt,"--radix-popper-transform-origin":[(Rn=T.transformOrigin)==null?void 0:Rn.x,(xo=T.transformOrigin)==null?void 0:xo.y].join(" "),...((zr=T.hide)==null?void 0:zr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(wE,{scope:n,placedSide:N,onArrowChange:S,arrowX:H,arrowY:X,shouldHideArrow:he,children:p.jsx(we.div,{"data-side":N,"data-align":F,...y,ref:w,style:{...y.style,animation:Q?void 0:"none"}})})})});Fy.displayName=hh;var By="PopperArrow",xE={top:"bottom",right:"left",bottom:"top",left:"r
151ight"},zy=b.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=bE(By,r),o=xE[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(yE,{...s,ref:n,style:{...s.style,display:"block"}})})});zy.displayName=By;function _E(e){return e!==null}var SE=e=>({name:"transformOrigin",options:e,fn(t){var x,g,m;const{placement:n,rects:r,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=Wy(n),c={start:"0%",center:"50%",end:"100%"}[d],h=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,f=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let v="",y="";return u==="bottom"?(v=o?c:`${h}px`,y=`${-l}px`):u==="top"?(v=o?c:`${h}px`,y=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,y=o?c:`${f}px`):u==="left"&&(v=`${r.floating.width+l}px`,y=o?c:`${f}px`),{data:{x:v,y}}}});function Wy(e){const[t,n="center"]=e.split("-");return[t,n]}var EE=Uy,kE=Fy,CE=zy;function TE(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Hy=e=>{const{present:t,children:n}=e,r=RE(t),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=$e(r.ref,PE(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}):null};Hy.displayName="Presence";function RE(e){const[t,n]=b.useState(),r=b.useRef({}),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=TE(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=qo(r.current);i.current=a==="mounted"?u:"none"},[a]),tn(()=>{const u=r.current,d=s.current;if(d!==e){const h=i.current,f=qo(u);e?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),tn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=f=>{const y=qo(r.current).includes(f.animationName);if(f.target===t&&y&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=f=>{f.target===t&&(i.current=qo(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function qo(e){return(e==null?void 0:e.animationName)||"none"}function PE(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var[Nl,vN]=l1("Tooltip",[$y]),fh=$y(),Vy="TooltipProvider",NE=700,ip="tooltip.open",[AE,Ky]=Nl(Vy),qy=e=>{const{__scopeTooltip:t,delayDuration:n=NE,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=b.useState(!0),l=b.useRef(!1),u=b.useRef(0);return b.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),p.jsx(AE,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:b.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:b.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:i})};qy.displayName=Vy;var Gy="Tooltip",[yN,Al]=Nl(Gy),Uc="TooltipTrigger",OE=b.forwardRef((e,t)=>
vendor: 5,553 bytes, line 151
151{const{__scopeTooltip:n,...r}=e,s=Al(Uc,n),i=Ky(Uc,n),o=fh(n),a=b.useRef(null),l=$e(t,a,s.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),c=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),p.jsx(EE,{asChild:!0,...o,children:p.jsx(we.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ee(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ee(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ee(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:ee(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ee(e.onBlur,s.onClose),onClick:ee(e.onClick,s.onClose)})})});OE.displayName=Uc;var jE="TooltipPortal",[wN,IE]=Nl(jE,{forceMount:void 0}),Us="TooltipContent",Jy=b.forwardRef((e,t)=>{const n=IE(Us,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Al(Us,e.__scopeTooltip);return p.jsx(Hy,{present:r||o.open,children:o.disableHoverableContent?p.jsx(Qy,{side:s,...i,ref:t}):p.jsx(LE,{side:s,...i,ref:t})})}),LE=b.forwardRef((e,t)=>{const n=Al(Us,e.__scopeTooltip),r=Ky(Us,e.__scopeTooltip),s=b.useRef(null),i=$e(t,s),[o,a]=b.useState(null),{trigger:l,onClose:u}=n,d=s.current,{onPointerInTransitChange:c}=r,h=b.useCallback(()=>{a(null),c(!1)},[c]),f=b.useCallback((v,y)=>{const x=v.currentTarget,g={x:v.clientX,y:v.clientY},m=UE(g,x.getBoundingClientRect()),w=FE(g,m),_=BE(y.getBoundingClientRect()),S=WE([...w,..._]);a(S),c(!0)},[c]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&d){const v=x=>f(x,d),y=x=>f(x,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",y)}}},[l,d,f,h]),b.useEffect(()=>{if(o){const v=y=>{const x=y.target,g={x:y.clientX,y:y.clientY},m=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),w=!zE(g,o);m?h():w&&(h(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,o,u,h]),p.jsx(Qy,{...e,ref:i})}),[$E,DE]=Nl(Gy,{isInside:!1}),Qy=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Al(Us,n),u=fh(n),{onClose:d}=l;return b.useEffect(()=>(document.addEventListener(ip,d),()=>document.removeEventListener(ip,d)),[d]),b.useEffect(()=>{if(l.trigger){const c=h=>{const f=h.target;f!=null&&f.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),p.jsx(_y,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:p.jsxs(kE,{"data-state":l.stateAttribute,...u,...a,ref:t,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(Nv,{children:r}),p.jsx($E,{scope:n,isInside:!0,children:p.jsx(x_,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Jy.displayName=Us;var Yy="TooltipArrow",ME=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=fh(n);return DE(Yy,n).isInside?null:p.jsx(CE,{...s,...r,ref:t})});ME.displayName=Yy;function UE(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.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 FE(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function BE(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function zE(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,d=t[o].y;l>r!=d>r&&n<(u-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function WE(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),HE(t)}function HE(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[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(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var VE=qy,Xy=Jy;const KE=VE,qE=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Xy,{ref:r,sideOffset:t,className:Ce("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]:sli
151de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));qE.displayName=Xy.displayName;var Ol=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jl=typeof window>"u"||"Deno"in globalThis;function Nt(){}function GE(e,t){return typeof e=="function"?e(t):e}function JE(e){return typeof e=="number"&&e>=0&&e!==1/0}function QE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function op(e,t){return typeof e=="function"?e(t):e}function YE(e,t){return typeof e=="function"?e(t):e}function ap(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==ph(o,t.options))return!1}else if(!Yi(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function lp(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Qi(t.options.mutationKey)!==Qi(i))return!1}else if(!Yi(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function ph(e,t){return((t==null?void 0:t.queryKeyHashFn)||Qi)(e)}function Qi(e){return JSON.stringify(e,(t,n)=>Fc(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Yi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Yi(e[n],t[n])):!1}function Zy(e,t){if(e===t)return e;const n=up(e)&&up(t);if(n||Fc(e)&&Fc(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=Zy(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function up(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fc(e){if(!cp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!cp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cp(e){return Object.prototype.toString.call(e)==="[object Object]"}function XE(e){return new Promise(t=>{setTimeout(t,e)})}function ZE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Zy(e,t):t}function ek(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function tk(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var e0=Symbol();function t0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===e0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var kr,Bn,_s,sm,nk=(sm=class extends Ol{constructor(){super();te(this,kr);te(this,Bn);te(this,_s);G(this,_s,t=>{if(!jl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Bn)||this.setEventListener(R(this,_s))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Bn))==null||t.call(this),G(this,Bn,void 0))}setEventListener(t){var n;G(this,_s,t),(n=R(this,Bn))==null||n.call(this),G(this,Bn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,kr)!==t&&(G(this,kr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,kr)=="boolean"?R(this,kr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},kr=new WeakMap,Bn=new WeakMap,_s=new WeakMap,sm),n0=new nk,Ss,zn,Es,im,rk=(im=class extends Ol{constructor(){super();te(this,Ss,!0);te(this,zn);te(this,Es);G(this,Es,t=>{if(!jl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,zn)||this.setEventListener(R(this,Es))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,zn))==null||t.call(this),G(this,zn,void 0))}setEventListener(t){var n;G(this,Es,t),(n=R(this,zn))==null||n.call(this),G(this,zn,t(this.setOnline.bind(this)))}setOnline(t){R(this,Ss)!==t&&(G(this,Ss,t),this.listeners.forEac
vendor: 17,866 bytes, line 151
151h(r=>{r(t)}))}isOnline(){return R(this,Ss)}},Ss=new WeakMap,zn=new WeakMap,Es=new WeakMap,im),Ja=new rk;function sk(e){return Math.min(1e3*2**e,3e4)}function r0(e){return(e??"online")==="online"?Ja.isOnline():!0}var s0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ku(e){return e instanceof s0}function i0(e){let t=!1,n=0,r=!1,s,i,o;const a=new Promise((g,m)=>{i=g,o=m}),l=g=>{var m;r||(v(new s0(g)),(m=e.abort)==null||m.call(e))},u=()=>{t=!0},d=()=>{t=!1},c=()=>n0.isFocused()&&(e.networkMode==="always"||Ja.isOnline())&&e.canRun(),h=()=>r0(e.networkMode)&&e.canRun(),f=g=>{var m;r||(r=!0,(m=e.onSuccess)==null||m.call(e,g),s==null||s(),i(g))},v=g=>{var m;r||(r=!0,(m=e.onError)==null||m.call(e,g),s==null||s(),o(g))},y=()=>new Promise(g=>{var m;s=w=>{(r||c())&&g(w)},(m=e.onPause)==null||m.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),x=()=>{if(r)return;let g;const m=n===0?e.initialPromise:void 0;try{g=m??e.fn()}catch(w){g=Promise.reject(w)}Promise.resolve(g).then(f).catch(w=>{var C;if(r)return;const _=e.retry??(jl?0:3),S=e.retryDelay??sk,k=typeof S=="function"?S(n,w):S,E=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,w);if(t||!E){v(w);return}n++,(C=e.onFail)==null||C.call(e,n,w),XE(k).then(()=>c()?void 0:y()).then(()=>{t?v(w):x()})})};return{promise:a,cancel:l,continue:()=>(s==null||s(),a),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?x():y().then(x),a)}}function ik(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Ke=ik(),Cr,om,o0=(om=class{constructor(){te(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),JE(this.gcTime)&&G(this,Cr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(jl?1/0:5*60*1e3))}clearGcTimeout(){R(this,Cr)&&(clearTimeout(R(this,Cr)),G(this,Cr,void 0))}},Cr=new WeakMap,om),ks,Cs,vt,Fe,uo,Tr,Ot,ln,am,ok=(am=class extends o0{constructor(t){super();te(this,Ot);te(this,ks);te(this,Cs);te(this,vt);te(this,Fe);te(this,uo);te(this,Tr);G(this,Tr,!1),G(this,uo,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,vt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,ks,lk(this.options)),this.state=t.state??R(this,ks),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,Fe))==null?void 0:t.promise}setOptions(t){this.options={...R(this,uo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,vt).remove(this)}setData(t,n){const r=ZE(this.state.data,t,this.options);return De(this,Ot,ln).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){De(this,Ot,ln).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=R(this,Fe))==null?void 0:r.promise;return(s=R(this,Fe))==null||s.cancel(t),n?n.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,ks))}isActive(){return this.observers.some(t=>YE(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!QE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,Fe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,Fe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,vt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,Fe)&&(R(this,Tr)?R(this,Fe).cancel({revert:!0}):R(this,Fe).cancelRetry()),this.scheduleGc()),R(this,vt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Ot,ln).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,Fe))return R(this,Fe).continueRetry(),R(this,Fe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(h=>h.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,s=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(G(this,Tr,!0),r.signal)})},i=()=>{const c=t0(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return s(h),G(this,Tr,!1),this.options.persister?this.options.persister(c,h,this):c(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),G(this,Cs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&De(this,Ot,ln).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var h,f,v,y;ku(c)&&c.silent||De(this,Ot,ln).call(this,{type:"error",error:c}),ku(c)||((f=(h=R(this,vt).config).onError)==null||f.call(h,c,this),(y=(v=R(this,vt).config).onSettled)==null||y.call(v,this.state.data,c,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return G(this,Fe,i0({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var h,f,v,y;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(x){a(x);return}(f=(h=R(this,vt).config).onSuccess)==null||f.call(h,c,this),(y=(v=R(this,vt).config).onSettled)==null||y.call(v,c,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(c,h)=>{De(this,Ot,ln).call(this,{type:"failed",failureCount:c,error:h})},onPause:()=>{De(this,Ot,ln).call(this,{type:"pause"})},onContinue:()=>{De(this,Ot,ln).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),R(this,Fe).start()}},ks=new WeakMap,Cs=new WeakMap,vt=new WeakMap,Fe=new WeakMap,uo=new WeakMap,Tr=new WeakMap,Ot=new WeakSet,ln=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ak(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return ku(s)&&s.revert&&R(this,Cs)?{...R(this,Cs),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,...t.state}}};this.state=n(this.state),Ke.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,vt).notify({query:this,type:"updated",action:t})})},am);function ak(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:r0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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 Kt,lm,uk=(lm=class extends Ol{constructor(t={}){super();te(this,Kt);this.config=t,G(this,Kt,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??ph(s,n);let o=this.get(i);return o||(o=new ok({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){R(this,Kt).has(t.queryHash)||(R(this,Kt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,Kt).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,Kt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,Kt).get(t)}getAll(){return[...R(this,Kt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ap(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ap(t,r)):n}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kt=new WeakMap,lm),qt,He,Rr,Gt,In,um,ck=(um=class extends o0{constructor(t){super();te(this,Gt);te(this,qt);te(this,He);te(this,Rr);this.mutationId=t.mutationId,G(this,He,t.mutationCache),G(this,qt,[]),this.state=t.state||dk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,qt).includes(t)||(R(this,qt).push(t),this.clearGcTimeout(),R(this,He).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,qt,R(this,qt).filter(n=>n!==t)),this.scheduleGc(),R(this,He).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,qt).length||(this.state.status==="pending"?this.scheduleGc():R(this,He).remove(this))}continue(){var t;return((t=R(this,Rr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,u,d,c,h,f,v,y,x,g,m,w,_,S,k,E;G(this,Rr,i0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(C,O)=>{De(this,Gt,In).call(this,{type:"failed",failureCount:C,error:O})},onPause:()=>{De(this,Gt,In).call(this,{type:"pause"})},onContinue:()=>{De(this,Gt,In).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,He).canRun(this)}));const n=this.state.status==="pending",r=!R(this,Rr).canStart();try{if(!n){De(this,Gt,In).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=R(this,He).config).onMutate)==null?void 0:i.call(s,t,this));const O=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));O!==this.state.context&&De(this,Gt,In).call(this,{type:"pending",context:O,variables:t,isPaused:r})}const C=await R(this,Rr).start();return await((u=(l=R(this,He).config).onSuccess)==null?void 0:u.call(l,C,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,C,t,this.state.context)),await((f=(h=R(this,He).config).onSettled)==null?void 0:f.call(h,C,null,this.state.variables,this.state.context,this)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,C,null,t,this.state.context)),De(this,Gt,In).call(this,{type:"success",data:C}),C}catch(C){try{throw await((g=(x=R(this,He).config).onError)==null?void 0:g.call(x,C,t,this.state.context,this)),await((w=(m=this.options).onError)==null?void 0:w.call(m,C,t,this.state.context)),await((S=(_=R(this,He).config).onSettled)==null?void 0:S.call(_,void 0,C,this.state.variables,this.state.context,this)),await((E=(k=this.options).onSettled)==null?void 0:E.call(k,void 0,C,t,this.state.context)),C}finally{De(this,Gt,In).call(this,{type:"error",error:C})}}finally{R(this,He).runNext(this)}}},qt=new WeakMap,He=new WeakMap,Rr=new WeakMap,Gt=new WeakSet,In=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ke.batch(()=>{R(this,qt).forEach(r=>{r.onMutationUpdate(t)}),R(this,He).notify({mutation:this,type:"updated",action:t})})},um);function dk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var st,co,cm,hk=(cm=class extends Ol{constructor(t={}){super();te(this,st);te(this,co);this.config=t,G(this,st,new Map),G(this,co,Date.now())}build(t,n,r){const s=new ck({mutationCache:this,mutationId:++ko(this,co)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=Go(t),r=R(this,st).get(n)??[];r.push(t),R(this,st).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Go(t);if(R(this,st).has(n)){const s=(r=R(this,st).get(n))==null?void 0:r.filter(i=>i!==t);s&&(s.length===0?R(this,st).delete(n):R(this,st).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=R(this,st).get(Go(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=R(this,st).get(Go(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...R(this,st).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>lp(n,r))}findAll(t={}){return this.getAll().filter(n=>lp(t,n))}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ke.batch(()=>Promise.all(t.map(n=>n.continue().catch(Nt))))}},st=new WeakMap,co=new WeakMap,cm);function Go(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function dp(e){return{onFetch:(t,n)=>{var d,c,h,f,v;const r=t.options,s=(h=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:h.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},g=t0(t.options,t.fetchOptions),m=async(w,_,S)=>{if(y)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const k={queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};x(k);const E=await g(k),{maxPages:C}=t.options,O=S?tk:ek;return{pages:O(w.pages,E,C),pageParams:O(w.pageParams,_,C)}};if(s&&i.length){const w=s==="backward",_=w?fk:hp,S={pages:i,pageParams:o},k=_(r,S);a=await m(S,k,w)}else{const w=e??i.length;do{const _=l===0?o[0]??r.initialPageParam:hp(r,a);if(l>0&&_==null)break;a=await m(a,_),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var y,x;return(x=(y=t.options).persister)==null?void 0:x.call(y,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function hp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ge,Wn,Hn,Ts,Rs,Vn,Ps,Ns,dm,pk=(dm=class{constructor(e={}){te(this,ge);te(this,Wn);te(this,Hn);te(this,Ts);te(this,Rs);te(this,Vn);te(this,Ps);te(this,Ns);G(this,ge,e.queryCache||new uk),G(this,Wn,e.mutationCache||new hk),G(this,Hn,e.defaultOptions||{}),G(this,Ts,new Map),G(this,Rs,new Map),G(this,Vn,0)}mount(){ko(this,Vn)._++,R(this,Vn)===1&&(G(this,Ps,n0.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,ge).onFocus())})),G(this,Ns,Ja.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,ge).onOnline())})))}unmount(){var e,t;ko(this,Vn)._--,R(this,Vn)===0&&((e=R(this,Ps))==null||e.call(this),G(this,Ps,void 0),(t=R(this,Ns))==null||t.call(this),G(this,Ns,void 0))}isFetching(e){return R(this,ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,Wn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,ge).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=R(this,ge).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(op(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return R(this,ge).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=R(this,ge).get(r.queryHash),i=s==null?void 0:s.state.data,o=GE(t,i);if(o!==void 0)return R(this,ge).build(this,r).setData(o,{...n,manual:!0})}
151setQueriesData(e,t,n){return Ke.batch(()=>R(this,ge).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,ge).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,ge);Ke.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,ge),r={type:"active",...e};return Ke.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ke.batch(()=>R(this,ge).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Nt).catch(Nt)}invalidateQueries(e={},t={}){return Ke.batch(()=>{if(R(this,ge).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Ke.batch(()=>R(this,ge).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Nt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,ge).build(this,t);return n.isStaleByTime(op(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=dp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=dp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ja.isOnline()?R(this,Wn).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,ge)}getMutationCache(){return R(this,Wn)}getDefaultOptions(){return R(this,Hn)}setDefaultOptions(e){G(this,Hn,e)}setQueryDefaults(e,t){R(this,Ts).set(Qi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Ts).values()];let n={};return t.forEach(r=>{Yi(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){R(this,Rs).set(Qi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,Rs).values()];let n={};return t.forEach(r=>{Yi(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,Hn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ph(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===e0&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,Hn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,ge).clear(),R(this,Wn).clear()}},ge=new WeakMap,Wn=new WeakMap,Hn=new WeakMap,Ts=new WeakMap,Rs=new WeakMap,Vn=new WeakMap,Ps=new WeakMap,Ns=new WeakMap,dm),mk=b.createContext(void 0),gk=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(mk.Provider,{value:e,children:t}));/** 152 * @remix-run/router v1.19.2 153 * 154 * Copyright (c) Remix Software Inc. 155 * 156 * This source code is licensed under the MIT license found in the 157 * LICENSE.md file in the root directory of this source tree. 158 * 159 * @license MIT 160 */function Xi(){return Xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xi.apply(this,arguments)}var Gn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Gn||(Gn={}));const fp="popstate";function vk(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Bc("",{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:Qa(s)}return wk(t,n,null,e)}function Se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function a0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function yk(){return Math.random().toString(36).substr(2,8)}function pp(e,t){return{usr:e.state,key:e.key,idx:t}}function Bc(e,t,n,r){return n===void 0&&(n=null),Xi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Js(t):t,{state:n,key:t&&t.key||r||yk()})}function Qa(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Js(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function wk(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Gn.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Xi({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function c(){a=Gn.Pop;let x=d(),g=x==null?null:x-u;u=x,l&&l({action:a,location:y.location,delta:g})}function h(x,g){a=Gn.Push;let m=Bc(y.location,x,g);u=d()+1;let w=pp(m,u),_=y.createHref(m);try{o.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:y.location,delta:1})}function f(x,g){a=Gn.Replace;let m=Bc(y.location,x,g);u=d();let w=pp(m,u),_=y.createHref(m);o.replaceState(w,"",_),i&&l&&l({action:a,location:y.location,delta:0})}function v(x){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof x=="str
160ing"?x:Qa(x);return m=m.replace(/ $/,"%20"),Se(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let y={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(fp,c),l=x,()=>{s.removeEventListener(fp,c),l=null}},createHref(x){return t(s,x)},createURL:v,encodeLocation(x){let g=v(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:f,go(x){return o.go(x)}};return y}var mp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(mp||(mp={}));function bk(e,t,n){return n===void 0&&(n="/"),xk(e,t,n,!1)}function xk(e,t,n,r){let s=typeof t=="string"?Js(t):t,i=mh(s.pathname||"/",n);if(i==null)return null;let o=l0(e);_k(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=jk(i);a=Ak(o[l],u,r)}return a}function l0(e,t,n,r){t===void 0&&(t=[]),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("/")&&(Se(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=rr([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(Se(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),l0(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Pk(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of u0(i.path))s(i,o,l)}),t}function u0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=u0(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function _k(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Nk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Sk=/^:[\w-]+$/,Ek=3,kk=2,Ck=1,Tk=10,Rk=-2,gp=e=>e==="*";function Pk(e,t){let n=e.split("/"),r=n.length;return n.some(gp)&&(r+=Rk),t&&(r+=kk),n.filter(s=>!gp(s)).reduce((s,i)=>s+(Sk.test(i)?Ek:i===""?Ck:Tk),r)}function Nk(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Ak(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",c=vp({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),h=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=vp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;
vendor: 6,834 bytes, lines 160-169
160Object.assign(s,c.params),o.push({params:s,pathname:rr([i,c.pathname]),pathnameBase:Dk(rr([i,c.pathnameBase])),route:h}),c.pathnameBase!=="/"&&(i=rr([i,c.pathnameBase]))}return o}function vp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ok(e.path,e.caseSensitive,e.end),s=t.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:h,isOptional:f}=d;if(h==="*"){let y=a[c]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const v=a[c];return f&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Ok(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),a0(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function jk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return a0(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function mh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Ik(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Js(e):e;return{pathname:n?n.startsWith("/")?n:Lk(n,t):t,search:Mk(r),hash:Uk(s)}}function Lk(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Cu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` 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 $k(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function c0(e,t){let n=$k(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function d0(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Js(e):(s=Xi({},e),Se(!s.pathname||!s.pathname.includes("?"),Cu("?","pathname","search",s)),Se(!s.pathname||!s.pathname.includes("#"),Cu("#","pathname","hash",s)),Se(!s.search||!s.search.includes("#"),Cu("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),c-=1;s.pathname=h.join("/")}a=c>=0?t[c]:"/"}let l=Ik(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const rr=e=>e.join("/").replace(/\/\/+/g,"/"),Dk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Mk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Uk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Fk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const h0=["post","put","patch","delete"];new Set(h0);const Bk=["get",...h0];new Set(Bk);/** 161 * React Router v6.26.2 162 * 163 * Copyright (c) Remix Software Inc. 164 * 165 * This source code is licensed under the MIT license found in the 166 * LICENSE.md file in the root directory of this source tree. 167 * 168 * @license MIT 169 */function Zi(){return Zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zi.apply(this,arguments)}const gh=b.createContext(null),zk=b.createContext(null),Fr=b.createContext(null),Il=b.createContext(null),Br=b.createContext({outlet:null,matches:[],isDataRoute:!1}),f0=b.createContext(null);function Wk(e,t){let{relative:n}=t===void 0?{}:t;yo()||Se(!1);let{basename:r,navigator:s}=b.useContext(Fr),{hash:i,pathname:o,search:a}=m0(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:rr([r,o])),s.createHref({pathname:l,search:a,hash:i})}function yo(){return b.useContext(Il)!=null}function wo(){return yo()||Se(!1),b.useContext(Il).location}function p0(e){b.useContext(Fr).static||b.useLayoutEffect(e)}function Hk(){let{isDataRoute:e}=b.useContext(Br);return e?rC():Vk()}function Vk(){yo()||Se(!1);let e=b.useContext(gh),{basename:t,future:n,navigator:r}=b.useContext(Fr),{matches:s}=b.useContext(Br),{pathname:i}=wo(),o=JSON.stringify(c0(s,n.v7_relativeSplatPath)),a=b.useRef(!1);return p0(()=>{a.current=!0}),b.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=d0(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:rr([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,i,e])}function m0(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Fr),{matches:s}=b.useContext(Br),{pathname:i}=wo(),o=JSON.stringify(c0(s,r.v7_relativeSplatPath));return b.useMemo(()=>d0(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Kk(e,t){return qk(e,t)}function qk(e,t,n,r){yo()||Se(!1);let{navigator:s}=b.useContext(Fr),{matches:i}=b.useContext(Br),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=wo(),d;if(t){var c;let x=typeof t=="string"?Js(t):t;l==="/"||(c=x.pathname)!=null&&c.startsWith(l)||Se(!1),d=x}else d=u;let h=d.pathname||"/",f=h;if(l!=="/"){let x=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let v=bk(e,{pathname:f}),y=Xk(v&&v.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:rr([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:rr([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&y?b.createElement(Il.Provider,{value:{location:Zi({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Gn.Pop}},y):y}function Gk(){let e=nC(),t=Fk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application
169Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:s},n):null,null)}const Jk=b.createElement(Gk,null);class Qk extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(Br.Provider,{value:this.props.routeContext},b.createElement(f0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Yk(e){let{routeContext:t,match:n,children:r}=e,s=b.useContext(gh);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Br.Provider,{value:t},r)}function Xk(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,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||Se(!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:h,errors:f}=n,v=c.route.loader&&h[c.route.id]===void 0&&(!f||f[c.route.id]===void 0);if(c.route.lazy||v){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,h)=>{let f,v=!1,y=null,x=null;n&&(f=a&&c.route.id?a[c.route.id]:void 0,y=c.route.errorElement||Jk,l&&(u<0&&h===0?(v=!0,x=null):u===h&&(v=!0,x=c.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,h+1)),m=()=>{let w;return f?w=y:v?w=x:c.route.Component?w=b.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=d,b.createElement(Yk,{match:c,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||h===0)?b.createElement(Qk,{location:n.location,revalidation:n.revalidation,component:y,error:f,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var g0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(g0||{}),Ya=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ya||{});function Zk(e){let t=b.useContext(gh);return t||Se(!1),t}function eC(e){let t=b.useContext(zk);return t||Se(!1),t}function tC(e){let t=b.useContext(Br);return t||Se(!1),t}function v0(e){let t=tC(),n=t.matches[t.matches.length-1];return n.route.id||Se(!1),n.route.id}function nC(){var e;let t=b.useContext(f0),n=eC(Ya.UseRouteError),r=v0(Ya.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function rC(){let{router:e}=Zk(g0.UseNavigateStable),t=v0(Ya.UseNavigateStable),n=b.useRef(!1);return p0(()=>{n.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Zi({fromRouteId:t},i)))},[e,t])}function fi(e){Se(!1)}function sC(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Gn.Pop,navigator:i,static:o=!1,future:a}=e;yo()&&Se(!1);let l=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:i,static:o,future:Zi({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Js(r));let{pathname:d="/",search:c="",hash:h="",state:f=null,key:v="default"}=r,y=b.useMemo(()=>{let x=mh(d,l);return x==null?null:{location:{pathname:x,search:c,hash:h,state:f,key:v},navigationType:s}},[l,d,c,h,f,v,s]);return y==null?null:b.createElement(Fr.Provider,{value:u},b.createElement(Il.Provider,{children:n,value:y}))}function iC(e){let{children:t,location:n}=e;return Kk(zc(t),n)}new Promise(()=>{});
169function zc(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,s)=>{if(!b.isValidElement(r))return;let i=[...t,s];if(r.type===b.Fragment){n.push.apply(n,zc(r.props.children,i));return}r.type!==fi&&Se(!1),!r.props.index||!r.props.children||Se(!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=zc(r.props.children,i)),n.push(o)}),n}/** 170 * React Router DOM v6.26.2 171 * 172 * Copyright (c) Remix Software Inc. 173 * 174 * This source code is licensed under the MIT license found in the 175 * LICENSE.md file in the root directory of this source tree. 176 * 177 * @license MIT 178 */function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wc.apply(this,arguments)}function oC(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function aC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lC(e,t){return e.button===0&&(!t||t==="_self")&&!aC(e)}const uC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],cC="6";try{window.__reactRouterVersion=cC}catch{}const dC="startTransition",yp=Sm[dC];function hC(e){let{basename:t,children:n,future:r,window:s}=e,i=b.useRef();i.current==null&&(i.current=vk({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=b.useCallback(c=>{u&&yp?yp(()=>l(c)):l(c)},[l,u]);return b.useLayoutEffect(()=>o.listen(d),[o,d]),b.createElement(sC,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const fC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,y0=b.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:d,unstable_viewTransition:c}=t,h=oC(t,uC),{basename:f}=b.useContext(Fr),v,y=!1;if(typeof u=="string"&&pC.test(u)&&(v=u,fC))try{let w=new URL(window.location.href),_=u.startsWith("//")?new URL(w.protocol+u):new URL(u),S=mh(_.pathname,f);_.origin===w.origin&&S!=null?u=S+_.search+_.hash:y=!0}catch{}let x=Wk(u,{relative:s}),g=mC(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:c});function m(w){r&&r(w),w.defaultPrevented||g(w)}return b.createElement("a",Wc({},h,{href:v||x,onClick:y||i?r:m,ref:n,target:l}))});var wp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wp||(wp={}));var bp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(bp||(bp={}));function mC(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=Hk(),u=wo(),d=m0(e,{relative:o});return b.useCallback(c=>{if(lC(c,n)){c.preventDefault();let h=r!==void 0?r:Qa(u)===Qa(d);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,l,d,r,s,n,e,i,o,a])}const gC=()=>{const e=()=>{const t=document.getElementById("rsvp-form");t&&t.scrollIntoView({behavior:"smooth"})};return p.jsxs("section",{className:"relative min-h-screen bg-gradient-hero flex items-center justify-center py-20 px-4",children:[p.jsx("div",{className:"absolute inset-0 bg-gradient-radial from-meno-red/10 via-trans
178parent to-transparent"}),p.jsxs("div",{className:"container max-w-4xl mx-auto text-center relative z-10",children:[p.jsx("div",{className:"mb-8 flex justify-center",children:p.jsx("img",{src:"/lovable-uploads/a039965f-7a44-4bb0-b88b-edaf8c725f94.png",alt:"Dani K Gym & Wellness",className:"h-20 w-auto filter brightness-110"})}),p.jsx("h1",{className:"text-5xl md:text-7xl font-bold text-meno-tan mb-6 tracking-tight",children:"FREE INTRO CLASS"}),p.jsxs("div",{className:"mb-8",children:[p.jsx("h2",{className:"text-4xl md:text-6xl font-bold text-meno-tan mb-4 tracking-widest",children:"M.E.N.O. POWER"}),p.jsx("p",{className:"text-xl md:text-2xl text-meno-tan/80 mb-2",children:"Movement ⢠Energy ⢠Nourishment ⢠Optimization"}),p.jsx("p",{className:"text-lg md:text-xl italic text-meno-tan/70 font-light",children:`"Menopause isn't the end â it's the beginning of power"`})]}),p.jsx("div",{className:"bg-meno-card/50 backdrop-blur-sm rounded-lg p-6 md:p-8 mb-8 border border-meno-red/30 shadow-card",children:p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 text-left",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(kl,{className:"w-6 h-6 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan font-semibold",children:"Date & Time"}),p.jsx("p",{className:"text-meno-tan/80",children:"Thursday, September 4, 2025"}),p.jsxs("p",{className:"text-meno-tan/80 flex items-center gap-1",children:[p.jsx(ly,{className:"w-4 h-4"}),"6:00 PM"]})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Cl,{className:"w-6 h-6 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan font-semibold",children:"Location"}),p.jsx("p",{className:"text-meno-tan/80",children:"Dani Gym & Wellness"}),p.jsx("p",{className:"text-meno-tan/80",children:"332 140 Village Rd., Suite 7"}),p.jsx("p",{className:"text-meno-tan/80",children:"Westminster, MD 21257"})]})]}),p.jsxs("div",{className:"flex items-center gap-3 md:col-span-2 justify-center",children:[p.jsx(sh,{className:"w-6 h-6 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan font-semibold",children:"Contact"}),p.jsx("p",{className:"text-meno-tan/80",children:"443-829-7213"})]})]})]})}),p.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[p.jsx("button",{onClick:e,className:"bg-meno-red hover:bg-meno-red/90 text-meno-tan font-bold py-4 px-8 rounded-lg text-lg shadow-glow transition-all duration-300 hover:shadow-[0_0_50px_hsl(var(--meno-red)/0.5)] hover:scale-105",children:"Reserve Your Free Spot"}),p.jsx("a",{href:"/classes",className:"bg-meno-card/50 hover:bg-meno-card border border-meno-red/30 hover:border-meno-red text-meno-tan font-bold py-4 px-8 rounded-lg text-lg transition-all duration-300 hover:scale-105",children:"6-Week Program - $99"})]})]})]})},Yt=b.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Ce("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Yt.displayName="Card";const Ll=b.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Ce("flex flex-col space-y-1.5 p-6",e),...t}));Ll.displayName="CardHeader";const $l=b.forwardRef(({className:e,...t},n)=>p.jsx("h3",{ref:n,className:Ce("text-2xl font-semibold leading-none tracking-tight",e),...t}));$l.displayName="CardTitle";const w0=b.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));w0.displayName="CardDescription";const Xt=b.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Ce("p-6 pt-0",e),...t}));Xt.displayName="CardContent";const b0=b.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Ce("flex items-center p-6 pt-0",e),...t}));b0.displayName="CardFooter";const vC=()=>{const e=[{icon:p.jsx(G_,{className:"w-8 h-8 text-meno-red"}),title:"Hormone changes & how to navigate symptoms",description:"Understanding your body's transition and practical strategies for managing symptoms"},{icon:p.jsx(K_,{className:"w-8 h-8 text-meno-red"}),title:"Fitness & nutrition for the menopause transition",description:"Tailored exercise routines and nutritional guidance specifically for this life stage"},{icon:p.jsx(W_,{className:"w-8 h-8 text-meno-red"}),title:"Mental health strategies & hormone health tips",description:"Emotional wellness techniques and hormone optimization for better overall health"}];return p.jsx("section",{className:"py-16 px-4 bg-meno-dark",children:p.jsxs("div",{className:"container max-w-4xl mx-auto",children:[p.jsxs("div",{className:"text-center mb-12",children:[p.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-meno-tan mb-6",children:"What You'll Learn"}),p.jsx("p",{className:"text-xl text-meno-tan/80",children:"Discover the tools and knowledge you need to thrive during menopause"})]}),p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:e.map((t,n)=>p.jsx(Yt,{className:"bg-meno-card border-meno-red/30 shadow-card hover:shadow-glow transition-all duration-300",children:p.jsxs(Xt,{className:"p-6 text-center",children:[p.jsx("div",{className:"flex justify-center mb-4",children:t.icon}),p.jsx("h3",{className:"text-xl font-semibold text-meno-tan mb-3 leading-tight",children:t.title}),p.jsx("p",{className:"text-meno-tan/70",children:t.description}),p.jsx("div",{className:"flex justify-center mt-4",children:p.jsx(ay,{className:"w-6 h-6 text-meno-red"})})]})}
178,n))}),p.jsx("div",{className:"text-center mt-12",children:p.jsxs("div",{className:"bg-meno-card/50 rounded-lg p-6 border border-meno-red/30",children:[p.jsx("p",{className:"text-lg text-meno-tan/90 italic",children:'"This class is designed to empower you with knowledge and practical tools to navigate menopause with confidence and strength."'}),p.jsx("p",{className:"text-meno-tan font-semibold mt-2",children:"- Dani K, Certified Wellness Coach"})]})})]})})},yC=rh("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"}}),_r=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?qi:"button";return p.jsx(o,{className:Ce(yC({variant:t,size:n,className:e})),ref:i,...s})});_r.displayName="Button";const Ar=b.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:Ce("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",e),ref:r,...n}));Ar.displayName="Input";var wC="Label",x0=b.forwardRef((e,t)=>p.jsx(we.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));x0.displayName=wC;var _0=x0;const bC=rh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),bt=b.forwardRef(({className:e,...t},n)=>p.jsx(_0,{ref:n,className:Ce(bC(),e),...t}));bt.displayName=_0.displayName;var xC=b.createContext(void 0);function S0(e){const t=b.useContext(xC);return e||t||"ltr"}var Tu="rovingFocusGroup.onEntryFocus",_C={bubbles:!1,cancelable:!0},Dl="RovingFocusGroup",[Hc,E0,SC]=Av(Dl),[EC,k0]=Vs(Dl,[SC]),[kC,CC]=EC(Dl),C0=b.forwardRef((e,t)=>p.jsx(Hc.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Hc.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(TC,{...e,ref:t})})}));C0.displayName=Dl;var TC=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,h=b.useRef(null),f=$e(t,h),v=S0(i),[y=null,x]=Zd({prop:o,defaultProp:a,onChange:l}),[g,m]=b.useState(!1),w=ft(u),_=E0(n),S=b.useRef(!1),[k,E]=b.useState(0);return b.useEffect(()=>{const C=h.current;if(C)return C.addEventListener(Tu,w),()=>C.removeEventListener(Tu,w)},[w]),p.jsx(kC,{scope:n,orientation:r,dir:v,loop:s,currentTabStopId:y,onItemFocus:b.useCallback(C=>x(C),[x]),onItemShiftTab:b.useCallback(()=>m(!0),[]),onFocusableItemAdd:b.useCallback(()=>E(C=>C+1),[]),onFocusableItemRemove:b.useCallback(()=>E(C=>C-1),[]),children:p.jsx(we.div,{tabIndex:g||k===0?-1:0,"data-orientation":r,...c,ref:f,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{S.current=!0}),onFocus:ee(e.onFocus,C=>{const O=!S.current;if(C.target===C.currentTarget&&O&&!g){const j=new CustomEvent(Tu,_C);if(C.currentTarget.dispatchEvent(j),!j.defaultPrevented){const W=_().filter(
vendor: 4,189 bytes, line 178
178B=>B.focusable),U=W.find(B=>B.active),V=W.find(B=>B.id===y),J=[U,V,...W].filter(Boolean).map(B=>B.ref.current);P0(J,d)}}S.current=!1}),onBlur:ee(e.onBlur,()=>m(!1))})})}),T0="RovingFocusGroupItem",R0=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...o}=e,a=w1(),l=i||a,u=CC(T0,n),d=u.currentTabStopId===l,c=E0(n),{onFocusableItemAdd:h,onFocusableItemRemove:f}=u;return b.useEffect(()=>{if(r)return h(),()=>f()},[r,h,f]),p.jsx(Hc.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:p.jsx(we.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ee(e.onMouseDown,v=>{r?u.onItemFocus(l):v.preventDefault()}),onFocus:ee(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ee(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=NC(v,u.orientation,u.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let g=c().filter(m=>m.focusable).map(m=>m.ref.current);if(y==="last")g.reverse();else if(y==="prev"||y==="next"){y==="prev"&&g.reverse();const m=g.indexOf(v.currentTarget);g=u.loop?AC(g,m+1):g.slice(m+1)}setTimeout(()=>P0(g))}})})})});R0.displayName=T0;var RC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function NC(e,t,n){const r=PC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return RC[r]}function P0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function AC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var OC=C0,jC=R0;function IC(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var vh="Radio",[LC,N0]=Vs(vh),[$C,DC]=LC(vh),A0=b.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...u}=e,[d,c]=b.useState(null),h=$e(t,y=>c(y)),f=b.useRef(!1),v=d?!!d.closest("form"):!0;return p.jsxs($C,{scope:n,checked:s,disabled:o,children:[p.jsx(we.button,{type:"button",role:"radio","aria-checked":s,"data-state":I0(s),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:h,onClick:ee(e.onClick,y=>{s||l==null||l(),v&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})}),v&&p.jsx(MC,{control:d,bubbles:!f.current,name:r,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});A0.displayName=vh;var O0="RadioIndicator",j0=b.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,i=DC(O0,n);return p.jsx(Xd,{present:r||i.checked,children:p.jsx(we.span,{"data-state":I0(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t})})});j0.displayName=O0;var MC=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,i=b.useRef(null),o=IC(n),a=jy(t);return b.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&c){const h=new Event("click",{bubbles:r});c.call(l,n),l.dispatchEvent(h)}},[o,n,r]),p.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function I0(e){return e?"checked":"unchecked"}var UC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],yh="RadioGroup",[FC,bN]=Vs(yh,[k0,N0]),L0=k0(),$0=N0(),[BC,zC]=FC(yh),D0=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:c,...h}=e,f=L0(n),v=S0(u),[y,x]=Zd({prop:i,defaultProp:s,onChange:c});return p.jsx(BC,{scope:n,name:r,required:o,disabled:a,value:y,onValueChange:x,children:p.jsx(OC,{asChild:!0,...f,orientation:l,dir:v,loop:d,children:p.jsx(we.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...h,ref:t})})})});D0.displayName=yh;var M0="RadioGroupItem",U0=b.forwardRef((e,t)=>
178{const{__scopeRadioGroup:n,disabled:r,...s}=e,i=zC(M0,n),o=i.disabled||r,a=L0(n),l=$0(n),u=b.useRef(null),d=$e(t,u),c=i.value===s.value,h=b.useRef(!1);return b.useEffect(()=>{const f=y=>{UC.includes(y.key)&&(h.current=!0)},v=()=>h.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",v)}},[]),p.jsx(jC,{asChild:!0,...a,focusable:!o,active:c,children:p.jsx(A0,{disabled:o,required:i.required,checked:c,...l,...s,name:i.name,ref:d,onCheck:()=>i.onValueChange(s.value),onKeyDown:ee(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:ee(s.onFocus,()=>{var f;h.current&&((f=u.current)==null||f.click())})})})});U0.displayName=M0;var WC="RadioGroupIndicator",F0=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=$0(n);return p.jsx(j0,{...s,...r,ref:t})});F0.displayName=WC;var B0=D0,z0=U0,HC=F0;const W0=b.forwardRef(({className:e,...t},n)=>p.jsx(B0,{className:Ce("grid gap-2",e),...t,ref:n}));W0.displayName=B0.displayName;const Vc=b.forwardRef(({className:e,...t},n)=>p.jsx(z0,{ref:n,className:Ce("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(HC,{className:"flex items-center justify-center",children:p.jsx(V_,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Vc.displayName=z0.displayName;function VC(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return 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(e,t||[])).next())})}const KC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class wh extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class qC extends wh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class xp extends wh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class _p extends wh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Kc;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Kc||(Kc={}));class GC{constructor(t,{headers:n={},customFetch:r,region:s=Kc.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=KC(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return VC(this,arguments,void 0,function*(n,r={}){var s,i;let o,a,l;try{const{headers:u,method:d,body:c,signal:h,timeout:f}=r;let v={},{region:y}=r;y||(y=this.region);const x=new URL(`${this.url}/${n}`);y&&y!=="any"&&(v["x-region"]=y,x.searchParams.set("forceFunctionRegion",y));let g;const m=!!u&&Object.keys(u).some(C=>C.toLowerCase()==="content-type");c&&!m?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(v["Content-Type"]="application/octet-stream",g=c):typeof c=="string"?(v["Content-Type"]="text/plain",g=c):typeof FormData<"u"&&c instanceof FormData?g=c:(v["Content-Type"]="application/json",g=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?g=JSON.stringify(c):g=c;let w=h;f&&(a=new AbortController,o=setTimeout(()=>a.abort(),f),h?(w=a.signal,l=()=>a.abort(),h.addEventListener("abort",l)):w=a.signal);const _=yield this.fetch(x.toString(),{method:d||"POST",headers:Object.assign(Object.assign(Object.assign({},v),this.headers),u),body:g,signal:w}).catch(C=>{throw new qC(C)}),S=_.headers.get("x-relay-error");
178if(S&&S==="true")throw new xp(_);if(!_.ok)throw new _p(_);let k=((s=_.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim().toLowerCase(),E;return k==="application/json"?E=yield _.json():k==="application/octet-stream"||k==="application/pdf"?E=yield _.blob():k==="text/event-stream"?E=_:k==="multipart/form-data"?E=yield _.formData():E=yield _.text(),{data:E,error:null,response:_}}catch(u){return{data:null,error:u,response:u instanceof _p||u instanceof xp?u.context:void 0}}finally{o&&clearTimeout(o),l&&((i=r.signal)===null||i===void 0||i.removeEventListener("abort",l))}})}}const H0=3,Sp=e=>Math.min(1e3*2**e,3e4),JC=[520,503],V0=["GET","HEAD","OPTIONS"];var Ep=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function kp(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e);function s(){clearTimeout(r),n()}t==null||t.addEventListener("abort",s)})}function QC(e,t,n,r){return!(!r||n>=H0||!V0.includes(e)||!JC.includes(t))}var YC=class{constructor(e){var t,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.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(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){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={};n.headers.forEach((c,h)=>{u[h]=c}),o>0&&(u["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,h)=>typeof h=="bigint"?h.toString():h),signal:n.signal})}catch(c){if((c==null?void 0:c.name)==="AbortError"||(c==null?void 0:c.code)==="ABORT_ERR"||!V0.includes(n.method))throw c;if(n.retryEnabled&&o<H0){const h=Sp(o);o++,await kp(h,n.signal);continue}throw c}if(QC(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,h=c!==null?Math.max(0,parseInt(c,10)||0)*1e3:Sp(o);await d.text(),o++,await kp(h,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 h,f,v,y;const m=(h=c==null?void 0:c.message)!==null&&h!==void 0?h:"",w=(f=c==null?void 0:c.code)!==null&&f!==void 0?f:"";l=`${(v=o==null?void 0:o.name)!==null&&v!==void 0?v:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 179 180Caused by: ${(y=c==null?void 0:c.name)!==null&&y!==void 0?y:"Error"}: ${m}`,w&&(l+=` (${w})`),c!=null&&c.stack&&(l+=` 181${c.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const g=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)",g>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${g} 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)",g>this.urlLengthLimit&&(u+=`. Your request URL is ${g} 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:""}}
181)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var u;const h=await e.text();if(h!=="")if(t.headers.get("Accept")==="text/csv")r=h;else if(t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text")))r=h;else try{r=JSON.parse(h)}catch{if(n={message:h},r=null,t.shouldThrowOnError)throw new Ep({message:h,details:"",hint:"",code:""})}}const d=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),c=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");d&&c&&c.length>1&&(s=parseInt(c[1])),t.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 e.text();try{n=JSON.parse(d),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,o="OK")}catch{e.status===404&&d===""?(i=204,o="No Content"):n={message:d}}if(n&&t.shouldThrowOnError)throw new Ep(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},XC=class extends YC{throwOnError(){return super.throwOnError()}select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!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},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{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,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,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:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"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(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Cp=new RegExp("[,()]");var Yr=class extends XC{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Cp.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Cp.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{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(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
181n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},ZC=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),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(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").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 Yr({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1810){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new Yr({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,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`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.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 Yr({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Yr({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Yr({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function eo(e){"@babel/helpers - typeof";return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eo(e)}function eT(e,t){if(eo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(eo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tT(e){var t=eT(e,"string");return eo(t)=="symbol"?t:t+""}function nT(e,t,n){return(t=tT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Jo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tp(Object(n),!0).forEach(function(r){nT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var rT=class K0{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,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,h=setTimeout(()=>c.abort(),i),f=d==null?void 0:d.signal;if(f){if(f.aborted)return clearTimeout(h),l(u,d);const v=()=>{clearTimeout(h),c.abort()};return f.addEventListener("abort",v,{once:!0}),l(u,Jo(Jo({},d),{},{signal:c.signal})).finally(()=>{clearTimeout(h),f.removeEventListener("abort",v)})}return l(u,Jo(Jo({},d),{},{signal:c.signal})).finally(()=>clearTimeout(h))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new ZC(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new K0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const d=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(d)),c=r&&Object.values(n).some(d);c?(a="POST",u=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([f,v])=>v!==void 0).map(([f,v])=>[f,Array.isArray(v)?`{${v.join(",")}}`:`${v}
181`]).forEach(([f,v])=>{l.searchParams.append(f,v)})):(a="POST",u=n);const h=new Headers(this.headers);return c?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new Yr({method:a,url:l,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class sT{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.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"&&n.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.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 s=globalThis.process;if(s){const i=s.versions;if(i&&i.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}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 t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 182 183Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const iT="2.111.0",oT=`realtime-js/${iT}`,aT="1.0.0",q0="2.0.0",lT=q0,uT=1e4,cT=100,Un={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},G0={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},qc={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class dT{constructor(t){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=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.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(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=new TextEncoder,a=o.encode(t.topic),l=o.encode((s=t.ref)!==null&&s!==void 0?s:""),u=o.encode((i=t.join_ref)!==null&&i!==void 0?i:""),d=o.encode(t.payload.event),c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=o.encode(Object.keys(c).length===0?"":JSON.stringify(c));if(u.length>255)throw new Error(`joinRef length ${u.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`userEvent length ${d.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+u.length+l.length+a.length+d.length+h.length,v=new ArrayBuffer(this.HEADER_LENGTH+f),y=new DataView(v),x=new Uint8Array(v);let g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,u.length),y.setUint8(g++,l.length),y.setUint8(g++,a.length),y.setUint8(g++,d.length),y.setUint8(g++,h.length),y.setUint8(g++,n),x.set(u,g),g+=u.length,x.set(l,g),g+=l.length,x.set(a,g),g+=a.length,x.set(d,g),g+=d.length,x.set(h,g),g+=h.length;var m=new Uint8Array(v.byteLength+r.byteLength);return m.set(new Uint8Array(v),0),m.set(new Uint8Array(r),v.byteLength),m.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,l]=r;
183return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,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(t.slice(l,l+s));l=l+s;const d=r.decode(t.slice(l,l+i));l=l+i;const c=r.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,v={type:this.BROADCAST_EVENT,event:d,payload:f};return o>0&&(v.meta=JSON.parse(c)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:v}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var ie;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ie||(ie={}));const Rp=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=hT(o,e,t,s),i),{}):{}},hT=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?J0(i,o):Gc(o)},J0=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return gT(t,n)}switch(e){case ie.bool:return fT(t);case ie.float4:case ie.float8:case ie.int2:case ie.int4:case ie.int8:case ie.numeric:case ie.oid:return pT(t);case ie.json:case ie.jsonb:return mT(t);case ie.timestamp:return vT(t);case ie.abstime:case ie.date:case ie.daterange:case ie.int4range:case ie.int8range:case ie.money:case ie.reltime:case ie.text:case ie.time:case ie.timestamptz:case ie.timetz:case ie.tsrange:case ie.tstzrange:return Gc(t);default:return Gc(t)}},Gc=e=>e,fT=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},pT=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},mT=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},gT=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>J0(t,a))}return e},vT=e=>typeof e=="string"?e.replace(" ","T"):e,Q0=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var bs=e=>typeof e=="function"?e:function(){return e},yT=typeof self<"u"?self:null,Xr=typeof window<"u"?window:null,Vt=yT||Xr||globalThis,wT="2.0.0",bT=1e4,xT=1e3,_T=100,Jt={connecting:0,open:1,closing:2,closed:3},Qe={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},cn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Jc={longpoll:"longpoll",websocket:"websocket"},ST={complete:4},Qc="base64url.bearer.phx.",Qo=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,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(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 5,067 bytes, line 183
183matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}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,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Y0=class{constructor(e,t){this.callback=e,this.timerCalc=t,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))}},ET=class{constructor(e,t,n){this.state=Qe.closed,this.topic=e,this.params=bs(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Qo(this,cn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Y0(()=>{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=Qe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=Qe.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=Qe.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=Qe.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 Qo(this,cn.leave,bs({}),this.timeout).send(),this.state=Qe.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(cn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=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=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Qe.closed,this.bindings=[]}onClose(e){this.on(cn.close,e)}onError(e){return this.on(cn.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Qo(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Qe.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(cn.close,"leave")},n=new Qo(this,cn.leave,bs({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Qe.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Qe.closed}isErrored(){return this.state===Qe.errored}isJoined(){return this.state===Qe.joined}isJoining(){return this.state===Qe.joining}isLeaving(){return this.state===Qe.leaving}},Xa=class{static request(e,t,n,r,s,i,o){if(Vt.XDomainRequest){let a=new Vt.XDomainRequest;return this.xdomainRequest(a,e,t,r,s,i,o)}
vendor: 3,068 bytes, line 183
183else if(Vt.XMLHttpRequest){let a=new Vt.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,s,i,o)}else{if(Vt.fetch&&Vt.AbortController)return this.fetchRequest(e,t,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,o){let a={method:e,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),Vt.fetch(t,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(e,t,n,r,s,i,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,o,a){e.open(t,n,!0),e.timeout=i;for(let[l,u]of Object.entries(r))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===ST.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},kT=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},qr=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Qc)&&(this.authToken=atob(t[1].slice(Qc.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(e),this.readyState=Jt.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Jc.websocket),"$1/"+Jc.longpoll)}endpointURL(){return Xa.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Jt.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Jt.open||this.readyState===Jt.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;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=Jt.open,this.onopen({}),this.poll();break;
vendor: 12,983 bytes, lines 183-184
183case 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(e){typeof e!="string"&&(e=kT(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;const n=t+_T,r=e.slice(t,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join(` 184`),()=>this.onerror("timeout"),s=>{!s||s.status!==200?(this.awaitingBatchAck=!1,this.onerror(s&&s.status),this.closeAndRetry(1011,"internal server error",!1)):n<e.length?this.batchSend(e,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=Jt.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=Xa.request(e,this.endpointURL(),t,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},CT=class pi{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,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=pi.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=pi.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=pi.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return pi.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.toNullProtoObj(this.clone(t));n=this.toNullProtoObj(n);let o=Object.create(null),a=Object.create(null);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(y=>y.phx_ref),h=d.metas.map(y=>y.phx_ref),f=u.metas.filter(y=>h.indexOf(y.phx_ref)<0),v=d.metas.filter(y=>c.indexOf(y.phx_ref)<0);f.length>0&&(o[l]=u,o[l].metas=f),v.length>0&&(a[l]=this.clone(d),a[l].metas=v)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(t,n,r,s){t=this.toNullProtoObj(t);let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let d=t[a].metas.map(h=>h.phx_ref),c=u.metas.filter(h=>d.indexOf(h.phx_ref)<0);t[a].metas.unshift(...c)}r(a,u,l)}),this.map(o,(a,l)=>{let u=t[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 t[a]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static toNullProtoObj(t){if(Object.getPrototypeOf(t)===null)return t;let n=Object.create(null);return Object.getOwnPropertyNames(t).forEach(r=>{n[r]=t[r]}),n}static clone(t){return JSON.parse(JSON.stringify(t))}},Yo={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,o=new TextEncoder,a=o.encode(t),l=o.encode(n),u=o.encode(s),d=o.encode(r);this.assertFieldSize(a.byteLength,"join_ref"),this.assertFieldSize(l.byteLength,"ref"),this.assertFieldSize(u.byteLength,"topic"),this.assertFieldSize(d.byteLength,"event");let c=this.META_LENGTH+a.byteLength+l.byteLength+u.byteLength+d.byteLength,h=new ArrayBuffer(this.HEADER_LENGTH+c),f=new Uint8Array(h),v=new DataView(h),y=0;v.setUint8(y++,this.KINDS.push),v.setUint8(y++,a.byteLength),v.setUint8(y++,l.byteLength),v.setUint8(y++,u.byteLength),v.setUint8(y++,d.byteLength),f.set(a,y),y+=a.byteLength,f.set(l,y),y+=l.byteLength,f.set(u,y),y+=u.byteLength,f.set(d,y),y+=d.byteLength;var x=new Uint8Array(h.byteLength+i.byteLength);return x.set(f,0),x.set(new Uint8Array(i),h.byteLength),x.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(o,o+r));o=o+r;let l=n.decode(e.slice(o,o+s));o=o+s;let u=n.decode(e.slice(o,o+i));o=o+i;let d=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:d}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(a,a+r));a=a+r;let u=n.decode(e.slice(a,a+s));a=a+s;let d=n.decode(e.slice(a,a+i));a=a+i;let c=n.decode(e.slice(a,a+o));a=a+o;let h=e.slice(a,e.byteLength),f={status:c,response:h};return{join_ref:l,ref:u,topic:d,event:cn.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let a=n.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},TT=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||bT,this.transport=t.transport||Vt.WebSocket||qr,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Vt&&Vt.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Yo.encode.bind(Yo),this.defaultDecoder=Yo.decode.bind(Yo),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==qr?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Xr&&Xr.addEventListener&&(Xr.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Xr.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),Xr.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=bs(t.params||{}),this.endPoint=`${e}/${Jc.websocket}`,this.vsn=t.vsn||wT,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Y0(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken&&bs(t.authToken)}getLongPollTransport(){return qr}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Xa.appendParams(Xa.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=bs(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==qr?this.connectWithFallback(qr,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case qr:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Qc}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),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(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),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(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),xT,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
vendor: 4,982 bytes, line 184
184,this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Jt.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(cn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Jt.connecting:return"connecting";case Jt.open:return"open";case Jt.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new ET(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}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(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=t;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",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Ti{constructor(t,n){const r=PT(n);this.presence=new CT(t.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=Ti.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Ti.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Ti.transformState(this.presence.state)}static transformState(t){return t=RT(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=wa(s),n},{})}static onJoinPayload(t,n,r){const s=Pp(n),i=wa(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=Pp(n),i=wa(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function wa(e){return e.metas.map(t=>{const n=Object.getOwnPropertyDescriptors(t),r=Object.defineProperties({},n);return r.presence_ref=r.phx_ref,delete r.phx_ref,delete r.phx_ref_prev,r})}function RT(e){return JSON.parse(JSON.stringify(e))}function PT(e){return(e==null?void 0:e.events)&&{events:e.events}}function Pp(e){return e!=null&&e.metas?wa(e):[]}var Np;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Np||(Np={}));class NT{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Ti(this.channel.channelAdapter,n)}}function AT(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
184if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class OT{constructor(t,n,r){const s=jT(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>cT){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(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Un.joined}isJoined(){return this.state===Un.joined}isJoining(){return this.state===Un.joining}isClosed(){return this.state===Un.closed}isLeaving(){return this.state===Un.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function jT(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const IT=/[,()"\\]/,LT=e=>IT.test(e)||e!==e.trim(),$T=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Ap=e=>{const t=e===null?"null":String(e);return LT(t)?$T(t):t},DT=e=>e===null?"null":String(e),MT=(e,t)=>{if(e==="in"){const n=Array.isArray(t)?t:[t];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(s=>Ap(s)).join(",")})`}return e==="is"?`is.${DT(t)}`:`${e}.${Ap(t)}`};class UT{constructor(){this.filters=[]}add(t,n,r,s=!1){const i=s?"not.":"";return this.filters.push(`${t}=${i}${MT(n,r)}`),this}eq(t,n){return this.add(t,"eq",n)}neq(t,n){return this.add(t,"neq",n)}gt(t,n){return this.add(t,"gt",n)}gte(t,n){return this.add(t,"gte",n)}lt(t,n){return this.add(t,"lt",n)}lte(t,n){return this.add(t,"lte",n)}in(t,n){return this.add(t,"in",n)}like(t,n){return this.add(t,"like",n)}ilike(t,n){return this.add(t,"ilike",n)}match(t,n){return this.add(t,"match",n)}imatch(t,n){return this.add(t,"imatch",n)}is(t,n){return this.add(t,"is",n)}isDistinct(t,n){return this.add(t,"isdistinct",n)}not(t,n,r){return this.add(t,n,r,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Op;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Op||(Op={}));var ds;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ds||(ds={}));var dn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(dn||(dn={}));class Ri{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}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(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new OT(this.socket.socketAdapter,t,this.params),this.presence=new NT(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Q0(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(t,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(f=>f.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[ds.PRESENCE]&&this.bindings[ds.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,c={},h={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(f=>{t==null||t(dn.CHANNEL_ERROR,AT(f))}),this._onClose(()=>t==null?void 0:t(dn.CLOSED)),this.updateJoinPayload(Object.assign({config:h}
184,c)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(dn.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=Un.errored;const v=Object.values(f).join(", ")||"error";t==null||t(dn.CHANNEL_ERROR,new Error(v,{cause:f}))}).receive("timeout",()=>{t==null||t(dn.TIMED_OUT)})}return this}_updatePostgresBindings(t,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:h}}=l,f=t&&t[a];if(f&&f.event===u&&Ri.isFilterValueEqual(f.schema,d)&&Ri.isFilterValueEqual(f.table,c)&&Ri.isFilterValueEqual(f.filter,h))o.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=Un.errored,n==null||n(dn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Un.errored&&n&&n(dn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===ds.PRESENCE||t===ds.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=n instanceof ArrayBuffer||ArrayBuffer.isView(n),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&a.searchParams.set("private","true");const l={method:"POST",headers:o,body:i?n:JSON.stringify(n)},u=await this._fetchWithTimeout(a.toString(),l,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(u.status===202)return{success:!0};if(u.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let d=u.statusText;try{const c=await u.json();d=c.error||c.message||d}catch{}return Promise.reject(new Error(d))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
184in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,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 instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.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(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(t,n,r){const s=t.toLocaleLowerCase(),i=n==null?void 0:n.filter;(i instanceof UT||typeof i=="object"&&i!==null&&typeof i.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:i.build()}));const o=this.channelAdapter.on(t,r),a={type:s,filter:n,callback:r,ref:o};return this.bindings[s]?this.bindings[s].push(a):this.bindings[s]=[a],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,o,a,l,u,d;const c=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(c,r))return!1;const h=(s=this.bindings[c])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(c))if("id"in h){const f=h.id,v=(i=h.filter)===null||i===void 0?void 0:i.event;return f&&((o=n.ids)===null||o===void 0?void 0:o.includes(f))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(u=(l=h==null?void 0:h.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return f==="*"||f===((d=n==null?void 0:n.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===c})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:o}=G0;return n&&[r,s,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,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(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Rp(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Rp(t.columns,t.old_record)),n}}class FT{constructor(t,n){this.socket=new TT(t,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(t){this.socket.heartbeatCallback=t}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(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==qc.connecting}isDisconnecting(){return this.socket.connectionState()==qc.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const jp={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},BT=[1e3,2e3,5e3,1e4],zT=1e4;function WT(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function HT(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return WT()}const VT=` 185 addEventListener("message", (e) => { 186 if (e.data.event === "start") { 187 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 188 } 189 });`;class KT{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(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
189,this.ref=0,this.serializer=new dT,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,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 FT(t,s),this.httpEndpoint=Q0(t),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(t){const n=t.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||qc.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Ri(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
189this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,r=!1;if(t)n=t,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:oT};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(G0.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,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(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),t&&t(n,r))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),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(t){let n;if(t)n=t;else{const r=new Blob([VT],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,o,a,l,u,d,c,h,f;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const v={};v.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:uT,v.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:jp.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:jp.HEARTBEAT_INTERVAL),v.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:sT.getWebSocketConstructor(),v.params=t==null?void 0:t.params,v.logger=t==null?void 0:t.logger,v.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),v.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:HT(),v.reconnectAfterMs=(d=t==null?void 0:t.reconnectAfterMs)!==null&&d!==void 0?d:m=>BT[m-1]||zT;let y,x;const g=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:lT;switch(g){case aT:y=(m,w)=>w(JSON.stringify(m)),x=(m,w)=>w(JSON.parse(m));break;case q0:y=this.serializer.encode.bind(this.serializer),x=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${v.vsn}`)}if(v.vsn=g,v.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:y,v.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:x,v.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,v.params=Object.assign(Object.assign({},v.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,v.autoSendHeartbeat=!this.worker}return v}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
189var to=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function qT(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function GT(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function JT(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=qT(e.baseUrl,r,s),l=await GT(e.auth),u=await t(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"),h=c&&d?JSON.parse(d):d;if(!u.ok){const f=c?h:void 0,v=f==null?void 0:f.error;throw new to((v==null?void 0:v.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:f})}return{status:u.status,headers:u.headers,data:h}}}}function Xo(e){return e.join("�")}var QT=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Xo(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Xo(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Xo(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Xo(e.namespace)}`}),!0}catch(t){if(t instanceof to&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof to&&n.status===409)return;throw n}}};function Gr(e){return e.join("�")}var YT=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}
189/namespaces/${Gr(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Gr(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Gr(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Gr(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Gr(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}
189/namespaces/${Gr(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof to&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof to&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},XT=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=JT({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new QT(this.client,t),this.tableOps=new YT(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function no(e){"@babel/helpers - typeof";return no=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(e)}function ZT(e,t){if(no(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(no(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eR(e){var t=ZT(e,"string");return no(t)=="symbol"?t:t+""}function tR(e,t,n){return(t=eR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ip(Object(n),!0).forEach(function(r){tR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ip(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ml=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Ul(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Yc=class extends Ml{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return z({},super.toJSON())}},X0=class extends Ml{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Za(e,t,n){const r=z({},e),s=t.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function nR(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const rR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),sR=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Xc=e=>{if(Array.isArray(e))return e.map(n=>Xc(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=Xc(r)}),t},iR=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Z0=e=>e.split("/").map(encodeURIComponent).join("/"),Lp=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;
189if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},oR=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(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+"";t(new Yc(Lp(o),i,a,r))}).catch(()=>{const o=i+"";t(new Yc(s.statusText||`HTTP ${i} error`,i,o,r))})}else t(new X0(Lp(e),e,r))},aR=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return z(z({},s),n);if(sR(r)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=Za(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return t!=null&&t.duplex&&(s.duplex=t.duplex),z(z({},s),n)};async function li(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,aR(t,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=>oR(u,l,r,o))})}function ew(e="storage"){return{get:async(t,n,r,s)=>li(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>li(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>li(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>li(t,"HEAD",n,z(z({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>li(t,"DELETE",n,s,i,r,e)}}const lR=ew("storage"),{get:ro,post:At,put:Zc,head:uR,remove:so}=lR,lt=ew("vectors");var Qs=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=nR(t),this.fetch=rR(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Za(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ul(n))return{data:null,error:n};throw n}}};let tw;tw=Symbol.toStringTag;var cR=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[tw]="StreamDownloadBuilder",this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Ul(t))return{data:null,error:t};throw t}}};let nw;nw=Symbol.toStringTag;var dR=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[nw]="BlobDownloadBuilder",this.promise=null}asStream(){return new cR(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Ul(t))return{data:null,error:t};throw t}}};const Ru={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},$p={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var hR=class extends Qs{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=z(z({},$p),r);let a=z(z({},s.headers),e==="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[h,f]of Object.entries(r.headers))a=Za(a,h,f);const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),c=await(e=="PUT"?Zc:At)(s.fetch,`${s.url}/object/${d}`,i,z({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:c.Id,fullPath:c.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=z(z({},$p),r);let d=z(z({},s.headers),{"x-upsert":String(u.upsert)});const c=u.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),c&&l.append("metadata",s.encodeMetadata(c)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),c&&!l.has("metadata")&&l.a
189ppend("metadata",s.encodeMetadata(c))):(l=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,c&&(d["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),r!=null&&r.headers)for(const[h,f]of Object.entries(r.headers))d=Za(d,h,f);return{path:i,fullPath:(await Zc(s.fetch,a.toString(),l,z({headers:d},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=z({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await At(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 Ml("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await At(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
189stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await At(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await At(r.fetch,`${r.url}/object/sign/${s}`,z({expiresIn:t},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(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await At(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{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=>z(z({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>ro(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new dR(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Xc(await ro(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await uR(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Ul(s)){var r;const i=s instanceof Yc?s.status:s instanceof X0?(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(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const s=r.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await so(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var r=this;return r.handleOperation(async()=>{const s=Z0(r._getFinalPath(e)),i=new URLSearchParams;t!=null&&t.transformations&&i.set("transformations","true");const o=i.toString();return await so(r.fetch,`${r.url}/cdn/${s}${o?`?${o}`:""}`,{},{headers:r.headers},n)})}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=t!=null&&t.sortBy?z(z({},Ru.sortBy),t.sortBy):Ru.sortBy,i=z(z(z({},Ru),t),{},{sortBy:s,prefix:e||""});return await At(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=z({},e);return await At(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("qual
189ity",t.quality.toString()),e}};const fR="2.111.0",bo={"X-Client-Info":`storage-js/${fR}`};var pR=class extends Qs{constructor(e,t={},n,r){const s=new URL(e);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=z(z({},bo),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await ro(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ro(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await At(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Zc(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await At(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await so(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var r=this;return r.handleOperation(async()=>{const s=new URLSearchParams;t!=null&&t.transformations&&s.set("transformations","true");const i=s.toString();return await so(r.fetch,`${r.url}/cdn/${Z0(e)}${i?`?${i}`:""}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},mR=class extends Qs{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=z(z({},bo),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await At(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await ro(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await so(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!iR(e))throw new Ml("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 XT({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.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}}}}})}},gR=class extends Qs{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=z(z({},bo),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await lt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await lt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},vR=class extends Qs{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=z(z({},bo),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
189if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},yR=class extends Qs{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=z(z({},bo),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},wR=class extends yR{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new bR(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},bR=class extends gR{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new xR(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},xR=class extends vR{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},_R=class extends pR{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new hR(this.url,this.headers,e,this.fetch)}get vectors(){return new wR(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new mR(this.url+"/iceberg",this.headers,this.fetch)}};function Fl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}const rw="2.111.0",hn=30*1e3,mi=3,Pu=mi*hn,SR=2*hn,ER="http://localhost:9999",kR="supabase.auth.token",CR={"X-Client-Info":`gotrue-js/${rw}`},ed="X-Supabase-Api-Version",sw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},TR=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Sr="sb_flow_id",RR=5,PR=10*60*1e3;
189class io extends Error{constructor(t,n,r){super(t),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 I(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class NR extends io{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function Dp(e){return I(e)&&e.name==="AuthApiError"}class Lt extends io{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class sn extends io{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Te extends sn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Zo(e){return I(e)&&e.name==="AuthSessionMissingError"}class Jr extends sn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class ea extends sn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ta extends sn{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function AR(e){return I(e)&&e.name==="AuthImplicitGrantRedirectError"}class Mp extends sn{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class OR extends sn{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 td extends sn{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function na(e){return I(e)&&e.name==="AuthRetryableFetchError"}class Up extends sn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function jR(e){return I(e)&&e.name==="AuthRefreshDiscardedError"}class Fp extends sn{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class el extends sn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const tl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Bp=` 190\r=`.split(""),IR=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Bp.length;t+=1)e[Bp[t].charCodeAt(0)]=-2;for(let t=0;t<tl.length;t+=1)e[tl[t].charCodeAt(0)]=t;return e})();function zp(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(tl[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(tl[r]),t.queuedBits-=6}}function iw(e,t,n){const r=IR[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Wp(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{DR(o,r,n)};for(let o=0;o<e.length;o+=1)iw(e.charCodeAt(o),s,i);return t.join("")}function LR(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function $R(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}LR(r,t)}}function DR(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function xs(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)iw(e.charCodeAt(s),n,r);return new Uint8Array(t)}function MR(e){const t=[];return $R(e,n=>t.push(n)),new Uint8Array(t)}function Er(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>zp(s,n,r)),zp(null,n,r),t.join("")}function UR(e){return Math.round(Date.now()/1e3)+e}function FR(){return Symbol("auth-callback")}const Oe=()=>typeof window<"u"&&typeof document<"u",pr={tested:!1,writable:!1},ow=()=>
190{if(!Oe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(pr.tested)return pr.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),pr.tested=!0,pr.writable=!0}catch{pr.tested=!0,pr.writable=!1}return pr.writable};function Hp(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const aw=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),BR=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",mn=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Be=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Xe=async(e,t)=>{await e.removeItem(t)};class Bl{constructor(){this.promise=new Bl.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Bl.promiseConstructor=Promise;function ra(e){const t=e.split(".");if(t.length!==3)throw new el("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!TR.test(t[r]))throw new el("JWT not in base64url format");return{header:JSON.parse(Wp(t[0])),payload:JSON.parse(Wp(t[1])),signature:xs(t[2]),raw:{header:t[0],payload:t[1]}}}async function zR(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function WR(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function lw(e){return("0"+e.toString(16)).substr(-2)}function HR(){const t=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(t),Array.from(t,lw).join("")}async function VR(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function KR(e){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."),e;const n=await VR(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const qR=/^[a-zA-Z0-9_-]{8,64}$/;function ba(e){return typeof e=="string"&&qR.test(e)?e:null}function GR(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,lw).join("")}let e="";for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}const Fs=(e,t)=>`${e}-flow-${t}-code-verifier`,oo=e=>`${e}-flows-code-verifier`;async function bh(e,t){const n=await Be(e,oo(t));return Array.isArray(n)?n.filter(r=>ba(r)!==null):[]}async function JR(e,t,n,r,s){await mn(e,Fs(t,n),r);const i=(await bh(e,t)).filter(o=>o!==n);for(i.push(n);i.length>RR;){const o=i.shift();await Xe(e,Fs(t,o)),s==null||s(o)}await mn(e,oo(t),i),await mn(e,`${t}-code-verifier`,r)}async function QR(e,t,n){if(n){const s=await Be(e,Fs(t,n));return{verifier:typeof s=="string"?s:null,flowId:n}}const r=await Be(e,`${t}-code-verifier`);return{verifier:typeof r=="string"?r:null,flowId:null}}async function Tt(e,t,n){const r=`${t}-code-verifier`;if(!n){await Xe(e,r);return}const s=Fs(t,n),i=await Be(e,s);await Xe(e,s);const o=await bh(e,t),a=o.filter(l=>l!==n);a.length!==o.length&&(a.length>0?await mn(e,oo(t),a):await Xe(e,oo(t))),i!=null&&i===await Be(e,r)&&await Xe(e,r)}async function YR(e,t){const n=await bh(e,t);for(const r of n)await Xe(e,Fs(t,r));await Xe(e,oo(t)),await Xe(e,`${t}-code-verifier`)}function XR(e,t){const n=e.indexOf("#");let r=n===-1?e:e.slice(0,n);const s=n===-1?"":e.slice(n),i=r.indexOf("?");if(i!==-1){const a=r.slice(0,i),l=r.slice(i+1).split("&").filter(u=>u!==""&&u!==Sr&&!u.startsWith(`${Sr}=`));r=l.length>0?`${a}?${l.join("&")}`:a}const o=r.includes("?")?"&":"?";return`${r}${o}${Sr}=${encodeURIComponent(t)}${s}`}async function ZR(e,t,n=!1,r){const s=HR();let i=s;n&&(i+="/recovery");const o=GR();await JR(e,t,o,i,r);const a=await KR(s);return[a,s===a?"plain":"s256",o]}const eP=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function tP(e){const t=e.headers.get(ed);if(!t||!t.match(eP))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function nP(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function rP(e){switch(e){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 sP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function an(e){if(!sP.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Rt(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Nu(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;
190if(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:(t,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:(t,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 iP(e,t){return new Proxy(e,{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!t.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."),t.value=!0),Reflect.get(n,r,s)}})}function Vp(e){return JSON.parse(JSON.stringify(e))}const yr=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},oP=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Kp(e){var t;if(!BR(e))throw new td(yr(e),0);if(oP.includes(e.status))throw new td(yr(e),e.status);let n;try{n=await e.json()}catch(i){throw new Lt(yr(i),i)}let r;const s=tP(e);if(s&&s.getTime()>=sw["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 Fp(yr(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Te}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)=>i&&typeof o=="string",!0))throw new Fp(yr(n),e.status,n.weak_password.reasons);throw new NR(yr(n),e.status||500,r)}const aP=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function M(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[ed]||(i[ed]=sw["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 lP(e,t,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 lP(e,t,n,r,s,i){const o=aP(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw new td(yr(l),0)}if(a.ok||await Kp(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await Kp(l)}}function gt(e){var t;let n=null;dP(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=UR(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:n,user:r},error:null}}function qp(e){const t=gt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Fn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function uP(e){return{data:e,error:null}}function cP(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Fl(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,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 Gp(e){return e}function dP(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Au=["global","local","others"];class hP{constructor({url:t="",headers:n={},fetch:r,experimental:s}){this.url=t,this.headers=n,this.fetch=aw(r),this.experimental=s??{},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)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,n=Au[0]){if(Au.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Au.join(", ")}`);try{return await M(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await M(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Fn})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Fl(t,["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 M(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:cP,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(I(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await M(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Fn})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await M(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Gp});if(d.error)throw d.error;const c=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(v=>{const y=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(v.split(";")[1].split("=")[1]);u[`${x}Page`]=y}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},c),u),error:null}}catch(u){if(I(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){an(t);try{return await M(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Fn})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){an(t);try{return await M(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Fn})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){an(t);
190try{return await M(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Fn})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){an(t.userId);try{const{data:n,error:r}=await M(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(I(n))return{data:null,error:n};throw n}}async _deleteFactor(t){an(t.userId),an(t.id);try{return{data:await M(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(I(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await M(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Gp});if(d.error)throw d.error;const c=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(v=>{const y=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(v.split(";")[1].split("=")[1]);u[`${x}Page`]=y}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},c),u),error:null}}catch(u){if(I(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await M(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await M(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await M(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await M(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(I(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await M(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await M(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(I(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await M(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await M(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await M(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await M(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(I(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){Rt(this.experimental),an(t.userId);try{return await M(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){Rt(this.experimental),an(t.userId),an(t.passkeyId);
190try{return await M(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(I(n))return{data:null,error:n};throw n}}}function Jp(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&ow()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class fP extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function pP(){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 uw(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function mP(e){return parseInt(e,16)}function gP(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function vP(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:d,uri:c,version:h}=e;{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(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 191`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=uw(e.address),v=d?`${d}://${r}`:r,y=e.statement?`${e.statement} 192`:"",x=`${v} wants you to sign in with your Ethereum account: 193${f} 194 195${y}`;let g=`URI: ${c} 196Version: ${h} 197Chain ID: ${n}${o?` 198Nonce: ${o}`:""} 199Issued At: ${i.toISOString()}`;if(s&&(g+=` 200Expiration Time: ${s.toISOString()}`),a&&(g+=` 201Not Before: ${a.toISOString()}`),l&&(g+=` 202Request ID: ${l}`),u){let m=` 203Resources:`;for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);m+=` 204- ${w}`}g+=m}return`${x} 205${g}`}class xe extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{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}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class nl extends xe{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function yP({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new xe({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new xe({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new xe({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new xe({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new xe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new xe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new xe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new xe({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(cw(o)){if(i.rp.id!==o)return new xe({message:`The RP ID "${i.rp.id}
205" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new xe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new xe({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new xe({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new xe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function wP({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new xe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new xe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(cw(r)){if(n.rpId!==r)return new xe({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new xe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new xe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new xe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class bP{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const nd=new bP;function Qp(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Fl(e,["challenge","user","excludeCredentials"]),i=xs(t).buffer,o=Object.assign(Object.assign({},n),{id:xs(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:xs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Yp(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Fl(e,["challenge","allowCredentials"]),s=xs(t).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:xs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Xp(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Er(new Uint8Array(e.response.attestationObject)),clientDataJSON:Er(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Zp(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;
205return{id:e.id,rawId:e.id,response:{authenticatorData:Er(new Uint8Array(s.authenticatorData)),clientDataJSON:Er(new Uint8Array(s.clientDataJSON)),signature:Er(new Uint8Array(s.signature)),userHandle:s.userHandle?Er(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function cw(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function rl(){var e,t;return!!(Oe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function dw(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new nl("Browser returned unexpected credential type",t)}:{data:null,error:new nl("Empty credential response",t)}}catch(t){return{data:null,error:yP({error:t,options:e})}}}async function hw(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new nl("Browser returned unexpected credential type",t)}:{data:null,error:new nl("Empty credential response",t)}}catch(t){return{data:null,error:wP({error:t,options:e})}}}const xP={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},_P={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function sl(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)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(t(o)){const a=r[i];t(a)?r[i]=sl(a,o):r[i]=sl(o)}else r[i]=o}return r}function SP(e,t){return sl(xP,e,t||{})}function EP(e,t){return sl(_P,e,t||{})}class kP{constructor(t){this.client=t,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(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const u=s??nd.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 f=(await this.client.getUser()).data.user,v=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";d.name=`${d.id}:${v}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=SP(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:c,error:h}=await dw({publicKey:d,signal:u});return c?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:c}},error:null}:{data:null,error:h}}case"request":{const d=EP(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:c,error:h}=await hw(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:u}));return c?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:c}},error:null}:{data:null,error:h}}}}catch(a){return I(a)?{data:null,error:a}:{data:null,error:new Lt("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,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 io("rpId is required for WebAuthn authentication")};try{if(!rl())return{data:null,error:new Lt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return I(o)?{data:null,error:o}:{data:null,error:new Lt("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,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 io("rpId is required for WebAuthn registration")};try{if(!rl())return{data:null,error:new Lt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});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(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.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 I(o)?{data:null,error:o}:{data:null,error:new Lt("Unexpected error in register",o)}}}}pP();const CP={url:ER,storageKey:kR,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:CR,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Qr={};class ao{get jwks(){var t,n;return(n=(t=Qr[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Qr[this.storageKey]=Object.assign(Object.assign({},Qr[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Qr[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Qr[this.storageKey]=Object.assign(Object.assign({},Qr[this.storageKey]),{cachedAt:t})}constructor(t){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.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},CP),t);if(this.storageKey=i.storageKey,this.instanceID=(n=ao.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,ao.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Oe()){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.experimental=(r=i.experimental)!==null&&r!==void 0?r:{},this.admin=new hP({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=aw(i.fetch),this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock!=null&&(this.lock=i.lock),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 kP(this)}
205,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.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:ow()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Jp(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Jp(this.memoryStorage)),Oe()&&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),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);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(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${rw}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const n=await this.initializePromise,r=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const s of r)await this._notifyAllSubscribers(s.event,s.session,s.broadcast);return n}async _initialize(){var t;try{let n={},r="none";if(Oe()&&(n=Hp(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Oe()&&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),AR(i)){const l=(t=i.details)===null||t===void 0?void 0:t.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 I(n)?this._returnResult({error:n}):this._returnResult({error:new Lt("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:gt}),{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(I(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;let i=null;try{let o;if("email"in t){const{email:c,password:h,options:f}=t;let v=null,y=null;this.flowType==="pkce"&&([v,y,i]=await this._getCodeChallengeAndMethod()),o=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(f==null?void 0:f.emailRedirectTo,i),body:{email:c,password:h,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:v,code_challenge_method:y},xform:gt})}else if("phone"in t){const{phone:c,password:h,options:f}=t;o=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:h,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:gt})}else throw new ea("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return await Tt(this.storage,this.storageKey,i),this._returnResult({data:{user:null,session:null},error:l});const u=a.session,d=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",u)),this._returnResult({data:{user:d,session:u},error:null})}catch(o){if(await Tt(this.storage,this.storageKey,i),I(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await M(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:qp})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await M(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:qp})}else throw new ea("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 Jr;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(I(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t,n){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t,n)):this._exchangeCodeForSession(t,n)}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,l,u,d,c,h;let f,v;if("message"in t)f=t.message,v=t.signature;else{const{chain:y,wallet:x,statement:g,options:m}=t;let w;if(Oe())if(typeof x=="object")w=x;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")w=O.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"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=x}const _=new URL((n=m==null?void 0:m.url)!==null&&n!==void 0?n:window.location.href),S=await w.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=uw(S[0]);let E=(r=m==null?void 0:m.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const O=await w.request({method:"eth_chainId"});E=mP(O)}const C={domain:_.host,address:k,statement:g,uri:_.href,version:"1",chainId:E,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=m==null?void 0:m.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=m==null?void 0:m.signInWithEthereum)===null||d===void 0?void 0:d.resources};f=vP(C),v=await w.request({method:"personal_sign",params:[gP(f),k]})}try{const{data:y,error:x}=await M(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:v},!((c=t.options)===null||c===void 0)&&c.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:gt});if(x)throw x;if(!y||!y.session||!y.user){const g=new Jr;return this._returnResult({data:{user:null,session:null},error:g})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:x})}catch(y){if(I(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var n,r,s,i,o,a,l,u,d,c,h,f;let v,y;if("message"in t)v=t.message,y=t.signature;else{const{chain:x,wallet:g,statement:m,options:w}=t;let _;if(Oe())if(typeof g=="object")_=g;
205else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))_=k.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 g!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=g}const S=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),m?{statement:m}:null));let E;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")E=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)E=k;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)v=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),y=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((c=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||c===void 0)&&c.length?["Resources",...w.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 206`);const k=await _.signMessage(new TextEncoder().encode(v),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=k}}try{const{data:x,error:g}=await M(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:Er(y)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:gt});if(g)throw g;if(!x||!x.session||!x.user){const m=new Jr;return this._returnResult({data:{user:null,session:null},error:m})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:g})}catch(x){if(I(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t,n){const r=(n==null?void 0:n.flowId)!=null,s=r?ba(n==null?void 0:n.flowId):Oe()?ba(Hp(window.location.href)[Sr]):null;r&&!s&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",n==null?void 0:n.flowId);const{verifier:i,flowId:o}=r&&!s?{verifier:null,flowId:null}:await QR(this.storage,this.storageKey,s),[a,l]=(i??"").split("/");try{if(!a&&this.flowType==="pkce")throw new OR;const{data:u,error:d}=await M(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:gt});if(await Tt(this.storage,this.storageKey,o),d)throw d;if(!u||!u.session||!u.user){const c=new Jr;return this._returnResult({data:{user:null,session:null,redirectType:null},error:c})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:l??null}),error:d})}catch(u){if(await Tt(this.storage,this.storageKey,o),I(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await M(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:gt}),{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 Jr;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(I(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;let a=null;try{if("email"in t){const{email:l,options:u}=t;let d=null,c=null;this.flowType==="pkce"&&([d,c,a]=await this._getCodeChallengeAndMethod());const{error:h}=await M(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=u==null?void 0:u.data)!==null&&n!==void 0?n:{},create_user:(r=u==null?void 0:u.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},code_challenge:d,code_challenge_method:c},redirectTo:this._maybeAppendFlowIdToRedirect(u==null?void 0:u.emailRedirectTo,a)});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:u}=t,{data:d,error:c}=await M(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=u==null?void 0:u.data)!==null&&s!==void 0?s:{},create_user:(i=u==null?void 0:u.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},channel:(o=u==null?void 0:u.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:c})}throw new ea("You must provide either an email or phone number.")}catch(l){if(await Tt(this.storage,this.storageKey,a),I(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await M(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:gt});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(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i;let o=null;try{let a=null,l=null;this.flowType==="pkce"&&([a,l,o]=await this._getCodeChallengeAndMethod());const u=await M(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect((n=t.options)===null||n===void 0?void 0:n.redirectTo,o)}),!((r=t==null?void 0:t.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:uP});return!((s=u.data)===null||s===void 0)&&s.url&&Oe()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Tt(this.storage,this.storageKey,o),I(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Te;const{error:s}=await M(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(I(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){let n=null;try{const r=`${this.url}/resend`;if("email"in t){const{email:s,type:i,options:o}=t;let a=null,l=null;this.flowType==="pkce"&&([a,l,n]=await this._getCodeChallengeAndMethod());const{error:u}=await M(this.fetch,"POST",r,{headers:this.headers,body:{email:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken},code_challenge:a,code_challenge_method:l},redirectTo:this._maybeAppendFlowIdToRedirect(o==null?void 0:o.emailRedirectTo,n)});return u&&await Tt(this.storage,this.storageKey,n),this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in t){const{phone:s,type:i,options:o}=t,{data:a,error:l}=await M(this.fetch,"POST",r,{headers:this.headers,body:{phone:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new ea("You must provide either an email or phone number and a type")}catch(r){if(await Tt(this.storage,this.storageKey,n),I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);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}`,t,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(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Be(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
206id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Pu:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Be(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Nu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=iP(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);if(i){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const a=await Be(this.storage,this.storageKey);if(a&&a.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await M(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Fn}):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 Te}:await M(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:Fn})})}catch(n){if(I(n))return Zo(n)&&await this._removeSession(),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n)):await this._updateUser(t,n)}async _updateUser(t,n={}){let r=null;try{return await this._useSession(async s=>{const{data:i,error:o}=s;if(o)throw o;if(!i.session)throw new Te;const a=i.session;let l=null,u=null;this.flowType==="pkce"&&t.email!=null&&([l,u,r]=await this._getCodeChallengeAndMethod());const{data:d,error:c}=await M(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n==null?void 0:n.emailRedirectTo,r),body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:u}),jwt:a.access_token,xform:Fn});if(c)throw c;return a.user=d.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(s){if(await Tt(this.storage,this.storageKey,r),I(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Te;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=ra(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(t.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(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.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(I(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;
206if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Te;const{data:s,error:i}=await this._callRefreshToken(t.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(I(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var r;try{if(!Oe())throw new ta("No browser detected.");if(t.error||t.error_description||t.error_code)throw new ta(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Mp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ta("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Mp("No code detected.");const{data:w,error:_}=await this._exchangeCodeForSession(t.code,{flowId:t[Sr]});if(_)throw _;const S=new URL(window.location.href);return S.searchParams.delete("code"),S.searchParams.delete(Sr),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:w.session,redirectType:(r=w.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:u,token_type:d}=t;if(!o||!l||!a||!d)throw new ta("No session defined in URL");const c=Math.round(Date.now()/1e3),h=parseInt(l);let f=c+h;u&&(f=parseInt(u));const v=f-c;v*1e3<=hn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${h}s`);const y=f-h;c-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,c):c-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,c);const{data:x,error:g}=await this._getUser(o);if(g)throw g;const m={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:h,expires_at:f,refresh_token:a,token_type:d,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:t.type},error:null})}catch(s){if(I(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){if(!t.code)return!1;const n=ba(t[Sr]);return n&&await Be(this.storage,Fs(this.storageKey,n))?!0:!!await Be(this.storage,`${this.storageKey}-code-verifier`)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const s=async()=>{await this._removeSession()},{data:i,error:o}=n;if(o&&!Zo(o))return this._returnResult({error:o});const a=(r=i.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:l}=await this.admin.signOut(a,t);if(l&&!(Dp(l)&&(l.status===404||l.status===401||l.status===403)||Zo(l)))return t!=="others"&&await s(),this._returnResult({error:l})}return t!=="others"&&await s(),this._returnResult({error:null})})}onAuthStateChange(t){const n=FR(),r={id:n,callback:t,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,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;
206if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),Zo(i)||na(i)||Dp(i)&&(i.code==="refresh_token_not_found"||i.code==="refresh_token_already_used"||i.code==="session_expired")?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null,i=null;this.flowType==="pkce"&&([r,s,i]=await this._getCodeChallengeAndMethod(!0));try{return await M(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n.redirectTo,i)})}catch(o){if(await Tt(this.storage,this.storageKey,i),I(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;let r=null;try{const{data:s,error:i}=await this._useSession(async o=>{var a,l,u,d,c;const{data:h,error:f}=o;if(f)throw f;const{url:v,flowId:y}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(u=t.options)===null||u===void 0?void 0:u.queryParams,skipBrowserRedirect:!0});return r=y,await M(this.fetch,"GET",v,{headers:this.headers,jwt:(c=(d=h.session)===null||d===void 0?void 0:d.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return Oe()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),this._returnResult({data:{provider:t.provider,url:s==null?void 0:s.url,flowId:r},error:null})}catch(s){if(I(s))return this._returnResult({data:{provider:t.provider,url:null,flowId:r},error:s});throw s}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:d}=t,c=await M(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:gt}),{data:h,error:f}=c;return f?this._returnResult({data:{user:null,session:null},error:f}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new Jr}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:f}))}catch(s){if(await Tt(this.storage,this.storageKey,null),I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await M(this.fetch,"DELETE",`${this.url}/user/identities/${t.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(I(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const r=Date.now();return await WR(async s=>(s>
2060&&await zR(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await M(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:gt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&na(i)&&Date.now()+o-r<hn})}catch(r){if(this._debug(n,"error",r),I(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const{url:r,flowId:s}=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Oe()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r,flowId:s},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Be(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Be(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await mn(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Nu()}else if(s&&!s.user&&!s.user){const o=await Be(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Xe(this.storage,this.storageKey+"-user"),await mn(this.storage,this.storageKey,s)):s.user=Nu()}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()<Pu;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Pu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(jR(o)?this._debug(r,"refresh discarded by commit guard",o):this._debug(r,"refresh failed",o))}}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),na(s)?console.warn(s):console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Te;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new Bl;const i=await Be(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new Te;const l=await Be(this.storage,this.storageKey);if(i!==null&&(l===null||l.refresh_token!==i.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:l?"replaced":"cleared"});const h={data:null,error:new Up};return this.refreshingDeferred.resolve(h),h}const d=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==d){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Xe(this.storage,this.storageKey),this.userStorage&&await Xe(this.userStorage,this.storageKey+"-user");const h={data:null,error:new Up};return this.refreshingDeferred.resolve(h),h}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const c={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(c),c}catch(i){if(this._debug(s,"error",i),I(i)){const o={data:null,error:i};if(!na(i)){const a=await Be(this.storage,this.storageKey);!!(a!=null&&a.expires_at&&a.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:o,expiresAt:Date.now()+SR},(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")}}
206async _notifyAllSubscribers(t,n,r=!0){if(this._pendingInitNotifications!==null&&r){this._pendingInitNotifications.push({event:t,session:n,broadcast:r});return}const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,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(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await mn(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=Vp(s);await mn(this.storage,this.storageKey,i)}else{const s=Vp(n);await mn(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Xe(this.storage,this.storageKey),await YR(this.storage,this.storageKey),await Xe(this.storage,this.storageKey+"-user"),this.userStorage&&await Xe(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Oe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),hn);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);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 t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);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 dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=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-t)/hn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${hn}ms, refresh threshold is ${mi} ticks`),s<=mi&&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(t){if(t instanceof fP)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{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-t)/hn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${hn}ms, refresh threshold is ${mi} ticks`),s<=mi&&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")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Oe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
206{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()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){let s=r==null?void 0:r.redirectTo,i=null,o=null,a=null;this.flowType==="pkce"&&([i,o,a]=await this._getCodeChallengeAndMethod(),s=this._maybeAppendFlowIdToRedirect(s,a));const l=[`provider=${encodeURIComponent(n)}`];if(s&&l.push(`redirect_to=${encodeURIComponent(s)}`),r!=null&&r.scopes&&l.push(`scopes=${encodeURIComponent(r.scopes)}`),i!=null&&o!=null){const u=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});l.push(u.toString())}if(r!=null&&r.queryParams){const u=new URLSearchParams(r.queryParams);l.push(u.toString())}return r!=null&&r.skipBrowserRedirect&&l.push(`skip_http_redirect=${r.skipBrowserRedirect}`),{url:`${t}?${l.join("&")}`,flowId:a}}_maybeAppendFlowIdToRedirect(t,n){return!t||!n||!this.experimental.appendPkceFlowIdToRedirects?t??void 0:XR(t,n)}async _getCodeChallengeAndMethod(t=!1){return ZR(this.storage,this.storageKey,t,n=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",n))}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await M(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){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:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await M(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}):(t.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(I(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){const n=async()=>{try{return await this._useSession(async r=>{var s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Xp(t.webauthn.credential_response):Zp(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:u}=await M(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return u?this._returnResult({data:null,error:u}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:u}))})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(t){const n=async()=>{try{return await this._useSession(async r=>{var s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=await M(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:Qp(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:Yp(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;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(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:f}=ra(t);let v=null;f.aal&&(v=f.aal);let y=v;const{data:{user:x},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(_=>_.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(y="aal2");const w=f.amr||[];return{data:{currentLevel:v,nextLevel:y,currentAuthenticationMethods:w},error:null}}catch(f){if(I(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
206=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}=ra(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(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const h=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await M(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Te})})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,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 Te});const o=await M(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Oe()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,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 Te});const o=await M(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Oe()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await M(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 Te})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await M(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Te})})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+PR>s)return r;const{data:i,error:o}=await M(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===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:f,error:v}
206=await this.getSession();if(v||!f.session)return this._returnResult({data:null,error:v});r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=ra(r);if(!(n!=null&&n.allowExpired))try{nP(i.exp)}catch(f){throw new el(f instanceof Error?f.message:"JWT validation failed")}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:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const d=rP(s.alg),c=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,c,o,MR(`${a}.${l}`)))throw new el("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(t){var n,r,s;Rt(this.experimental);try{if(!rl())return this._returnResult({data:null,error:new Lt("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=Yp(i.options),l=(s=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:nd.createNewAbortSignal(),{data:u,error:d}=await hw({publicKey:a,signal:l});if(d||!u)return this._returnResult({data:null,error:d??new Lt("WebAuthn ceremony failed",null)});const c=Zp(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:c})}catch(i){if(I(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var n,r;Rt(this.experimental);try{if(!rl())return this._returnResult({data:null,error:new Lt("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=Qp(s.options),a=(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:nd.createNewAbortSignal(),{data:l,error:u}=await dw({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new Lt("WebAuthn ceremony failed",null)});const d=Xp(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:d})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){Rt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Te});const{data:s,error:i}=await M(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Rt(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Te});const{data:i,error:o}=await M(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;Rt(this.experimental);try{const{data:r,error:s}=await M(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(t){Rt(this.experimental);try{const{data:n,error:r}=await M(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:gt});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){Rt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Te});const{data:s,error:i}=await M(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Rt(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Te});const{data:i,error:o}=await M(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){Rt(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Te});const{error:i}
206=await M(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}}ao.nextInstanceID={};const TP=ao,RP="2.111.0";let gi="",il;if(typeof Deno<"u"){var Ou;gi="deno",il=(Ou=Deno.version)===null||Ou===void 0?void 0:Ou.deno}else if(typeof document<"u")gi="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")gi="react-native";else{var ju;gi="node";const e=globalThis.process;il=e==null||(ju=e.version)===null||ju===void 0?void 0:ju.replace(/^v/,"")}const fw=[`runtime=${gi}`];il&&fw.push(`runtime-version=${il}`);const PP={"X-Client-Info":`supabase-js/${RP}; ${fw.join("; ")}`},NP={headers:PP},AP={schema:"public"},OP={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},jP={},IP={enabled:!1,respectSamplingDecision:!0};function LP(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return 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(e,[])).next())})}let Iu=null;const $P="@opentelemetry/api";function DP(){return Iu===null&&(Iu=import($P).catch(()=>null)),Iu}function MP(){return LP(this,void 0,void 0,function*(){try{const e=yield DP();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function UP(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[n,r,s,i]=t;if(n.length!==2||r.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(s)||!o.test(i)||r==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:n,traceId:r,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function FP(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(const r of t)try{if(typeof r=="string"){if(BP(n.hostname,r))return!0}else if(r instanceof RegExp){if(r.test(n.hostname))return!0}else if(typeof r=="function"&&r(n))return!0}catch{continue}return!1}function BP(e,t){if(t===e)return!0;if(t.startsWith("*.")){const n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith("."+n)))return!0}return!1}function zP(e){const t=[];try{const n=new URL(e);t.push(n.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function lo(e){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lo(e)}function WP(e,t){if(lo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(lo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HP(e){var t=WP(e,"string");return lo(t)=="symbol"?t:t+""}function VP(e,t,n){return(t=HP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function em(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?em(Object(n),!0).forEach(function(r){VP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):em(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const KP=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),qP=()=>Headers,pw=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),GP="sb_temp_",tm=new Set,JP=e=>{var t,n;if(!e.startsWith("sb_")||pw(e)||e.startsWith(GP))return;const r=(t=(n=e.match(/^sb_[a-zA-Z0-9]+_/))===null||n===void 0?void 0:n[0])!==null&&t!==void 0?t:"unknown";tm.has(r)||(tm.add(r),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is;
206 if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},nm=(e,t,n,r,s,i)=>{const o=KP(r),a=qP(),l=(s==null?void 0:s.enabled)===!0,u=(s==null?void 0:s.respectSamplingDecision)!==!1,d=l?zP(t):null,c=!(i!=null&&i.omitApiKeyAsBearer&&pw(e));return async(h,f)=>{const v=await n();let y=new a(f==null?void 0:f.headers);if(y.has("apikey")||y.set("apikey",e),!y.has("Authorization")){const x=v??(c?e:null);x&&y.set("Authorization",`Bearer ${x}`)}if(d){const x=await QP(h,d,u);x&&(x.traceparent&&!y.has("traceparent")&&y.set("traceparent",x.traceparent),x.tracestate&&!y.has("tracestate")&&y.set("tracestate",x.tracestate),x.baggage&&!y.has("baggage")&&y.set("baggage",x.baggage))}return o(h,ve(ve({},f),{},{headers:y}))}};async function QP(e,t,n){if(!FP(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const r=await MP();if(!r||!r.traceparent)return null;if(n){const s=UP(r.traceparent);if(s&&!s.isSampled)return null}return r}function rm(e){return typeof e=="boolean"?{enabled:e}:e}function YP(e){return e.endsWith("/")?e:e+"/"}function XP(e,t){var n,r,s,i,o,a;const{db:l,auth:u,realtime:d,global:c}=e,{db:h,auth:f,realtime:v,global:y}=t,x=rm(e.tracePropagation),g=rm(t.tracePropagation),m={db:ve(ve({},h),l),auth:ve(ve({},f),u),realtime:ve(ve({},v),d),storage:{},global:ve(ve(ve({},y),c),{},{headers:ve(ve({},(n=y==null?void 0:y.headers)!==null&&n!==void 0?n:{}),(r=c==null?void 0:c.headers)!==null&&r!==void 0?r:{})}),tracePropagation:{enabled:(s=(i=x==null?void 0:x.enabled)!==null&&i!==void 0?i:g==null?void 0:g.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=x==null?void 0:x.respectSamplingDecision)!==null&&a!==void 0?a:g==null?void 0:g.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return e.accessToken?m.accessToken=e.accessToken:delete m.accessToken,m}function ZP(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(YP(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var eN=class extends TP{constructor(e){super(e)}},tN=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=ZP(e);if(!t)throw new Error("supabaseKey is required.");JP(t),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:AP,realtime:jP,auth:ve(ve({},OP),{},{storageKey:o}),global:NP,tracePropagation:IP},l=XP(n??{},a);if(this.settings=l,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=nm(t,e,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation),this.functionsFetch=nm(t,e,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(ve({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},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 rT(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 _R(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new GC(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
206channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:null}async _getAccessToken(){var e=this,t;return(t=await e._getSessionToken())!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u,experimental:d,lockAcquireTimeout:c,skipAutoInitialize:h},f,v){const y={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new eN({url:this.authUrl.href,headers:ve(ve({},y),f),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:d,fetch:v,lockAcquireTimeout:c,skipAutoInitialize:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(x=>x.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new KT(this.realtimeUrl.href,ve(ve({},e),{},{params:ve(ve({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN"||e==="INITIAL_SESSION")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const nN=(e,t,n)=>new tN(e,t,n);function rN(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}rN()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");const sN="https://gvjpobtyxsivcctewocv.supabase.co",iN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imd2anBvYnR5eHNpdmNjdGV3b2N2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDA5Mzk5MjUsImV4cCI6MjA1NjUxNTkyNX0.-IlA6m0QkBtml3J62AZMZkcnNpKdnYx_uHhDSQaMS2o",Pi=nN(sN,iN,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),oN=()=>{const[e,t]=b.useState({fullName:"",phone:"",email:"",attendancePreference:"in-person"}),[n,r]=b.useState(!1),[s,i]=b.useState(!1),o=d=>{const{name:c,value:h}=d.target;t(f=>({...f,[c]:h}))},a=d=>{t(c=>({...c,attendancePreference:d}))},l=()=>e.fullName.trim()?e.phone.trim()?!e.email.trim()||!e.email.includes("@")?(pn.error("Please enter a valid email address"),!1):!0:(pn.error("Please enter your phone number"),!1):(pn.error("Please enter your full name"),!1),u=async d=>{if(d.preventDefault(),!!l()){i(!0);try{const{error:c}=await Pi.from("meno_power_rsvps").insert({full_name:e.fullName.trim(),phone:e.phone.trim(),email:e.email.trim().toLowerCase(),attendance_preference:e.attendancePreference});if(c)throw c;r(!0),pn.success("RSVP submitted successfully!")}catch(c){console.error("Error submitting RSVP:",c),pn.error("Failed to submit RSVP. Please try again.")}finally{i(!1)}}};return n?p.jsx(Yt,{className:"bg-meno-card border-meno-red shadow-glow",children:p.jsxs(Xt,{className:"p-8 text-center",children:[p.jsx("div",{className:"w-16 h-16 bg-meno-red rounded-full flex items-center justify-center mx-auto mb-4",children:p.jsx(H_,{className:"w-8 h-8 text-meno-tan"})}),p.jsx("h3",{className:"text-2xl font-bold text-meno-tan mb-4",children:"Thank You!"}),p.jsx("p",{className:"text-meno-tan/80 text-lg",children:"Thanks for signing up! We'll see you on September 4 at Dani Gym & Wellness!"}),p.jsx("p",{className:"text-meno-tan/60 mt-2",children:"You'll receive a confirmation email shortly with all the details."})]})}):p.jsxs(Yt,{className:"bg-meno-card border-meno-red shadow-glow",children:[p.jsxs(Ll,{className:"text-center pb-6",children:[p.jsx($l,{className:"text-3xl font-bold text-meno-tan",children:"Reserve Your Spot Now"}),p.jsx("p",{className:"text-meno-tan/80",children:"Limited spots available - secure your place today!"})]}),p.jsx(Xt,{children:p.jsxs("form",{onSubmit:u,className:"space-y-6",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsxs(bt,{htmlFor:"fullName",className:"text-meno-tan flex items-center gap-2",children:[p.jsx(J_,{className:"w-4 h-4"}),"Full Name *"]}),p.jsx(Ar,{id:"fullName",name:"fullName",type:"text",required:!0,value:e.fullName,onChange:o,className:"bg-meno-dark border-border text-meno-tan placeholder:text-meno-tan/50 focus:border-meno-red focus:ring-meno-red",placeholder:"Enter your full name"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(bt,{htmlFor:"phone",className:"text-meno-tan flex items-center gap-2",children:[p.jsx(sh,{className:"w-4 h-4"}),"Phone Number *"]}),p.jsx(Ar,{id:"phone",name:"phone",type:"tel",required:!0,value:e.phone,onChange:o,className:"bg-meno-dark border-border text-meno-tan placeholder:text-meno-tan/50 focus:border-meno-red focus:ring-meno-red",placeholder:"(555) 123-4567"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(bt,{htmlFor:"email",className:"text-meno-tan flex items-center gap-2",children:[p.jsx(cy,{className:"w-4 h-4"}),"Email Address *"]}),p.jsx(Ar,{id:"email",name:"email",type:"email",required:!0,value:e.email,onChange:o,className:"bg-meno-dark border-border text-meno-tan placeholder:text-meno-tan/50 focus:border-meno-red focus:ring-meno-red",placeholder:"[email protected]"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(bt,{className:"text-meno-tan flex items-center gap-2",children:[p.jsx(Cl,{className:"w-4 h-4"}),"How would you like to attend? *"]}),p.jsxs(W0,{value:e.attendancePreference,onValueChange:a,className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Vc,{value:"in-person",id:"in-person",className:"border-meno-tan text-meno-red"}),p.jsx(bt,{htmlFor:"in-person",className:"text-meno-tan cursor-pointer",children:"In Person"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Vc,{value:"zoom",id:"zoom",className:"border-meno-tan text-meno-red"}),p.jsx(bt,{htmlFor:"zoom",className:"text-meno-tan cursor-pointer",children:"Zoom"})]})]})]}),p.jsx(_r,{type:"submit",disabled:s,className:"w-full bg-meno-red hover:bg-meno-red/90 text-meno-tan font-bold py-3 text-lg shadow-glow transition-all duration-300 hover:shadow-[0_0_50px_hsl(var(--meno-red)/0.5)]",children:s?"Submitting...":"RSVP Now"})]})})]})},mw=()=>p.jsx("footer",{className:"bg-meno-dark border-t border-meno-red/30 py-12 px-4",children:p.jsxs("div",{className:"container max-w-4xl mx-auto text-center",children:[p.jsx("div",{className:"flex justify-center mb-6",children:p.jsx("img",{src:"/lovable-uploads/a039965f-7a44-4bb0-b88b-edaf8c725f94.png",alt:"Dani K Gym & Wellness",className:"h-16 w-auto filter brightness-110"})}),p.jsx("h3",{className:"text-2xl font-bold text-meno-tan mb-2",children:"Dani Gym & Wellness"}),p.jsx("p",{className:"text-lg text-meno-tan/80 mb-6 italic",children:"Helping women thrive through every stage of life."}),p.jsxs("div",{className:"space-y-2 text-meno-tan/70",children:[p.jsx("p",{children:"332 140 Village Rd., Suite 7"}),p.jsx("p",{children:"Westminster, MD 21257"}),p.jsx("p",{className:"font-semibold",children:"443-829-7213"})]}),p.jsxs("div",{className:"mt-8 pt-6 border-t border-meno-red/20",children:[p.jsx("div",{className:"flex justify-center mb-4",children:p.jsx("a",{href:"https://danikgymandwellness.com/",target:"_blank",rel:"noopener noreferrer",className:"text-meno-tan hover:text-meno-red text-sm transition-colors font-medium",children:"Visit Our Main Website"})}),p.jsxs("p",{className:"text-meno-tan/60 text-sm",children:["© 2025 Dani Gym & Wellness. All rights reserved."," ","â¢"," ",p.jsx("a",{href:"https://breaktheimage.com",target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:"Website by Break The Image"})]})]})]})}),xh=({title:e,description:t,image:n,url:r})=>{b.useEffect(()=>{document.title=e;const s=document.querySelector('meta[name="description"]');s&&s.setAttribute("content",t);const i=document.querySelector('meta[property="og:title"]');i&&i.setAttribute("content",e);const o=document.querySelector('meta[property="og:description"]');if(o&&o.setAttribute("content",t),n){const a=document.querySelector('meta[property="og:image"]');a&&a.setAttribute("content",n);const l=document.querySelector('meta[name="twitter:image"]');l&&l.setAttribute("content",n)}if(r){const a=document.querySelector('meta[property="og:url"]');a&&a.setAttribute("content",r)}},[e,t,n,r])},aN=()=>(xh({title:"FREE Menopause Wellness Class | M.E.N.O. POWER at Dani Gym & Wellness",description:"Join us for a free M.E.N.O. POWER class focused on menopause wellness through movement, nutrition, and hormone health. RSVP today!",image:`${window.location.origin}/lovable-uploads/a039965f-7a44-4bb0-b88b-edaf8c725f94.png`,url:window.location.origin}),p.jsxs("div",{className:"min-h-screen bg-meno-dark",children:[p.jsx(gC,{}),p.jsx(vC,{}),p.jsx("section",{id:"rsvp-form",className:"py-16 px-4 bg-meno-dark",children:p.jsx("div",{className:"container max-w-2xl mx-auto",children:p.jsx(oN,{})})}),p.jsx(mw,{})]})),lN=()=>{const[e,t]=b.useState([]),[n,r]=b.useState([]),[s,i]=b.useState(!0),[o,a]=b.useState("all");xh({title:"Admin Dashboard | All Form Submissions | Dani Gym & Wellness",description:"Admin dashboard for viewing all form submissions across the website including RSVPs, paid registrations, contact forms, and memorial contributions.",image:`${window.location.origin}/lovable-uploads/a039965f-7a44-4bb0-b88b-edaf8c725f94.png`,url:`${window.location.origin}/admin`}),b.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const c=[],{data:h,error:f}=await Pi.from("meno_power_rsvps").select("id").limit(1);if(f){console.error("Admin access test failed:",f),pn.error("Access denied. Admin authentication required."),i(!1);return}const{data:v,error:y}=await Pi.from("meno_power_rsvps").select("*").order("created_at",{ascending:!1});y?(console.error("Error fetching RSVPs:",y),pn.error("Failed to load RSVP data")):v&&c.push(...v.map(m=>({...m,form_type:"rsvp"})));const{data:x,error:g}=await Pi.from("meno_power_paid_registrations").select("*").order("created_at",{ascending:!1});g?console.error("Error fetching paid registrations:",g):x&&c.push(...x.map(m=>({...m,form_type:"paid_registration"}))),c.sort((m,w)=>new Date(w.created_at).getTime()-new Date(m.created_at).getTime()),t(c),r(c),c.length===0&&pn.info("No submissions foun
206d. This may be due to access permissions.")}catch(c){console.error("Error fetching submissions:",c),pn.error("Failed to load form submissions. Please check your admin access.")}finally{i(!1)}},u=c=>{a(c),r(c==="all"?e:e.filter(h=>h.form_type===c))};b.useEffect(()=>{u(o)},[e]);const d=c=>new Date(c).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return s?p.jsx("div",{className:"min-h-screen bg-meno-dark flex items-center justify-center",children:p.jsx("div",{className:"text-meno-tan text-xl",children:"Loading form submissions..."})}):p.jsx("div",{className:"min-h-screen bg-meno-dark p-6",children:p.jsxs("div",{className:"max-w-6xl mx-auto",children:[p.jsxs("div",{className:"mb-8",children:[p.jsx(y0,{to:"/",children:p.jsxs(_r,{variant:"outline",className:"mb-4 border-meno-red text-meno-tan hover:bg-meno-red hover:text-meno-tan",children:[p.jsx(oy,{className:"w-4 h-4 mr-2"}),"Back to Landing Page"]})}),p.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[p.jsx(vr,{className:"w-8 h-8 text-meno-red"}),p.jsx("h1",{className:"text-4xl font-bold text-meno-tan",children:"Admin Dashboard"})]}),p.jsx("p",{className:"text-meno-tan/80 text-lg",children:"M.E.N.O. POWER Class Submissions from This Website"})]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[p.jsx(Yt,{className:"bg-meno-card border-meno-red",children:p.jsx(Xt,{className:"p-6",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-12 h-12 bg-meno-red rounded-lg flex items-center justify-center",children:p.jsx(vr,{className:"w-6 h-6 text-meno-tan"})}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan/60 text-sm",children:"Total Submissions"}),p.jsx("p",{className:"text-2xl font-bold text-meno-tan",children:e.length})]})]})})}),p.jsx(Yt,{className:"bg-meno-card border-meno-red",children:p.jsx(Xt,{className:"p-6",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-12 h-12 bg-meno-red rounded-lg flex items-center justify-center",children:p.jsx(kl,{className:"w-6 h-6 text-meno-tan"})}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan/60 text-sm",children:"Free Class RSVPs"}),p.jsx("p",{className:"text-2xl font-bold text-meno-tan",children:e.filter(c=>c.form_type==="rsvp").length})]})]})})}),p.jsx(Yt,{className:"bg-meno-card border-meno-red",children:p.jsx(Xt,{className:"p-6",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-12 h-12 bg-meno-red rounded-lg flex items-center justify-center",children:p.jsx(vr,{className:"w-6 h-6 text-meno-tan"})}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan/60 text-sm",children:"Paid Program"}),p.jsx("p",{className:"text-2xl font-bold text-meno-tan",children:e.filter(c=>c.form_type==="paid_registration").length})]})]})})})]}),p.jsxs(Yt,{className:"bg-meno-card border-meno-red",children:[p.jsx(Ll,{children:p.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[p.jsxs($l,{className:"text-2xl text-meno-tan flex items-center gap-2",children:[p.jsx(vr,{className:"w-6 h-6"}),"Form Submissions (",n.length,")"]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(q_,{className:"w-4 h-4 text-meno-tan"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[p.jsx(_r,{size:"sm",variant:o==="all"?"default":"outline",onClick:()=>u("all"),className:o==="all"?"bg-meno-red text-meno-tan":"border-meno-red text-meno-tan hover:bg-meno-red hover:text-meno-tan",children:"All"}),p.jsx(_r,{size:"sm",variant:o==="rsvp"?"default":"outline",onClick:()=>u("rsvp"),className:o==="rsvp"?"bg-meno-red text-meno-tan":"border-meno-red text-meno-tan hover:bg-meno-red hover:text-meno-tan",children:"Free Class RSVPs"}),p.jsx(_r,{size:"sm",variant:o==="paid_registration"?"default":"outline",onClick:()=>u("paid_registration"),className:o==="paid_registration"?"bg-meno-red text-meno-tan":"border-meno-red text-meno-tan hover:bg-meno-red hover:text-meno-tan",children:"Paid Program"})]})]})]})}),p.jsx(Xt,{children:n.length===0?p.jsxs("div",{className:"text-center py-12",children:[p.jsx(vr,{className:"w-16 h-16 text-meno-tan/30 mx-auto mb-4"}),p.jsx("p",{className:"text-meno-tan/60 text-lg",children:o==="all"?"No form submissions yet":`No ${o}
206 submissions found`}),p.jsx("p",{className:"text-meno-tan/40",children:o==="all"?"Submissions will appear here once people start using the forms":"Try changing the filter to see other submissions"})]}):p.jsx("div",{className:"space-y-4",children:n.map(c=>p.jsx("div",{className:"bg-meno-dark border border-meno-red/20 rounded-lg p-6 hover:border-meno-red/40 transition-colors",children:p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-medium ${c.form_type==="rsvp"?"bg-blue-500/20 text-blue-400 border border-blue-500/30":"bg-green-500/20 text-green-400 border border-green-500/30"}`,children:c.form_type==="rsvp"?"Free Class RSVP":"Paid Program Registration"}),c.payment_status&&p.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${c.payment_status==="pending"?"bg-yellow-500/20 text-yellow-400 border border-yellow-500/30":"bg-green-500/20 text-green-400 border border-green-500/30"}`,children:c.payment_status})]}),p.jsx("div",{className:"text-xs text-meno-tan/60",children:d(c.created_at)})]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(vr,{className:"w-4 h-4 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-meno-tan/60",children:"Name"}),p.jsx("p",{className:"font-semibold text-meno-tan",children:c.full_name})]})]}),c.phone&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(sh,{className:"w-4 h-4 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-meno-tan/60",children:"Phone"}),p.jsx("p",{className:"text-meno-tan",children:c.phone})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(cy,{className:"w-4 h-4 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-meno-tan/60",children:"Email"}),p.jsx("p",{className:"text-meno-tan",children:c.email})]})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Cl,{className:"w-4 h-4 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-meno-tan/60",children:"Attendance Preference"}),p.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${c.attendance_preference==="in-person"?"bg-green-500/20 text-green-400 border border-green-500/30":"bg-blue-500/20 text-blue-400 border border-blue-500/30"}`,children:c.attendance_preference==="in-person"?"In-Person":"Zoom"})]})]}),c.payment_method&&p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-meno-tan/60 mb-1",children:"Payment Method"}),p.jsx("p",{className:"text-meno-tan",children:c.payment_method})]}),c.notes&&p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-meno-tan/60 mb-1",children:"Notes"}),p.jsx("p",{className:"text-meno-tan text-sm bg-meno-card/30 p-3 rounded border border-meno-red/10",children:c.notes})]})]})},`${c.form_type}-${c.id}`))})})]})]})})},gw=b.forwardRef(({className:e,...t},n)=>p.jsx("textarea",{className:Ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
206ing-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",e),ref:n,...t}));gw.displayName="Textarea";const uN=()=>{const[e,t]=b.useState({fullName:"",phone:"",email:"",notes:""}),[n,r]=b.useState(!1),[s,i]=b.useState(!1),{toast:o}=Rv(),a=d=>{const{name:c,value:h}=d.target;t(f=>({...f,[c]:h}))},l=()=>e.fullName.trim()?e.phone.trim()?e.email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.email)?!0:(o({title:"Error",description:"Please enter a valid email address.",variant:"destructive"}),!1):(o({title:"Error",description:"Please enter your email address.",variant:"destructive"}),!1):(o({title:"Error",description:"Please enter your phone number.",variant:"destructive"}),!1):(o({title:"Error",description:"Please enter your full name.",variant:"destructive"}),!1),u=async d=>{if(d.preventDefault(),!!l()){r(!0);try{const{error:c}=await Pi.from("meno_power_paid_registrations").insert([{full_name:e.fullName,phone:e.phone,email:e.email,attendance_preference:"in-person",notes:e.notes||null}]);if(c){console.error("Error inserting registration:",c),o({title:"Error",description:"There was an error submitting your registration. Please try again.",variant:"destructive"});return}i(!0),o({title:"Registration Submitted!",description:"Thank you for registering for the 6-week M.E.N.O. POWER program. Please complete payment to secure your spot."})}catch(c){console.error("Unexpected error:",c),o({title:"Error",description:"An unexpected error occurred. Please try again.",variant:"destructive"})}finally{r(!1)}}};return s?p.jsx(Yt,{className:"bg-meno-card border-meno-red/30 shadow-card",children:p.jsx(Xt,{className:"pt-6",children:p.jsxs("div",{className:"text-center space-y-4",children:[p.jsx(Hf,{className:"w-16 h-16 text-meno-red mx-auto"}),p.jsx("h3",{className:"text-2xl font-bold text-meno-tan",children:"Registration Received!"}),p.jsxs("div",{className:"space-y-3 text-meno-tan/80",children:[p.jsx("p",{children:"Thank you for registering for the 6-week M.E.N.O. POWER program!"}),p.jsxs("div",{className:"bg-meno-dark/50 rounded-lg p-4 border border-meno-red/20",children:[p.jsx("h4",{className:"font-semibold text-meno-tan mb-2",children:"Complete Your Payment:"}),p.jsx("p",{className:"text-sm",children:"To secure your spot, please send payment via:"}),p.jsxs("ul",{className:"list-disc list-inside text-sm mt-2 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"Venmo:"})," @Dani-[LastName]"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Zelle:"})," 443-829-7213"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Cash:"})," In person at the gym"]})]}),p.jsx("p",{className:"text-xs mt-3 text-meno-tan/60",children:"Your spot will remain open until payment is received. Spots are filled on a first-come, first-paid basis."})]})]})]})})}):p.jsxs(Yt,{className:"bg-meno-card border-meno-red/30 shadow-card",children:[p.jsxs(Ll,{className:"text-center",children:[p.jsx($l,{className:"text-2xl text-meno-tan",children:"6-Week M.E.N.O. POWER Program"}),p.jsx(w0,{className:"text-meno-tan/80",children:"Join our comprehensive menopause wellness program"}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-6",children:[p.jsxs("div",{className:"flex items-center gap-2 text-meno-tan/80",children:[p.jsx(kl,{className:"w-5 h-5 text-meno-red"}),p.jsx("span",{className:"text-sm",children:"6 Weekly Sessions"})]}),p.jsxs("div",{className:"flex items-center gap-2 text-meno-tan/80",children:[p.jsx(uy,{className:"w-5 h-5 text-meno-red"}),p.jsx("span",{className:"text-sm font-semibold text-meno-red",children:"$99 Total"})]}),p.jsxs("div",{className:"flex items-center gap-2 text-meno-tan/80",children:[p.jsx(vr,{className:"w-5 h-5 text-meno-red"}),p.jsx("span",{className:"text-sm",children:"Small Group Setting"})]})]})]}),p.jsxs("form",{onSubmit:u,children:[p.jsxs(Xt,{className:"space-y-6",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(bt,{htmlFor:"fullName",className:"text-meno-tan",children:"Full Name *"}),p.jsx(Ar,{id:"fullName",name:"fullName",type:"text",value:e.fullName,onChange:a,className:"bg-meno-dark border-meno-red/30 text-meno-tan focus:border-meno-red",required:!0})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(bt,{htmlFor:"phone",className:"text-meno-tan",children:"Phone Number *"}),p.jsx(Ar,{id:"phone",name:"phone",type:"tel",value:e.phone,onChange:a,className:"bg-meno-dark border-meno-red/30 text-meno-tan focus:border-meno-red",required:!0})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(bt,{htmlFor:"email",className:"text-meno-tan",children:"Email Address *"}),p.jsx(Ar,{id:"email",name:"email",type:"email",value:e.email,onChange:a,className:"bg-meno-dark border-meno-red/30 text-meno-tan focus:border-meno-red",required:!0})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(bt,{className:"text-meno-tan",children:"Program Location"}),p.jsxs("div",{className:"bg-meno-dark/50 rounded-lg p-4 border border-meno-red/20",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Hf,{className:"w-5 h-5 text-meno-red"}),p.jsx("span",{className:"text-meno-tan font-medium",children:"In-Person at Dani Gym & Wellness, Westminster, MD"})]}),p.jsx("p",{className:"text-sm text-meno-tan/60 mt-2",children:"All sessions are held in-person at our Westminster location."})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(bt,{htmlFor:"notes",className:"text-meno-tan",children:"Additional Notes (Optional)"}),p.jsx(gw,{id:"notes",name:"notes",value:e.notes,onChange:a,placeholder:"Any specific questions or health considerations...",className:"bg-meno-dark border-meno-red/30 text-meno-tan focus:border-meno-red resize-none",rows:3})]}),p.jsxs("div",{className:"bg-meno-dark/50 rounded-lg p-4 border border-meno-red/20",children:[p.jsx("h4",{className:"font-semibold text-meno-tan mb-2",children:"Payment Information"}),p.jsxs("p",{className:"text-sm text-meno-tan/80 mb-3",children:["Total cost: ",p.jsx("span",{className:"font-bold text-meno-red",children:"$99"})," for the complete 6-week program"]}),p.jsx("p",{className:"text-sm text-meno-tan/80",children:"After registering, complete payment via Venmo, Zelle, or cash to secure your spot. Your reservation will be held until payment is received."})]})]}),p.jsx(b0,{children:p.jsx(_r,{type:"submit",disabled:n,className:"w-full bg-meno-red hover:bg-meno-red/90 text-meno-tan font-semibold py-3 shadow-glow",children:n?"Submitting...":"Register for 6-Week Program"})})]})]})},cN=()=>(xh({title:"6-Week M.E.N.O. POWER",description:"Complete Menopause Wellness Program",image:`https://f47cc89b-5394-402c-bd73-2ed4508b2c9d.sandbox.lovable.dev/lovable-uploads/dcbb7771-6fc5-428e-a07b-fba66ad0f520.png?v=${Date.now()}`,url:window.location.href}),p.jsxs("div",{className:"min-h-screen bg-meno-dark",children:[p.jsx("header",{className:"py-6 px-4 border-b border-meno-red/30",children:p.jsx("div",{className:"container max-w-4xl mx-auto",children:p.jsxs(y0,{to:"/",className:"inline-flex items-center gap-2 text-meno-tan hover:text-meno-red transition-colors",children:[p.jsx(oy,{className:"w-5 h-5"}),"Back to Free Class"]})})}),p.jsx("section",{className:"py-16 px-4 bg-gradient-hero",children:p.jsxs("div",{className:"container max-w-4xl mx-auto text-center",children:[p.jsx("div",{className:"mb-8 flex justify-center",children:p.jsx("img",{src:"/lovable-uploads/a039965f-7a44-4bb0-b88b-edaf8c725f94.png",alt:"Dani K Gym & Wellness",className:"h-16 w-auto filter brightness-110"})}),p.jsx("h1",{className:"text-4xl md:text-6xl font-bold text-meno-tan mb-6 tracking-tight",children:"6-Week M.E.N.O. POWER"}),p.jsx("p",{className:"text-xl md:text-2xl text-meno-tan/80 mb-4",children:"Complete Menopause Wellness Program"}),p.jsx("div",{className:"flex items-center justify-center gap-4 mb-8",children:p.jsxs("div",{className:"flex items-center gap-2 bg-meno-red/20 rounded-full px-4 py-2",children:[p.jsx(uy,{className:"w-5 h-5 text-meno-red"}),p.jsx("span",{className:"text-meno-tan font-bold text-lg",children:"$99 Total"})]})})]})}),p.jsx("section",{className:"py-16 px-4",children:p.jsx("div",{className:"container max-w-4xl mx-auto",children:p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12",children:[p.jsxs("div",{className:"space-y-8",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-3xl font-bold text-meno-tan mb-6",children:"Program Overview"}),p.jsx("p",{className:"text-meno-tan/80 mb-6",children:"Take your menopause wellness journey to the next level with our comprehensive 6-week program. Building on our free introduction class, this program provides deep-dive education, personalized guidance, and ongoing support."})]}),p.jsxs("div",{className:"bg-meno-card/50 rounded-lg p-6 border border-meno-red/30",children:[p.jsx("h3",{className:"text-xl font-bold text-meno-tan mb-4",children:"What You'll Get:"}),p.jsx("ul",{className:"space-y-3",children:["6 comprehensive weekly sessions (just over an hour each)","Personalized movement plans for your body","Nutrition guidance for hormonal balance","Stress management and sleep optimization","Supplement recommendations (when appropriate)","Weekly progress check-ins and support","Private group community access","Take-home resources and meal plans"].map((e,t)=>p.jsxs("li",{className:"flex items-start gap-3",children:[p.jsx(ay,{className:"w-5 h-5 text-meno-red mt-0.5 flex-shrink-0"}),p.jsx("span",{className:"text-meno-tan/80",children:e})]},t))})]}),p.jsxs("div",{className:"bg-meno-card/50 rounded-lg p-6 border border-meno-red/30",children:[p.jsx("h3",{className:"text-xl font-bold text-meno-tan mb-4",children:"Schedule & Location"}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(kl,{className:"w-5 h-5 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan font-semibold",children:"Duration"}),p.jsx("p",{className:"text-meno-tan/80",children:"6 consecutive weeks"})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(ly,{className:"w-5 h-5 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan font-semibold",children:"Session Length"}),p.jsx("p",{className:"text-meno-tan/80",children:"Just over an hour"})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Cl,{className:"w-5 h-5 text-meno-red"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-meno-tan font-semibold",children:"Location"}),p.jsx("p",{className:"text-meno-tan/80",children:"In-person at Dani Gym & Wellness"}),p.jsx("p",{className:"text-meno-tan/60 text-sm",children:"Westminster, MD"})]})]})]})]}),p.jsxs("div",{className:"bg-meno-card/50 rounded-lg p-6 border border-meno-red/30",children:[p.jsx("h3",{className:"text-xl font-bold text-meno-tan mb-4",children:"Payment Options"}),p.jsxs("div",{className:"space-y-4 text-meno-tan/80",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("strong",{children:"Venmo:"}),p.jsx("img",{src:"/lovable-uploads/e7fe9a01-39dc-4f12-8fe2-b8f06d4bf0b4.png",alt:"
206Venmo QR Code for Dani Knight @Dani16",className:"w-24 h-auto bg-white rounded-lg p-1"})]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Zelle:"})," 443-829-7213"]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Cash:"})," In person at the gym"]})]}),p.jsx("p",{className:"text-sm text-meno-tan/60 mt-4",children:"Complete payment after registration to secure your spot. Spaces are limited and filled on a first-come, first-paid basis."})]})]}),p.jsx("div",{children:p.jsx(uN,{})})]})})}),p.jsx(mw,{})]})),dN=()=>{const e=wo();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),p.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},hN=new pk,fN=()=>p.jsx(gk,{client:hN,children:p.jsxs(KE,{children:[p.jsx(OS,{}),p.jsx(a1,{}),p.jsx(hC,{children:p.jsxs(iC,{children:[p.jsx(fi,{path:"/",element:p.jsx(aN,{})}),p.jsx(fi,{path:"/admin",element:p.jsx(lN,{})}),p.jsx(fi,{path:"/classes",element:p.jsx(cN,{})}),p.jsx(fi,{path:"*",element:p.jsx(dN,{})})]})})]})});Tv(document.getElementById("root")).render(p.jsx(fN,{}));
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.