PageSourceSearch

https://friend-wisdom.lovable.app/assets/index-i5aOwwXY.js

js friend-wisdom.lovable.app collected 2026-10-03 03:26:51 UTC 460,804 bytes, 138 lines download raw bytes

vendor: 4,699 bytes, lines 1-9
1var nf=e=>{throw TypeError(e)};var yl=(e,t,n)=>t.has(e)||nf("Cannot "+n);var P=(e,t,n)=>(yl(e,t,"read from private field"),n?n.call(e):t.get(e)),Z=(e,t,n)=>t.has(e)?nf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),q=(e,t,n,r)=>(yl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ne=(e,t,n)=>(yl(e,t,"access private method"),n);var ni=(e,t,n,r)=>({set _(s){q(e,t,s,n)},get _(){return P(e,t,r)}});function k0(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 o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{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 o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function E0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var xp={exports:{}},Ta={},bp={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 Bo=Symbol.for("react.element"),C0=Symbol.for("react.portal"),T0=Symbol.for("react.fragment"),P0=Symbol.for("react.strict_mode"),R0=Symbol.for("react.profiler"),j0=Symbol.for("react.provider"),N0=Symbol.for("react.context"),O0=Symbol.for("react.forward_ref"),A0=Symbol.for("react.suspense"),I0=Symbol.for("react.memo"),L0=Symbol.for("react.lazy"),rf=Symbol.iterator;function $0(e){return e===null||typeof e!="object"?null:(e=rf&&e[rf]||e["@@iterator"],typeof e=="function"?e:null)}var _p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sp=Object.assign,kp={};function Ts(e,t,n){this.props=e,this.context=t,this.refs=kp,this.updater=n||_p}Ts.prototype.isReactComponent={};Ts.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")};Ts.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ep(){}Ep.prototype=Ts.prototype;function Tc(e,t,n){this.props=e,this.context=t,this.refs=kp,this.updater=n||_p}var Pc=Tc.prototype=new Ep;Pc.constructor=Tc;Sp(Pc,Ts.prototype);Pc.isPureReactComponent=!0;var sf=Array.isArray,Cp=Object.prototype.hasOwnProperty,Rc={current:null},Tp={key:!0,ref:!0,__self:!0,__source:!0};function Pp(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Cp.call(t,r)&&!Tp.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:Bo,type:e,key:o,ref:i,props:s,_owner:Rc.current}}function D0(e,t){return{$$typeof:Bo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function jc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bo}function M0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var of=/\/+/g;function wl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?M0(""+e.key):t.toString(36)}
vendor: 4,749 bytes, lines 9-17
9function ji(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Bo:case C0:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+wl(i,0):r,sf(s)?(n="",e!=null&&(n=e.replace(of,"$&/")+"/"),ji(s,t,n,"",function(u){return u})):s!=null&&(jc(s)&&(s=D0(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(of,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",sf(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+wl(o,a);i+=ji(o,t,n,l,s)}else if(l=$0(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+wl(o,a++),i+=ji(o,t,n,l,s);else if(o==="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 i}function ri(e,t,n){if(e==null)return e;var r=[],s=0;return ji(e,r,"","",function(o){return t.call(n,o,s++)}),r}function F0(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 We={current:null},Ni={transition:null},U0={ReactCurrentDispatcher:We,ReactCurrentBatchConfig:Ni,ReactCurrentOwner:Rc};function Rp(){throw Error("act(...) is not supported in production builds of React.")}Y.Children={map:ri,forEach:function(e,t,n){ri(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ri(e,function(){t++}),t},toArray:function(e){return ri(e,function(t){return t})||[]},only:function(e){if(!jc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=Ts;Y.Fragment=T0;Y.Profiler=R0;Y.PureComponent=Tc;Y.StrictMode=P0;Y.Suspense=A0;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U0;Y.act=Rp;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=Sp({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Rc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Cp.call(t,l)&&!Tp.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:Bo,type:e.type,key:s,ref:o,props:r,_owner:i}};Y.createContext=function(e){return e={$$typeof:N0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:j0,_context:e},e.Consumer=e};Y.createElement=Pp;Y.createFactory=function(e){var t=Pp.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:O0,render:e}};Y.isValidElement=jc;Y.lazy=function(e){return{$$typeof:L0,_payload:{_status:-1,_result:e},_init:F0}};Y.memo=function(e,t){return{$$typeof:I0,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=Ni.transition;Ni.transition={};try{e()}finally{Ni.transition=t}};Y.unstable_act=Rp;Y.useCallback=function(e,t){return We.current.useCallback(e,t)};Y.useContext=function(e){return We.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return We.current.useDeferredValue(e)};Y.useEffect=function(e,t){return We.current.useEffect(e,t)};Y.useId=function(){return We.current.useId()};Y.useImperativeHandle=function(e,t,n){return We.current.useImperativeHandle(e,t,n)};Y.useInsertionEffect=function(e,t){return We.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return We.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return We.current.useMemo(e,t)};Y.useReducer=function(e,t,n){return We.current.useReducer(e,t,n)};Y.useRef=function(e){return We.current.useRef(e)};Y.useState=function(e){return We.current.useState(e)};Y.useSyncExternalStore=function(e,t,n){return We.current.useSyncExternalStore(e,t,n)};Y.useTransition=function(){return We.current.useTransition()};Y.version="18.3.1";bp.exports=Y;var x=bp.exports;const N=wp(x),jp=k0({__proto__:null,default:N},[x]);/**
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 z0=x,B0=Symbol.for("react.element"),W0=Symbol.for("react.fragment"),V0=Object.prototype.hasOwnProperty,H0=z0.__SECRET_INT
vendor: 8,834 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,q0={key:!0,ref:!0,__self:!0,__source:!0};function Np(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)V0.call(t,r)&&!q0.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:B0,type:e,key:o,ref:i,props:s,_owner:H0.current}}Ta.Fragment=W0;Ta.jsx=Np;Ta.jsxs=Np;xp.exports=Ta;var g=xp.exports,Op={exports:{}},lt={},Ap={exports:{}},Ip={};/**
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(C,j){var M=C.length;C.push(j);e:for(;0<M;){var $=M-1>>>1,z=C[$];if(0<s(z,j))C[$]=j,C[M]=z,M=$;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var j=C[0],M=C.pop();if(M!==j){C[0]=M;e:for(var $=0,z=C.length,J=z>>>1;$<J;){var fe=2*($+1)-1,Ze=C[fe],ee=fe+1,yt=C[ee];if(0>s(Ze,M))ee<z&&0>s(yt,Ze)?(C[$]=yt,C[ee]=M,$=ee):(C[$]=Ze,C[fe]=M,$=fe);else if(ee<z&&0>s(yt,M))C[$]=yt,C[ee]=M,$=ee;else break e}}return j}function s(C,j){var M=C.sortIndex-j.sortIndex;return M!==0?M:C.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],c=1,f=null,d=3,h=!1,v=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,p=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(C){for(var j=n(u);j!==null;){if(j.callback===null)r(u);else if(j.startTime<=C)r(u),j.sortIndex=j.expirationTime,t(l,j);else break;j=n(u)}}function _(C){if(y=!1,w(C),!v)if(n(l)!==null)v=!0,F(S);else{var j=n(u);j!==null&&Q(_,j.startTime-C)}}function S(C,j){v=!1,y&&(y=!1,p(T),T=-1),h=!0;var M=d;try{for(w(j),f=n(l);f!==null&&(!(f.expirationTime>j)||C&&!U());){var $=f.callback;if(typeof $=="function"){f.callback=null,d=f.priorityLevel;var z=$(f.expirationTime<=j);j=e.unstable_now(),typeof z=="function"?f.callback=z:f===n(l)&&r(l),w(j)}else r(l);f=n(l)}if(f!==null)var J=!0;else{var fe=n(u);fe!==null&&Q(_,fe.startTime-j),J=!1}return J}finally{f=null,d=M,h=!1}}var k=!1,E=null,T=-1,I=5,O=-1;function U(){return!(e.unstable_now()-O<I)}function D(){if(E!==null){var C=e.unstable_now();O=C;var j=!0;try{j=E(!0,C)}finally{j?W():(k=!1,E=null)}}else k=!1}var W;if(typeof m=="function")W=function(){m(D)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,K=A.port2;A.port1.onmessage=D,W=function(){K.postMessage(null)}}else W=function(){b(D,0)};function F(C){E=C,k||(k=!0,W())}function Q(C,j){T=b(function(){C(e.unstable_now())},j)}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(C){C.callback=null},e.unstable_continueExecution=function(){v||h||(v=!0,F(S))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(C){switch(d){case 1:case 2:case 3:var j=3;break;default:j=d}var M=d;d=j;try{return C()}finally{d=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,j){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var M=d;d=C;try{return j()}finally{d=M}},e.unstable_scheduleCallback=function(C,j,M){var $=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?$+M:$):M=$,C){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=M+z,C={id:c++,callback:j,priorityLevel:C,startTime:M,expirationTime:z,sortIndex:-1},M>$?(C.sortIndex=M,t(u,C),n(l)===null&&C===n(u)&&(y?(p(T),T=-1):y=!0,Q(_,M-$))):(C.sortIndex=z,t(l,C),v||h||(v=!0,F(S))),C},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(C){var j=d;return function(){var M=d;d=j;try{return C.apply(this,arguments)}finally{d=M}}}})(Ip);Ap.exports=Ip;var K0=Ap.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 Q0=x,at=K0;function R(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 Lp=new Set,mo={};function Er(e,t){vs(e,t),vs(e+"Capture",t)}function vs(e,t){for(mo[e]=t,e=0;e<t.length;e++)Lp.add(t[e])}var on=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),au=Object.prototype.hasOwnProperty,G0=/^[: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]*$/,af={},lf={};function Y0(e){return au.call(lf,e)?!0:au.call(af,e)?!1:G0.test(e)?lf[e]=!0:(af[e]=!0,!1)}function J0(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 X0(e,t,n,r){if(t===null||typeof t>"u"||J0(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 Ve(e,t,n,r,s,o,i){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=o,this.removeEmptyString=i}var je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){je[e]=new Ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];je[t]=new Ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){je[e]=new Ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){je[e]=new Ve(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){je[e]=new Ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){je[e]=new Ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){je[e]=new Ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){je[e]=new Ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){je[e]=new Ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nc=/[\-:]([a-z])/g;function Oc(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(Nc,Oc);je[t]=new Ve(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(Nc,Oc);je[t]=new Ve(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(Nc,Oc);je[t]=new Ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){je[e]=new Ve(e,1,!1,e.toLowerCase(),null,!1,!1)});je.xlinkHref=new Ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){je[e]=new Ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ac(e,t,n,r){var s=je.hasOwnProperty(t)?je[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(X0(t,n,s,r)&&(n=null),r||s===null?Y0(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 fn=Q0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,si=Symbol.for("react.element"),Ur=Symbol.for("react.portal"),zr=Symbol.for("react.fragment"),Ic=Symbol.for("react.strict_mode"),lu=Symbol.for("react.profiler"),$p=Symbol.for("react.provider"),Dp=Symbol.for("react.context"),Lc=Symbol.for("react.forward_ref"),uu=Symbol.for("react.suspense"),cu=Symbol.for("react.suspense_list"),$c=Symbol.for("react.memo"),Sn=Symbol.for("react.lazy"),Mp=Symbol.for("react.offscreen"),uf=Symbol.iterator;function Fs(e){return e===null||typeof e!="object"?null:(e=uf&&e[uf]||e["@@iterator"],typeof e=="function"?e:null)}var me=Object.assign,xl;function Ys(e){if(xl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);xl=t&&t[1]||""}return`
34`+xl+e}var bl=!1;function _l(e,t){if(!e||bl)return"";bl=!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`),o=r.stack.split(`
36`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
37`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{bl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ys(e):""}function Z0(e){switch(e.tag){case 5:return Ys(e.type);case 16:return Ys("Lazy");case 13:return Ys("Suspense");case 19:return Ys("SuspenseList");case 0:case 2:case 15:return e=_l(e.type,!1),e;case 11:return e=_l(e.type.render,!1),e;case 1:return e=_l(e.type,!0),e;default:return""}}function du(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 zr:return"Fragment";case Ur:return"Portal";case lu:return"Profiler";case Ic:return"StrictMode";case uu:return"Suspense";case cu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Dp:return(e.displayName||"Context")+".Consumer";case $p:return(e._context.displayName||"Context")+".Provider";case Lc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $c:return t=e.displayName||null,t!==null?t:du(e.type)||"Memo";case Sn:t=e._payload,e=e._init;try{return du(e(t))}catch{}}return null}function ew(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 du(t);case 8:return t===Ic?"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 qn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tw(e){var t=Fp(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,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function oi(e){e._valueTracker||(e._valueTracker=tw(e))}function Up(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Fp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ki(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 cf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qn(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 zp(e,t){t=t.checked,t!=null&&Ac(e,"checked",t,!1)}function hu(e,t){zp(e,t);var n=qn(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")?pu(e,t.type,n):t.hasOwnProperty("defaultValue")&&pu(e,t.type,qn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function df(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 pu(e,t,n){(t!=="number"||Ki(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Js=Array.isArray;function Zr(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=""+qn(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 mu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ff(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(R(92));if(Js(n)){if(1<n.length)throw Error(R(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:qn(n)}}function Bp(e,t){var n=qn(t.value),r=qn(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 hf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Wp(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 gu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Wp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ii,Vp=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(ii=ii||document.createElement("div"),ii.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ii.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function go(e,t){if(t){var n=e.firstChild;
vendor: 8,942 bytes, line 37
37if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var to={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},nw=["Webkit","ms","Moz","O"];Object.keys(to).forEach(function(e){nw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),to[t]=to[e]})});function Hp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||to.hasOwnProperty(e)&&to[e]?(""+t).trim():t+"px"}function qp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Hp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var rw=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(rw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function yu(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 wu=null;function Dc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xu=null,es=null,ts=null;function pf(e){if(e=Ho(e)){if(typeof xu!="function")throw Error(R(280));var t=e.stateNode;t&&(t=Oa(t),xu(e.stateNode,e.type,t))}}function Kp(e){es?ts?ts.push(e):ts=[e]:es=e}function Qp(){if(es){var e=es,t=ts;if(ts=es=null,pf(e),t)for(e=0;e<t.length;e++)pf(t[e])}}function Gp(e,t){return e(t)}function Yp(){}var Sl=!1;function Jp(e,t,n){if(Sl)return e(t,n);Sl=!0;try{return Gp(e,t,n)}finally{Sl=!1,(es!==null||ts!==null)&&(Yp(),Qp())}}function vo(e,t){var n=e.stateNode;if(n===null)return null;var r=Oa(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(R(231,t,typeof n));return n}var bu=!1;if(on)try{var Us={};Object.defineProperty(Us,"passive",{get:function(){bu=!0}}),window.addEventListener("test",Us,Us),window.removeEventListener("test",Us,Us)}catch{bu=!1}function sw(e,t,n,r,s,o,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var no=!1,Qi=null,Gi=!1,_u=null,ow={onError:function(e){no=!0,Qi=e}};function iw(e,t,n,r,s,o,i,a,l){no=!1,Qi=null,sw.apply(ow,arguments)}function aw(e,t,n,r,s,o,i,a,l){if(iw.apply(this,arguments),no){if(no){var u=Qi;no=!1,Qi=null}else throw Error(R(198));Gi||(Gi=!0,_u=u)}}function Cr(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 Xp(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 mf(e){if(Cr(e)!==e)throw Error(R(188))}function lw(e){var t=e.alternate;if(!t){if(t=Cr(e),t===null)throw Error(R(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return mf(s),e;if(o===r)return mf(s),t;o=o.sibling}throw Error(R(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(R(189))}}if(n.alternate!==r)throw Error(R(190))}if(n.tag!==3)throw Error(R(188));return n.stateNode.current===n?e:t}function Zp(e){return e=lw(e),e!==null?em(e):null}function em(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=em(e);if(t!==null)return t;e=e.sibling}return null}var tm=at.unstable_scheduleCallback,gf=at.unstable_cancelCallback,uw=at.unstable_shouldYield,cw=at.unstable_requestPaint,we=at.unstable_now,dw=at.unstable_getCurrentPriorityLevel,Mc=at.unstable_ImmediatePriority,nm=at.unstable_UserBlockingPriority,Yi=at.unstable_NormalPriority,fw=at.unstable_LowPriority,rm=at.unstable_IdlePriority,Pa=null,zt=null;function hw(e){if(zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(Pa,e,void 0,(e.current.flags&128)===128)}catch{}}var Tt=Math.clz32?Math.clz32:gw,pw=Math.log,mw=Math.LN2;function gw(e){return e>>>=0,e===0?32:31-(pw(e)/mw|0)|0}var ai=64,li=4194304;function Xs(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 Ji(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Xs(a):(o&=i,o!==0&&(r=Xs(o)))}else i=n&~s,i!==0?r=Xs(i):o!==0&&(r=Xs(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&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-Tt(t),s=1<<n,r|=e[n],t&=~s;return r}function vw(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 yw(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Tt(o),a=1<<i,l=s[i];l===-1?(!(a&n)||a&r)&&(s[i]=vw(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Su(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function sm(){var e=ai;return ai<<=1,!(ai&4194240)&&(ai=64),e}function kl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function ww(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-Tt(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Fc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var te=0;function om(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var im,Uc,am,lm,um,ku=!1,ui=[],Dn=null,Mn=null,Fn=null,yo=new Map,wo=new Map,Cn=[],xw="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 vf(e,t){switch(e){case"focusin":case"focusout":Dn=null;break;case"dragenter":case"dragleave":Mn=null;break;case"mouseover":case"mouseout":Fn=null;break;case"pointerover":case"pointerout":yo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wo.delete(t.pointerId)}}function zs(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Ho(t),t!==null&&Uc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function bw(e,t,n,r,s){switch(t){case"focusin":return Dn=zs(Dn,e,t,n,r,s),!0;
vendor: 12,904 bytes, line 37
37case"dragenter":return Mn=zs(Mn,e,t,n,r,s),!0;case"mouseover":return Fn=zs(Fn,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return yo.set(o,zs(yo.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,wo.set(o,zs(wo.get(o)||null,e,t,n,r,s)),!0}return!1}function cm(e){var t=ur(e.target);if(t!==null){var n=Cr(t);if(n!==null){if(t=n.tag,t===13){if(t=Xp(n),t!==null){e.blockedOn=t,um(e.priority,function(){am(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 Oi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Eu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);wu=r,n.target.dispatchEvent(r),wu=null}else return t=Ho(n),t!==null&&Uc(t),e.blockedOn=n,!1;t.shift()}return!0}function yf(e,t,n){Oi(e)&&n.delete(t)}function _w(){ku=!1,Dn!==null&&Oi(Dn)&&(Dn=null),Mn!==null&&Oi(Mn)&&(Mn=null),Fn!==null&&Oi(Fn)&&(Fn=null),yo.forEach(yf),wo.forEach(yf)}function Bs(e,t){e.blockedOn===t&&(e.blockedOn=null,ku||(ku=!0,at.unstable_scheduleCallback(at.unstable_NormalPriority,_w)))}function xo(e){function t(s){return Bs(s,e)}if(0<ui.length){Bs(ui[0],e);for(var n=1;n<ui.length;n++){var r=ui[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Dn!==null&&Bs(Dn,e),Mn!==null&&Bs(Mn,e),Fn!==null&&Bs(Fn,e),yo.forEach(t),wo.forEach(t),n=0;n<Cn.length;n++)r=Cn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cn.length&&(n=Cn[0],n.blockedOn===null);)cm(n),n.blockedOn===null&&Cn.shift()}var ns=fn.ReactCurrentBatchConfig,Xi=!0;function Sw(e,t,n,r){var s=te,o=ns.transition;ns.transition=null;try{te=1,zc(e,t,n,r)}finally{te=s,ns.transition=o}}function kw(e,t,n,r){var s=te,o=ns.transition;ns.transition=null;try{te=4,zc(e,t,n,r)}finally{te=s,ns.transition=o}}function zc(e,t,n,r){if(Xi){var s=Eu(e,t,n,r);if(s===null)Il(e,t,r,Zi,n),vf(e,r);else if(bw(s,e,t,n,r))r.stopPropagation();else if(vf(e,r),t&4&&-1<xw.indexOf(e)){for(;s!==null;){var o=Ho(s);if(o!==null&&im(o),o=Eu(e,t,n,r),o===null&&Il(e,t,r,Zi,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Il(e,t,r,null,n)}}var Zi=null;function Eu(e,t,n,r){if(Zi=null,e=Dc(r),e=ur(e),e!==null)if(t=Cr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Xp(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 Zi=e,null}function dm(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(dw()){case Mc:return 1;case nm:return 4;case Yi:case fw:return 16;case rm:return 536870912;default:return 16}default:return 16}}var In=null,Bc=null,Ai=null;function fm(){if(Ai)return Ai;var e,t=Bc,n=t.length,r,s="value"in In?In.value:In.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return Ai=s.slice(e,1<r?1-r:void 0)}function Ii(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 ci(){return!0}function wf(){return!1}function ut(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ci:wf,this.isPropagationStopped=wf,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=ci)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ci)},persist:function(){},isPersistent:ci}),t}var Ps={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wc=ut(Ps),Vo=me({},Ps,{view:0,detail:0}),Ew=ut(Vo),El,Cl,Ws,Ra=me({},Vo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vc,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!==Ws&&(Ws&&e.type==="mousemove"?(El=e.screenX-Ws.screenX,Cl=e.screenY-Ws.screenY):Cl=El=0,Ws=e),El)},movementY:function(e){return"movementY"in e?e.movementY:Cl}}),xf=ut(Ra),Cw=me({},Ra,{dataTransfer:0}),Tw=ut(Cw),Pw=me({},Vo,{relatedTarget:0}),Tl=ut(Pw),Rw=me({},Ps,{animationName:0,elapsedTime:0,pseudoElement:0}),jw=ut(Rw),Nw=me({},Ps,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ow=ut(Nw),Aw=me({},Ps,{data:0}),bf=ut(Aw),Iw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lw={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"},$w={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$w[e])?!!t[e]:!1}function Vc(){return Dw}var Mw=me({},Vo,{key:function(e){if(e.key){var t=Iw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ii(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Lw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vc,charCode:function(e){return e.type==="keypress"?Ii(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ii(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fw=ut(Mw),Uw=me({},Ra,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_f=ut(Uw),zw=me({},Vo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vc}),Bw=ut(zw),Ww=me({},Ps,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vw=ut(Ww),Hw=me({},Ra,{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}),qw=ut(Hw),Kw=[9,13,27,32],Hc=on&&"CompositionEvent"in window,ro=null;on&&"documentMode"in document&&(ro=document.documentMode);var Qw=on&&"TextEvent"in window&&!ro,hm=on&&(!Hc||ro&&8<ro&&11>=ro),Sf=" ",kf=!1;function pm(e,t){switch(e){case"keyup":return Kw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Br=!1;function Gw(e,t){switch(e){case"compositionend":return mm(t);case"keypress":return t.which!==32?null:(kf=!0,Sf);case"textInput":return e=t.data,e===Sf&&kf?null:e;default:return null}}function Yw(e,t){if(Br)return e==="compositionend"||!Hc&&pm(e,t)?(e=fm(),Ai=Bc=In=null,Br=!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 hm&&t.locale!=="ko"?null:t.data;default:return null}}var Jw={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 Ef(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jw[e.type]:t==="textarea"}function gm(e,t,n,r){Kp(r),t=ea(t,"onChange"),0<t.length&&(n=new Wc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var so=null,bo=null;function Xw(e){Tm(e,0)}function ja(e){var t=Hr(e);if(Up(t))return e}function Zw(e,t){if(e==="change")return t}var vm=!1;if(on){var Pl;if(on){var Rl="oninput"in document;if(!Rl){var Cf=document.createElement("div");Cf.setAttribute("oninput","return;"),Rl=typeof Cf.oninput=="function"}Pl=Rl}else Pl=!1;vm=Pl&&(!document.documentMode||9<document.documentMode)}function Tf(){so&&(so.detachEvent("onpropertychange",ym),bo=so=null)}function ym(e){if(e.propertyName==="value"&&ja(bo)){var t=[];gm(t,bo,e,Dc(e)),Jp(Xw,t)}}function ex(e,t,n){e==="focusin"?(Tf(),so=t,bo=n,so.attachEvent("onpropertychange",ym)):e==="focusout"&&Tf()}function tx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ja(bo)}function nx(e,t){if(e==="click")return ja(t)}function rx(e,t){if(e==="input"||e==="change")return ja(t)}function sx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rt=typeof Object.is=="function"?Object.is:sx;function _o(e,t){if(Rt(e,t))return!0;if(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(!au.call(t,s)||!Rt(e[s],t[s]))return!1}return!0}function Pf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rf(e,t){var n=Pf(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=Pf(n)}}function wm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xm(){for(var e=window,t=Ki();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ki(e.document)}return t}function qc(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 ox(e){var t=xm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wm(n.ownerDocument.documentElement,n)){if(r!==null&&qc(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,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Rf(n,o);var i=Rf(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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=on&&"documentMode"in document&&11>=document.documentMode,Wr=null,Cu=null,oo=null,Tu=!1;function jf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tu||Wr==null||Wr!==Ki(r)||(r=Wr,"selectionStart"in r&&qc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,352 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),oo&&_o(oo,r)||(oo=r,r=ea(Cu,"onSelect"),0<r.length&&(t=new Wc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function di(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Vr={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionend:di("Transition","TransitionEnd")},jl={},bm={};on&&(bm=document.createElement("div").style,"AnimationEvent"in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),"TransitionEvent"in window||delete Vr.transitionend.transition);function Na(e){if(jl[e])return jl[e];if(!Vr[e])return e;var t=Vr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in bm)return jl[e]=t[n];return e}var _m=Na("animationend"),Sm=Na("animationiteration"),km=Na("animationstart"),Em=Na("transitionend"),Cm=new Map,Nf="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 Zn(e,t){Cm.set(e,t),Er(t,[e])}for(var Nl=0;Nl<Nf.length;Nl++){var Ol=Nf[Nl],ax=Ol.toLowerCase(),lx=Ol[0].toUpperCase()+Ol.slice(1);Zn(ax,"on"+lx)}Zn(_m,"onAnimationEnd");Zn(Sm,"onAnimationIteration");Zn(km,"onAnimationStart");Zn("dblclick","onDoubleClick");Zn("focusin","onFocus");Zn("focusout","onBlur");Zn(Em,"onTransitionEnd");vs("onMouseEnter",["mouseout","mouseover"]);vs("onMouseLeave",["mouseout","mouseover"]);vs("onPointerEnter",["pointerout","pointerover"]);vs("onPointerLeave",["pointerout","pointerover"]);Er("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Er("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Er("onBeforeInput",["compositionend","keypress","textInput","paste"]);Er("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Er("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Er("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zs="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(" "),ux=new Set("cancel close invalid load scroll toggle".split(" ").concat(Zs));function Of(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,aw(r,t,void 0,e),e.currentTarget=null}function Tm(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 o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;Of(s,a,u),o=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;Of(s,a,u),o=l}}}if(Gi)throw e=_u,Gi=!1,_u=null,e}function ue(e,t){var n=t[Ou];n===void 0&&(n=t[Ou]=new Set);var r=e+"__bubble";n.has(r)||(Pm(t,e,2,!1),n.add(r))}function Al(e,t,n){var r=0;t&&(r|=4),Pm(n,e,r,t)}var fi="_reactListening"+Math.random().toString(36).slice(2);function So(e){if(!e[fi]){e[fi]=!0,Lp.forEach(function(n){n!=="selectionchange"&&(ux.has(n)||Al(n,!1,e),Al(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fi]||(t[fi]=!0,Al("selectionchange",!1,t))}}function Pm(e,t,n,r){switch(dm(t)){case 1:var s=Sw;break;case 4:s=kw;break;default:s=zc}n=s.bind(null,t,n,e),s=void 0,!bu||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)}
vendor: 4,454 bytes, line 37
37function Il(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=ur(a),i===null)return;if(l=i.tag,l===5||l===6){r=o=i;continue e}a=a.parentNode}}r=r.return}Jp(function(){var u=o,c=Dc(n),f=[];e:{var d=Cm.get(e);if(d!==void 0){var h=Wc,v=e;switch(e){case"keypress":if(Ii(n)===0)break e;case"keydown":case"keyup":h=Fw;break;case"focusin":v="focus",h=Tl;break;case"focusout":v="blur",h=Tl;break;case"beforeblur":case"afterblur":h=Tl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=xf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Tw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Bw;break;case _m:case Sm:case km:h=jw;break;case Em:h=Vw;break;case"scroll":h=Ew;break;case"wheel":h=qw;break;case"copy":case"cut":case"paste":h=Ow;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=_f}var y=(t&4)!==0,b=!y&&e==="scroll",p=y?d!==null?d+"Capture":null:d;y=[];for(var m=u,w;m!==null;){w=m;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,p!==null&&(_=vo(m,p),_!=null&&y.push(ko(m,_,w)))),b)break;m=m.return}0<y.length&&(d=new h(d,v,null,n,c),f.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==wu&&(v=n.relatedTarget||n.fromElement)&&(ur(v)||v[an]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?ur(v):null,v!==null&&(b=Cr(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(y=xf,_="onMouseLeave",p="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(y=_f,_="onPointerLeave",p="onPointerEnter",m="pointer"),b=h==null?d:Hr(h),w=v==null?d:Hr(v),d=new y(_,m+"leave",h,n,c),d.target=b,d.relatedTarget=w,_=null,ur(c)===u&&(y=new y(p,m+"enter",v,n,c),y.target=w,y.relatedTarget=b,_=y),b=_,h&&v)t:{for(y=h,p=v,m=0,w=y;w;w=Or(w))m++;for(w=0,_=p;_;_=Or(_))w++;for(;0<m-w;)y=Or(y),m--;for(;0<w-m;)p=Or(p),w--;for(;m--;){if(y===p||p!==null&&y===p.alternate)break t;y=Or(y),p=Or(p)}y=null}else y=null;h!==null&&Af(f,d,h,y,!1),v!==null&&b!==null&&Af(f,b,v,y,!0)}}e:{if(d=u?Hr(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=Zw;else if(Ef(d))if(vm)S=rx;else{S=tx;var k=ex}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=nx);if(S&&(S=S(e,u))){gm(f,S,n,c);break e}k&&k(e,d,u),e==="focusout"&&(k=d._wrapperState)&&k.controlled&&d.type==="number"&&pu(d,"number",d.value)}switch(k=u?Hr(u):window,e){case"focusin":(Ef(k)||k.contentEditable==="true")&&(Wr=k,Cu=u,oo=null);break;case"focusout":oo=Cu=Wr=null;break;case"mousedown":Tu=!0;break;case"contextmenu":case"mouseup":case"dragend":Tu=!1,jf(f,n,c);break;case"selectionchange":if(ix)break;case"keydown":case"keyup":jf(f,n,c)}var E;if(Hc)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Br?pm(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(hm&&n.locale!=="ko"&&(Br||T!=="onCompositionStart"?T==="onCompositionEnd"&&Br&&(E=fm()):(In=c,Bc="value"in In?In.value:In.textContent,Br=!0)),k=ea(u,T),0<k.length&&(T=new bf(T,e,null,n,c),f.push({event:T,listeners:k}),E?T.data=E:(E=mm(n),E!==null&&(T.data=E)))),(E=Qw?Gw(e,n):Yw(e,n))&&(u=ea(u,"onBeforeInput"),0<u.length&&(c=new bf("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=E))}Tm(f,t)})}function ko(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ea(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=vo(e,n),o!=null&&r.unshift(ko(e,o,s)),o=vo(e,t),o!=null&&r.push(ko(e,o,s))),e=e.return}return r}function Or(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}
vendor: 3,691 bytes, lines 37-38
37function Af(e,t,n,r,s){for(var o=t._reactName,i=[];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=vo(n,o),l!=null&&i.unshift(ko(n,l,a))):s||(l=vo(n,o),l!=null&&i.push(ko(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var cx=/\r\n?/g,dx=/\u0000|\uFFFD/g;function If(e){return(typeof e=="string"?e:""+e).replace(cx,`
38`).replace(dx,"")}function hi(e,t,n){if(t=If(t),If(e)!==t&&n)throw Error(R(425))}function ta(){}var Pu=null,Ru=null;function ju(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 Nu=typeof setTimeout=="function"?setTimeout:void 0,fx=typeof clearTimeout=="function"?clearTimeout:void 0,Lf=typeof Promise=="function"?Promise:void 0,hx=typeof queueMicrotask=="function"?queueMicrotask:typeof Lf<"u"?function(e){return Lf.resolve(null).then(e).catch(px)}:Nu;function px(e){setTimeout(function(){throw e})}function Ll(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),xo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);xo(t)}function Un(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 $f(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 Rs=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Rs,Eo="__reactProps$"+Rs,an="__reactContainer$"+Rs,Ou="__reactEvents$"+Rs,mx="__reactListeners$"+Rs,gx="__reactHandles$"+Rs;function ur(e){var t=e[Ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[an]||n[Ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=$f(e);e!==null;){if(n=e[Ut])return n;e=$f(e)}return t}e=n,n=e.parentNode}return null}function Ho(e){return e=e[Ut]||e[an],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Hr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function Oa(e){return e[Eo]||null}var Au=[],qr=-1;function er(e){return{current:e}}function ce(e){0>qr||(e.current=Au[qr],Au[qr]=null,qr--)}function ie(e,t){qr++,Au[qr]=e.current,e.current=t}var Kn={},De=er(Kn),Ge=er(!1),wr=Kn;function ys(e,t){var n=e.type.contextTypes;if(!n)return Kn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ye(e){return e=e.childContextTypes,e!=null}function na(){ce(Ge),ce(De)}function Df(e,t,n){if(De.current!==Kn)throw Error(R(168));ie(De,t),ie(Ge,n)}function Rm(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(R(108,ew(e)||"Unknown",s));return me({},n,r)}function ra(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,wr=De.current,ie(De,e),ie(Ge,Ge.current),!0}function Mf(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Rm(e,t,wr),r.__reactInternalMemoizedMergedChildContext=e,ce(Ge),ce(De),ie(De,e)):ce(Ge),ie(Ge,n)}var Jt=null,Aa=!1,$l=!1;function jm(e){Jt===null?Jt=[e]:Jt.push(e)}function vx(e){Aa=!0,jm(e)}function tr(){if(!$l&&Jt!==null){$l=!0;var e=0,t=te;try{var n=Jt;for(te=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}
vendor: 25,856 bytes, lines 38-40
38Jt=null,Aa=!1}catch(s){throw Jt!==null&&(Jt=Jt.slice(e+1)),tm(Mc,tr),s}finally{te=t,$l=!1}}return null}var Kr=[],Qr=0,sa=null,oa=0,dt=[],ft=0,xr=null,Xt=1,Zt="";function or(e,t){Kr[Qr++]=oa,Kr[Qr++]=sa,sa=e,oa=t}function Nm(e,t,n){dt[ft++]=Xt,dt[ft++]=Zt,dt[ft++]=xr,xr=e;var r=Xt;e=Zt;var s=32-Tt(r)-1;r&=~(1<<s),n+=1;var o=32-Tt(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Xt=1<<32-Tt(t)+s|n<<s|r,Zt=o+e}else Xt=1<<o|n<<s|r,Zt=e}function Kc(e){e.return!==null&&(or(e,1),Nm(e,1,0))}function Qc(e){for(;e===sa;)sa=Kr[--Qr],Kr[Qr]=null,oa=Kr[--Qr],Kr[Qr]=null;for(;e===xr;)xr=dt[--ft],dt[ft]=null,Zt=dt[--ft],dt[ft]=null,Xt=dt[--ft],dt[ft]=null}var ot=null,st=null,de=!1,Ct=null;function Om(e,t){var n=ht(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 Ff(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,ot=e,st=Un(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ot=e,st=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=xr!==null?{id:Xt,overflow:Zt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ht(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ot=e,st=null,!0):!1;default:return!1}}function Iu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Lu(e){if(de){var t=st;if(t){var n=t;if(!Ff(e,t)){if(Iu(e))throw Error(R(418));t=Un(n.nextSibling);var r=ot;t&&Ff(e,t)?Om(r,n):(e.flags=e.flags&-4097|2,de=!1,ot=e)}}else{if(Iu(e))throw Error(R(418));e.flags=e.flags&-4097|2,de=!1,ot=e}}}function Uf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ot=e}function pi(e){if(e!==ot)return!1;if(!de)return Uf(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ju(e.type,e.memoizedProps)),t&&(t=st)){if(Iu(e))throw Am(),Error(R(418));for(;t;)Om(e,t),t=Un(t.nextSibling)}if(Uf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){st=Un(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}st=null}}else st=ot?Un(e.stateNode.nextSibling):null;return!0}function Am(){for(var e=st;e;)e=Un(e.nextSibling)}function ws(){st=ot=null,de=!1}function Gc(e){Ct===null?Ct=[e]:Ct.push(e)}var yx=fn.ReactCurrentBatchConfig;function Vs(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(R(309));var r=n.stateNode}if(!r)throw Error(R(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(R(284));if(!n._owner)throw Error(R(290,e))}return e}function mi(e,t){throw e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function zf(e){var t=e._init;return t(e._payload)}function Im(e){function t(p,m){if(e){var w=p.deletions;w===null?(p.deletions=[m],p.flags|=16):w.push(m)}}function n(p,m){if(!e)return null;for(;m!==null;)t(p,m),m=m.sibling;return null}function r(p,m){for(p=new Map;m!==null;)m.key!==null?p.set(m.key,m):p.set(m.index,m),m=m.sibling;return p}function s(p,m){return p=Vn(p,m),p.index=0,p.sibling=null,p}function o(p,m,w){return p.index=w,e?(w=p.alternate,w!==null?(w=w.index,w<m?(p.flags|=2,m):w):(p.flags|=2,m)):(p.flags|=1048576,m)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,m,w,_){return m===null||m.tag!==6?(m=Wl(w,p.mode,_),m.return=p,m):(m=s(m,w),m.return=p,m)}function l(p,m,w,_){var S=w.type;return S===zr?c(p,m,w.props.children,_,w.key):m!==null&&(m.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Sn&&zf(S)===m.type)?(_=s(m,w.props),_.ref=Vs(p,m,w),_.return=p,_):(_=zi(w.type,w.key,w.props,null,p.mode,_),_.ref=Vs(p,m,w),_.return=p,_)}function u(p,m,w,_){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=Vl(w,p.mode,_),m.return=p,m):(m=s(m,w.children||[]),m.return=p,m)}function c(p,m,w,_,S){return m===null||m.tag!==7?(m=vr(w,p.mode,_,S),m.return=p,m):(m=s(m,w),m.return=p,m)}function f(p,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Wl(""+m,p.mode,w),m.return=p,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case si:return w=zi(m.type,m.key,m.props,null,p.mode,w),w.ref=Vs(p,null,m),w.return=p,w;case Ur:return m=Vl(m,p.mode,w),m.return=p,m;case Sn:var _=m._init;return f(p,_(m._payload),w)}if(Js(m)||Fs(m))return m=vr(m,p.mode,w,null),m.return=p,m;mi(p,m)}return null}function d(p,m,w,_){var S=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(p,m,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case si:return w.key===S?l(p,m,w,_):null;case Ur:return w.key===S?u(p,m,w,_):null;case Sn:return S=w._init,d(p,m,S(w._payload),_)}if(Js(w)||Fs(w))return S!==null?null:c(p,m,w,_,null);mi(p,w)}return null}function h(p,m,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return p=p.get(w)||null,a(m,p,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case si:return p=p.get(_.key===null?w:_.key)||null,l(m,p,_,S);case Ur:return p=p.get(_.key===null?w:_.key)||null,u(m,p,_,S);case Sn:var k=_._init;return h(p,m,w,k(_._payload),S)}if(Js(_)||Fs(_))return p=p.get(w)||null,c(m,p,_,S,null);mi(m,_)}return null}function v(p,m,w,_){for(var S=null,k=null,E=m,T=m=0,I=null;E!==null&&T<w.length;T++){E.index>T?(I=E,E=null):I=E.sibling;var O=d(p,E,w[T],_);if(O===null){E===null&&(E=I);break}e&&E&&O.alternate===null&&t(p,E),m=o(O,m,T),k===null?S=O:k.sibling=O,k=O,E=I}if(T===w.length)return n(p,E),de&&or(p,T),S;if(E===null){for(;T<w.length;T++)E=f(p,w[T],_),E!==null&&(m=o(E,m,T),k===null?S=E:k.sibling=E,k=E);return de&&or(p,T),S}for(E=r(p,E);T<w.length;T++)I=h(E,p,T,w[T],_),I!==null&&(e&&I.alternate!==null&&E.delete(I.key===null?T:I.key),m=o(I,m,T),k===null?S=I:k.sibling=I,k=I);return e&&E.forEach(function(U){return t(p,U)}),de&&or(p,T),S}function y(p,m,w,_){var S=Fs(w);if(typeof S!="function")throw Error(R(150));if(w=S.call(w),w==null)throw Error(R(151));for(var k=S=null,E=m,T=m=0,I=null,O=w.next();E!==null&&!O.done;T++,O=w.next()){E.index>T?(I=E,E=null):I=E.sibling;var U=d(p,E,O.value,_);if(U===null){E===null&&(E=I);break}e&&E&&U.alternate===null&&t(p,E),m=o(U,m,T),k===null?S=U:k.sibling=U,k=U,E=I}if(O.done)return n(p,E),de&&or(p,T),S;if(E===null){for(;!O.done;T++,O=w.next())O=f(p,O.value,_),O!==null&&(m=o(O,m,T),k===null?S=O:k.sibling=O,k=O);return de&&or(p,T),S}for(E=r(p,E);!O.done;T++,O=w.next())O=h(E,p,T,O.value,_),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?T:O.key),m=o(O,m,T),k===null?S=O:k.sibling=O,k=O);return e&&E.forEach(function(D){return t(p,D)}),de&&or(p,T),S}function b(p,m,w,_){if(typeof w=="object"&&w!==null&&w.type===zr&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case si:e:{for(var S=w.key,k=m;k!==null;){if(k.key===S){if(S=w.type,S===zr){if(k.tag===7){n(p,k.sibling),m=s(k,w.props.children),m.return=p,p=m;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Sn&&zf(S)===k.type){n(p,k.sibling),m=s(k,w.props),m.ref=Vs(p,k,w),m.return=p,p=m;break e}n(p,k);break}else t(p,k);k=k.sibling}w.type===zr?(m=vr(w.props.children,p.mode,_,w.key),m.return=p,p=m):(_=zi(w.type,w.key,w.props,null,p.mode,_),_.ref=Vs(p,m,w),_.return=p,p=_)}return i(p);case Ur: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(p,m.sibling),m=s(m,w.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=Vl(w,p.mode,_),m.return=p,p=m}return i(p);case Sn:return k=w._init,b(p,m,k(w._payload),_)}if(Js(w))return v(p,m,w,_);if(Fs(w))return y(p,m,w,_);mi(p,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(p,m.sibling),m=s(m,w),m.return=p,p=m):(n(p,m),m=Wl(w,p.mode,_),m.return=p,p=m),i(p)):n(p,m)}return b}var xs=Im(!0),Lm=Im(!1),ia=er(null),aa=null,Gr=null,Yc=null;function Jc(){Yc=Gr=aa=null}function Xc(e){var t=ia.current;ce(ia),e._currentValue=t}function $u(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 rs(e,t){aa=e,Yc=Gr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qe=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Yc!==e)if(e={context:e,memoizedValue:t,next:null},Gr===null){if(aa===null)throw Error(R(308));Gr=e,aa.dependencies={lanes:0,firstContext:e}}else Gr=Gr.next=e;return t}var cr=null;function Zc(e){cr===null?cr=[e]:cr.push(e)}function $m(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Zc(t)):(n.next=s.next,s.next=n),t.interleaved=n,ln(e,r)}function ln(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 kn=!1;function ed(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dm(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 sn(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,X&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,ln(e,n)}return s=r.interleaved,s===null?(t.next=t,Zc(r)):(t.next=s.next,s.next=t),r.interleaved=t,ln(e,n)}function Li(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,Fc(e,n)}}function Bf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,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 la(e,t,n,r){var s=e.updateQueue;kn=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==i&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,c=u=l=null,a=o;do{var d=a.lane,h=a.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,y=a;switch(d=t,h=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){f=v.call(h,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,d=typeof v=="function"?v.call(h,f,d):v,d==null)break e;f=me({},f,d);break e;case 2:kn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=s.effects,d===null?s.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=f):c=c.next=h,i|=d;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;d=a,a=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(c===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);_r|=i,e.lanes=i,e.memoizedState=f}}function Wf(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(R(191,s));s.call(r)}}}var qo={},Bt=er(qo),Co=er(qo),To=er(qo);function dr(e){if(e===qo)throw Error(R(174));return e}function td(e,t){switch(ie(To,t),ie(Co,e),ie(Bt,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gu(t,e)}ce(Bt),ie(Bt,t)}function bs(){ce(Bt),ce(Co),ce(To)}function Mm(e){dr(To.current);var t=dr(Bt.current),n=gu(t,e.type);t!==n&&(ie(Co,e),ie(Bt,n))}function nd(e){Co.current===e&&(ce(Bt),ce(Co))}var he=er(0);function ua(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 Dl=[];function rd(){for(var e=0;e<Dl.length;e++)Dl[e]._workInProgressVersionPrimary=null;Dl.length=0}var $i=fn.ReactCurrentDispatcher,Ml=fn.ReactCurrentBatchConfig,br=0,pe=null,be=null,Ee=null,ca=!1,io=!1,Po=0,wx=0;function Oe(){throw Error(R(321))}function sd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rt(e[n],t[n]))return!1;return!0}function od(e,t,n,r,s,o){if(br=o,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$i.current=e===null||e.memoizedState===null?Sx:kx,e=n(r,s),io){o=0;do{if(io=!1,Po=0,25<=o)throw Error(R(301));o+=1,Ee=be=null,t.updateQueue=null,$i.current=Ex,e=n(r,s)}while(io)}if($i.current=da,t=be!==null&&be.next!==null,br=0,Ee=be=pe=null,ca=!1,t)throw Error(R(300));return e}function id(){var e=Po!==0;return Po=0,e}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?pe.memoizedState=Ee=e:Ee=Ee.next=e,Ee}function vt(){if(be===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=Ee===null?pe.memoizedState:Ee.next;if(t!==null)Ee=t,be=e;else{if(e===null)throw Error(R(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},Ee===null?pe.memoizedState=Ee=e:Ee=Ee.next=e}return Ee}function Ro(e,t){return typeof t=="function"?t(e):t}function Fl(e){var t=vt(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=be,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,l=null,u=o;do{var c=u.lane;if((br&c)===c)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 f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,i=r):l=l.next=f,pe.lanes|=c,_r|=c}u=u.next}while(u!==null&&u!==o);l===null?i=r:l.next=a,Rt(r,t.memoizedState)||(Qe=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,pe.lanes|=o,_r|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ul(e){var t=vt(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Rt(o,t.memoizedState)||(Qe=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fm(){}function Um(e,t){var n=pe,r=vt(),s=t(),o=!Rt(r.memoizedState,s);if(o&&(r.memoizedState=s,Qe=!0),r=r.queue,ad(Wm.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ee!==null&&Ee.memoizedState.tag&1){if(n.flags|=2048,jo(9,Bm.bind(null,n,r,s,t),void 0,null),Ce===null)throw Error(R(349));br&30||zm(n,t,s)}return s}function zm(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 Bm(e,t,n,r){t.value=n,t.getSnapshot=r,Vm(t)&&Hm(e)}function Wm(e,t,n){return n(function(){Vm(t)&&Hm(e)})}function Vm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rt(e,n)}catch{return!0}}function Hm(e){var t=ln(e,1);t!==null&&Pt(t,e,1,-1)}function Vf(e){var t=$t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:e},t.queue=e,e=e.dispatch=_x.bind(null,pe,e),[t.memoizedState,e]}function jo(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 qm(){return vt().memoizedState}function Di(e,t,n,r){var s=$t();pe.flags|=e,s.memoizedState=jo(1|t,n,void 0,r===void 0?null:r)}function Ia(e,t,n,r){var s=vt();r=r===void 0?null:r;var o=void 0;if(be!==null){var i=be.memoizedState;if(o=i.destroy,r!==null&&sd(r,i.deps)){s.memoizedState=jo(t,n,o,r);return}}pe.flags|=e,s.memoizedState=jo(1|t,n,o,r)}function Hf(e,t){return Di(8390656,8,e,t)}function ad(e,t){return Ia(2048,8,e,t)}function Km(e,t){return Ia(4,2,e,t)}function Qm(e,t){return Ia(4,4,e,t)}function Gm(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 Ym(e,t,n){return n=n!=null?n.concat([e]):null,Ia(4,4,Gm.bind(null,t,e),n)}function ld(){}function Jm(e,t){var n=vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&sd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xm(e,t){var n=vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&sd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zm(e,t,n){return br&21?(Rt(n,t)||(n=sm(),pe.lanes|=n,_r|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Qe=!0),e.memoizedState=n)}function xx(e,t){var n=te;te=n!==0&&4>n?n:4,e(!0);var r=Ml.transition;Ml.transition={};try{e(!1),t()}finally{te=n,Ml.transition=r}}function eg(){return vt().memoizedState}function bx(e,t,n){var r=Wn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tg(e))ng(t,n);else if(n=$m(e,t,n,r),n!==null){var s=Be();Pt(n,e,r,s),rg(n,t,r)}}function _x(e,t,n){var r=Wn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tg(e))ng(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,Rt(a,i)){var l=t.interleaved;l===null?(s.next=s,Zc(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=$m(e,t,s,r),n!==null&&(s=Be(),Pt(n,e,r,s),rg(n,t,r))}}function tg(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function ng(e,t){io=ca=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fc(e,n)}}var da={readContext:gt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},Sx={readContext:gt,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Hf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Di(4194308,4,Gm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Di(4194308,4,e,t)},useInsertionEffect:function(e,t){return Di(4,2,e,t)},useMemo:function(e,t){var n=$t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$t();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=$t();return e={current:e},t.memoizedState=e},useState:Vf,useDebugValue:ld,useDeferredValue:function(e){return $t().memoizedState=e},useTransition:function(){var e=Vf(!1),t=e[0];return e=xx.bind(null,e[1]),$t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,s=$t();if(de){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),Ce===null)throw Error(R(349));br&30||zm(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Hf(Wm.bind(null,r,o,e),[e]),r.flags|=2048,jo(9,Bm.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=$t(),t=Ce.identifierPrefix;if(de){var n=Zt,r=Xt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Po++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=wx++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},kx={readContext:gt,useCallback:Jm,useContext:gt,useEffect:ad,useImperativeHandle:Ym,useInsertionEffect:Km,useLayoutEffect:Qm,useMemo:Xm,useReducer:Fl,useRef:qm,useState:function(){return Fl(Ro)},useDebugValue:ld,useDeferredValue:function(e){var t=vt();return Zm(t,be.memoizedState,e)},useTransition:function(){var e=Fl(Ro)[0],t=vt().memoizedState;return[e,t]},useMutableSource:Fm,useSyncExternalStore:Um,useId:eg,unstable_isNewReconciler:!1},Ex={readContext:gt,useCallback:Jm,useContext:gt,useEffect:ad,useImperativeHandle:Ym,useInsertionEffect:Km,useLayoutEffect:Qm,useMemo:Xm,useReducer:Ul,useRef:qm,useState:function(){return Ul(Ro)},useDebugValue:ld,useDeferredValue:function(e){var t=vt();return be===null?t.memoizedState=e:Zm(t,be.memoizedState,e)},useTransition:function(){var e=Ul(Ro)[0],t=vt().memoizedState;return[e,t]},useMutableSource:Fm,useSyncExternalStore:Um,useId:eg,unstable_isNewReconciler:!1};function bt(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 Du(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 La={isMounted:function(e){return(e=e._reactInternals)?Cr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Be(),s=Wn(e),o=sn(r,s);o.payload=t,n!=null&&(o.callback=n),t=zn(e,o,s),t!==null&&(Pt(t,e,s,r),Li(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Be(),s=Wn(e),o=sn(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=zn(e,o,s),t!==null&&(Pt(t,e,s,r),Li(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Be(),r=Wn(e),s=sn(n,r);s.tag=2,t!=null&&(s.callback=t),t=zn(e,s,r),t!==null&&(Pt(t,e,r,n),Li(t,e,r))}};function qf(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!_o(n,r)||!_o(s,o):!0}function sg(e,t,n){var r=!1,s=Kn,o=t.contextType;return typeof o=="object"&&o!==null?o=gt(o):(s=Ye(t)?wr:De.current,r=t.contextTypes,o=(r=r!=null)?ys(e,s):Kn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=La,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Kf(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&&La.enqueueReplaceState(t,t.state,null)}function Mu(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},ed(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=gt(o):(o=Ye(t)?wr:De.current,s.context=ys(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Du(e,t,o,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&&La.enqueueReplaceState(s,s.state,null),la(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+=Z0(r),r=r.return;while(r);var s=n}catch(o){s=`
39Error generating stack: `+o.message+`
40`+o.stack}return{value:e,source:t,stack:s,digest:null}}function zl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Fu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Cx=typeof WeakMap=="function"?WeakMap:Map;function og(e,t,n){n=sn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ha||(ha=!0,Gu=r),Fu(e,t)},n}function ig(e,t,n){n=sn(-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(){Fu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Fu(e,t),typeof r!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Qf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Cx;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 Gf(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: 10,958 bytes, line 40
40function Yf(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=sn(-1,1),t.tag=2,zn(n,t,1))),n.lanes|=1),e)}var Tx=fn.ReactCurrentOwner,Qe=!1;function Ue(e,t,n,r){t.child=e===null?Lm(t,null,n,r):xs(t,e.child,n,r)}function Jf(e,t,n,r,s){n=n.render;var o=t.ref;return rs(t,s),r=od(e,t,n,r,o,s),n=id(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,un(e,t,s)):(de&&n&&Kc(t),t.flags|=1,Ue(e,t,r,s),t.child)}function Xf(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!gd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,ag(e,t,o,r,s)):(e=zi(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:_o,n(i,r)&&e.ref===t.ref)return un(e,t,s)}return t.flags|=1,e=Vn(o,r),e.ref=t.ref,e.return=t,t.child=e}function ag(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(_o(o,r)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(Qe=!0);else return t.lanes=e.lanes,un(e,t,s)}return Uu(e,t,n,r,s)}function lg(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ie(Jr,nt),nt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ie(Jr,nt),nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ie(Jr,nt),nt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ie(Jr,nt),nt|=r;return Ue(e,t,s,n),t.child}function ug(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uu(e,t,n,r,s){var o=Ye(n)?wr:De.current;return o=ys(t,o),rs(t,s),n=od(e,t,n,r,o,s),r=id(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,un(e,t,s)):(de&&r&&Kc(t),t.flags|=1,Ue(e,t,n,s),t.child)}function Zf(e,t,n,r,s){if(Ye(n)){var o=!0;ra(t)}else o=!1;if(rs(t,s),t.stateNode===null)Mi(e,t),sg(t,n,r),Mu(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=gt(u):(u=Ye(n)?wr:De.current,u=ys(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Kf(t,i,r,u),kn=!1;var d=t.memoizedState;i.state=d,la(t,r,i,s),l=t.memoizedState,a!==r||d!==l||Ge.current||kn?(typeof c=="function"&&(Du(t,n,c,r),l=t.memoizedState),(a=kn||qf(t,n,a,r,d,l,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Dm(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:bt(t.type,a),i.props=u,f=t.pendingProps,d=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=gt(l):(l=Ye(n)?wr:De.current,l=ys(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||d!==l)&&Kf(t,i,r,l),kn=!1,d=t.memoizedState,i.state=d,la(t,r,i,s);var v=t.memoizedState;a!==f||d!==v||Ge.current||kn?(typeof h=="function"&&(Du(t,n,h,r),v=t.memoizedState),(u=kn||qf(t,n,u,r,d,v,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,v,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,v,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),i.props=r,i.state=v,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return zu(e,t,n,r,o,s)}function zu(e,t,n,r,s,o){ug(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&Mf(t,n,!1),un(e,t,o);r=t.stateNode,Tx.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=xs(t,e.child,null,o),t.child=xs(t,null,a,o)):Ue(e,t,a,o),t.memoizedState=r.state,s&&Mf(t,n,!0),t.child}function cg(e){var t=e.stateNode;t.pendingContext?Df(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Df(e,t.context,!1),td(e,t.containerInfo)}function eh(e,t,n,r,s){return ws(),Gc(s),t.flags|=256,Ue(e,t,n,r),t.child}var Bu={dehydrated:null,treeContext:null,retryLane:0};function Wu(e){return{baseLanes:e,cachePool:null,transitions:null}}function dg(e,t,n){var r=t.pendingProps,s=he.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ie(he,s&1),e===null)return Lu(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):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Ma(i,r,0,null),e=vr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Wu(n),t.memoizedState=Bu,e):ud(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Px(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=Vn(a,o):(o=vr(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Wu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Bu,r}return o=e.child,e=o.sibling,r=Vn(o,{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=Ma({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function gi(e,t,n,r){return r!==null&&Gc(r),xs(t,e.child,null,n),e=ud(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Px(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=zl(Error(R(422))),gi(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Ma({mode:"visible",children:r.children},s,0,null),o=vr(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&xs(t,e.child,null,i),t.child.memoizedState=Wu(i),t.memoizedState=Bu,o);if(!(t.mode&1))return gi(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(R(419)),r=zl(o,r,void 0),gi(e,t,i,r)}if(a=(i&e.childLanes)!==0,Qe||a){if(r=Ce,r!==null){switch(i&-i){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|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,ln(e,s),Pt(r,e,s,-1))}return md(),r=zl(Error(R(421))),gi(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=zx.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,st=Un(s.nextSibling),ot=t,de=!0,Ct=null,e!==null&&(dt[ft++]=Xt,dt[ft++]=Zt,dt[ft++]=xr,Xt=e.id,Zt=e.overflow,xr=t),t=ud(t,r.children),t.flags|=4096,t)}function th(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$u(e.return,t,n)}function Bl(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function fg(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Ue(e,t,r.children,n),r=he.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&&th(e,n,t);else if(e.tag===19)th(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(ie(he,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&&ua(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Bl(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ua(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Bl(t,!0,n,null,o);break;case"together":Bl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Mi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function un(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),_r|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=Vn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Rx(e,t,n){switch(t.tag){case 3:cg(t),ws();break;case 5:Mm(t);break;case 1:Ye(t.type)&&ra(t);break;case 4:td(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ie(ia,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ie(he,he.current&1),t.flags|=128,null):n&t.child.childLanes?dg(e,t,n):(ie(he,he.current&1),e=un(e,t,n),e!==null?e.sibling:null);ie(he,he.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return fg(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ie(he,he.current),r)break;return null;case 22:case 23:return t.lanes=0,lg(e,t,n)}
vendor: 4,554 bytes, line 40
40return un(e,t,n)}var hg,Vu,pg,mg;hg=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}};Vu=function(){};pg=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,dr(Bt.current);var o=null;switch(n){case"input":s=fu(e,s),r=fu(e,r),o=[];break;case"select":s=me({},s,{value:void 0}),r=me({},r,{value:void 0}),o=[];break;case"textarea":s=mu(e,s),r=mu(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ta)}vu(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(mo.hasOwnProperty(u)?o||(o=[]):(o=o||[]).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(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(mo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ue("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};mg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Hs(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 Ae(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 jx(e,t,n){var r=t.pendingProps;switch(Qc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(t),null;case 1:return Ye(t.type)&&na(),Ae(t),null;case 3:return r=t.stateNode,bs(),ce(Ge),ce(De),rd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(pi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ct!==null&&(Xu(Ct),Ct=null))),Vu(e,t),Ae(t),null;case 5:nd(t);var s=dr(To.current);if(n=t.type,e!==null&&t.stateNode!=null)pg(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(R(166));return Ae(t),null}if(e=dr(Bt.current),pi(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ut]=t,r[Eo]=o,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<Zs.length;s++)ue(Zs[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":cf(r,o),ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ue("invalid",r);break;case"textarea":ff(r,o),ue("invalid",r)}vu(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&hi(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&hi(r.textContent,a,e),s=["children",""+a]):mo.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ue("scroll",r)}switch(n){case"input":oi(r),df(r,o,!0);break;case"textarea":oi(r),hf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=ta)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Wp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ut]=t,e[Eo]=r,hg(e,t,!1,!1),t.stateNode=e;e:{switch(i=yu(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<Zs.length;s++)ue(Zs[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":cf(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":ff(e,r),s=mu(e,r),ue("invalid",e);break;default:s=r}vu(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?qp(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Vp(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&go(e,l):typeof l=="number"&&go(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(mo.hasOwnProperty(o)?l!=null&&o==="onScroll"&&ue("scroll",e):l!=null&&Ac(e,o,l,i))}switch(n){case"input":oi(e),df(e,r,!1);break;case"textarea":oi(e),hf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+qn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Zr(e,!!r.multiple,o,!1):r.defaultValue!=null&&Zr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ta)}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 Ae(t),null;case 6:if(e&&t.stateNode!=null)mg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(R(166));if(n=dr(To.current),dr(Bt.current),pi(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ut]=t,(o=r.nodeValue!==n)&&(e=ot,e!==null))switch(e.tag){case 3:hi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hi(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ut]=t,t.stateNode=r}return Ae(t),null;case 13:if(ce(he),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&st!==null&&t.mode&1&&!(t.flags&128))Am(),ws(),t.flags|=98560,o=!1;else if(o=pi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(R(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(R(317));o[Ut]=t}else ws(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ae(t),o=!1}else Ct!==null&&(Xu(Ct),Ct=null),o=!0;if(!o)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||he.current&1?_e===0&&(_e=3):md())),t.updateQueue!==null&&(t.flags|=4),Ae(t),null);case 4:return bs(),Vu(e,t),e===null&&So(t.stateNode.containerInfo),Ae(t),null;case 10:return Xc(t.type._context),Ae(t),null;case 17:return Ye(t.type)&&na(),Ae(t),null;case 19:if(ce(he),o=t.memoizedState,o===null)return Ae(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)Hs(o,!1);else{if(_e!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ua(e),i!==null){for(t.flags|=128,Hs(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ie(he,he.current&1|2),t.child}e=e.sibling}o.tail!==null&&we()>Ss&&(t.flags|=128,r=!0,Hs(o,!1),t.lanes=4194304)}else{if(!r)if(e=ua(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!de)return Ae(t),null}else 2*we()-o.renderingStartTime>Ss&&n!==1073741824&&(t.flags|=128,r=!0,Hs(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=we(),t.sibling=null,n=he.current,ie(he,r?n&1|2:n&1),t):(Ae(t),null);case 22:case 23:return pd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?nt&1073741824&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function Nx(e,t){switch(Qc(t),t.tag){case 1:return Ye(t.type)&&na(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,652 bytes, line 40
40case 3:return bs(),ce(Ge),ce(De),rd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nd(t),null;case 13:if(ce(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ws()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(he),null;case 4:return bs(),null;case 10:return Xc(t.type._context),null;case 22:case 23:return pd(),null;case 24:return null;default:return null}}var vi=!1,Le=!1,Ox=typeof WeakSet=="function"?WeakSet:Set,L=null;function Yr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function Hu(e,t,n){try{n()}catch(r){ve(e,t,r)}}var nh=!1;function Ax(e,t){if(Pu=Xi,e=xm(),qc(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===s&&(a=i),d===o&&++c===r&&(l=i),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ru={focusedElem:e,selectionRange:n},Xi=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;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,b=v.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:bt(t.type,y),b);p.__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(R(163))}}catch(_){ve(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return v=nh,nh=!1,v}function ao(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 o=s.destroy;s.destroy=void 0,o!==void 0&&Hu(t,n,o)}s=s.next}while(s!==r)}}function $a(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 qu(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 gg(e){var t=e.alternate;t!==null&&(e.alternate=null,gg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ut],delete t[Eo],delete t[Ou],delete t[mx],delete t[gx])),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 vg(e){return e.tag===5||e.tag===3||e.tag===4}function rh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vg(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 Ku(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=ta));else if(r!==4&&(e=e.child,e!==null))for(Ku(e,t,n),e=e.sibling;e!==null;)Ku(e,t,n),e=e.sibling}function Qu(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(Qu(e,t,n),e=e.sibling;e!==null;)Qu(e,t,n),e=e.sibling}var Pe=null,kt=!1;function yn(e,t,n){for(n=n.child;n!==null;)yg(e,t,n),n=n.sibling}function yg(e,t,n){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(Pa,n)}catch{}switch(n.tag){case 5:Le||Yr(n,t);case 6:var r=Pe,s=kt;Pe=null,yn(e,t,n),Pe=r,kt=s,Pe!==null&&(kt?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(kt?(e=Pe,n=n.stateNode,e.nodeType===8?Ll(e.parentNode,n):e.nodeType===1&&Ll(e,n),xo(e)):Ll(Pe,n.stateNode));break;case 4:r=Pe,s=kt,Pe=n.stateNode.containerInfo,kt=!0,yn(e,t,n),Pe=r,kt=s;break;case 0:case 11:case 14:case 15:if(!Le&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Hu(n,t,i),s=s.next}while(s!==r)}yn(e,t,n);break;case 1:if(!Le&&(Yr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ve(n,t,a)}yn(e,t,n);break;case 21:yn(e,t,n);break;case 22:n.mode&1?(Le=(r=Le)||n.memoizedState!==null,yn(e,t,n),Le=r):yn(e,t,n);break;default:yn(e,t,n)}}function sh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ox),t.forEach(function(r){var s=Bx.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Pe=a.stateNode,kt=!1;break e;case 3:Pe=a.stateNode.containerInfo,kt=!0;break e;case 4:Pe=a.stateNode.containerInfo,kt=!0;break e}a=a.return}if(Pe===null)throw Error(R(160));yg(o,i,s),Pe=null,kt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ve(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)wg(t,e),t=t.sibling}function wg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wt(t,e),Lt(e),r&4){try{ao(3,e,e.return),$a(3,e)}catch(y){ve(e,e.return,y)}try{ao(5,e,e.return)}catch(y){ve(e,e.return,y)}}break;case 1:wt(t,e),Lt(e),r&512&&n!==null&&Yr(n,n.return);break;case 5:if(wt(t,e),Lt(e),r&512&&n!==null&&Yr(n,n.return),e.flags&32){var s=e.stateNode;try{go(s,"")}catch(y){ve(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&zp(s,o),yu(a,i);var u=yu(a,o);for(i=0;i<l.length;i+=2){var c=l[i],f=l[i+1];c==="style"?qp(s,f):c==="dangerouslySetInnerHTML"?Vp(s,f):c==="children"?go(s,f):Ac(s,c,f,u)}switch(a){case"input":hu(s,o);break;case"textarea":Bp(s,o);break;case"select":var d=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Zr(s,!!o.multiple,h,!1):d!==!!o.multiple&&(o.defaultValue!=null?Zr(s,!!o.multiple,o.defaultValue,!0):Zr(s,!!o.multiple,o.multiple?[]:"",!1))}s[Eo]=o}catch(y){ve(e,e.return,y)}}break;case 6:if(wt(t,e),Lt(e),r&4){if(e.stateNode===null)throw Error(R(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(y){ve(e,e.return,y)}}break;case 3:if(wt(t,e),Lt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{xo(t.containerInfo)}catch(y){ve(e,e.return,y)}break;case 4:wt(t,e),Lt(e);break;case 13:wt(t,e),Lt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(fd=we())),r&4&&sh(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Le=(u=Le)||c,wt(t,e),Le=u):wt(t,e),Lt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(L=e,c=e.child;c!==null;){for(f=L=c;L!==null;){switch(d=L,h=d.child,d.tag){case 0:case 11:case 14:case 15:ao(4,d,d.return);break;case 1:Yr(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){ve(r,n,y)}}break;case 5:Yr(d,d.return);break;case 22:if(d.memoizedState!==null){ih(f);continue}}h!==null?(h.return=d,L=h):ih(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Hp("display",i))}catch(y){ve(e,e.return,y)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){ve(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:wt(t,e),Lt(e),r&4&&sh(e);break;case 21:break;default:wt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(vg(n)){var r=n;break e}n=n.return}throw Error(R(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(go(s,""),r.flags&=-33);var o=rh(e);Qu(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=rh(e);Ku(e,a,i);break;default:throw Error(R(161))}}catch(l){ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ix(e,t,n){L=e,xg(e)}function xg(e,t,n){for(var r=(e.mode&1)!==0;L!==null;){var s=L,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||vi;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Le;a=vi;var u=Le;if(vi=i,(Le=l)&&!u)for(L=s;L!==null;)i=L,l=i.child,i.tag===22&&i.memoizedState!==null?ah(s):l!==null?(l.return=i,L=l):ah(s);for(;o!==null;)L=o,xg(o),o=o.sibling;L=s,vi=a,Le=u}oh(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,L=o):oh(e)}}function oh(e){for(;L!==null;){var t=L;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Le||$a(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Le)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:bt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Wf(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Wf(t,i,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 c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&xo(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(R(163))}Le||t.flags&512&&qu(t)}catch(d){ve(t,t.return,d)}}if(t===e){L=null;break}if(n=t.sibling,n!==null){n.return=t.return,L=n;break}L=t.return}}function ih(e){for(;L!==null;){var t=L;if(t===e){L=null;break}var n=t.sibling;if(n!==null){n.return=t.return,L=n;break}L=t.return}}function ah(e){for(;L!==null;){var t=L;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{$a(4,t)}catch(l){ve(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){ve(t,s,l)}}var o=t.return;try{qu(t)}catch(l){ve(t,o,l)}break;case 5:var i=t.return;try{qu(t)}catch(l){ve(t,i,l)}}}catch(l){ve(t,t.return,l)}if(t===e){L=null;break}var a=t.sibling;if(a!==null){a.return=t.return,L=a;break}L=t.return}}var Lx=Math.ceil,fa=fn.ReactCurrentDispatcher,cd=fn.ReactCurrentOwner,pt=fn.ReactCurrentBatchConfig,X=0,Ce=null,xe=null,Re=0,nt=0,Jr=er(0),_e=0,No=null,_r=0,Da=0,dd=0,lo=null,qe=null,fd=0,Ss=1/0,Gt=null,ha=!1,Gu=null,Bn=null,yi=!1,Ln=null,pa=0,uo=0,Yu=null,Fi=-1,Ui=0;function Be(){return X&6?we():Fi!==-1?Fi:Fi=we()}function Wn(e){return e.mode&1?X&2&&Re!==0?Re&-Re:yx.transition!==null?(Ui===0&&(Ui=sm()),Ui):(e=te,e!==0||(e=window.event,e=e===void 0?16:dm(e.type)),e):1}function Pt(e,t,n,r){if(50<uo)throw uo=0,Yu=null,Error(R(185));Wo(e,n,r),(!(X&2)||e!==Ce)&&(e===Ce&&(!(X&2)&&(Da|=n),_e===4&&Tn(e,Re)),Je(e,r),n===1&&X===0&&!(t.mode&1)&&(Ss=we()+500,Aa&&tr()))}function Je(e,t){var n=e.callbackNode;yw(e,t);var r=Ji(e,e===Ce?Re:0);if(r===0)n!==null&&gf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&gf(n),t===1)e.tag===0?vx(lh.bind(null,e)):jm(lh.bind(null,e)),hx(function(){!(X&6)&&tr()}),n=null;else{switch(om(r)){case 1:n=Mc;break;case 4:n=nm;break;case 16:n=Yi;break;case 536870912:n=rm;break;default:n=Yi}n=Pg(n,bg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bg(e,t){if(Fi=-1,Ui=0,X&6)throw Error(R(327));var n=e.callbackNode;if(ss()&&e.callbackNode!==n)return null;var r=Ji(e,e===Ce?Re:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ma(e,r);else{t=r;var s=X;X|=2;var o=Sg();(Ce!==e||Re!==t)&&(Gt=null,Ss=we()+500,gr(e,t));do try{Mx();break}catch(a){_g(e,a)}while(!0);Jc(),fa.current=o,X=s,xe!==null?t=0:(Ce=null,Re=0,t=_e)}if(t!==0){if(t===2&&(s=Su(e),s!==0&&(r=s,t=Ju(e,s))),t===1)throw n=No,gr(e,0),Tn(e,r),Je(e,we()),n;if(t===6)Tn(e,r);else{if(s=e.current.alternate,!(r&30)&&!$x(s)&&(t=ma(e,r),t===2&&(o=Su(e),o!==0&&(r=o,t=Ju(e,o))),t===1))throw n=No,gr(e,0),Tn(e,r),Je(e,we()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(R(345));case 2:ir(e,qe,Gt);break;case 3:if(Tn(e,r),(r&130023424)===r&&(t=fd+500-we(),10<t)){if(Ji(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Be(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Nu(ir.bind(null,e,qe,Gt),t);break}ir(e,qe,Gt);break;case 4:if(Tn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-Tt(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=we()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Lx(r/1960))-r,10<r){e.timeoutHandle=Nu(ir.bind(null,e,qe,Gt),r);break}ir(e,qe,Gt);break;case 5:ir(e,qe,Gt);break;default:throw Error(R(329))}}}return Je(e,we()),e.callbackNode===n?bg.bind(null,e):null}function Ju(e,t){var n=lo;return e.current.memoizedState.isDehydrated&&(gr(e,t).flags|=256),e=ma(e,t),e!==2&&(t=qe,qe=n,t!==null&&Xu(t)),e}function Xu(e){qe===null?qe=e:qe.push.apply(qe,e)}function $x(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],o=s.getSnapshot;s=s.value;try{if(!Rt(o(),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 Tn(e,t){for(t&=~dd,t&=~Da,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tt(t),r=1<<n;e[n]=-1,t&=~r}}function lh(e){if(X&6)throw Error(R(327));ss();var t=Ji(e,0);if(!(t&1))return Je(e,we()),null;var n=ma(e,t);if(e.tag!==0&&n===2){var r=Su(e);r!==0&&(t=r,n=Ju(e,r))}if(n===1)throw n=No,gr(e,0),Tn(e,t),Je(e,we()),n;if(n===6)throw Error(R(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ir(e,qe,Gt),Je(e,we()),null}function hd(e,t){var n=X;X|=1;try{return e(t)}finally{X=n,X===0&&(Ss=we()+500,Aa&&tr())}}function Sr(e){Ln!==null&&Ln.tag===0&&!(X&6)&&ss();var t=X;X|=1;var n=pt.transition,r=te;try{if(pt.transition=null,te=1,e)return e()}finally{te=r,pt.transition=n,X=t,!(X&6)&&tr()}}function pd(){nt=Jr.current,ce(Jr)}function gr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,fx(n)),xe!==null)for(n=xe.return;n!==null;){var r=n;switch(Qc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&na();break;case 3:bs(),ce(Ge),ce(De),rd();break;case 5:nd(r);break;case 4:bs();break;case 13:ce(he);break;case 19:ce(he);break;case 10:Xc(r.type._context);break;case 22:case 23:pd()}n=n.return}if(Ce=e,xe=e=Vn(e.current,null),Re=nt=t,_e=0,No=null,dd=Da=_r=0,qe=lo=null,cr!==null){for(t=0;t<cr.length;t++)if(n=cr[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}cr=null}return e}function _g(e,t){do{var n=xe;try{if(Jc(),$i.current=da,ca){for(var r=pe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ca=!1}if(br=0,Ee=be=pe=null,io=!1,Po=0,cd.current=null,n===null||n.return===null){_e=1,No=t,xe=null;break}e:{var o=e,i=n.return,a=n,l=t;if(t=Re,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Gf(i);if(h!==null){h.flags&=-257,Yf(h,i,a,o,t),h.mode&1&&Qf(o,u,t),t=h,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)){Qf(o,u,t),md();break e}l=Error(R(426))}}else if(de&&a.mode&1){var b=Gf(i);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Yf(b,i,a,o,t),Gc(_s(l,a));break e}}o=l=_s(l,a),_e!==4&&(_e=2),lo===null?lo=[o]:lo.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=og(o,l,t);Bf(o,p);break e;case 1:a=l;var m=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Bn===null||!Bn.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=ig(o,a,t);Bf(o,_);break e}}o=o.return}while(o!==null)}Eg(n)}catch(S){t=S,xe===n&&n!==null&&(xe=n=n.return);continue}break}while(!0)}function Sg(){var e=fa.current;return fa.current=da,e===null?da:e}function md(){(_e===0||_e===3||_e===2)&&(_e=4),Ce===null||!(_r&268435455)&&!(Da&268435455)||Tn(Ce,Re)}function ma(e,t){var n=X;X|=2;var r=Sg();(Ce!==e||Re!==t)&&(Gt=null,gr(e,t));do try{Dx();break}catch(s){_g(e,s)}while(!0);if(Jc(),X=n,fa.current=r,xe!==null)throw Error(R(261));return Ce=null,Re=0,_e}function Dx(){for(;xe!==null;)kg(xe)}function Mx(){for(;xe!==null&&!uw();)kg(xe)}function kg(e){var t=Tg(e.alternate,e,nt);e.memoizedProps=e.pendingProps,t===null?Eg(e):xe=t,cd.current=null}function Eg(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,xe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{_e=6,xe=null;return}}else if(n=jx(n,t,nt),n!==null){xe=n;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);_e===0&&(_e=5)}function ir(e,t,n){var r=te,s=pt.transition;try{pt.transition=null,te=1,Fx(e,t,n,r)}finally{pt.transition=s,te=r}return null}function Fx(e,t,n,r){do ss();while(Ln!==null);if(X&6)throw Error(R(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(R(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(ww(e,o),e===Ce&&(xe=Ce=null,Re=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||yi||(yi=!0,Pg(Yi,function(){return ss(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=pt.transition,pt.transition=null;var i=te;te=1;var a=X;X|=4,cd.current=null,Ax(e,n),wg(n,e),ox(Ru),Xi=!!Pu,Ru=Pu=null,e.current=n,Ix(n),cw(),X=a,te=i,pt.transition=o}else e.current=n;if(yi&&(yi=!1,Ln=e,pa=s),o=e.pendingLanes,o===0&&(Bn=null),hw(n.stateNode),Je(e,we()),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(ha)throw ha=!1,e=Gu,Gu=null,e;return pa&1&&e.tag!==0&&ss(),o=e.pendingLanes,o&1?e===Yu?uo++:(uo=0,Yu=e):uo=0,tr(),null}function ss(){if(Ln!==null){var e=om(pa),t=pt.transition,n=te;try{if(pt.transition=null,te=16>e?16:e,Ln===null)var r=!1;else{if(e=Ln,Ln=null,pa=0,X&6)throw Error(R(331));var s=X;for(X|=4,L=e.current;L!==null;){var o=L,i=o.child;if(L.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(L=u;L!==null;){var c=L;switch(c.tag){case 0:case 11:case 15:ao(8,c,o)}var f=c.child;if(f!==null)f.return=c,L=f;else for(;L!==null;){c=L;var d=c.sibling,h=c.return;if(gg(c),c===u){L=null;break}if(d!==null){d.return=h,L=d;break}L=h}}}var v=o.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}L=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,L=i;else e:for(;L!==null;){if(o=L,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ao(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,L=p;break e}L=o.return}}var m=e.current;for(L=m;L!==null;){i=L;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,L=w;else e:for(i=m;L!==null;){if(a=L,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:$a(9,a)}}catch(S){ve(a,a.return,S)}if(a===i){L=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,L=_;break e}L=a.return}}if(X=s,tr(),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(Pa,e)}catch{}r=!0}return r}finally{te=n,pt.transition=t}}return!1}function uh(e,t,n){t=_s(n,t),t=og(e,t,1),e=zn(e,t,1),t=Be(),e!==null&&(Wo(e,1,t),Je(e,t))}function ve(e,t,n){if(e.tag===3)uh(e,e,n);else for(;t!==null;){if(t.tag===3){uh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bn===null||!Bn.has(r))){e=_s(n,e),e=ig(t,e,1),t=zn(t,e,1),e=Be(),t!==null&&(Wo(t,1,e),Je(t,e));break}}t=t.return}}function Ux(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Be(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&(Re&n)===n&&(_e===4||_e===3&&(Re&130023424)===Re&&500>we()-fd?gr(e,0):dd|=n),Je(e,t)}function Cg(e,t){t===0&&(e.mode&1?(t=li,li<<=1,!(li&130023424)&&(li=4194304)):t=1);var n=Be();e=ln(e,t),e!==null&&(Wo(e,t,n),Je(e,n))}function zx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Cg(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(R(314))}r!==null&&r.delete(t),Cg(e,n)}var Tg;Tg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,Rx(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,de&&t.flags&1048576&&Nm(t,oa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Mi(e,t),e=t.pendingProps;var s=ys(t,De.current);rs(t,n),s=od(null,t,r,e,s,n);var o=id();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,Ye(r)?(o=!0,ra(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ed(t),s.updater=La,t.stateNode=s,s._reactInternals=t,Mu(t,r,e,n),t=zu(null,t,r,!0,o,n)):(t.tag=0,de&&o&&Kc(t),Ue(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Mi(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Vx(r),e=bt(r,e),s){case 0:t=Uu(null,t,r,e,n);break e;case 1:t=Zf(null,t,r,e,n);break e;case 11:t=Jf(null,t,r,e,n);break e;case 14:t=Xf(null,t,r,bt(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bt(r,s),Uu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bt(r,s),Zf(e,t,r,s,n);case 3:e:{if(cg(t),e===null)throw Error(R(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Dm(e,t),la(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=_s(Error(R(423)),t),t=eh(e,t,r,n,s);break e}else if(r!==s){s=_s(Error(R(424)),t),t=eh(e,t,r,n,s);break e}else for(st=Un(t.stateNode.containerInfo.firstChild),ot=t,de=!0,Ct=null,n=Lm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ws(),r===s){t=un(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return Mm(t),e===null&&Lu(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,ju(r,s)?i=null:o!==null&&ju(r,o)&&(t.flags|=32),ug(e,t),Ue(e,t,i,n),t.child;case 6:return e===null&&Lu(t),null;case 13:return dg(e,t,n);case 4:return td(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xs(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bt(r,s),Jf(e,t,r,s,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,ie(ia,r._currentValue),r._currentValue=i,o!==null)if(Rt(o.value,i)){if(o.children===s.children&&!Ge.current){t=un(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=sn(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),$u(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(R(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),$u(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ue(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,rs(t,n),s=gt(s),r=r(s),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,s=bt(r,t.pendingProps),s=bt(r.type,s),Xf(e,t,r,s,n);case 15:return ag(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bt(r,s),Mi(e,t),t.tag=1,Ye(r)?(e=!0,ra(t)):e=!1,rs(t,n),sg(t,r,s),Mu(t,r,s,n),zu(null,t,r,!0,e,n);case 19:return fg(e,t,n);case 22:return lg(e,t,n)}throw Error(R(156,t.tag))};function Pg(e,t){return tm(e,t)}function Wx(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 ht(e,t,n,r){return new Wx(e,t,n,r)}function gd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vx(e){if(typeof e=="function")return gd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lc)return 11;if(e===$c)return 14}return 2}function Vn(e,t){var n=e.alternate;return n===null?(n=ht(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: 5,510 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 zi(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")gd(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case zr:return vr(n.children,s,o,t);case Ic:i=8,s|=8;break;case lu:return e=ht(12,n,t,s|2),e.elementType=lu,e.lanes=o,e;case uu:return e=ht(13,n,t,s),e.elementType=uu,e.lanes=o,e;case cu:return e=ht(19,n,t,s),e.elementType=cu,e.lanes=o,e;case Mp:return Ma(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $p:i=10;break e;case Dp:i=9;break e;case Lc:i=11;break e;case $c:i=14;break e;case Sn:i=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=ht(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function vr(e,t,n,r){return e=ht(7,e,r,t),e.lanes=n,e}function Ma(e,t,n,r){return e=ht(22,e,r,t),e.elementType=Mp,e.lanes=n,e.stateNode={isHidden:!1},e}function Wl(e,t,n){return e=ht(6,e,null,t),e.lanes=n,e}function Vl(e,t,n){return t=ht(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=kl(0),this.expirationTimes=kl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function vd(e,t,n,r,s,o,i,a,l){return e=new Hx(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ht(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ed(o),e}function qx(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ur,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Rg(e){if(!e)return Kn;e=e._reactInternals;e:{if(Cr(e)!==e||e.tag!==1)throw Error(R(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ye(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(R(171))}if(e.tag===1){var n=e.type;if(Ye(n))return Rm(e,n,t)}return t}function jg(e,t,n,r,s,o,i,a,l){return e=vd(n,r,!0,e,s,o,i,a,l),e.context=Rg(null),n=e.current,r=Be(),s=Wn(n),o=sn(r,s),o.callback=t??null,zn(n,o,s),e.current.lanes=s,Wo(e,s,r),Je(e,r),e}function Fa(e,t,n,r){var s=t.current,o=Be(),i=Wn(s);return n=Rg(n),t.context===null?t.context=n:t.pendingContext=n,t=sn(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=zn(s,t,i),e!==null&&(Pt(e,s,i,o),Li(e,s,i)),i}function ga(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 ch(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yd(e,t){ch(e,t),(e=e.alternate)&&ch(e,t)}function Kx(){return null}var Ng=typeof reportError=="function"?reportError:function(e){console.error(e)};function wd(e){this._internalRoot=e}Ua.prototype.render=wd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));Fa(e,t,null,null)};Ua.prototype.unmount=wd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sr(function(){Fa(null,e,null,null)}),t[an]=null}};function Ua(e){this._internalRoot=e}Ua.prototype.unstable_scheduleHydration=function(e){if(e){var t=lm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cn.length&&t!==0&&t<Cn[n].priority;n++);Cn.splice(n,0,e),n===0&&cm(e)}};function xd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function za(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dh(){}function Qx(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=ga(i);o.call(u)}}var i=jg(t,r,e,0,null,!1,!1,"",dh);return e._reactRootContainer=i,e[an]=i.current,So(e.nodeType===8?e.parentNode:e),Sr(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=ga(l);a.call(u)}}var l=vd(e,0,!1,null,null,!1,!1,"",dh);return e._reactRootContainer=l,e[an]=l.current,So(e.nodeType===8?e.parentNode:e),Sr(function(){Fa(t,l,n,r)}),l}function Ba(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=ga(i);a.call(l)}}Fa(t,i,e,s)}else i=Qx(n,t,e,s,r);return ga(i)}im=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Xs(t.pendingLanes);n!==0&&(Fc(t,n|1),Je(t,we()),!(X&6)&&(Ss=we()+500,tr()))}break;case 13:Sr(function(){var r=ln(e,1);if(r!==null){var s=Be();Pt(r,e,1,s)}}),yd(e,1)}};Uc=function(e){if(e.tag===13){var t=ln(e,134217728);if(t!==null){var n=Be();Pt(t,e,134217728,n)}yd(e,134217728)}};am=function(e){if(e.tag===13){var t=Wn(e),n=ln(e,t);if(n!==null){var r=Be();Pt(n,e,t,r)}yd(e,t)}};lm=function(){return te};um=function(e,t){var n=te;
vendor: 4,186 bytes, line 40
40try{return te=e,t()}finally{te=n}};xu=function(e,t,n){switch(t){case"input":if(hu(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=Oa(r);if(!s)throw Error(R(90));Up(r),hu(r,s)}}}break;case"textarea":Bp(e,n);break;case"select":t=n.value,t!=null&&Zr(e,!!n.multiple,t,!1)}};Gp=hd;Yp=Sr;var Gx={usingClientEntryPoint:!1,Events:[Ho,Hr,Oa,Kp,Qp,hd]},qs={findFiberByHostInstance:ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Yx={bundleType:qs.bundleType,version:qs.version,rendererPackageName:qs.rendererPackageName,rendererConfig:qs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:fn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zp(e),e===null?null:e.stateNode},findFiberByHostInstance:qs.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 wi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wi.isDisabled&&wi.supportsFiber)try{Pa=wi.inject(Yx),zt=wi}catch{}}lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gx;lt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xd(t))throw Error(R(200));return qx(e,t,null,n)};lt.createRoot=function(e,t){if(!xd(e))throw Error(R(299));var n=!1,r="",s=Ng;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=vd(e,1,!1,null,null,n,!1,r,s),e[an]=t.current,So(e.nodeType===8?e.parentNode:e),new wd(t)};lt.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(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=Zp(t),e=e===null?null:e.stateNode,e};lt.flushSync=function(e){return Sr(e)};lt.hydrate=function(e,t,n){if(!za(t))throw Error(R(200));return Ba(null,e,t,!0,n)};lt.hydrateRoot=function(e,t,n){if(!xd(e))throw Error(R(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Ng;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=jg(t,null,e,1,n??null,s,!1,o,i),e[an]=t.current,So(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 Ua(t)};lt.render=function(e,t,n){if(!za(t))throw Error(R(200));return Ba(null,e,t,!1,n)};lt.unmountComponentAtNode=function(e){if(!za(e))throw Error(R(40));return e._reactRootContainer?(Sr(function(){Ba(null,null,e,!1,function(){e._reactRootContainer=null,e[an]=null})}),!0):!1};lt.unstable_batchedUpdates=hd;lt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!za(n))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return Ba(e,t,n,!1,r)};lt.version="18.3.1-next-f1338f8080-20240426";function Og(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Og)}catch(e){console.error(e)}}Og(),Op.exports=lt;var Ko=Op.exports;const Ag=wp(Ko);var Ig,fh=Ko;Ig=fh.createRoot,fh.hydrateRoot;const Jx=1,Xx=1e6;let Hl=0;function Zx(){return Hl=(Hl+1)%Number.MAX_SAFE_INTEGER,Hl.toString()}const ql=new Map,hh=e=>{if(ql.has(e))return;const t=setTimeout(()=>{ql.delete(e),co({type:"REMOVE_TOAST",toastId:e})},Xx);ql.set(e,t)},e1=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Jx)};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;
40return n?hh(n):e.toasts.forEach(r=>{hh(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)}}},Bi=[];let Wi={toasts:[]};function co(e){Wi=e1(Wi,e),Bi.forEach(t=>{t(Wi)})}function t1({...e}){const t=Zx(),n=s=>co({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>co({type:"DISMISS_TOAST",toastId:t});return co({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function n1(){const[e,t]=x.useState(Wi);return x.useEffect(()=>(Bi.push(t),()=>{const n=Bi.indexOf(t);n>-1&&Bi.splice(n,1)}),[e]),{...e,toast:t1,dismiss:n=>co({type:"DISMISS_TOAST",toastId:n})}}function ne(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 r1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Lg(...e){return t=>e.forEach(n=>r1(n,t))}function Xe(...e){return x.useCallback(Lg(...e),e)}function s1(e,t=[]){let n=[];function r(o,i){const a=x.createContext(i),l=n.length;n=[...n,i];function u(f){const{scope:d,children:h,...v}=f,y=(d==null?void 0:d[e][l])||a,b=x.useMemo(()=>v,Object.values(v));return g.jsx(y.Provider,{value:b,children:h})}function c(f,d){const h=(d==null?void 0:d[e][l])||a,v=x.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const s=()=>{const o=n.map(i=>x.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,o1(s,...t)]}function o1(...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(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Oo=x.forwardRef((e,t)=>{const{children:n,...r}=e,s=x.Children.toArray(n),o=s.find(i1);if(o){const i=o.props.children,a=s.map(l=>l===o?x.Children.count(i)>1?x.Children.only(null):x.isValidElement(i)?i.props.children:null:l);return g.jsx(Zu,{...r,ref:t,children:x.isValidElement(i)?x.cloneElement(i,void 0,a):null})}return g.jsx(Zu,{...r,ref:t,children:n})});Oo.displayName="Slot";var Zu=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const s=l1(n);return x.cloneElement(n,{...a1(r,n.props),ref:t?Lg(t,s):s})}return x.Children.count(n)>1?x.Children.only(null):null});Zu.displayName="SlotClone";var $g=({children:e})=>g.jsx(g.Fragment,{children:e});function i1(e){return x.isValidElement(e)&&e.type===$g}function a1(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function l1(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 Dg(e){const t=e+"CollectionProvider",[n,r]=s1(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:v,children:y}=h,b=N.useRef(null),p=N.useRef(new Map).current;return g.jsx(s,{scope:v,itemMap:p,collectionRef:b,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=N.forwardRef((h,v)=>{const{scope:y,children:b}=h,p=o(a,y),m=Xe(v,p.collectionRef);return g.jsx(Oo,{ref:m,children:b})});l.displayName=a;const u=e+"CollectionItemSlot",c="data-radix-collection-item",f=N.forwardRef((h,v)=>{const{scope:y,children:b,...p}=h,m=N.useRef(null),w=Xe(v,m),_=o(u,y);return N.useEffect(()=>(_.itemMap.set(m,{ref:m,...p}),()=>void _.itemMap.delete(m))),g.jsx(Oo,{[c]:"",ref:w,children:b})});f.displayName=u;function d(h){const v=o(e+"CollectionConsumer",h);return N.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const p=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((_,S)=>p.indexOf(_.ref.current)-p.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},d,r]}function Wa(e,t=[]){let n=[];function r(o,i){const a=x.createContext(i),l=n.length;n=[...n,i];const u=f=>{var p;const{scope:d,children:h,...v}=f,y=((p=d==null?void 0:d[e])==null?void 0:p[l])||a,b=x.useMemo(()=>v,Object.values(v));return g.jsx(y.Provider,{value:b,children:h})};u.displayName=o+"Provider";function c(f,d){var y;const h=((y=d==null?void 0:d[e])==null?void 0:y[l])||a,v=x.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,c]}const s=()=>{const o=n.map(i=>x.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return x.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(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var c1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ye=c1.reduce((e,t)=>
vendor: 5,339 bytes, line 40
40{const n=x.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?Oo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Mg(e,t){e&&Ko.flushSync(()=>e.dispatchEvent(t))}function jt(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function d1(e,t=globalThis==null?void 0:globalThis.document){const n=jt(e);x.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 f1="DismissableLayer",ec="dismissableLayer.update",h1="dismissableLayer.pointerDownOutside",p1="dismissableLayer.focusOutside",ph,Fg=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bd=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=x.useContext(Fg),[c,f]=x.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),v=Xe(t,E=>f(E)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=y.indexOf(b),m=c?y.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,_=m>=p,S=g1(E=>{const T=E.target,I=[...u.branches].some(O=>O.contains(T));!_||I||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},d),k=v1(E=>{const T=E.target;[...u.branches].some(O=>O.contains(T))||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},d);return d1(E=>{m===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},d),x.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ph=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),mh(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=ph)}},[c,d,n,u]),x.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),mh())},[c,u]),x.useEffect(()=>{const E=()=>h({});return document.addEventListener(ec,E),()=>document.removeEventListener(ec,E)},[]),g.jsx(ye.div,{...l,ref:v,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:ne(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ne(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ne(e.onPointerDownCapture,S.onPointerDownCapture)})});bd.displayName=f1;var m1="DismissableLayerBranch",Ug=x.forwardRef((e,t)=>{const n=x.useContext(Fg),r=x.useRef(null),s=Xe(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),g.jsx(ye.div,{...e,ref:s})});Ug.displayName=m1;function g1(e,t=globalThis==null?void 0:globalThis.document){const n=jt(e),r=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){zg(h1,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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function v1(e,t=globalThis==null?void 0:globalThis.document){const n=jt(e),r=x.useRef(!1);return x.useEffect(()=>{const s=o=>{o.target&&!r.current&&zg(p1,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function mh(){const e=new CustomEvent(ec);document.dispatchEvent(e)}function zg(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Mg(s,o):s.dispatchEvent(o)}var y1=bd,w1=Ug,Qn=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},x1="Portal",Bg=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=x.useState(!1);Qn(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ag.createPortal(g.jsx(ye.div,{...r,ref:t}),i):null});Bg.displayName=x1;function b1(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Va=e=>{const{present:t,children:n}=e,r=_1(t),s=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=Xe(r.ref,S1(s));return typeof n=="function"||r.isPresent?x.cloneElement(s,{ref:o}):null};Va.displayName="Presence";function _1(e){const[t,n]=x.useState(),r=x.useRef({}),s=x.useRef(e),o=x.useRef("none"),i=e?"mounted":"unmounted",[a,l]=b1(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=xi(r.current);o.current=a==="mounted"?u:"none"},[a]),Qn(()=>{const u=r.current,c=s.current;if(c!==e){const d=o.current,h=xi(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Qn(()=>
40{if(t){let u;const c=t.ownerDocument.defaultView??window,f=h=>{const y=xi(r.current).includes(h.animationName);if(h.target===t&&y&&(l("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},d=h=>{h.target===t&&(o.current=xi(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function xi(e){return(e==null?void 0:e.animationName)||"none"}function S1(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 _d({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=k1({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=jt(n),l=x.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[o,e,s,a]);return[i,l]}function k1({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,s=x.useRef(r),o=jt(t);return x.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var E1="VisuallyHidden",Ha=x.forwardRef((e,t)=>g.jsx(ye.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}}));Ha.displayName=E1;var C1=Ha,Sd="ToastProvider",[kd,T1,P1]=Dg("Toast"),[Wg,EP]=Wa("Toast",[P1]),[R1,qa]=Wg(Sd),Vg=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=x.useState(null),[u,c]=x.useState(0),f=x.useRef(!1),d=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Sd}\`. Expected non-empty \`string\`.`),g.jsx(kd.Provider,{scope:t,children:g.jsx(R1,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:x.useCallback(()=>c(h=>h+1),[]),onToastRemove:x.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:d,children:i})})};Vg.displayName=Sd;var Hg="ToastViewport",j1=["F8"],tc="toast.viewportPause",nc="toast.viewportResume",qg=x.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=j1,label:s="Notifications ({hotkey})",...o}=e,i=qa(Hg,n),a=T1(n),l=x.useRef(null),u=x.useRef(null),c=x.useRef(null),f=x.useRef(null),d=Xe(t,f,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=i.toastCount>0;x.useEffect(()=>{const b=p=>{var w;r.length!==0&&r.every(_=>p[_]||p.code===_)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),x.useEffect(()=>{const b=l.current,p=f.current;if(v&&b&&p){const m=()=>{if(!i.isClosePausedRef.current){const k=new CustomEvent(tc);p.dispatchEvent(k),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const k=new CustomEvent(nc);p.dispatchEvent(k),i.isClosePausedRef.current=!1}},_=k=>{!b.contains(k.relatedTarget)&&w()},S=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",m),b.addEventListener("focusout",_),b.addEventListener("pointermove",m),b.addEventListener("pointerleave",S),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",m),b.removeEventListener("focusout",_),b.removeEventListener("pointermove",m),b.removeEventListener("pointerleave",S),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[v,i.isClosePausedRef]);const y=x.useCallback(({tabbingDirection:b})=>{const m=a().map(w=>{const _=w.ref.current,S=[_,...W1(_)];return b==="forwards"?S:S.reverse()});return(b==="forwards"?m.reverse():m).flat()},[a]);return x.useEffect(()=>{const b=f.current;if(b){const p=m=>{var S,k,E;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const T=document.activeElement,I=m.shiftKey;if(m.target===b&&I){(S=u.current)==null||S.focus();return}const D=y({tabbingDirection:I?"backwards":"forwards"}),W=D.findIndex(A=>A===T);Kl(D.slice(W+1))?m.preventDefault():I?(k=u.current)==null||k.focus():(E=c.current)==null||E.focus()}};return b.addEventListener("keydown",p),()=>b.removeEventListener("keydown",p)}},[a,y]),g.jsxs(w1,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&g.jsx(rc,{ref:u,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"forwards"});Kl(b)}}),g.jsx(kd.Slot,{scope:n,children:g.jsx(ye.ol,{tabIndex:-1,...o,ref:d})}),v&&g.jsx(rc,{ref:c,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"backwards"});Kl(b)}})]})});qg.displayName=Hg;var Kg="ToastFocusProxy",rc=x.forwardRef((e,t)=>
40{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=qa(Kg,n);return g.jsx(Ha,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});rc.displayName=Kg;var Ka="Toast",N1="toast.swipeStart",O1="toast.swipeMove",A1="toast.swipeCancel",I1="toast.swipeEnd",Qg=x.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,l]=_d({prop:r,defaultProp:s,onChange:o});return g.jsx(Va,{present:n||a,children:g.jsx(D1,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:jt(e.onPause),onResume:jt(e.onResume),onSwipeStart:ne(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ne(e.onSwipeMove,u=>{const{x:c,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ne(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:ne(e.onSwipeEnd,u=>{const{x:c,y:f}=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",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});Qg.displayName=Ka;var[L1,$1]=Wg(Ka,{onClose(){}}),D1=x.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:h,...v}=e,y=qa(Ka,n),[b,p]=x.useState(null),m=Xe(t,A=>p(A)),w=x.useRef(null),_=x.useRef(null),S=s||y.duration,k=x.useRef(0),E=x.useRef(S),T=x.useRef(0),{onToastAdd:I,onToastRemove:O}=y,U=jt(()=>{var K;(b==null?void 0:b.contains(document.activeElement))&&((K=y.viewport)==null||K.focus()),i()}),D=x.useCallback(A=>{!A||A===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(U,A))},[U]);x.useEffect(()=>{const A=y.viewport;if(A){const K=()=>{D(E.current),u==null||u()},F=()=>{const Q=new Date().getTime()-k.current;E.current=E.current-Q,window.clearTimeout(T.current),l==null||l()};return A.addEventListener(tc,F),A.addEventListener(nc,K),()=>{A.removeEventListener(tc,F),A.removeEventListener(nc,K)}}},[y.viewport,S,l,u,D]),x.useEffect(()=>{o&&!y.isClosePausedRef.current&&D(S)},[o,S,y.isClosePausedRef,D]),x.useEffect(()=>(I(),()=>O()),[I,O]);const W=x.useMemo(()=>b?tv(b):null,[b]);return y.viewport?g.jsxs(g.Fragment,{children:[W&&g.jsx(M1,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),g.jsx(L1,{scope:n,onClose:U,children:Ko.createPortal(g.jsx(kd.ItemSlot,{scope:n,children:g.jsx(y1,{asChild:!0,onEscapeKeyDown:ne(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(ye.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":y.swipeDirection,...v,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ne(e.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:ne(e.onPointerDown,A=>{A.button===0&&(w.current={x:A.clientX,y:A.clientY})}),onPointerMove:ne(e.onPointerMove,A=>{if(!w.current)return;const K=A.clientX-w.current.x,F=A.clientY-w.current.y,Q=!!_.current,C=["left","right"].includes(y.swipeDirection),j=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,M=C?j(0,K):0,$=C?0:j(0,F),z=A.pointerType==="touch"?10:2,J={x:M,y:$},fe={originalEvent:A,delta:J};Q?(_.current=J,bi(O1,f,fe,{discrete:!1}
40)):gh(J,y.swipeDirection,z)?(_.current=J,bi(N1,c,fe,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(K)>z||Math.abs(F)>z)&&(w.current=null)}),onPointerUp:ne(e.onPointerUp,A=>{const K=_.current,F=A.target;if(F.hasPointerCapture(A.pointerId)&&F.releasePointerCapture(A.pointerId),_.current=null,w.current=null,K){const Q=A.currentTarget,C={originalEvent:A,delta:K};gh(K,y.swipeDirection,y.swipeThreshold)?bi(I1,h,C,{discrete:!0}):bi(A1,d,C,{discrete:!0}),Q.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),M1=e=>{const{__scopeToast:t,children:n,...r}=e,s=qa(Ka,t),[o,i]=x.useState(!1),[a,l]=x.useState(!1);return z1(()=>i(!0)),x.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:g.jsx(Bg,{asChild:!0,children:g.jsx(Ha,{...r,children:o&&g.jsxs(g.Fragment,{children:[s.label," ",n]})})})},F1="ToastTitle",Gg=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return g.jsx(ye.div,{...r,ref:t})});Gg.displayName=F1;var U1="ToastDescription",Yg=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return g.jsx(ye.div,{...r,ref:t})});Yg.displayName=U1;var Jg="ToastAction",Xg=x.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?g.jsx(ev,{altText:n,asChild:!0,children:g.jsx(Ed,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Jg}\`. Expected non-empty \`string\`.`),null)});Xg.displayName=Jg;var Zg="ToastClose",Ed=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=$1(Zg,n);return g.jsx(ev,{asChild:!0,children:g.jsx(ye.button,{type:"button",...r,ref:t,onClick:ne(e.onClick,s.onClose)})})});Ed.displayName=Zg;var ev=x.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return g.jsx(ye.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function tv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),B1(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...tv(r))}}),t}function bi(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Mg(s,o):s.dispatchEvent(o)}var gh=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function z1(e=()=>{}){const t=jt(e);Qn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function B1(e){return e.nodeType===e.ELEMENT_NODE}function W1(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 Kl(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var V1=Vg,nv=qg,rv=Qg,sv=Gg,ov=Yg,iv=Xg,av=Ed;function lv(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=lv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function uv(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=lv(e))&&(r&&(r+=" "),r+=t);return r}const vh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yh=uv,Cd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return yh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const c=n==null?void 0:n[u],f=o==null?void 0:o[u];if(c===null)return null;const d=vh(c)||vh(f);return s[u][d]}),a=n&&Object.entries(n).reduce((u,c)=>{let[f,d]=c;return d===void 0||(u[f]=d),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:d,...h}=c;return Object.entries(h).every(v=>{let[y,b]=v;return Array.isArray(b)?b.includes({...o,...a}[y]):{...o,...a}[y]===b})?[...u,f,d]:u},[]);return yh(e,i,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 H1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cv=(...e)=>
vendor: 9,146 bytes, lines 45-90
45e.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 q1={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 K1=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>x.createElement("svg",{ref:l,...q1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:cv("lucide",s),...a},[...i.map(([u,c])=>x.createElement(u,c)),...Array.isArray(o)?o:[o]]));/**
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 js=(e,t)=>{const n=x.forwardRef(({className:r,...s},o)=>x.createElement(K1,{ref:o,iconNode:t,className:cv(`lucide-${H1(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 Q1=js("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
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 G1=js("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
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 Y1=js("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
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 J1=js("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
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 X1=js("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
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 Z1=js("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Td="-",eb=e=>{const t=nb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Td);return a[0]===""&&a.length!==1&&a.shift(),dv(a,t)||tb(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},dv=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?dv(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Td);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},wh=/^\[(.+)\]$/,tb=e=>{if(wh.test(e)){const t=wh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},nb=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return sb(Object.entries(e.classGroups),n).forEach(([o,i])=>{sc(i,r,o,t)}),r},sc=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:xh(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(rb(s)){sc(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{sc(i,xh(t,o),n,r)})})},xh=(e,t)=>{let n=e;return t.split(Td).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},rb=e=>e.isThemeGetter,sb=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e,ob=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},fv="!",ib=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,c=0,f;for(let b=0;b<a.length;b++){let p=a[b];if(u===0){if(p===s&&(r||a.slice(b,b+o)===t)){l.push(a.slice(c,b)),c=b+o;continue}if(p==="/"){f=b;continue}}p==="["?u++:p==="]"&&u--}const d=l.length===0?a:a.substring(c),h=d.startsWith(fv),v=h?d.substring(1):d,y=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:i}):i},ab=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},lb=e=>({cache:ob(e.cacheSize),parseClassName:ib(e),...eb(e)}),ub=/\s+/,cb=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(ub);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=n(u);let v=!!h,y=r(v?d.substring(0,h):d);if(!y){if(!v){a=u+(a.length>0?" "+a:a);continue}if(y=r(d),!y){a=u+(a.length>0?" "+a:a);continue}v=!1}const b=ab(c).join(":"),p=f?b+fv:b,m=p+y;if(o.includes(m))continue;o.push(m);const w=s(y,v);for(let _=0;_<w.length;++_){const S=w[_];o.push(p+S)}a=u+(a.length>0?" "+a:a)}return a};function db(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=hv(t))&&(r&&(r+=" "),r+=n);return r}const hv=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hv(e[r]))&&(n&&(n+=" "),n+=t);return n};function fb(e,...t){let n,r,s,o=i;function i(l){const u=t.reduce((c,f)=>f(c),e());return n=lb(u),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=cb(l,n);return s(l,c),c}return function(){return o(db.apply(null,arguments))}}const le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},pv=/^\[(?:([a-z-]+):)?(.+)\]$/i,hb=/^\d+\/\d+$/,pb=new Set(["px","full","screen"]),mb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gb=/\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$/,vb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qt=e=>os(e)||pb.has(e)||hb.test(e),wn=e=>Ns(e,"length",Tb),os=e=>!!e&&!Number.isNaN(Number(e)),Ql=e=>Ns(e,"number",os),Ks=e=>!!e&&Number.isInteger(Number(e)),xb=e=>e.endsWith("%")&&os(e.slice(0,-1)),H=e=>pv.test(e),xn=e=>mb.test(e),bb=new Set(["length","size","percentage"]),_b=e=>Ns(e,bb,mv),Sb=e=>Ns(e,"position",mv),kb=new Set(["image","url"]),Eb=e=>Ns(e,kb,Rb),Cb=e=>Ns(e,"",Pb),Qs=()=>!0,Ns=(e,t,n)=>{const r=pv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Tb=e=>gb.test(e)&&!vb.test(e),mv=()=>!1,Pb=e=>yb.test(e),Rb=e=>wb.test(e),jb=()=>{const e=le("colors"),t=le("spacing"),n=le("blur"),r=le("brightness"),s=le("borderColor"),o=le("borderRadius"),i=le("borderSpacing"),a=le("borderWidth"),l=le("contrast"),u=le("grayscale"),c=le("hueRotate"),f=le("invert"),d=le("gap"),h=le("gradientColorStops"),v=le("gradientColorStopPositions"),y=le("inset"),b=le("margin"),p=le("opacity"),m=le("padding"),w=le("saturate"),_=le("scale"),S=le("sepia"),k=le("skew"),E=le("space"),T=le("translate"),I=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",H,t],D=()=>[H,t],W=()=>["",qt,wn],A=()=>["auto",os,H],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["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"],C=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",H],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[os,H];return{cacheSize:500,separator:":",theme:{colors:[Qs],spacing:[qt,wn],blur:["none","",xn,H],brightness:$(),borderColor:[e],borderRadius:["n
90one","","full",xn,H],borderSpacing:D(),borderWidth:W(),contrast:$(),grayscale:j(),hueRotate:$(),invert:j(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[xb,wn],inset:U(),margin:U(),opacity:$(),padding:D(),saturate:$(),scale:$(),sepia:j(),skew:$(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[xn]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),H]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],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",Ks,H]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",H]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Ks,H]}],"grid-cols":[{"grid-cols":[Qs]}],"col-start-end":[{col:["auto",{span:["full",Ks,H]},H]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Qs]}],"row-start-end":[{row:["auto",{span:[Ks,H]},H]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",H]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",H]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"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:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"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",H,t]}],"min-w":[{"min-w":[H,t,"min","max","fit"]}],"max-w":[{"max-w":[H,t,"none","full","min","max","fit","prose",{screen:[xn]},xn]}],h:[{h:[H,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[H,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xn,wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ql]}],"font-family":[{font:[Qs]}],"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",H]}],"line-clamp":[{"line-clamp":["none",os,Ql]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qt,H]}],"list-image":[{"list-image":["none",H]}],"list-style-type":[{list:["none","disc","decimal",H]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qt,wn]}],"underline-offset":[{"underline-offset":["auto",qt,H]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H]}],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",H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),Sb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_b]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Eb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
vendor: 5,172 bytes, line 90
90],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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":[p]}],"border-style":[{border:[...F(),"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":[p]}],"divide-style":[{divide:F()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[qt,H]}],"outline-w":[{outline:[qt,wn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[qt,wn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xn,Cb]}],"shadow-color":[{shadow:[Qs]}],opacity:[{opacity:[p]}],"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",xn,H]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],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":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",H]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",H]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Ks,H]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"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",H]}],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",H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,646 bytes, line 90
90],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",H]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qt,wn,Ql]}],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-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Nb=fb(jb);function re(...e){return Nb(uv(e))}const Ob=V1,gv=x.forwardRef(({className:e,...t},n)=>g.jsx(nv,{ref:n,className:re("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}));gv.displayName=nv.displayName;const Ab=Cd("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"}}),vv=x.forwardRef(({className:e,variant:t,...n},r)=>g.jsx(rv,{ref:r,className:re(Ab({variant:t}),e),...n}));vv.displayName=rv.displayName;const Ib=x.forwardRef(({className:e,...t},n)=>g.jsx(iv,{ref:n,className:re("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}));Ib.displayName=iv.displayName;const yv=x.forwardRef(({className:e,...t},n)=>g.jsx(av,{ref:n,className:re("absolute right-2 top-2 rounded-md p-1 text-foreground
90/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:g.jsx(Z1,{className:"h-4 w-4"})}));yv.displayName=av.displayName;const wv=x.forwardRef(({className:e,...t},n)=>g.jsx(sv,{ref:n,className:re("text-sm font-semibold",e),...t}));wv.displayName=sv.displayName;const xv=x.forwardRef(({className:e,...t},n)=>g.jsx(ov,{ref:n,className:re("text-sm opacity-90",e),...t}));xv.displayName=ov.displayName;function Lb(){const{toasts:e}=n1();return g.jsxs(Ob,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return g.jsxs(vv,{...o,children:[g.jsxs("div",{className:"grid gap-1",children:[n&&g.jsx(wv,{children:n}),r&&g.jsx(xv,{children:r})]}),s,g.jsx(yv,{})]},t)}),g.jsx(gv,{})]})}var bh=["light","dark"],$b="(prefers-color-scheme: dark)",Db=x.createContext(void 0),Mb={setTheme:e=>{},themes:[]},Fb=()=>{var e;return(e=x.useContext(Db))!=null?e:Mb};x.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let u=o==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;
90${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=s?bh.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",d=(v,y=!1,b=!0)=>{let p=i?i[v]:v,m=y?v+"|| ''":`'${p}'`,w="";return s&&b&&!y&&bh.includes(v)&&(w+=`d.style.colorScheme = '${v}';`),n==="class"?y||p?w+=`c.add(${m})`:w+="null":p&&(w+=`d[s](n,${m})`),w},h=e?`!function(){${c}${d(e)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${$b}',m=window.matchMedia(t);if(m.media!==t||m.matches){${d("dark")}}else{${d("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${d(i?"x[e]":"e",!0)}}${u?"":"else{"+d(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${d(i?"x[e]":"e",!0)}}else{${d(o,!1,!1)};}${f}}catch(t){}}();`;return x.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var Ub=e=>{switch(e){case"success":return Wb;case"info":return Hb;case"warning":return Vb;case"error":return qb;default:return null}},zb=Array(12).fill(0),Bb=({visible:e})=>N.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},N.createElement("div",{className:"sonner-spinner"},zb.map((t,n)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Wb=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),Vb=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.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"})),Hb=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),qb=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),Kb=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},oc=1,Qb=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:oc++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,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)=>
90this.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 o=>{if(Yb(o)&&!o.ok){s=!1;let i=typeof t.error=="function"?await t.error(`HTTP error! status: ${o.status}`):t.error,a=typeof t.description=="function"?await t.description(`HTTP error! status: ${o.status}`):t.description;this.create({id:n,type:"error",message:i,description:a})}else if(t.success!==void 0){s=!1;let i=typeof t.success=="function"?await t.success(o):t.success,a=typeof t.description=="function"?await t.description(o):t.description;this.create({id:n,type:"success",message:i,description:a})}}).catch(async o=>{if(t.error!==void 0){s=!1;let i=typeof t.error=="function"?await t.error(o):t.error,a=typeof t.description=="function"?await t.description(o):t.description;this.create({id:n,type:"error",message:i,description:a})}}).finally(()=>{var o;s&&(this.dismiss(n),n=void 0),(o=t.finally)==null||o.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||oc++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},tt=new Qb,Gb=(e,t)=>{let n=(t==null?void 0:t.id)||oc++;return tt.addToast({title:e,...t,id:n}),n},Yb=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Jb=Gb,Xb=()=>tt.toasts,$e=Object.assign(Jb,{success:tt.success,info:tt.info,warning:tt.warning,error:tt.error,custom:tt.custom,message:tt.message,promise:tt.promise,dismiss:tt.dismiss,loading:tt.loading},{getHistory:Xb});function Zb(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))}Zb(`: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;
90left: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}
90: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%)}
91`);function _i(e){return e.label!==void 0}
91var e_=3,t_="32px",n_=4e3,r_=356,s_=14,o_=20,i_=200;function a_(...e){return e.filter(Boolean).join(" ")}var l_=e=>{var t,n,r,s,o,i,a,l,u,c;let{invert:f,toast:d,unstyled:h,interacting:v,setHeights:y,visibleToasts:b,heights:p,index:m,toasts:w,expanded:_,removeToast:S,defaultRichColors:k,closeButton:E,style:T,cancelButtonStyle:I,actionButtonStyle:O,className:U="",descriptionClassName:D="",duration:W,position:A,gap:K,loadingIcon:F,expandByDefault:Q,classNames:C,icons:j,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:$,cn:z}=e,[J,fe]=N.useState(!1),[Ze,ee]=N.useState(!1),[yt,hn]=N.useState(!1),[pn,mn]=N.useState(!1),[Xo,Pr]=N.useState(0),[rr,Ms]=N.useState(0),Zo=N.useRef(null),gn=N.useRef(null),pl=m===0,ml=m+1<=b,Te=d.type,Rr=d.dismissible!==!1,v0=d.className||"",y0=d.descriptionClassName||"",ei=N.useMemo(()=>p.findIndex(V=>V.toastId===d.id)||0,[p,d.id]),w0=N.useMemo(()=>{var V;return(V=d.closeButton)!=null?V:E},[d.closeButton,E]),Jd=N.useMemo(()=>d.duration||W||n_,[d.duration,W]),gl=N.useRef(0),jr=N.useRef(0),Xd=N.useRef(0),Nr=N.useRef(null),[Zd,x0]=A.split("-"),ef=N.useMemo(()=>p.reduce((V,ae,se)=>se>=ei?V:V+ae.height,0),[p,ei]),tf=Kb(),b0=d.invert||f,vl=Te==="loading";jr.current=N.useMemo(()=>ei*K+ef,[ei,ef]),N.useEffect(()=>{fe(!0)},[]),N.useLayoutEffect(()=>{if(!J)return;let V=gn.current,ae=V.style.height;V.style.height="auto";let se=V.getBoundingClientRect().height;V.style.height=ae,Ms(se),y(At=>At.find(It=>It.toastId===d.id)?At.map(It=>It.toastId===d.id?{...It,height:se}:It):[{toastId:d.id,height:se,position:d.position},...At])},[J,d.title,d.description,y,d.id]);let vn=N.useCallback(()=>{ee(!0),Pr(jr.current),y(V=>V.filter(ae=>ae.toastId!==d.id)),setTimeout(()=>{S(d)},i_)},[d,S,y,jr]);N.useEffect(()=>{if(d.promise&&Te==="loading"||d.duration===1/0||d.type==="loading")return;let V,ae=Jd;return _||v||$&&tf?(()=>{if(Xd.current<gl.current){let se=new Date().getTime()-gl.current;ae=ae-se}Xd.current=new Date().getTime()})():ae!==1/0&&(gl.current=new Date().getTime(),V=setTimeout(()=>{var se;(se=d.onAutoClose)==null||se.call(d,d),vn()},ae)),()=>clearTimeout(V)},[_,v,Q,d,Jd,vn,d.promise,Te,$,tf]),N.useEffect(()=>{let V=gn.current;if(V){let ae=V.getBoundingClientRect().height;return Ms(ae),y(se=>[{toastId:d.id,height:ae,position:d.position},...se]),()=>y(se=>se.filter(At=>At.toastId!==d.id))}},[y,d.id]),N.useEffect(()=>{d.delete&&vn()},[vn,d.delete]);function _0(){return j!=null&&j.loading?N.createElement("div",{className:"sonner-loader","data-visible":Te==="loading"},j.loading):F?N.createElement("div",{className:"sonner-loader","data-visible":Te==="loading"},F):N.createElement(Bb,{visible:Te==="loading"})}return N.createElement("li",{"aria-live":d.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:gn,className:z(U,v0,C==null?void 0:C.toast,(t=d==null?void 0:d.classNames)==null?void 0:t.toast,C==null?void 0:C.default,C==null?void 0:C[Te],(n=d==null?void 0:d.classNames)==null?void 0:n[Te]),"data-sonner-toast":"","data-rich-colors":(r=d.richColors)!=null?r:k,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":J,"data-promise":!!d.promise,"data-removed":Ze,"data-visible":ml,"data-y-position":Zd,"data-x-position":x0,"data-index":m,"data-front":pl,"data-swiping":yt,"data-dismissible":Rr,"data-type":Te,"data-invert":b0,"data-swipe-out":pn,"data-expanded":!!(_||Q&&J),style:{"--index":m,"--toasts-before":m,"--z-index":w.length-m,"--offset":`${Ze?Xo:jr.current}px`,"--initial-height":Q?"auto":`${rr}px`,...T,...d.style},onPointerDown:V=>{vl||!Rr||(Zo.current=new Date,Pr(jr.current),V.target.setPointerCapture(V.pointerId),V.target.tagName!=="BUTTON"&&(hn(!0),Nr.current={x:V.clientX,y:V.clientY}))},onPointerUp:()=>{var V,ae,se,At;if(pn||!Rr)return;Nr.current=null;let It=Number(((V=gn.current)==null?void 0:V.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ti=new Date().getTime()-((ae=Zo.current)==null?void 0:ae.getTime()),S0=Math.abs(It)/ti;if(Math.abs(It)>=o_||S0>.11){Pr(jr.current),(se=d.onDismiss)==null||se.call(d,d),vn(),mn(!0);return}(At=gn.current)==null||At.style.setProperty("--swipe-amount","0px"),hn(!1)},onPointerMove:V=>{var ae;if(!Nr.current||!Rr)return;let se=V.clientY-Nr.current.y,At=V.clientX-Nr.current.x,It=(Zd==="top"?Math.min:Math.max)(0,se),ti=V.pointerType==="touch"?10:2;Math.abs(It)>ti?(ae=gn.current)==null||ae.style.setProperty("--swipe-amount",`${se}px`):Math.abs(At)>ti&&(Nr.current=null)}},w0&&!d.jsx?N.createElement("button",{"aria-label":M,"data-disabled":vl,"data-close-button":!0,onClick:vl||!Rr?()=>{}:()=>{var V;vn(),(V=d.onDismiss)==null||V.call(d,d)},className:z(C==null?void 0:C.closeButton,(s=d==null?void 0:d.classNames)==null?void 0:s.closeButton)},N.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"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,d.jsx||N.isValidElement(d.title)?d.jsx||d.title:N.createElement(N.Fragment,null,Te||d.icon||d.promise?N.createElement("div",{"data-icon":"",className:z(C==null?void 0:C.icon,(o=d==null?void 0:d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||_0():null,d.type!=="loading"?d.icon||(j==null?void 0:j[Te])||Ub(Te):null):null,N.createElement("div",{"data-content":"",className:z(C==null?void 0:C.content,(i=d==null?void 0:d.classNames)==null?void 0:i.content)},N.createElement("div",{"data-title":"",className:z(C==null?void 0:C.title,(a=d==null?void 0:d.classNames)==null?void 0:a.title)},d.title),d.description?N.createElement("div",{"data-description":"",className:z(D,y0,C==null?void 0:C.description,(l=d==null?void 0:d.classNames)==null?void 0:l.description)},d.description):null),N.isValidElement(d.cancel)?d.cancel:d.cancel&&_i(d.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||I,onClick:V=>{var ae,se;_i(d.cancel)&&Rr&&((se=(ae=d.cancel).onClick)==null||se.call(ae,V),vn())},className:z(C==null?void 0:C.cancelButton,(u=d==null?void 0:d.classNames)==null?void 0:u.cancelButton)},d.cancel.label):null,N.isValidElement(d.action)?d.action:d.action&&_i(d.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||O,onClick:V=>{var ae,se;_i(d.action)&&(V.defaultPrevented||((se=(ae=d.action).onClick)==null||se.call(ae,V),vn()))},className:z(C==null?void 0:C.actionButton,(c=d==null?void 0:d.classNames)==null?void 0:c.actionButton)},d.action.label):null))};function _h(){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 u_=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:o,className:i,offset:a,theme:l="light",richColors:u,duration:c,style:f,visibleToasts:d=e_,toastOptions:h,dir:v=_h(),gap:y=s_,loadingIcon:b,icons:p,containerAriaLabel:m="Notifications",pauseWhenPageIsHidden:w,cn:_=a_}=e,[S,k]=N.useState([]),E=N.useMemo(()=>Array.from(new Set([n].concat(S.filter($=>$.position).map($=>$.position)))),[S,n]),[T,I]=N.useState([]),[O,U]=N.useState(!1),[D,W]=N.useState(!1),[A,K]=N.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
91k":"light"),F=N.useRef(null),Q=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=N.useRef(null),j=N.useRef(!1),M=N.useCallback($=>{var z;(z=S.find(J=>J.id===$.id))!=null&&z.delete||tt.dismiss($.id),k(J=>J.filter(({id:fe})=>fe!==$.id))},[S]);return N.useEffect(()=>tt.subscribe($=>{if($.dismiss){k(z=>z.map(J=>J.id===$.id?{...J,delete:!0}:J));return}setTimeout(()=>{Ag.flushSync(()=>{k(z=>{let J=z.findIndex(fe=>fe.id===$.id);return J!==-1?[...z.slice(0,J),{...z[J],...$},...z.slice(J+1)]:[$,...z]})})})}),[]),N.useEffect(()=>{if(l!=="system"){K(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:$})=>{K($?"dark":"light")})},[l]),N.useEffect(()=>{S.length<=1&&U(!1)},[S]),N.useEffect(()=>{let $=z=>{var J,fe;r.every(Ze=>z[Ze]||z.code===Ze)&&(U(!0),(J=F.current)==null||J.focus()),z.code==="Escape"&&(document.activeElement===F.current||(fe=F.current)!=null&&fe.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[r]),N.useEffect(()=>{if(F.current)return()=>{C.current&&(C.current.focus({preventScroll:!0}),C.current=null,j.current=!1)}},[F.current]),S.length?N.createElement("section",{"aria-label":`${m} ${Q}`,tabIndex:-1},E.map(($,z)=>{var J;let[fe,Ze]=$.split("-");return N.createElement("ol",{key:$,dir:v==="auto"?_h():v,tabIndex:-1,ref:F,className:i,"data-sonner-toaster":!0,"data-theme":A,"data-y-position":fe,"data-x-position":Ze,style:{"--front-toast-height":`${((J=T[0])==null?void 0:J.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||t_,"--width":`${r_}px`,"--gap":`${y}px`,...f},onBlur:ee=>{j.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(j.current=!1,C.current&&(C.current.focus({preventScroll:!0}),C.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||j.current||(j.current=!0,C.current=ee.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{D||U(!1)},onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},S.filter(ee=>!ee.position&&z===0||ee.position===$).map((ee,yt)=>{var hn,pn;return N.createElement(l_,{key:ee.id,icons:p,index:yt,toast:ee,defaultRichColors:u,duration:(hn=h==null?void 0:h.duration)!=null?hn:c,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:t,visibleToasts:d,closeButton:(pn=h==null?void 0:h.closeButton)!=null?pn:o,interacting:D,position:$,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:M,toasts:S.filter(mn=>mn.position==ee.position),heights:T.filter(mn=>mn.position==ee.position),setHeights:I,expandByDefault:s,gap:y,loadingIcon:b,expanded:O,pauseWhenPageIsHidden:w,cn:_})}))})):null};const c_=({...e})=>{const{theme:t="system"}=Fb();return g.jsx(u_,{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})};var d_=jp.useId||(()=>{}),f_=0;function h_(e){const[t,n]=x.useState(d_());return Qn(()=>{n(r=>r??String(f_++))},[e]),t?`radix-${t}`:""}const p_=["top","right","bottom","left"],Gn=Math.min,rt=Math.max,va=Math.round,Si=Math.floor,Yn=e=>({x:e,y:e}),m_={left:"right",right:"left",bottom:"top",top:"bottom"},g_={start:"end",end:"start"};function ic(e,t,n){return rt(e,Gn(t,n))}function cn(e,t){return typeof e=="function"?e(t):e}function dn(e){return e.split("-")[0]}function Os(e){return e.split("-")[1]}function Pd(e){return e==="x"?"y":"x"}function Rd(e){return e==="y"?"height":"width"}function Jn(e){return["top","bottom"].includes(dn(e))?"y":"x"}
vendor: 5,016 bytes, line 91
91function jd(e){return Pd(Jn(e))}function v_(e,t,n){n===void 0&&(n=!1);const r=Os(e),s=jd(e),o=Rd(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ya(i)),[i,ya(i)]}function y_(e){const t=ya(e);return[ac(e),t,ac(t)]}function ac(e){return e.replace(/start|end/g,t=>g_[t])}function w_(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function x_(e,t,n,r){const s=Os(e);let o=w_(dn(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(ac)))),o}function ya(e){return e.replace(/left|right|bottom|top/g,t=>m_[t])}function b_(e){return{top:0,right:0,bottom:0,left:0,...e}}function bv(e){return typeof e!="number"?b_(e):{top:e,right:e,bottom:e,left:e}}function wa(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 Sh(e,t,n){let{reference:r,floating:s}=e;const o=Jn(t),i=jd(t),a=Rd(i),l=dn(t),u=o==="y",c=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,d=r[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-s.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-s.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Os(t)){case"start":h[i]-=d*(n&&u?-1:1);break;case"end":h[i]+=d*(n&&u?-1:1);break}return h}const __=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:f}=Sh(u,r,l),d=r,h={},v=0;for(let y=0;y<a.length;y++){const{name:b,fn:p}=a[y],{x:m,y:w,data:_,reset:S}=await p({x:c,y:f,initialPlacement:r,placement:d,strategy:s,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});c=m??c,f=w??f,h={...h,[b]:{...h[b],..._}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:c,y:f}=Sh(u,d,l)),y=-1)}return{x:c,y:f,placement:d,strategy:s,middlewareData:h}};async function Ao(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=cn(t,e),v=bv(h),b=a[d?f==="floating"?"reference":"floating":f],p=wa(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),m=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=wa(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:l}):m);return{top:(p.top-S.top+v.top)/_.y,bottom:(S.bottom-p.bottom+v.bottom)/_.y,left:(p.left-S.left+v.left)/_.x,right:(S.right-p.right+v.right)/_.x}}const S_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=cn(e,t)||{};if(u==null)return{};const f=bv(c),d={x:n,y:r},h=jd(s),v=Rd(h),y=await i.getDimensions(u),b=h==="y",p=b?"top":"left",m=b?"bottom":"right",w=b?"clientHeight":"clientWidth",_=o.reference[v]+o.reference[h]-d[h]-o.floating[v],S=d[h]-o.reference[h],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=k?k[w]:0;(!E||!await(i.isElement==null?void 0:i.isElement(k)))&&(E=a.floating[w]||o.floating[v]);const T=_/2-S/2,I=E/2-y[v]/2-1,O=Gn(f[p],I),U=Gn(f[m],I),D=O,W=E-y[v]-U,A=E/2-y[v]/2+T,K=ic(D,A,W),F=!l.arrow&&Os(s)!=null&&A!==K&&o.reference[v]/2-(A<D?O:U)-y[v]/2<0,Q=F?A<D?A-D:A-W:0;return{[h]:d[h]+Q,data:{[h]:K,centerOffset:A-K-Q,...F&&{alignmentOffset:Q}},reset:F}}}),k_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...b}=cn(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const p=dn(s),m=Jn(a),w=dn(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=d||(w||!y?[ya(a)]:y_(a)),k=v!=="none";!d&&k&&S.push(...x_(a,y,v,_));const E=[a,...S],T=await Ao(t,b),I=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&I.push(T[p]),f){const A=v_(s,i,_);I.push(T[A[0]],T[A[1]])}if(O=[...O,{placement:s,overflows:I}],!I.every(A=>A<=0)){var U,D;const A=(((U=o.flip)==null?void 0:U.index)||0)+1,K=E[A];if(K)return{data:{index:A,overflows:O},reset:{placement:K}
vendor: 4,781 bytes, line 91
91};let F=(D=O.filter(Q=>Q.overflows[0]<=0).sort((Q,C)=>Q.overflows[1]-C.overflows[1])[0])==null?void 0:D.placement;if(!F)switch(h){case"bestFit":{var W;const Q=(W=O.filter(C=>{if(k){const j=Jn(C.placement);return j===m||j==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(j=>j>0).reduce((j,M)=>j+M,0)]).sort((C,j)=>C[1]-j[1])[0])==null?void 0:W[0];Q&&(F=Q);break}case"initialPlacement":F=a;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function kh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Eh(e){return p_.some(t=>e[t]>=0)}const E_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=cn(e,t);switch(r){case"referenceHidden":{const o=await Ao(t,{...s,elementContext:"reference"}),i=kh(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Eh(i)}}}case"escaped":{const o=await Ao(t,{...s,altBoundary:!0}),i=kh(o,n.floating);return{data:{escapedOffsets:i,escaped:Eh(i)}}}default:return{}}}}};async function C_(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=dn(n),a=Os(n),l=Jn(n)==="y",u=["left","top"].includes(i)?-1:1,c=o&&l?-1:1,f=cn(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*c,y:d*u}:{x:d*u,y:h*c}}const T_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await C_(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},P_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x:p,y:m}=b;return{x:p,y:m}}},...l}=cn(e,t),u={x:n,y:r},c=await Ao(t,l),f=Jn(dn(s)),d=Pd(f);let h=u[d],v=u[f];if(o){const b=d==="y"?"top":"left",p=d==="y"?"bottom":"right",m=h+c[b],w=h-c[p];h=ic(m,h,w)}if(i){const b=f==="y"?"top":"left",p=f==="y"?"bottom":"right",m=v+c[b],w=v-c[p];v=ic(m,v,w)}const y=a.fn({...t,[d]:h,[f]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[d]:o,[f]:i}}}}}},R_=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=cn(e,t),c={x:n,y:r},f=Jn(s),d=Pd(f);let h=c[d],v=c[f];const y=cn(a,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",_=o.reference[d]-o.floating[w]+b.mainAxis,S=o.reference[d]+o.reference[w]-b.mainAxis;h<_?h=_:h>S&&(h=S)}if(u){var p,m;const w=d==="y"?"width":"height",_=["top","left"].includes(dn(s)),S=o.reference[f]-o.floating[w]+(_&&((p=i.offset)==null?void 0:p[f])||0)+(_?0:b.crossAxis),k=o.reference[f]+o.reference[w]+(_?0:((m=i.offset)==null?void 0:m[f])||0)-(_?b.crossAxis:0);v<S?v=S:v>k&&(v=k)}return{[d]:h,[f]:v}}}},j_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:l=()=>{},...u}=cn(e,t),c=await Ao(t,u),f=dn(s),d=Os(s),h=Jn(s)==="y",{width:v,height:y}=o.floating;let b,p;f==="top"||f==="bottom"?(b=f,p=d===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(p=f,b=d==="end"?"top":"bottom");const m=y-c.top-c.bottom,w=v-c.left-c.right,_=Gn(y-c[b],m),S=Gn(v-c[p],w),k=!t.middlewareData.shift;let E=_,T=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=m),k&&!d){const O=rt(c.left,0),U=rt(c.right,0),D=rt(c.top,0),W=rt(c.bottom,0);h?T=v-2*(O!==0||U!==0?O+U:rt(c.left,c.right)):E=y-2*(D!==0||W!==0?D+W:rt(c.top,c.bottom))}await l({...t,availableWidth:T,availableHeight:E});const I=await i.getDimensions(a.floating);return v!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function Qa(){return typeof window<"u"}function As(e){return _v(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ht(e){var t;return(t=(_v(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _v(e){return Qa()?e instanceof Node||e instanceof it(e).Node:!1}function Nt(e){return Qa()?e instanceof Element||e instanceof it(e).Element:!1}function Vt(e){return Qa()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function Ch(e){return!Qa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof it(e).ShadowRoot}function Qo(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ot(e);
vendor: 1,939 bytes, line 91
91return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function N_(e){return["table","td","th"].includes(As(e))}function Ga(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Nd(e){const t=Od(),n=Nt(e)?Ot(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 O_(e){let t=Xn(e);for(;Vt(t)&&!ks(t);){if(Nd(t))return t;if(Ga(t))return null;t=Xn(t)}return null}function Od(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ks(e){return["html","body","#document"].includes(As(e))}function Ot(e){return it(e).getComputedStyle(e)}function Ya(e){return Nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xn(e){if(As(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ch(e)&&e.host||Ht(e);return Ch(t)?t.host:t}function Sv(e){const t=Xn(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vt(t)&&Qo(t)?t:Sv(t)}function Io(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Sv(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=it(s);if(o){const a=lc(i);return t.concat(i,i.visualViewport||[],Qo(s)?s:[],a&&n?Io(a):[])}return t.concat(s,Io(s,[],n))}function lc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kv(e){const t=Ot(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Vt(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=va(n)!==o||va(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function Ad(e){return Nt(e)?e:e.contextElement}function is(e){const t=Ad(e);if(!Vt(t))return Yn(1);
vendor: 5,709 bytes, line 91
91const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=kv(t);let i=(o?va(n.width):n.width)/r,a=(o?va(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const A_=Yn(0);function Ev(e){const t=it(e);return!Od()||!t.visualViewport?A_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==it(e)?!1:t}function kr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Ad(e);let i=Yn(1);t&&(r?Nt(r)&&(i=is(r)):i=is(e));const a=I_(o,n,r)?Ev(o):Yn(0);let l=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,c=s.width/i.x,f=s.height/i.y;if(o){const d=it(o),h=r&&Nt(r)?it(r):r;let v=d,y=lc(v);for(;y&&r&&h!==v;){const b=is(y),p=y.getBoundingClientRect(),m=Ot(y),w=p.left+(y.clientLeft+parseFloat(m.paddingLeft))*b.x,_=p.top+(y.clientTop+parseFloat(m.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,f*=b.y,l+=w,u+=_,v=it(y),y=lc(v)}}return wa({width:c,height:f,x:l,y:u})}function L_(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Ht(r),a=t?Ga(t.floating):!1;if(r===i||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Yn(1);const c=Yn(0),f=Vt(r);if((f||!f&&!o)&&((As(r)!=="body"||Qo(i))&&(l=Ya(r)),Vt(r))){const d=kr(r);u=is(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function $_(e){return Array.from(e.getClientRects())}function uc(e,t){const n=Ya(e).scrollLeft;return t?t.left+n:kr(Ht(e)).left+n}function D_(e){const t=Ht(e),n=Ya(e),r=e.ownerDocument.body,s=rt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=rt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+uc(e);const a=-n.scrollTop;return Ot(r).direction==="rtl"&&(i+=rt(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function M_(e,t){const n=it(e),r=Ht(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=Od();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function F_(e,t){const n=kr(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Vt(e)?is(e):Yn(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,u=r*o.y;return{width:i,height:a,x:l,y:u}}function Th(e,t,n){let r;if(t==="viewport")r=M_(e,n);else if(t==="document")r=D_(Ht(e));else if(Nt(t))r=F_(t,n);else{const s=Ev(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return wa(r)}function Cv(e,t){const n=Xn(e);return n===t||!Nt(n)||ks(n)?!1:Ot(n).position==="fixed"||Cv(n,t)}function U_(e,t){const n=t.get(e);if(n)return n;let r=Io(e,[],!1).filter(a=>Nt(a)&&As(a)!=="body"),s=null;const o=Ot(e).position==="fixed";let i=o?Xn(e):e;for(;Nt(i)&&!ks(i);){const a=Ot(i),l=Nd(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Qo(i)&&!l&&Cv(e,i))?r=r.filter(c=>c!==i):s=a,i=Xn(i)}return t.set(e,r),r}function z_(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Ga(t)?[]:U_(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,c)=>{const f=Th(t,c,s);return u.top=rt(f.top,u.top),u.right=Gn(f.right,u.right),u.bottom=Gn(f.bottom,u.bottom),u.left=rt(f.left,u.left),u},Th(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function B_(e){const{width:t,height:n}=kv(e);return{width:t,height:n}}function W_(e,t,n){const r=Vt(t),s=Ht(t),o=n==="fixed",i=kr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Yn(0);if(r||!r&&!o)if((As(t)!=="body"||Qo(s))&&(a=Ya(t)),r){const h=kr(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&(l.x=uc(s));let u=0,c=0;if(s&&!r&&!o){const h=s.getBoundingClientRect();c=h.top+a.scrollTop,u=h.left+a.scrollLeft-uc(s,h)}const f=i.left+a.scrollLeft-l.x-u,d=i.top+a.scrollTop-l.y-c;return{x:f,y:d,width:i.width,height:i.height}}function Gl(e){return Ot(e).position==="static"}function Ph(e,t){if(!Vt(e)||Ot(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ht(e)===n&&(n=n.ownerDocument.body),n}function Tv(e,t){const n=it(e);if(Ga(e))return n;if(!Vt(e)){let s=Xn(e);for(;s&&!ks(s);){if(Nt(s)&&!Gl(s))return s;s=Xn(s)}return n}let r=Ph(e,t);for(;r&&N_(r)&&Gl(r);)r=Ph(r,t);return r&&ks(r)&&Gl(r)&&!Nd(r)?n:r||O_(e)||n}const V_=async function(e){const t=this.getOffsetParent||Tv,n=this.getDimensions,r=await n(e.floating);return{reference:W_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function H_(e){return Ot(e).direction==="rtl"}const q_={convertOffsetParentRelativeRectToViewportRelativeRect:L_,getDocumentElement:Ht,getClippingRect:z_,getOffsetParent:Tv,getElementRects:V_,getClientRects:$_,getDimensions:B_,getScale:is,isElement:Nt,isRTL:H_};function K_(e,t){let n=null,r;const s=Ht(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:u,top:c,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const h=Si(c),v=Si(s.clientWidth-(u+f)),y=Si(s.clientHeight-(c+d)),b=Si(u),m={rootMargin:-h+"px "+-v+"px "+-y+"px "+-b+"px",threshold:rt(0,Gn(1,l))||1};let w=!0;function _(S){const k=S[0].intersectionRatio;if(k!==l){if(!w)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(_,{...m,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,m)}n.observe(e)}return i(!0),o}function Q_(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ad(e),c=s||o?[...u?Io(u):[],...Io(t)]:[];
vendor: 10,354 bytes, line 91
91c.forEach(p=>{s&&p.addEventListener("scroll",n,{passive:!0}),o&&p.addEventListener("resize",n)});const f=u&&a?K_(u,n):null;let d=-1,h=null;i&&(h=new ResizeObserver(p=>{let[m]=p;m&&m.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let v,y=l?kr(e):null;l&&b();function b(){const p=kr(e);y&&(p.x!==y.x||p.y!==y.y||p.width!==y.width||p.height!==y.height)&&n(),y=p,v=requestAnimationFrame(b)}return n(),()=>{var p;c.forEach(m=>{s&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),f==null||f(),(p=h)==null||p.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const G_=T_,Y_=P_,J_=k_,X_=j_,Z_=E_,Rh=S_,eS=R_,tS=(e,t,n)=>{const r=new Map,s={platform:q_,...n},o={...s.platform,_c:r};return __(e,t,{...s,platform:o})};var Vi=typeof document<"u"?x.useLayoutEffect:x.useEffect;function xa(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(!xa(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 o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!xa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Pv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jh(e,t){const n=Pv(e);return Math.round(t*n)/n}function Yl(e){const t=x.useRef(e);return Vi(()=>{t.current=e}),t}function nS(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=x.useState(r);xa(d,r)||h(r);const[v,y]=x.useState(null),[b,p]=x.useState(null),m=x.useCallback(C=>{C!==k.current&&(k.current=C,y(C))},[]),w=x.useCallback(C=>{C!==E.current&&(E.current=C,p(C))},[]),_=o||v,S=i||b,k=x.useRef(null),E=x.useRef(null),T=x.useRef(c),I=l!=null,O=Yl(l),U=Yl(s),D=Yl(u),W=x.useCallback(()=>{if(!k.current||!E.current)return;const C={placement:t,strategy:n,middleware:d};U.current&&(C.platform=U.current),tS(k.current,E.current,C).then(j=>{const M={...j,isPositioned:D.current!==!1};A.current&&!xa(T.current,M)&&(T.current=M,Ko.flushSync(()=>{f(M)}))})},[d,t,n,U,D]);Vi(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[u]);const A=x.useRef(!1);Vi(()=>(A.current=!0,()=>{A.current=!1}),[]),Vi(()=>{if(_&&(k.current=_),S&&(E.current=S),_&&S){if(O.current)return O.current(_,S,W);W()}},[_,S,W,O,I]);const K=x.useMemo(()=>({reference:k,floating:E,setReference:m,setFloating:w}),[m,w]),F=x.useMemo(()=>({reference:_,floating:S}),[_,S]),Q=x.useMemo(()=>{const C={position:n,left:0,top:0};if(!F.floating)return C;const j=jh(F.floating,c.x),M=jh(F.floating,c.y);return a?{...C,transform:"translate("+j+"px, "+M+"px)",...Pv(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:M}},[n,a,F.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:W,refs:K,elements:F,floatingStyles:Q}),[c,W,K,F,Q])}const rS=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?Rh({element:r.current,padding:s}).fn(n):{}:r?Rh({element:r,padding:s}).fn(n):{}}}},sS=(e,t)=>({...G_(e),options:[e,t]}),oS=(e,t)=>({...Y_(e),options:[e,t]}),iS=(e,t)=>({...eS(e),options:[e,t]}),aS=(e,t)=>({...J_(e),options:[e,t]}),lS=(e,t)=>({...X_(e),options:[e,t]}),uS=(e,t)=>({...Z_(e),options:[e,t]}),cS=(e,t)=>({...rS(e),options:[e,t]});var dS="Arrow",Rv=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return g.jsx(ye.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rv.displayName=dS;var fS=Rv;function hS(e,t=[]){let n=[];function r(o,i){const a=x.createContext(i),l=n.length;n=[...n,i];function u(f){const{scope:d,children:h,...v}=f,y=(d==null?void 0:d[e][l])||a,b=x.useMemo(()=>v,Object.values(v));return g.jsx(y.Provider,{value:b,children:h})}function c(f,d){const h=(d==null?void 0:d[e][l])||a,v=x.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const s=()=>{const o=n.map(i=>x.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,pS(s,...t)]}function pS(...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(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function jv(e){const[t,n]=x.useState(void 0);return Qn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Nv="Popper",[Ov,Av]=hS(Nv),[CP,Iv]=Ov(Nv),Lv="PopperAnchor",$v=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=Iv(Lv,n),i=x.useRef(null),a=Xe(t,i);return x.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:g.jsx(ye.div,{...s,ref:a})});$v.displayName=Lv;var Id="PopperContent",[mS,gS]=Ov(Id),Dv=x.forwardRef((e,t)=>{var yt,hn,pn,mn,Xo,Pr;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:v,...y}=e,b=Iv(Id,n),[p,m]=x.useState(null),w=Xe(t,rr=>m(rr)),[_,S]=x.useState(null),k=jv(_),E=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,I=r+(o!=="center"?"-"+o:""),O=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},U=Array.isArray(u)?u:[u],D=U.length>0,W={padding:O,boundary:U.filter(yS),altBoundary:D},{refs:A,floatingStyles:K,placement:F,isPositioned:Q,middlewareData:C}=nS({strategy:"fixed",placement:I,whileElementsMounted:(...rr)=>Q_(...rr,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[sS({mainAxis:s+T,alignmentAxis:i}),l&&oS({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?iS():void 0,...W}),l&&aS({...W}),lS({...W,apply:({elements:rr,rects:Ms,availableWidth:Zo,availableHeight:gn})=>{const{width:pl,height:ml}=Ms.reference,Te=rr.floating.style;Te.setProperty("--radix-popper-available-width",`${Zo}px`),Te.setProperty("--radix-popper-available-height",`${gn}px`),Te.setProperty("--radix-popper-anchor-width",`${pl}px`),Te.setProperty("--radix-popper-anchor-height",`${ml}px`)}}),_&&cS({element:_,padding:a}),wS({arrowWidth:E,arrowHeight:T}),d&&uS({strategy:"referenceHidden",...W})]}),[j,M]=Uv(F),$=jt(v);Qn(()=>{Q&&($==null||$())},[Q,$]);const z=(yt=C.arrow)==null?void 0:yt.x,J=(hn=C.arrow)==null?void 0:hn.y,fe=((pn=C.arrow)==null?void 0:pn.centerOffset)!==0,[Ze,ee]=x.useState();return Qn(()=>{p&&ee(window.getComputedStyle(p).zIndex)},[p]),g.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:Q?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ze,"--radix-popper-transform-origin":[(mn=C.transformOrigin)==null?void 0:mn.x,(Xo=C.transformOrigin)==null?void 0:Xo.y].join(" "),...((Pr=C.hide)==null?void 0:Pr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(mS,{scope:n,placedSide:j,onArrowChange:S,arrowX:z,arrowY:J,shouldHideArrow:fe,children:g.jsx(ye.div,{"data-side":j,"data-align":M,...y,ref:w,style:{...y.style,animation:Q?void 0:"none"}})})})});Dv.displayName=Id;var Mv="PopperArrow",vS={top:"bottom",right:"left",bottom:"top",left:"right"},Fv=x.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=gS(Mv,r),i=vS[o.placedSide];return g.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:g.jsx(fS,{...s,ref:n,style:{...s.style,display:"block"}})})});Fv.displayName=Mv;function yS(e){return e!==null}var wS=e=>({name:"transformOrigin",options:e,fn(t){var b,p,m;const{placement:n,rects:r,middlewareData:s}=t,i=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=Uv(n),f={start:"0%",center:"50%",end:"100%"}[c],d=(((p=s.arrow)==null?void 0:p.x)??0)+a/2,h=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let v="",y="";return u==="bottom"?(v=i?f:`${d}px`,y=`${-l}px`):u==="top"?(v=i?f:`${d}px`,y=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,y=i?f:`${h}px`):u==="left"&&(v=`${r.floating.width+l}px`,y=i?f:`${h}px`),{data:{x:v,y}}}});function Uv(e){const[t,n="center"]=e.split("-");return[t,n]}var xS=$v,bS=Dv,_S=Fv,[Ja,TP]=Wa("Tooltip",[Av]),Ld=Av(),zv="TooltipProvider",SS=700,Nh="tooltip.open",[kS,Bv]=Ja(zv),Wv=e=>{const{__scopeTooltip:t,delayDuration:n=SS,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=x.useState(!0),l=x.useRef(!1),u=x.useRef(0);return x.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),g.jsx(kS,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:x.useCallback(c=>{l.current=c},[]),disableHoverableContent:s,children:o})};Wv.displayName=zv;var Vv="Tooltip",[PP,Xa]=Ja(Vv),cc="TooltipTrigger",ES=x.forwardRef((e,t)=>
vendor: 5,180 bytes, line 91
91{const{__scopeTooltip:n,...r}=e,s=Xa(cc,n),o=Bv(cc,n),i=Ld(n),a=x.useRef(null),l=Xe(t,a,s.onTriggerChange),u=x.useRef(!1),c=x.useRef(!1),f=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),g.jsx(xS,{asChild:!0,...i,children:g.jsx(ye.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ne(e.onPointerMove,d=>{d.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ne(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ne(e.onBlur,s.onClose),onClick:ne(e.onClick,s.onClose)})})});ES.displayName=cc;var CS="TooltipPortal",[RP,TS]=Ja(CS,{forceMount:void 0}),Es="TooltipContent",Hv=x.forwardRef((e,t)=>{const n=TS(Es,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Xa(Es,e.__scopeTooltip);return g.jsx(Va,{present:r||i.open,children:i.disableHoverableContent?g.jsx(qv,{side:s,...o,ref:t}):g.jsx(PS,{side:s,...o,ref:t})})}),PS=x.forwardRef((e,t)=>{const n=Xa(Es,e.__scopeTooltip),r=Bv(Es,e.__scopeTooltip),s=x.useRef(null),o=Xe(t,s),[i,a]=x.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:f}=r,d=x.useCallback(()=>{a(null),f(!1)},[f]),h=x.useCallback((v,y)=>{const b=v.currentTarget,p={x:v.clientX,y:v.clientY},m=OS(p,b.getBoundingClientRect()),w=AS(p,m),_=IS(y.getBoundingClientRect()),S=$S([...w,..._]);a(S),f(!0)},[f]);return x.useEffect(()=>()=>d(),[d]),x.useEffect(()=>{if(l&&c){const v=b=>h(b,c),y=b=>h(b,l);return l.addEventListener("pointerleave",v),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",v),c.removeEventListener("pointerleave",y)}}},[l,c,h,d]),x.useEffect(()=>{if(i){const v=y=>{const b=y.target,p={x:y.clientX,y:y.clientY},m=(l==null?void 0:l.contains(b))||(c==null?void 0:c.contains(b)),w=!LS(p,i);m?d():w&&(d(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,c,i,u,d]),g.jsx(qv,{...e,ref:o})}),[RS,jS]=Ja(Vv,{isInside:!1}),qv=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=Xa(Es,n),u=Ld(n),{onClose:c}=l;return x.useEffect(()=>(document.addEventListener(Nh,c),()=>document.removeEventListener(Nh,c)),[c]),x.useEffect(()=>{if(l.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),g.jsx(bd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:g.jsxs(bS,{"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:[g.jsx($g,{children:r}),g.jsx(RS,{scope:n,isInside:!0,children:g.jsx(C1,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Hv.displayName=Es;var Kv="TooltipArrow",NS=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ld(n);return jS(Kv,n).isInside?null:g.jsx(_S,{...s,...r,ref:t})});NS.displayName=Kv;function OS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function AS(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 IS(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 LS(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,l=t[o].y,u=t[i].x,c=t[i].y;l>r!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(s=!s)}return s}function $S(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),DS(t)}function DS(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 o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.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 o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.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 MS=Wv,Qv=Hv;const FS=MS,US=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
vendor: 23,179 bytes, line 91
91g.jsx(Qv,{ref:r,sideOffset:t,className:re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));US.displayName=Qv.displayName;var Za=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(){}},el=typeof window>"u"||"Deno"in globalThis;function _t(){}function zS(e,t){return typeof e=="function"?e(t):e}function BS(e){return typeof e=="number"&&e>=0&&e!==1/0}function WS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Oh(e,t){return typeof e=="function"?e(t):e}function VS(e,t){return typeof e=="function"?e(t):e}function Ah(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==$d(i,t.options))return!1}else if(!$o(t.queryKey,i))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||o&&!o(t))}function Ih(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Lo(t.options.mutationKey)!==Lo(o))return!1}else if(!$o(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function $d(e,t){return((t==null?void 0:t.queryKeyHashFn)||Lo)(e)}function Lo(e){return JSON.stringify(e,(t,n)=>dc(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function $o(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!$o(e[n],t[n])):!1}function Gv(e,t){if(e===t)return e;const n=Lh(e)&&Lh(t);if(n||dc(e)&&dc(t)){const r=n?e:Object.keys(e),s=r.length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let l=0;for(let u=0;u<i;u++){const c=n?u:o[u];(!n&&r.includes(c)||n)&&e[c]===void 0&&t[c]===void 0?(a[c]=void 0,l++):(a[c]=Gv(e[c],t[c]),a[c]===e[c]&&e[c]!==void 0&&l++)}return s===i&&l===s?e:a}return t}function Lh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function dc(e){if(!$h(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!$h(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $h(e){return Object.prototype.toString.call(e)==="[object Object]"}function HS(e){return new Promise(t=>{setTimeout(t,e)})}function qS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Gv(e,t):t}function KS(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function QS(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Dd=Symbol();function Yv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Dd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var fr,Rn,ls,dp,GS=(dp=class extends Za{constructor(){super();Z(this,fr);Z(this,Rn);Z(this,ls);q(this,ls,t=>{if(!el&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,Rn)||this.setEventListener(P(this,ls))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Rn))==null||t.call(this),q(this,Rn,void 0))}setEventListener(t){var n;q(this,ls,t),(n=P(this,Rn))==null||n.call(this),q(this,Rn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,fr)!==t&&(q(this,fr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,fr)=="boolean"?P(this,fr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fr=new WeakMap,Rn=new WeakMap,ls=new WeakMap,dp),Jv=new GS,us,jn,cs,fp,YS=(fp=class extends Za{constructor(){super();Z(this,us,!0);Z(this,jn);Z(this,cs);q(this,cs,t=>{if(!el&&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(){P(this,jn)||this.setEventListener(P(this,cs))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,jn))==null||t.call(this),q(this,jn,void 0))}setEventListener(t){var n;q(this,cs,t),(n=P(this,jn))==null||n.call(this),q(this,jn,t(this.setOnline.bind(this)))}setOnline(t){P(this,us)!==t&&(q(this,us,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,us)}},us=new WeakMap,jn=new WeakMap,cs=new WeakMap,fp),ba=new YS;function JS(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function XS(e){return Math.min(1e3*2**e,3e4)}function Xv(e){return(e??"online")==="online"?ba.isOnline():!0}var Zv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Jl(e){return e instanceof Zv}function ey(e){let t=!1,n=0,r=!1,s;const o=JS(),i=y=>{var b;r||(d(new Zv(y)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Jv.isFocused()&&(e.networkMode==="always"||ba.isOnline())&&e.canRun(),c=()=>Xv(e.networkMode)&&e.canRun(),f=y=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,y),s==null||s(),o.resolve(y))},d=y=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,y),s==null||s(),o.reject(y))},h=()=>new Promise(y=>{var b;s=p=>{(r||u())&&y(p)},(b=e.onPause)==null||b.call(e)}).then(()=>{var y;s=void 0,r||(y=e.onContinue)==null||y.call(e)}),v=()=>{if(r)return;let y;const b=n===0?e.initialPromise:void 0;try{y=b??e.fn()}catch(p){y=Promise.reject(p)}Promise.resolve(y).then(f).catch(p=>{var k;if(r)return;const m=e.retry??(el?0:3),w=e.retryDelay??XS,_=typeof w=="function"?w(n,p):w,S=m===!0||typeof m=="number"&&n<m||typeof m=="function"&&m(n,p);if(t||!S){d(p);return}n++,(k=e.onFail)==null||k.call(e,n,p),HS(_).then(()=>u()?void 0:h()).then(()=>{t?d(p):v()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?v():h().then(v),o)}}function ZS(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const o=a=>{t?e.push(a):s(()=>{n(a)})},i=()=>{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||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var ze=ZS(),hr,hp,ty=(hp=class{constructor(){Z(this,hr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),BS(this.gcTime)&&q(this,hr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(el?1/0:5*60*1e3))}clearGcTimeout(){P(this,hr)&&(clearTimeout(P(this,hr)),q(this,hr,void 0))}},hr=new WeakMap,hp),ds,fs,ct,Ie,Uo,pr,St,Kt,pp,ek=(pp=class extends ty{constructor(t){super();Z(this,St);Z(this,ds);Z(this,fs);Z(this,ct);Z(this,Ie);Z(this,Uo);Z(this,pr);q(this,pr,!1),q(this,Uo,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,ct,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,ds,nk(this.options)),this.state=t.state??P(this,ds),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,Ie))==null?void 0:t.promise}setOptions(t){this.options={...P(this,Uo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,ct).remove(this)}setData(t,n){const r=qS(this.state.data,t,this.options);return Ne(this,St,Kt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ne(this,St,Kt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=P(this,Ie))==null?void 0:r.promise;return(s=P(this,Ie))==null||s.cancel(t),n?n.then(_t).catch(_t):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,ds))}isActive(){return this.observers.some(t=>VS(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}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||!WS(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Ie))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Ie))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,ct).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,Ie)&&(P(this,pr)?P(this,Ie).cancel({revert:!0}):P(this,Ie).cancelRetry()),this.scheduleGc()),P(this,ct).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,St,Kt).call(this,{type:"invalidate"})}fetch(t,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,Ie))return P(this,Ie).continueRetry(),P(this,Ie).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(q(this,pr,!0),r.signal)})},o=()=>{const f=Yv(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return s(d),q(this,pr,!1),this.options.persister?this.options.persister(f,d,this):f(d)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(i),(l=this.options.behavior)==null||l.onFetch(i,this),q(this,fs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Ne(this,St,Kt).call(this,{type:"fetch",meta:(c=i.fetchOptions)==null?void 0:c.meta});const a=f=>{var d,h,v,y;Jl(f)&&f.silent||Ne(this,St,Kt).call(this,{type:"error",error:f}),Jl(f)||((h=(d=P(this,ct).config).onError)==null||h.call(d,f,this),(y=(v=P(this,ct).config).onSettled)==null||y.call(v,this.state.data,f,this)),this.scheduleGc()};return q(this,Ie,ey({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var d,h,v,y;if(f===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(b){a(b);return}(h=(d=P(this,ct).config).onSuccess)==null||h.call(d,f,this),(y=(v=P(this,ct).config).onSettled)==null||y.call(v,f,this.state.error,this),this.scheduleGc()},onError:a,onFail:(f,d)=>{Ne(this,St,Kt).call(this,{type:"failed",failureCount:f,error:d})},onPause:()=>{Ne(this,St,Kt).call(this,{type:"pause"})},onContinue:()=>{Ne(this,St,Kt).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),P(this,Ie).start()}},ds=new WeakMap,fs=new WeakMap,ct=new WeakMap,Ie=new WeakMap,Uo=new WeakMap,pr=new WeakMap,St=new WeakSet,Kt=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,...tk(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 Jl(s)&&s.revert&&P(this,fs)?{...P(this,fs),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),ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,ct).notify({query:this,type:"updated",action:t})})},pp);function tk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nk(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 Dt,mp,rk=(mp=class extends Za{constructor(t={}){super();Z(this,Dt);this.config=t,q(this,Dt,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??$d(s,n);let i=this.get(o);return i||(i=new ek({cache:this,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){P(this,Dt).has(t.queryHash)||(P(this,Dt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,Dt).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,Dt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Dt).get(t)}getAll(){return[...P(this,Dt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ah(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Ah(t,r)):n}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Dt=new WeakMap,mp),Mt,Fe,mr,Ft,bn,gp,sk=(gp=class extends ty{constructor(t){super();Z(this,Ft);Z(this,Mt);Z(this,Fe);Z(this,mr);this.mutationId=t.mutationId,q(this,Fe,t.mutationCache),q(this,Mt,[]),this.state=t.state||ok(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,Mt).includes(t)||(P(this,Mt).push(t),this.clearGcTimeout(),P(this,Fe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,Mt,P(this,Mt).filter(n=>n!==t)),this.scheduleGc(),P(this,Fe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,Mt).length||(this.state.status==="pending"?this.scheduleGc():P(this,Fe).remove(this))}continue(){var t;return((t=P(this,mr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,i,a,l,u,c,f,d,h,v,y,b,p,m,w,_,S,k,E;q(this,mr,ey({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(T,I)=>{Ne(this,Ft,bn).call(this,{type:"failed",failureCount:T,error:I})},onPause:()=>{Ne(this,Ft,bn).call(this,{type:"pause"})},onContinue:()=>{Ne(this,Ft,bn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Fe).canRun(this)}));const n=this.state.status==="pending",r=!P(this,mr).canStart();try{if(!n){Ne(this,Ft,bn).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(s=P(this,Fe).config).onMutate)==null?void 0:o.call(s,t,this));const I=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t));I!==this.state.context&&Ne(this,Ft,bn).call(this,{type:"pending",context:I,variables:t,isPaused:r})}const T=await P(this,mr).start();return await((u=(l=P(this,Fe).config).onSuccess)==null?void 0:u.call(l,T,t,this.state.context,this)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,T,t,this.state.context)),await((h=(d=P(this,Fe).config).onSettled)==null?void 0:h.call(d,T,null,this.state.variables,this.state.context,this)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,T,null,t,this.state.context)),Ne(this,Ft,bn).call(this,{type:"success",data:T}),T}catch(T){try{throw await((p=(b=P(this,Fe).config).onError)==null?void 0:p.call(b,T,t,this.state.context,this)),await((w=(m=this.options).onError)==null?void 0:w.call(m,T,t,this.state.context)),await((S=(_=P(this,Fe).config).onSettled)==null?void 0:S.call(_,void 0,T,this.state.variables,this.state.context,this)),await((E=(k=this.options).onSettled)==null?void 0:E.call(k,void 0,T,t,this.state.context)),T}finally{Ne(this,Ft,bn).call(this,{type:"error",error:T})}}finally{P(this,Fe).runNext(this)}}},Mt=new WeakMap,Fe=new WeakMap,mr=new WeakMap,Ft=new WeakSet,bn=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),ze.batch(()=>{P(this,Mt).forEach(r=>{r.onMutationUpdate(t)}),P(this,Fe).notify({mutation:this,type:"updated",action:t})})},gp);function ok(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var et,zo,vp,ik=(vp=class extends Za{constructor(t={}){super();Z(this,et);Z(this,zo);this.config=t,q(this,et,new Map),q(this,zo,Date.now())}build(t,n,r){const s=new sk({mutationCache:this,mutationId:++ni(this,zo)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=ki(t),r=P(this,et).get(n)??[];r.push(t),P(this,et).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=ki(t);if(P(this,et).has(n)){const s=(r=P(this,et).get(n))==null?void 0:r.filter(o=>o!==t);s&&(s.length===0?P(this,et).delete(n):P(this,et).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=P(this,et).get(ki(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=P(this,et).get(ki(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...P(this,et).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ih(n,r))}findAll(t={}){return this.getAll().filter(n=>Ih(t,n))}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(_t))))}},et=new WeakMap,zo=new WeakMap,vp);function ki(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Dh(e){return{onFetch:(t,n)=>{var c,f,d,h,v;const r=t.options,s=(d=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],i=((v=t.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},p=Yv(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};b(k);const E=await p(k),{maxPages:T}=t.options,I=S?QS:KS;return{pages:I(w.pages,E,T),pageParams:I(w.pageParams,_,T)}};if(s&&o.length){const w=s==="backward",_=w?ak:Mh,S={pages:o,pageParams:i},k=_(r,S);a=await m(S,k,w)}else{const w=e??o.length;do{const _=l===0?i[0]??r.initialPageParam:Mh(r,a);if(l>0&&_==null)break;a=await m(a,_),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var y,b;return(b=(y=t.options).persister)==null?void 0:b.call(y,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Mh(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 ak(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,Nn,On,hs,ps,An,ms,gs,yp,lk=(yp=class{constructor(e={}){Z(this,ge);Z(this,Nn);Z(this,On);Z(this,hs);Z(this,ps);Z(this,An);Z(this,ms);Z(this,gs);q(this,ge,e.queryCache||new rk),q(this,Nn,e.mutationCache||new ik),q(this,On,e.defaultOptions||{}),q(this,hs,new Map),q(this,ps,new Map),q(this,An,0)}mount(){ni(this,An)._++,P(this,An)===1&&(q(this,ms,Jv.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,ge).onFocus())})),q(this,gs,ba.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,ge).onOnline())})))}unmount(){var e,t;ni(this,An)._--,P(this,An)===0&&((e=P(this,ms))==null||e.call(this),q(this,ms,void 0),(t=P(this,gs))==null||t.call(this),q(this,gs,void 0))}isFetching(e){return P(this,ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Nn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(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=P(this,ge).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Oh(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return P(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=P(this,ge).get(r.queryHash),o=s==null?void 0:s.state.data,i=zS(t,o);if(i!==void 0)return P(this,ge).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return ze.batch(()=>P(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=P(this,ge).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,ge);ze.batch(()=>
91{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,ge),r={type:"active",...e};return ze.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=ze.batch(()=>P(this,ge).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(_t).catch(_t)}invalidateQueries(e={},t={}){return ze.batch(()=>{if(P(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=ze.batch(()=>P(this,ge).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(_t)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(_t)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,ge).build(this,t);return n.isStaleByTime(Oh(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_t).catch(_t)}fetchInfiniteQuery(e){return e.behavior=Dh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_t).catch(_t)}ensureInfiniteQueryData(e){return e.behavior=Dh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ba.isOnline()?P(this,Nn).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,ge)}getMutationCache(){return P(this,Nn)}getDefaultOptions(){return P(this,On)}setDefaultOptions(e){q(this,On,e)}setQueryDefaults(e,t){P(this,hs).set(Lo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,hs).values()];let n={};return t.forEach(r=>{$o(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){P(this,ps).set(Lo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,ps).values()];let n={};return t.forEach(r=>{$o(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,On).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=$d(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===Dd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,On).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,ge).clear(),P(this,Nn).clear()}},ge=new WeakMap,Nn=new WeakMap,On=new WeakMap,hs=new WeakMap,ps=new WeakMap,An=new WeakMap,ms=new WeakMap,gs=new WeakMap,yp),uk=x.createContext(void 0),ck=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(uk.Provider,{value:e,children:t}));/**
92 * @remix-run/router v1.20.0
93 *
94 * Copyright (c) Remix Software Inc.
95 *
96 * This source code is licensed under the MIT license found in the
97 * LICENSE.md file in the root directory of this source tree.
98 *
99 * @license MIT
100 */function Do(){return Do=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},Do.apply(this,arguments)}var $n;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($n||($n={}));const Fh="popstate";function dk(e){e===void 0&&(e={});function t(r,s){let{pathname:o,search:i,hash:a}=r.location;return fc("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:ry(s)}return hk(t,n,null,e)}function Se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ny(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fk(){return Math.random().toString(36).substr(2,8)}function Uh(e,t){return{usr:e.state,key:e.key,idx:t}}function fc(e,t,n,r){return n===void 0&&(n=null),Do({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Is(t):t,{state:n,key:t&&t.key||r||fk()})}function ry(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 Is(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 hk(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=$n.Pop,l=null,u=c();u==null&&(u=0,i.replaceState(Do({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function f(){a=$n.Pop;let b=c(),p=b==null?null:b-u;u=b,l&&l({action:a,location:y.location,delta:p})}function d(b,p){a=$n.Push;let m=fc(y.location,b,p);u=c()+1;let w=Uh(m,u),_=y.createHref(m);try{i.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}o&&l&&l({action:a,location:y.location,delta:1})}function h(b,p){a=$n.Replace;let m=fc(y.location,b,p);u=c();let w=Uh(m,u),_=y.createHref(m);i.replaceState(w,"",_),o&&l&&l({action:a,location:y.location,delta:0})}function v(b){let p=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof b=="string"?b:ry(b);return m=m.replace(/ $/,"%20"),Se(p,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,p)}let y={get action(){return a},get location(){return e(s,i)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Fh,f),l=b,()=>{s.removeEventListener(Fh,f),l=null}},createHref(b){return t(s,b)},createURL:v,encodeLocation(b){let p=v(b);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:h,go(b){return i.go(b)}};return y}var zh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zh||(zh={}));function pk(e,t,n){return n===void 0&&(n="/"),mk(e,t,n,!1)}function mk(e,t,n,r){let s=typeof t=="string"?Is(t):t,o=iy(s.pathname||"/",n);if(o==null)return null;let i=sy(e);gk(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let u=Tk(o);a=Ek(i[l],u,r)}return a}function sy(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Se(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not val
100id. 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=yr([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(Se(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),sy(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Sk(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of oy(o.path))s(o,i,l)}),t}function oy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=oy(r.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function gk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:kk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const vk=/^:[\w-]+$/,yk=3,wk=2,xk=1,bk=10,_k=-2,Bh=e=>e==="*";function Sk(e,t){let n=e.split("/"),r=n.length;return n.some(Bh)&&(r+=_k),t&&(r+=wk),n.filter(s=>!Bh(s)).reduce((s,o)=>s+(vk.test(o)?yk:o===""?xk:bk),r)}function kk(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 Ek(e,t,n){let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=o==="/"?t:t.slice(o.length)||"/",f=Wh({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),d=l.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=Wh({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;
vendor: 9,193 bytes, lines 100-109
100Object.assign(s,f.params),i.push({params:s,pathname:yr([o,f.pathname]),pathnameBase:Ak(yr([o,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(o=yr([o,f.pathnameBase]))}return i}function Wh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ck(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,c,f)=>{let{paramName:d,isOptional:h}=c;if(d==="*"){let y=a[f]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const v=a[f];return h&&!v?u[d]=void 0:u[d]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Ck(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ny(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,(i,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 Tk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ny(!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 iy(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 Pk(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Is(e):e;return{pathname:n?n.startsWith("/")?n:Rk(n,t):t,search:Ik(r),hash:Lk(s)}}function Rk(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 Xl(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 jk(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Nk(e,t){let n=jk(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ok(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Is(e):(s=Do({},e),Se(!s.pathname||!s.pathname.includes("?"),Xl("?","pathname","search",s)),Se(!s.pathname||!s.pathname.includes("#"),Xl("#","pathname","hash",s)),Se(!s.search||!s.search.includes("#"),Xl("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let d=i.split("/");for(;d[0]==="..";)d.shift(),f-=1;s.pathname=d.join("/")}a=f>=0?t[f]:"/"}let l=Pk(s,a),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const yr=e=>e.join("/").replace(/\/\/+/g,"/"),Ak=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ik=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Lk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $k(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ay=["post","put","patch","delete"];new Set(ay);const Dk=["get",...ay];new Set(Dk);/**
101 * React Router v6.27.0
102 *
103 * Copyright (c) Remix Software Inc.
104 *
105 * This source code is licensed under the MIT license found in the
106 * LICENSE.md file in the root directory of this source tree.
107 *
108 * @license MIT
109 */function Mo(){return Mo=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},Mo.apply(this,arguments)}const Md=x.createContext(null),Mk=x.createContext(null),tl=x.createContext(null),nl=x.createContext(null),Ls=x.createContext({outlet:null,matches:[],isDataRoute:!1}),ly=x.createContext(null);function rl(){return x.useContext(nl)!=null}function sl(){return rl()||Se(!1),x.useContext(nl).location}function uy(e){x.useContext(tl).static||x.useLayoutEffect(e)}function cy(){let{isDataRoute:e}=x.useContext(Ls);return e?Jk():Fk()}function Fk(){rl()||Se(!1);let e=x.useContext(Md),{basename:t,future:n,navigator:r}=x.useContext(tl),{matches:s}=x.useContext(Ls),{pathname:o}=sl(),i=JSON.stringify(Nk(s,n.v7_relativeSplatPath)),a=x.useRef(!1);return uy(()=>{a.current=!0}),x.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Ok(u,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:yr([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,i,o,e])}function Uk(e,t){return zk(e,t)}function zk(e,t,n,r){rl()||Se(!1);let{navigator:s}=x.useContext(tl),{matches:o}=x.useContext(Ls),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=sl(),c;if(t){var f;let b=typeof t=="string"?Is(t):t;l==="/"||(f=b.pathname)!=null&&f.startsWith(l)||Se(!1),c=b}else c=u;let d=c.pathname||"/",h=d;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=pk(e,{pathname:h}),y=qk(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:yr([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:yr([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),o,n,r);return t&&y?x.createElement(nl.Provider,{value:{location:Mo({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:$n.Pop}},y):y}function Bk(){let e=Yk(),t=$k(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 x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,null)}const Wk=x.createElement(Bk,null);class Vk extends x.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?x.createElement(Ls.Provider,{value:this.props.routeContext},x.createElement(ly.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Hk(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(Md);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Ls.Provider,{value:t},r)}function qk(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||Se(!1),i=i.slice(0,Math.min(i.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<i.length;c++){let f=i[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:d,errors:h}=n,v=f.route.loader&&d[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||v){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((c,f,d)=>{let h,v=!1,y=null,b=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||Wk,l&&(u<0&&d===0?(v=!0,b=null):u===d&&(v=!0,b=f.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,d+1)),m=()=>{let w;return h?w=y:v?w=b:f.route.Component?w=x.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=c,x.createElement(Hk,{match:f,routeContext:{outlet:c,matches:p,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?x.createElement(Vk,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var dy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(dy||{}),_a=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useL
109oaderData",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}(_a||{});function Kk(e){let t=x.useContext(Md);return t||Se(!1),t}function Qk(e){let t=x.useContext(Mk);return t||Se(!1),t}function Gk(e){let t=x.useContext(Ls);return t||Se(!1),t}function fy(e){let t=Gk(),n=t.matches[t.matches.length-1];return n.route.id||Se(!1),n.route.id}function Yk(){var e;let t=x.useContext(ly),n=Qk(_a.UseRouteError),r=fy(_a.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Jk(){let{router:e}=Kk(dy.UseNavigateStable),t=fy(_a.UseNavigateStable),n=x.useRef(!1);return uy(()=>{n.current=!0}),x.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Mo({fromRouteId:t},o)))},[e,t])}function Hi(e){Se(!1)}function Xk(e){let{basename:t="/",children:n=null,location:r,navigationType:s=$n.Pop,navigator:o,static:i=!1,future:a}=e;rl()&&Se(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:o,static:i,future:Mo({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof r=="string"&&(r=Is(r));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:v="default"}=r,y=x.useMemo(()=>{let b=iy(c,l);return b==null?null:{location:{pathname:b,search:f,hash:d,state:h,key:v},navigationType:s}},[l,c,f,d,h,v,s]);return y==null?null:x.createElement(tl.Provider,{value:u},x.createElement(nl.Provider,{children:n,value:y}))}function Zk(e){let{children:t,location:n}=e;return Uk(hc(t),n)}new Promise(()=>{});function hc(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let o=[...t,s];if(r.type===x.Fragment){n.push.apply(n,hc(r.props.children,o));return}r.type!==Hi&&Se(!1),!r.props.index||!r.props.children||Se(!1);let i={id:r.props.id||o.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&&(i.children=hc(r.props.children,o)),n.push(i)}),n}/**
110 * React Router DOM v6.27.0
111 *
112 * Copyright (c) Remix Software Inc.
113 *
114 * This source code is licensed under the MIT license found in the
115 * LICENSE.md file in the root directory of this source tree.
116 *
117 * @license MIT
118 */const eE="6";try{window.__reactRouterVersion=eE}catch{}const tE="startTransition",Vh=jp[tE];function nE(e){let{basename:t,children:n,future:r,window:s}=e,o=x.useRef();o.current==null&&(o.current=dk({window:s,v5Compat:!0}));let i=o.current,[a,l]=x.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},c=x.useCallback(f=>{u&&Vh?Vh(()=>l(f)):l(f)},[l,u]);return x.useLayoutEffect(()=>i.listen(c),[i,c]),x.createElement(Xk,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}var Hh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Hh||(Hh={}));var qh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qh||(qh={}));const rE=Cd("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"}}),Wt=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?Oo:"button";return g.jsx(i,{className:re(rE({variant:t,size:n,className:e})),ref:o,...s})});Wt.displayName="Button";const en=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:re("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
vendor: 9,466 bytes, line 118
118en.displayName="Card";const tn=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:re("flex flex-col space-y-1.5 p-6",e),...t}));tn.displayName="CardHeader";const nn=x.forwardRef(({className:e,...t},n)=>g.jsx("h3",{ref:n,className:re("text-2xl font-semibold leading-none tracking-tight",e),...t}));nn.displayName="CardTitle";const rn=x.forwardRef(({className:e,...t},n)=>g.jsx("p",{ref:n,className:re("text-sm text-muted-foreground",e),...t}));rn.displayName="CardDescription";const Hn=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:re("p-6 pt-0",e),...t}));Hn.displayName="CardContent";const ol=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:re("flex items-center p-6 pt-0",e),...t}));ol.displayName="CardFooter";const Fd=x.forwardRef(({className:e,...t},n)=>g.jsx("textarea",{className:re("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-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}));Fd.displayName="Textarea";function sE(e,t=[]){let n=[];function r(o,i){const a=x.createContext(i),l=n.length;n=[...n,i];function u(f){const{scope:d,children:h,...v}=f,y=(d==null?void 0:d[e][l])||a,b=x.useMemo(()=>v,Object.values(v));return g.jsx(y.Provider,{value:b,children:h})}function c(f,d){const h=(d==null?void 0:d[e][l])||a,v=x.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const s=()=>{const o=n.map(i=>x.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,oE(s,...t)]}function oE(...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(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var iE=x.createContext(void 0);function hy(e){const t=x.useContext(iE);return e||t||"ltr"}var Zl="rovingFocusGroup.onEntryFocus",aE={bubbles:!1,cancelable:!0},il="RovingFocusGroup",[pc,py,lE]=Dg(il),[uE,my]=sE(il,[lE]),[cE,dE]=uE(il),gy=x.forwardRef((e,t)=>g.jsx(pc.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(pc.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(fE,{...e,ref:t})})}));gy.displayName=il;var fE=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...f}=e,d=x.useRef(null),h=Xe(t,d),v=hy(o),[y=null,b]=_d({prop:i,defaultProp:a,onChange:l}),[p,m]=x.useState(!1),w=jt(u),_=py(n),S=x.useRef(!1),[k,E]=x.useState(0);return x.useEffect(()=>{const T=d.current;if(T)return T.addEventListener(Zl,w),()=>T.removeEventListener(Zl,w)},[w]),g.jsx(cE,{scope:n,orientation:r,dir:v,loop:s,currentTabStopId:y,onItemFocus:x.useCallback(T=>b(T),[b]),onItemShiftTab:x.useCallback(()=>m(!0),[]),onFocusableItemAdd:x.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:x.useCallback(()=>E(T=>T-1),[]),children:g.jsx(ye.div,{tabIndex:p||k===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:ne(e.onMouseDown,()=>{S.current=!0}),onFocus:ne(e.onFocus,T=>{const I=!S.current;if(T.target===T.currentTarget&&I&&!p){const O=new CustomEvent(Zl,aE);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const U=_().filter(F=>F.focusable),D=U.find(F=>F.active),W=U.find(F=>F.id===y),K=[D,W,...U].filter(Boolean).map(F=>F.ref.current);wy(K,c)}}S.current=!1}),onBlur:ne(e.onBlur,()=>m(!1))})})}),vy="RovingFocusGroupItem",yy=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,a=h_(),l=o||a,u=dE(vy,n),c=u.currentTabStopId===l,f=py(n),{onFocusableItemAdd:d,onFocusableItemRemove:h}=u;return x.useEffect(()=>{if(r)return d(),()=>h()},[r,d,h]),g.jsx(pc.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:g.jsx(ye.span,{tabIndex:c?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ne(e.onMouseDown,v=>{r?u.onItemFocus(l):v.preventDefault()}),onFocus:ne(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ne(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=mE(v,u.orientation,u.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let p=f().filter(m=>m.focusable).map(m=>m.ref.current);if(y==="last")p.reverse();else if(y==="prev"||y==="next"){y==="prev"&&p.reverse();const m=p.indexOf(v.currentTarget);p=u.loop?gE(p,m+1):p.slice(m+1)}setTimeout(()=>wy(p))}})})})});yy.displayName=vy;var hE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mE(e,t,n){const r=pE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return hE[r]}function wy(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function gE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vE=gy,yE=yy;function wE(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ud="Radio",[xE,xy]=Wa(Ud),[bE,_E]=xE(Ud),by=x.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:l,form:u,...c}=e,[f,d]=x.useState(null),h=Xe(t,b=>d(b)),v=x.useRef(!1),y=f?u||!!f.closest("form"):!0;return g.jsxs(bE,{scope:n,checked:s,disabled:i,children:[g.jsx(ye.button,{type:"button",role:"radio","aria-checked":s,"data-state":ky(s),"data-disabled":i?"":void 0,disabled:i,value:a,...c,ref:h,onClick:ne(e.onClick,b=>{s||l==null||l(),y&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),y&&g.jsx(SE,{control:f,bubbles:!v.current,name:r,value:a,checked:s,required:o,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});by.displayName=Ud;var _y="RadioIndicator",Sy=x.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=_E(_y,n);return g.jsx(Va,{present:r||o.checked,children:g.jsx(ye.span,{"data-state":ky(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});Sy.displayName=_y;var SE=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=x.useRef(null),i=wE(n),a=jv(t);return x.useEffect(()=>{const l=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const d=new Event("click",{bubbles:r});f.call(l,n),l.dispatchEvent(d)}},[i,n,r]),g.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ky(e){return e?"checked":"unchecked"}var kE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zd="RadioGroup",[EE,jP]=Wa(zd,[my,xy]),Ey=my(),Cy=xy(),[CE,TE]=EE(zd),Ty=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:l,dir:u,loop:c=!0,onValueChange:f,...d}=e,h=Ey(n),v=hy(u),[y,b]=_d({prop:o,defaultProp:s,onChange:f});return g.jsx(CE,{scope:n,name:r,required:i,disabled:a,value:y,onValueChange:b,children:g.jsx(vE,{asChild:!0,...h,orientation:l,dir:v,loop:c,children:g.jsx(ye.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...d,ref:t})})})});Ty.displayName=zd;var Py="RadioGroupItem",Ry=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=TE(Py,n),i=o.disabled||r,a=Ey(n),l=Cy(n),u=x.useRef(null),c=Xe(t,u),f=o.value===s.value,d=x.useRef(!1);return x.useEffect(()=>{const h=y=>{kE.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),g.jsx(yE,{asChild:!0,...a,focusable:!i,active:f,children:g.jsx(by,{disabled:i,required:o.required,checked:f,...l,...s,name:o.name,ref:c,onCheck:()=>o.onValueChange(s.value),onKeyDown:ne(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ne(s.onFocus,()=>{var h;d.current&&((h=u.current)==null||h.click())})})})});Ry.displayName=Py;var PE="RadioGroupIndicator",jy=x.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=Cy(n);return g.jsx(Sy,{...s,...r,ref:t})});jy.displayName=PE;var Ny=Ty,Oy=Ry,RE=jy;const Ay=x.forwardRef(({className:e,...t},n)=>g.jsx(Ny,{className:re("grid gap-2",e),...t,ref:n}));Ay.displayName=Ny.displayName;const mc=x.forwardRef(({className:e,...t},n)=>g.jsx(Oy,{ref:n,className:re("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:g.jsx(RE,{className:"flex items-center justify-center",children:g.jsx(Q1,{className:"h-2.5 w-2.5 fill-current text-current"})})}));mc.displayName=Oy.displayName;var jE="Label",Iy=x.forwardRef((e,t)=>
118g.jsx(ye.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())}}));Iy.displayName=jE;var Ly=Iy;const NE=Cd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),qi=x.forwardRef(({className:e,...t},n)=>g.jsx(Ly,{ref:n,className:re(NE(),e),...t}));qi.displayName=Ly.displayName;const OE=({onQuestionSubmit:e})=>{const[t,n]=x.useState("What advice do you come to me for?"),[r,s]=x.useState("48"),[o,i]=x.useState(!1),a=async l=>{if(l.preventDefault(),!t.trim()){$e.error("Please enter a question");return}i(!0);try{await e(t,parseInt(r)),$e.success("Your question is ready to share!")}catch{$e.error("Failed to create question. Please try again.")}finally{i(!1)}};return g.jsx(en,{className:"w-full animate-fade-in shadow-md",children:g.jsxs("form",{onSubmit:a,children:[g.jsxs(tn,{children:[g.jsx(nn,{className:"text-2xl gradient-text",children:"Create Your Question"}),g.jsx(rn,{children:"Ask a question that helps you understand how your friends perceive you"})]}),g.jsxs(Hn,{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"question",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Your Question"}),g.jsx(Fd,{id:"question",placeholder:"Enter your question...",value:t,onChange:l=>n(l.target.value),className:"min-h-24 resize-none"})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsx(qi,{className:"text-sm font-medium",children:"Response Window"}),g.jsxs(Ay,{value:r,onValueChange:s,className:"flex gap-6",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(mc,{value:"24",id:"24hours"}),g.jsx(qi,{htmlFor:"24hours",className:"text-sm",children:"24 hours"})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(mc,{value:"48",id:"48hours"}),g.jsx(qi,{htmlFor:"48hours",className:"text-sm",children:"48 hours"})]})]}),g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Your friends will have ",r," hours to respond to this question."]})]})]}),g.jsx(ol,{children:g.jsx(Wt,{type:"submit",className:"w-full",disabled:o,children:o?"Creating...":"Create & Share"})})]})})},Bd=x.forwardRef(({className:e,type:t,...n},r)=>g.jsx("input",{type:t,className:re("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}));Bd.displayName="Input";const AE=({question:e,expiryTime:t,questionId:n})=>{const[r,s]=x.useState("");x.useEffect(()=>{const u=`${window.location.origin}/respond?id=${n}`;s(u),console.log("Generated share URL:",u)},[n]);const o=async()=>{try{await navigator.clipboard.writeText(r),$e.success("Link copied to clipboard!")}catch(l){$e.error("Failed to copy link"),console.error("Failed to copy: ",l)}},i=new Date,a=Math.max(0,Math.ceil((t.getTime()-i.getTime())/(1e3*60*60)));return g.jsxs(en,{className:"w-full max-w-xl animate-fade-in shadow-md",children:[g.jsxs(tn,{children:[g.jsx(nn,{className:"text-2xl gradient-text",children:"Share Your Question"}),g.jsx(rn,{children:"Send this link to friends to collect their responses"})]}),g.jsxs(Hn,{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"link",className:"text-sm font-medium leading-none",children:"Your Shareable Link"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(Bd,{id:"link",value:r,readOnly:!0,className:"font-mono text-sm"}),g.jsx(Wt,{variant:"outline",size:"icon",onClick:o,children:g.jsx(Y1,{className:"h-4 w-4"})})]}),g.jsxs("p",{className:"text-xs text-muted-foreground",children:["This link will expire in ",a," hours."]})]}),g.jsxs("div",{className:"rounded-lg bg-muted p-4",children:[g.jsx("h4",{className:"mb-2 font-medium",children:"Your Question"}),g.jsxs("p",{className:"text-sm italic",children:['"',e,'"']})]})]}),g.jsx(ol,{className:"flex flex-col gap-2",children:g.jsx(Wt,{className:"w-full",onClick:o,children:"Copy Link"})})]})};function IE(e,t=[]){let n=[];function r(o,i){const a=x.createContext(i),l=n.length;n=[...n,i];function u(f){const{scope:d,children:h,...v}=f,y=(d==null?void 0:d[e][l])||a,b=x.useMemo(()=>v,Object.values(v));return g.jsx(y.Provider,{value:b,children:h})}function c(f,d){const h=(d==null?void 0:d[e][l])||a,v=x.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const s=()=>{const o=n.map(i=>x.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,LE(s,...t)]}function LE(...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(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Wd="Progress",Vd=100,[$E,NP]=IE(Wd),[DE,ME]=$E(Wd),$y=x.forwardRef((e,t)=>
118{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:o=FE,...i}=e;(s||s===0)&&!Kh(s)&&console.error(UE(`${s}`,"Progress"));const a=Kh(s)?s:Vd;r!==null&&!Qh(r,a)&&console.error(zE(`${r}`,"Progress"));const l=Qh(r,a)?r:null,u=Sa(l)?o(l,a):void 0;return g.jsx(DE,{scope:n,value:l,max:a,children:g.jsx(ye.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Sa(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Fy(l,a),"data-value":l??void 0,"data-max":a,...i,ref:t})})});$y.displayName=Wd;var Dy="ProgressIndicator",My=x.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,s=ME(Dy,n);return g.jsx(ye.div,{"data-state":Fy(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:t})});My.displayName=Dy;function FE(e,t){return`${Math.round(e/t*100)}%`}function Fy(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Sa(e){return typeof e=="number"}function Kh(e){return Sa(e)&&!isNaN(e)&&e>0}function Qh(e,t){return Sa(e)&&!isNaN(e)&&e<=t&&e>=0}function UE(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vd}\`.`}function zE(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
119  - a positive number
120  - less than the value passed to \`max\` (or ${Vd} if no \`max\` prop is set)
121  - \`null\` or \`undefined\` if the progress is indeterminate.
122
123Defaulting to \`null\`.`}var Uy=$y,BE=My;const zy=x.forwardRef(({className:e,value:t,...n},r)=>g.jsx(Uy,{ref:r,className:re("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:g.jsx(BE,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));zy.displayName=Uy.displayName;const WE=({question:e,expiryTime:t,responses:n,questionId:r})=>{const s=new Date,o=48*60*60*1e3,i=s.getTime()-(t.getTime()-o),a=t.getTime()-s.getTime(),l=Math.min(100,Math.max(0,i/o*100)),u=Math.max(0,Math.floor(a/(1e3*60*60))),c=Math.max(0,Math.floor(a%(1e3*60*60)/(1e3*60))),f=a<=0,d=async()=>{const v=`${window.location.origin}/respond?id=${r}`;try{await navigator.clipboard.writeText(v),$e.success("Share link copied to clipboard!")}catch{$e.error("Failed to copy link")}};return g.jsxs(en,{className:"w-full max-w-xl animate-fade-in shadow-md",children:[g.jsx(tn,{children:g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{children:[g.jsx(nn,{className:"text-2xl gradient-text",children:"Response Tracker"}),g.jsx(rn,{children:"Monitor responses to your question"})]}),g.jsx(Wt,{variant:"link",className:"text-sm p-0 h-auto",onClick:d,children:"Copy Share Link"})]})}),g.jsxs(Hn,{className:"space-y-6",children:[g.jsxs("div",{className:"rounded-lg bg-muted p-4",children:[g.jsx("h4",{className:"mb-2 font-medium",children:"Your Question"}),g.jsxs("p",{className:"text-sm italic",children:['"',e,'"']})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(J1,{className:"h-4 w-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm font-medium",children:"Time Remaining"})]}),g.jsx("span",{className:"text-sm font-medium",children:f?"Expired":`${u}h ${c}m`})]}),g.jsx(zy,{value:l,className:"h-2"})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(G1,{className:"h-4 w-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm font-medium",children:"Responses Collected"})]}),g.jsx("span",{className:"text-sm font-medium",children:n.length})]}),n.length>0&&g.jsxs("div",{className:"space-y-3",children:[g.jsx("h4",{className:"font-medium text-sm",children:"All Responses"}),g.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:n.map(h=>g.jsxs("div",{className:"rounded-lg border p-3 text-sm",children:[g.jsxs("div",{className:"flex items-center justify-between mb-1",children:[g.jsx("span",{className:"font-medium",children:h.name}),g.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(h.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),g.jsx("p",{className:"whitespace-pre-wrap",children:h.response})]}
123,h.id))})]})]})]})},By=["newsletters","newsletter","freelancing","freelance","side projects","side project","personal branding","branding","education","moving abroad","networking","marketing","content creation","entrepreneurship","consulting","remote work","project management","leadership","sales","business development","strategy","analytics","data analysis","finance","investment","startup","tech","technology","computer","coding","programming","design","writing","communication","presentation","teaching","training","web development","app development","automation","productivity","digital marketing","seo","content","blogging","photography","video editing","graphic design","social media","courses","certification","workshops","learning","studying","research","development","improvement","growth","problem solving","organizing","planning","managing","mentoring","coaching","advising","helping","supporting"],Wy=["kind","caring","compassionate","empathetic","understanding","patient","gentle","thoughtful","considerate","generous","warm hearted","warm-hearted","warm","funny","humorous","cheerful","positive","optimistic","enthusiastic","calm","peaceful","relaxed","confident","brave","courageous","friendly","outgoing","social","approachable","welcoming","loyal","trustworthy","honest","reliable","dependable","go-to person","go to person","helpful","smart","intelligent","wise","insightful","analytical","creative","strategic","detail-oriented","focused","efficient","productive","resourceful","innovative","practical","spontaneous","adventurous","curious","open-minded","flexible"],VE=["a","an","and","are","as","at","be","been","by","for","from","has","he","in","is","it","its","of","on","that","the","to","was","will","with","you","your","youre","also","very","really","so","quite","just","always","can","could","would","should","have","had","having","do","does","did","doing","they","them","their","theirs","we","us","our","ours"],ka=e=>e.toLowerCase().replace(/[^\w\s-]/g," ").replace(/\s+/g," ").trim(),HE=e=>{const t=ka(e);return[...By,...Wy].some(r=>t.includes(r.toLowerCase()))},qE=e=>{const t=new Set,n=ka(e);if([...By,...Wy].forEach(s=>{n.includes(s.toLowerCase())&&t.add(gc(s))}),t.size===0){const s=[",","&"," and ",";",`
124`];let o=[e];s.forEach(i=>{o=o.flatMap(a=>a.split(i))}),o.forEach(i=>{const a=ka(i);if(a.length>2){const l=a.split(/\s+/).filter(u=>!VE.includes(u)&&u.length>2);if(l.length<=3&&l.length>0){const u=l.join(" ");HE(u)&&t.add(gc(u))}}})}return Array.from(t)},gc=e=>{const t=ka(e);return{newsletters:"newsletter",freelance:"freelancing","side project":"side projects","warm hearted":"warm-hearted","go to person":"go-to person","problem solving":"problem solver","detail oriented":"detail-oriented","open minded":"open-minded",branding:"personal branding",content:"content creation",marketing:"digital marketing",design:"graphic design"}[t]||t},KE=e=>{const t={};e.forEach(({response:r})=>{qE(r).forEach(o=>{const i=gc(o);i.length>2&&(t[i]=(t[i]||0)+1)})});const n=Object.entries(t).map(([r,s])=>({keyword:r,count:s,confidence:Math.min(.9,.5+s*.1)})).sort((r,s)=>s.count-r.count).slice(0,20);return{keywords:n,totalKeywords:n.length}},QE=({question:e,responses:t,onNewQuestion:n})=>{const r=x.useMemo(()=>{if(t.length===0)return{totalResponses:0,totalKeywords:0,keywords:[],allResponses:[]};const l=t.length,{keywords:u,totalKeywords:c}=KE(t),f=t.sort((d,h)=>new Date(h.timestamp).getTime()-new Date(d.timestamp).getTime());return{totalResponses:l,totalKeywords:c,keywords:u,allResponses:f}},[t]),{totalResponses:s,totalKeywords:o,keywords:i,allResponses:a}=r;return t.length===0?g.jsx("div",{className:"w-full max-w-4xl mx-auto animate-fade-in",children:g.jsx("div",{className:"bg-gradient-to-br from-background to-muted rounded-3xl p-12 text-center border border-border/50",children:g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"text-6xl mb-4",children:"🤔"}),g.jsx("div",{className:"bg-card/50 backdrop-blur-sm rounded-2xl p-6 border border-border/30 mb-6",children:g.jsxs("p",{className:"text-xl font-medium mb-2",children:['"',e,'"']})}),g.jsx("h1",{className:"text-4xl font-bold gradient-text mb-4",children:"Sorry, there was no response"}),g.jsx("p",{className:"text-lg text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Sometimes questions don't get responses right away. It happens to the best of us! Let's try with a different question that might spark more conversations."}),n&&g.jsx("button",{onClick:n,className:"bg-primary text-primary-foreground hover:bg-primary/90 px-8 py-3 rounded-lg font-medium text-lg transition-colors",children:"Create Another Question"})]})})}):g.jsxs("div",{className:"w-full max-w-6xl mx-auto animate-fade-in",children:[g.jsx("div",{className:"bg-gradient-to-br from-background to-muted rounded-3xl p-8 mb-8 border border-border/50",children:g.jsxs("div",{className:"text-center space-y-4",children:[g.jsx("h1",{className:"text-4xl font-bold gradient-text",children:"Your Results"}),g.jsxs("div",{className:"bg-card/50 backdrop-blur-sm rounded-2xl p-6 border border-border/30",children:[g.jsxs("p",{className:"text-2xl font-medium mb-2",children:['"',e,'"']}),g.jsxs("p",{className:"text-muted-foreground",children:["Analyzed ",t.length," heartfelt responses from your friends"]})]})]})}),g.jsxs("div",{className:"mb-12",children:[g.jsx("h2",{className:"text-2xl font-bold text-center mb-6",children:"Response Statistics"}),g.jsxs("div",{className:"flex items-center justify-center gap-8",children:[g.jsx("div",{className:"w-32 sm:w-40",children:g.jsxs("div",{className:"bg-gradient-to-t from-blue-500/20 to-blue-500/40 border-blue-500/30 text-blue-500 rounded-2xl p-6 text-center border-2 h-32 hover:scale-105 transition-transform duration-300 flex flex-col justify-center",children:[g.jsx("div",{className:"text-3xl font-bold mb-2",children:s}),g.jsx("div",{className:"text-sm font-medium text-foreground",children:"Total Responses"})]})}),g.jsx("div",{className:"w-32 sm:w-40",children:g.jsxs("div",{className:"bg-gradient-to-t from-green-500/20 to-green-500/40 border-green-500/30 text-green-500 rounded-2xl p-6 text-center border-2 h-32 hover:scale-105 transition-transform duration-300 flex flex-col justify-center",children:[g.jsx("div",{className:"text-3xl font-bold mb-2",children:o}),g.jsx("div",{className:"text-sm font-medium text-foreground",children:"Skills Mentioned"})]})})]})]}),i.length>0&&g.jsxs("div",{className:"mb-12",children:[g.jsx("h2",{className:"text-2xl font-bold text-center mb-8",children:"Skills & Traits"}),g.jsx("div",{className:"flex flex-wrap gap-3 justify-center max-w-4xl mx-auto",children:i.map((l,u)=>{const f=["text-lg px-4 py-2","text-base px-3 py-2","text-sm px-3 py-1"][Math.min(Math.floor(u/4),2)];return g.jsxs("div",{className:`
125                    ${f}
126                    bg-primary/20 text-primary border-primary/30
127                    rounded-full border-2 font-medium
128                    hover:scale-110 transition-all duration-300
129                    hover:shadow-lg cursor-default
130                    capitalize flex items-center gap-2
131                  `,children:[l.keyword,g.jsx("span",{className:"bg-background/20 text-foreground text-xs px-1.5 py-0.5 rounded-full",children:l.count})]},l.keyword)})})]}),g.jsxs("div",{className:"space-y-6",children:[g.jsx("h2",{className:"text-2xl font-bold text-center",children:"All Responses"}),g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map(l
131=>g.jsxs("div",{className:"rounded-2xl p-6 border-2 bg-gradient-to-br from-card to-card/50 hover:shadow-xl transition-all duration-300 border-border/30",children:[g.jsxs("p",{className:"text-foreground leading-relaxed mb-4 italic whitespace-pre-wrap",children:['"',l.response,'"']}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("span",{className:"font-medium text-blue-500",children:["— ",l.name]}),g.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(l.timestamp).toLocaleDateString()})]})]},l.id))})]})]})},Vy=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:"relative w-full overflow-auto",children:g.jsx("table",{ref:n,className:re("w-full caption-bottom text-sm",e),...t})}));Vy.displayName="Table";const Hy=x.forwardRef(({className:e,...t},n)=>g.jsx("thead",{ref:n,className:re("[&_tr]:border-b",e),...t}));Hy.displayName="TableHeader";const qy=x.forwardRef(({className:e,...t},n)=>g.jsx("tbody",{ref:n,className:re("[&_tr:last-child]:border-0",e),...t}));qy.displayName="TableBody";const GE=x.forwardRef(({className:e,...t},n)=>g.jsx("tfoot",{ref:n,className:re("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));GE.displayName="TableFooter";const vc=x.forwardRef(({className:e,...t},n)=>g.jsx("tr",{ref:n,className:re("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));vc.displayName="TableRow";const Dr=x.forwardRef(({className:e,...t},n)=>g.jsx("th",{ref:n,className:re("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Dr.displayName="TableHead";const Mr=x.forwardRef(({className:e,...t},n)=>g.jsx("td",{ref:n,className:re("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Mr.displayName="TableCell";const YE=x.forwardRef(({className:e,...t},n)=>g.jsx("caption",{ref:n,className:re("mt-4 text-sm text-muted-foreground",e),...t}));YE.displayName="TableCaption";const JE=({questions:e,onQuestionDelete:t,onViewResponses:n})=>{const r=async s=>{try{await t(s),$e.success("Question deleted successfully")}catch{$e.error("Failed to delete question")}};return g.jsxs(en,{className:"w-full animate-fade-in shadow-md",children:[g.jsxs(tn,{children:[g.jsx(nn,{className:"text-2xl gradient-text",children:"Your Questions"}),g.jsx(rn,{children:"Track responses and manage your questions"})]}),g.jsx(Hn,{children:e.length===0?g.jsx("p",{className:"text-center text-muted-foreground py-4",children:"You haven't created any questions yet."}):g.jsxs(Vy,{children:[g.jsx(Hy,{children:g.jsxs(vc,{children:[g.jsx(Dr,{children:"Question"}),g.jsx(Dr,{children:"Created"}),g.jsx(Dr,{children:"Time Left"}),g.jsx(Dr,{children:"Responses"}),g.jsx(Dr,{className:"text-right",children:"Actions"})]})}),g.jsx(qy,{children:e.map(s=>{const o=new Date(s.expiryTime).getTime()-new Date().getTime(),i=Math.max(0,Math.floor(o/(1e3*60*60))),a=o<=0;return g.jsxs(vc,{children:[g.jsx(Mr,{className:"font-medium",children:s.question}),g.jsx(Mr,{children:new Date(s.createdAt).toLocaleDateString()}),g.jsx(Mr,{children:a?"Expired":`${i}h left`}),g.jsxs(Mr,{children:[s.responseCount," responses"]}),g.jsx(Mr,{className:"text-right",children:g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(Wt,{variant:"outline",onClick:()=>n(s.id),children:"View Responses"}),!a&&g.jsx(Wt,{variant:"ghost",size:"sm",onClick:()=>{const l=`${window.location.origin}/respond?id=${s.id}`;navigator.clipboard.writeText(l),$e.success("Share link copied to clipboard!")},children:"Copy Share Link"}),g.jsx(Wt,{variant:"destructive",size:"icon",onClick:()=>r(s.id),children:g.jsx(X1,{className:"h-4 w-4"})})]})})]},s.id)})})]})})]})},XE=({children:e})=>g.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-background to-secondary/30 flex flex-col items-center justify-center py-12 px-4",children:[e,g.jsx("footer",{className:"mt-16 text-center text-sm text-muted-foreground",children:g.jsxs("p",{children:["Made in"," ",g.jsx("a",{href:"https://lovable.dev/?ref=DARSHAN20",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Lovable"})," ","by"," ",g.jsx("a",{href:"https://darshan.design/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Darshan Gajara"})]})})]}),Hd=({showNewQuestionButton:e,onNewQuestion:t})=>{const n=cy(),r=()=>{n("/"),window.location.reload()};return g.jsxs("header",{className:"text-center mb-10",children:[g.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 gradient-text cursor-pointer hover:opacity-80 transition-opacity",onClick:r,children:"Wisdom of the Friends"}),g.jsx("p",{className:"text-xl text-muted-foreground max-w-md mx-auto",children:"Find out what your friends think about you."}),e&&g.jsx(Wt,{variant:"link",className:"mt-4",onClick:t,children:"Ask Another Question"})]})},ZE="modulepreload",eC=function(e){return"/"+e},Gh={},Go=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=eC(l),l in Gh)return;Gh[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":ZE,u||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},tC=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Go(async()=>{const{default:r}=await Promise.resolve().then(()=>$s);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};
131class qd extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class nC extends qd{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class rC extends qd{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class sC extends qd{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var yc;(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"})(yc||(yc={}));var oC=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class iC{constructor(t,{headers:n={},customFetch:r,region:s=yc.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=tC(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return oC(this,void 0,void 0,function*(){try{const{headers:s,method:o,body:i}=n;let a={},{region:l}=n;l||(l=this.region),l&&l!=="any"&&(a["x-region"]=l);let u;i&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&i instanceof Blob||i instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",u=i):typeof i=="string"?(a["Content-Type"]="text/plain",u=i):typeof FormData<"u"&&i instanceof FormData?u=i:(a["Content-Type"]="application/json",u=JSON.stringify(i)));const c=yield this.fetch(`${this.url}/${t}`,{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),s),body:u}).catch(v=>{throw new nC(v)}),f=c.headers.get("x-relay-error");if(f&&f==="true")throw new rC(c);if(!c.ok)throw new sC(c);let d=((r=c.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),h;return d==="application/json"?h=yield c.json():d==="application/octet-stream"?h=yield c.blob():d==="text/event-stream"?h=c:d==="multipart/form-data"?h=yield c.formData():h=yield c.text(),{data:h,error:null}}catch(s){return{data:null,error:s}}})}}var Ke={},Kd={},al={},Yo={},ll={},ul={},aC=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Cs=aC();const lC=Cs.fetch,Ky=Cs.fetch.bind(Cs),Qy=Cs.Headers,uC=Cs.Request,cC=Cs.Response,$s=Object.freeze(Object.defineProperty({__proto__:null,Headers:Qy,Request:uC,Response:cC,default:Ky,fetch:lC},Symbol.toStringTag,{value:"Module"})),dC=E0($s);var cl={};Object.defineProperty(cl,"__esModule",{value:!0});let fC=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
131de=t.code}};cl.default=fC;var Gy=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ul,"__esModule",{value:!0});const hC=Gy(dC),pC=Gy(cl);let mC=class{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=hC.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=Object.assign({},this.headers),this.headers[t]=n,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{var i,a,l;let u=null,c=null,f=null,d=o.status,h=o.statusText;if(o.ok){if(this.method!=="HEAD"){const p=await o.text();p===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=p:c=JSON.parse(p))}const y=(i=this.headers.Prefer)===null||i===void 0?void 0:i.match(/count=(exact|planned|estimated)/),b=(a=o.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");y&&b&&b.length>1&&(f=parseInt(b[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(u={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,f=null,d=406,h="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const y=await o.text();try{u=JSON.parse(y),Array.isArray(u)&&o.status===404&&(c=[],u=null,d=200,h="OK")}catch{o.status===404&&y===""?(d=204,h="No Content"):u={message:y}}if(u&&this.isMaybeSingle&&(!((l=u==null?void 0:u.details)===null||l===void 0)&&l.includes("0 rows"))&&(u=null,d=200,h="OK"),u&&this.shouldThrowOnError)throw new pC.default(u)}return{error:u,data:c,count:f,status:d,statusText:h}});return this.shouldThrowOnError||(s=s.catch(o=>{var i,a,l;return{error:{message:`${(i=o==null?void 0:o.name)!==null&&i!==void 0?i:"FetchError"}: ${o==null?void 0:o.message}`,details:`${(a=o==null?void 0:o.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=o==null?void 0:o.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),s.then(t,n)}returns(){return this}overrideTypes(){return this}};ul.default=mC;var gC=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};
vendor: 4,749 bytes, line 131
131Object.defineProperty(ll,"__esModule",{value:!0});const vC=gC(ul);let yC=class extends vC.default{select(t){let n=!1;const r=(t??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:o=s}={}){const i=o?`${o}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:s=r}={}){const o=typeof s>"u"?"offset":`${s}.offset`,i=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(i,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:o=!1,format:i="text"}={}){var a;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),u=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${i}; for="${u}"; options=${l};`,i==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};ll.default=yC;var wC=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yo,"__esModule",{value:!0});const xC=wC(ll);let bC=class extends xC.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="websearch"&&(o="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${o}fts${i}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};Yo.default=bC;
131var _C=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(al,"__esModule",{value:!0});const Gs=_C(Yo);let SC=class{constructor(t,{headers:n={},schema:r,fetch:s}){this.url=t,this.headers=n,this.schema=r,this.fetch=s}select(t,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let o=!1;const i=(t??"*").split("").map(a=>/\s/.test(a)&&!o?"":(a==='"'&&(o=!o),a)).join("");return this.url.searchParams.set("select",i),r&&(this.headers.Prefer=`count=${r}`),new Gs.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const s="POST",o=[];if(this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),r||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(t)){const i=t.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(i.length>0){const a=[...new Set(i)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new Gs.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:o=!0}={}){const i="POST",a=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&a.push(this.headers.Prefer),s&&a.push(`count=${s}`),o||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(t)){const l=t.reduce((u,c)=>u.concat(Object.keys(c)),[]);if(l.length>0){const u=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",u.join(","))}}return new Gs.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),this.headers.Prefer=s.join(","),new Gs.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new Gs.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};al.default=SC;var dl={},fl={};Object.defineProperty(fl,"__esModule",{value:!0});fl.version=void 0;fl.version="0.0.0-automated";Object.defineProperty(dl,"__esModule",{value:!0});dl.DEFAULT_HEADERS=void 0;const kC=fl;dl.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${kC.version}`};var Yy=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kd,"__esModule",{value:!0});const EC=Yy(al),CC=Yy(Yo),TC=dl;let PC=class Jy{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=Object.assign(Object.assign({},TC.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=s}from(t){const n=new URL(`${this.url}/${t}`);return new EC.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new Jy(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:s=!1,count:o}={}){let i;const a=new URL(`${this.url}/rpc/${t}`);let l;r||s?(i=r?"HEAD":"GET",Object.entries(n).filter(([c,f])=>f!==void 0).map(([c,f])=>[c,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([c,f])=>{a.searchParams.append(c,f)})):(i="POST",l=n);const u=Object.assign({},this.headers);return o&&(u.Prefer=`count=${o}`),new CC.default({method:i,url:a,headers:u,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};Kd.default=PC;var Ds=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.PostgrestError=Ke.PostgrestBuilder=Ke.PostgrestTransformBuilder=Ke.PostgrestFilterBuilder=Ke.PostgrestQueryBuilder=Ke.PostgrestClient=void 0;const Xy=Ds(Kd);Ke.PostgrestClient=Xy.default;const Zy=Ds(al);Ke.PostgrestQueryBuilder=Zy.default;const e0=Ds(Yo);Ke.PostgrestFilterBuilder=e0.default;const t0=Ds(ll);Ke.PostgrestTransformBuilder=t0.default;const n0=Ds(ul);Ke.PostgrestBuilder=n0.default;const r0=Ds(cl);Ke.PostgrestError=r0.default;var RC=Ke.default={PostgrestClient:Xy.default,PostgrestQueryBuilder:Zy.default,PostgrestFilterBuilder:e0.default,PostgrestTransformBuilder:t0.default,PostgrestBuilder:n0.default,PostgrestError:r0.default};const{PostgrestClient:jC,PostgrestQueryBuilder:DP,PostgrestFilterBuilder:MP,PostgrestTransformBuilder:FP,PostgrestBuilder:UP,PostgrestError:zP}=RC;let wc;typeof window>"u"?wc=require("ws"):wc=window.WebSocket;const NC=wc,OC="2.11.10",AC={"X-Client-Info":`realtime-js/${OC}`},IC="1.0.0",s0=1e4,LC=1e3;var as;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(as||(as={}));var Me;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Me||(Me={}));var Et;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Et||(Et={}));var xc;(function(e){e.websocket="websocket"})(xc||(xc={}));var lr;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(lr||(lr={}));class $C{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const s=n.getUint8(1),o=n.getUint8(2);let i=this.HEADER_LENGTH+2;const a=r.decode(t.slice(i,i+s));i=i+s;const l=r.decode(t.slice(i,i+o));i=i+o;const u=JSON.parse(r.decode(t.slice(i,t.byteLength)));return{ref:null,topic:a,event:l,payload:u}}}class o0{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}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))}}var oe;(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"})(oe||(oe={}));const Yh=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((o,i)=>(o[i]=DC(i,e,t,s),o),{})},DC=(e,t,n,r)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=n[e];return o&&!r.includes(o)?i0(o,i):bc(i)},i0=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return zC(t,n)}switch(e){case oe.bool:return MC(t);case oe.float4:case oe.float8:case oe.int2:case oe.int4:case oe.int8:case oe.numeric:case oe.oid:return FC(t);case oe.json:case oe.jsonb:return UC(t);case oe.timestamp:return BC(t);case oe.abstime:case oe.date:case oe.daterange:case oe.int4range:case oe.int8range:case oe.money:case oe.reltime:case oe.text:case oe.time:case oe.timestamptz:case oe.timetz:case oe.tsrange:case oe.tstzrange:return bc(t);default:return bc(t)}},bc=e=>e,MC=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},FC=e=>{if(typeof e=="string"){const t=parseFloat(e);
vendor: 13,677 bytes, lines 131-136
131if(!Number.isNaN(t))return t}return e},UC=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},zC=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let o;const i=e.slice(1,n);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>i0(t,a))}return e},BC=e=>typeof e=="string"?e.replace(" ","T"):e,a0=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class eu{constructor(t,n,r={},s=s0){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,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()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Jh;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Jh||(Jh={}));class fo{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=fo.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=fo.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=fo.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const o=this.cloneDeep(t),i=this.transformState(n),a={},l={};return this.map(o,(u,c)=>{i[u]||(l[u]=c)}),this.map(i,(u,c)=>{const f=o[u];if(f){const d=c.map(b=>b.presence_ref),h=f.map(b=>b.presence_ref),v=c.filter(b=>h.indexOf(b.presence_ref)<0),y=f.filter(b=>d.indexOf(b.presence_ref)<0);v.length>0&&(a[u]=v),y.length>0&&(l[u]=y)}else a[u]=c}),this.syncDiff(o,{joins:a,leaves:l},r,s)}static syncDiff(t,n,r,s){const{joins:o,leaves:i}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(o,(a,l)=>{var u;const c=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),c.length>0){const f=t[a].map(h=>h.presence_ref),d=c.filter(h=>f.indexOf(h.presence_ref)<0);t[a].unshift(...d)}r(a,c,l)}),this.map(i,(a,l)=>{let u=t[a];if(!u)return;const c=l.map(f=>f.presence_ref);u=u.filter(f=>c.indexOf(f.presence_ref)<0),t[a]=u,s(a,u,l),u.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Xh;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Xh||(Xh={}));var Zh;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Zh||(Zh={}));var Yt;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Yt||(Yt={}));class Qd{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Me.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new eu(this,Et.join,this.params,this.timeout),this.rejoinTimer=new o0(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Me.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Me.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Me.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Me.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Et.reply,{},(s,o)=>{this._trigger(this._replyEventName(o),s)}),this.presence=new fo(this),this.broadcastEndpointURL=a0(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var r,s;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:o,presence:i,private:a}}=this.params;this._onError(c=>t==null?void 0:t(Yt.CHANNEL_ERROR,c)),this._onClose(()=>t==null?void 0:t(Yt.CLOSED));const l={},u={broadcast:o,presence:i,postgres_changes:(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(c=>c.filter))!==null&&s!==void 0?s:[],private:a};this.socket.accessTokenValue&&(l.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:u},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:c})=>{var f;if(this.socket.setAuth(),c===void 0){t==null||t(Yt.SUBSCRIBED);return}else{const d=this.bindings.postgres_changes,h=(f=d==null?void 0:d.length)!==null&&f!==void 0?f:0,v=[];for(let y=0;y<h;y++){const b=d[y],{filter:{event:p,schema:m,table:w,filter:_}}=b,S=c&&c[y];if(S&&S.event===p&&S.schema===m&&S.table===w&&S.filter===_)v.push(Object.assign(Object.assign({},b),{id:S.id}));else{this.unsubscribe(),this.state=Me.errored,t==null||t(Yt.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,t&&t(Yt.SUBSCRIBED);return}}).receive("error",c=>{this.state=Me.errored,t==null||t(Yt.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(c).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Yt.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this._on(t,n,r)}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){const{event:o,payload:i}=t,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Me.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Et.close,"leave",this._joinRef())};return this.joinPush.destroy(),new Promise(r=>{const s=new eu(this,Et.leave,{},t);s.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),s.send(),this._canPush()||s.trigger("ok",{})})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.rejoinTimer&&clearTimeout(this.rejoinTimer.timer),this.joinPush.destroy()}async _fetchWithTimeout(t,n,r){const s=new AbortController,o=setTimeout(()=>s.abort(),r),i=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(o),i}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new eu(this,t,n,r);return this._canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,o;const i=t.toLocaleLowerCase(),{close:a,error:l,leave:u,join:c}=Et;if(r&&[a,l,u,c].indexOf(i)>=0&&r!==this._joinRef())return;let d=this._onMessage(i,n,r);if(n&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(h=>{var v,y,b;return((v=h.filter)===null||v===void 0?void 0:v.event)==="*"||((b=(y=h.filter)===null||y===void 0?void 0:y.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===i}).map(h=>h.callback(d,r)):(o=this.bindings[i])===null||o===void 0||o.filter(h=>{var v,y,b,p,m,w;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in h){const _=h.id,S=(v=h.filter)===null||v===void 0?void 0:v.event;return _&&((y=n.ids)===null||y===void 0?void 0:y.includes(_))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const _=(m=(p=h==null?void 0:h.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return _==="*"||_===((w=n==null?void 0:n.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===i}).map(h=>{if(typeof d=="object"&&"ids"in d){const v=d.data,{schema:y,table:b,commit_timestamp:p,type:m,errors:w}=v;d=Object.assign(Object.assign({},{schema:y,table:b,commit_timestamp:p,eventType:m,new:{},old:{},errors:w}),this._getPayloadRecords(v))}h.callback(d,r)})}_isClosed(){return this.state===Me.closed}_isJoined(){return this.state===Me.joined}_isJoining(){return this.state===Me.joining}_isLeaving(){return this.state===Me.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),o={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&Qd.isEqual(s.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Et.close,{},t)}_onError(t){this._on(Et.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Me.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Yh(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Yh(t.columns,t.old_record)),n}}const ep=()=>{},WC=`
132  addEventListener("message", (e) => {
133    if (e.data.event === "start") {
134      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
135    }
136  });`;class VC{constructor(t,n){var r;this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers=AC,this.params={},this.timeout=s0,this.heartbeatIntervalMs=25e3,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=ep,this.ref=0,this.logger=ep,this.conn=null,this.sendBuffer=[],this.serializer
136=new $C,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=o=>{let i;return o?i=o:typeof fetch>"u"?i=(...a)=>Go(async()=>{const{default:l}=await Promise.resolve().then(()=>$s);return{default:l}},void 0).then(({default:l})=>l(...a)):i=fetch,(...a)=>i(...a)},this.endPoint=`${t}/${xc.websocket}`,this.httpEndpoint=a0(t),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),(n!=null&&n.logLevel||n!=null&&n.log_level)&&(this.logLevel=n.logLevel||n.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const s=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;if(s&&(this.accessTokenValue=s,this.apiKey=s),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:o=>[1e3,2e3,5e3,1e4][o-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(o,i)=>i(JSON.stringify(o)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new o0(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch),n!=null&&n.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(n==null?void 0:n.worker)||!1,this.workerUrl=n==null?void 0:n.workerUrl}this.accessToken=(n==null?void 0:n.accessToken)||null}connect(){if(!this.conn){if(this.transport||(this.transport=NC),this.transport){typeof window<"u"&&this.transport===window.WebSocket?this.conn=new this.transport(this.endpointURL()):this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection();return}this.conn=new HC(this.endpointURL(),void 0,{close:()=>{this.conn=null}})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:IC}))}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset(),this.channels.forEach(r=>r.teardown()))}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels=this.channels.filter(r=>r._joinRef!==t._joinRef),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case as.connecting:return lr.Connecting;case as.open:return lr.Open;case as.closing:return lr.Closing;default:return lr.Closed}}isConnected(){return this.connectionState()===lr.Open}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===r);if(s)return s;{const o=new Qd(`realtime:${t}`,n,this);return this.channels.push(o),o}}push(t){const{topic:n,event:r,payload:s,ref:o}=t,i=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){let n=t||this.accessToken&&await this.accessToken()||this.accessTokenValue;this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{n&&r.updateJoinPayload({access_token:n,version:this.headers&&this.headers["X-Client-Info"]}),r.joinedOnce&&r._isJoined()&&r._push(Et.access_token,{access_token:n})}))}async sendHeartbeat(){var t;if(!this.isConnected()){this.heartbeatCallback("disconnected");return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),(t=this.conn)===null||t===void 0||t.close(LC,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),await this.setAuth()}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>
136this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:s,payload:o,ref:i}=n;r==="phoenix"&&s==="phx_reply"&&this.heartbeatCallback(n.payload.status=="ok"?"ok":"error"),i&&i===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${o.status||""} ${r} ${s} ${i&&"("+i+")"||""}`,o),Array.from(this.channels).filter(a=>a._isMember(r)).forEach(a=>a._trigger(s,o,i)),this.stateChangeCallbacks.message.forEach(a=>a(n))})}_onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);else{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.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(Et.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([WC],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}}class HC{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=as.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class Gd extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function ke(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class qC extends Gd{constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class _c extends Gd{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var KC=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const l0=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Go(async()=>{const{default:r}=await Promise.resolve().then(()=>$s);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},QC=()=>KC(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Go(()=>Promise.resolve().then(()=>$s),void 0)).Response:Response}),Sc=e=>{if(Array.isArray(e))return e.map(n=>Sc(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,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Sc(r)}),t};var Tr=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const tu=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),GC=(e,t,n)=>Tr(void 0,void 0,void 0,function*(){const r=yield QC();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(s=>{t(new qC(tu(s),e.status||500))}).catch(s=>{t(new _c(tu(s),s))}):t(new _c(tu(e),e))}),YC=(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"},t==null?void 0:t.headers),r&&(s.body=JSON.stringify(r)),Object.assign(Object.assign({},s),n))};function Jo(e,t,n,r,s,o){return Tr(this,void 0,void 0,function*(){return new Promise((i,a)=>{e(n,YC(t,r,s,o)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>GC(l,a,r))})})}function Ea(e,t,n,r){return Tr(this,void 0,void 0,function*(){return Jo(e,"GET",t,n,r)})}
136function En(e,t,n,r,s){return Tr(this,void 0,void 0,function*(){return Jo(e,"POST",t,r,s,n)})}function JC(e,t,n,r,s){return Tr(this,void 0,void 0,function*(){return Jo(e,"PUT",t,r,s,n)})}function XC(e,t,n,r){return Tr(this,void 0,void 0,function*(){return Jo(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function u0(e,t,n,r,s){return Tr(this,void 0,void 0,function*(){return Jo(e,"DELETE",t,r,s,n)})}var He=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const ZC={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},tp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class eT{constructor(t,n={},r,s){this.url=t,this.headers=n,this.bucketId=r,this.fetch=l0(s)}uploadOrUpdate(t,n,r,s){return He(this,void 0,void 0,function*(){try{let o;const i=Object.assign(Object.assign({},tp),s);let a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",this.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",this.encodeMetadata(l))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),s!=null&&s.headers&&(a=Object.assign(Object.assign({},a),s.headers));const u=this._removeEmptyFolders(n),c=this._getFinalPath(u),f=yield this.fetch(`${this.url}/object/${c}`,Object.assign({method:t,body:o,headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{})),d=yield f.json();return f.ok?{data:{path:u,id:d.Id,fullPath:d.Key},error:null}:{data:null,error:d}}catch(o){if(ke(o))return{data:null,error:o};throw o}})}upload(t,n,r){return He(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,s){return He(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(t),i=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${i}`);a.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:tp.upsert},s),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const f=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:c}),d=yield f.json();return f.ok?{data:{path:o,fullPath:d.Key},error:null}:{data:null,error:d}}catch(l){if(ke(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return He(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const s=Object.assign({},this.headers);n!=null&&n.upsert&&(s["x-upsert"]="true");const o=yield En(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:s}),i=new URL(this.url+o.url),a=i.searchParams.get("token");if(!a)throw new Gd("No token returned by API");return{data:{signedUrl:i.toString(),path:t,token:a},error:null}}catch(r){if(ke(r))return{data:null,error:r};throw r}})}update(t,n,r){return He(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return He(this,void 0,void 0,function*(){try{return{data:yield En(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(ke(s))return{data:null,error:s};throw s}})}copy(t,n,r){return He(this,void 0,void 0,function*(){try{return{data:{path:(yield En(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(ke(s))return{data:null,error:s};throw s}})}createSignedUrl(t,n,r){return He(this,void 0,void 0,function*(){try{let s=this._getFinalPath(t),o=yield En(this.fetch,`${this.url}/object/sign/${s}
136`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${i}`)},{data:o,error:null}}catch(s){if(ke(s))return{data:null,error:s};throw s}})}createSignedUrls(t,n,r){return He(this,void 0,void 0,function*(){try{const s=yield En(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(i=>Object.assign(Object.assign({},i),{signedUrl:i.signedURL?encodeURI(`${this.url}${i.signedURL}${o}`):null})),error:null}}catch(s){if(ke(s))return{data:null,error:s};throw s}})}download(t,n){return He(this,void 0,void 0,function*(){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),i=o?`?${o}`:"";try{const a=this._getFinalPath(t);return{data:yield(yield Ea(this.fetch,`${this.url}/${s}/${a}${i}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(ke(a))return{data:null,error:a};throw a}})}info(t){return He(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield Ea(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Sc(r),error:null}}catch(r){if(ke(r))return{data:null,error:r};throw r}})}exists(t){return He(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield XC(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(ke(r)&&r instanceof _c){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),s=[],o=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";o!==""&&s.push(o);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&s.push(l);let u=s.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${u}`)}}}remove(t){return He(this,void 0,void 0,function*(){try{return{data:yield u0(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(ke(n))return{data:null,error:n};throw n}})}list(t,n,r){return He(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},ZC),n),{prefix:t||""});return{data:yield En(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(ke(s))return{data:null,error:s};throw s}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const tT="2.7.1",nT={"X-Client-Info":`storage-js/${tT}`};var Ar=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class rT{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},nT),n),this.fetch=l0(r)}listBuckets(){return Ar(this,void 0,void 0,function*(){try{return{data:yield Ea(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(ke(t))return{data:null,error:t};throw t}})}getBucket(t){return Ar(this,void 0,void 0,function*(){try{return{data:yield Ea(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(ke(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return Ar(this,void 0,void 0,function*(){try{return{data:yield En(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(ke(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return Ar(this,void 0,void 0,function*(){try{return{data:yield JC(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(ke(r))return{data:null,error:r};throw r}})}emptyBucket(t){return Ar(this,void 0,void 0,function*(){try{return{data:yield En(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(ke(n))return{data:null,error:n};throw n}})}deleteBucket(t){return Ar(this,void 0,void 0,function*(){try{return{data:yield u0(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(ke(n))return{data:null,error:n};throw n}})}}class sT extends rT{constructor(t,n={},r){super(t,n,r)}from(t){return new eT(this.url,this.headers,t,this.fetch)}}
136const oT="2.50.0";let eo="";typeof Deno<"u"?eo="deno":typeof document<"u"?eo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?eo="react-native":eo="node";const iT={"X-Client-Info":`supabase-js-${eo}/${oT}`},aT={headers:iT},lT={schema:"public"},uT={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},cT={};var dT=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const fT=e=>{let t;return e?t=e:typeof fetch>"u"?t=Ky:t=fetch,(...n)=>t(...n)},hT=()=>typeof Headers>"u"?Qy:Headers,pT=(e,t,n)=>{const r=fT(n),s=hT();return(o,i)=>dT(void 0,void 0,void 0,function*(){var a;const l=(a=yield t())!==null&&a!==void 0?a:e;let u=new s(i==null?void 0:i.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(o,Object.assign(Object.assign({},i),{headers:u}))})};var mT=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};function gT(e){return e.endsWith("/")?e:e+"/"}function vT(e,t){var n,r;const{db:s,auth:o,realtime:i,global:a}=e,{db:l,auth:u,realtime:c,global:f}=t,d={db:Object.assign(Object.assign({},l),s),auth:Object.assign(Object.assign({},u),o),realtime:Object.assign(Object.assign({},c),i),global:Object.assign(Object.assign(Object.assign({},f),a),{headers:Object.assign(Object.assign({},(n=f==null?void 0:f.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>mT(this,void 0,void 0,function*(){return""})};return e.accessToken?d.accessToken=e.accessToken:delete d.accessToken,d}const c0="2.70.0",Fr=30*1e3,kc=3,nu=kc*Fr,yT="http://localhost:9999",wT="supabase.auth.token",xT={"X-Client-Info":`gotrue-js/${c0}`},Ec="X-Supabase-Api-Version",d0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},bT=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,_T=6e5;class Yd extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function B(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class ST extends Yd{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function kT(e){return B(e)&&e.name==="AuthApiError"}class f0 extends Yd{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class nr extends Yd{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class _n extends nr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ET(e){return B(e)&&e.name==="AuthSessionMissingError"}class Ei extends nr{constructor(){super("Auth session or user missing","AuthInvalidToken
136ResponseError",500,void 0)}}class Ci extends nr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ti extends nr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function CT(e){return B(e)&&e.name==="AuthImplicitGrantRedirectError"}class np extends nr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Cc extends nr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function ru(e){return B(e)&&e.name==="AuthRetryableFetchError"}class rp extends nr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class ho extends nr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ca="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),sp=` 	
137\r=`.split(""),TT=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<sp.length;t+=1)e[sp[t].charCodeAt(0)]=-2;for(let t=0;t<Ca.length;t+=1)e[Ca[t].charCodeAt(0)]=t;return e})();function op(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(Ca[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(Ca[r]),t.queuedBits-=6}}function h0(e,t,n){const r=TT[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 ip(e){const t=[],n=i=>{t.push(String.fromCodePoint(i))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{jT(i,r,n)};for(let i=0;i<e.length;i+=1)h0(e.charCodeAt(i),s,o);return t.join("")}function PT(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 RT(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}PT(r,t)}}function jT(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 NT(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)h0(e.charCodeAt(s),n,r);return new Uint8Array(t)}function OT(e){const t=[];return RT(e,n=>t.push(n)),new Uint8Array(t)}function AT(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>op(s,n,r)),op(null,n,r),t.join("")}function IT(e){return Math.round(Date.now()/1e3)+e}function LT(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const xt=()=>typeof window<"u"&&typeof document<"u",sr={tested:!1,writable:!1},po=()=>{if(!xt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(sr.tested)return sr.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),sr.tested=!0,sr.writable=!0}catch{sr.tested=!0,sr.writable=!1}return sr.writable};function $T(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const p0=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Go(async()=>{const{default:r}=await Promise.resolve().then(()=>$s);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},DT=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",m0=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Pi=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ri=async(e,t)=>{await e.removeItem(t)};class hl{constructor(){this.promise=new hl.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}hl.promiseConstructor=Promise;function su(e){const t=e.split(".");if(t.length!==3)throw new ho("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!bT.test(t[r]))throw new ho("JWT not in base64url format");return{header:JSON.parse(ip(t[0])),payload:JSON.parse(ip(t[1])),signature:NT(t[2]),raw:{header:t[0],payload:t[1]}}}async function MT(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function FT(e,t){return new Promise((r,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){r(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function UT(e){return("0"+e.toString(16)).substr(-2)}function zT(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let o=0;o<56;o++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,UT).join("")}async function BT(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",
137n),s=new Uint8Array(r);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function WT(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 BT(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ir(e,t,n=!1){const r=zT();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await m0(e,`${t}-code-verifier`,s);const o=await WT(r);return[o,r===o?"plain":"s256"]}const VT=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function HT(e){const t=e.headers.get(Ec);if(!t||!t.match(VT))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function qT(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 KT(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 QT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Lr(e){if(!QT.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}var GT=function(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 ar=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),YT=[502,503,504];async function ap(e){var t;if(!DT(e))throw new Cc(ar(e),0);if(YT.includes(e.status))throw new Cc(ar(e),e.status);let n;try{n=await e.json()}catch(o){throw new f0(ar(o),o)}let r;const s=HT(e);if(s&&s.getTime()>=d0["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 rp(ar(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new _n}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((o,i)=>o&&typeof i=="string",!0))throw new rp(ar(n),e.status,n.weak_password.reasons);throw new ST(ar(n),e.status||500,r)}const JT=(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 G(e,t,n,r){var s;const o=Object.assign({},r==null?void 0:r.headers);o[Ec]||(o[Ec]=d0["2024-01-01"].name),r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const i=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(i.redirect_to=r.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await XT(e,t,n+a,{headers:o,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 XT(e,t,n,r,s,o){const i=JT(t,r,s,o);let a;try{a=await e(n,Object.assign({},i))}catch(l){throw console.error(l),new Cc(ar(l),0)}if(a.ok||await ap(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await ap(l)}}function Qt(e){var t;let n=null;nP(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=IT(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function lp(e){const t=Qt(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 Pn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function ZT(e){return{data:e,error:null}}function eP(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o}=e,i=GT(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:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function tP(e){return e}function nP(e){return e.access_token&&e.refresh_token&&e.expires_in}const ou=["global","local","others"];var rP=function(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};class sP{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=p0(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n=ou[0]){if(ou.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${ou.join(", ")}`);try{return await G(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(B(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await G(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Pn})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=rP(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 G(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:eP,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(B(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await G(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Pn})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await G(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:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:tP});if(c.error)throw c.error;const f=await c.json(),d=(i=c.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
1370&&(h.forEach(v=>{const y=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(d)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(B(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Lr(t);try{return await G(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Pn})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Lr(t);try{return await G(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Pn})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Lr(t);try{return await G(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Pn})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Lr(t.userId);try{const{data:n,error:r}=await G(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(B(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Lr(t.userId),Lr(t.id);try{return{data:await G(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(B(n))return{data:null,error:n};throw n}}}const oP={getItem:e=>po()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{po()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{po()&&globalThis.localStorage.removeItem(e)}};function up(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function iP(){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)}}const $r={debug:!!(globalThis&&po()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class g0 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class aP extends g0{}async function lP(e,t,n){$r.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),$r.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){$r.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{$r.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw $r.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new aP(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if($r.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}iP();const uP={url:yT,storageKey:wT,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:xT,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function cp(e,t,n){return await n()}class Fo{constructor(t){var n,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=Fo.nextInstanceID,Fo.nextInstanceID+=1,this.instanceID>0&&xt()&&console.warn("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.");const s=Object.assign(Object.assign({},uP),t);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new sP({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=p0(s.fetch),this.lock=s.lock||cp,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:xt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=lP:this.lock=cp,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)},this.persistSession?s.storage?this.storage=s.storage:po()?this.storage=oP:(this.memoryStorage={},this.storage=up(this.memoryStorage)):(this.memoryStorage={},this.storage=up(this.memoryStorage)),xt()&&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)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${c0}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=$T(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),xt()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:o}=await this._getSessionFromURL(n,r);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),CT(o)){const l=(t=o.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:o}}return await this._removeSession(),{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return B(n)?{error:n}:{error:new f0("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const o=await G(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:Qt}),{data:i,error:a}=o;if(a||!i)return{data:{user:null,session:null},error:a};const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(o){if(B(o))return{data:{user:null,session:null},error:o};throw o}}async signUp(t){var n,r,s;try{let o;if("email"in t){const{email:c,password:f,options:d}=t;let h=null,v=null;this.flowType==="pkce"&&([h,v]=await Ir(this.storage,this.storageKey)),o=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:c,password:f,data:(n=d==null?void 0:d.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:h,code_challenge_method:v},xform:Qt})}else if("phone"in t){const{phone:c,password:f,options:d}=t;o=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:f,data:(r=d==null?void 0:d.data)!==null&&r!==void 0?r:{},channel:(s=d==null?void 0:d.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:Qt})}else throw new Ci("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return{data:{user:null,session:null},error:a};const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(o){if(B(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(t){try{let n;if("email"in t){const{email:o,password:i,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:lp})}else if("phone"in t){const{phone:o,password:i,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:lp})}else throw new Ci("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Ei}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(B(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,s,o;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:(o=t.o
137ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;if(n==="solana")return await this.signInWithSolana(t);throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}async signInWithSolana(t){var n,r,s,o,i,a,l,u,c,f,d,h;let v,y;if("message"in t)v=t.message,y=t.signature;else{const{chain:b,wallet:p,statement:m,options:w}=t;let _;if(xt())if(typeof p=="object")_=p;else{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 p!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=p}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()}`,...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.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}`]:[],...!((f=(c=w==null?void 0:w.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||f===void 0)&&f.length?["Resources",...w.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(`
138`);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:b,error:p}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:AT(y)},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Qt});if(p)throw p;return!b||!b.session||!b.user?{data:{user:null,session:null},error:new Ei}:(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:p})}catch(b){if(B(b))return{data:{user:null,session:null},error:b};throw b}}async _exchangeCodeForSession(t){const n=await Pi(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:o,error:i}=await G(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Qt});if(await Ri(this.storage,`${this.storageKey}-code-verifier`),i)throw i;return!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new Ei}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(B(o))return{data:{user:null,session:null,redirectType:null},error:o};throw o}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:o,nonce:i}=t,a=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Qt}),{data:l,error:u}=a;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Ei}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(B(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,s,o,i;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Ir(this.storage,this.storageKey));const{error:f}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new Ci("You must provide either an email or phone number.")}catch(a){if(B(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(t){var n,r;try{let s,o;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,o=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:i,error:a}=await G(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Qt});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,u=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(B(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(t){var n,r,s;try{let o=null,i=null;return this.flowType==="pkce"&&([o,i]=await Ir(this.storage,this.storageKey)),await G(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:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}
138:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:i}),headers:this.headers,xform:ZT})}catch(o){if(B(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>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 _n;const{error:s}=await G(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(t){if(B(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:o}=t,{error:i}=await G(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return{data:{user:null,session:null},error:i}}else if("phone"in t){const{phone:r,type:s,options:o}=t,{data:i,error:a}=await G(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return{data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a}}throw new Ci("You must provide either an email or phone number and a type")}catch(n){if(B(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}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.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Pi(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 valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<nu:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.storage.isServer){let i=this.suppressGetSessionWarning;t=new Proxy(t,{get:(l,u,c)=>(!i&&u==="user"&&(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."),i=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,u,c))})}return{data:{session:t},error:null}}const{session:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?{data:{session:null},error:o}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Pn}):await this._useSession(async n=>{var r,s,o;const{data:i,error:a}=n;
138if(a)throw a;return!(!((r=i.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new _n}:await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Pn})})}catch(n){if(B(n))return ET(n)&&(await this._removeSession(),await Ri(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:o}=r;if(o)throw o;if(!s.session)throw new _n;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Ir(this.storage,this.storageKey));const{data:u,error:c}=await G(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:Pn});if(c)throw c;return i.user=u.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),{data:{user:i.user},error:null}})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new _n;const n=Date.now()/1e3;let r=n,s=!0,o=null;const{payload:i}=su(t.access_token);if(i.exp&&(r=i.exp,s=r<=n),s){const{session:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;o={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(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(n){if(B(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:i,error:a}=n;if(a)throw a;t=(r=i.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new _n;const{session:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?{data:{user:null,session:null},error:o}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(B(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!xt())throw new Ti("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Ti(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 np("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ti("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 np("No code detected.");const{data:m,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:m.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:u}=t;if(!o||!a||!i||!u)throw new Ti("No session defined in URL");const c=Math.round(Date.now()/1e3),f=parseInt(a);let d=c+f;l&&(d=parseInt(l));const h=d-c;h*1e3<=Fr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${f}s`);const v=d-f;c-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,d,c):c-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,d,c);const{data:y,error:b}=await this._getUser(o);if(b)throw b;const p={provider_token:r,provider_refresh_token:s,access_token:o,expires_in:f,expires_at:d,refresh_token:i,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:p,redirectType:t.type},error:null}}catch(r){if(B(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Pi(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:o}=n;
138if(o)return{error:o};const i=(r=s.session)===null||r===void 0?void 0:r.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(kT(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return t!=="others"&&(await this._removeSession(),await Ri(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=LT(),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,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:o},error:i}=n;if(i)throw i;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){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",o),console.error(o)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Ir(this.storage,this.storageKey,!0));try{return await G(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:n.redirectTo})}catch(o){if(B(o))return{data:null,error:o};throw o}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(B(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:s}=await this._useSession(async o=>{var i,a,l,u,c;const{data:f,error:d}=o;if(d)throw d;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await G(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return xt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(B(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)throw i;return await G(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await FT(async s=>(s>0&&await MT(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await G(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Qt})),(s,o)=>{const i=200*Math.pow(2,s);return o&&ru(o)&&Date.now()+i-r<Fr})}catch(r){if(this._debug(n,"error",r),B(r))return{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 r=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),xt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const r=await Pi(this.storage,this.storageKey);if(this._debug(n,"session from storage",r),!this._isValidSession(r)){this._debug(n,"session is not val
138id"),r!==null&&await this._removeSession();return}const s=((t=r.expires_at)!==null&&t!==void 0?t:1/0)*1e3-Date.now()<nu;if(this._debug(n,`session has${s?"":" not"} expired with margin of ${nu}s`),s){if(this.autoRefreshToken&&r.refresh_token){const{error:o}=await this._callRefreshToken(r.refresh_token);o&&(console.error(o),ru(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(r){this._debug(n,"error",r),console.error(r);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new _n;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new hl;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new _n;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={session:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),B(o)){const i={session:null,error:o};return ru(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(i),i}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await m0(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await Ri(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&xt()&&(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(),Fr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const 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)/Fr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Fr}ms, refresh threshold is ${kc} ticks`),s<=kc&&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.isAcquireTimeout||t instanceof g0)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!xt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>
138{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[o,i]=await Ir(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);s.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await G(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(B(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)return{data:null,error:i};const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:l,error:u}=await G(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return u?{data:null,error:u}:(t.factorType==="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}`),{data:l,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return{data:null,error:o};const{data:i,error:a}=await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+i.expires_in},i)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",i),{data:i,error:a})})}catch(n){if(B(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(B(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],s=r.filter(i=>i.factor_type==="totp"&&i.status==="verified"),o=r.filter(i=>i.factor_type==="phone"&&i.status==="verified");return{data:{all:r,totp:s,phone:o},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:s},error:o}=t;if(o)return{data:null,error:o};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=su(s.access_token);let a=null;i.aal&&(a=i.aal);let l=a;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(f=>f.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=i.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(i=>i.kid===t);if(r||(r=this.jwks.keys.find(i=>i.kid===t),r&&this.jwks_cached_at+_T>Date.now()))return r;const{data:s,error:o}=await G(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;if(!s.keys||s.keys.length===0)throw new ho("JWKS is empty");if(this.jwks=s,this.jwks_cached_at=Date.now(),r=s.keys.find(i=>i.kid===t),!r)throw new ho("No matching signing key found in JWKS");return r}async getClaims(t,n={keys:[]}){try{let r=t;if(!r){const{data:h,error:v}
138=await this.getSession();if(v||!h.session)return{data:null,error:v};r=h.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=su(r);if(qT(o.exp),!s.kid||s.alg==="HS256"||!("crypto"in globalThis&&"subtle"in globalThis.crypto)){const{error:h}=await this.getUser(r);if(h)throw h;return{data:{claims:o,header:s,signature:i},error:null}}const u=KT(s.alg),c=await this.fetchJwk(s.kid,n),f=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,f,i,OT(`${a}.${l}`)))throw new ho("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(r){if(B(r))return{data:null,error:r};throw r}}}Fo.nextInstanceID=0;const cP=Fo;class dP extends cP{constructor(t){super(t)}}var fP=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class hP{constructor(t,n,r){var s,o,i;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const a=gT(t),l=new URL(a);this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const u=`sb-${l.hostname.split(".")[0]}-auth-token`,c={db:lT,realtime:cT,auth:Object.assign(Object.assign({},uT),{storageKey:u}),global:aT},f=vT(r??{},c);this.storageKey=(s=f.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=f.global.headers)!==null&&o!==void 0?o:{},f.accessToken?(this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((i=f.auth)!==null&&i!==void 0?i:{},this.headers,f.global.fetch),this.fetch=pT(n,this._getAccessToken.bind(this),f.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},f.realtime)),this.rest=new jC(new URL("rest/v1",l).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch}),f.accessToken||this._listenForAuthEvents()}get functions(){return new iC(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}get storage(){return new sT(this.storageUrl.href,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return fP(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,storageKey:o,flowType:i,lock:a,debug:l},u,c){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new dP({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),u),storageKey:o,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,flowType:i,lock:a,debug:l,fetch:c,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new VC(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}
138const pP=(e,t,n)=>new hP(e,t,n),mP="https://upzkpqabjxrxhutkuaqr.supabase.co",gP="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVwemtwcWFianhyeGh1dGt1YXFyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTAwOTM2NjAsImV4cCI6MjA2NTY2OTY2MH0.pqy7SaMcfQaXV5ThVk99jBjUzaDgiv8aRGjz0kecrcs",Xr=pP(mP,gP),iu=()=>{let e=localStorage.getItem("user_session");return e||(e=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),localStorage.setItem("user_session",e)),e},vP=()=>{const[e,t]=x.useState([]),[n,r]=x.useState(!0),s=async()=>{try{const a=iu(),{data:l,error:u}=await Xr.from("questions").select("*").eq("user_session",a).order("created_at",{ascending:!1});if(u)throw u;const c=await Promise.all((l||[]).map(async f=>{const{data:d,error:h}=await Xr.from("responses").select("*").eq("question_id",f.id).order("created_at",{ascending:!0});if(h)throw h;return{id:f.id,question:f.question_text,createdAt:new Date(f.created_at),expiryTime:new Date(f.expires_at),responseCount:(d==null?void 0:d.length)||0,responses:(d||[]).map(v=>({id:v.id,name:v.name,response:v.response_text,timestamp:v.created_at}))}}));t(c)}catch(a){console.error("Error fetching questions:",a)}finally{r(!1)}};return x.useEffect(()=>{s()},[]),{questions:e,loading:n,addQuestion:async(a,l)=>{try{const u=iu(),c=new Date(Date.now()+l*60*60*1e3),{data:f,error:d}=await Xr.from("questions").insert({question_text:a,expires_at:c.toISOString(),user_session:u}).select().single();if(d)throw d;const h={id:f.id,question:f.question_text,createdAt:new Date(f.created_at),expiryTime:new Date(f.expires_at),responseCount:0,responses:[]};return t(v=>[h,...v]),h}catch(u){throw console.error("Error adding question:",u),u}},deleteQuestion:async a=>{try{const l=iu(),{data:u,error:c}=await Xr.rpc("delete_user_question",{question_id:a,session_id:l});if(c)throw c;if(!u)throw new Error("Question not found or you do not have permission to delete it");t(f=>f.filter(d=>d.id!==a))}catch(l){throw console.error("Error deleting question:",l),l}},refreshQuestions:s}},yP=()=>{const[e,t]=x.useState("create"),[n,r]=x.useState(null),{questions:s,loading:o,addQuestion:i,deleteQuestion:a,refreshQuestions:l}=vP(),u=async(v,y)=>{try{const b=await i(v,y);r(b),t("share")}catch(b){console.error("Failed to create question:",b)}},c=async v=>{try{await a(v),(n==null?void 0:n.id)===v&&(t("create"),r(null))}catch(y){console.error("Failed to delete question:",y)}},f=async v=>{if(s.find(b=>b.id===v)){await l();const b=s.find(p=>p.id===v);b&&(r(b),new Date>=new Date(b.expiryTime)?t("results"):t("track"))}},d=()=>{t("create"),r(null)},h=()=>{switch(e){case"create":return g.jsxs("div",{className:"space-y-8",children:[g.jsx(OE,{onQuestionSubmit:u}),!o&&s.length>0&&g.jsx(JE,{questions:s,onQuestionDelete:c,onViewResponses:f})]});case"share":return n&&g.jsxs("div",{className:"space-y-6 flex flex-col items-center",children:[g.jsx(AE,{question:n.question,expiryTime:new Date(n.expiryTime),questionId:n.id}),g.jsx("div",{className:"flex justify-center",children:g.jsx("button",{onClick:()=>t("track"),className:"text-sm text-primary underline",children:"Track responses"})})]});case"track":return n&&g.jsx(WE,{question:n.question,expiryTime:new Date(n.expiryTime),responses:n.responses||[],questionId:n.id});case"results":return n&&g.jsx(QE,{question:n.question,responses:n.responses||[],onNewQuestion:d});default:return null}};return g.jsxs(XE,{children:[g.jsx(Hd,{showNewQuestionButton:e!=="create",onNewQuestion:d}),g.jsx("main",{className:"w-full max-w-4xl mx-auto flex flex-col items-center",children:h()})]})},wP=()=>{const[e,t]=x.useState(""),[n,r]=x.useState(""),[s,o]=x.useState(!1),[i,a]=x.useState(!1),[l,u]=x.useState(!1),[c,f]=x.use
138State(""),[d,h]=x.useState(!0),[v,y]=x.useState(!1),b=sl(),p=cy(),w=new URLSearchParams(b.search).get("id")||"";x.useEffect(()=>{(async()=>{if(!w){$e.error("No question ID provided"),setTimeout(()=>p("/"),3e3);return}try{const{data:k,error:E}=await Xr.from("questions").select("*").eq("id",w).single();if(E){console.error("Error fetching question:",E),$e.error("Question not found"),setTimeout(()=>p("/"),2e3);return}if(k){f(k.question_text);const T=new Date,I=new Date(k.expires_at);T>=I&&u(!0)}}catch(k){console.error("Error loading question:",k),$e.error("Error loading question"),setTimeout(()=>p("/"),2e3)}finally{h(!1)}})()},[w,p]);const _=async S=>{if(S.preventDefault(),y(!1),!n.trim()){y(!0),$e.error("Please enter your response");return}o(!0);try{const{error:k}=await Xr.from("responses").insert({question_id:w,name:e.trim()||"Anonymous",response_text:n.trim()});if(k)throw k;a(!0),$e.success("Your response has been submitted")}catch(k){console.error("Error submitting response:",k),$e.error("Failed to submit response. Please try again.")}finally{o(!1)}};return d?g.jsx(en,{className:"w-full max-w-xl mx-auto mt-10 animate-fade-in shadow-md",children:g.jsxs(tn,{children:[g.jsx(nn,{className:"text-2xl text-center text-gray-700",children:"Loading..."}),g.jsx(rn,{className:"text-center",children:"Please wait while we load the question."})]})}):l?g.jsxs(en,{className:"w-full max-w-xl mx-auto mt-10 animate-fade-in shadow-md",children:[g.jsxs(tn,{children:[g.jsx(nn,{className:"text-2xl text-center text-gray-700",children:"This Question Has Expired"}),g.jsx(rn,{className:"text-center",children:"The time window for responses has closed."})]}),g.jsx(Hn,{className:"text-center",children:g.jsx("p",{children:"The person who shared this question is no longer accepting responses."})})]}):i?g.jsxs(en,{className:"w-full max-w-xl mx-auto mt-10 animate-fade-in shadow-md",children:[g.jsxs(tn,{children:[g.jsx(nn,{className:"text-2xl text-center gradient-text",children:"Thank You!"}),g.jsx(rn,{className:"text-center",children:"Your response has been recorded"})]}),g.jsxs(Hn,{className:"text-center space-y-4",children:[g.jsx("p",{children:"Your insight will help your friend gain valuable perspective."}),g.jsx("div",{className:"pt-4 border-t",children:g.jsx("button",{onClick:()=>p("/"),className:"text-sm text-primary underline hover:no-underline",children:"Create your own question"})})]})]}):g.jsx(en,{className:"w-full max-w-xl mx-auto mt-10 animate-fade-in shadow-md",children:g.jsxs("form",{onSubmit:_,children:[g.jsxs(tn,{children:[g.jsx(nn,{className:"text-2xl text-center gradient-text",children:"Your Friend Wants Your Input"}),g.jsx(rn,{className:"text-center",children:"Please share your honest perspective"})]}),g.jsxs(Hn,{className:"space-y-4",children:[g.jsxs("div",{className:"rounded-lg bg-muted p-4 mb-4",children:[g.jsx("h4",{className:"mb-2 font-medium",children:"The Question"}),g.jsxs("p",{className:"text-lg font-medium italic",children:['"',c,'"']})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"name",className:"text-sm font-medium",children:"Your Name (Optional)"}),g.jsx(Bd,{id:"name",placeholder:"Enter your name or leave blank for anonymous",value:e,onChange:S=>t(S.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"response",className:"text-sm font-medium",children:"Your Response"}),g.jsx(Fd,{id:"response",placeholder:"Share your honest thoughts...",value:n,onChange:S=>{r(S.target.value),v&&S.target.value.trim()&&y(!1)},className:`min-h-32 resize-none ${v?"border-destructive focus-visible:ring-destructive":""}`}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Your response will be shared anonymously with your friend."})]})]}),g.jsxs(ol,{className:"flex flex-col gap-3",children:[g.jsx(Wt,{type:"submit",className:"w-full",disabled:s,children:s?"Submitting...":"Submit Response"}),g.jsx("div",{className:"text-center pt-2 border-t",children:g.jsx("button",{type:"button",onClick:()=>p("/"),className:"text-sm text-primary underline hover:no-underline",children:"Create your own question"})})]})]})})},xP=()=>(x.useEffect(()=>{document.title="Respond to Question | Friend Wisdom"},[]),g.jsxs("div",{className:"container py-12 max-w-6xl mx-auto px-4",children:[g.jsx(Hd,{}),g.jsx(wP,{})]})),bP=()=>{const e=sl();return x.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),g.jsx("div",{className:"min-h-screen bg-background",children:g.jsxs("div",{className:"container py-12 max-w-6xl mx-auto px-4",children:[g.jsx(Hd,{}),g.jsx("div",{className:"flex items-center justify-center",children:g.jsxs("div",{className:"text-center",children:[g.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),g.jsx("p",{className:"text-xl text-muted-foreground mb-4",children:"Oops! Page not found"}),g.jsx("a",{href:"/",className:"text-primary hover:text-primary/80 underline",children:"Return to Home"})]})})]})})},_P=new lk,SP=()=>g.jsx(ck,{client:_P,children:g.jsxs(FS,{children:[g.jsx(Lb,{}),g.jsx(c_,{}),g.jsx(nE,{children:g.jsxs(Zk,{children:[g.jsx(Hi,{path:"/",element:g.jsx(yP,{})}),g.jsx(Hi,{path:"/respond",element:g.jsx(xP,{})}),g.jsx(Hi,{path:"*",element:g.jsx(bP,{})})]})})]})});Ig(document.getElementById("root")).render(g.jsx(SP,{}));

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.