vendor: 6,122 bytes, lines 1-9
1var Ig=t=>{throw TypeError(t)};var bd=(t,e,n)=>e.has(t)||Ig("Cannot "+n);var j=(t,e,n)=>(bd(t,e,"read from private field"),n?n.call(t):e.get(t)),de=(t,e,n)=>e.has(t)?Ig("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ne=(t,e,n,r)=>(bd(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),nt=(t,e,n)=>(bd(t,e,"access private method"),n);var dl=(t,e,n,r)=>({set _(s){ne(t,e,s,n)},get _(){return j(t,e,r)}});function YE(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function ux(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dx={exports:{}},Tu={},hx={exports:{}},ae={};/** 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 Ka=Symbol.for("react.element"),JE=Symbol.for("react.portal"),QE=Symbol.for("react.fragment"),XE=Symbol.for("react.strict_mode"),eC=Symbol.for("react.profiler"),tC=Symbol.for("react.provider"),nC=Symbol.for("react.context"),rC=Symbol.for("react.forward_ref"),sC=Symbol.for("react.suspense"),iC=Symbol.for("react.memo"),oC=Symbol.for("react.lazy"),Lg=Symbol.iterator;function aC(t){return t===null||typeof t!="object"?null:(t=Lg&&t[Lg]||t["@@iterator"],typeof t=="function"?t:null)}var fx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},px=Object.assign,mx={};function ho(t,e,n){this.props=t,this.context=e,this.refs=mx,this.updater=n||fx}ho.prototype.isReactComponent={};ho.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};ho.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function gx(){}gx.prototype=ho.prototype;function _p(t,e,n){this.props=t,this.context=e,this.refs=mx,this.updater=n||fx}var kp=_p.prototype=new gx;kp.constructor=_p;px(kp,ho.prototype);kp.isPureReactComponent=!0;var Dg=Array.isArray,yx=Object.prototype.hasOwnProperty,Sp={current:null},vx={key:!0,ref:!0,__self:!0,__source:!0};function wx(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)yx.call(e,r)&&!vx.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Ka,type:t,key:i,ref:o,props:s,_owner:Sp.current}}function lC(t,e){return{$$typeof:Ka,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Ep(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ka}function cC(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Mg=/\/+/g;function _d(t,e){return typeof t=="object"&&t!==null&&t.key!=null?cC(""+t.key):e.toString(36)}function Kl(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Ka:case JE:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+_d(o,0):r,Dg(s)?(n="",t!=null&&(n=t.replace(Mg,"$&/")+"/"),Kl(s,e,n,"",function(c){return c})):s!=null&&(Ep(s)&&(s=lC(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Mg,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",Dg(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+_d(i,a);o+=Kl(i,e,n,l,s)}else if(l=aC(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+_d(i,a++),o+=Kl(i,e,n,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function hl(t,e,n){if(t==null)return t;var r=[],s=0;return Kl(t,r,"","",function(i){return e.call(n,i,s++)}),r}function uC(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var mt={current:null},Gl={transition:null},dC={ReactCurrentDispatcher:mt,ReactCurrentBatchConfig:Gl,ReactCurrentOwner:Sp};function xx(){throw Error("act(...) is not supported in production builds of React.")}ae.Children={map:hl,forEach:function(t,e,n){hl(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return hl(t,function(){e++}),e},toArray:function(t){return hl(t,function(e){return e})||[]},only:function(t){if(!Ep(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ae.Component=ho;ae.Fragment=QE;ae.Profiler=eC;ae.PureComponent=_p;ae.StrictMode=XE;ae.Suspense=sC;
vendor: 5,033 bytes, lines 9-25
9ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dC;ae.act=xx;ae.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=px({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=Sp.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)yx.call(e,l)&&!vx.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ka,type:t.type,key:s,ref:i,props:r,_owner:o}};ae.createContext=function(t){return t={$$typeof:nC,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:tC,_context:t},t.Consumer=t};ae.createElement=wx;ae.createFactory=function(t){var e=wx.bind(null,t);return e.type=t,e};ae.createRef=function(){return{current:null}};ae.forwardRef=function(t){return{$$typeof:rC,render:t}};ae.isValidElement=Ep;ae.lazy=function(t){return{$$typeof:oC,_payload:{_status:-1,_result:t},_init:uC}};ae.memo=function(t,e){return{$$typeof:iC,type:t,compare:e===void 0?null:e}};ae.startTransition=function(t){var e=Gl.transition;Gl.transition={};try{t()}finally{Gl.transition=e}};ae.unstable_act=xx;ae.useCallback=function(t,e){return mt.current.useCallback(t,e)};ae.useContext=function(t){return mt.current.useContext(t)};ae.useDebugValue=function(){};ae.useDeferredValue=function(t){return mt.current.useDeferredValue(t)};ae.useEffect=function(t,e){return mt.current.useEffect(t,e)};ae.useId=function(){return mt.current.useId()};ae.useImperativeHandle=function(t,e,n){return mt.current.useImperativeHandle(t,e,n)};ae.useInsertionEffect=function(t,e){return mt.current.useInsertionEffect(t,e)};ae.useLayoutEffect=function(t,e){return mt.current.useLayoutEffect(t,e)};ae.useMemo=function(t,e){return mt.current.useMemo(t,e)};ae.useReducer=function(t,e,n){return mt.current.useReducer(t,e,n)};ae.useRef=function(t){return mt.current.useRef(t)};ae.useState=function(t){return mt.current.useState(t)};ae.useSyncExternalStore=function(t,e,n){return mt.current.useSyncExternalStore(t,e,n)};ae.useTransition=function(){return mt.current.useTransition()};ae.version="18.3.1";hx.exports=ae;var b=hx.exports;const I=ux(b),Cp=YE({__proto__:null,default:I},[b]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var hC=b,fC=Symbol.for("react.element"),pC=Symbol.for("react.fragment"),mC=Object.prototype.hasOwnProperty,gC=hC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yC={key:!0,ref:!0,__self:!0,__source:!0};function bx(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)mC.call(e,r)&&!yC.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:fC,type:t,key:i,ref:o,props:s,_owner:gC.current}}Tu.Fragment=pC;Tu.jsx=bx;Tu.jsxs=bx;dx.exports=Tu;var d=dx.exports,_x={exports:{}},Dt={},kx={exports:{}},Sx={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function e(P,R){var V=P.length;P.push(R);e:for(;0<V;){var J=V-1>>>1,Z=P[J];if(0<s(Z,R))P[J]=R,P[V]=Z,V=J;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var R=P[0],V=P.pop();if(V!==R){P[0]=V;e:for(var J=0,Z=P.length,oe=Z>>>1;J<oe;){var le=2*(J+1)-1,Me=P[le],tt=le+1,pe=P[tt];if(0>s(Me,V))tt<Z&&0>s(pe,Me)?(P[J]=pe,P[tt]=V,J=tt):(P[J]=Me,P[le]=V,J=le);else if(tt<Z&&0>s(pe,V))P[J]=pe,P[tt]=V,J=tt;else break e}}return R}function s(P,R){var V=P.sortIndex-R.sortIndex;return V!==0?V:P.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,p=3,f=!1,m=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=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(P){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=P)r(c),R.sortIndex=R.expirationTime,e(l,R);else break;R=n(c)}}function _(P){if(y=!1,w(P),!m)if(n(l)!==null)m=!0,G(k);else{var R=n(c);R!==null&&re(_,R.startTime-P)}}function k(P,R){m=!1,y&&(y=!1,v(C),C=-1),f=!0;var V=p;try{for(w(R),h=n(l);h!==null&&(!(h.expirationTime>
vendor: 9,193 bytes, lines 25-34
25R)||P&&!O());){var J=h.callback;if(typeof J=="function"){h.callback=null,p=h.priorityLevel;var Z=J(h.expirationTime<=R);R=t.unstable_now(),typeof Z=="function"?h.callback=Z:h===n(l)&&r(l),w(R)}else r(l);h=n(l)}if(h!==null)var oe=!0;else{var le=n(c);le!==null&&re(_,le.startTime-R),oe=!1}return oe}finally{h=null,p=V,f=!1}}var S=!1,E=null,C=-1,A=5,T=-1;function O(){return!(t.unstable_now()-T<A)}function N(){if(E!==null){var P=t.unstable_now();T=P;var R=!0;try{R=E(!0,P)}finally{R?z():(S=!1,E=null)}}else S=!1}var z;if(typeof g=="function")z=function(){g(N)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,Q=M.port2;M.port1.onmessage=N,z=function(){Q.postMessage(null)}}else z=function(){x(N,0)};function G(P){E=P,S||(S=!0,z())}function re(P,R){C=x(function(){P(t.unstable_now())},R)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(P){P.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,G(k))},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(P){switch(p){case 1:case 2:case 3:var R=3;break;default:R=p}var V=p;p=R;try{return P()}finally{p=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(P,R){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var V=p;p=P;try{return R()}finally{p=V}},t.unstable_scheduleCallback=function(P,R,V){var J=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?J+V:J):V=J,P){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=V+Z,P={id:u++,callback:R,priorityLevel:P,startTime:V,expirationTime:Z,sortIndex:-1},V>J?(P.sortIndex=V,e(c,P),n(l)===null&&P===n(c)&&(y?(v(C),C=-1):y=!0,re(_,V-J))):(P.sortIndex=Z,e(l,P),m||f||(m=!0,G(k))),P},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(P){var R=p;return function(){var V=p;p=R;try{return P.apply(this,arguments)}finally{p=V}}}})(Sx);kx.exports=Sx;var vC=kx.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 wC=b,Ot=vC;function L(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ex=new Set,ca={};function Gs(t,e){Ki(t,e),Ki(t+"Capture",e)}function Ki(t,e){for(ca[t]=e,t=0;t<e.length;t++)Ex.add(e[t])}var sr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eh=Object.prototype.hasOwnProperty,xC=/^[: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]*$/,$g={},Vg={};function bC(t){return Eh.call(Vg,t)?!0:Eh.call($g,t)?!1:xC.test(t)?Vg[t]=!0:($g[t]=!0,!1)}function _C(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function kC(t,e,n,r){if(e===null||typeof e>"u"||_C(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function gt(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){et[t]=new gt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];et[e]=new gt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){et[t]=new gt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){et[t]=new gt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){et[t]=new gt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){et[t]=new gt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){et[t]=new gt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){et[t]=new gt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){et[t]=new gt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Tp=/[\-:]([a-z])/g;function Ap(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Tp,Ap);et[e]=new gt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Tp,Ap);et[e]=new gt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Tp,Ap);et[e]=new gt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){et[t]=new gt(t,1,!1,t.toLowerCase(),null,!1,!1)});et.xlinkHref=new gt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){et[t]=new gt(t,1,!1,t.toLowerCase(),null,!0,!0)});function Pp(t,e,n,r){var s=et.hasOwnProperty(e)?et[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(kC(e,n,s,r)&&(n=null),r||s===null?bC(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var dr=wC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fl=Symbol.for("react.element"),hi=Symbol.for("react.portal"),fi=Symbol.for("react.fragment"),Rp=Symbol.for("react.strict_mode"),Ch=Symbol.for("react.profiler"),Cx=Symbol.for("react.provider"),Tx=Symbol.for("react.context"),jp=Symbol.for("react.forward_ref"),Th=Symbol.for("react.suspense"),Ah=Symbol.for("react.suspense_list"),Np=Symbol.for("react.memo"),Sr=Symbol.for("react.lazy"),Ax=Symbol.for("react.offscreen"),Fg=Symbol.iterator;function Eo(t){return t===null||typeof t!="object"?null:(t=Fg&&t[Fg]||t["@@iterator"],typeof t=="function"?t:null)}var Re=Object.assign,kd;function Vo(t){if(kd===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);kd=e&&e[1]||""}return` 34`+kd+t}var Sd=!1;function Ed(t,e){if(!t||Sd)return"";Sd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 16,737 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),i=r.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Sd=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Vo(t):""}function SC(t){switch(t.tag){case 5:return Vo(t.type);case 16:return Vo("Lazy");case 13:return Vo("Suspense");case 19:return Vo("SuspenseList");case 0:case 2:case 15:return t=Ed(t.type,!1),t;case 11:return t=Ed(t.type.render,!1),t;case 1:return t=Ed(t.type,!0),t;default:return""}}function Ph(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case fi:return"Fragment";case hi:return"Portal";case Ch:return"Profiler";case Rp:return"StrictMode";case Th:return"Suspense";case Ah:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Tx:return(t.displayName||"Context")+".Consumer";case Cx:return(t._context.displayName||"Context")+".Provider";case jp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Np:return e=t.displayName||null,e!==null?e:Ph(t.type)||"Memo";case Sr:e=t._payload,t=t._init;try{return Ph(t(e))}catch{}}return null}function EC(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ph(e);case 8:return e===Rp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Zr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Px(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function CC(t){var e=Px(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function pl(t){t._valueTracker||(t._valueTracker=CC(t))}function Rx(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Px(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function _c(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Rh(t,e){var n=e.checked;return Re({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Bg(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Zr(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function jx(t,e){e=e.checked,e!=null&&Pp(t,"checked",e,!1)}function jh(t,e){jx(t,e);var n=Zr(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Nh(t,e.type,n):e.hasOwnProperty("defaultValue")&&Nh(t,e.type,Zr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Ug(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Nh(t,e,n){(e!=="number"||_c(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Fo=Array.isArray;function Ai(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Zr(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Oh(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(L(91));return Re({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function zg(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(L(92));if(Fo(n)){if(1<n.length)throw Error(L(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Zr(n)}}function Nx(t,e){var n=Zr(e.value),r=Zr(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Wg(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Ox(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ih(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Ox(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var ml,Ix=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(ml=ml||document.createElement("div"),ml.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=ml.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function ua(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Go={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},TC=["Webkit","ms","Moz","O"];Object.keys(Go).forEach(function(t){TC.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Go[e]=Go[t]})});function Lx(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Go.hasOwnProperty(t)&&Go[t]?(""+e).trim():e+"px"}function Dx(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Lx(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var AC=Re({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 Lh(t,e){if(e){if(AC[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(L(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(L(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(L(61))}if(e.style!=null&&typeof e.style!="object")throw Error(L(62))}}function Dh(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mh=null;function Op(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var $h=null,Pi=null,Ri=null;function Hg(t){if(t=Ya(t)){if(typeof $h!="function")throw Error(L(280));var e=t.stateNode;e&&(e=Nu(e),$h(t.stateNode,t.type,e))}}function Mx(t){Pi?Ri?Ri.push(t):Ri=[t]:Pi=t}function $x(){if(Pi){var t=Pi,e=Ri;if(Ri=Pi=null,Hg(t),e)for(t=0;t<e.length;t++)Hg(e[t])}}function Vx(t,e){return t(e)}function Fx(){}var Cd=!1;function Bx(t,e,n){if(Cd)return t(e,n);Cd=!0;try{return Vx(t,e,n)}finally{Cd=!1,(Pi!==null||Ri!==null)&&(Fx(),$x())}}function da(t,e){var n=t.stateNode;if(n===null)return null;var r=Nu(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(L(231,e,typeof n));return n}var Vh=!1;if(sr)try{var Co={};Object.defineProperty(Co,"passive",{get:function(){Vh=!0}}),window.addEventListener("test",Co,Co),window.removeEventListener("test",Co,Co)}catch{Vh=!1}function PC(t,e,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var Zo=!1,kc=null,Sc=!1,Fh=null,RC={onError:function(t){Zo=!0,kc=t}};function jC(t,e,n,r,s,i,o,a,l){Zo=!1,kc=null,PC.apply(RC,arguments)}function NC(t,e,n,r,s,i,o,a,l){if(jC.apply(this,arguments),Zo){if(Zo){var c=kc;Zo=!1,kc=null}else throw Error(L(198));Sc||(Sc=!0,Fh=c)}}function Zs(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Ux(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function qg(t){if(Zs(t)!==t)throw Error(L(188))}function OC(t){var e=t.alternate;if(!e){if(e=Zs(t),e===null)throw Error(L(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return qg(s),t;if(i===r)return qg(s),e;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?t:e}function zx(t){return t=OC(t),t!==null?Wx(t):null}function Wx(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Wx(t);if(e!==null)return e;t=t.sibling}return null}var Hx=Ot.unstable_scheduleCallback,Kg=Ot.unstable_cancelCallback,IC=Ot.unstable_shouldYield,LC=Ot.unstable_requestPaint,Le=Ot.unstable_now,DC=Ot.unstable_getCurrentPriorityLevel,Ip=Ot.unstable_ImmediatePriority,qx=Ot.unstable_UserBlockingPriority,Ec=Ot.unstable_NormalPriority,MC=Ot.unstable_LowPriority,Kx=Ot.unstable_IdlePriority,Au=null,Nn=null;function $C(t){if(Nn&&typeof Nn.onCommitFiberRoot=="function")try{Nn.onCommitFiberRoot(Au,t,void 0,(t.current.flags&128)===128)}catch{}}var mn=Math.clz32?Math.clz32:BC,VC=Math.log,FC=Math.LN2;function BC(t){return t>>>=0,t===0?32:31-(VC(t)/FC|0)|0}var gl=64,yl=4194304;function Bo(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Cc(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Bo(a):(i&=o,i!==0&&(r=Bo(i)))}else o=n&~s,o!==0?r=Bo(o):i!==0&&(r=Bo(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-mn(e),s=1<<n,r|=t[n],e&=~s;return r}function UC(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zC(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-mn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=UC(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Bh(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Gx(){var t=gl;return gl<<=1,!(gl&4194240)&&(gl=64),t}function Td(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Ga(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-mn(e),t[e]=n}function WC(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-mn(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function Lp(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-mn(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var me=0;function Zx(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Yx,Dp,Jx,Qx,Xx,Uh=!1,vl=[],Fr=null,Br=null,Ur=null,ha=new Map,fa=new Map,Tr=[],HC="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 Gg(t,e){switch(t){case"focusin":case"focusout":Fr=null;break;case"dragenter":case"dragleave":Br=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":ha.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":fa.delete(e.pointerId)}}function To(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=Ya(e),e!==null&&Dp(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function qC(t,e,n,r,s){switch(e){case"focusin":return Fr=To(Fr,t,e,n,r,s),!0;case"dragenter":return Br=To(Br,t,e,n,r,s),!0;case"mouseover":return Ur=To(Ur,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return ha.set(i,To(ha.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,fa.set(i,To(fa.get(i)||null,t,e,n,r,s)),!0}return!1}function eb(t){var e=bs(t.target);if(e!==null){var n=Zs(e);if(n!==null){if(e=n.tag,e===13){if(e=Ux(n),e!==null){t.blockedOn=e,Xx(t.priority,function(){Jx(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Zl(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=zh(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Mh=r,n.target.dispatchEvent(r),Mh=null}else return e=Ya(n),e!==null&&Dp(e),t.blockedOn=n,!1;e.shift()}return!0}function Zg(t,e,n){Zl(t)&&n.delete(e)}function KC(){Uh=!1,Fr!==null&&Zl(Fr)&&(Fr=null),Br!==null&&Zl(Br)&&(Br=null),Ur!==null&&Zl(Ur)&&(Ur=null),ha.forEac
vendor: 11,841 bytes, line 37
37h(Zg),fa.forEach(Zg)}function Ao(t,e){t.blockedOn===e&&(t.blockedOn=null,Uh||(Uh=!0,Ot.unstable_scheduleCallback(Ot.unstable_NormalPriority,KC)))}function pa(t){function e(s){return Ao(s,t)}if(0<vl.length){Ao(vl[0],t);for(var n=1;n<vl.length;n++){var r=vl[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Fr!==null&&Ao(Fr,t),Br!==null&&Ao(Br,t),Ur!==null&&Ao(Ur,t),ha.forEach(e),fa.forEach(e),n=0;n<Tr.length;n++)r=Tr[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Tr.length&&(n=Tr[0],n.blockedOn===null);)eb(n),n.blockedOn===null&&Tr.shift()}var ji=dr.ReactCurrentBatchConfig,Tc=!0;function GC(t,e,n,r){var s=me,i=ji.transition;ji.transition=null;try{me=1,Mp(t,e,n,r)}finally{me=s,ji.transition=i}}function ZC(t,e,n,r){var s=me,i=ji.transition;ji.transition=null;try{me=4,Mp(t,e,n,r)}finally{me=s,ji.transition=i}}function Mp(t,e,n,r){if(Tc){var s=zh(t,e,n,r);if(s===null)Md(t,e,r,Ac,n),Gg(t,r);else if(qC(s,t,e,n,r))r.stopPropagation();else if(Gg(t,r),e&4&&-1<HC.indexOf(t)){for(;s!==null;){var i=Ya(s);if(i!==null&&Yx(i),i=zh(t,e,n,r),i===null&&Md(t,e,r,Ac,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Md(t,e,r,null,n)}}var Ac=null;function zh(t,e,n,r){if(Ac=null,t=Op(r),t=bs(t),t!==null)if(e=Zs(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Ux(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ac=t,null}function tb(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(DC()){case Ip:return 1;case qx:return 4;case Ec:case MC:return 16;case Kx:return 536870912;default:return 16}default:return 16}}var Dr=null,$p=null,Yl=null;function nb(){if(Yl)return Yl;var t,e=$p,n=e.length,r,s="value"in Dr?Dr.value:Dr.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return Yl=s.slice(t,1<r?1-r:void 0)}function Jl(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function wl(){return!0}function Yg(){return!1}function Mt(t){function e(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?wl:Yg,this.isPropagationStopped=Yg,this}return Re(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=wl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),e}var fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vp=Mt(fo),Za=Re({},fo,{view:0,detail:0}),YC=Mt(Za),Ad,Pd,Po,Pu=Re({},Za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fp,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Po&&(Po&&t.type==="mousemove"?(Ad=t.screenX-Po.screenX,Pd=t.screenY-Po.screenY):Pd=Ad=0,Po=t),Ad)},movementY:function(t){return"movementY"in t?t.movementY:Pd}}),Jg=Mt(Pu),JC=Re({},Pu,{dataTransfer:0}),QC=Mt(JC),XC=Re({},Za,{relatedTarget:0}),Rd=Mt(XC),eT=Re({},fo,{animationName:0,elapsedTime:0,pseudoElement:0}),tT=Mt(eT),nT=Re({},fo,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),rT=Mt(nT),sT=Re({},fo,{data:0}),Qg=Mt(sT),iT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oT={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"},aT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lT(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=aT[t])?!!e[t]:!1}function Fp(){return lT}var cT=Re({},Za,{key:function(t){if(t.key){var e=iT[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Jl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?oT[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fp,charCode:function(t){return t.type==="keypress"?Jl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Jl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),uT=Mt(cT),dT=Re({},Pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xg=Mt(dT),hT=Re({},Za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fp}),fT=Mt(hT),pT=Re({},fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),mT=Mt(pT),gT=Re({},Pu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),yT=Mt(gT),vT=[9,13,27,32],Bp=sr&&"CompositionEvent"in window,Yo=null;sr&&"documentMode"in document&&(Yo=document.documentMode);var wT=sr&&"TextEvent"in window&&!Yo,rb=sr&&(!Bp||Yo&&8<Yo&&11>=Yo),ey=" ",ty=!1;function sb(t,e){switch(t){case"keyup":return vT.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ib(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var pi=!1;function xT(t,e){switch(t){case"compositionend":return ib(e);case"keypress":return e.which!==32?null:(ty=!0,ey);case"textInput":return t=e.data,t===ey&&ty?null:t;default:return null}}function bT(t,e){if(pi)return t==="compositionend"||!Bp&&sb(t,e)?(t=nb(),Yl=$p=Dr=null,pi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return rb&&e.locale!=="ko"?null:e.data;default:return null}}var _T={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 ny(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!_T[t.type]:e==="textarea"}function ob(t,e,n,r){Mx(r),e=Pc(e,"onChange"),0<e.length&&(n=new Vp("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Jo=null,ma=null;function kT(t){yb(t,0)}function Ru(t){var e=yi(t);if(Rx(e))return t}function ST(t,e){if(t==="change")return e}var ab=!1;if(sr){var jd;if(sr){var Nd="oninput"in document;if(!Nd){var ry=document.createElement("div");ry.setAttribute("oninput","return;"),Nd=typeof ry.oninput=="function"}jd=Nd}else jd=!1;ab=jd&&(!document.documentMode||9<document.documentMode)}function sy(){Jo&&(Jo.detachEvent("onpropertychange",lb),ma=Jo=null)}function lb(t){if(t.propertyName==="value"&&Ru(ma)){var e=[];ob(e,ma,t,Op(t)),Bx(kT,e)}}function ET(t,e,n){t==="focusin"?(sy(),Jo=e,ma=n,Jo.attachEvent("onpropertychange",lb)):t==="focusout"&&sy()}function CT(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ru(ma)}function TT(t,e){if(t==="click")return Ru(e)}function AT(t,e){if(t==="input"||t==="change")return Ru(e)}function PT(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var vn=typeof Object.is=="function"?Object.is:PT;function ga(t,e){if(vn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Eh.call(e,s)||!vn(t[s],e[s]))return!1}return!0}function iy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function oy(t,e){var n=iy(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=iy(n)}}function cb(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?cb(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ub(){for(var t=window,e=_c();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=_c(t.document)}return e}function Up(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function RT(t){var e=ub(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&cb(n.ownerDocument.documentElement,n)){if(r!==null&&Up(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=oy(n,i);var o=oy(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var jT=sr&&"documentMode"in document&&11>=document.documentMode,mi=null,Wh=null,Qo=null,Hh=!1;function ay(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hh||mi==null||mi!==_c(r)||(r=mi,"selectionStart"in r&&Up(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),Qo&&ga(Qo,r)||(Qo=r,r=Pc(Wh,"onSelect"),0<r.length&&(e=new Vp("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=mi)))}function xl(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var gi={animationend:xl("Animation","AnimationEnd"),animationiteration:xl("Animation","AnimationIteration"),animationstart:xl("Animation","AnimationStart"),transitionend:xl("Transition","TransitionEnd")},Od={},db={};sr&&(db=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function ju(t){if(Od[t])return Od[t];if(!gi[t])return t;var e=gi[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in db)return Od[t]=e[n];return t}var hb=ju("animationend"),fb=ju("animationiteration"),pb=ju("animationstart"),mb=ju("transitionend"),gb=new Map,ly="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 os(t,e){gb.set(t,e),Gs(e,[t])}for(var Id=0;Id<ly.length;Id++){var Ld=ly[Id],NT=Ld.toLowerCase(),OT=Ld[0].toUpperCase()+Ld.slice(1);os(NT,"on"+OT)}os(hb,"onAnimationEnd");os(fb,"onAnimationIteration");os(pb,"onAnimationStart");os("dblclick","onDoubleClick");os("focusin","onFocus");os("focusout","onBlur");os(mb,"onTransitionEnd");Ki("onMouseEnter",["mouseout","mouseover"]);Ki("onMouseLeave",["mouseout","mouseover"]);Ki("onPointerEnter",["pointerout","pointerover"]);Ki("onPointerLeave",["pointerout","pointerover"]);Gs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="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(" "),IT=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function cy(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,NC(r,e,void 0,t),t.currentTarget=null}function yb(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;cy(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;cy(s,a,c),i=l}}}if(Sc)throw t=Fh,Sc=!1,Fh=null,t}function _e(t,e){var n=e[Yh];n===void 0&&(n=e[Yh]=new Set);var r=t+"__bubble";n.has(r)||(vb(e,t,2,!1),n.add(r))}function Dd(t,e,n){var r=0;e&&(r|=4),vb(n,t,r,e)}var bl="_reactListening"+Math.random().toString(36).slice(2);function ya(t){if(!t[bl]){t[bl]=!0,Ex.forEach(function(n){n!=="selectionchange"&&(IT.has(n)||Dd(n,!1,t),Dd(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[bl]||(e[bl]=!0,Dd("selectionchange",!1,e))}}function vb(t,e,n,r){switch(tb(e)){case 1:var s=GC;break;case 4:s=ZC;break;default:s=Mp}n=s.bind(null,e,n,t),s=void 0,!Vh||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function Md(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;
vendor: 5,316 bytes, lines 37-38
37if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=bs(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Bx(function(){var c=i,u=Op(n),h=[];e:{var p=gb.get(t);if(p!==void 0){var f=Vp,m=t;switch(t){case"keypress":if(Jl(n)===0)break e;case"keydown":case"keyup":f=uT;break;case"focusin":m="focus",f=Rd;break;case"focusout":m="blur",f=Rd;break;case"beforeblur":case"afterblur":f=Rd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Jg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=QC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=fT;break;case hb:case fb:case pb:f=tT;break;case mb:f=mT;break;case"scroll":f=YC;break;case"wheel":f=yT;break;case"copy":case"cut":case"paste":f=rT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Xg}var y=(e&4)!==0,x=!y&&t==="scroll",v=y?p!==null?p+"Capture":null:p;y=[];for(var g=c,w;g!==null;){w=g;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,v!==null&&(_=da(g,v),_!=null&&y.push(va(g,_,w)))),x)break;g=g.return}0<y.length&&(p=new f(p,m,null,n,u),h.push({event:p,listeners:y}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",p&&n!==Mh&&(m=n.relatedTarget||n.fromElement)&&(bs(m)||m[ir]))break e;if((f||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,f?(m=n.relatedTarget||n.toElement,f=c,m=m?bs(m):null,m!==null&&(x=Zs(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(f=null,m=c),f!==m)){if(y=Jg,_="onMouseLeave",v="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(y=Xg,_="onPointerLeave",v="onPointerEnter",g="pointer"),x=f==null?p:yi(f),w=m==null?p:yi(m),p=new y(_,g+"leave",f,n,u),p.target=x,p.relatedTarget=w,_=null,bs(u)===c&&(y=new y(v,g+"enter",m,n,u),y.target=w,y.relatedTarget=x,_=y),x=_,f&&m)t:{for(y=f,v=m,g=0,w=y;w;w=ni(w))g++;for(w=0,_=v;_;_=ni(_))w++;for(;0<g-w;)y=ni(y),g--;for(;0<w-g;)v=ni(v),w--;for(;g--;){if(y===v||v!==null&&y===v.alternate)break t;y=ni(y),v=ni(v)}y=null}else y=null;f!==null&&uy(h,p,f,y,!1),m!==null&&x!==null&&uy(h,x,m,y,!0)}}e:{if(p=c?yi(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var k=ST;else if(ny(p))if(ab)k=AT;else{k=CT;var S=ET}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=TT);if(k&&(k=k(t,c))){ob(h,k,n,u);break e}S&&S(t,p,c),t==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&Nh(p,"number",p.value)}switch(S=c?yi(c):window,t){case"focusin":(ny(S)||S.contentEditable==="true")&&(mi=S,Wh=c,Qo=null);break;case"focusout":Qo=Wh=mi=null;break;case"mousedown":Hh=!0;break;case"contextmenu":case"mouseup":case"dragend":Hh=!1,ay(h,n,u);break;case"selectionchange":if(jT)break;case"keydown":case"keyup":ay(h,n,u)}var E;if(Bp)e:{switch(t){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else pi?sb(t,n)&&(C="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(rb&&n.locale!=="ko"&&(pi||C!=="onCompositionStart"?C==="onCompositionEnd"&&pi&&(E=nb()):(Dr=u,$p="value"in Dr?Dr.value:Dr.textContent,pi=!0)),S=Pc(c,C),0<S.length&&(C=new Qg(C,t,null,n,u),h.push({event:C,listeners:S}),E?C.data=E:(E=ib(n),E!==null&&(C.data=E)))),(E=wT?xT(t,n):bT(t,n))&&(c=Pc(c,"onBeforeInput"),0<c.length&&(u=new Qg("onBeforeInput","beforeinput",null,n,u),h.push({event:u,listeners:c}),u.data=E))}yb(h,e)})}function va(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Pc(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=da(t,n),i!=null&&r.unshift(va(t,i,s)),i=da(t,e),i!=null&&r.push(va(t,i,s))),t=t.return}return r}function ni(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function uy(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=da(n,i),l!=null&&o.unshift(va(n,l,a))):s||(l=da(n,i),l!=null&&o.push(va(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var LT=/\r\n?/g,DT=/\u0000|\uFFFD/g;function dy(t){return(typeof t=="string"?t:""+t).replace(LT,` 38`).replace(DT,"")}function _l(t,e,n){if(e=dy(e),dy(t)!==e&&n)throw Error(L(425))}function Rc(){}var qh=null,Kh=null;function Gh(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Zh=typeof setTimeout=="function"?setTimeout:void 0,MT=typeof clearTimeout=="function"?clearTimeout:void 0,hy=typeof Promise=="function"?Promise:void 0,$T=typeof queueMicrotask=="function"?queueMicrotask:typeof hy<"u"?function(t){return hy.resolve(null).then(t).cat
vendor: 2,892 bytes, line 38
38ch(VT)}:Zh;function VT(t){setTimeout(function(){throw t})}function $d(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),pa(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);pa(e)}function zr(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function fy(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var po=Math.random().toString(36).slice(2),jn="__reactFiber$"+po,wa="__reactProps$"+po,ir="__reactContainer$"+po,Yh="__reactEvents$"+po,FT="__reactListeners$"+po,BT="__reactHandles$"+po;function bs(t){var e=t[jn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[ir]||n[jn]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=fy(t);t!==null;){if(n=t[jn])return n;t=fy(t)}return e}t=n,n=t.parentNode}return null}function Ya(t){return t=t[jn]||t[ir],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function yi(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(L(33))}function Nu(t){return t[wa]||null}var Jh=[],vi=-1;function as(t){return{current:t}}function ke(t){0>vi||(t.current=Jh[vi],Jh[vi]=null,vi--)}function xe(t,e){vi++,Jh[vi]=t.current,t.current=e}var Yr={},lt=as(Yr),_t=as(!1),$s=Yr;function Gi(t,e){var n=t.type.contextTypes;if(!n)return Yr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function kt(t){return t=t.childContextTypes,t!=null}function jc(){ke(_t),ke(lt)}function py(t,e,n){if(lt.current!==Yr)throw Error(L(168));xe(lt,e),xe(_t,n)}function wb(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(L(108,EC(t)||"Unknown",s));return Re({},n,r)}function Nc(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Yr,$s=lt.current,xe(lt,t),xe(_t,_t.current),!0}function my(t,e,n){var r=t.stateNode;if(!r)throw Error(L(169));n?(t=wb(t,e,$s),r.__reactInternalMemoizedMergedChildContext=t,ke(_t),ke(lt),xe(lt,t)):ke(_t),xe(_t,n)}var Jn=null,Ou=!1,Vd=!1;function xb(t){Jn===null?Jn=[t]:Jn.push(t)}function UT(t){Ou=!0,xb(t)}function ls(){if(!Vd&&Jn!==null){Vd=!0;var t=0,e=me;try{var n=Jn;for(me=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Jn=null,Ou=!1}catch(s){throw Jn!==null&&(Jn=Jn.slice(t+1)),Hx(Ip,ls),s}finally{me=e,Vd=!1}}return null}var wi=[],xi=0,Oc=null,Ic=0,Bt=[],Ut=0,Vs=null,er=1,tr="";function ms(t,e){wi[xi++]=Ic,wi[xi++]=Oc,Oc=t,Ic=e}
vendor: 16,292 bytes, line 38
38function bb(t,e,n){Bt[Ut++]=er,Bt[Ut++]=tr,Bt[Ut++]=Vs,Vs=t;var r=er;t=tr;var s=32-mn(r)-1;r&=~(1<<s),n+=1;var i=32-mn(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,er=1<<32-mn(e)+s|n<<s|r,tr=i+t}else er=1<<i|n<<s|r,tr=t}function zp(t){t.return!==null&&(ms(t,1),bb(t,1,0))}function Wp(t){for(;t===Oc;)Oc=wi[--xi],wi[xi]=null,Ic=wi[--xi],wi[xi]=null;for(;t===Vs;)Vs=Bt[--Ut],Bt[Ut]=null,tr=Bt[--Ut],Bt[Ut]=null,er=Bt[--Ut],Bt[Ut]=null}var jt=null,Rt=null,Ee=!1,fn=null;function _b(t,e){var n=zt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function gy(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,jt=t,Rt=zr(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,jt=t,Rt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Vs!==null?{id:er,overflow:tr}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=zt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,jt=t,Rt=null,!0):!1;default:return!1}}function Qh(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Xh(t){if(Ee){var e=Rt;if(e){var n=e;if(!gy(t,e)){if(Qh(t))throw Error(L(418));e=zr(n.nextSibling);var r=jt;e&&gy(t,e)?_b(r,n):(t.flags=t.flags&-4097|2,Ee=!1,jt=t)}}else{if(Qh(t))throw Error(L(418));t.flags=t.flags&-4097|2,Ee=!1,jt=t}}}function yy(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;jt=t}function kl(t){if(t!==jt)return!1;if(!Ee)return yy(t),Ee=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Gh(t.type,t.memoizedProps)),e&&(e=Rt)){if(Qh(t))throw kb(),Error(L(418));for(;e;)_b(t,e),e=zr(e.nextSibling)}if(yy(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(L(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Rt=zr(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Rt=null}}else Rt=jt?zr(t.stateNode.nextSibling):null;return!0}function kb(){for(var t=Rt;t;)t=zr(t.nextSibling)}function Zi(){Rt=jt=null,Ee=!1}function Hp(t){fn===null?fn=[t]:fn.push(t)}var zT=dr.ReactCurrentBatchConfig;function Ro(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,t))}return t}function Sl(t,e){throw t=Object.prototype.toString.call(e),Error(L(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function vy(t){var e=t._init;return e(t._payload)}function Sb(t){function e(v,g){if(t){var w=v.deletions;w===null?(v.deletions=[g],v.flags|=16):w.push(g)}}function n(v,g){if(!t)return null;for(;g!==null;)e(v,g),g=g.sibling;return null}function r(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=Kr(v,g),v.index=0,v.sibling=null,v}function i(v,g,w){return v.index=w,t?(w=v.alternate,w!==null?(w=w.index,w<g?(v.flags|=2,g):w):(v.flags|=2,g)):(v.flags|=1048576,g)}function o(v){return t&&v.alternate===null&&(v.flags|=2),v}function a(v,g,w,_){return g===null||g.tag!==6?(g=qd(w,v.mode,_),g.return=v,g):(g=s(g,w),g.return=v,g)}function l(v,g,w,_){var k=w.type;return k===fi?u(v,g,w.props.children,_,w.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Sr&&vy(k)===g.type)?(_=s(g,w.props),_.ref=Ro(v,g,w),_.return=v,_):(_=sc(w.type,w.key,w.props,null,v.mode,_),_.ref=Ro(v,g,w),_.return=v,_)}function c(v,g,w,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==w.containerInfo||g.stateNode.implementation!==w.implementation?(g=Kd(w,v.mode,_),g.return=v,g):(g=s(g,w.children||[]),g.return=v,g)}function u(v,g,w,_,k){return g===null||g.tag!==7?(g=Ls(w,v.mode,_,k),g.return=v,g):(g=s(g,w),g.return=v,g)}function h(v,g,w){if(typeof g=="string"&&g!==""||typeof g=="number")return g=qd(""+g,v.mode,w),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fl:return w=sc(g.type,g.key,g.props,null,v.mode,w),w.ref=Ro(v,null,g),w.return=v,w;case hi:return g=Kd(g,v.mode,w),g.return=v,g;case Sr:var _=g._init;return h(v,_(g._payload),w)}if(Fo(g)||Eo(g))return g=Ls(g,v.mode,w,null),g.return=v,g;Sl(v,g)}return null}function p(v,g,w,_){var k=g!==null?g.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:a(v,g,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:return w.key===k?l(v,g,w,_):null;case hi:return w.key===k?c(v,g,w,_):null;case Sr:return k=w._init,p(v,g,k(w._payload),_)}if(Fo(w)||Eo(w))return k!==null?null:u(v,g,w,_,null);Sl(v,w)}return null}function f(v,g,w,_,k){if(typeof _=="string"&&_!==""||typeof _=="number")return v=v.get(w)||null,a(g,v,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case fl:return v=v.get(_.key===null?w:_.key)||null,l(g,v,_,k);case hi:return v=v.get(_.key===null?w:_.key)||null,c(g,v,_,k);case Sr:var S=_._init;return f(v,g,w,S(_._payload),k)}if(Fo(_)||Eo(_))return v=v.get(w)||null,u(g,v,_,k,null);Sl(g,_)}return null}function m(v,g,w,_){for(var k=null,S=null,E=g,C=g=0,A=null;E!==null&&C<w.length;C++){E.index>C?(A=E,E=null):A=E.sibling;var T=p(v,E,w[C],_);if(T===null){E===null&&(E=A);break}t&&E&&T.alternate===null&&e(v,E),g=i(T,g,C),S===null?k=T:S.sibling=T,S=T,E=A}if(C===w.length)return n(v,E),Ee&&ms(v,C),k;if(E===null){for(;C<w.length;C++)E=h(v,w[C],_),E!==null&&(g=i(E,g,C),S===null?k=E:S.sibling=E,S=E);return Ee&&ms(v,C),k}for(E=r(v,E);C<w.length;C++)A=f(E,v,C,w[C],_),A!==null&&(t&&A.alternate!==null&&E.delete(A.key===null?C:A.key),g=i(A,g,C),S===null?k=A:S.sibling=A,S=A);return t&&E.forEach(function(O){return e(v,O)}),Ee&&ms(v,C),k}function y(v,g,w,_){var k=Eo(w);if(typeof k!="function")throw Error(L(150));if(w=k.call(w),w==null)throw Error(L(151));for(var S=k=null,E=g,C=g=0,A=null,T=w.next();E!==null&&!T.done;C++,T=w.next()){E.index>C?(A=E,E=null):A=E.sibling;var O=p(v,E,T.value,_);if(O===null){E===null&&(E=A);break}t&&E&&O.alternate===null&&e(v,E),g=i(O,g,C),S===null?k=O:S.sibling=O,S=O,E=A}if(T.done)return n(v,E),Ee&&ms(v,C),k;if(E===null){for(;!T.done;C++,T=w.next())T=h(v,T.value,_),T!==null&&(g=i(T,g,C),S===null?k=T:S.sibling=T,S=T);return Ee&&ms(v,C),k}for(E=r(v,E);!T.done;C++,T=w.next())T=f(E,v,C,T.value,_),T!==null&&(t&&T.alternate!==null&&E.delete(T.key===null?C:T.key),g=i(T,g,C),S===null?k=T:S.sibling=T,S=T);return t&&E.forEach(function(N){return e(v,N)}),Ee&&ms(v,C),k}function x(v,g,w,_){if(typeof w=="object"&&w!==null&&w.type===fi&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:e:{for(var k=w.key,S=g;S!==null;){if(S.key===k){if(k=w.type,k===fi){if(S.tag===7){n(v,S.sibling),g=s(S,w.props.children),g.return=v,v=g;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Sr&&vy(k)===S.type){n(v,S.sibling),g=s(S,w.props),g.ref=Ro(v,S,w),g.return=v,v=g;break e}n(v,S);break}else e(v,S);S=S.sibling}w.type===fi?(g=Ls(w.props.children,v.mode,_,w.key),g.return=v,v=g):(_=sc(w.type,w.key,w.props,null,v.mode,_),_.ref=Ro(v,g,w),_.return=v,v=_)}return o(v);case hi:e:{for(S=w.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){n(v,g.sibling),g=s(g,w.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else e(v,g);g=g.sibling}g=Kd(w,v.mode,_),g.return=v,v=g}return o(v);case Sr:return S=w._init,x(v,g,S(w._payload),_)}if(Fo(w))return m(v,g,w,_);if(Eo(w))return y(v,g,w,_);Sl(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(n(v,g.sibling),g=s(g,w),g.return=v,v=g):(n(v,g),g=qd(w,v.mode,_),g.return=v,v=g),o(v)):n(v,g)}return x}var Yi=Sb(!0),Eb=Sb(!1),Lc=as(null),Dc=null,bi=null,qp=null;function Kp(){qp=bi=Dc=null}function Gp(t){var e=Lc.current;ke(Lc),t._currentValue=e}function ef(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Ni(t,e){Dc=t,qp=bi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(bt=!0),t.firstContext=null)}function Gt(t){var e=t._currentValue;if(qp!==t)if(t={context:t,memoizedValue:e,next:null},bi===null){if(Dc===null)throw Error(L(308));bi=t,Dc.dependencies={lanes:0,firstContext:t}}else bi=bi.next=t;return e}var _s=null;function Zp(t){_s===null?_s=[t]:_s.push(t)}function Cb(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,Zp(e)):(n.next=s.next,s.next=n),e.interleaved=n,or(t,r)}function or(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Er=!1;function Yp(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Tb(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function rr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Wr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,or(t,n)}return s=r.interleaved,s===null?(e.next=e,Zp(r)):(e.next=s.next,s.next=e),r.interleaved=e,or(t,n)}function Ql(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Lp(t,n)}}function wy(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Mc(t,e,n,r){var s=t.updateQueue;Er=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,u=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((r&p)===p){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=t,y=a;switch(p=e,f=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){h=m.call(f,h,p);break e}h=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,p=typeof m=="function"?m.call(f,h,p):m,p==null)break e;h=Re({},h,p);break e;case 2:Er=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=h):u=u.next=f,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(u===null&&(l=h),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Bs|=o,t.lanes=o,t.memoizedState=h}}function xy(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var Ja={},On=as(Ja),xa=as(Ja),ba=as(Ja);function ks(t){if(t===Ja)throw Error(L(174));return t}function Jp(t,e){switch(xe(ba,e),xe(xa,t),xe(On,Ja),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ih(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ih(e,t)}ke(On),xe(On,e)}function Ji(){ke(On),ke(xa),ke(ba)}function Ab(t){ks(ba.current);var e=ks(On.current),n=Ih(e,t.type);e!==n&&(xe(xa,t),xe(On,n))}function Qp(t){xa.current===t&&(ke(On),ke(xa))}var Ae=as(0);function $c(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Fd=[];function Xp(){for(var t=0;t<Fd.length;t++)Fd[t]._workInProgressVersionPrimary=null;Fd.length=0}var Xl=dr.ReactCurrentDispatcher,Bd=dr.ReactCurrentBatchConfig,Fs=0,Pe=null,ze=null,Ke=null,Vc=!1,Xo=!1,_a=0,WT=0;function rt(){throw Error(L(321))}function em(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!vn(t[n],e[n]))return!1;return!0}function tm(t,e,n,r,s,i){if(Fs=i,Pe=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Xl.current=t===null||t.memoizedState===null?GT:ZT,t=n(r,s),Xo){i=0;do{if(Xo=!1,_a=0,25<=i)throw Error(L(301));i+=1,Ke=ze=null,e.updateQueue=null,Xl.current=YT,t=n(r,s)}while(Xo)}if(Xl.current=Fc,e=ze!==null&&ze.next!==null,Fs=0,Ke=ze=Pe=null,Vc=!1,e)throw Error(L(300));return t}function nm(){var t=_a!==0;return _a=0,t}function kn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Pe.memoizedState=Ke=t:Ke=Ke.next=t,Ke}function Zt(){if(ze===null){var t=Pe.alternate;t=t!==null?t.memoizedState:null}else t=ze.next;var e=Ke===null?Pe.memoizedState:Ke.next;if(e!==null)Ke=e,ze=t;else{if(t===null)throw Error(L(310));ze=t,t={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ke===null?Pe.memoizedState=Ke=t:Ke=Ke.next=t}return Ke}function ka(t,e){return typeof e=="function"?e(t):e}function Ud(t){var e=Zt(),n=e.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=t;var r=ze,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((Fs&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var h={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=h,o=r):l=l.next=h,Pe.lanes|=u,Bs|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,vn(r,e.memoizedState)||(bt=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,Pe.lanes|=i,Bs|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function zd(t){var e=Zt(),n=e.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);vn(i,e.memoizedState)||(bt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function Pb(){}function Rb(t,e){var n=Pe,r=Zt(),s=e(),i=!vn(r.memoizedState,s);if(i&&(r.memoizedState=s,bt=!0),r=r.queue,rm(Ob.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Sa(9,Nb.bind(null,n,r,s,e),void 0,null),Ge===null)throw Error(L(349));Fs&30||jb(n,e,s)}return s}function jb(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Pe.updateQueue,e===null?(e={lastEffect:null,stores:null},Pe.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Nb(t,e,n,r){e.value=n,e.getSnapshot=r,Ib(e)&&Lb(t)}function Ob(t,e,n){return n(function(){Ib(e)&&Lb(t)})}function Ib(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!vn(t,n)}catch{return!0}}
vendor: 4,825 bytes, line 38
38function Lb(t){var e=or(t,1);e!==null&&gn(e,t,1,-1)}function by(t){var e=kn();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:t},e.queue=t,t=t.dispatch=KT.bind(null,Pe,t),[e.memoizedState,t]}function Sa(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Pe.updateQueue,e===null?(e={lastEffect:null,stores:null},Pe.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function Db(){return Zt().memoizedState}function ec(t,e,n,r){var s=kn();Pe.flags|=t,s.memoizedState=Sa(1|e,n,void 0,r===void 0?null:r)}function Iu(t,e,n,r){var s=Zt();r=r===void 0?null:r;var i=void 0;if(ze!==null){var o=ze.memoizedState;if(i=o.destroy,r!==null&&em(r,o.deps)){s.memoizedState=Sa(e,n,i,r);return}}Pe.flags|=t,s.memoizedState=Sa(1|e,n,i,r)}function _y(t,e){return ec(8390656,8,t,e)}function rm(t,e){return Iu(2048,8,t,e)}function Mb(t,e){return Iu(4,2,t,e)}function $b(t,e){return Iu(4,4,t,e)}function Vb(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Fb(t,e,n){return n=n!=null?n.concat([t]):null,Iu(4,4,Vb.bind(null,e,t),n)}function sm(){}function Bb(t,e){var n=Zt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&em(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Ub(t,e){var n=Zt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&em(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function zb(t,e,n){return Fs&21?(vn(n,e)||(n=Gx(),Pe.lanes|=n,Bs|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,bt=!0),t.memoizedState=n)}function HT(t,e){var n=me;me=n!==0&&4>n?n:4,t(!0);var r=Bd.transition;Bd.transition={};try{t(!1),e()}finally{me=n,Bd.transition=r}}function Wb(){return Zt().memoizedState}function qT(t,e,n){var r=qr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Hb(t))qb(e,n);else if(n=Cb(t,e,n,r),n!==null){var s=pt();gn(n,t,r,s),Kb(n,e,r)}}function KT(t,e,n){var r=qr(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hb(t))qb(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,vn(a,o)){var l=e.interleaved;l===null?(s.next=s,Zp(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=Cb(t,e,s,r),n!==null&&(s=pt(),gn(n,t,r,s),Kb(n,e,r))}}function Hb(t){var e=t.alternate;return t===Pe||e!==null&&e===Pe}function qb(t,e){Xo=Vc=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Kb(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Lp(t,n)}}var Fc={readContext:Gt,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useInsertionEffect:rt,useLayoutEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useMutableSource:rt,useSyncExternalStore:rt,useId:rt,unstable_isNewReconciler:!1},GT={readContext:Gt,useCallback:function(t,e){return kn().memoizedState=[t,e===void 0?null:e],t},useContext:Gt,useEffect:_y,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,ec(4194308,4,Vb.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ec(4194308,4,t,e)},useInsertionEffect:function(t,e){return ec(4,2,t,e)},useMemo:function(t,e){var n=kn();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=kn();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=qT.bind(null,Pe,t),[r.memoizedState,t]},useRef:function(t){var e=kn();return t={current:t},e.memoizedState=t},useState:by,useDebugValue:sm,useDeferredValue:function(t){return kn().memoizedState=t},useTransition:function(){var t=by(!1),e=t[0];return t=HT.bind(null,t[1]),kn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Pe,s=kn();if(Ee){if(n===void 0)throw Error(L(407));n=n()}else{if(n=e(),Ge===null)throw Error(L(349));Fs&30||jb(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,_y(Ob.bind(null,r,i,t),[t]),r.flags|=2048,Sa(9,Nb.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=kn(),e=Ge.identifierPrefix;if(Ee){var n=tr,r=er;n=(r&~(1<<32-mn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=_a++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=WT++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},ZT={readContext:Gt,useCallback:Bb,useContext:Gt,useEffect:rm,useImperativeHandle:Fb,useInsertionEffect:Mb,useLayoutEffect:$b,useMemo:Ub,useReducer:Ud,useRef
vendor: 6,411 bytes, lines 38-40
38:Db,useState:function(){return Ud(ka)},useDebugValue:sm,useDeferredValue:function(t){var e=Zt();return zb(e,ze.memoizedState,t)},useTransition:function(){var t=Ud(ka)[0],e=Zt().memoizedState;return[t,e]},useMutableSource:Pb,useSyncExternalStore:Rb,useId:Wb,unstable_isNewReconciler:!1},YT={readContext:Gt,useCallback:Bb,useContext:Gt,useEffect:rm,useImperativeHandle:Fb,useInsertionEffect:Mb,useLayoutEffect:$b,useMemo:Ub,useReducer:zd,useRef:Db,useState:function(){return zd(ka)},useDebugValue:sm,useDeferredValue:function(t){var e=Zt();return ze===null?e.memoizedState=t:zb(e,ze.memoizedState,t)},useTransition:function(){var t=zd(ka)[0],e=Zt().memoizedState;return[t,e]},useMutableSource:Pb,useSyncExternalStore:Rb,useId:Wb,unstable_isNewReconciler:!1};function an(t,e){if(t&&t.defaultProps){e=Re({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function tf(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Re({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Lu={isMounted:function(t){return(t=t._reactInternals)?Zs(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=pt(),s=qr(t),i=rr(r,s);i.payload=e,n!=null&&(i.callback=n),e=Wr(t,i,s),e!==null&&(gn(e,t,s,r),Ql(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=pt(),s=qr(t),i=rr(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Wr(t,i,s),e!==null&&(gn(e,t,s,r),Ql(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=pt(),r=qr(t),s=rr(n,r);s.tag=2,e!=null&&(s.callback=e),e=Wr(t,s,r),e!==null&&(gn(e,t,r,n),Ql(e,t,r))}};function ky(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!ga(n,r)||!ga(s,i):!0}function Gb(t,e,n){var r=!1,s=Yr,i=e.contextType;return typeof i=="object"&&i!==null?i=Gt(i):(s=kt(e)?$s:lt.current,r=e.contextTypes,i=(r=r!=null)?Gi(t,s):Yr),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Lu,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Sy(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Lu.enqueueReplaceState(e,e.state,null)}function nf(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},Yp(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Gt(i):(i=kt(e)?$s:lt.current,s.context=Gi(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(tf(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&Lu.enqueueReplaceState(s,s.state,null),Mc(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Qi(t,e){try{var n="",r=e;do n+=SC(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Wd(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function rf(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var JT=typeof WeakMap=="function"?WeakMap:Map;function Zb(t,e,n){n=rr(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Uc||(Uc=!0,pf=r),rf(t,e)},n}function Yb(t,e,n){n=rr(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){rf(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){rf(t,e),typeof r!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Ey(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new JT;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=dA.bind(null,t,e,n),e.then(t,t))}function Cy(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Ty(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=rr(-1,1),e.tag=2,Wr(n,e,1))),n.lanes|=1),t)}var QT=dr.ReactCurrentOwner,bt=!1;function ut(t,e,n,r){e.child=t===null?Eb(e,null,n,r):Yi(e,t.child,n,r)}function Ay(t,e,n,r,s){n=n.render;var i=e.ref;return Ni(e,s),r=tm(t,e,n,r,i,s),n=nm(),t!==null&&!bt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,ar(t,e,s)):(Ee&&n&&zp(e),e.flags|=1,ut(t,e,r,s),e.child)}function Py(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!hm(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,Jb(t,e,i,r,s)):(t=sc(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:ga,n(o,r)&&t.ref===e.ref)return ar(t,e,s)}return e.flags|=1,t=Kr(i,r),t.ref=e.ref,t.return=e,e.child=t}function Jb(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(ga(i,r)&&t.ref===e.ref)if(bt=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(bt=!0);else return e.lanes=t.lanes,ar(t,e,s)}return sf(t,e,n,r,s)}function Qb(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(ki,Tt),Tt|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,xe(ki,Tt),Tt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,xe(ki,Tt),Tt|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,xe(ki,Tt),Tt|=r;return ut(t,e,s,n),e.child}function Xb(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 5,244 bytes, line 40
40function sf(t,e,n,r,s){var i=kt(n)?$s:lt.current;return i=Gi(e,i),Ni(e,s),n=tm(t,e,n,r,i,s),r=nm(),t!==null&&!bt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,ar(t,e,s)):(Ee&&r&&zp(e),e.flags|=1,ut(t,e,n,s),e.child)}function Ry(t,e,n,r,s){if(kt(n)){var i=!0;Nc(e)}else i=!1;if(Ni(e,s),e.stateNode===null)tc(t,e),Gb(e,n,r),nf(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Gt(c):(c=kt(n)?$s:lt.current,c=Gi(e,c));var u=n.getDerivedStateFromProps,h=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Sy(e,o,r,c),Er=!1;var p=e.memoizedState;o.state=p,Mc(e,r,o,s),l=e.memoizedState,a!==r||p!==l||_t.current||Er?(typeof u=="function"&&(tf(e,n,u,r),l=e.memoizedState),(a=Er||ky(e,n,a,r,p,l,c))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,Tb(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:an(e.type,a),o.props=c,h=e.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Gt(l):(l=kt(n)?$s:lt.current,l=Gi(e,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||p!==l)&&Sy(e,o,r,l),Er=!1,p=e.memoizedState,o.state=p,Mc(e,r,o,s);var m=e.memoizedState;a!==h||p!==m||_t.current||Er?(typeof f=="function"&&(tf(e,n,f,r),m=e.memoizedState),(c=Er||ky(e,n,c,r,p,m,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=m),o.props=r,o.state=m,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),r=!1)}return of(t,e,n,r,i,s)}function of(t,e,n,r,s,i){Xb(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&my(e,n,!1),ar(t,e,i);r=e.stateNode,QT.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Yi(e,t.child,null,i),e.child=Yi(e,null,a,i)):ut(t,e,a,i),e.memoizedState=r.state,s&&my(e,n,!0),e.child}function e_(t){var e=t.stateNode;e.pendingContext?py(t,e.pendingContext,e.pendingContext!==e.context):e.context&&py(t,e.context,!1),Jp(t,e.containerInfo)}function jy(t,e,n,r,s){return Zi(),Hp(s),e.flags|=256,ut(t,e,n,r),e.child}var af={dehydrated:null,treeContext:null,retryLane:0};function lf(t){return{baseLanes:t,cachePool:null,transitions:null}}function t_(t,e,n){var r=e.pendingProps,s=Ae.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),xe(Ae,s&1),t===null)return Xh(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=$u(o,r,0,null),t=Ls(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=lf(n),e.memoizedState=af,t):im(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return XT(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Kr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Kr(a,i):(i=Ls(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?lf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=af,r}return i=t.child,t=i.sibling,r=Kr(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function im(t,e){return e=$u({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function El(t,e,n,r){return r!==null&&Hp(r),Yi(e,t.child,null,n),t=im(e,e.pen
vendor: 7,680 bytes, line 40
40dingProps.children),t.flags|=2,e.memoizedState=null,t}function XT(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=Wd(Error(L(422))),El(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=$u({mode:"visible",children:r.children},s,0,null),i=Ls(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&Yi(e,t.child,null,o),e.child.memoizedState=lf(o),e.memoizedState=af,i);if(!(e.mode&1))return El(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(L(419)),r=Wd(i,r,void 0),El(t,e,o,r)}if(a=(o&t.childLanes)!==0,bt||a){if(r=Ge,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,or(t,s),gn(r,t,s,-1))}return dm(),r=Wd(Error(L(421))),El(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=hA.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Rt=zr(s.nextSibling),jt=e,Ee=!0,fn=null,t!==null&&(Bt[Ut++]=er,Bt[Ut++]=tr,Bt[Ut++]=Vs,er=t.id,tr=t.overflow,Vs=e),e=im(e,r.children),e.flags|=4096,e)}function Ny(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),ef(t.return,e,n)}function Hd(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function n_(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(ut(t,e,r.children,n),r=Ae.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ny(t,n,e);else if(t.tag===19)Ny(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(xe(Ae,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&$c(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),Hd(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&$c(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}Hd(e,!0,n,null,i);break;case"together":Hd(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function tc(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ar(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Bs|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(L(153));if(e.child!==null){for(t=e.child,n=Kr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Kr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function eA(t,e,n){switch(e.tag){case 3:e_(e),Zi();break;case 5:Ab(e);break;case 1:kt(e.type)&&Nc(e);break;case 4:Jp(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;xe(Lc,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(xe(Ae,Ae.current&1),e.flags|=128,null):n&e.child.childLanes?t_(t,e,n):(xe(Ae,Ae.current&1),t=ar(t,e,n),t!==null?t.sibling:null);xe(Ae,Ae.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return n_(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xe(Ae,Ae.current),r)break;return null;case 22:case 23:return e.lanes=0,Qb(t,e,n)}return ar(t,e,n)}var r_,cf,s_,i_;r_=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};cf=function(){};s_=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,ks(On.current);var i=null;switch(n){case"input":s=Rh(t,s),r=Rh(t,r),i=[];break;case"select":s=Re({},s,{value:void 0}),r=Re({},r,{value:void 0}),i=[];break;case"textarea":s=Oh(t,s),r=Oh(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Rc)}Lh(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ca.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ca.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&_e("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};i_=function(t,e,n,r){n!==r&&(e.flags|=4)};function jo(t,e){if(!Ee)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function st(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function tA(t,e,n){var r=e.pendingProps;switch(Wp(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(e),null;case 1:return kt(e.type)&&jc(),st(e),null;case 3:return r=e.stateNode,Ji(),ke(_t),ke(lt),Xp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(kl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,fn!==null&&(yf(fn),fn=null))),cf(t,e),st(e),null;case 5:Qp(e);var s=ks(ba.current);if(n=e.type,t!==null&&e.stateNode!=null)s_(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(L(166));return st(e),null}if(t=ks(On.current),kl(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[jn]=e,r[wa]=i,t=(e.mode&1)!==0,n){case"dialog":_e("cancel",r),_e("close",r);break;case"iframe":case"object":case"embed":_e("load",r);break;case"video":case"audio":for(s=0;s<Uo.length;s++)_e(Uo[s],r);break;case"source":_e("error",r);break;case"img":case"image":case"link":_e("error",r),_e("load",r);break;case"details":_e("toggle",r);break;case"input":Bg(r,i),_e("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},_e("invalid",r);break;case"textarea":zg(r,i),_e("invalid",r)}Lh(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 30,121 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&_l(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&_l(r.textContent,a,t),s=["children",""+a]):ca.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&_e("scroll",r)}switch(n){case"input":pl(r),Ug(r,i,!0);break;case"textarea":pl(r),Wg(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Rc)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Ox(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[jn]=e,t[wa]=r,r_(t,e,!1,!1),e.stateNode=t;e:{switch(o=Dh(n,r),n){case"dialog":_e("cancel",t),_e("close",t),s=r;break;case"iframe":case"object":case"embed":_e("load",t),s=r;break;case"video":case"audio":for(s=0;s<Uo.length;s++)_e(Uo[s],t);s=r;break;case"source":_e("error",t),s=r;break;case"img":case"image":case"link":_e("error",t),_e("load",t),s=r;break;case"details":_e("toggle",t),s=r;break;case"input":Bg(t,r),s=Rh(t,r),_e("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=Re({},r,{value:void 0}),_e("invalid",t);break;case"textarea":zg(t,r),s=Oh(t,r),_e("invalid",t);break;default:s=r}Lh(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Dx(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Ix(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ua(t,l):typeof l=="number"&&ua(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ca.hasOwnProperty(i)?l!=null&&i==="onScroll"&&_e("scroll",t):l!=null&&Pp(t,i,l,o))}switch(n){case"input":pl(t),Ug(t,r,!1);break;case"textarea":pl(t),Wg(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Zr(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?Ai(t,!!r.multiple,i,!1):r.defaultValue!=null&&Ai(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Rc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return st(e),null;case 6:if(t&&e.stateNode!=null)i_(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(L(166));if(n=ks(ba.current),ks(On.current),kl(e)){if(r=e.stateNode,n=e.memoizedProps,r[jn]=e,(i=r.nodeValue!==n)&&(t=jt,t!==null))switch(t.tag){case 3:_l(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&_l(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[jn]=e,e.stateNode=r}return st(e),null;case 13:if(ke(Ae),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Ee&&Rt!==null&&e.mode&1&&!(e.flags&128))kb(),Zi(),e.flags|=98560,i=!1;else if(i=kl(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(L(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[jn]=e}else Zi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;st(e),i=!1}else fn!==null&&(yf(fn),fn=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Ae.current&1?We===0&&(We=3):dm())),e.updateQueue!==null&&(e.flags|=4),st(e),null);case 4:return Ji(),cf(t,e),t===null&&ya(e.stateNode.containerInfo),st(e),null;case 10:return Gp(e.type._context),st(e),null;case 17:return kt(e.type)&&jc(),st(e),null;case 19:if(ke(Ae),i=e.memoizedState,i===null)return st(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)jo(i,!1);else{if(We!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=$c(t),o!==null){for(e.flags|=128,jo(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return xe(Ae,Ae.current&1|2),e.child}t=t.sibling}i.tail!==null&&Le()>Xi&&(e.flags|=128,r=!0,jo(i,!1),e.lanes=4194304)}else{if(!r)if(t=$c(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),jo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ee)return st(e),null}else 2*Le()-i.renderingStartTime>Xi&&n!==1073741824&&(e.flags|=128,r=!0,jo(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Le(),e.sibling=null,n=Ae.current,xe(Ae,r?n&1|2:n&1),e):(st(e),null);case 22:case 23:return um(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Tt&1073741824&&(st(e),e.subtreeFlags&6&&(e.flags|=8192)):st(e),null;case 24:return null;case 25:return null}throw Error(L(156,e.tag))}function nA(t,e){switch(Wp(e),e.tag){case 1:return kt(e.type)&&jc(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ji(),ke(_t),ke(lt),Xp(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Qp(e),null;case 13:if(ke(Ae),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(L(340));Zi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ke(Ae),null;case 4:return Ji(),null;case 10:return Gp(e.type._context),null;case 22:case 23:return um(),null;case 24:return null;default:return null}}var Cl=!1,at=!1,rA=typeof WeakSet=="function"?WeakSet:Set,U=null;function _i(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ie(t,e,r)}else n.current=null}function uf(t,e,n){try{n()}catch(r){Ie(t,e,r)}}var Oy=!1;function sA(t,e){if(qh=Tc,t=ub(),Up(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,h=t,p=null;t:for(;;){for(var f;h!==n||s!==0&&h.nodeType!==3||(a=o+s),h!==i||r!==0&&h.nodeType!==3||(l=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===t)break t;if(p===n&&++c===s&&(a=o),p===i&&++u===r&&(l=o),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kh={focusedElem:t,selectionRange:n},Tc=!1,U=e;U!==null;)if(e=U,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,U=t;else for(;U!==null;){e=U;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,x=m.memoizedState,v=e.stateNode,g=v.getSnapshotBeforeUpdate(e.elementType===e.type?y:an(e.type,y),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=e.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(L(163))}}catch(_){Ie(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,U=t;break}U=e.return}return m=Oy,Oy=!1,m}function ea(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&uf(e,n,i)}s=s.next}while(s!==r)}}function Du(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function df(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function o_(t){var e=t.alternate;e!==null&&(t.alternate=null,o_(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[jn],delete e[wa],delete e[Yh],delete e[FT],delete e[BT])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function a_(t){return t.tag===5||t.tag===3||t.tag===4}function Iy(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||a_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function hf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Rc));else if(r!==4&&(t=t.child,t!==null))for(hf(t,e,n),t=t.sibling;t!==null;)hf(t,e,n),t=t.sibling}function ff(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(ff(t,e,n),t=t.sibling;t!==null;)ff(t,e,n),t=t.sibling}var Ye=null,hn=!1;function vr(t,e,n){for(n=n.child;n!==null;)l_(t,e,n),n=n.sibling}function l_(t,e,n){if(Nn&&typeof Nn.onCommitFiberUnmount=="function")try{Nn.onCommitFiberUnmount(Au,n)}catch{}switch(n.tag){case 5:at||_i(n,e);case 6:var r=Ye,s=hn;Ye=null,vr(t,e,n),Ye=r,hn=s,Ye!==null&&(hn?(t=Ye,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ye.removeChild(n.stateNode));break;case 18:Ye!==null&&(hn?(t=Ye,n=n.stateNode,t.nodeType===8?$d(t.parentNode,n):t.nodeType===1&&$d(t,n),pa(t)):$d(Ye,n.stateNode));break;case 4:r=Ye,s=hn,Ye=n.stateNode.containerInfo,hn=!0,vr(t,e,n),Ye=r,hn=s;break;case 0:case 11:case 14:case 15:if(!at&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&uf(n,e,o),s=s.next}while(s!==r)}vr(t,e,n);break;case 1:if(!at&&(_i(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ie(n,e,a)}vr(t,e,n);break;case 21:vr(t,e,n);break;case 22:n.mode&1?(at=(r=at)||n.memoizedState!==null,vr(t,e,n),at=r):vr(t,e,n);break;default:vr(t,e,n)}}function Ly(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new rA),e.forEach(function(r){var s=fA.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function en(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ye=a.stateNode,hn=!1;break e;case 3:Ye=a.stateNode.containerInfo,hn=!0;break e;case 4:Ye=a.stateNode.containerInfo,hn=!0;break e}a=a.return}if(Ye===null)throw Error(L(160));l_(i,o,s),Ye=null,hn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Ie(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)c_(e,t),e=e.sibling}function c_(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(en(e,t),_n(t),r&4){try{ea(3,t,t.return),Du(3,t)}catch(y){Ie(t,t.return,y)}try{ea(5,t,t.return)}catch(y){Ie(t,t.return,y)}}break;case 1:en(e,t),_n(t),r&512&&n!==null&&_i(n,n.return);break;case 5:if(en(e,t),_n(t),r&512&&n!==null&&_i(n,n.return),t.flags&32){var s=t.stateNode;try{ua(s,"")}catch(y){Ie(t,t.return,y)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&jx(s,i),Dh(a,o);var c=Dh(a,i);for(o=0;o<l.length;o+=2){var u=l[o],h=l[o+1];u==="style"?Dx(s,h):u==="dangerouslySetInnerHTML"?Ix(s,h):u==="children"?ua(s,h):Pp(s,u,h,c)}switch(a){case"input":jh(s,i);break;case"textarea":Nx(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Ai(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?Ai(s,!!i.multiple,i.defaultValue,!0):Ai(s,!!i.multiple,i.multiple?[]:"",!1))}s[wa]=i}catch(y){Ie(t,t.return,y)}}break;case 6:if(en(e,t),_n(t),r&4){if(t.stateNode===null)throw Error(L(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(y){Ie(t,t.return,y)}}break;case 3:if(en(e,t),_n(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pa(e.containerInfo)}catch(y){Ie(t,t.return,y)}break;case 4:en(e,t),_n(t);break;case 13:en(e,t),_n(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(lm=Le())),r&4&&Ly(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(at=(c=at)||u,en(e,t),at=c):en(e,t),_n(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(U=t,u=t.child;u!==null;){for(h=U=u;U!==null;){switch(p=U,f=p.child,p.tag){case 0:case 11:case 14:case 15:ea(4,p,p.return);break;case 1:_i(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{e=r,m.props=e.memoizedProps,m.state=e.memoizedState,m.componentWillUnmount()}catch(y){Ie(r,n,y)}}break;case 5:_i(p,p.return);break;case 22:if(p.memoizedState!==null){My(h);continue}}f!==null?(f.return=p,U=f):My(h)}u=u.sibling}e:for(u=null,h=t;;){if(h.tag===5){if(u===null){u=h;try{s=h.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Lx("display",o))}catch(y){Ie(t,t.return,y)}}}else if(h.tag===6){if(u===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(y){Ie(t,t.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:en(e,t),_n(t),r&4&&Ly(t);break;case 21:break;default:en(e,t),_n(t)}}function _n(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(a_(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ua(s,""),r.flags&=-33);var i=Iy(t);ff(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Iy(t);hf(t,a,o);break;default:throw Error(L(161))}}catch(l){Ie(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function iA(t,e,n){U=t,u_(t)}function u_(t,e,n){for(var r=(t.mode&1)!==0;U!==null;){var s=U,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Cl;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||at;a=Cl;var c=at;if(Cl=o,(at=l)&&!c)for(U=s;U!==null;)o=U,l=o.child,o.tag===22&&o.memoizedState!==null?$y(s):l!==null?(l.return=o,U=l):$y(s);for(;i!==null;)U=i,u_(i),i=i.sibling;U=s,Cl=a,at=c}Dy(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,U=i):Dy(t)}}function Dy(t){for(;U!==null;){var e=U;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:at||Du(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!at)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:an(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&xy(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}xy(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var h=u.dehydrated;h!==null&&pa(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}at||e.flags&512&&df(e)}catch(p){Ie(e,e.return,p)}}if(e===t){U=null;break}if(n=e.sibling,n!==null){n.return=e.return,U=n;break}U=e.return}}function My(t){for(;U!==null;){var e=U;if(e===t){U=null;break}var n=e.sibling;if(n!==null){n.return=e.return,U=n;break}U=e.return}}function $y(t){for(;U!==null;){var e=U;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Du(4,e)}catch(l){Ie(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){Ie(e,s,l)}}var i=e.return;try{df(e)}catch(l){Ie(e,i,l)}break;case 5:var o=e.return;try{df(e)}catch(l){Ie(e,o,l)}}}catch(l){Ie(e,e.return,l)}if(e===t){U=null;break}var a=e.sibling;if(a!==null){a.return=e.return,U=a;break}U=e.return}}var oA=Math.ceil,Bc=dr.ReactCurrentDispatcher,om=dr.ReactCurrentOwner,qt=dr.ReactCurrentBatchConfig,ce=0,Ge=null,Fe=null,Xe=0,Tt=0,ki=as(0),We=0,Ea=null,Bs=0,Mu=0,am=0,ta=null,wt=null,lm=0,Xi=1/0,qn=null,Uc=!1,pf=null,Hr=null,Tl=!1,Mr=null,zc=0,na=0,mf=null,nc=-1,rc=0;function pt(){return ce&6?Le():nc!==-1?nc:nc=Le()}function qr(t){return t.mode&1?ce&2&&Xe!==0?Xe&-Xe:zT.transition!==null?(rc===0&&(rc=Gx()),rc):(t=me,t!==0||(t=window.event,t=t===void 0?16:tb(t.type)),t):1}function gn(t,e,n,r){if(50<na)throw na=0,mf=null,Error(L(185));Ga(t,n,r),(!(ce&2)||t!==Ge)&&(t===Ge&&(!(ce&2)&&(Mu|=n),We===4&&Ar(t,Xe)),St(t,r),n===1&&ce===0&&!(e.mode&1)&&(Xi=Le()+500,Ou&&ls()))}function St(t,e){var n=t.callbackNode;zC(t,e);var r=Cc(t,t===Ge?Xe:0);if(r===0)n!==null&&Kg(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Kg(n),e===1)t.tag===0?UT(Vy.bind(null,t)):xb(Vy.bind(null,t)),$T(function(){!(ce&6)&&ls()}),n=null;else{switch(Zx(r)){case 1:n=Ip;break;case 4:n=qx;break;case 16:n=Ec;break;case 536870912:n=Kx;break;default:n=Ec}n=v_(n,d_.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function d_(t,e){if(nc=-1,rc=0,ce&6)throw Error(L(327));var n=t.callbackNode;if(Oi()&&t.callbackNode!==n)return null;var r=Cc(t,t===Ge?Xe:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Wc(t,r);else{e=r;var s=ce;ce|=2;var i=f_();(Ge!==t||Xe!==e)&&(qn=null,Xi=Le()+500,Is(t,e));do try{cA();break}catch(a){h_(t,a)}while(!0);Kp(),Bc.current=i,ce=s,Fe!==null?e=0:(Ge=null,Xe=0,e=We)}if(e!==0){if(e===2&&(s=Bh(t),s!==0&&(r=s,e=gf(t,s))),e===1)throw n=Ea,Is(t,0),Ar(t,r),St(t,Le()),n;if(e===6)Ar(t,r);else{if(s=t.current.alternate,!(r&30)&&!aA(s)&&(e=Wc(t,r),e===2&&(i=Bh(t),i!==0&&(r=i,e=gf(t,i))),e===1))throw n=Ea,Is(t,0),Ar(t,r),St(t,Le()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(L(345));case 2:gs(t,wt,qn);break;case 3:if(Ar(t,r),(r&130023424)===r&&(e=lm+500-Le(),10<e)){if(Cc(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){pt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Zh(gs.bind(null,t,wt,qn),e);break}gs(t,wt,qn);break;case 4:if(Ar(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-mn(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=Le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oA(r/1960))-r,10<r){t.timeoutHandle=Zh(gs.bind(null,t,wt,qn),r);break}gs(t,wt,qn);break;case 5:gs(t,wt,qn);break;default:throw Error(L(329))}}}return St(t,Le()),t.callbackNode===n?d_.bind(null,t):null}function gf(t,e){var n=ta;return t.current.memoizedState.isDehydrated&&(Is(t,e).flags|=256),t=Wc(t,e),t!==2&&(e=wt,wt=n,e!==null&&yf(e)),t}function yf(t){wt===null?wt=t:wt.push.apply(wt,t)}function aA(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!vn(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ar(t,e){for(e&=~am,e&=~Mu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-mn(e),r=1<<n;t[n]=-1,e&=~r}}function Vy(t){if(ce&6)throw Error(L(327));Oi();var e=Cc(t,0);if(!(e&1))return St(t,Le()),null;var n=Wc(t,e);if(t.tag!==0&&n===2){var r=Bh(t);r!==0&&(e=r,n=gf(t,r))}if(n===1)throw n=Ea,Is(t,0),Ar(t,e),St(t,Le()),n;if(n===6)throw Error(L(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,gs(t,wt,qn),St(t,Le()),null}function cm(t,e){var n=ce;ce|=1;try{return t(e)}finally{ce=n,ce===0&&(Xi=Le()+500,Ou&&ls())}}function Us(t){Mr!==null&&Mr.tag===0&&!(ce&6)&&Oi();var e=ce;ce|=1;var n=qt.transition,r=me;try{if(qt.transition=null,me=1,t)return t()}finally{me=r,qt.transition=n,ce=e,!(ce&6)&&ls()}}function um(){Tt=ki.current,ke(ki)}function Is(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,MT(n)),Fe!==null)for(n=Fe.return;n!==null;){var r=n;switch(Wp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&jc();break;case 3:Ji(),ke(_t),ke(lt),Xp();break;case 5:Qp(r);break;case 4:Ji();break;case 13:ke(Ae);break;case 19:ke(Ae);break;case 10:Gp(r.type._context);break;case 22:case 23:um()}n=n.return}if(Ge=t,Fe=t=Kr(t.current,null),Xe=Tt=e,We=0,Ea=null,am=Mu=Bs=0,wt=ta=null,_s!==null){for(e=0;e<_s.length;e++)if(n=_s[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}_s=null}return t}function h_(t,e){do{var n=Fe;try{if(Kp(),Xl.current=Fc,Vc){for(var r=Pe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Vc=!1}if(Fs=0,Ke=ze=Pe=null,Xo=!1,_a=0,om.current=null,n===null||n.return===null){We=1,Ea=e,Fe=null;break}e:{var i=t,o=n.return,a=n,l=e;if(e=Xe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,h=u.tag;if(!(u.mode&1)&&(h===0||h===11||h===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=Cy(o);if(f!==null){f.flags&=-257,Ty(f,o,a,i,e),f.mode&1&&Ey(i,c,e),e=f,l=c;var m=e.updateQueue;if(m===null){var y=new Set;y.add(l),e.updateQueue=y}else m.add(l);break e}else{if(!(e&1)){Ey(i,c,e),dm();break e}l=Error(L(426))}}else if(Ee&&a.mode&1){var x=Cy(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Ty(x,o,a,i,e),Hp(Qi(l,a));break e}}i=l=Qi(l,a),We!==4&&(We=2),ta===null?ta=[i]:ta.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var v=Zb(i,l,e);wy(i,v);break e;case 1:a=l;var g=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Hr===null||!Hr.has(w)))){i.flags|=65536,e&=-e,i.lanes|=e;var _=Yb(i,a,e);wy(i,_);break e}}i=i.return}while(i!==null)}m_(n)}catch(k){e=k,Fe===n&&n!==null&&(Fe=n=n.return);continue}break}while(!0)}function f_(){var t=Bc.current;return Bc.current=Fc,t===null?Fc:t}function dm(){(We===0||We===3||We===2)&&(We=4),Ge===null||!(Bs&268435455)&&!(Mu&268435455)||Ar(Ge,Xe)}function Wc(t,e){var n=ce;ce|=2;var r=f_();(Ge!==t||Xe!==e)&&(qn=null,Is(t,e));do try{lA();break}catch(s){h_(t,s)}while(!0);if(Kp(),ce=n,Bc.current=r,Fe!==null)throw Error(L(261));return Ge=null,Xe=0,We}function lA(){for(;Fe!==null;)p_(Fe)}function cA(){for(;Fe!==null&&!IC();)p_(Fe)}function p_(t){var e=y_(t.alternate,t,Tt);t.memoizedProps=t.pendingProps,e===null?m_(t):Fe=e,om.current=null}function m_(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=nA(n,e),n!==null){n.flags&=32767,Fe=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{We=6,Fe=null;return}}else if(n=tA(n,e,Tt),n!==null){Fe=n;return}if(e=e.sibling,e!==null){Fe=e;return}Fe=e=t}while(e!==null);We===0&&(We=5)}function gs(t,e,n){var r=me,s=qt.transition;try{qt.transition=null,me=1,uA(t,e,n,r)}finally{qt.transition=s,me=r}return null}function uA(t,e,n,r){do Oi();while(Mr!==null);if(ce&6)throw Error(L(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(L(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(WC(t,i),t===Ge&&(Fe=Ge=null,Xe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Tl||(Tl=!0,v_(Ec,function(){return Oi(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=qt.transition,qt.transition=null;var o=me;me=1;var a=ce;ce|=4,om.current=null,sA(t,n),c_(n,t),RT(Kh),Tc=!!qh,Kh=qh=null,t.current=n,iA(n),LC(),ce=a,me=o,qt.transition=i}else t.current=n;if(Tl&&(Tl=!1,Mr=t,zc=s),i=t.pendingLanes,i===0&&(Hr=null),$C(n.stateNode),St(t,Le()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Uc)throw Uc=!1,t=pf,pf=null,t;return zc&1&&t.tag!==0&&Oi(),i=t.pendingLanes,i&1?t===mf?na++:(na=0,mf=t):na=0,ls(),null}function Oi(){if(Mr!==null){var t=Zx(zc),e=qt.transition,n=me;try{if(qt.transition=null,me=16>t?16:t,Mr===null)var r=!1;else{if(t=Mr,Mr=null,zc=0,ce&6)throw Error(L(331));var s=ce;for(ce|=4,U=t.current;U!==null;){var i=U,o=i.child;if(U.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(U=c;U!==null;){var u=U;switch(u.tag){case 0:case 11:case 15:ea(8,u,i)}var h=u.child;if(h!==null)h.return=u,U=h;else for(;U!==null;){u=U;var p=u.sibling,f=u.return;if(o_(u),u===c){U=null;break}if(p!==null){p.return=f,U=p;break}U=f}}}var m=i.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var x=y.sibling;y.sibling=null,y=x}while(y!==null)}}U=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,U=o;else e:for(;U!==null;){if(i=U,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ea(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,U=v;break e}U=i.return}}var g=t.current;for(U=g;U!==null;){o=U;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,U=w;else e:for(o=g;U!==null;){if(a=U,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Du(9,a)}}catch(k){Ie(a,a.return,k)}if(a===o){U=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,U=_;break e}U=a.return}}if(ce=s,ls(),Nn&&typeof Nn.onPostCommitFiberRoot=="function")try{Nn.onPostCommitFiberRoot(Au,t)}catch{}r=!0}return r}finally{me=n,qt.transition=e}}return!1}function Fy(t,e,n){e=Qi(n,e),e=Zb(t,e,1),t=Wr(t,e,1),e=pt(),t!==null&&(Ga(t,1,e),St(t,e))}function Ie(t,e,n){if(t.tag===3)Fy(t,t,n);else for(;e!==null;){if(e.tag===3){Fy(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Hr===null||!Hr.has(r))){t=Qi(n,t),t=Yb(e,t,1),e=Wr(e,t,1),t=pt(),e!==null&&(Ga(e,1,t),St(e,t));break}}e=e.return}}function dA(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=pt(),t.pingedLanes|=t.suspendedLanes&n,Ge===t&&(Xe&n)===n&&(We===4||We===3&&(Xe&130023424)===Xe&&500>Le()-lm?Is(t,0):am|=n),St(t,e)}function g_(t,e){e===0&&(t.mode&1?(e=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):e=1);var n=pt();t=or(t,e),t!==null&&(Ga(t,e,n),St(t,n))}function hA(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),g_(t,n)}function fA(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(e),g_(t,n)}var y_;y_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||_t.current)bt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return bt=!1,eA(t,e,n);bt=!!(t.flags&131072)}else bt=!1,Ee&&e.flags&1048576&&bb(e,Ic,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;tc(t,e),t=e.pendingProps;var s=Gi(e,lt.current);Ni(e,n),s=tm(null,e,r,t,s,n);var i=nm();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,kt(r)?(i=!0,Nc(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Yp(e),s.updater=Lu,e.stateNode=s,s._reactInternals=e,nf(e,r,t,n),e=of(null,e,r,!0,i,n)):(e.tag=0,Ee&&i&&zp(e),ut(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(tc(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=mA(r),t=an(r,t),s){case 0:e=sf(null,e,r,t,n);break e;case 1:e=Ry(null,e,r,t,n);break e;case 11:e=Ay(null,e,r,t,n);break e;case 14:e=Py(null,e,r,an(r.type,t),n);break e}throw Error(L(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:an(r,s),sf(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:an(r,s),Ry(t,e,r,s,n);case 3:e:{if(e_(e),t===null)throw Error(L(387));r=e.pendingProps,i=e.memoizedState,s=i.element,Tb(t,e),Mc(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Qi(Error(L(423)),e),e=jy(t,e,r,n,s);break e}else if(r!==s){s=Qi(Error(L(424)),e),e=jy(t,e,r,n,s);break e}else for(Rt=zr(e.stateNode.containerInfo.firstChild),jt=e,Ee=!0,fn=null,n=Eb(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zi(),r===s){e=ar(t,e,n);break e}ut(t,e,r,n)}e=e.child}return e;case 5:return Ab(e),t===null&&Xh(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Gh(r,s)?o=null:i!==null&&Gh(r,i)&&(e.flags|=32),Xb(t,e),ut(t,e,o,n),e.child;case 6:return t===null&&Xh(e),null;case 13:return t_(t,e,n);case 4:return Jp(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Yi(e,null,r,n):ut(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:an(r,s),Ay(t,e,r,s,n);case 7:return ut(t,e,e.pendingProps,n),e.child;case 8:return ut(t,e,e.pendingProps.children,n),e.child;case 12:return ut(t,e,e.pendingProps.children,n),e.child;
vendor: 7,414 bytes, line 40
40case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,xe(Lc,r._currentValue),r._currentValue=o,i!==null)if(vn(i.value,o)){if(i.children===s.children&&!_t.current){e=ar(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=rr(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),ef(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ef(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ut(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Ni(e,n),s=Gt(s),r=r(s),e.flags|=1,ut(t,e,r,n),e.child;case 14:return r=e.type,s=an(r,e.pendingProps),s=an(r.type,s),Py(t,e,r,s,n);case 15:return Jb(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:an(r,s),tc(t,e),e.tag=1,kt(r)?(t=!0,Nc(e)):t=!1,Ni(e,n),Gb(e,r,s),nf(e,r,s,n),of(null,e,r,!0,t,n);case 19:return n_(t,e,n);case 22:return Qb(t,e,n)}throw Error(L(156,e.tag))};function v_(t,e){return Hx(t,e)}function pA(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(t,e,n,r){return new pA(t,e,n,r)}function hm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function mA(t){if(typeof t=="function")return hm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===jp)return 11;if(t===Np)return 14}return 2}function Kr(t,e){var n=t.alternate;return n===null?(n=zt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function sc(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")hm(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case fi:return Ls(n.children,s,i,e);case Rp:o=8,s|=8;break;case Ch:return t=zt(12,n,e,s|2),t.elementType=Ch,t.lanes=i,t;case Th:return t=zt(13,n,e,s),t.elementType=Th,t.lanes=i,t;case Ah:return t=zt(19,n,e,s),t.elementType=Ah,t.lanes=i,t;case Ax:return $u(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Cx:o=10;break e;case Tx:o=9;break e;case jp:o=11;break e;case Np:o=14;break e;case Sr:o=16,r=null;break e}throw Error(L(130,t==null?t:typeof t,""))}return e=zt(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Ls(t,e,n,r){return t=zt(7,t,r,e),t.lanes=n,t}function $u(t,e,n,r){return t=zt(22,t,r,e),t.elementType=Ax,t.lanes=n,t.stateNode={isHidden:!1},t}function qd(t,e,n){return t=zt(6,t,null,e),t.lanes=n,t}function Kd(t,e,n){return e=zt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function gA(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Td(0),this.expirationTimes=Td(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Td(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function fm(t,e,n,r,s,i,o,a,l){return t=new gA(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=zt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yp(i),t}function yA(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:hi,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function w_(t){if(!t)return Yr;t=t._reactInternals;e:{if(Zs(t)!==t||t.tag!==1)throw Error(L(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(kt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(L(171))}if(t.tag===1){var n=t.type;if(kt(n))return wb(t,n,e)}return e}function x_(t,e,n,r,s,i,o,a,l){return t=fm(n,r,!0,t,s,i,o,a,l),t.context=w_(null),n=t.current,r=pt(),s=qr(n),i=rr(r,s),i.callback=e??null,Wr(n,i,s),t.current.lanes=s,Ga(t,s,r),St(t,r),t}function Vu(t,e,n,r){var s=e.current,i=pt(),o=qr(s);return n=w_(n),e.context===null?e.context=n:e.pendingContext=n,e=rr(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Wr(s,e,o),t!==null&&(gn(t,s,o,i),Ql(t,s,o)),o}function Hc(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function By(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function pm(t,e){By(t,e),(t=t.alternate)&&By(t,e)}function vA(){return null}var b_=typeof reportError=="function"?reportError:function(t){console.error(t)};function mm(t){this._internalRoot=t}Fu.prototype.render=mm.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(L(409));Vu(t,e,null,null)};Fu.prototype.unmount=mm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Us(function(){Vu(null,t,null,null)}),e[ir]=null}};function Fu(t){this._internalRoot=t}Fu.prototype.unstable_scheduleHydration=function(t){if(t){var e=Qx();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Tr.length&&e!==0&&e<Tr[n].priority;n++);Tr.splice(n,0,t),n===0&&eb(t)}};function gm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Bu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Uy(){}function wA(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Hc(o);i.call(c)}}var o=x_(e,r,t,0,null,!1,!1,"",Uy);return t._reactRootContainer=o,t[ir]=o.current,ya(t.nodeType===8?t.parentNode:t),Us(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=Hc(l);a.call(c)}}var l=fm(t,0,!1,null,null,!1,!1,"",Uy);return t._reactRootContainer=l,t[ir]=l.current,ya(t.nodeType===8?t.parentNode:t),Us(function(){Vu(e,l,n,r)}),l}function Uu(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Hc(o);a.call(l)}}Vu(e,o,t,s)}else o=wA(n,e,t,s,r);return Hc(o)}Yx=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Bo(e.pendingLanes);
vendor: 4,598 bytes, line 40
40n!==0&&(Lp(e,n|1),St(e,Le()),!(ce&6)&&(Xi=Le()+500,ls()))}break;case 13:Us(function(){var r=or(t,1);if(r!==null){var s=pt();gn(r,t,1,s)}}),pm(t,1)}};Dp=function(t){if(t.tag===13){var e=or(t,134217728);if(e!==null){var n=pt();gn(e,t,134217728,n)}pm(t,134217728)}};Jx=function(t){if(t.tag===13){var e=qr(t),n=or(t,e);if(n!==null){var r=pt();gn(n,t,e,r)}pm(t,e)}};Qx=function(){return me};Xx=function(t,e){var n=me;try{return me=t,e()}finally{me=n}};$h=function(t,e,n){switch(e){case"input":if(jh(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=Nu(r);if(!s)throw Error(L(90));Rx(r),jh(r,s)}}}break;case"textarea":Nx(t,n);break;case"select":e=n.value,e!=null&&Ai(t,!!n.multiple,e,!1)}};Vx=cm;Fx=Us;var xA={usingClientEntryPoint:!1,Events:[Ya,yi,Nu,Mx,$x,cm]},No={findFiberByHostInstance:bs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bA={bundleType:No.bundleType,version:No.version,rendererPackageName:No.rendererPackageName,rendererConfig:No.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:dr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=zx(t),t===null?null:t.stateNode},findFiberByHostInstance:No.findFiberByHostInstance||vA,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 Al=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Al.isDisabled&&Al.supportsFiber)try{Au=Al.inject(bA),Nn=Al}catch{}}Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xA;Dt.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gm(e))throw Error(L(200));return yA(t,e,null,n)};Dt.createRoot=function(t,e){if(!gm(t))throw Error(L(299));var n=!1,r="",s=b_;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=fm(t,1,!1,null,null,n,!1,r,s),t[ir]=e.current,ya(t.nodeType===8?t.parentNode:t),new mm(e)};Dt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(L(188)):(t=Object.keys(t).join(","),Error(L(268,t)));return t=zx(e),t=t===null?null:t.stateNode,t};Dt.flushSync=function(t){return Us(t)};Dt.hydrate=function(t,e,n){if(!Bu(e))throw Error(L(200));return Uu(null,t,e,!0,n)};Dt.hydrateRoot=function(t,e,n){if(!gm(t))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=b_;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=x_(e,null,t,1,n??null,s,!1,i,o),t[ir]=e.current,ya(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new Fu(e)};Dt.render=function(t,e,n){if(!Bu(e))throw Error(L(200));return Uu(null,t,e,!1,n)};Dt.unmountComponentAtNode=function(t){if(!Bu(t))throw Error(L(40));return t._reactRootContainer?(Us(function(){Uu(null,null,t,!1,function(){t._reactRootContainer=null,t[ir]=null})}),!0):!1};Dt.unstable_batchedUpdates=cm;Dt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Bu(n))throw Error(L(200));if(t==null||t._reactInternals===void 0)throw Error(L(38));return Uu(t,e,n,!1,r)};Dt.version="18.3.1-next-f1338f8080-20240426";function __(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(__)}catch(t){console.error(t)}}__(),_x.exports=Dt;var Qa=_x.exports;const k_=ux(Qa);var S_,zy=Qa;S_=zy.createRoot,zy.hydrateRoot;const _A=1,kA=1e6;let Gd=0;function SA(){return Gd=(Gd+1)%Number.MAX_SAFE_INTEGER,Gd.toString()}const Zd=new Map,Wy=t=>{if(Zd.has(t))return;const e=setTimeout(()=>{Zd.delete(t),ra({type:"REMOVE_TOAST",toastId:t})},kA);Zd.set(t,e)},EA=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,_A)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;
vendor: 9,793 bytes, line 40
40return n?Wy(n):t.toasts.forEach(r=>{Wy(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},ic=[];let oc={toasts:[]};function ra(t){oc=EA(oc,t),ic.forEach(e=>{e(oc)})}function CA({...t}){const e=SA(),n=s=>ra({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>ra({type:"DISMISS_TOAST",toastId:e});return ra({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function TA(){const[t,e]=b.useState(oc);return b.useEffect(()=>(ic.push(e),()=>{const n=ic.indexOf(e);n>-1&&ic.splice(n,1)}),[t]),{...t,toast:CA,dismiss:n=>ra({type:"DISMISS_TOAST",toastId:n})}}function De(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Hy(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function E_(...t){return e=>{let n=!1;const r=t.map(s=>{const i=Hy(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Hy(t[s],null)}}}}function It(...t){return b.useCallback(E_(...t),t)}function mo(t,e=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];const c=h=>{var v;const{scope:p,children:f,...m}=h,y=((v=p==null?void 0:p[t])==null?void 0:v[l])||a,x=b.useMemo(()=>m,Object.values(m));return d.jsx(y.Provider,{value:x,children:f})};c.displayName=i+"Provider";function u(h,p){var y;const f=((y=p==null?void 0:p[t])==null?void 0:y[l])||a,m=b.useContext(f);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,AA(s,...e)]}function AA(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const h=l(i)[`__scope${c}`];return{...a,...h}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function qc(t){const e=RA(t),n=b.forwardRef((r,s)=>{const{children:i,...o}=r,a=b.Children.toArray(i),l=a.find(NA);if(l){const c=l.props.children,u=a.map(h=>h===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:b.isValidElement(c)?b.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}var PA=qc("Slot");function RA(t){const e=b.forwardRef((n,r)=>{const{children:s,...i}=n;if(b.isValidElement(s)){const o=IA(s),a=OA(i,s.props);return s.type!==b.Fragment&&(a.ref=r?E_(r,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var C_=Symbol("radix.slottable");function jA(t){const e=({children:n})=>d.jsx(d.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=C_,e}function NA(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===C_}function OA(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function IA(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function T_(t){const e=t+"CollectionProvider",[n,r]=mo(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:x,children:v}=y,g=I.useRef(null),w=I.useRef(new Map).current;return d.jsx(s,{scope:x,itemMap:w,collectionRef:g,children:v})};o.displayName=e;const a=t+"CollectionSlot",l=qc(a),c=I.forwardRef((y,x)=>{const{scope:v,children:g}=y,w=i(a,v),_=It(x,w.collectionRef);return d.jsx(l,{ref:_,children:g})});c.displayName=a;const u=t+"CollectionItemSlot",h="data-radix-collection-item",p=qc(u),f=I.forwardRef((y,x)=>{const{scope:v,children:g,...w}=y,_=I.useRef(null),k=It(x,_),S=i(u,v);return I.useEffect(()=>(S.itemMap.set(_,{ref:_,...w}),()=>void S.itemMap.delete(_))),d.jsx(p,{[h]:"",ref:k,children:g})});f.displayName=u;function m(y){const x=i(t+"CollectionConsumer",y);return I.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((S,E)=>w.indexOf(S.ref.current)-w.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},m,r]}var LA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=LA.reduce((t,e)=>{const n=qc(`Primitive.${e}`),r=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function A_(t,e){t&&Qa.flushSync(()=>t.dispatchEvent(e))}function Jr(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function DA(t,e=globalThis==null?void 0:globalThis.document){const n=Jr(t);b.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var MA="DismissableLayer",vf="dismissableLayer.update",$A="dismissableLayer.pointerDownOutside",VA="dismissableLayer.focusOutside",qy,P_=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ym=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,c=b.useContext(P_),[u,h]=b.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),m=It(e,E=>h(E)),y=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(x),g=u?y.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,_=g>=v,k=BA(E=>{const C=E.target,A=[...c.branches].some(T=>T.contains(C));!_||A||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},p),S=UA(E=>{const C=E.target;[...c.branches].some(T=>T.contains(C))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},p);return DA(E=>{g===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),b.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(qy=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ky(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qy)}},[u,p,n,c]),b.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ky())},[u,c]),b.useEffect(()=>{const E=()=>f({});return document.addEventListener(vf,E),()=>document.removeEventListener(vf,E)},[]),d.jsx(Be.div,{...l,ref:m,style:{pointerEvents:w?_?"auto":"none":void 0,...t.style},onFocusCapture:De(t.onFocusCapture,S.onFocusCapture),onBlurCapture:De(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:De(t.onPointerDownCapture,k.onPointerDownCapture)})});ym.displayName=MA;var FA="DismissableLayerBranch",R_=b.forwardRef((t,e)=>{const n=b.useContext(P_),r=b.useRef(null),s=It(e,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),d.jsx(Be.div,{...t,ref:s})});R_.displayName=FA;function BA(t,e=globalThis==null?void 0:globalThis.document){const n=Jr(t),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){j_($A,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function UA(t,e=globalThis==null?void 0:globalThis.document){const n=Jr(t),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&j_(VA,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ky(){const t=new CustomEvent(vf);document.dispatchEvent(t)}function j_(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?A_(s,i):s.dispatchEvent(i)}var zA=ym,WA=R_,Dn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},HA="Portal",N_=b.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=b.useState(!1);Dn(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?k_.createPortal(d.jsx(Be.div,{...r,ref:e}),o):null});N_.displayName=HA;function qA(t,e){return b.useReducer((n,r)=>e[n][r]??n,t)}var zu=t=>{const{present:e,children:n}=t,r=KA(e),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=It(r.ref,GA(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}
40):null};zu.displayName="Presence";function KA(t){const[e,n]=b.useState(),r=b.useRef(null),s=b.useRef(t),i=b.useRef("none"),o=t?"mounted":"unmounted",[a,l]=qA(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=Pl(r.current);i.current=a==="mounted"?c:"none"},[a]),Dn(()=>{const c=r.current,u=s.current;if(u!==t){const p=i.current,f=Pl(c);t?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Dn(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,h=f=>{const y=Pl(r.current).includes(f.animationName);if(f.target===e&&y&&(l("ANIMATION_END"),!s.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},p=f=>{f.target===e&&(i.current=Pl(r.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Pl(t){return(t==null?void 0:t.animationName)||"none"}function GA(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var ZA=Cp[" useInsertionEffect ".trim().toString()]||Dn;function Wu({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,o]=YA({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:s;{const u=b.useRef(t!==void 0);b.useEffect(()=>{const h=u.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=b.useCallback(u=>{var h;if(a){const p=JA(u)?u(t):u;p!==t&&((h=o.current)==null||h.call(o,p))}else i(u)},[a,t,i,o]);return[l,c]}function YA({defaultProp:t,onChange:e}){const[n,r]=b.useState(t),s=b.useRef(n),i=b.useRef(e);return ZA(()=>{i.current=e},[e]),b.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function JA(t){return typeof t=="function"}var QA=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),XA="VisuallyHidden",Hu=b.forwardRef((t,e)=>d.jsx(Be.span,{...t,ref:e,style:{...QA,...t.style}}));Hu.displayName=XA;var eP=Hu,vm="ToastProvider",[wm,tP,nP]=T_("Toast"),[O_,SB]=mo("Toast",[nP]),[rP,qu]=O_(vm),I_=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=b.useState(null),[c,u]=b.useState(0),h=b.useRef(!1),p=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${vm}\`. Expected non-empty \`string\`.`),d.jsx(wm.Provider,{scope:e,children:d.jsx(rP,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>u(f=>f+1),[]),onToastRemove:b.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:o})})};I_.displayName=vm;var L_="ToastViewport",sP=["F8"],wf="toast.viewportPause",xf="toast.viewportResume",D_=b.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=sP,label:s="Notifications ({hotkey})",...i}=t,o=qu(L_,n),a=tP(n),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),h=b.useRef(null),p=It(e,h,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=o.toastCount>0;b.useEffect(()=>{const x=v=>{var w;r.length!==0&&r.every(_=>v[_]||v.code===_)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),b.useEffect(()=>{const x=l.current,v=h.current;if(m&&x&&v){const g=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(wf);v.dispatchEvent(S),o.isClosePausedRef.current=!0}},w=()=>
40{if(o.isClosePausedRef.current){const S=new CustomEvent(xf);v.dispatchEvent(S),o.isClosePausedRef.current=!1}},_=S=>{!x.contains(S.relatedTarget)&&w()},k=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",g),x.addEventListener("focusout",_),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",k),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",k),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[m,o.isClosePausedRef]);const y=b.useCallback(({tabbingDirection:x})=>{const g=a().map(w=>{const _=w.ref.current,k=[_,...yP(_)];return x==="forwards"?k:k.reverse()});return(x==="forwards"?g.reverse():g).flat()},[a]);return b.useEffect(()=>{const x=h.current;if(x){const v=g=>{var k,S,E;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const C=document.activeElement,A=g.shiftKey;if(g.target===x&&A){(k=c.current)==null||k.focus();return}const N=y({tabbingDirection:A?"backwards":"forwards"}),z=N.findIndex(M=>M===C);Yd(N.slice(z+1))?g.preventDefault():A?(S=c.current)==null||S.focus():(E=u.current)==null||E.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[a,y]),d.jsxs(WA,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&d.jsx(bf,{ref:c,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"forwards"});Yd(x)}}),d.jsx(wm.Slot,{scope:n,children:d.jsx(Be.ol,{tabIndex:-1,...i,ref:p})}),m&&d.jsx(bf,{ref:u,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"backwards"});Yd(x)}})]})});D_.displayName=L_;var M_="ToastFocusProxy",bf=b.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=qu(M_,n);return d.jsx(Hu,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});bf.displayName=M_;var Xa="Toast",iP="toast.swipeStart",oP="toast.swipeMove",aP="toast.swipeCancel",lP="toast.swipeEnd",$_=b.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Wu({prop:r,defaultProp:s??!0,onChange:i,caller:Xa});return d.jsx(zu,{present:n||a,children:d.jsx(dP,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Jr(t.onPause),onResume:Jr(t.onResume),onSwipeStart:De(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:De(t.onSwipeMove,c=>{const{x:u,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:De(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:De(t.onSwipeEnd,c=>{const{x:u,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});$_.displayName=Xa;var[cP,uP]=O_(Xa,{onClose(){}}),dP=b.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...m}=t,y=qu(Xa,n),[x,v]=b.useState(null),g=It(e,M=>v(M)),w=b.useRef(null),_=b.useRef(null),k=s||y.duration,S=b.useRef(0),E=b.useRef(k),C=b.useRef(0),{onToastAdd:A,onToastRemove:T}=y,O=Jr(()=>{var Q;(x==null?void 0:x.contains(document.activeElement))&&((Q=y.viewport)==null||Q.focus()),o()}),N=b.useCallback(M=>
40{!M||M===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(O,M))},[O]);b.useEffect(()=>{const M=y.viewport;if(M){const Q=()=>{N(E.current),c==null||c()},G=()=>{const re=new Date().getTime()-S.current;E.current=E.current-re,window.clearTimeout(C.current),l==null||l()};return M.addEventListener(wf,G),M.addEventListener(xf,Q),()=>{M.removeEventListener(wf,G),M.removeEventListener(xf,Q)}}},[y.viewport,k,l,c,N]),b.useEffect(()=>{i&&!y.isClosePausedRef.current&&N(k)},[i,k,y.isClosePausedRef,N]),b.useEffect(()=>(A(),()=>T()),[A,T]);const z=b.useMemo(()=>x?H_(x):null,[x]);return y.viewport?d.jsxs(d.Fragment,{children:[z&&d.jsx(hP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),d.jsx(cP,{scope:n,onClose:O,children:Qa.createPortal(d.jsx(wm.ItemSlot,{scope:n,children:d.jsx(zA,{asChild:!0,onEscapeKeyDown:De(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||O(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Be.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...m,ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:De(t.onKeyDown,M=>{M.key==="Escape"&&(a==null||a(M.nativeEvent),M.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:De(t.onPointerDown,M=>{M.button===0&&(w.current={x:M.clientX,y:M.clientY})}),onPointerMove:De(t.onPointerMove,M=>{if(!w.current)return;const Q=M.clientX-w.current.x,G=M.clientY-w.current.y,re=!!_.current,P=["left","right"].includes(y.swipeDirection),R=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,V=P?R(0,Q):0,J=P?0:R(0,G),Z=M.pointerType==="touch"?10:2,oe={x:V,y:J},le={originalEvent:M,delta:oe};re?(_.current=oe,Rl(oP,h,le,{discrete:!1})):Gy(oe,y.swipeDirection,Z)?(_.current=oe,Rl(iP,u,le,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs(Q)>Z||Math.abs(G)>Z)&&(w.current=null)}),onPointerUp:De(t.onPointerUp,M=>{const Q=_.current,G=M.target;if(G.hasPointerCapture(M.pointerId)&&G.releasePointerCapture(M.pointerId),_.current=null,w.current=null,Q){const re=M.currentTarget,P={originalEvent:M,delta:Q};Gy(Q,y.swipeDirection,y.swipeThreshold)?Rl(lP,f,P,{discrete:!0}):Rl(aP,p,P,{discrete:!0}),re.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),hP=t=>{const{__scopeToast:e,children:n,...r}=t,s=qu(Xa,e),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return mP(()=>o(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:d.jsx(N_,{asChild:!0,children:d.jsx(Hu,{...r,children:i&&d.jsxs(d.Fragment,{children:[s.label," ",n]})})})},fP="ToastTitle",V_=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(Be.div,{...r,ref:e})});V_.displayName=fP;var pP="ToastDescription",F_=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(Be.div,{...r,ref:e})});F_.displayName=pP;var B_="ToastAction",U_=b.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?d.jsx(W_,{altText:n,asChild:!0,children:d.jsx(xm,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${B_}\`. Expected non-empty \`string\`.`),null)});U_.displayName=B_;var z_="ToastClose",xm=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=uP(z_,n);return d.jsx(W_,{asChild:!0,children:d.jsx(Be.button,{type:"button",...r,ref:e,onClick:De(t.onClick,s.onClose)})})});xm.displayName=z_;var W_=b.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return d.jsx(Be.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function H_(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),gP(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...H_(r))}}),e}function Rl(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?A_(s,i):s.dispatchEvent(i)}var Gy=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function mP(t=()=>{}){const e=Jr(t);Dn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function gP(t){return t.nodeType===t.ELEMENT_NODE}function yP(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Yd(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var vP=I_,q_=D_,K_=$_,G_=V_,Z_=F_,Y_=U_,J_=xm;function Q_(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=Q_(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function X_(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=Q_(t))&&(r&&(r+=" "),r+=e);return r}const Zy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Yy=X_,bm=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Yy(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],h=i==null?void 0:i[c];if(u===null)return null;const p=Zy(u)||Zy(h);return s[c][p]}),a=n&&Object.entries(n).reduce((c,u)=>{let[h,p]=u;return p===void 0||(c[h]=p),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:h,className:p,...f}=u;return Object.entries(f).every(m=>{let[y,x]=m;return Array.isArray(x)?x.includes({...i,...a}[y]):{...i,...a}[y]===x})?[...c,h,p]:c},[]);return Yy(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const wP=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),e1=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===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 xP={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 bP=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...xP,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:e1("lucide",s),...a},[...o.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const fe=(t,e)=>{const n=b.forwardRef(({className:r,...s},i)=>b.createElement(bP,{ref:i,iconNode:e,className:e1(`lucide-${wP(t)}`,r),...s}));return n.displayName=`${t}`,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 _P=fe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
65-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** 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 Jy=fe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 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 eo=fe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 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 kP=fe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const SP=fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 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 EP=fe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const CP=fe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const TP=fe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const AP=fe("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const PP=fe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const RP=fe("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const jP=fe("FileChartColumn",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-1",key:"zg0ygc"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"M16 18v-3",key:"j5jt4h"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const NP=fe("FileCheck2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const OP=fe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const Qy=fe("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const IP=fe("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const LP=fe("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const ac=fe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree.
155 */const DP=fe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const MP=fe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const $P=fe("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const VP=fe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const FP=fe("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const BP=fe("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const UP=fe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const zP=fe("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const WP=fe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const HP=fe("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const t1=fe("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const qP=fe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const KP=fe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const n1=fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,914 bytes, line 220
220],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_m="-",GP=t=>{const e=YP(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(_m);return a[0]===""&&a.length!==1&&a.shift(),r1(a,e)||ZP(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},r1=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?r1(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(_m);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Xy=/^\[(.+)\]$/,ZP=t=>{if(Xy.test(t)){const e=Xy.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},YP=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return QP(Object.entries(t.classGroups),n).forEach(([i,o])=>{_f(o,r,i,e)}),r},_f=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:ev(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(JP(s)){_f(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{_f(o,ev(e,i),n,r)})})},ev=(t,e)=>{let n=t;return e.split(_m).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},JP=t=>t.isThemeGetter,QP=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,XP=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},s1="!",eR=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let c=0,u=0,h;for(let x=0;x<a.length;x++){let v=a[x];if(c===0){if(v===s&&(r||a.slice(x,x+i)===e)){l.push(a.slice(u,x)),u=x+i;continue}if(v==="/"){h=x;continue}}v==="["?c++:v==="]"&&c--}const p=l.length===0?a:a.substring(u),f=p.startsWith(s1),m=f?p.substring(1):p,y=h&&h>u?h-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},tR=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},nR=t=>({cache:XP(t.cacheSize),parseClassName:eR(t),...GP(t)}),rR=/\s+/,sR=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(rR);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=n(c);let m=!!f,y=r(m?p.substring(0,f):p);if(!y){if(!m){a=c+(a.length>0?" "+a:a);continue}if(y=r(p),!y){a=c+(a.length>0?" "+a:a);continue}m=!1}const x=tR(u).join(":"),v=h?x+s1:x,g=v+y;if(i.includes(g))continue;i.push(g);const w=s(y,m);for(let _=0;_<w.length;++_){const k=w[_];i.push(v+k)}a=c+(a.length>0?" "+a:a)}return a};function iR(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=i1(e))&&(r&&(r+=" "),r+=n);return r}const i1=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=i1(t[r]))&&(n&&(n+=" "),n+=e);return n};function oR(t,...e){let n,r,s,i=o;function o(l){const c=e.reduce((u,h)=>h(u),t());return n=nR(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=sR(l,n);return s(l,u),u}return function(){return i(iR.apply(null,arguments))}}const be=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},o1=/^\[(?:([a-z-]+):)?(.+)\]$/i,aR=/^\d+\/\d+$/,lR=new Set(["px","full","screen"]),cR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uR=/\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$/,dR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bn=t=>Ii(t)||lR.has(t)||aR.test(t),wr=t=>go(t,"length",bR),Ii=t=>!!t&&!Number.isNaN(Number(t)),Jd=t=>go(t,"number",Ii),Oo=t=>!!t&&Number.isInteger(Number(t)),pR=t=>t.endsWith("%")&&Ii(t.slice(0,-1)),se=t=>o1.test(t),xr=t=>cR.test(t),mR=new Set(["length","size","percentage"]),gR=t=>go(t,mR,a1),yR=t=>go(t,"position",a1),vR=new Set(["image","url"]),wR=t=>go(t,vR,kR),xR=t=>go(t,"",_R),Io=()=>!0,go=(t,e,n)=>{const r=o1.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},bR=t=>uR.test(t)&&!dR.test(t),a1=()=>!1,_R=t=>hR.test(t),kR=t=>fR.test(t),SR=()=>{const t=be("colors"),e=be("spacing"),n=be("blur"),r=be("brightness"),s=be("borderColor"),i=be("borderRadius"),o=be("borderSpacing"),a=be("borderWidth"),l=be("contrast"),c=be("grayscale"),u=be("hueRotate"),h=be("invert"),p=be("gap"),f=be("gradientColorStops"),m=be("gradientColorStopPositions"),y=be("inset"),x=be("margin"),v=be("opacity"),g=be("padding"),w=be("saturate"),_=be("scale"),k=be("sepia"),S=be("skew"),E=be("space"),C=be("translate"),A=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",se,e],N=()=>[se,e],z=()=>["",Bn,wr],M=()=>["auto",Ii,se],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",se],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Ii,se];return{cacheSize:500,separator:":",theme:{colors:[Io],spacing:[Bn,wr],blur:["none","",xr,se],brightness:J(),borderColor:[t],borderRadius:["n
220one","","full",xr,se],borderSpacing:N(),borderWidth:z(),contrast:J(),grayscale:R(),hueRotate:J(),invert:R(),gap:N(),gradientColorStops:[t],gradientColorStopPositions:[pR,wr],inset:O(),margin:O(),opacity:J(),padding:N(),saturate:J(),scale:J(),sepia:R(),skew:J(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[xr]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:[...Q(),se]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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",Oo,se]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",se]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",Oo,se]}],"grid-cols":[{"grid-cols":[Io]}],"col-start-end":[{col:["auto",{span:["full",Oo,se]},se]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Io]}],"row-start-end":[{row:["auto",{span:[Oo,se]},se]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",se]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",se,e]}],"min-w":[{"min-w":[se,e,"min","max","fit"]}],"max-w":[{"max-w":[se,e,"none","full","min","max","fit","prose",{screen:[xr]},xr]}],h:[{h:[se,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[se,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[se,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[se,e,"auto","min","max","fit"]}],"font-size":[{text:["base",xr,wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jd]}],"font-family":[{font:[Io]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",se]}],"line-clamp":[{"line-clamp":["none",Ii,Jd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bn,se]}],"list-image":[{"list-image":["none",se]}],"list-style-type":[{list:["none","disc","decimal",se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bn,wr]}],"underline-offset":[{"underline-offset":["auto",Bn,se]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se]}],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",se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),yR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",gR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wR]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[m]}
vendor: 5,182 bytes, line 220
220],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...G(),"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":[v]}],"divide-style":[{divide:G()}],"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:["",...G()]}],"outline-offset":[{"outline-offset":[Bn,se]}],"outline-w":[{outline:[Bn,wr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Bn,wr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",xr,xR]}],"shadow-color":[{shadow:[Io]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...re(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",xr,se]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",se]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Oo,se]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",se]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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,647 bytes, line 220
220],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",se]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Bn,wr,Jd]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ER=oR(SR);function He(...t){return ER(X_(t))}const CR=vP,l1=b.forwardRef(({className:t,...e},n)=>d.jsx(q_,{ref:n,className:He("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));l1.displayName=q_.displayName;const TR=bm("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"}}),c1=b.forwardRef(({className:t,variant:e,...n},r)=>d.jsx(K_,{ref:r,className:He(TR({variant:e}),t),...n}));c1.displayName=K_.displayName;const AR=b.forwardRef(({className:t,...e},n)=>d.jsx(Y_,{ref:n,className:He("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));AR.displayName=Y_.displayName;const u1=b.forwardRef(({className:t,...e},n)=>d.jsx(J_,{ref:n,className:He("absolute right-2 top-2 rounded-md p-1 text-foreground
220/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:d.jsx(n1,{className:"h-4 w-4"})}));u1.displayName=J_.displayName;const d1=b.forwardRef(({className:t,...e},n)=>d.jsx(G_,{ref:n,className:He("text-sm font-semibold",t),...e}));d1.displayName=G_.displayName;const h1=b.forwardRef(({className:t,...e},n)=>d.jsx(Z_,{ref:n,className:He("text-sm opacity-90",t),...e}));h1.displayName=Z_.displayName;function PR(){const{toasts:t}=TA();return d.jsxs(CR,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return d.jsxs(c1,{...i,children:[d.jsxs("div",{className:"grid gap-1",children:[n&&d.jsx(d1,{children:n}),r&&d.jsx(h1,{children:r})]}),s,d.jsx(u1,{})]},e)}),d.jsx(l1,{})]})}var tv=["light","dark"],RR="(prefers-color-scheme: dark)",jR=b.createContext(void 0),NR={setTheme:t=>{},themes:[]},OR=()=>{var t;return(t=b.useContext(jR))!=null?t:NR};b.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(m=>`'${m}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?tv.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(m,y=!1,x=!0)=>{let v=o?o[m]:m,g=y?m+"|| ''":`'${v}'`,w="";return s&&x&&!y&&tv.includes(m)&&(w+=`d.style.colorScheme = '${m}';`),n==="class"?y||v?w+=`c.add(${g})`:w+="null":v&&(w+=`d[s](n,${g})`),w},f=t?`!function(){${u}${p(t)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${RR}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${c?"":"else{"+p(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${h}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var IR=t=>{switch(t){case"success":return MR;case"info":return VR;case"warning":return $R;case"error":return FR;default:return null}},LR=Array(12).fill(0),DR=({visible:t,className:e})=>I.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},I.createElement("div",{className:"sonner-spinner"},LR.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),MR=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),$R=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),VR=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),FR=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),BR=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),UR=()=>{let[t,e]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{e(document.hidden)};
220return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},kf=1,zR=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:kf++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],I.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(HR(l)&&!l.ok){s=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:c,description:u})}else if(e.success!==void 0){s=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||kf++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},vt=new zR,WR=(t,e)=>{let n=(e==null?void 0:e.id)||kf++;return vt.addToast({title:t,...e,id:n}),n},HR=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",qR=WR,KR=()=>vt.toasts,GR=()=>vt.getActiveToasts(),lc=Object.assign(qR,{success:vt.success,info:vt.info,warning:vt.warning,error:vt.error,custom:vt.custom,message:vt.message,promise:vt.promise,dismiss:vt.dismiss,loading:vt.loading},{getHistory:KR,getToasts:GR});function ZR(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}ZR(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
220left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
220:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
220--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 221`);function jl(t){return t.label!==void 0}var YR=3,JR="32px",QR="16px",nv=4e3,XR=356,ej=14,tj=20,nj=200;function tn(...t){return t.filter(Boolean).join(" ")}function rj(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var sj=t=>{var e,n,r,s,i,o,a,l,c,u,h;let{invert:p,toast:f,unstyled:m,interacting:y,setHeights:x,visibleToasts:v,heights:g,index:w,toasts:_,expanded:k,removeToast:S,defaultRichColors:E,closeButton:C,style:A,cancelButtonStyle:T,actionButtonStyle:O,className:N="",descriptionClassName:z="",duration:M,position:Q,gap:G,loadingIcon:re,expandByDefault:P,classNames:R,icons:V,
vendor: 4,103 bytes, line 221
221closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:Z}=t,[oe,le]=I.useState(null),[Me,tt]=I.useState(null),[pe,Ys]=I.useState(!1),[hr,us]=I.useState(!1),[fr,Js]=I.useState(!1),[pr,ll]=I.useState(!1),[yd,cl]=I.useState(!1),[vd,ko]=I.useState(0),[Qs,Ag]=I.useState(0),So=I.useRef(f.duration||M||nv),Pg=I.useRef(null),ds=I.useRef(null),BE=w===0,UE=w+1<=v,$t=f.type,Xs=f.dismissible!==!1,zE=f.className||"",WE=f.descriptionClassName||"",ul=I.useMemo(()=>g.findIndex(te=>te.toastId===f.id)||0,[g,f.id]),HE=I.useMemo(()=>{var te;return(te=f.closeButton)!=null?te:C},[f.closeButton,C]),Rg=I.useMemo(()=>f.duration||M||nv,[f.duration,M]),wd=I.useRef(0),ei=I.useRef(0),jg=I.useRef(0),ti=I.useRef(null),[qE,KE]=Q.split("-"),Ng=I.useMemo(()=>g.reduce((te,ge,Se)=>Se>=ul?te:te+ge.height,0),[g,ul]),Og=UR(),GE=f.invert||p,xd=$t==="loading";ei.current=I.useMemo(()=>ul*G+Ng,[ul,Ng]),I.useEffect(()=>{So.current=Rg},[Rg]),I.useEffect(()=>{Ys(!0)},[]),I.useEffect(()=>{let te=ds.current;if(te){let ge=te.getBoundingClientRect().height;return Ag(ge),x(Se=>[{toastId:f.id,height:ge,position:f.position},...Se]),()=>x(Se=>Se.filter(Jt=>Jt.toastId!==f.id))}},[x,f.id]),I.useLayoutEffect(()=>{if(!pe)return;let te=ds.current,ge=te.style.height;te.style.height="auto";let Se=te.getBoundingClientRect().height;te.style.height=ge,Ag(Se),x(Jt=>Jt.find(Qt=>Qt.toastId===f.id)?Jt.map(Qt=>Qt.toastId===f.id?{...Qt,height:Se}:Qt):[{toastId:f.id,height:Se,position:f.position},...Jt])},[pe,f.title,f.description,x,f.id]);let mr=I.useCallback(()=>{us(!0),ko(ei.current),x(te=>te.filter(ge=>ge.toastId!==f.id)),setTimeout(()=>{S(f)},nj)},[f,S,x,ei]);I.useEffect(()=>{if(f.promise&&$t==="loading"||f.duration===1/0||f.type==="loading")return;let te;return k||y||Z&&Og?(()=>{if(jg.current<wd.current){let ge=new Date().getTime()-wd.current;So.current=So.current-ge}jg.current=new Date().getTime()})():So.current!==1/0&&(wd.current=new Date().getTime(),te=setTimeout(()=>{var ge;(ge=f.onAutoClose)==null||ge.call(f,f),mr()},So.current)),()=>clearTimeout(te)},[k,y,f,$t,Z,Og,mr]),I.useEffect(()=>{f.delete&&mr()},[mr,f.delete]);function ZE(){var te,ge,Se;return V!=null&&V.loading?I.createElement("div",{className:tn(R==null?void 0:R.loader,(te=f==null?void 0:f.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":$t==="loading"},V.loading):re?I.createElement("div",{className:tn(R==null?void 0:R.loader,(ge=f==null?void 0:f.classNames)==null?void 0:ge.loader,"sonner-loader"),"data-visible":$t==="loading"},re):I.createElement(DR,{className:tn(R==null?void 0:R.loader,(Se=f==null?void 0:f.classNames)==null?void 0:Se.loader),visible:$t==="loading"})}return I.createElement("li",{tabIndex:0,ref:ds,className:tn(N,zE,R==null?void 0:R.toast,(e=f==null?void 0:f.classNames)==null?void 0:e.toast,R==null?void 0:R.default,R==null?void 0:R[$t],(n=f==null?void 0:f.classNames)==null?void 0:n[$t]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:E,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":pe,"data-promise":!!f.promise,"data-swiped":yd,"data-removed":hr,"data-visible":UE,"data-y-position":qE,"data-x-position":KE,"data-index":w,"data-front":BE,"data-swiping":fr,"data-dismissible":Xs,"data-type":$t,"data-invert":GE,"data-swipe-out":pr,"data-swipe-direction":Me,"data-expanded":!!(k||P&&pe),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${hr?vd:ei.current}px`,"--initial-height":P?"auto":`${Qs}px`,...A,...f.style},onDragEnd:()=>{Js(!1),le(null),ti.current=null},onPointerDown:te=>{xd||!Xs||(Pg.current=new Date,ko(ei.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(Js(!0),ti.current={x:te.clientX,y:te.clientY}))},onPointerUp:()=>{var te,ge,Se,Jt;if(pr||!Xs)return;ti.current=null;let Qt=Number(((te=ds.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),gr=Number(((ge=ds.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),hs=new Date().getTime()-((Se=Pg.current)==null?void 0:Se.getTime()),Xt=oe==="x"?Qt:gr,yr=Math.abs(Xt)/hs;if(Math.abs(Xt)>=tj||yr>
221.11){ko(ei.current),(Jt=f.onDismiss)==null||Jt.call(f,f),tt(oe==="x"?Qt>0?"right":"left":gr>0?"down":"up"),mr(),ll(!0),cl(!1);return}Js(!1),le(null)},onPointerMove:te=>{var ge,Se,Jt,Qt;if(!ti.current||!Xs||((ge=window.getSelection())==null?void 0:ge.toString().length)>0)return;let gr=te.clientY-ti.current.y,hs=te.clientX-ti.current.x,Xt=(Se=t.swipeDirections)!=null?Se:rj(Q);!oe&&(Math.abs(hs)>1||Math.abs(gr)>1)&&le(Math.abs(hs)>Math.abs(gr)?"x":"y");let yr={x:0,y:0};oe==="y"?(Xt.includes("top")||Xt.includes("bottom"))&&(Xt.includes("top")&&gr<0||Xt.includes("bottom")&&gr>0)&&(yr.y=gr):oe==="x"&&(Xt.includes("left")||Xt.includes("right"))&&(Xt.includes("left")&&hs<0||Xt.includes("right")&&hs>0)&&(yr.x=hs),(Math.abs(yr.x)>0||Math.abs(yr.y)>0)&&cl(!0),(Jt=ds.current)==null||Jt.style.setProperty("--swipe-amount-x",`${yr.x}px`),(Qt=ds.current)==null||Qt.style.setProperty("--swipe-amount-y",`${yr.y}px`)}},HE&&!f.jsx?I.createElement("button",{"aria-label":J,"data-disabled":xd,"data-close-button":!0,onClick:xd||!Xs?()=>{}:()=>{var te;mr(),(te=f.onDismiss)==null||te.call(f,f)},className:tn(R==null?void 0:R.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=V==null?void 0:V.close)!=null?i:BR):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:I.createElement(I.Fragment,null,$t||f.icon||f.promise?I.createElement("div",{"data-icon":"",className:tn(R==null?void 0:R.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||ZE():null,f.type!=="loading"?f.icon||(V==null?void 0:V[$t])||IR($t):null):null,I.createElement("div",{"data-content":"",className:tn(R==null?void 0:R.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:tn(R==null?void 0:R.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?I.createElement("div",{"data-description":"",className:tn(z,WE,R==null?void 0:R.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),b.isValidElement(f.cancel)?f.cancel:f.cancel&&jl(f.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:te=>{var ge,Se;jl(f.cancel)&&Xs&&((Se=(ge=f.cancel).onClick)==null||Se.call(ge,te),mr())},className:tn(R==null?void 0:R.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,b.isValidElement(f.action)?f.action:f.action&&jl(f.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||O,onClick:te=>{var ge,Se;jl(f.action)&&((Se=(ge=f.action).onClick)==null||Se.call(ge,te),!te.defaultPrevented&&mr())},className:tn(R==null?void 0:R.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function rv(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function ij(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?QR:JR;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var oj=b.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:h,duration:p,style:f,visibleToasts:m=YR,toastOptions:y,dir:x=rv(),gap:v=ej,loadingIcon:g,icons:w,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:k}=t,[S,E]=I.useState([]),C=I.useMemo(()=>Array.from(new Set([r].concat(S.filter(Z=>Z.position).map(Z=>Z.position)))),[S,r]),[A,T]=I.useState([]),[O,N]=I.useState(!1),[z,M]=I.useState(!1),[Q,G]=I.use
vendor: 4,170 bytes, line 221
221State(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),re=I.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=I.useRef(null),V=I.useRef(!1),J=I.useCallback(Z=>{E(oe=>{var le;return(le=oe.find(Me=>Me.id===Z.id))!=null&&le.delete||vt.dismiss(Z.id),oe.filter(({id:Me})=>Me!==Z.id)})},[]);return I.useEffect(()=>vt.subscribe(Z=>{if(Z.dismiss){E(oe=>oe.map(le=>le.id===Z.id?{...le,delete:!0}:le));return}setTimeout(()=>{k_.flushSync(()=>{E(oe=>{let le=oe.findIndex(Me=>Me.id===Z.id);return le!==-1?[...oe.slice(0,le),{...oe[le],...Z},...oe.slice(le+1)]:[Z,...oe]})})})}),[]),I.useEffect(()=>{if(u!=="system"){G(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;let Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:oe})=>{G(oe?"dark":"light")})}catch{Z.addListener(({matches:le})=>{try{G(le?"dark":"light")}catch(Me){console.error(Me)}})}},[u]),I.useEffect(()=>{S.length<=1&&N(!1)},[S]),I.useEffect(()=>{let Z=oe=>{var le,Me;s.every(tt=>oe[tt]||oe.code===tt)&&(N(!0),(le=re.current)==null||le.focus()),oe.code==="Escape"&&(document.activeElement===re.current||(Me=re.current)!=null&&Me.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[s]),I.useEffect(()=>{if(re.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,V.current=!1)}},[re.current]),I.createElement("section",{ref:e,"aria-label":`${_} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((Z,oe)=>{var le;let[Me,tt]=Z.split("-");return S.length?I.createElement("ol",{key:Z,dir:x==="auto"?rv():x,tabIndex:-1,ref:re,className:a,"data-sonner-toaster":!0,"data-theme":Q,"data-y-position":Me,"data-lifted":O&&S.length>1&&!i,"data-x-position":tt,style:{"--front-toast-height":`${((le=A[0])==null?void 0:le.height)||0}px`,"--width":`${XR}px`,"--gap":`${v}px`,...f,...ij(l,c)},onBlur:pe=>{V.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(V.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||V.current||(V.current=!0,R.current=pe.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{z||N(!1)},onDragEnd:()=>N(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},S.filter(pe=>!pe.position&&oe===0||pe.position===Z).map((pe,Ys)=>{var hr,us;return I.createElement(sj,{key:pe.id,icons:w,index:Ys,toast:pe,defaultRichColors:h,duration:(hr=y==null?void 0:y.duration)!=null?hr:p,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:m,closeButton:(us=y==null?void 0:y.closeButton)!=null?us:o,interacting:z,position:Z,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:J,toasts:S.filter(fr=>fr.position==pe.position),heights:A.filter(fr=>fr.position==pe.position),setHeights:T,expandByDefault:i,gap:v,loadingIcon:g,expanded:O,pauseWhenPageIsHidden:k,swipeDirections:t.swipeDirections})})):null}))});const aj=({...t})=>{const{theme:e="system"}=OR();return d.jsx(oj,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var lj=Cp[" useId ".trim().toString()]||(()=>{}),cj=0;function f1(t){const[e,n]=b.useState(lj());return Dn(()=>{n(r=>r??String(cj++))},[t]),e?`radix-${e}
221`:""}const uj=["top","right","bottom","left"],Qr=Math.min,At=Math.max,Kc=Math.round,Nl=Math.floor,Xr=t=>({x:t,y:t}),dj={left:"right",right:"left",bottom:"top",top:"bottom"},hj={start:"end",end:"start"};function Sf(t,e,n){return At(t,Qr(e,n))}function lr(t,e){return typeof t=="function"?t(e):t}function cr(t){return t.split("-")[0]}function yo(t){return t.split("-")[1]}function km(t){return t==="x"?"y":"x"}function Sm(t){return t==="y"?"height":"width"}function es(t){return["top","bottom"].includes(cr(t))?"y":"x"}function Em(t){return km(es(t))}function fj(t,e,n){n===void 0&&(n=!1);const r=yo(t),s=Em(t),i=Sm(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Gc(o)),[o,Gc(o)]}function pj(t){const e=Gc(t);return[Ef(t),e,Ef(e)]}function Ef(t){return t.replace(/start|end/g,e=>hj[e])}function mj(t,e,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?i:o;default:return[]}}function gj(t,e,n,r){const s=yo(t);let i=mj(cr(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Ef)))),i}function Gc(t){return t.replace(/left|right|bottom|top/g,e=>dj[e])}function yj(t){return{top:0,right:0,bottom:0,left:0,...t}}function p1(t){return typeof t!="number"?yj(t):{top:t,right:t,bottom:t,left:t}}function Zc(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function sv(t,e,n){let{reference:r,floating:s}=t;const i=es(e),o=Em(e),a=Sm(o),l=cr(e),c=i==="y",u=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-s.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-s.width,y:h};break;default:f={x:r.x,y:r.y}}switch(yo(e)){case"start":f[o]-=p*(n&&c?-1:1);break;case"end":f[o]+=p*(n&&c?-1:1);break}return f}const vj=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:h}=sv(c,r,l),p=r,f={},m=0;for(let y=0;y<a.length;y++){const{name:x,fn:v}=a[y],{x:g,y:w,data:_,reset:k}=await v({x:u,y:h,initialPlacement:r,placement:p,strategy:s,middlewareData:f,re
vendor: 9,385 bytes, line 221
221cts:c,platform:o,elements:{reference:t,floating:e}});u=g??u,h=w??h,f={...f,[x]:{...f[x],..._}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(c=k.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):k.rects),{x:u,y:h}=sv(c,p,l)),y=-1)}return{x:u,y:h,placement:p,strategy:s,middlewareData:f}};async function Ca(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=lr(e,t),m=p1(f),x=a[p?h==="floating"?"reference":"floating":h],v=Zc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Zc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:(v.top-k.top+m.top)/_.y,bottom:(k.bottom-v.bottom+m.bottom)/_.y,left:(v.left-k.left+m.left)/_.x,right:(k.right-v.right+m.right)/_.x}}const wj=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=lr(t,e)||{};if(c==null)return{};const h=p1(u),p={x:n,y:r},f=Em(s),m=Sm(f),y=await o.getDimensions(c),x=f==="y",v=x?"top":"left",g=x?"bottom":"right",w=x?"clientHeight":"clientWidth",_=i.reference[m]+i.reference[f]-p[f]-i.floating[m],k=p[f]-i.reference[f],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=S?S[w]:0;(!E||!await(o.isElement==null?void 0:o.isElement(S)))&&(E=a.floating[w]||i.floating[m]);const C=_/2-k/2,A=E/2-y[m]/2-1,T=Qr(h[v],A),O=Qr(h[g],A),N=T,z=E-y[m]-O,M=E/2-y[m]/2+C,Q=Sf(N,M,z),G=!l.arrow&&yo(s)!=null&&M!==Q&&i.reference[m]/2-(M<N?T:O)-y[m]/2<0,re=G?M<N?M-N:M-z:0;return{[f]:p[f]+re,data:{[f]:Q,centerOffset:M-Q-re,...G&&{alignmentOffset:re}},reset:G}}}),xj=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...x}=lr(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=cr(s),g=es(a),w=cr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=p||(w||!y?[Gc(a)]:pj(a)),S=m!=="none";!p&&S&&k.push(...gj(a,y,m,_));const E=[a,...k],C=await Ca(e,x),A=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(C[v]),h){const M=fj(s,o,_);A.push(C[M[0]],C[M[1]])}if(T=[...T,{placement:s,overflows:A}],!A.every(M=>M<=0)){var O,N;const M=(((O=i.flip)==null?void 0:O.index)||0)+1,Q=E[M];if(Q)return{data:{index:M,overflows:T},reset:{placement:Q}};let G=(N=T.filter(re=>re.overflows[0]<=0).sort((re,P)=>re.overflows[1]-P.overflows[1])[0])==null?void 0:N.placement;if(!G)switch(f){case"bestFit":{var z;const re=(z=T.filter(P=>{if(S){const R=es(P.placement);return R===g||R==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(R=>R>0).reduce((R,V)=>R+V,0)]).sort((P,R)=>P[1]-R[1])[0])==null?void 0:z[0];re&&(G=re);break}case"initialPlacement":G=a;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function iv(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ov(t){return uj.some(e=>t[e]>=0)}const bj=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=lr(t,e);switch(r){case"referenceHidden":{const i=await Ca(e,{...s,elementContext:"reference"}),o=iv(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:ov(o)}}}case"escaped":{const i=await Ca(e,{...s,altBoundary:!0}),o=iv(i,n.floating);return{data:{escapedOffsets:o,escaped:ov(o)}}}default:return{}}}}};async function _j(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=cr(n),a=yo(n),l=es(n)==="y",c=["left","top"].includes(o)?-1:1,u=i&&l?-1:1,h=lr(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const kj=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await _j(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},Sj=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:v,y:g}=x;return{x:v,y:g}}},...l}=lr(t,e),c={x:n,y:r},u=await Ca(e,l),h=es(cr(s)),p=km(h);let f=c[p],m=c[h];if(i){const x=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=f+u[x],w=f-u[v];f=Sf(g,f,w)}if(o){const x=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=m+u[x],w=m-u[v];m=Sf(g,m,w)}const y=a.fn({...e,[p]:f,[h]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:i,[h]:o}}}}}},Ej=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=lr(t,e),u={x:n,y:r},h=es(s),p=km(h);let f=u[p],m=u[h];const y=lr(a,e),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=p==="y"?"height":"width",_=i.reference[p]-i.floating[w]+x.mainAxis,k=i.reference[p]+i.reference[w]-x.mainAxis;f<_?f=_:f>k&&(f=k)}if(c){var v,g;const w=p==="y"?"width":"height",_=["top","left"].includes(cr(s)),k=i.reference[h]-i.floating[w]+(_&&((v=o.offset)==null?void 0:v[h])||0)+(_?0:x.crossAxis),S=i.reference[h]+i.reference[w]+(_?0:((g=o.offset)==null?void 0:g[h])||0)-(_?x.crossAxis:0);m<k?m=k:m>S&&(m=S)}return{[p]:f,[h]:m}}}},Cj=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=lr(t,e),u=await Ca(e,c),h=cr(s),p=yo(s),f=es(s)==="y",{width:m,height:y}=i.floating;let x,v;h==="top"||h==="bottom"?(x=h,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=h,x=p==="end"?"top":"bottom");const g=y-u.top-u.bottom,w=m-u.left-u.right,_=Qr(y-u[x],g),k=Qr(m-u[v],w),S=!e.middlewareData.shift;let E=_,C=k;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=w),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(E=g),S&&!p){const T=At(u.left,0),O=At(u.right,0),N=At(u.top,0),z=At(u.bottom,0);f?C=m-2*(T!==0||O!==0?T+O:At(u.left,u.right)):E=y-2*(N!==0||z!==0?N+z:At(u.top,u.bottom))}await l({...e,availableWidth:C,availableHeight:E});const A=await o.getDimensions(a.floating);return m!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Ku(){return typeof window<"u"}function vo(t){return m1(t)?(t.nodeName||"").toLowerCase():"#document"}function Nt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Vn(t){var e;return(e=(m1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function m1(t){return Ku()?t instanceof Node||t instanceof Nt(t).Node:!1}function wn(t){return Ku()?t instanceof Element||t instanceof Nt(t).Element:!1}function Mn(t){return Ku()?t instanceof HTMLElement||t instanceof Nt(t).HTMLElement:!1}function av(t){return!Ku()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Nt(t).ShadowRoot}function el(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=xn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function Tj(t){return["table","td","th"].includes(vo(t))}function Gu(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Cm(t){const e=Tm(),n=wn(t)?xn(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(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 Aj(t){let e=ts(t);for(;Mn(e)&&!to(e);){if(Cm(e))return e;if(Gu(e))return null;e=ts(e)}return null}function Tm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function to(t){return["html","body","#document"].includes(vo(t))}function xn(t){return Nt(t).getComputedStyle(t)}function Zu(t){return wn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ts(t){if(vo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||av(t)&&t.host||Vn(t);return av(e)?e.host:e}function g1(t){const e=ts(t);return to(e)?t.ownerDocument?t.ownerDocument.body:t.body:Mn(e)&&el(e)?e:g1(e)}function Ta(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=g1(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=Nt(s);if(i){const a=Cf(o);
vendor: 7,125 bytes, line 221
221return e.concat(o,o.visualViewport||[],el(s)?s:[],a&&n?Ta(a):[])}return e.concat(s,Ta(s,[],n))}function Cf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function y1(t){const e=xn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Mn(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=Kc(n)!==i||Kc(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Am(t){return wn(t)?t:t.contextElement}function Li(t){const e=Am(t);if(!Mn(e))return Xr(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=y1(e);let o=(i?Kc(n.width):n.width)/r,a=(i?Kc(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Pj=Xr(0);function v1(t){const e=Nt(t);return!Tm()||!e.visualViewport?Pj:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Rj(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Nt(t)?!1:e}function zs(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=Am(t);let o=Xr(1);e&&(r?wn(r)&&(o=Li(r)):o=Li(t));const a=Rj(i,n,r)?v1(i):Xr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,h=s.height/o.y;if(i){const p=Nt(i),f=r&&wn(r)?Nt(r):r;let m=p,y=Cf(m);for(;y&&r&&f!==m;){const x=Li(y),v=y.getBoundingClientRect(),g=xn(y),w=v.left+(y.clientLeft+parseFloat(g.paddingLeft))*x.x,_=v.top+(y.clientTop+parseFloat(g.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,h*=x.y,l+=w,c+=_,m=Nt(y),y=Cf(m)}}return Zc({width:u,height:h,x:l,y:c})}function jj(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=Vn(r),a=e?Gu(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Xr(1);const u=Xr(0),h=Mn(r);if((h||!h&&!i)&&((vo(r)!=="body"||el(o))&&(l=Zu(r)),Mn(r))){const p=zs(r);c=Li(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function Nj(t){return Array.from(t.getClientRects())}function Tf(t,e){const n=Zu(t).scrollLeft;return e?e.left+n:zs(Vn(t)).left+n}function Oj(t){const e=Vn(t),n=Zu(t),r=t.ownerDocument.body,s=At(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=At(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Tf(t);const a=-n.scrollTop;return xn(r).direction==="rtl"&&(o+=At(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function Ij(t,e){const n=Nt(t),r=Vn(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Tm();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function Lj(t,e){const n=zs(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Mn(t)?Li(t):Xr(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function lv(t,e,n){let r;if(e==="viewport")r=Ij(t,n);else if(e==="document")r=Oj(Vn(t));else if(wn(e))r=Lj(e,n);else{const s=v1(t);r={...e,x:e.x-s.x,y:e.y-s.y}}return Zc(r)}function w1(t,e){const n=ts(t);return n===e||!wn(n)||to(n)?!1:xn(n).position==="fixed"||w1(n,e)}function Dj(t,e){const n=e.get(t);if(n)return n;let r=Ta(t,[],!1).filter(a=>wn(a)&&vo(a)!=="body"),s=null;const i=xn(t).position==="fixed";let o=i?ts(t):t;for(;wn(o)&&!to(o);){const a=xn(o),l=Cm(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||el(o)&&!l&&w1(t,o))?r=r.filter(u=>u!==o):s=a,o=ts(o)}return e.set(t,r),r}function Mj(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?Gu(e)?[]:Dj(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const h=lv(e,u,s);return c.top=At(h.top,c.top),c.right=Qr(h.right,c.right),c.bottom=Qr(h.bottom,c.bottom),c.left=At(h.left,c.left),c},lv(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function $j(t){const{width:e,height:n}=y1(t);return{width:e,height:n}}function Vj(t,e,n){const r=Mn(e),s=Vn(e),i=n==="fixed",o=zs(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Xr(0);if(r||!r&&!i)if((vo(e)!=="body"||el(s))&&(a=Zu(e)),r){const f=zs(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&(l.x=Tf(s));let c=0,u=0;if(s&&!r&&!i){const f=s.getBoundingClientRect();u=f.top+a.scrollTop,c=f.left+a.scrollLeft-Tf(s,f)}const h=o.left+a.scrollLeft-l.x-c,p=o.top+a.scrollTop-l.y-u;return{x:h,y:p,width:o.width,height:o.height}}function Qd(t){return xn(t).position==="static"}function cv(t,e){if(!Mn(t)||xn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Vn(t)===n&&(n=n.ownerDocument.body),n}function x1(t,e){const n=Nt(t);if(Gu(t))return n;if(!Mn(t)){let s=ts(t);for(;s&&!to(s);){if(wn(s)&&!Qd(s))return s;s=ts(s)}return n}let r=cv(t,e);for(;r&&Tj(r)&&Qd(r);)r=cv(r,e);return r&&to(r)&&Qd(r)&&!Cm(r)?n:r||Aj(t)||n}const Fj=async function(t){const e=this.getOffsetParent||x1,n=this.getDimensions,r=await n(t.floating);return{reference:Vj(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bj(t){return xn(t).direction==="rtl"}const Uj={convertOffsetParentRelativeRectToViewportRelativeRect:jj,getDocumentElement:Vn,getClippingRect:Mj,getOffsetParent:x1,getElementRects:Fj,getClientRects:Nj,getDimensions:$j,getScale:Li,isElement:wn,isRTL:Bj};function zj(t,e){let n=null,r;const s=Vn(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:h,height:p}=t.getBoundingClientRect();if(a||e(),!h||!p)return;const f=Nl(u),m=Nl(s.clientWidth-(c+h)),y=Nl(s.clientHeight-(u+p)),x=Nl(c),g={rootMargin:-f+"px "+-m+"px "+-y+"px "+-x+"px",threshold:At(0,Qr(1,l))||1};let w=!0;function _(k){const S=k[0].intersectionRatio;if(S!==l){if(!w)return o();S?o(!1,S):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(_,{...g,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,g)}n.observe(t)}return o(!0),i}function Wj(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Am(t),u=s||i?[...c?Ta(c):[],...Ta(e)]:[];u.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const h=c&&a?zj(c,n):null;let p=-1,f=null;o&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(e)})),n()}),c&&!l&&f.observe(c),f.observe(e));let m,y=l?zs(t):null;l&&x();function x(){const v=zs(t);y&&(v.x!==y.x||v.y!==y.y||v.width!==y.width||v.height!==y.height)&&n(),y=v,m=requestAnimationFrame(x)}return n(),()=>{var v;u.forEach(g=>{s&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),h==null||h(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const Hj=kj,qj=Sj,Kj=xj,Gj=Cj,Zj=bj,uv=wj,Yj=Ej,Jj=(t,e,n)=>{const r=new Map,s={platform:Uj,...n},i={...s.platform,_c:r};return vj(t,e,{...s,platform:i})};var cc=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Yc(t,e){if(t===e)return!0;
vendor: 1,760 bytes, line 221
221if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Yc(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!Yc(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function b1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function dv(t,e){const n=b1(t);return Math.round(e*n)/n}function Xd(t){const e=b.useRef(t);return cc(()=>{e.current=t}),e}function Qj(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,h]=b.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=b.useState(r);Yc(p,r)||f(r);const[m,y]=b.useState(null),[x,v]=b.useState(null),g=b.useCallback(P=>{P!==S.current&&(S.current=P,y(P))},[]),w=b.useCallback(P=>{P!==E.current&&(E.current=P,v(P))},[]),_=i||m,k=o||x,S=b.useRef(null),E=b.useRef(null),C=b.useRef(u),A=l!=null,T=Xd(l),O=Xd(s),N=Xd(c),z=b.useCallback(()=>{if(!S.current||!E.current)return;const P={placement:e,strategy:n,middleware:p};O.current&&(P.platform=O.current),Jj(S.current,E.current,P).then(R=>{const V={...R,isPositioned:N.current!==!1};M.current&&!Yc(C.current,V)&&(C.current=V,Qa.flushSync(()=>{h(V)}))})},[p,e,n,O,N]);cc(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[c]);const M=b.useRef(!1);cc(()=>(M.current=!0,()=>{M.current=!1}),[]),cc(()=>
vendor: 1,476 bytes, line 221
221{if(_&&(S.current=_),k&&(E.current=k),_&&k){if(T.current)return T.current(_,k,z);z()}},[_,k,z,T,A]);const Q=b.useMemo(()=>({reference:S,floating:E,setReference:g,setFloating:w}),[g,w]),G=b.useMemo(()=>({reference:_,floating:k}),[_,k]),re=b.useMemo(()=>{const P={position:n,left:0,top:0};if(!G.floating)return P;const R=dv(G.floating,u.x),V=dv(G.floating,u.y);return a?{...P,transform:"translate("+R+"px, "+V+"px)",...b1(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:V}},[n,a,G.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:z,refs:Q,elements:G,floatingStyles:re}),[u,z,Q,G,re])}const Xj=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?uv({element:r.current,padding:s}).fn(n):{}:r?uv({element:r,padding:s}).fn(n):{}}}},eN=(t,e)=>({...Hj(t),options:[t,e]}),tN=(t,e)=>({...qj(t),options:[t,e]}),nN=(t,e)=>({...Yj(t),options:[t,e]}),rN=(t,e)=>({...Kj(t),options:[t,e]}),sN=(t,e)=>({...Gj(t),options:[t,e]}),iN=(t,e)=>({...Zj(t),options:[t,e]}),oN=(t,e)=>({...Xj(t),options:[t,e]});var aN="Arrow",_1=b.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return d.jsx(Be.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});_1.displayName=aN;var lN=_1;function cN(t){const[e,n]=b.useState(void 0);return Dn(()=>
vendor: 4,972 bytes, line 221
221{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var k1="Popper",[S1,E1]=mo(k1),[EB,C1]=S1(k1),T1="PopperAnchor",A1=b.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=C1(T1,n),o=b.useRef(null),a=It(e,o);return b.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:d.jsx(Be.div,{...s,ref:a})});A1.displayName=T1;var Pm="PopperContent",[uN,dN]=S1(Pm),P1=b.forwardRef((t,e)=>{var pe,Ys,hr,us,fr,Js;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:m,...y}=t,x=C1(Pm,n),[v,g]=b.useState(null),w=It(e,pr=>g(pr)),[_,k]=b.useState(null),S=cN(_),E=(S==null?void 0:S.width)??0,C=(S==null?void 0:S.height)??0,A=r+(i!=="center"?"-"+i:""),T=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(c)?c:[c],N=O.length>0,z={padding:T,boundary:O.filter(fN),altBoundary:N},{refs:M,floatingStyles:Q,placement:G,isPositioned:re,middlewareData:P}=Qj({strategy:"fixed",placement:A,whileElementsMounted:(...pr)=>Wj(...pr,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[eN({mainAxis:s+C,alignmentAxis:o}),l&&tN({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?nN():void 0,...z}),l&&rN({...z}),sN({...z,apply:({elements:pr,rects:ll,availableWidth:yd,availableHeight:cl})=>{const{width:vd,height:ko}=ll.reference,Qs=pr.floating.style;Qs.setProperty("--radix-popper-available-width",`${yd}px`),Qs.setProperty("--radix-popper-available-height",`${cl}px`),Qs.setProperty("--radix-popper-anchor-width",`${vd}px`),Qs.setProperty("--radix-popper-anchor-height",`${ko}px`)}}),_&&oN({element:_,padding:a}),pN({arrowWidth:E,arrowHeight:C}),p&&iN({strategy:"referenceHidden",...z})]}),[R,V]=N1(G),J=Jr(m);Dn(()=>{re&&(J==null||J())},[re,J]);const Z=(pe=P.arrow)==null?void 0:pe.x,oe=(Ys=P.arrow)==null?void 0:Ys.y,le=((hr=P.arrow)==null?void 0:hr.centerOffset)!==0,[Me,tt]=b.useState();return Dn(()=>{v&&tt(window.getComputedStyle(v).zIndex)},[v]),d.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:re?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Me,"--radix-popper-transform-origin":[(us=P.transformOrigin)==null?void 0:us.x,(fr=P.transformOrigin)==null?void 0:fr.y].join(" "),...((Js=P.hide)==null?void 0:Js.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(uN,{scope:n,placedSide:R,onArrowChange:k,arrowX:Z,arrowY:oe,shouldHideArrow:le,children:d.jsx(Be.div,{"data-side":R,"data-align":V,...y,ref:w,style:{...y.style,animation:re?void 0:"none"}})})})});P1.displayName=Pm;var R1="PopperArrow",hN={top:"bottom",right:"left",bottom:"top",left:"right"},j1=b.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=dN(R1,r),o=hN[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:d.jsx(lN,{...s,ref:n,style:{...s.style,display:"block"}})})});j1.displayName=R1;function fN(t){return t!==null}var pN=t=>({name:"transformOrigin",options:t,fn(e){var x,v,g;const{placement:n,rects:r,middlewareData:s}=e,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=N1(n),h={start:"0%",center:"50%",end:"100%"}[u],p=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,f=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let m="",y="";return c==="bottom"?(m=o?h:`${p}px`,y=`${-l}px`):c==="top"?(m=o?h:`${p}px`,y=`${r.floating.height+l}px`):c==="right"?(m=`${-l}px`,y=o?h:`${f}px`):c==="left"&&(m=`${r.floating.width+l}px`,y=o?h:`${f}px`),{data:{x:m,y}}}});function N1(t){const[e,n="center"]=t.split("-");return[e,n]}var mN=A1,gN=P1,yN=j1,[Yu,CB]=mo("Tooltip",[E1]),Rm=E1(),O1="TooltipProvider",vN=700,hv="tooltip.open",[wN,I1]=Yu(O1),L1=t=>{const{__scopeTooltip:e,delayDuration:n=vN,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),d.jsx(wN,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 5,838 bytes, line 221
221o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};L1.displayName=O1;var D1="Tooltip",[TB,Ju]=Yu(D1),Af="TooltipTrigger",xN=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Ju(Af,n),i=I1(Af,n),o=Rm(n),a=b.useRef(null),l=It(e,a,s.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),h=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),d.jsx(mN,{asChild:!0,...o,children:d.jsx(Be.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:De(t.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:De(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:De(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:De(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:De(t.onBlur,s.onClose),onClick:De(t.onClick,s.onClose)})})});xN.displayName=Af;var bN="TooltipPortal",[AB,_N]=Yu(bN,{forceMount:void 0}),no="TooltipContent",M1=b.forwardRef((t,e)=>{const n=_N(no,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=Ju(no,t.__scopeTooltip);return d.jsx(zu,{present:r||o.open,children:o.disableHoverableContent?d.jsx($1,{side:s,...i,ref:e}):d.jsx(kN,{side:s,...i,ref:e})})}),kN=b.forwardRef((t,e)=>{const n=Ju(no,t.__scopeTooltip),r=I1(no,t.__scopeTooltip),s=b.useRef(null),i=It(e,s),[o,a]=b.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:h}=r,p=b.useCallback(()=>{a(null),h(!1)},[h]),f=b.useCallback((m,y)=>{const x=m.currentTarget,v={x:m.clientX,y:m.clientY},g=AN(v,x.getBoundingClientRect()),w=PN(v,g),_=RN(y.getBoundingClientRect()),k=NN([...w,..._]);a(k),h(!0)},[h]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&u){const m=x=>f(x,u),y=x=>f(x,l);return l.addEventListener("pointerleave",m),u.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",y)}}},[l,u,f,p]),b.useEffect(()=>{if(o){const m=y=>{const x=y.target,v={x:y.clientX,y:y.clientY},g=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),w=!jN(v,o);g?p():w&&(p(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,u,o,c,p]),d.jsx($1,{...t,ref:i})}),[SN,EN]=Yu(D1,{isInside:!1}),CN=jA("TooltipContent"),$1=b.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Ju(no,n),c=Rm(n),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(hv,u),()=>document.removeEventListener(hv,u)),[u]),b.useEffect(()=>{if(l.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,u]),d.jsx(ym,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:d.jsxs(gN,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(CN,{children:r}),d.jsx(SN,{scope:n,isInside:!0,children:d.jsx(eP,{id:l.contentId,role:"tooltip",children:s||r})})]})})});M1.displayName=no;var V1="TooltipArrow",TN=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Rm(n);return EN(V1,n).isInside?null:d.jsx(yN,{...s,...r,ref:e})});TN.displayName=V1;function AN(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function PN(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function RN(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function jN(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],c=a.x,u=a.y,h=l.x,p=l.y;u>r!=p>r&&n<(h-c)*(r-u)/(p-u)+c&&(s=!s)}return s}function NN(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ON(e)}function ON(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var IN=L1,F1=M1;const LN=IN,DN=b.forwardRef(({className:t,sideOffset:e=4,...n},r)=>d.jsx(F1,{ref:r,sideOffset:e,className:He("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
221de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));DN.displayName=F1.displayName;var Qu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Xu=typeof window>"u"||"Deno"in globalThis;function ln(){}function MN(t,e){return typeof t=="function"?t(e):t}function $N(t){return typeof t=="number"&&t>=0&&t!==1/0}function VN(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Pf(t,e){return typeof t=="function"?t(e):t}function FN(t,e){return typeof t=="function"?t(e):t}function fv(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==jm(o,e.options))return!1}else if(!Pa(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function pv(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Aa(e.options.mutationKey)!==Aa(i))return!1}else if(!Pa(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function jm(t,e){return((e==null?void 0:e.queryKeyHashFn)||Aa)(t)}function Aa(t){return JSON.stringify(t,(e,n)=>Rf(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Pa(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Pa(t[n],e[n])):!1}function B1(t,e){if(t===e)return t;const n=mv(t)&&mv(e);if(n||Rf(t)&&Rf(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const h=n?u:i[u];(!n&&l.has(h)||n)&&t[h]===void 0&&e[h]===void 0?(a[h]=void 0,c++):(a[h]=B1(t[h],e[h]),a[h]===t[h]&&t[h]!==void 0&&c++)}return s===o&&c===s?t:a}return e}function mv(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Rf(t){if(!gv(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!gv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function gv(t){return Object.prototype.toString.call(t)==="[object Object]"}function BN(t){return new Promise(e=>{setTimeout(e,t)})}function UN(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?B1(t,e):e}function zN(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function WN(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Nm=Symbol();function U1(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Nm?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var As,jr,Vi,nx,HN=(nx=class extends Qu{constructor(){super();de(this,As);de(this,jr);de(this,Vi);ne(this,Vi,e=>{if(!Xu&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,jr)||this.setEventListener(j(this,Vi))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,jr))==null||e.call(this),ne(this,jr,void 0))}setEventListener(e){var n;ne(this,Vi,e),(n=j(this,jr))==null||n.call(this),ne(this,jr,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){j(this,As)!==e&&(ne(this,As,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof j(this,As)=="boolean"?j(this,As):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},As=new WeakMap,jr=new WeakMap,Vi=new WeakMap,nx),z1=new HN,Fi,Nr,Bi,rx,qN=(rx=class extends Qu{constructor(){super();de(this,Fi,!0);de(this,Nr);de(this,Bi);ne(this,Bi,e=>{if(!Xu&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,Nr)||this.setEventListener(j(this,Bi))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,Nr))==null||e.call(this),ne(this,Nr,void 0))}setEventListener(e){var n;ne(this,Bi,e),(n=j(this,Nr))==null||n.call(this),ne(this,Nr,e(this.setOnline.bind(this)))}setOnline(e){j(this,Fi)!==e&&(ne(this,Fi,e),this.listeners.forEac
vendor: 11,814 bytes, line 221
221h(r=>{r(e)}))}isOnline(){return j(this,Fi)}},Fi=new WeakMap,Nr=new WeakMap,Bi=new WeakMap,rx),Jc=new qN;function KN(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function GN(t){return Math.min(1e3*2**t,3e4)}function W1(t){return(t??"online")==="online"?Jc.isOnline():!0}var H1=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function eh(t){return t instanceof H1}function q1(t){let e=!1,n=0,r=!1,s;const i=KN(),o=y=>{var x;r||(p(new H1(y)),(x=t.abort)==null||x.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>z1.isFocused()&&(t.networkMode==="always"||Jc.isOnline())&&t.canRun(),u=()=>W1(t.networkMode)&&t.canRun(),h=y=>{var x;r||(r=!0,(x=t.onSuccess)==null||x.call(t,y),s==null||s(),i.resolve(y))},p=y=>{var x;r||(r=!0,(x=t.onError)==null||x.call(t,y),s==null||s(),i.reject(y))},f=()=>new Promise(y=>{var x;s=v=>{(r||c())&&y(v)},(x=t.onPause)==null||x.call(t)}).then(()=>{var y;s=void 0,r||(y=t.onContinue)==null||y.call(t)}),m=()=>{if(r)return;let y;const x=n===0?t.initialPromise:void 0;try{y=x??t.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(h).catch(v=>{var S;if(r)return;const g=t.retry??(Xu?0:3),w=t.retryDelay??GN,_=typeof w=="function"?w(n,v):w,k=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,v);if(e||!k){p(v);return}n++,(S=t.onFail)==null||S.call(t,n,v),BN(_).then(()=>c()?void 0:f()).then(()=>{e?p(v):m()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?m():f().then(m),i)}}var ZN=t=>setTimeout(t,0);function YN(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=ZN;const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var dt=YN(),Ps,sx,K1=(sx=class{constructor(){de(this,Ps)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$N(this.gcTime)&&ne(this,Ps,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Xu?1/0:5*60*1e3))}clearGcTimeout(){j(this,Ps)&&(clearTimeout(j(this,Ps)),ne(this,Ps,void 0))}},Ps=new WeakMap,sx),Ui,Rs,Ft,js,it,Ha,Ns,un,Wn,ix,JN=(ix=class extends K1{constructor(e){super();de(this,un);de(this,Ui);de(this,Rs);de(this,Ft);de(this,js);de(this,it);de(this,Ha);de(this,Ns);ne(this,Ns,!1),ne(this,Ha,e.defaultOptions),this.setOptions(e.options),this.observers=[],ne(this,js,e.client),ne(this,Ft,j(this,js).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ne(this,Ui,XN(this.options)),this.state=e.state??j(this,Ui),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=j(this,it))==null?void 0:e.promise}setOptions(e){this.options={...j(this,Ha),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Ft).remove(this)}setData(e,n){const r=UN(this.state.data,e,this.options);return nt(this,un,Wn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){nt(this,un,Wn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=j(this,it))==null?void 0:r.promise;return(s=j(this,it))==null||s.cancel(e),n?n.then(ln).catch(ln):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Ui))}isActive(){return this.observers.some(e=>FN(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!VN(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=j(this,it))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=j(this,it))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(this,Ft).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(j(this,it)&&(j(this,Ns)?j(this,it).cancel({revert:!0}):j(this,it).cancelRetry()),this.scheduleGc()),j(this,Ft).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||nt(this,un,Wn).call(this,{type:"invalidate"})}fetch(e,n){var c,u,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,it))return j(this,it).continueRetry(),j(this,it).promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(ne(this,Ns,!0),r.signal)})},i=()=>{const p=U1(this.options,n),m=(()=>{const y={client:j(this,js),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return ne(this,Ns,!1),this.options.persister?this.options.persister(p,m,this):p(m)},a=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:j(this,js),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),ne(this,Rs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&nt(this,un,Wn).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,m,y,x;eh(p)&&p.silent||nt(this,un,Wn).call(this,{type:"error",error:p}),eh(p)||((m=(f=j(this,Ft).config).onError)==null||m.call(f,p,this),(x=(y=j(this,Ft).config).onSettled)==null||x.call(y,this.state.data,p,this)),this.scheduleGc()};return ne(this,it,q1({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var f,m,y,x;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){l(v);return}(m=(f=j(this,Ft).config).onSuccess)==null||m.call(f,p,this),(x=(y=j(this,Ft).config).onSettled)==null||x.call(y,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{nt(this,un,Wn).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{nt(this,un,Wn).call(this,{type:"pause"})},onContinue:()=>{nt(this,un,Wn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),j(this,it).start()}},Ui=new WeakMap,Rs=new WeakMap,Ft=new WeakMap,js=new WeakMap,it=new WeakMap,Ha=new WeakMap,Ns=new WeakMap,un=new WeakSet,Wn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...QN(r.data,this.options),fetchMeta:e.meta??null};case"success":return ne(this,Rs,void 0),{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return eh(s)&&s.revert&&j(this,Rs)?{...j(this,Rs),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),dt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,Ft).notify({query:this,type:"updated",action:e})})},ix);function QN(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:W1(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function XN(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Cn,ox,eO=(ox=class extends Qu{constructor(e={}){super();de(this,Cn);this.config=e,ne(this,Cn,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??jm(s,n);let o=this.get(i);return o||(o=new JN({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){j(this,Cn).has(e.queryHash)||(j(this,Cn).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=j(this,Cn).get(e.queryHash);n&&(e.destroy(),n===e&&j(this,Cn).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){dt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(this,Cn).get(e)}getAll(){return[...j(this,Cn).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>fv(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>fv(e,r)):n}notify(e){dt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Cn=new WeakMap,ox),Tn,ct,Os,An,br,ax,tO=(ax=class extends K1{constructor(e){super();de(this,An);de(this,Tn);de(this,ct);de(this,Os);this.mutationId=e.mutationId,ne(this,ct,e.mutationCache),ne(this,Tn,[]),this.state=e.state||nO(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(this,Tn).includes(e)||(j(this,Tn).push(e),this.clearGcTimeout(),j(this,ct).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ne(this,Tn,j(this,Tn).filter(n=>n!==e)),this.scheduleGc(),j(this,ct).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){j(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():j(this,ct).remove(this))}continue(){var e;return((e=j(this,Os))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,c,u,h,p,f,m,y,x,v,g,w,_,k,S,E,C;const n=()=>{nt(this,An,br).call(this,{type:"continue"})};ne(this,Os,q1({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(A,T)=>{nt(this,An,br).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{nt(this,An,br).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,ct).canRun(this)}));const r=this.state.status==="pending",s=!j(this,Os).canStart();try{if(r)n();else{nt(this,An,br).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=j(this,ct).config).onMutate)==null?void 0:o.call(i,e,this));
221const T=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));T!==this.state.context&&nt(this,An,br).call(this,{type:"pending",context:T,variables:e,isPaused:s})}const A=await j(this,Os).start();return await((u=(c=j(this,ct).config).onSuccess)==null?void 0:u.call(c,A,e,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,A,e,this.state.context)),await((m=(f=j(this,ct).config).onSettled)==null?void 0:m.call(f,A,null,this.state.variables,this.state.context,this)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,A,null,e,this.state.context)),nt(this,An,br).call(this,{type:"success",data:A}),A}catch(A){try{throw await((g=(v=j(this,ct).config).onError)==null?void 0:g.call(v,A,e,this.state.context,this)),await((_=(w=this.options).onError)==null?void 0:_.call(w,A,e,this.state.context)),await((S=(k=j(this,ct).config).onSettled)==null?void 0:S.call(k,void 0,A,this.state.variables,this.state.context,this)),await((C=(E=this.options).onSettled)==null?void 0:C.call(E,void 0,A,e,this.state.context)),A}finally{nt(this,An,br).call(this,{type:"error",error:A})}}finally{j(this,ct).runNext(this)}}},Tn=new WeakMap,ct=new WeakMap,Os=new WeakMap,An=new WeakSet,br=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),dt.batch(()=>{j(this,Tn).forEach(r=>{r.onMutationUpdate(e)}),j(this,ct).notify({mutation:this,type:"updated",action:e})})},ax);function nO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qn,dn,qa,lx,rO=(lx=class extends Qu{constructor(e={}){super();de(this,Qn);de(this,dn);de(this,qa);this.config=e,ne(this,Qn,new Set),ne(this,dn,new Map),ne(this,qa,0)}build(e,n,r){const s=new tO({mutationCache:this,mutationId:++dl(this,qa)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){j(this,Qn).add(e);const n=Ol(e);if(typeof n=="string"){const r=j(this,dn).get(n);r?r.push(e):j(this,dn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(j(this,Qn).delete(e)){const n=Ol(e);if(typeof n=="string"){const r=j(this,dn).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&j(this,dn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ol(e);if(typeof n=="string"){const r=j(this,dn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Ol(e);if(typeof n=="string"){const s=(r=j(this,dn).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dt.batch(()=>{j(this,Qn).forEach(e=>{this.notify({type:"removed",mutation:e})}),j(this,Qn).clear(),j(this,dn).clear()})}getAll(){return Array.from(j(this,Qn))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>pv(n,r))}findAll(e={}){return this.getAll().filter(n=>pv(e,n))}notify(e){dt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return dt.batch(()=>Promise.all(e.map(n=>n.continue().catch(ln))))}},Qn=new WeakMap,dn=new WeakMap,qa=new WeakMap,lx);function Ol(t){var e;return(e=t.options.scope)==null?void 0:e.id}function yv(t){return{onFetch:(e,n)=>{var u,h,p,f,m;const r=e.options,s=(p=(h=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=e.state.data)==null?void 0:f.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?y=!0:e.signal.addEventListener("abort",()=>{y=!0}),e.signal)}
vendor: 8,327 bytes, lines 221-230
221)},v=U1(e.options,e.fetchOptions),g=async(w,_,k)=>{if(y)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:_,direction:k?"backward":"forward",meta:e.options.meta};return x(O),O})(),C=await v(E),{maxPages:A}=e.options,T=k?WN:zN;return{pages:T(w.pages,C,A),pageParams:T(w.pageParams,_,A)}};if(s&&i.length){const w=s==="backward",_=w?sO:vv,k={pages:i,pageParams:o},S=_(r,k);a=await g(k,S,w)}else{const w=t??i.length;do{const _=l===0?o[0]??r.initialPageParam:vv(r,a);if(l>0&&_==null)break;a=await g(a,_),l++}while(l<w)}return a};e.options.persister?e.fetchFn=()=>{var y,x;return(x=(y=e.options).persister)==null?void 0:x.call(y,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function vv(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function sO(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var je,Or,Ir,zi,Wi,Lr,Hi,qi,cx,iO=(cx=class{constructor(t={}){de(this,je);de(this,Or);de(this,Ir);de(this,zi);de(this,Wi);de(this,Lr);de(this,Hi);de(this,qi);ne(this,je,t.queryCache||new eO),ne(this,Or,t.mutationCache||new rO),ne(this,Ir,t.defaultOptions||{}),ne(this,zi,new Map),ne(this,Wi,new Map),ne(this,Lr,0)}mount(){dl(this,Lr)._++,j(this,Lr)===1&&(ne(this,Hi,z1.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,je).onFocus())})),ne(this,qi,Jc.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,je).onOnline())})))}unmount(){var t,e;dl(this,Lr)._--,j(this,Lr)===0&&((t=j(this,Hi))==null||t.call(this),ne(this,Hi,void 0),(e=j(this,qi))==null||e.call(this),ne(this,qi,void 0))}isFetching(t){return j(this,je).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return j(this,Or).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=j(this,je).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=j(this,je).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Pf(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return j(this,je).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=j(this,je).get(r.queryHash),i=s==null?void 0:s.state.data,o=MN(e,i);if(o!==void 0)return j(this,je).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return dt.batch(()=>j(this,je).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=j(this,je).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=j(this,je);dt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=j(this,je);return dt.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=dt.batch(()=>j(this,je).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(ln).catch(ln)}invalidateQueries(t,e={}){return dt.batch(()=>(j(this,je).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=dt.batch(()=>j(this,je).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(ln)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ln)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=j(this,je).build(this,e);return n.isStaleByTime(Pf(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ln).catch(ln)}fetchInfiniteQuery(t){return t.behavior=yv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ln).catch(ln)}ensureInfiniteQueryData(t){return t.behavior=yv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Jc.isOnline()?j(this,Or).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,je)}getMutationCache(){return j(this,Or)}getDefaultOptions(){return j(this,Ir)}setDefaultOptions(t){ne(this,Ir,t)}setQueryDefaults(t,e){j(this,zi).set(Aa(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...j(this,zi).values()],n={};return e.forEach(r=>{Pa(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){j(this,Wi).set(Aa(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...j(this,Wi).values()],n={};return e.forEach(r=>{Pa(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...j(this,Ir).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=jm(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Nm&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...j(this,Ir).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){j(this,je).clear(),j(this,Or).clear()}},je=new WeakMap,Or=new WeakMap,Ir=new WeakMap,zi=new WeakMap,Wi=new WeakMap,Lr=new WeakMap,Hi=new WeakMap,qi=new WeakMap,cx),oO=b.createContext(void 0),aO=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),d.jsx(oO.Provider,{value:t,children:e}));/** 222 * @remix-run/router v1.23.0 223 * 224 * Copyright (c) Remix Software Inc. 225 * 226 * This source code is licensed under the MIT license found in the 227 * LICENSE.md file in the root directory of this source tree. 228 * 229 * @license MIT 230 */function Qc(){return Qc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Qc.apply(this,arguments)}var $r;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})($r||($r={}));const wv="popstate";function lO(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return jf("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Z1(s)}return uO(e,n,null,t)}function Ct(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function G1(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function cO(){return Math.random().toString(36).substr(2,8)}function xv(t,e){return{usr:t.state,key:t.key,idx:e}}function jf(t,e,n,r){return n===void 0&&(n=null),Qc({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ed(e):e,{state:n,key:e&&e.key||r||cO()})}function Z1(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ed(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function uO(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=$r.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Qc({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function h(){a=$r.Pop;let x=u(),v=x==null?null:x-c;c=x,l&&l({action:a,location:y.location,delta:v})}function p(x,v){a=$r.Push;let g=jf(y.location,x,v);c=u()+1;let w=xv(g,c),_=y.createHref(g);try{o.pushState(w,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(_)}i&&l&&l({action:a,location:y.location,delta:1})}function f(x,v){a=$r.Replace;let g=jf(y.location,x,v);c=u();let w=xv(g,c),_=y.createHref(g);o.replaceState(w,"",_),i&&l&&l({action:a,location:y.location,delta:0})}function m(x){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof x=="str
230ing"?x:Z1(x);return g=g.replace(/ $/,"%20"),Ct(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let y={get action(){return a},get location(){return t(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(wv,h),l=x,()=>{s.removeEventListener(wv,h),l=null}},createHref(x){return e(s,x)},createURL:m,encodeLocation(x){let v=m(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:f,go(x){return o.go(x)}};return y}var bv;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(bv||(bv={}));function dO(t,e,n){return n===void 0&&(n="/"),hO(t,e,n,!1)}function hO(t,e,n,r){let s=typeof e=="string"?ed(e):e,i=Q1(s.pathname||"/",n);if(i==null)return null;let o=Y1(t);fO(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=SO(i);a=_O(o[l],c,r)}return a}function Y1(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Ct(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Di([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Ct(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Y1(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:xO(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of J1(i.path))s(i,o,l)}),e}function J1(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=J1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function fO(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:bO(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const pO=/^:[\w-]+$/,mO=3,gO=2,yO=1,vO=10,wO=-2,_v=t=>t==="*";function xO(t,e){let n=t.split("/"),r=n.length;return n.some(_v)&&(r+=wO),e&&(r+=gO),n.filter(s=>!_v(s)).reduce((s,i)=>s+(pO.test(i)?mO:i===""?yO:vO),r)}function bO(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function _O(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?e:e.slice(i.length)||"/",h=kv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!h&&c&&n&&!r[r.length-1].route.index&&(h=kv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!h)return null;
vendor: 4,131 bytes, lines 230-239
230Object.assign(s,h.params),o.push({params:s,pathname:Di([i,h.pathname]),pathnameBase:EO(Di([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=Di([i,h.pathnameBase]))}return o}function kv(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=kO(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,h)=>{let{paramName:p,isOptional:f}=u;if(p==="*"){let y=a[h]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?c[p]=void 0:c[p]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function kO(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),G1(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function SO(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return G1(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Q1(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}const Di=t=>t.join("/").replace(/\/\/+/g,"/"),EO=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/");function CO(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const X1=["post","put","patch","delete"];new Set(X1);const TO=["get",...X1];new Set(TO);/** 231 * React Router v6.30.1 232 * 233 * Copyright (c) Remix Software Inc. 234 * 235 * This source code is licensed under the MIT license found in the 236 * LICENSE.md file in the root directory of this source tree. 237 * 238 * @license MIT 239 */function Xc(){return Xc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xc.apply(this,arguments)}const AO=b.createContext(null),PO=b.createContext(null),ek=b.createContext(null),td=b.createContext(null),nd=b.createContext({outlet:null,matches:[],isDataRoute:!1}),tk=b.createContext(null);function Om(){return b.useContext(td)!=null}function nk(){return Om()||Ct(!1),b.useContext(td).location}function RO(t,e){return jO(t,e)}function jO(t,e,n,r){Om()||Ct(!1);let{navigator:s}=b.useContext(ek),{matches:i}=b.useContext(nd),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=nk(),u;if(e){var h;let x=typeof e=="string"?ed(e):e;l==="/"||(h=x.pathname)!=null&&h.startsWith(l)||Ct(!1),u=x}else u=c;let p=u.pathname||"/",f=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=dO(t,{pathname:f}),y=DO(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Di([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Di([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return e&&y?b.createElement(td.Provider,{value:{location:Xc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:$r.Pop}},y):y}function NO(){let t=FO(),e=CO(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application
239Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),n?b.createElement("pre",{style:s},n):null,null)}const OO=b.createElement(NO,null);class IO extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?b.createElement(nd.Provider,{value:this.props.routeContext},b.createElement(tk.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function LO(t){let{routeContext:e,match:n,children:r}=t,s=b.useContext(AO);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(nd.Provider,{value:e},r)}function DO(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);u>=0||Ct(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let h=o[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=u),h.route.id){let{loaderData:p,errors:f}=n,m=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||m){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,p)=>{let f,m=!1,y=null,x=null;n&&(f=a&&h.route.id?a[h.route.id]:void 0,y=h.route.errorElement||OO,l&&(c<0&&p===0?(m=!0,x=null):c===p&&(m=!0,x=h.route.hydrateFallbackElement||null)));let v=e.concat(o.slice(0,p+1)),g=()=>{let w;return f?w=y:m?w=x:h.route.Component?w=b.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=u,b.createElement(LO,{match:h,routeContext:{outlet:u,matches:v,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?b.createElement(IO,{location:n.location,revalidation:n.revalidation,component:y,error:f,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var Nf=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Nf||{});function MO(t){let e=b.useContext(PO);return e||Ct(!1),e}function $O(t){let e=b.useContext(nd);return e||Ct(!1),e}function VO(t){let e=$O(),n=e.matches[e.matches.length-1];return n.route.id||Ct(!1),n.route.id}function FO(){var t;let e=b.useContext(tk),n=MO(Nf.UseRouteError),r=VO(Nf.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function BO(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function ys(t){Ct(!1)}function UO(t){let{basename:e="/",children:n=null,location:r,navigationType:s=$r.Pop,navigator:i,static:o=!1,future:a}=t;Om()&&Ct(!1);let l=e.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:i,static:o,future:Xc({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=ed(r));let{pathname:u="/",search:h="",hash:p="",state:f=null,key:m="default"}=r,y=b.useMemo(()=>{let x=Q1(u,l);return x==null?null:{location:{pathname:x,search:h,hash:p,state:f,key:m},navigationType:s}},[l,u,h,p,f,m,s]);return y==null?null:b.createElement(ek.Provider,{value:c},b.createElement(td.Provider,{children:n,value:y}))}function zO(t){let{children:e,location:n}=t;return RO(Of(e),n)}new Promise(()=>{});function Of(t,e){e===void 0&&(e=[]);let n=[];
239return b.Children.forEach(t,(r,s)=>{if(!b.isValidElement(r))return;let i=[...e,s];if(r.type===b.Fragment){n.push.apply(n,Of(r.props.children,i));return}r.type!==ys&&Ct(!1),!r.props.index||!r.props.children||Ct(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Of(r.props.children,i)),n.push(o)}),n}/** 240 * React Router DOM v6.30.1 241 * 242 * Copyright (c) Remix Software Inc. 243 * 244 * This source code is licensed under the MIT license found in the 245 * LICENSE.md file in the root directory of this source tree. 246 * 247 * @license MIT 248 */const WO="6";try{window.__reactRouterVersion=WO}catch{}const HO="startTransition",Sv=Cp[HO];function qO(t){let{basename:e,children:n,future:r,window:s}=t,i=b.useRef();i.current==null&&(i.current=lO({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=b.useCallback(h=>{c&&Sv?Sv(()=>l(h)):l(h)},[l,c]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>BO(r),[r]),b.createElement(UO,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}var Ev;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Ev||(Ev={}));var Cv;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Cv||(Cv={}));const Im=b.createContext({});function rd(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const KO=typeof window<"u",Lm=KO?b.useLayoutEffect:b.useEffect,sd=b.createContext(null);function Dm(t,e){t.indexOf(e)===-1&&t.push(e)}function eu(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const $n=(t,e,n)=>n>e?e:n<t?t:n;let id=()=>{},Ws=()=>{};const ns={},rk=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),sk=t=>typeof t=="object"&&t!==null,ik=t=>/^0[^.\s]+$/u.test(t);function ok(t){let e;return()=>(e===void 0&&(e=t()),e)}const Kt=t=>t,tl=(...t)=>t.reduce((e,n)=>r=>n(e(r))),Ra=(t,e,n)=>{const r=e-t;return r?(n-t)/r:1};class Mm{constructor(){this.subscriptions=[]}add(e){return Dm(this.subscriptions,e),()=>eu(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Et=t=>t*1e3,Wt=t=>t/1e3,ak=(t,e)=>e?t*(1e3/e):0,lk=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,GO=1e-7,ZO=12;function YO(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=lk(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>GO&&++a<ZO);return o}function nl(t,e,n,r){if(t===e&&n===r)return Kt;const s=i=>YO(i,0,1,t,n);return i=>i===0||i===1?i:lk(s(i),e,r)}const ck=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,uk=t=>e=>1-t(1-e),dk=nl(.33,1.53,.69,.99),$m=uk(dk),hk=ck($m),fk=t=>t>=1?1:(t*=2)<1?.5*$m(t):.5*(2-Math.pow(2,-10*(t-1))),Vm=t=>1-Math.sin(Math.acos(t)),pk=uk(Vm),mk=ck(Vm),JO=nl(.42,0,1,1),QO=nl(0,0,.58,1),gk=nl(.42,0,.58,1),XO=t=>Array.isArray(t)&&typeof t[0]!="number",yk=t=>Array.isArray(t)&&typeof t[0]=="number",Tv={linear:Kt,easeIn:JO,easeInOut:gk,easeOut:QO,circIn:Vm,circInOut:mk,circOut:pk,backIn:$m,backInOut:hk,backOut:dk,anticipate:fk},e2=t=>typeof t=="string",Av=t=>{if(yk(t)){Ws(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,r,s]=t;return nl(e,n,r,s)}else if(e2(t))return Ws(Tv[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Tv[t];return t},Il=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function t2(t){let e=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,u=!1,h=!1)=>{const f=h&&r?e:n;return u&&i.add(c),f.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(o=c,r){s=!0;return}r=!0;const u=e;e=n,n=u,e.forEach(a),e.clear(),r=!1,s&&(s=!1,l.process(c))}};return l}const n2=40;function vk(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Il.reduce((w,_)=>(w[_]=t2(i),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:p,render:f,postRender:m}=o,y=()=>{const w=ns.useManualTiming,_=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(_-s.timestamp,n2),1)),s.timestamp=_,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),h.process(s),p.process(s),f.process(s),m.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(y))},x=()=>{n=!0,r=!0,s.isProcessing||t(y)};return{schedule:Il.reduce((w,_)=>{const k=o[_];return w[_]=(S,E=!1,C=!1)=>(n||x(),k.schedule(S,E,C)),w},{}),cancel:w=>{for(let _=0;_<Il.length;
vendor: 6,133 bytes, line 248
248_++)o[Il[_]].cancel(w)},state:s,steps:o}}const{schedule:ve,cancel:rs,state:Je,steps:th}=vk(typeof requestAnimationFrame<"u"?requestAnimationFrame:Kt,!0);let uc;function r2(){uc=void 0}const ht={now:()=>(uc===void 0&&ht.set(Je.isProcessing||ns.useManualTiming?Je.timestamp:performance.now()),uc),set:t=>{uc=t,queueMicrotask(r2)}},wk=t=>e=>typeof e=="string"&&e.startsWith(t),xk=wk("--"),s2=wk("var(--"),Fm=t=>s2(t)?i2.test(t.split("/*")[0].trim()):!1,i2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pv(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const wo={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ja={...wo,transform:t=>$n(0,1,t)},Ll={...wo,default:1},sa=t=>Math.round(t*1e5)/1e5,Bm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function o2(t){return t==null}const a2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Um=(t,e)=>n=>!!(typeof n=="string"&&a2.test(n)&&n.startsWith(t)||e&&!o2(n)&&Object.prototype.hasOwnProperty.call(n,e)),bk=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Bm);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},l2=t=>$n(0,255,t),nh={...wo,transform:t=>Math.round(l2(t))},Ss={test:Um("rgb","red"),parse:bk("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+nh.transform(t)+", "+nh.transform(e)+", "+nh.transform(n)+", "+sa(ja.transform(r))+")"};function c2(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const If={test:Um("#"),parse:c2,transform:Ss.transform},rl=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Hn=rl("deg"),In=rl("%"),W=rl("px"),u2=rl("vh"),d2=rl("vw"),Rv={...In,parse:t=>In.parse(t)/100,transform:t=>In.transform(t*100)},Si={test:Um("hsl","hue"),parse:bk("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+In.transform(sa(e))+", "+In.transform(sa(n))+", "+sa(ja.transform(r))+")"},Ve={test:t=>Ss.test(t)||If.test(t)||Si.test(t),parse:t=>Ss.test(t)?Ss.parse(t):Si.test(t)?Si.parse(t):If.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ss.transform(t):Si.transform(t),getAnimatableNone:t=>{const e=Ve.parse(t);return e.alpha=0,Ve.transform(e)}},h2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function f2(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Bm))==null?void 0:e.length)||0)+(((n=t.match(h2))==null?void 0:n.length)||0)>0}const _k="number",kk="color",p2="var",m2="var(",jv="${}",g2=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ro(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=e.replace(g2,l=>(Ve.test(l)?(r.color.push(i),s.push(kk),n.push(Ve.parse(l))):l.startsWith(m2)?(r.var.push(i),s.push(p2),n.push(l)):(r.number.push(i),s.push(_k),n.push(parseFloat(l))),++i,jv)).split(jv);return{values:n,split:a,indexes:r,types:s}}function y2(t){return ro(t).values}function Sk({split:t,types:e}){const n=t.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=t[i],r[i]!==void 0){const o=e[i];o===_k?s+=sa(r[i]):o===kk?s+=Ve.transform(r[i]):s+=r[i]}return s}}function v2(t){return Sk(ro(t))}const w2=t=>typeof t=="number"?0:Ve.test(t)?Ve.getAnimatableNone(t):t,x2=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:w2(t);function b2(t){const e=ro(t);return Sk(e)(e.values.map((r,s)=>x2(r,e.split[s])))}const yn={test:f2,parse:y2,createTransformer:v2,getAnimatableNone:b2};function rh(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function _2({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,o=0;if(!e)s=i=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=rh(l,a,t+1/3),i=rh(l,a,t),o=rh(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function tu(t,e){return n=>n>0?e:t}const ye=(t,e,n)=>t+(e-t)*n,sh=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},k2=[If,Ss,Si],S2=t=>k2.find(e=>e.test(t));function Nv(t){const e=S2(t);if(id(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Si&&(n=_2(n)),n}const Ov=(t,e)=>{const n=Nv(t),r=Nv(e);if(!n||!r)return tu(t,e);const s={...n};return i=>(s.red=sh(n.red,r.red,i),s.green=sh(n.green,r.green,i),s.blue=sh(n.blue,r.blue,i),s.alpha=ye(n.alpha,r.alpha,i),Ss.transform(s))},Lf=new Set(["none","hidden"]);function E2(t,e){return Lf.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function C2(t,e){return n=>ye(t,e,n)}function zm(t){return typeof t=="number"?C2:typeof t=="string"?Fm(t)?tu:Ve.test(t)?Ov:P2:Array.isArray(t)?Ek:typeof t=="object"?Ve.test(t)?Ov:T2:tu}function Ek(t,e){const n=[...t],r=n.length,s=t.map((i,o)=>zm(i)(i,e[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function T2(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=zm(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function A2(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],o=t.indexes[i][r[i]],a=t.values[o]??0;n[s]=a,r[i]++}return n}const P2=(t,e)=>{const n=yn.createTransformer(e),r=ro(t),s=ro(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Lf.has(t)&&!s.values.length||Lf.has(e)&&!r.values.length?E2(t,e):tl(Ek(A2(r,s),s.values),n):(id(!0,`Complex values '${t}' and '${e}
248' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),tu(t,e))};function Ck(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?ye(t,e,n):zm(t)(t,e)}const R2=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>ve.update(e,n),stop:()=>rs(e),now:()=>Je.isProcessing?Je.timestamp:ht.now()}},Tk=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},nu=2e4;function Wm(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<nu;)e+=n,r=t.next(e);return e>=nu?1/0:e}function j2(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(Wm(r),nu);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:Wt(s)}}const Te={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Df(t,e){return t*Math.sqrt(1-e*e)}const N2=12;function O2(t,e,n){let r=n;for(let s=1;s<N2;s++)r=r-t(r)/e(r);return r}const ih=.001;function I2({duration:t=Te.duration,bounce:e=Te.bounce,velocity:n=Te.velocity,mass:r=Te.mass}){let s,i;id(t<=Et(Te.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=$n(Te.minDamping,Te.maxDamping,o),t=$n(Te.minDuration,Te.maxDuration,Wt(t)),o<1?(s=c=>{const u=c*o,h=u*t,p=u-n,f=Df(c,o),m=Math.exp(-h);return ih-p/f*m},i=c=>{const h=c*o*t,p=h*n+n,f=Math.pow(o,2)*Math.pow(c,2)*t,m=Math.exp(-h),y=Df(Math.pow(c,2),o);return(-s(c)+ih>0?-1:1)*((p-f)*m)/y}):(s=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ih+u*h},i=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=O2(s,i,a);if(t=Et(t),isNaN(l))return{stiffness:Te.stiffness,damping:Te.damping,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:t}}}const L2=["duration","bounce"],D2=["stiffness","damping","mass"];function Iv(t,e){return e.some(n=>t[n]!==void 0)}function M2(t){let e={velocity:Te.velocity,stiffness:Te.stiffness,damping:Te.damping,mass:Te.mass,isResolvedFromDuration:!1,...t};if(!Iv(t,D2)&&Iv(t,L2))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*$n(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Te.mass,stiffness:s,damping:i}}else{const n=I2({...t,velocity:0});e={...e,...n,mass:Te.mass},e.isResolvedFromDuration=!0}return e}function ru(t=Te.visualDuration,e=Te.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:h,velocity:p,isResolvedFromDuration:f}=M2({...n,velocity:-Wt(n.velocity||0)}),m=p||0,y=c/(2*Math.sqrt(l*u)),x=o-i,v=Wt(Math.sqrt(l/u)),g=Math.abs(x)<5;r||(r=g?Te.restSpeed.granular:Te.restSpeed.default),s||(s=g?Te.restDelta.granular:Te.restDelta.default);let w,_,k,S,E,C;if(y<1)k=Df(v,y),S=(m+y*v*x)/k,w=T=>{const O=Math.exp(-y*v*T);return o-O*(S*Math.sin(k*T)+x*Math.cos(k*T))},E=y*v*S+x*k,C=y*v*x-S*k,_=T=>Math.exp(-y*v*T)*(E*Math.sin(k*T)+C*Math.cos(k*T));else if(y===1){w=O=>o-Math.exp(-v*O)*(x+(m+v*x)*O);const T=m+v*x;_=O=>Math.exp(-v*O)*(v*T*O-m)}else{const T=v*Math.sqrt(y*y-1);w=M=>{const Q=Math.exp(-y*v*M),G=Math.min(T*M,300);return o-Q*((m+y*v*x)*Math.sinh(G)+T*x*Math.cosh(G))/T};const O=(m+y*v*x)/T,N=y*v*O-x*T,z=y*v*x-O*T;_=M=>{const Q=Math.exp(-y*v*M),G=Math.min(T*M,300);return Q*(N*Math.sinh(G)+z*Math.cosh(G))}}const A={calculatedDuration:f&&h||null,velocity:T=>Et(_(T)),next:T=>{if(!f&&y<1){const N=Math.exp(-y*v*T),z=Math.sin(k*T),M=Math.cos(k*T),Q=o-N*(S*z+x*M),G=Et(N*(E*z+C*M));return a.done=Math.abs(G)<=r&&Math.abs(o-Q)<=s,a.value=a.done?o:Q,a}const O=w(T);if(f)a.done=T>=h;else{const N=Et(_(T));a.done=Math.abs(N)<=r&&Math.abs(o-O)<=s}return a.value=a.done?o:O,a},toString:()=>{const T=Math.min(Wm(A),nu),O=Tk(N=>A.next(T*N).value,T,30);return T+"ms "+O},toTransition:()=>{}};return A}ru.applyToOptions=t=>{const e=j2(t,100,ru);return t.ease=e.ease,t.duration=Et(e.duration),t.type="keyframes",t};const $2=5;function Ak(t,e,n){const r=Math.max(e-$2,0);return ak(n-t(r),e-r)}function Mf({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],p={done:!1,value:h},f=C=>a!==void 0&&C<a||l!==void 0&&C>l,m=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let y=n*e;const x=h+y,v=o===void 0?x:o(x);v!==x&&(y=v-h);const g=C=>-y*Math.exp(-C/r),w=C=>v+g(C),_=C=>{const A=g(C),T=w(C);p.done=Math.abs(A)<=c,p.value=p.done?v:T};let k,S;const E=C=>{f(p.value)&&(k=C,S=ru({keyframes:[p.value,m(p.value)],velocity:Ak(w,C,p.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:C=>{let A=!1;return!S&&k===void 0&&(A=!0,_(C),E(C)),k!==void 0&&C>=k?S.next(C-k):(!A&&_(C),p)}}}function V2(t,e,n){const r=[],s=n||ns.mix||Ck,i=t.length-1;for(let o=0;o<i;o++){let a=s(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Kt:e;a=tl(l,a)}r.push(a)}return r}function F2(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(Ws(i===e.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=V2(e,r,s),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const p=Ra(t[h],t[h+1],u);return a[h](p)};return n?u=>c($n(t[0],t[i-1],u)):c}function B2(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=Ra(0,e,r);t.push(ye(n,1,s))}}function U2(t){const e=[0];return B2(e,t.length-1),e}function z2(t,e){return t.map(n=>n*e)}function W2(t,e){return t.map(()=>e||gk).splice(0,t.length-1)}function ia({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=XO(r)?r.map(Av):Av(r),i={done:!1,value:e[0]},o=z2(n&&n.length===e.length?n:U2(e),t),a=F2(o,e,{ease:Array.isArray(s)?s:W2(e,s)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const H2=t=>t!==null;function od(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(H2),a=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const q2={decay:Mf,inertia:Mf,tween:ia,keyframes:ia,spring:ru};function Pk(t){typeof t.type=="string"&&(t.type=q2[t.type])}class Hm{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const K2=t=>t/100;class su extends Hm{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ht.now()&&this.tick(ht.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Pk(e);const{type:n=ia,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const l=n||ia;l!==ia&&typeof a[0]!="number"&&(this.mixKeyframes=tl(K2,Ck(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Wm(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:p,repeatDelay:f,type:m,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,_=r;if(h){const C=Math.min(this.currentTime,s)/a;let A=Math.floor(C),T=C%1;!T&&C>=1&&(T=1),T===1&&A--,A=Math.min(A,h+1),!!(A%2)&&(p==="reverse"?(T=1-T,f&&(T-=f/a)):p==="mirror"&&(_=o)),w=$n(0,1,T)*a}let k;g?(this.delayState.value=u[0],k=this.delayState):k=_.next(w),i&&!g&&(k.value=i(k.value));let{done:S}=k;!g&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return E&&m!==Mf&&(k.value=od(u,this.options,x,this.speed)),y&&y(k.value),E&&this.finish(),
vendor: 12,087 bytes, line 248
248k}then(e,n){return this.finished.then(e,n)}get duration(){return Wt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Wt(e)}get time(){return Wt(this.currentTime)}set time(e){e=Et(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Ak(r=>this.generator.next(r).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(ht.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=Wt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=R2,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ht.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function G2(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Es=t=>t*180/Math.PI,$f=t=>{const e=Es(Math.atan2(t[1],t[0]));return Vf(e)},Z2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$f,rotateZ:$f,skewX:t=>Es(Math.atan(t[1])),skewY:t=>Es(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Vf=t=>(t=t%360,t<0&&(t+=360),t),Lv=$f,Dv=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Mv=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Y2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Dv,scaleY:Mv,scale:t=>(Dv(t)+Mv(t))/2,rotateX:t=>Vf(Es(Math.atan2(t[6],t[5]))),rotateY:t=>Vf(Es(Math.atan2(-t[2],t[0]))),rotateZ:Lv,rotate:Lv,skewX:t=>Es(Math.atan(t[4])),skewY:t=>Es(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ff(t){return t.includes("scale")?1:0}function Bf(t,e){if(!t||t==="none")return Ff(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Y2,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Z2,s=a}if(!s)return Ff(e);const i=r[e],o=s[1].split(",").map(Q2);return typeof i=="function"?i(o):o[i]}const J2=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Bf(n,e)};function Q2(t){return parseFloat(t.trim())}const xo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bo=new Set([...xo,"pathRotation"]),$v=t=>t===wo||t===W,X2=new Set(["x","y","z"]),eI=xo.filter(t=>!X2.has(t));function tI(t){const e=[];return eI.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Vr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:r})=>{const s=t.max-t.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:r})=>{const s=t.max-t.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Bf(e,"x"),y:(t,{transform:e})=>Bf(e,"y")};Vr.translateX=Vr.x;Vr.translateY=Vr.y;const Ds=new Set;let Uf=!1,zf=!1,Wf=!1;function Rk(){if(zf){const t=Array.from(Ds).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=tI(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}zf=!1,Uf=!1,Ds.forEach(t=>t.complete(Wf)),Ds.clear()}function jk(){Ds.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(zf=!0)})}function nI(){Wf=!0,jk(),Rk(),Wf=!1}class qm{constructor(e,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ds.add(this),Uf||(Uf=!0,ve.read(jk),ve.resolveKeyframes(Rk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s==null?void 0:s.get(),o=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&i===void 0&&s.set(e[0])}G2(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ds.delete(this)}cancel(){this.state==="scheduled"&&(Ds.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const rI=t=>t.startsWith("--");function Nk(t,e,n){rI(e)?t.style.setProperty(e,n):t.style[e]=n}const sI={};function Ok(t,e){const n=ok(t);return()=>sI[e]??n()}const iI=Ok(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ik=Ok(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),zo=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Vv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zo([0,.65,.55,1]),circOut:zo([.55,0,1,.45]),backIn:zo([.31,.01,.66,-.59]),backOut:zo([.33,1.53,.69,.99])};function Lk(t,e){if(t)return typeof t=="function"?Ik()?Tk(t,e):"ease-out":yk(t)?zo(t):Array.isArray(t)?t.map(n=>Lk(n,e)||Vv.easeOut):Vv[t]}function oI(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Lk(a,s);Array.isArray(h)&&(u.easing=h);const p={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),t.animate(u,p)}function Dk(t){return typeof t=="function"&&"applyToOptions"in t}function aI({type:t,...e}){return Dk(t)&&Ik()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Mk extends Hm{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,Ws(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=aI(e);this.animation=oI(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=od(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),Nk(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Wt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Wt(e)}get time(){return Wt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Et(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&iI()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Kt):s(this)}}const $k={anticipate:fk,backInOut:hk,circInOut:mk};function lI(t){return t in $k}function cI(t){typeof t.ease=="string"&&lI(t.ease)&&(t.ease=$k[t.ease])}const oh=10;class uI extends Mk{constructor(e){cI(e),Pk(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new su({...o,autoplay:!1}),l=Math.max(oh,ht.now()-this.startTime),c=$n(0,oh,l-oh),u=a.sample(l).value,{name:h}=this.options;i&&h&&Nk(i,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const Fv=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(yn.test(t)||t==="0")&&!t.startsWith("url("));function dI(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function hI(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],o=Fv(s,e),a=Fv(i,e);return id(o===a,`You are trying to animate ${e} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:dI(t)||(n==="spring"||Dk(n))&&r}function Hf(t){t.duration=0,t.type="keyframes"}const Vk=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),fI=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function pI(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&fI.test(t[e]))return!0;return!1}const mI=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),gI=ok(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function yI(t){var h;const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=t,l=(h=e==null?void 0:e.owner)==null?void 0:h.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return gI()&&n&&(Vk.has(n)||mI.has(n)&&pI(a))&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const vI=40;class wI extends Hm{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:
248o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var m;super(),this.stop=()=>{var y,x;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=ht.now();const p={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:c,element:u,...h},f=(u==null?void 0:u.KeyframeResolver)||qm;this.keyframeResolver=new f(a,(y,x,v)=>this.onKeyframesResolved(y,x,p,!v),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,r,s){var v,g;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=ht.now();let h=!0;hI(e,i,o,a)||(h=!1,(ns.instantAnimations||!l)&&(u==null||u(od(e,r,n))),e[0]=e[e.length-1],Hf(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>vI?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},m=h&&!c&&yI(f),y=(g=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:g.current;let x;if(m)try{x=new uI({...f,element:y})}catch{x=new su(f)}else x=new su(f);x.finished.then(()=>{this.notifyFinished()}).catch(Kt),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),nI()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function Fk(t,e,n,r=0,s=1){const i=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const Bv=30,xI=t=>!isNaN(parseFloat(t));class bI{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=ht.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=ht.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=xI(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Mm);const r=this.events[e].add(n);return e==="change"?()=>{r(),ve.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ht.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Bv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bv);return ak(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function so(t,e){return new bI(t,e)}function Km(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function Gm(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Km(n,t):n}const _I={type:"spring",stiffness:500,damping:25,restSpeed:10},kI=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),SI={type:"keyframes",duration:.8},EI={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},CI=(t,{keyframes:e})=>e.length>2?SI:bo.has(t)?t.startsWith("scale")?kI(e[1]):_I:EI,TI=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function AI(t){for(const e in t)if(!TI.has(e))return!0;return!1}const Zm=(t,e,n,r={},s,i)=>o=>{const a=Gm(r,t)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Et(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:p=>{e.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:s};AI(a)||Object.assign(u,CI(t,u)),u.duration&&(u.duration=Et(u.duration)),u.repeatDelay&&(u.repeatDelay=Et(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Hf(u),u.delay===0&&(h=!0)),(ns.instantAnimations||ns.skipAnimations||s!=null&&s.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Hf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!i&&e.get()!==void 0){const p=od(u.keyframes,a);if(p!==void 0){ve.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new su(u):new wI(u)},PI=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RI(t){const e=PI.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}const jI=4;function Bk(t,e,n=1){Ws(n<=jI,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=RI(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const o=i.trim();return rk(o)?parseFloat(o):o}return Fm(s)?Bk(s,e,n+1):s}function Uv(t){const e=[{},{}];
vendor: 49,387 bytes, line 248
248return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Ym(t,e,n,r){if(typeof e=="function"){const[s,i]=Uv(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=Uv(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function Ms(t,e,n){const r=t.getProps();return Ym(r,e,n!==void 0?n:r.custom,t)}const Uk=new Set(["width","height","top","left","right","bottom",...xo]),qf=t=>Array.isArray(t);function NI(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,so(n))}function OI(t){return qf(t)?t[t.length-1]||0:t}function II(t,e){const n=Ms(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=OI(i[o]);NI(t,o,a)}}const Qe=t=>!!(t&&t.getVelocity);function LI(t){return!!(Qe(t)&&t.add)}function Kf(t,e){const n=t.getValue("willChange");if(LI(n))return n.add(e);if(!n&&ns.WillChange){const r=new ns.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Jm(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const DI="framerAppearId",zk="data-"+Jm(DI);function Wk(t){return t.props[zk]}function MI({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Hk(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();i=i?Km(i,l):l;const c=i==null?void 0:i.reduceMotion,u=i==null?void 0:i.skipAnimations;r&&(i=r);const h=[],p=s&&t.animationState&&t.animationState.getState()[s],f=i==null?void 0:i.path;f&&f.animateVisualElement(t,a,i,n,h);for(const m in a){const y=t.getValue(m,t.latestValues[m]??null),x=a[m];if(x===void 0||p&&MI(p,m))continue;const v={delay:n,...Gm(i||{},m)};u&&(v.skipAnimations=!0);const g=y.get();if(g!==void 0&&!y.isAnimating()&&!Array.isArray(x)&&x===g&&!v.velocity){ve.update(()=>y.set(x));continue}let w=!1;if(window.MotionHandoffAnimation){const S=Wk(t);if(S){const E=window.MotionHandoffAnimation(S,m,ve);E!==null&&(v.startTime=E,w=!0)}}Kf(t,m);const _=c??t.shouldReduceMotion;y.start(Zm(m,y,x,_&&Uk.has(m)?{type:!1}:v,t,w));const k=y.animation;k&&h.push(k)}if(o){const m=()=>ve.update(()=>{o&&II(t,o)});h.length?Promise.all(h).then(m):m()}return h}function Gf(t,e,n={}){var l;const r=Ms(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(Hk(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:p}=s;return $I(t,e,c,u,h,p,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function $I(t,e,n=0,r=0,s=0,i=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Gf(l,e,{...o,delay:n+(typeof r=="function"?0:r)+Fk(t.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function VI(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>Gf(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=Gf(t,e,n);else{const s=typeof e=="function"?Ms(t,e,n.custom):e;r=Promise.all(Hk(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const FI={test:t=>t==="auto",parse:t=>t},qk=t=>e=>e.test(t),Kk=[wo,W,In,Hn,d2,u2,FI],zv=t=>Kk.find(qk(t));function BI(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ik(t):!0}const UI=new Set(["brightness","contrast","saturate","opacity"]);function zI(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Bm)||[];if(!r)return t;const s=n.replace(r,"");let i=UI.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const WI=/\b([a-z-]*)\(.*?\)/gu,Zf={...yn,getAnimatableNone:t=>{const e=t.match(WI);return e?e.map(zI).join(" "):t}},Yf={...yn,getAnimatableNone:t=>{const e=yn.parse(t);return yn.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Wv={...wo,transform:Math.round},HI={rotate:Hn,pathRotation:Hn,rotateX:Hn,rotateY:Hn,rotateZ:Hn,scale:Ll,scaleX:Ll,scaleY:Ll,scaleZ:Ll,skew:Hn,skewX:Hn,skewY:Hn,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:ja,originX:Rv,originY:Rv,originZ:W},iu={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,...HI,zIndex:Wv,fillOpacity:ja,strokeOpacity:ja,numOctaves:Wv},qI={...iu,color:Ve,backgroundColor:Ve,outlineColor:Ve,fill:Ve,stroke:Ve,borderColor:Ve,borderTopColor:Ve,borderRightColor:Ve,borderBottomColor:Ve,borderLeftColor:Ve,filter:Zf,WebkitFilter:Zf,mask:Yf,WebkitMask:Yf},Gk=t=>qI[t],KI=new Set([Zf,Yf]);function Zk(t,e){let n=Gk(t);return KI.has(n)||(n=yn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const GI=new Set(["auto","none","0"]);function ZI(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!GI.has(i)&&ro(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=Zk(n,s)}class YI extends qm{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Fm(h))){const p=Bk(h,n.current);p!==void 0&&(e[u]=p),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Uk.has(r)||e.length!==2)return;const[s,i]=e,o=zv(s),a=zv(i),l=Pv(s),c=Pv(i);if(l!==c&&Vr[r]){this.needsMeasurement=!0;return}if(o!==a)if($v(o)&&$v(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else Vr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||BI(e[s]))&&r.push(s);r.length&&ZI(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Vr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Qm=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Yk(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const s=document.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const Jf=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function dc(t){return sk(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Xm,cancel:PB}=vk(queueMicrotask,!1),sn={x:!1,y:!1};function Jk(){return sn.x||sn.y}function JI(t){return t==="x"||t==="y"?sn[t]?null:(sn[t]=!0,()=>{sn[t]=!1}):sn.x||sn.y?null:(sn.x=sn.y=!0,()=>{sn.x=sn.y=!1})}function Qk(t,e){const n=Yk(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function QI(t){return!(t.pointerType==="touch"||Jk())}function XI(t,e,n={}){const[r,s,i]=Qk(t,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",m)},h=x=>{c&&(c(x),c=void 0),u()},p=x=>{a=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),l&&(l=!1,h(x))},f=()=>{a=!0,window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",p,s)},m=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}h(x)}},y=x=>{if(!QI(x))return;l=!1;const v=e(o,x);typeof v=="function"&&(c=v,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",f,s)}),i}const Xk=(t,e)=>e?t===e?!0:Xk(t,e.parentElement):!1,eg=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,eL=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tL(t){return eL.has(t.tagName)||t.isContentEditable===!0}const nL=new Set(["INPUT","SELECT","TEXTAREA"]);function rL(t){return nL.has(t.tagName)||t.isContentEditable===!0}const hc=new WeakSet;function Hv(t){return e=>{e.key==="Enter"&&t(e)}}function ah(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const sL=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Hv(()=>{if(hc.has(n))return;ah(n,"down");const s=Hv(()=>{ah(n,"up")}),i=()=>ah(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function qv(t){return eg(t)&&!Jk()}const Kv=new WeakSet;function iL(t,e,n={}){const[r,s,i]=Qk(t,n),o=a=>{const l=a.currentTarget;if(!qv(a)||Kv.has(a))return;hc.add(l),n.stopPropagation&&Kv.add(a);const c=e(l,a),u={...s,capture:!0},h=(m,y)=>{window.removeEventListener("pointerup",p,u),window.removeEventListener("pointercancel",f,u),hc.has(l)&&hc.delete(l),qv(m)&&typeof c=="function"&&c(m,{success:y})},p=m=>{h(m,l===window||l===document||n.useGlobalTarget||Xk(l,m.target))},f=m=>{h(m,!1)};window.addEventListener("pointerup",p,u),window.addEventListener("pointercancel",f,u)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),dc(a)&&(a.addEventListener("focus",c=>sL(c,s)),!tL(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function tg(t){return sk(t)&&"ownerSVGElement"in t}const fc=new WeakMap;let _r;const eS=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:tg(r)&&"getBBox"in r?r.getBBox()[e]:r[n],oL=eS("inline","width","offsetWidth"),aL=eS("block","height","offsetHeight");function lL({target:t,borderBoxSize:e}){var n;(n=fc.get(t))==null||n.forEach(r=>{r(t,{get width(){return oL(t,e)},get height(){return aL(t,e)}})})}function cL(t){t.forEach(lL)}function uL(){typeof ResizeObserver>"u"||(_r=new ResizeObserver(cL))}function dL(t,e){_r||uL();const n=Yk(t);return n.forEach(r=>{let s=fc.get(r);s||(s=new Set,fc.set(r,s)),s.add(e),_r==null||_r.observe(r)}),()=>{n.forEach(r=>{const s=fc.get(r);s==null||s.delete(e),s!=null&&s.size||_r==null||_r.unobserve(r)})}}const pc=new Set;let Ei;function hL(){Ei=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};pc.forEach(e=>e(t))},window.addEventListener("resize",Ei)}function fL(t){return pc.add(t),Ei||hL(),()=>{pc.delete(t),!pc.size&&typeof Ei=="function"&&(window.removeEventListener("resize",Ei),Ei=void 0)}}function Gv(t,e){return typeof t=="function"?fL(t):dL(t,e)}function pL(t){return tg(t)&&t.tagName==="svg"}const mL=[...Kk,Ve,yn],gL=t=>mL.find(qk(t)),Zv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ci=()=>({x:Zv(),y:Zv()}),Yv=()=>({min:0,max:0}),Ue=()=>({x:Yv(),y:Yv()}),yL=new WeakMap;function ad(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Na(t){return typeof t=="string"||Array.isArray(t)}const ng=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rg=["initial",...ng];function ld(t){return ad(t.animate)||rg.some(e=>Na(t[e]))}function tS(t){return!!(ld(t)||t.variants)}function vL(t,e,n){for(const r in e){const s=e[r],i=n[r];if(Qe(s))t.addValue(r,s);else if(Qe(i))t.addValue(r,so(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(r);t.addValue(r,so(o!==void 0?o:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const ou={current:null},sg={current:!1},wL=typeof window<"u";function nS(){if(sg.current=!0,!!wL)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ou.current=t.matches;t.addEventListener("change",e),e()}else ou.current=!1}const Jv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let au={};function rS(t){au=t}function xL(){return au}class bL{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=qm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=ht.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ve.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=ld(n),this.isVariantNode=tS(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const m=p[f];c[f]!==void 0&&Qe(m)&&m.set(c[f])}}mount(e){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,yL.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(sg.current||nS(),this.shouldReduceMotion=ou.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),rs(this.notifyUpdate),rs(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Vk.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new Mk({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:Et(u)}),p=o(h);this.valueSubscriptions.set(e,()=>{p(),h.cancel()});return}const r=bo.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&ve.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in au){const n=au[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ue()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Jv.length;r++){const s=Jv[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=e[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=vL(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=so(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(rk(r)||ik(r))?r=parseFloat(r):!gL(r)&&yn.test(n)&&(r=Zk(e,n)),this.setBaseTarget(e,Qe(r)?r.get():r)),Qe(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Ym(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Qe(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Mm),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Xm.render(this.render)}}class sS extends bL{constructor(){super(...arguments),this.KeyframeResolver=YI}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Qe(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class cs{constructor(e){this.isMounted=!1,this.node=e}update(){}}function iS({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function _L({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function kL(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function lh(t){return t===void 0||t===1}function Qf({scale:t,scaleX:e,scaleY:n}){return!lh(t)||!lh(e)||!lh(n)}function vs(t){return Qf(t)||oS(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function oS(t){return Qv(t.x)||Qv(t.y)}function Qv(t){return t&&t!=="0%"}function lu(t,e,n){const r=t-n,s=e*r;return n+s}function Xv(t,e,n,r,s){return s!==void 0&&(t=lu(t,s,r)),lu(t,n,r)+e}function Xf(t,e=0,n=1,r,s){t.min=Xv(t.min,e,n,r,s),t.max=Xv(t.max,e,n,r,s)}function aS(t,{x:e,y:n}){Xf(t.x,e.translate,e.scale,e.originPoint),Xf(t.y,n.translate,n.scale,n.originPoint)}const e0=.999999999999,t0=1.0000000000001;function SL(t,e,n,r=!1){var a;const s=n.length;if(!s)return;e.x=e.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Pn(t.x,-i.scroll.offset.x),Pn(t.y,-i.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,aS(t,o)),r&&vs(i.latestValues)&&mc(t,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}e.x<t0&&e.x>e0&&(e.x=1),e.y<t0&&e.y>e0&&(e.y=1)}function Pn(t,e){t.min+=e,t.max+=e}function n0(t,e,n,r,s=.5){const i=ye(t.min,t.max,s);Xf(t,e,n,i,r)}function r0(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function mc(t,e,n){const r=n??t;n0(t.x,r0(e.x,r.x),e.scaleX,e.scale,e.originX),n0(t.y,r0(e.y,r.y),e.scaleY,e.scale,e.originY)}function lS(t,e){return iS(kL(t.getBoundingClientRect(),e))}function EL(t,e,n){const r=lS(t,n),{scroll:s}=e;return s&&(Pn(r.x,s.offset.x),Pn(r.y,s.offset.y)),r}const CL={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},TL=xo.length;function AL(t,e,n){let r="",s=!0;for(let o=0;o<TL;o++){const a=xo[o],l=t[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const u=parseFloat(l);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=Jf(l,iu[a]);if(!c){s=!1;const h=CL[a]||a;r+=`${h}(${u}) `}n&&(e[a]=u)}}const i=t.pathRotation;return i&&(s=!1,r+=`rotate(${Jf(i,iu.pathRotation)}) `),r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function ig(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(bo.has(l)){o=!0;continue}else if(xk(l)){s[l]=c;continue}else{const u=Jf(c,iu[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(e.transform||(o||n?r.transform=AL(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function cS(t,{style:e,vars:n},r,s){const i=t.style;let o;for(o in e)i[o]=e[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function s0(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lo={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(W.test(t))t=parseFloat(t);else return t;const n=s0(t,e.target.x),r=s0(t,e.target.y);return`${n}% ${r}%`}},PL={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=yn.parse(t);if(s.length>5)return r;const i=yn.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=ye(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},ep={borderRadius:{...Lo,applyTo:[...Qm]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:PL};function uS(t,{layout:e,layoutId:n}){return bo.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ep[t]||t==="opacity")}function og(t,e,n){var o;const r=t.style,s=e==null?void 0:e.style,i={};if(!r)return i;for(const a in r)(Qe(r[a])||s&&Qe(s[a])||uS(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function RL(t){return window.getComputedStyle(t)}class jL extends sS{constructor(){super(...arguments),this.type="html",this.renderInstance=cS}mount(e){Ws(!!e.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,n){var r;if(bo.has(n))return(r=this.projection)!=null&&r.isProjecting?Ff(n):J2(e,n);{const s=RL(e),i=(xk(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return lS(e,n)}build(e,n,r){ig(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return og(e,n,r)}}const NL={offset:"stroke-dashoffset",array:"stroke-dasharray"},OL={offset:"strokeDashoffset",array:"strokeDasharray"};function IL(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?NL:OL;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const LL=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dS(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,c,u){if(ig(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:p}=t;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox);for(const f of LL)h[f]!==void 0&&(p[f]=h[f],delete h[f]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&IL(h,s,i,o,!1)}const hS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),fS=t=>typeof t=="string"&&t.toLowerCase()==="svg";function DL(t,e,n,r){cS(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(hS.has(s)?s:Jm(s),e.attrs[s])}function pS(t,e,n){const r=og(t,e,n);for(const s in t)if(Qe(t[s])||Qe(e[s])){const i=xo.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class ML extends sS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ue}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(bo.has(n)){const r=Gk(n);return r&&r.default||0}return n=hS.has(n)?n:Jm(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return pS(e,n,r)}build(e,n,r){dS(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,s){DL(e,n,r,s)}mount(e){this.isSVGTag=fS(e.tagName),super.mount(e)}}const $L=rg.length;function mS(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?mS(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<$L;n++){const r=rg[n],s=t.props[r];(Na(s)||s===!1)&&(e[r]=s)}return e}function gS(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const VL=[...ng].reverse(),FL=ng.length;function BL(t){return e=>Promise.all(e.map(({animation:n,options:r})=>VI(t,n,r)))}function UL(t){let e=BL(t),n=i0(),r=!0,s=!1;const i=c=>(u,h)=>{var f;const p=Ms(t,h,c==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(p){const{transition:m,transitionEnd:y,...x}=p;u={...u,...x,...y}}return u};function o(c){e=c(t)}function a(c){const{props:u}=t,h=mS(t.parent)||{},p=[],f=new Set;let m={},y=1/0;for(let v=0;v<FL;v++){const g=VL[v],w=n[g],_=u[g]!==void 0?u[g]:h[g],k=Na(_),S=g===c?w.isActive:null;S===!1&&(y=v);let E=_===h[g]&&_!==u[g]&&k;if(E&&(r||s)&&t.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...m},!w.isActive&&S===null||!_&&!w.prevProp||ad(_)||typeof _=="boolean")continue;if(g==="exit"&&w.isActive&&S!==!0){w.prevResolvedValues&&(m={...m,...w.prevResolvedValues});continue}const C=zL(w.prevProp,_);let A=C||g===c&&w.isActive&&!E&&k||v>y&&k,T=!1;const O=Array.isArray(_)?_:[_];let N=O.reduce(i(g),{});S===!1&&(N={});const{prevResolvedValues:z={}}=w,M={...z,...N},Q=P=>{A=!0,f.has(P)&&(T=!0,f.delete(P)),w.needsAnimating[P]=!0;const R=t.getValue(P);R&&(R.liveStyle=!1)};for(const P in M){const R=N[P],V=z[P];if(m.hasOwnProperty(P))continue;let J=!1;qf(R)&&qf(V)?J=!gS(R,V)||C:J=R!==V,J?R!=null?Q(P):f.add(P):R!==void 0&&f.has(P)?Q(P):w.protectedKeys[P]=!0}w.prevProp=_,w.prevResolvedValues=N,w.isActive&&(m={...m,...N}),(r||s)&&t.blockInitialAnimation&&(A=!1);const G=E&&C;A&&(!G||T)&&p.push(...O.map(P=>{const R={type:g};if(typeof P=="string"&&(r||s)&&!G&&t.manuallyAnimateOnMount&&t.parent){const{parent:V}=t,J=Ms(V,P);if(V.enteringChildren&&J){const{delayChildren:Z}=J.transition||{};R.delay=Fk(V.enteringChildren,t,Z)}}return{animation:P,options:R}}))}if(f.size){const v={};if(typeof u.initial!="boolean"){const g=Ms(t,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(v.transition=g.transition)}f.forEach(g=>{const w=t.getBaseTarget(g),_=t.getValue(g);_&&(_.liveStyle=!0),v[g]=w??null}),p.push({animation:v})}let x=!!p.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(x=!1),r=!1,s=!1,x?e(p):Promise.resolve()}function l(c,u){var p;if(n[c].isActive===u)return Promise.resolve();(p=t.variantChildren)==null||p.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const h=a(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=i0(),s=!0}}}function zL(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!gS(e,t):!1}function fs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i0(){return{animate:fs(!0),whileInView:fs(),whileHover:fs(),whileTap:fs(),whileDrag:fs(),whileFocus:fs(),exit:fs()}}function tp(t,e){t.min=e.min,t.max=e.max}function nn(t,e){tp(t.x,e.x),tp(t.y,e.y)}function o0(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const yS=1e-4,WL=1-yS,HL=1+yS,vS=.01,qL=0-vS,KL=0+vS;function ft(t){return t.max-t.min}function GL(t,e,n){return Math.abs(t-e)<=n}function a0(t,e,n,r=.5){t.origin=r,t.originPoint=ye(e.min,e.max,t.origin),t.scale=ft(n)/ft(e),t.translate=ye(n.min,n.max,t.origin)-t.originPoint,(t.scale>=WL&&t.scale<=HL||isNaN(t.scale))&&(t.scale=1),(t.translate>=qL&&t.translate<=KL||isNaN(t.translate))&&(t.translate=0)}function oa(t,e,n,r){a0(t.x,e.x,n.x,r?r.originX:void 0),a0(t.y,e.y,n.y,r?r.originY:void 0)}function l0(t,e,n,r=0){const s=r?ye(n.min,n.max,r):n.min;t.min=s+e.min,t.max=t.min+ft(e)}function ZL(t,e,n,r){l0(t.x,e.x,n.x,r==null?void 0:r.x),l0(t.y,e.y,n.y,r==null?void 0:r.y)}function c0(t,e,n,r=0){const s=r?ye(n.min,n.max,r):n.min;t.min=e.min-s,t.max=t.min+ft(e)}function cu(t,e,n,r){c0(t.x,e.x,n.x,r==null?void 0:r.x),c0(t.y,e.y,n.y,r==null?void 0:r.y)}function u0(t,e,n,r,s){return t-=e,t=lu(t,1/n,r),s!==void 0&&(t=lu(t,1/s,r)),t}function YL(t,e=0,n=1,r=.5,s,i=t,o=t){if(In.test(e)&&(e=parseFloat(e),e=ye(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=ye(i.min,i.max,r);t===i&&(a-=e),t.min=u0(t.min,e,n,a,s),t.max=u0(t.max,e,n,a,s)}function d0(t,e,[n,r,s],i,o){YL(t,e[n],e[r],e[s],e.scale,i,o)}const JL=["x","scaleX","originX"],QL=["y","scaleY","originY"];function h0(t,e,n,r){d0(t.x,e,JL,n?n.x:void 0,r?r.x:void 0),d0(t.y,e,QL,n?n.y:void 0,r?r.y:void 0)}function f0(t){return t.translate===0&&t.scale===1}function wS(t){return f0(t.x)&&f0(t.y)}function p0(t,e){return t.min===e.min&&t.max===e.max}function XL(t,e){return p0(t.x,e.x)&&p0(t.y,e.y)}function m0(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function xS(t,e){return m0(t.x,e.x)&&m0(t.y,e.y)}function g0(t){return ft(t.x)/ft(t.y)}function y0(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Sn(t){return[t("x"),t("y")]}function eD(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,pathRotation:h,rotateX:p,rotateY:f,skewX:m,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const tD=Qm.length,v0=t=>typeof t=="string"?parseFloat(t):t,w0=t=>typeof t=="number"||W.test(t);function nD(t,e,n,r,s,i){s?(t.opacity=ye(0,n.opacity??1,rD(r)),t.opacityExit=ye(e.opacity??1,0,sD(r))):i&&(t.opacity=ye(e.opacity??1,n.opacity??1,r));for(let o=0;o<tD;o++){const a=Qm[o];let l=x0(e,a),c=x0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||w0(l)===w0(c)?(t[a]=Math.max(ye(v0(l),v0(c),r),0),(In.test(c)||In.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=ye(e.rotate||0,n.rotate||0,r))}function x0(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const rD=bS(0,.5,pk),sD=bS(.5,.95,Kt);function bS(t,e,n){return r=>r<t?0:r>e?1:n(Ra(t,e,r))}function iD(t,e,n){const r=Qe(t)?t:so(t);return r.start(Zm("",r,e,n)),r.animation}function Oa(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}const oD=(t,e)=>t.depth-e.depth;class aD{constructor(){this.children=[],this.isDirty=!1}add(e){Dm(this.children,e),this.isDirty=!0}remove(e){eu(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(oD),this.isDirty=!1,this.children.forEach(e)}}function lD(t,e){const n=ht.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(rs(r),t(i-e))};return ve.setup(r,!0),()=>rs(r)}function gc(t){return Qe(t)?t.get():t}class cD{constructor(){this.members=[]}add(e){Dm(this.members,e);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===e||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(eu(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(eu(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let r=this.members.indexOf(e)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(e,n){var s;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=e.options;(i===void 0||i!==o)&&(e.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(s=e.root)!=null&&s.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,r,s,i,o;(r=(n=e.options).onExitComplete)==null||r.call(n),(o=(s=e.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const yc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ch=["","X","Y","Z"],uD=1e3;let dD=0;function uh(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function _S(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Wk(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ve,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&_S(r)}function kS({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=dD++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(pD),this.nodes.forEach(xD),this.nodes.forEach(bD),this.nodes.forEach(mD)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new aD)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Mm),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=tg(o)&&!pL(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const p=()=>this.root.updateBlockedByResize=!1;ve.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=lD(p,250),yc.hasAnimatedSinceResize&&(yc.hasAnimatedSinceResize=!1,this.nodes.forEach(k0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||CD,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=c.getProps(),v=!this.targetLayout||!xS(this.targetLayout,f),g=!h&&p;if(this.options.layoutRoot||this.resumeFrom||g||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Gm(m,"layout"),onPlay:y,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,g,w.path)}else h||k0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),rs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_D),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_S(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(yD),this.nodes.forEach(b0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(_0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vD),this.nodes.forEach(wD),this.nodes.forEach(hD),this.nodes.forEach(fD)):this.nodes.forEach(_0),this.clearAllSnapshots();const a=ht.now();Je.delta=$n(0,1e3/60,a-Je.timestamp),Je.timestamp=a,Je.isProcessing=!0,th.update.process(Je),th.preRender.process(Je),th.render.process(Je),Je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gD),this.sharedNodes.forEach(kD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ve.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ve.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ft(this.snapshot.measuredBox.x)&&!ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ue()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!wS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||vs(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),TD(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ue();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(AD))){const{scroll:u}=this.root;u&&(Pn(a.x,u.offset.x),Pn(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Ue();if(nn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:p}=u;u!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&nn(a,o),Pn(a.x,h.offset.x),Pn(a.y,h.offset.y))}return a}applyTransform(o,a=!1,l){var u,h;const c=l||Ue();nn(c,o);for(let p=0;p<this.path.length;p++){const f=this.path[p];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Pn(c.x,-f.scroll.offset.x),Pn(c.y,-f.scroll.offset.y)),vs(f.latestValues)&&mc(c,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return vs(this.latestValues)&&mc(c,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),c}removeTransform(o){var l;const a=Ue();nn(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!vs(u.latestValues))continue;let h;u.instance&&(Qf(u.latestValues)&&u.updateSnapshot(),h=Ue(),nn(h,u.measurePageBox())),h0(a,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,h)}return vs(this.latestValues)&&h0(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Je.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=Je.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ue(),this.targetWithTransforms=Ue()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZL(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):nn(this.target,this.layout.layoutBox),aS(this.target,this.targetDelta)):nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Qf(this.parent.latestValues)||oS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ue(),this.relativeTargetOrigin=Ue(),cu(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Je.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;nn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;SL(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ue());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(o0(this.prevProjectionDelta.x,this.projectionDelta.x),o0(this.prevProjectionDelta.y,this.projectionDelta.y)),oa(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==
248p||!y0(this.projectionDelta.x,this.prevProjectionDelta.x)||!y0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ci(),this.projectionDelta=Ci(),this.projectionDeltaWithTransform=Ci()}setAnimationOrigin(o,a=!1,l){const c=this.snapshot,u=c?c.latestValues:{},h={...this.latestValues},p=Ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ue(),m=c?c.source:void 0,y=this.layout?this.layout.source:void 0,x=m!==y,v=this.getStack(),g=!v||v.members.length<=1,w=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(ED));this.animationProgress=0;let _;const k=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=S=>{const E=S/1e3,C=k==null?void 0:k(E);C?(p.x.translate=C.x,p.x.scale=ye(o.x.scale,1,E),p.x.origin=o.x.origin,p.x.originPoint=o.x.originPoint,p.y.translate=C.y,p.y.scale=ye(o.y.scale,1,E),p.y.origin=o.y.origin,p.y.originPoint=o.y.originPoint):(S0(p.x,o.x,E),S0(p.y,o.y,E)),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),SD(this.relativeTarget,this.relativeTargetOrigin,f,E),_&&XL(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Ue()),nn(_,this.relativeTarget)),x&&(this.animationValues=h,nD(h,u,this.latestValues,E,w,g)),C&&C.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=C.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(rs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ve.update(()=>{yc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=so(0)),this.motionValue.jump(0,!1),this.currentAnimation=iD(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&SS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ue();const h=ft(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const p=ft(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}nn(a,l),mc(a,u),oa(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new cD),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 4,506 bytes, line 248
248resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&uh("z",o,c,this.animationValues);for(let u=0;u<ch.length;u++)uh(`rotate${ch[u]}`,o,c,this.animationValues),uh(`skew${ch[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=gc(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=gc(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!vs(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=eD(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:p,y:f}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in ep){if(u[m]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:v}=ep[m],g=h==="none"?u[m]:y(u[m],c);if(x){const w=x.length;for(let _=0;_<w;_++)o[x[_]]=g}else v?this.options.visualElement.renderState.vars[m]=g:o[m]=g}this.options.layoutId&&(o.pointerEvents=c===this?gc(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(b0),this.root.sharedNodes.clear()}}}function hD(t){t.updateLayout()}function fD(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;if(i==="size")Sn(h=>{const p=o?e.measuredBox[h]:e.layoutBox[h],f=ft(p);p.min=r[h].min,p.max=p.min+f});else if(i==="x"||i==="y"){const h=i==="x"?"y":"x";tp(o?e.measuredBox[h]:e.layoutBox[h],r[h])}else SS(i,e.layoutBox,r)&&Sn(h=>{const p=o?e.measuredBox[h]:e.layoutBox[h],f=ft(r[h]);p.max=p.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const a=Ci();oa(a,r,e.layoutBox);const l=Ci();o?oa(l,t.applyTransform(s,!0),e.measuredBox):oa(l,r,e.layoutBox);const c=!wS(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:f}=h;if(p&&f){const m=t.options.layoutAnchor||void 0,y=Ue();cu(y,e.layoutBox,p.layoutBox,m);const x=Ue();cu(x,r,f.layoutBox,m),xS(y,x)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=x,t.relativeTargetOrigin=y,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function pD(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function mD(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function gD(t){t.clearSnapshot()}function b0(t){t.clearMeasurements()}function yD(t){t.isLayoutDirty=!0,t.updateLayout()}function _0(t){t.isLayoutDirty=!1}function vD(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function wD(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function k0(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function xD(t){t.resolveTargetDelta()}function bD(t){t.calcProjection()}
248function _D(t){t.resetSkewAndRotation()}function kD(t){t.removeLeadSnapshot()}function S0(t,e,n){t.translate=ye(e.translate,0,n),t.scale=ye(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function E0(t,e,n,r){t.min=ye(e.min,n.min,r),t.max=ye(e.max,n.max,r)}function SD(t,e,n,r){E0(t.x,e.x,n.x,r),E0(t.y,e.y,n.y,r)}function ED(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const CD={duration:.45,ease:[.4,0,.1,1]},C0=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),T0=C0("applewebkit/")&&!C0("chrome/")?Math.round:Kt;function A0(t){t.min=T0(t.min),t.max=T0(t.max)}function TD(t){A0(t.x),A0(t.y)}function SS(t,e,n){return t==="position"||t==="preserve-aspect"&&!GL(g0(e),g0(n),.2)}function AD(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const PD=kS({attachResizeListener:(t,e)=>Oa(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),dh={current:void 0},ES=kS({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!dh.current){const t=new PD({});t.mount(window),t.setOptions({layoutScroll:!0}),dh.current=t}return dh.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ia=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function P0(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function RD(...t){return e=>{let n=!1;const r=t.map(s=>{const i=P0(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():P0(t[s],null)}}}}function jD(...t){return b.useCallback(RD(...t),t)}class ND extends b.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(dc(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=dc(r)&&r.offsetWidth||0,i=dc(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function OD({children:t,isPresent:e,anchorX:n,anchorY:r,root:s,pop:i}){var p;const o=b.useId(),a=b.useRef(null),l=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=b.useContext(Ia),u=i!==!1?((p=t.props)==null?void 0:p.ref)??(t==null?void 0:t.ref):void 0,h=jD(a,u);return b.useInsertionEffect(()=>{const{width:f,height:m,top:y,left:x,right:v,bottom:g,direction:w}=l.current;if(e||i===!1||!a.current||!f||!m)return;const _=w==="rtl",k=n==="left"?_?`right: ${v}`:`left: ${x}`:_?`left: ${x}`:`right: ${v}`,S=r==="bottom"?`bottom: ${g}`:`top: ${y}`;a.current.dataset.motionPopId=o;const E=document.createElement("style");c&&(E.nonce=c);const C=s??document.head;return C.appendChild(E),E.sheet&&E.sheet.insertRule(` 249 [data-motion-pop-id="${o}"] { 250 position: absolute !important; 251 width: ${f}px !important; 252 height: ${m}px !important; 253 ${k}px !important; 254 ${S}px !important; 255 } 256 `),()=>{var A;(A=a.current)==null||A.removeAttribute("data-motion-pop-id"),C.contains(E)&&C.removeChild(E)}},[e]),d.jsx(ND,{isPresent:e,childRef:a,sizeRef:l,pop:i,children:i===!1?t:b.cloneElement(t,{ref:h})})}const ID=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=rd(LD),h=b.useId(),p=b.useRef(n),f=b.useRef(r);Lm(()=>{p.current=n,f.current=r});let m=!0,y=b.useMemo(()=>(m=!1,{id:h,initial:e,isPresent:n,custom:s,onExitComplete:x=>{u.set(x,!0);for(const v of u.values())if(!v)return;r&&r()},register:x=>(u.set(x,!1),()=>{var v;u.delete(x),!p.current&&!u.size&&((v=f.current)==null||v.call(f))})}),[n,u,r]);return i&&m&&(y={...y}),b.useMemo(()=>{u.forEach((x,v)=>u.set(v,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),t=d.jsx(OD,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:t}),d.jsx(sd.Provider,{value:y,children:t})};function LD(){return new Map}function CS(t=!0){const e=b.useContext(sd);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=b.useId();b.useEffect(()=>{if(t)return s(i)},[t]);const o=b.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,o]:[!0]}const Dl=t=>t.key||"";function R0(t){const e=[];
vendor: 6,524 bytes, line 256
256return b.Children.forEach(t,n=>{b.isValidElement(n)&&e.push(n)}),e}const ag=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,h]=CS(o),p=b.useMemo(()=>R0(t),[t]),f=o&&!u?[]:p.map(Dl),m=b.useRef(!0),y=b.useRef(p),x=rd(()=>new Map),v=b.useRef(new Set),[g,w]=b.useState(p),[_,k]=b.useState(p);Lm(()=>{m.current=!1,y.current=p;for(let C=0;C<_.length;C++){const A=Dl(_[C]);f.includes(A)?(x.delete(A),v.current.delete(A)):x.get(A)!==!0&&x.set(A,!1)}},[_,f.length,f.join("-")]);const S=[];if(p!==g){let C=[...p];for(let A=0;A<_.length;A++){const T=_[A],O=Dl(T);f.includes(O)||(C.splice(A,0,T),S.push(T))}return i==="wait"&&S.length&&(C=S),k(R0(C)),w(p),null}const{forceRender:E}=b.useContext(Im);return d.jsx(d.Fragment,{children:_.map(C=>{const A=Dl(C),T=o&&!u?!1:p===_||f.includes(A),O=()=>{if(v.current.has(A))return;if(x.has(A))v.current.add(A),x.set(A,!0);else return;let N=!0;x.forEach(z=>{z||(N=!1)}),N&&(E==null||E(),k(y.current),o&&(h==null||h()),r&&r())};return d.jsx(ID,{isPresent:T,initial:!m.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:T?void 0:O,anchorX:a,anchorY:l,children:C},A)})})},TS=b.createContext({strict:!1}),j0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let N0=!1;function DD(){if(N0)return;const t={};for(const e in j0)t[e]={isEnabled:n=>j0[e].some(r=>!!n[r])};rS(t),N0=!0}function AS(){return DD(),xL()}function MD(t){const e=AS();for(const n in t)e[n]={...e[n],...t[n]};rS(e)}const $D=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function uu(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$D.has(t)}let PS=t=>!uu(t);function RS(t){typeof t=="function"&&(PS=e=>e.startsWith("on")?!uu(e):t(e))}try{RS(require("@emotion/is-prop-valid").default)}catch{}function VD(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||Qe(t[s])||(PS(s)||n===!0&&uu(s)||!e&&!uu(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}function FD({children:t,isValidProp:e,...n}){e&&RS(e);const r=b.useContext(Ia);n={...r,...n},n.transition=Km(n.transition,r.transition),n.isStatic=rd(()=>n.isStatic);const s=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return d.jsx(Ia.Provider,{value:s,children:t})}const cd=b.createContext({});function BD(t,e){if(ld(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Na(n)?n:void 0,animate:Na(r)?r:void 0}}return t.inherit!==!1?e:{}}function UD(t){const{initial:e,animate:n}=BD(t,b.useContext(cd));return b.useMemo(()=>({initial:e,animate:n}),[O0(e),O0(n)])}function O0(t){return Array.isArray(t)?t.join(" "):t}const lg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jS(t,e,n){for(const r in e)!Qe(e[r])&&!uS(r,n)&&(t[r]=e[r])}function zD({transformTemplate:t},e){return b.useMemo(()=>{const n=lg();return ig(n,e,t),Object.assign({},n.vars,n.style)},[e])}function WD(t,e){const n=t.style||{},r={};return jS(r,n,t),Object.assign(r,zD(t,e)),r}function HD(t,e){const n={},r=WD(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const NS=()=>({...lg(),attrs:{}});function qD(t,e,n,r){const s=b.useMemo(()=>{const i=NS();return dS(i,e,fS(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};jS(i,t.style,t),s.style={...i,...s.style}}return s}const KD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function cg(t){return typeof t!="string"||t.includes("-")?!1:!!(KD.indexOf(t)>-1||/[A-Z]/u.test(t))}function GD(t,e,n,{latestValues:r},s,i=!1,o){const l=(o??cg(t)?qD:HD)(e,r,s,t),c=VD(e,typeof t=="string",i),u=t!==b.Fragment?{...c,...l,ref:n}:{},{children:h}=e,p=b.useMemo(()=>Qe(h)?h.get():h,[h]);return b.createElement(t,{...u,children:p})}function ZD({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:YD(n,r,s,t),renderState:e()}}function YD(t,e,n,r){const s={},i=r(t,{});for(const p in i)s[p]=gc(i[p]);let{initial:o,animate:a}=t;const l=ld(t),c=tS(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!ad(h)){const p=Array.isArray(h)?h:[h];for(let f=0;f<p.length;f++){const m=Ym(t,p[f]);if(m){const{transitionEnd:y,transition:x,...v}=m;for(const g in v){let w=v[g];if(Array.isArray(w)){const _=u?w.length-1:0;w=w[_]}w!==null&&(s[g]=w)}for(const g in y)s[g]=y[g]}}}return s}const OS=t=>(e,n)=>{const r=b.useContext(cd),s=b.useContext(sd),i=()=>ZD(t,e,r,s);return n?i():rd(i)},JD=OS({scrapeMotionValuesFromProps:og,createRenderState:lg}),QD=OS({scrapeMotionValuesFromProps:pS,createRenderState:NS}),XD=Symbol.for("motionComponentSymbol");function eM(t,e,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const s=b.useRef(null);return b.useCallback(i=>{var a;i&&((a=t.onMount)==null||a.call(t,i)),e&&(i?e.mount(i):e.unmount());const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[e])}const IS=b.createContext({});function ai(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function tM(t,e,n,r,s,i){var w,_;const{visualElement:o}
vendor: 21,276 bytes, line 256
256=b.useContext(cd),a=b.useContext(TS),l=b.useContext(sd),c=b.useContext(Ia),u=c.reducedMotion,h=c.skipAnimations,p=b.useRef(null),f=b.useRef(!1);r=r||a.renderer,!p.current&&r&&(p.current=r(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:i}),f.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const m=p.current,y=b.useContext(IS);m&&!m.projection&&s&&(m.type==="html"||m.type==="svg")&&nM(p.current,n,s,y);const x=b.useRef(!1);b.useInsertionEffect(()=>{m&&x.current&&m.update(n,l)});const v=n[zk],g=b.useRef(!!v&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,v))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,v)));return Lm(()=>{f.current=!0,m&&(x.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),g.current&&m.animationState&&m.animationState.animateChanges())}),b.useEffect(()=>{m&&(!g.current&&m.animationState&&m.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,v)}),g.current=!1),m.enteringChildren=void 0)}),m}function nM(t,e,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:LS(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&ai(a),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function LS(t){if(t)return t.options.allowProjection!==!1?t.projection:LS(t.parent)}function hh(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&MD(r);const i=n?n==="svg":cg(t),o=i?QD:JD;function a(c,u){let h;const p={...b.useContext(Ia),...c,layoutId:rM(c)},{isStatic:f}=p,m=UD(c),y=o(c,f);if(!f&&typeof window<"u"){sM();const x=iM(p);h=x.MeasureLayout,m.visualElement=tM(t,y,p,s,x.ProjectionNode,i)}return d.jsxs(cd.Provider,{value:m,children:[h&&m.visualElement?d.jsx(h,{visualElement:m.visualElement,...p}):null,GD(t,c,eM(y,m.visualElement,u),y,f,e,i)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=b.forwardRef(a);return l[XD]=t,l}function rM({layoutId:t}){const e=b.useContext(Im).id;return e&&t!==void 0?e+"-"+t:t}function sM(t,e){b.useContext(TS).strict}function iM(t){const e=AS(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(t)||r!=null&&r.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function oM(t,e){if(typeof Proxy>"u")return hh;const n=new Map,r=(i,o)=>hh(i,o,t,e),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,hh(o,void 0,t,e)),n.get(o))})}const aM=(t,e)=>e.isSVG??cg(t)?new ML(e):new jL(e,{allowProjection:t!==b.Fragment});class lM extends cs{constructor(e){super(e),e.animationState||(e.animationState=UL(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ad(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let cM=0;class uM extends cs{constructor(){super(...arguments),this.id=cM++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=Ms(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...h}=l;for(const p in h)(i=this.node.getValue(p))==null||i.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const dM={animation:{Feature:lM},exit:{Feature:uM}};function sl(t){return{point:{x:t.pageX,y:t.pageY}}}const hM=t=>e=>eg(e)&&t(e,sl(e));function aa(t,e,n,r){return Oa(t,e,hM(n),r)}const DS=({current:t})=>t?t.ownerDocument.defaultView:null,I0=(t,e)=>Math.abs(t-e);function fM(t,e){const n=I0(t.x,e.x),r=I0(t.y,e.y);return Math.sqrt(n**2+r**2)}const L0=new Set(["auto","scroll"]);class MS{constructor(e,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ml(this.lastRawMoveEventInfo,this.transformPagePoint));const m=fh(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,x=fM(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!x)return;const{point:v}=m,{timestamp:g}=Je;this.history.push({...v,timestamp:g});const{onStart:w,onMove:_}=this.handlers;y||(w&&w(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=Ml(y,this.transformPagePoint),ve.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:x,onSessionEnd:v,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=fh(m.type==="pointercancel"?this.lastMoveEventInfo:Ml(y,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,w),v&&v(m,w)},!eg(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=sl(e),c=Ml(l,this.transformPagePoint),{point:u}=c,{timestamp:h}=Je;this.history=[{...u,timestamp:h}];const{onSessionStart:p}=n;p&&p(e,fh(c,this.history));const f={passive:!0,capture:!0};this.removeListeners=tl(aa(this.contextWindow,"pointermove",this.handlePointerMove,f),aa(this.contextWindow,"pointerup",this.handlePointerUp,f),aa(this.contextWindow,"pointercancel",this.handlePointerUp,f)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(L0.has(r.overflowX)||L0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,s),ve.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),rs(this.updatePoint)}}function Ml(t,e){return e?{point:e(t.point)}:t}function D0(t,e){return{x:t.x-e.x,y:t.y-e.y}}function fh({point:t},e){return{point:t,delta:D0(t,$S(e)),offset:D0(t,pM(e)),velocity:mM(e,.1)}}function pM(t){return t[0]}function $S(t){return t[t.length-1]}function mM(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=$S(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>Et(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&s.timestamp-r.timestamp>Et(e)*2&&(r=t[1]);const i=Wt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function gM(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?ye(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?ye(n,t,r.max):Math.min(t,n)),t}function M0(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function yM(t,{top:e,left:n,bottom:r,right:s}){return{x:M0(t.x,n,s),y:M0(t.y,e,r)}}function $0(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function vM(t,e){return{x:$0(t.x,e.x),y:$0(t.y,e.y)}}function wM(t,e){let n=.5;const r=ft(t),s=ft(e);return s>r?n=Ra(e.min,e.max-r,t.min):r>s&&(n=Ra(t.min,t.max-s,e.min)),$n(0,1,n)}function xM(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const np=.35;function bM(t=np){return t===!1?t=0:t===!0&&(t=np),{x:V0(t,"left","right"),y:V0(t,"top","bottom")}}function V0(t,e,n){return{min:F0(t,e),max:F0(t,n)}}function F0(t,e){return typeof t=="number"?t:t[e]||0}const _M=new WeakMap;class kM{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ue(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n&&this.snapToCursor(sl(h).point),this.stopAnimation()},o=(h,p)=>{const{drag:f,dragPropagation:m,onDragStart:y}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=JI(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Sn(v=>{let g=this.getAxisMotionValue(v).get()||0;if(In.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const _=w.layout.layoutBox[v];_&&(g=ft(_)*(parseFloat(g)/100))}}this.originPoint[v]=g}),y&&ve.update(()=>y(h,p),!1,!0),Kf(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:y,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=p;if(m&&this.currentDirection===null){this.currentDirection=EM(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",p.point,v),this.updateAxis("y",p.point,v),this.visualElement.render(),x&&ve.update(()=>x(h,p),!1,!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new MS(e,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:DS(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ve.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:s}=this.getProps();if(!r||!$l(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=gM(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;e&&ai(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=yM(r.layoutBox,e):this.constraints=!1,this.elastic=bM(n),s!==this.constraints&&!ai(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Sn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=xM(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ai(e))return!1;const r=e.current;Ws(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const i=EL(r,s.root,this.visualElement.getTransformPagePoint());let o=vM(s.layout.layoutBox,i);if(n){const a=n(_L(o));this.hasMutatedConstraints=!!a,a&&(o=iS(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Sn(u=>{if(!$l(u,n,this.currentDirection))return;let h=l&&l[u]||{};(o===!0||o===u)&&(h={min:0,max:0});const p=s?200:1e6,f=s?40:1e7,m={type:"inertia",velocity:r?e[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Kf(this.visualElement,e),r.start(Zm(e,r,0,n,this.visualElement,!1))}stopAnimation(){Sn(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Sn(n=>{const{drag:r}=this.getProps();if(!$l(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(e[n]-ye(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ai(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Sn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=wM({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Sn(o=>{if(!$l(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ye(l,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_M.set(this.visualElement,this);const e=this.visualElement.current,n=aa(e,"pointerdown",c=>{const{drag:u,dragListener:h=!0}=this.getProps(),p=c.target,f=p!==e&&rL(p);u&&h&&!f&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();ai(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=SM(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ve.read(s);const a=Oa(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Sn(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=c[h].translate,p.set(p.get()+c[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=np,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function B0(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function SM(t,e,n){const r=Gv(t,B0(n)),s=Gv(e,B0(n));return()=>{r(),s()}}function $l(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function EM(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class CM extends cs{constructor(e){super(e),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new kM(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const ph=t=>(e,n)=>{t&&ve.update(()=>t(e,n),!1,!0)};class TM extends cs{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(e){this.session=new MS(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:DS(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:ph(e),onStart:ph(n),onMove:ph(r),onEnd:(i,o)=>{delete this.session,s&&ve.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=aa(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let mh=!1;class AM extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),mh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),yc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),mh=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||ve.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Xm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;mh=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function VS(t){const[e,n]=CS(),r=b.useContext(Im);return d.jsx(AM,{...t,layoutGroup:r,switchLayoutGroup:b.useContext(IS),isPresent:e,safeToRemove:n})}const PM={pan:{Feature:TM},drag:{Feature:CM,ProjectionNode:ES,MeasureLayout:VS}};function U0(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ve.postRender(()=>i(e,sl(e)))}class RM extends cs{mount(){const{current:e}=this.node;e&&(this.unmount=XI(e,(n,r)=>(U0(this.node,r,"Start"),s=>U0(this.node,s,"End"))))}unmount(){}}class jM extends cs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tl(Oa(this.node.current,"focus",()=>this.onFocus()),Oa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function z0(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ve.postRender(()=>i(e,sl(e)))}class NM extends cs{mount(){const{current:e}=this.node;if(!e)return;
256const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=iL(e,(s,i)=>(z0(this.node,i,"Start"),(o,{success:a})=>z0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const rp=new WeakMap,gh=new WeakMap,OM=t=>{const e=rp.get(t.target);e&&e(t)},IM=t=>{t.forEach(OM)};function LM({root:t,...e}){const n=t||document;gh.has(n)||gh.set(n,{});const r=gh.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(IM,{root:t,...e})),r[s]}function DM(t,e,n){const r=LM(e);return rp.set(t,n),r.observe(t),()=>{rp.delete(t),r.unobserve(t)}}const MM={some:0,all:1};class $M extends cs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:MM[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),f=u?h:p;f&&f(c)};this.stopObserver=DM(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(VM(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function VM({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const FM={inView:{Feature:$M},tap:{Feature:NM},focus:{Feature:jM},hover:{Feature:RM}},BM={layout:{ProjectionNode:ES,MeasureLayout:VS}},UM={...dM,...FM,...PM,...BM},$=oM(UM,aM);function zM(){!sg.current&&nS();const[t]=b.useState(ou.current);return t}const WM=bm("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"}}),Ce=b.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?PA:"button";return d.jsx(o,{className:He(WM({variant:e,size:n,className:t})),ref:i,...s})});Ce.displayName="Button";const HM=Symbol.for("@supabase/supabase-js.traceContextExtractor");function qM(){return globalThis[HM]}function KM(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}const GM=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class ug extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class ZM extends ug{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class W0 extends ug{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class H0 extends ug{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var sp;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(sp||(sp={}));class YM{constructor(e,{headers:n={},customFetch:r,region:s=sp.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=GM(r)}
256setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return KM(this,arguments,void 0,function*(n,r={}){var s,i;let o,a,l;try{const{headers:c,method:u,body:h,signal:p,timeout:f}=r;let m={},{region:y}=r;y||(y=this.region);const x=new URL(`${this.url}/${n}`);y&&y!=="any"&&(m["x-region"]=y,x.searchParams.set("forceFunctionRegion",y));let v;const g=!!c&&Object.keys(c).some(C=>C.toLowerCase()==="content-type");h&&!g?typeof Blob<"u"&&h instanceof Blob||h instanceof ArrayBuffer?(m["Content-Type"]="application/octet-stream",v=h):typeof h=="string"?(m["Content-Type"]="text/plain",v=h):typeof FormData<"u"&&h instanceof FormData?v=h:(m["Content-Type"]="application/json",v=JSON.stringify(h)):h&&typeof h!="string"&&!(typeof Blob<"u"&&h instanceof Blob)&&!(h instanceof ArrayBuffer)&&!(typeof FormData<"u"&&h instanceof FormData)?v=JSON.stringify(h):v=h;let w=p;f&&(a=new AbortController,o=setTimeout(()=>a.abort(),f),p?(w=a.signal,l=()=>a.abort(),p.addEventListener("abort",l)):w=a.signal);const _=yield this.fetch(x.toString(),{method:u||"POST",headers:Object.assign(Object.assign(Object.assign({},m),this.headers),c),body:v,signal:w}).catch(C=>{throw new ZM(C)}),k=_.headers.get("x-relay-error");if(k&&k==="true")throw new W0(_);if(!_.ok)throw new H0(_);let S=((s=_.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim().toLowerCase(),E;return S==="application/json"?E=yield _.json():S==="application/octet-stream"||S==="application/pdf"?E=yield _.blob():S==="text/event-stream"?E=_:S==="multipart/form-data"?E=yield _.formData():E=yield _.text(),{data:E,error:null,response:_}}catch(c){return{data:null,error:c,response:c instanceof H0||c instanceof W0?c.context:void 0}}finally{o&&clearTimeout(o),l&&((i=r.signal)===null||i===void 0||i.removeEventListener("abort",l))}})}}const FS=3,q0=t=>Math.min(1e3*2**t,3e4),JM=[520,503],BS=["GET","HEAD","OPTIONS"];var yh=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
256de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function La(t){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(t)}function QM(t,e){if(La(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(La(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function XM(t){var e=QM(t,"string");return La(e)=="symbol"?e:e+""}function e$(t,e,n){return(e=XM(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Ti(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?K0(Object(n),!0).forEach(function(r){e$(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):K0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function G0(t,e){return new Promise(n=>{if(e!=null&&e.aborted){n();return}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",s),n()},t);function s(){clearTimeout(r),n()}e==null||e.addEventListener("abort",s)})}function t$(t,e,n,r){return!(!r||n>=FS||!BS.includes(t)||!JM.includes(e))}var n$=class{constructor(t){var e,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=t.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const c={};n.headers.forEach((h,p)=>{c[p]=h}),o>0&&(c["X-Retry-Count"]=String(o));let u;try{u=await r(n.url.toString(),{method:n.method,headers:c,body:JSON.stringify(n.body,(h,p)=>typeof p=="bigint"?p.toString():p),signal:n.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!BS.includes(n.method))throw h;if(n.retryEnabled&&o<FS){const p=q0(o);o++,await G0(p,n.signal);continue}throw h}if(t$(n.method,u.status,o,n.retryEnabled)){var a,l;const h=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,p=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:q0(o);await u.text(),o++,await G0(p,n.signal);continue}return await n.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const h=o==null?void 0:o.cause;if(h){var p,f,m,y;const g=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",w=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(m=o==null?void 0:o.name)!==null&&m!==void 0?m:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 257 258Caused by: ${(y=h==null?void 0:h.name)!==null&&y!==void 0?y:"Error"}: ${g}`,w&&(l+=` (${w})`),h!=null&&h.stack&&(l+=` 259${h.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const v=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${v} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(c+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
259)),i.then(t,e)}async processResponse(t){var e=this;let n=null,r=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var c;const f=await t.text();if(f!=="")if(e.headers.get("Accept")==="text/csv")r=f;else if(e.headers.get("Accept")&&(!((c=e.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text")))r=f;else try{r=JSON.parse(f)}catch{if(n={message:f},r=null,e.shouldThrowOnError)throw new yh({message:f,details:"",hint:"",code:""})}}const h=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),p=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");if(h&&p&&p.length>1&&(s=parseInt(p[1])),e.isMaybeSingle&&Array.isArray(r))if(r.length>1){if(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable",e.shouldThrowOnError){var u;throw new yh(Ti(Ti({},n),{},{hint:(u=n.hint)!==null&&u!==void 0?u:""}))}}else r.length===1?r=r[0]:r=null}else{const h=await t.text();try{n=JSON.parse(h),Array.isArray(n)&&t.status===404&&(r=[],n=null,i=200,o="OK")}catch{t.status===404&&h===""?(i=204,o="No Content"):n={message:h}}if(n&&e.shouldThrowOnError)throw new yh(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},r$=class extends n${throwOnError(){return super.throwOnError()}select(t){let e=!1;const n=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const Z0=new RegExp("[,()]");var li=class extends r${throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&Z0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&Z0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>
259n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},s$=class{constructor(t,{headers:e={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:r}=e??{},s=n?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new li({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),n||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
2590){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new li({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(c.length>0){const u=[...new Set(c)].map(h=>`"${h}"`);a.searchParams.set("columns",u.join(","))}}return new li({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new li({method:r,url:s,headers:i,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new li({method:n,url:r,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},i$=class US{constructor(e,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const h=new AbortController,p=setTimeout(()=>h.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(p),l(c,u);const m=()=>{clearTimeout(p),h.abort()};return f.addEventListener("abort",m,{once:!0}),l(c,Ti(Ti({},u),{},{signal:h.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",m)})}return l(c,Ti(Ti({},u),{},{signal:h.signal})).finally(()=>clearTimeout(p))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new s$(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new US(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),h=r&&Object.values(n).some(u);h?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([f,m])=>m!==void 0).map(([f,m])=>[f,Array.isArray(m)?`{${m.join(",")}}`:`${m}`]).forEach(([f,m])=>{l.searchParams.append(f,m)})):(a="POST",c=n);const p=new Headers(this.headers);return h?p.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&p.set("Prefer",`count=${i}`),new li({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class o${constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=` 260 261Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const a$="2.112.4",l$=`realtime-js/${a$}`,c$="1.0.0",zS="2.0.0",u$=zS,d$=1e4,h$=100,Pr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},WS={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},ip={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class f${constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,n,r){var s,i;const o=new TextEncoder,a=o.encode(e.topic),l=o.encode((s=e.ref)!==null&&s!==void 0?s:""),c=o.encode((i=e.join_ref)!==null&&i!==void 0?i:""),u=o.encode(e.payload.event),h=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},p=o.encode(Object.keys(h).length===0?"":JSON.stringify(h));if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`metadata length ${p.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+a.length+u.length+p.length,m=new ArrayBuffer(this.HEADER_LENGTH+f),y=new DataView(m),x=new Uint8Array(m);let v=0;y.setUint8(v++,this.KINDS.userBroadcastPush),y.setUint8(v++,c.length),y.setUint8(v++,l.length),y.setUint8(v++,a.length),y.setUint8(v++,u.length),y.setUint8(v++,p.length),y.setUint8(v++,n),x.set(c,v),v+=c.length,x.set(l,v),v+=l.length,x.set(a,v),v+=a.length,x.set(u,v),v+=u.length,x.set(p,v),v+=p.length;var g=new Uint8Array(m.byteLength+r.byteLength);return g.set(new Uint8Array(m),0),g.set(new Uint8Array(r),m.byteLength),g.buffer}decode(e,n){if(this._isArrayBuffer(e)){let r=this._binaryDecode(e);return n(r)}if(typeof e=="string"){const r=JSON.parse(e),[s,i,o,a,l]=r;
261return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(e){const n=new DataView(e),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,n,s)}}_decodeUserBroadcast(e,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(e.slice(l,l+s));l=l+s;const u=r.decode(e.slice(l,l+i));l=l+i;const h=r.decode(e.slice(l,l+o));l=l+o;const p=e.slice(l,e.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(p)):p,m={type:this.BROADCAST_EVENT,event:u,payload:f};return o>0&&(m.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:m}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e==null?void 0:e.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([r])=>n.includes(r)))}}var we;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(we||(we={}));const Y0=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=p$(o,t,e,s),i),{}):{}},p$=(t,e,n,r)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=n[t];return i&&!r.includes(i)?HS(i,o):op(o)},HS=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return v$(e,n)}switch(t){case we.bool:return m$(e);case we.float4:case we.float8:case we.int2:case we.int4:case we.int8:case we.numeric:case we.oid:return g$(e);case we.json:case we.jsonb:return y$(e);case we.timestamp:return w$(e);case we.abstime:case we.date:case we.daterange:case we.int4range:case we.int8range:case we.money:case we.reltime:case we.text:case we.time:case we.timestamptz:case we.timetz:case we.tsrange:case we.tstzrange:return op(e);default:return op(e)}},op=t=>t,m$=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},g$=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},y$=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},v$=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let i;const o=t.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>HS(e,a))}return t},w$=t=>typeof t=="string"?t.replace(" ","T"):t,qS=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Mi=t=>typeof t=="function"?t:function(){return t},x$=typeof self<"u"?self:null,ci=typeof window<"u"?window:null,En=x$||ci||globalThis,b$="2.0.0",_$=1e4,k$=1e3,S$=100,Rn={connecting:0,open:1,closing:2,closed:3},yt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Kn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},ap={longpoll:"longpoll",websocket:"websocket"},E$={complete:4},lp="base64url.bearer.phx.",Vl=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 4,935 bytes, line 261
261matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},KS=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},C$=class{constructor(t,e,n){this.state=yt.closed,this.topic=t,this.params=Mi(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Vl(this,Kn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new KS(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=yt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=yt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=yt.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=yt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Vl(this,Kn.leave,Mi({}),this.timeout).send(),this.state=yt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Kn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=yt.closed,this.bindings=[]}onClose(t){this.on(Kn.close,t)}onError(t){return this.on(Kn.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Vl(this,t,function(){return e},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=yt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Kn.close,"leave")},n=new Vl(this,Kn.leave,Mi({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=yt.joining,this.joinPush.resend(t))}trigger(t,e,n,r){let s=this.onMessage(t,e,n,r);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===t&&this.filterBindings(o,e,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===yt.closed}isErrored(){return this.state===yt.errored}isJoined(){return this.state===yt.joined}isJoining(){return this.state===yt.joining}isLeaving(){return this.state===yt.leaving}}
vendor: 3,200 bytes, line 261
261,du=class{static request(t,e,n,r,s,i,o){if(En.XDomainRequest){let a=new En.XDomainRequest;return this.xdomainRequest(a,t,e,r,s,i,o)}else if(En.XMLHttpRequest){let a=new En.XMLHttpRequest;return this.xhrRequest(a,t,e,n,r,s,i,o)}else{if(En.fetch&&En.AbortController)return this.fetchRequest(t,e,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,r,s,i,o){let a={method:t,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),En.fetch(e,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(t,e,n,r,s,i,o){return t.timeout=s,t.open(e,n),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,n,r,s,i,o,a){t.open(e,n,!0),t.timeout=i;for(let[l,c]of Object.entries(r))t.setRequestHeader(l,c);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===E$.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let s=e?`${e}[${r}]`:r,i=t[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},T$=t=>{let e="",n=new Uint8Array(t),r=n.byteLength;for(let s=0;s<r;s++)e+=String.fromCharCode(n[s]);return btoa(e)},ri=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(lp)&&(this.authToken=atob(e[1].slice(lp.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Rn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+ap.websocket),"$1/"+ap.longpoll)}endpointURL(){return du.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=Rn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Rn.open||this.readyState===Rn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:r,messages:s}=e;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Rn.open,this.onopen({}),this.poll();break;
vendor: 13,756 bytes, lines 261-262
261case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(t){typeof t!="string"&&(t=T$(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t,e=0){this.awaitingBatchAck=!0;const n=e+S$,r=t.slice(e,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join(` 262`),()=>this.onerror("timeout"),s=>{!s||s.status!==200?(this.awaitingBatchAck=!1,this.onerror(s&&s.status),this.closeAndRetry(1011,"internal server error",!1)):n<t.length?this.batchSend(t,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(t,e,n){for(let s of this.reqs)s.abort();this.readyState=Rn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=du.request(t,this.endpointURL(),e,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},A$=class Wo{constructor(e,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Wo.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Wo.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Wo.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Wo.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,r,s){let i=this.toNullProtoObj(this.clone(e));n=this.toNullProtoObj(n);let o=Object.create(null),a=Object.create(null);return this.map(i,(l,c)=>{n[l]||(a[l]=c)}),this.map(n,(l,c)=>{let u=i[l];if(u){let h=c.metas.map(y=>y.phx_ref),p=u.metas.map(y=>y.phx_ref),f=c.metas.filter(y=>p.indexOf(y.phx_ref)<0),m=u.metas.filter(y=>h.indexOf(y.phx_ref)<0);f.length>0&&(o[l]=c,o[l].metas=f),m.length>0&&(a[l]=this.clone(u),a[l].metas=m)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(e,n,r,s){e=this.toNullProtoObj(e);let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=e[a];if(e[a]=this.clone(l),c){let u=e[a].metas.map(p=>p.phx_ref),h=c.metas.filter(p=>u.indexOf(p.phx_ref)<0);e[a].metas.unshift(...h)}r(a,c,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;let u=l.metas.map(h=>h.phx_ref);c.metas=c.metas.filter(h=>u.indexOf(h.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete e[a]}),e}static list(e,n){return n||(n=function(r,s){return s}),this.map(e,(r,s)=>n(r,s))}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let n=Object.create(null);return Object.getOwnPropertyNames(e).forEach(r=>{n[r]=e[r]}),n}static clone(e){return JSON.parse(JSON.stringify(e))}},Fl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,s,i,o]=JSON.parse(t);return e({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:s,payload:i}=t,o=new TextEncoder,a=o.encode(e),l=o.encode(n),c=o.encode(s),u=o.encode(r);this.assertFieldSize(a.byteLength,"join_ref"),this.assertFieldSize(l.byteLength,"ref"),this.assertFieldSize(c.byteLength,"topic"),this.assertFieldSize(u.byteLength,"event");let h=this.META_LENGTH+a.byteLength+l.byteLength+c.byteLength+u.byteLength,p=new ArrayBuffer(this.HEADER_LENGTH+h),f=new Uint8Array(p),m=new DataView(p),y=0;m.setUint8(y++,this.KINDS.push),m.setUint8(y++,a.byteLength),m.setUint8(y++,l.byteLength),m.setUint8(y++,c.byteLength),m.setUint8(y++,u.byteLength),f.set(a,y),y+=a.byteLength,f.set(l,y),y+=l.byteLength,f.set(c,y),y+=c.byteLength,f.set(u,y),y+=u.byteLength;var x=new Uint8Array(p.byteLength+i.byteLength);return x.set(f,0),x.set(new Uint8Array(i),p.byteLength),x.buffer},assertFieldSize(t,e){if(t>255)throw new Error(`unable to convert ${e} to binary: must be less than or equal to 255 bytes, but is ${t} bytes`)},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(t.slice(o,o+r));o=o+r;let l=n.decode(t.slice(o,o+s));o=o+s;let c=n.decode(t.slice(o,o+i));o=o+i;let u=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(t.slice(a,a+r));a=a+r;let c=n.decode(t.slice(a,a+s));a=a+s;let u=n.decode(t.slice(a,a+i));a=a+i;let h=n.decode(t.slice(a,a+o));a=a+o;let p=t.slice(a,t.byteLength),f={status:h,response:p};return{join_ref:l,ref:c,topic:u,event:Kn.reply,payload:f}},decodeBroadcast(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(t.slice(i,i+r));i=i+r;let a=n.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},P$=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||_$,this.transport=e.transport||En.WebSocket||ri,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=En&&En.sessionStorage}catch{}this.sessionStore=e.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Fl.encode.bind(Fl),this.defaultDecoder=Fl.decode.bind(Fl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ri?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;ci&&ci.addEventListener&&(ci.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),ci.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),ci.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Mi(e.params||{}),this.endPoint=`${t}/${ap.websocket}`,this.vsn=e.vsn||b$,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new KS(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken&&Mi(e.authToken)}getLongPollTransport(){return ri}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=du.appendParams(du.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Mi(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ri?this.connectWithFallback(ri,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(s=>{s.ref===e&&(this.off([r]),t(Date.now()-n))});return!0}transportName(t){switch(t){case ri:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${lp}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),k$,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const r=this.conn;this.waitForBufferDone(r,()=>{e?r.close(e,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===Rn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError(t)}
vendor: 4,245 bytes, line 262
262triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Kn.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Rn.connecting:return"connecting";case Rn.open:return"open";case Rn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new C$(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:s,join_ref:i}=t;this.log("push",`${e} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=e;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,r])=>{try{r(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class la{constructor(e,n){const r=j$(n);this.presence=new A$(e.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=la.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=la.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return la.transformState(this.presence.state)}static transformState(e){return e=R$(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return n[r]=vc(s),n},{})}static onJoinPayload(e,n,r){const s=J0(n),i=vc(r);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,n,r){const s=J0(n),i=vc(r);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function vc(t){return t.metas.map(e=>{const n=Object.getOwnPropertyDescriptors(e),r=Object.defineProperties({},n);return r.presence_ref=r.phx_ref,delete r.phx_ref,delete r.phx_ref_prev,r})}function R$(t){return JSON.parse(JSON.stringify(t))}function j$(t){return(t==null?void 0:t.events)&&{events:t.events}}function J0(t){return t!=null&&t.metas?vc(t):[]}var Q0;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Q0||(Q0={}));class N${get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new la(this.channel.channelAdapter,n)}}function O$(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
262if(typeof e.code=="number"){const n=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${n}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class I${constructor(e,n,r){const s=L$(r);this.channel=e.getSocket().channel(n,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,r){let s;try{s=this.channel.push(e,n,r)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>h$){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===Pr.joined}isJoined(){return this.state===Pr.joined}isJoining(){return this.state===Pr.joining}isClosed(){return this.state===Pr.closed}isLeaving(){return this.state===Pr.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function L$(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}const D$=/[,()"\\]/,M$=t=>D$.test(t)||t!==t.trim(),$$=t=>`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,X0=t=>{const e=t===null?"null":String(t);return M$(e)?$$(e):e},V$=t=>t===null?"null":String(t),F$=(t,e)=>{if(t==="in"){const n=Array.isArray(e)?e:[e];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(s=>X0(s)).join(",")})`}return t==="is"?`is.${V$(e)}`:`${t}.${X0(e)}`};class B${constructor(){this.filters=[]}add(e,n,r,s=!1){const i=s?"not.":"";return this.filters.push(`${e}=${i}${F$(n,r)}`),this}eq(e,n){return this.add(e,"eq",n)}neq(e,n){return this.add(e,"neq",n)}gt(e,n){return this.add(e,"gt",n)}gte(e,n){return this.add(e,"gte",n)}lt(e,n){return this.add(e,"lt",n)}lte(e,n){return this.add(e,"lte",n)}in(e,n){return this.add(e,"in",n)}like(e,n){return this.add(e,"like",n)}ilike(e,n){return this.add(e,"ilike",n)}match(e,n){return this.add(e,"match",n)}imatch(e,n){return this.add(e,"imatch",n)}is(e,n){return this.add(e,"is",n)}isDistinct(e,n){return this.add(e,"isdistinct",n)}not(e,n,r){return this.add(e,n,r,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var ew;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(ew||(ew={}));var xs;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(xs||(xs={}));var Gn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Gn||(Gn={}));class Zn{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,n={config:{}},r){var s,i;if(this.topic=e,this.params=n,this.socket=r,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new I$(this.socket.socketAdapter,e,this.params),this.presence=new N$(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=qS(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[xs.PRESENCE]&&this.bindings[xs.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>{e==null||e(Gn.CHANNEL_ERROR,O$(f))}),this._onClose(()=>e==null?void 0:e(Gn.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){e==null||e(Gn.SUBSCRIBED);return}this._updatePostgresBindings(f,e)}).receive("error",f=>{this.state=Pr.errored;const m=Object.values(f).join(", ")||"error";e==null||e(Gn.CHANNEL_ERROR,new Error(m,{cause:f}))}).receive("timeout",()=>{e==null||e(Gn.TIMED_OUT)})}return this}_updatePostgresBindings(e,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:u,table:h,filter:p}}=l,f=e&&e[a];if(f&&f.event===c&&Zn.isFilterValueEqual(f.schema,u)&&Zn.isFilterValueEqual(f.table,h)&&Zn.isFilterValueEqual(f.filter,p))o.push(Object.assign(Object.assign({},l),{id:f.id}));
262else{this.unsubscribe(),this.state=Pr.errored,n==null||n(Gn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Pr.errored&&n&&n(Gn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===xs.PRESENCE||e===xs.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,r)}async httpSend(e,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=n instanceof ArrayBuffer||ArrayBuffer.isView(n),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set("private","true");const l={method:"POST",headers:o,body:i?n:JSON.stringify(n)},c=await this._fetchWithTimeout(a.toString(),l,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(c.status===202)return{success:!0};if(c.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let u=c.statusText;try{const h=await c.json();u=h.error||h.message||u}catch{}return Promise.reject(new Error(u))}async send(e,n={}){var r,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){const i="Realtime send() is automatically falling back to REST API. This behavior will be deprecated
262in the future. Please use httpSend() explicitly for REST delivery.";this.socket.hasLogger()?this.socket.log("channel",i):console.warn(i);const{event:o,payload:a}=e,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(e,n,r){var s;const i=e.toLocaleLowerCase(),o=n==null?void 0:n.filter;if((o instanceof B$||typeof o=="object"&&o!==null&&typeof o.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:o.build()})),i===xs.POSTGRES_CHANGES&&((s=this.bindings[i])===null||s===void 0?void 0:s.find(u=>Zn.isSamePostgresFilter(u.filter,n))))return this.socket.log("error",`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,n),this;const a=this.channelAdapter.on(e,r),l={type:i,filter:n,callback:r,ref:a};return this.bindings[i]?this.bindings[i].push(l):this.bindings[i]=[l],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,r)=>{var s,i,o,a,l,c,u;const h=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,r))return!1;const p=(s=this.bindings[h])===null||s===void 0?void 0:s.find(f=>f.ref===e.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in p){const f=p.id,m=(i=p.filter)===null||i===void 0?void 0:i.event;return f&&((o=n.ids)===null||o===void 0?void 0:o.includes(f))&&(m==="*"||(m==null?void 0:m.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(c=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===h})}_notThisChannelEvent(e,n){const{close:r,error:s,leave:i,join:o}=WS;return n&&[r,s,i,o].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const r of e.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}static isSamePostgresFilter(e,n){var r,s,i,o;const a=(s=(r=e==null?void 0:e.select)===null||r===void 0?void 0:r.join())!==null&&s!==void 0?s:void 0,l=(o=(i=n==null?void 0:n.select)===null||i===void 0?void 0:i.join())!==null&&o!==void 0?o:void 0;return(e==null?void 0:e.event)===(n==null?void 0:n.event)&&Zn.isFilterValueEqual(e==null?void 0:e.sc
262hema,n==null?void 0:n.schema)&&Zn.isFilterValueEqual(e==null?void 0:e.table,n==null?void 0:n.table)&&Zn.isFilterValueEqual(e==null?void 0:e.filter,n==null?void 0:n.filter)&&a===l}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=Y0(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=Y0(e.columns,e.old_record)),n}}class U${constructor(e,n){this.socket=new P$(e,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},n,r)})}push(e){this.socket.push(e)}log(e,n,r){this.socket.log(e,n,r)}hasLogger(){return this.socket.hasLogger()}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==ip.connecting}isDisconnecting(){return this.socket.connectionState()==ip.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const tw={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},z$=[1e3,2e3,5e3,1e4],W$=1e4;function H$(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var n;return(n=Array.from(t.keys())[e])!==null&&n!==void 0?n:null},removeItem(e){t.delete(e)},setItem(e,n){t.set(e,String(n))}}}function q$(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return H$()}const K$=` 263 addEventListener("message", (e) => { 264 if (e.data.event === "start") { 265 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 266 } 267 });`;class G${get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new f$,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);
267this.socketAdapter=new U$(e,s),this.httpEndpoint=qS(e),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const n=e.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),n}async removeAllChannels(){const e=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(e);return await this.disconnect(),n}log(e,n,r){this.socketAdapter.log(e,n,r)}hasLogger(){return this.socketAdapter.hasLogger()}connectionState(){return this.socketAdapter.connectionState()||ip.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Zn(`realtime:${e}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){const n=++this._authGeneration,r=this._performAuth(e,n);n===this._authGeneration&&(this._authPromise=r);try{await r}finally{this._authPromise===r&&(this._authPromise=null)}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
267this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e,n){let r,s=!1;if(e)r=e,s=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),r=this.accessTokenValue}else r=this.accessTokenValue;n===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:s&&(this._manuallySetToken=!0),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(i=>{const o={access_token:r,version:l$};i.updateJoinPayload(o),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(WS.access_token,{access_token:r})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,r)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),e&&e(n,r))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([K$],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(e){var n,r,s,i,o,a,l,c,u,h,p,f;this.worker=(n=e==null?void 0:e.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=e==null?void 0:e.accessToken)!==null&&r!==void 0?r:null;const m={};m.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:d$,m.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:tw.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:tw.HEARTBEAT_INTERVAL),m.transport=(l=e==null?void 0:e.transport)!==null&&l!==void 0?l:o$.getWebSocketConstructor(),m.params=e==null?void 0:e.params,m.logger=e==null?void 0:e.logger,m.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),m.sessionStorage=(c=e==null?void 0:e.sessionStorage)!==null&&c!==void 0?c:q$(),m.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:g=>z$[g-1]||W$;let y,x;const v=(h=e==null?void 0:e.vsn)!==null&&h!==void 0?h:u$;switch(v){case c$:y=(g,w)=>w(JSON.stringify(g)),x=(g,w)=>w(JSON.parse(g));break;case zS:y=this.serializer.encode.bind(this.serializer),x=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${m.vsn}`)}if(m.vsn=v,m.encode=(p=e==null?void 0:e.encode)!==null&&p!==void 0?p:y,m.decode=(f=e==null?void 0:e.decode)!==null&&f!==void 0?f:x,m.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,m.params=Object.assign(Object.assign({},m.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,m.autoSendHeartbeat=!this.worker}return m}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
267var Da=class extends Error{constructor(t,e){var n;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((n=e.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Z$(t,e,n){const r=new URL(e,t);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function Y$(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function J$(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=Z$(t.baseUrl,r,s),l=await Y$(t.auth),c=await e(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),h=(c.headers.get("content-type")||"").includes("application/json"),p=h&&u?JSON.parse(u):u;if(!c.ok){const f=h?p:void 0,m=f==null?void 0:f.error;throw new Da((m==null?void 0:m.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:m==null?void 0:m.type,icebergCode:m==null?void 0:m.code,details:f})}return{status:c.status,headers:c.headers,data:p}}}}function Bl(t){return t.join("�")}var Q$=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Bl(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Bl(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Bl(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Bl(t.namespace)}`}),!0}catch(e){if(e instanceof Da&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof Da&&n.status===409)return;throw n}}};function si(t){return t.join("�")}var X$=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${si(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${si(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${si(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${si(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${si(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${si(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof Da&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof Da&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},e4=class{constructor(t){var r;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=J$({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(r=t.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new Q$(this.client,e),this.tableOps=new X$(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
267async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Ma(t){"@babel/helpers - typeof";return Ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ma(t)}function t4(t,e){if(Ma(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ma(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function n4(t){var e=t4(t,"string");return Ma(e)=="symbol"?e:e+""}function r4(t,e,n){return(e=n4(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nw(Object(n),!0).forEach(function(r){r4(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nw(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ud=class extends Error{constructor(t,e="storage",n,r){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function dd(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var cp=class extends ud{constructor(t,e,n,r="storage",s){super(t,r,e,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n,this.code=s}toJSON(){return Y(Y({},super.toJSON()),{},{code:this.code})}},GS=class extends ud{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function hu(t,e,n){const r=Y({},t),s=e.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function s4(t){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;return e}const i4=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),o4=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},up=t=>{if(Array.isArray(t))return t.map(n=>up(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=up(r)}),e},a4=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),ZS=t=>t.split("/").map(encodeURIComponent).join("/"),rw=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const n=e.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(t)},l4=async(t,e,n,r)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const s=t;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new cp(rw(o),i,a,r,o==null?void 0:o.code))}).catch(()=>{const o=i+"";e(new cp(s.statusText||`HTTP ${i} error`,i,o,r))})}else e(new GS(rw(t),t,r))},c4=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!r)return Y(Y({},s),n);if(o4(r)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=hu(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return e!=null&&e.duplex&&(s.duplex=e.duplex),Y(Y({},s),n)};async function Do(t,e,n,r,s,i,o){return new Promise((a,l)=>
267{t(n,c4(e,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>l4(c,l,r,o))})}function YS(t="storage"){return{get:async(e,n,r,s)=>Do(e,"GET",n,r,s,void 0,t),post:async(e,n,r,s,i)=>Do(e,"POST",n,s,i,r,t),put:async(e,n,r,s,i)=>Do(e,"PUT",n,s,i,r,t),head:async(e,n,r,s)=>Do(e,"HEAD",n,Y(Y({},r),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,n,r,s,i)=>Do(e,"DELETE",n,s,i,r,t)}}const u4=YS("storage"),{get:$a,post:cn,put:dp,head:d4,remove:Va}=u4,Pt=YS("vectors");var _o=class{constructor(t,e={},n,r="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=s4(e),this.fetch=i4(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=hu(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(dd(n))return{data:null,error:n};throw n}}};let JS;JS=Symbol.toStringTag;var h4=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[JS]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(dd(e))return{data:null,error:e};throw e}}};let QS;QS=Symbol.toStringTag;var f4=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[QS]="BlobDownloadBuilder",this.promise=null}asStream(){return new h4(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(dd(e))return{data:null,error:e};throw e}}};const vh={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},sw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var p4=class extends _o{constructor(t,e={},n,r){super(t,e,r,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=Y(Y({},sw),r);let a=Y(Y({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[p,f]of Object.entries(r.headers))a=hu(a,p,f);const c=s._removeEmptyFolders(e),u=s._getFinalPath(c),h=await(t=="PUT"?dp:cn)(s.fetch,`${s.url}/object/${u}`,i,Y({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:h.Id,fullPath:h.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,r){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const c=Y(Y({},sw),r);let u=Y(Y({},s.headers),{"x-upsert":String(c.upsert)});const h=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),h&&l.append("metadata",s.encodeMetadata(h)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),h&&!l.has("metadata")&&l.a
267ppend("metadata",s.encodeMetadata(h))):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType,h&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(h))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),r!=null&&r.headers)for(const[p,f]of Object.entries(r.headers))u=hu(u,p,f);return{path:i,fullPath:(await dp(s.fetch,a.toString(),l,Y({headers:u},c!=null&&c.duplex?{duplex:c.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(t);const s=Y({},n.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await cn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new ud("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var r=this;return r.handleOperation(async()=>await cn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(t,e,n){var r=this;return r.handleOperation(async()=>({path:(await cn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(t,e,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(t);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await cn(r.fetch,`${r.url}/object/sign/${s}`,Y({expiresIn:e},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,n){var r=this;return r.handleOperation(async()=>{const s=await cn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:e,paths:t},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>Y(Y({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(t,e,n){const r=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),o=this._getFinalPath(t),a=()=>$a(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new f4(a,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>up(await $a(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await d4(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(dd(s)){var r;const i=s instanceof cp?s.status:s instanceof GS?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(t,e){const n=this._getFinalPath(t),r=new URLSearchParams;e!=null&&e.download&&r.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(r,e.transform),(e==null?void 0:e.cacheNonce)!=null&&r.set("cacheNonce",String(e.cacheNonce));const s=r.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Va(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async purgeCache(t,e,n){var r=this;return r.handleOperation(async()=>{const s=ZS(r._getFinalPath(t)),i=new URLSearchParams;e!=null&&e.transformations&&i.set("transformations","true");const o=i.toString();return await Va(r.fetch,`${r.url}/cdn/${s}${o?`?${o}`:""}`,{},{headers:r.headers},n)})}async list(t,e,n){var r=this;return r.handleOperation(async()=>{const s=e!=null&&e.sortBy?Y(Y({},vh.sortBy),e.sortBy):vh.sortBy,i=Y(Y(Y({},vh),e),{},{sortBy:s,prefix:t||""});return await cn(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const r=Y({},t);return await cn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
267ity",e.quality.toString()),t}};const m4="2.112.4",il={"X-Client-Info":`storage-js/${m4}`};var g4=class extends _o{constructor(t,e={},n,r){const s=new URL(t);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=Y(Y({},il),e);super(i,o,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await $a(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await $a(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await cn(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await dp(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await cn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Va(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}async purgeBucketCache(t,e,n){var r=this;return r.handleOperation(async()=>{const s=new URLSearchParams;e!=null&&e.transformations&&s.set("transformations","true");const i=s.toString();return await Va(r.fetch,`${r.url}/cdn/${ZS(t)}${i?`?${i}`:""}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},y4=class extends _o{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=Y(Y({},il),e);super(r,s,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await cn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&n.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&n.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&n.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&n.set("sortOrder",t.sortOrder),t!=null&&t.search&&n.set("search",t.search);const r=n.toString(),s=r?`${e.url}/bucket?${r}`:`${e.url}/bucket`;return await $a(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Va(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!a4(t))throw new ud("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new e4({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},v4=class extends _o{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=Y(Y({},il),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await Pt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await Pt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},w4=class extends _o{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=Y(Y({},il),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
267if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},x4=class extends _o{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=Y(Y({},il),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Pt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},b4=class extends x4{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new _4(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},_4=class extends v4{constructor(t,e,n,r){super(t,e,r),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,Y(Y({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,Y(Y({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new k4(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},k4=class extends w4{constructor(t,e,n,r,s){super(t,e,s),this.vectorBucketName=n,this.indexName=r}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,Y(Y({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,Y(Y({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,Y(Y({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,Y(Y({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,Y(Y({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},S4=class extends g4{constructor(t,e={},n,r){super(t,e,n,r)}from(t){return new p4(this.url,this.headers,t,this.fetch)}get vectors(){return new b4(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new y4(this.url+"/iceberg",this.headers,this.fetch)}};function hd(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}const XS="2.112.4",Yn=30*1e3,Ho=3,wh=Ho*Yn,E4=2*Yn,C4="http://localhost:9999",T4="supabase.auth.token",A4={"X-Client-Info":`gotrue-js/${XS}`},hp="X-Supabase-Api-Version",eE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},P4=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Cs="sb_flow_id",R4=5,j4=10*60*1e3;
267class Fa extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function F(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class N4 extends Fa{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function iw(t){return F(t)&&t.name==="AuthApiError"}class pn extends Fa{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class Fn extends Fa{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class qe extends Fn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ul(t){return F(t)&&t.name==="AuthSessionMissingError"}class ii extends Fn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class zl extends Fn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Wl extends Fn{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function O4(t){return F(t)&&t.name==="AuthImplicitGrantRedirectError"}class ow extends Fn{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class I4 extends Fn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class wc extends Fn{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Hl(t){return F(t)&&t.name==="AuthRetryableFetchError"}class aw extends Fn{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function L4(t){return F(t)&&t.name==="AuthRefreshDiscardedError"}class lw extends Fn{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class fu extends Fn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const pu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),cw=` 268\r=`.split(""),D4=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<cw.length;e+=1)t[cw[e].charCodeAt(0)]=-2;for(let e=0;e<pu.length;e+=1)t[pu[e].charCodeAt(0)]=e;return t})();function uw(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(pu[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(pu[r]),e.queuedBits-=6}}function tE(t,e,n){const r=D4[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function dw(t){const e=[],n=o=>{e.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{V4(o,r,n)};for(let o=0;o<t.length;o+=1)tE(t.charCodeAt(o),s,i);return e.join("")}function M4(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function $4(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}M4(r,e)}}function V4(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function $i(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)tE(t.charCodeAt(s),n,r);return new Uint8Array(e)}
268function F4(t){const e=[];return $4(t,n=>e.push(n)),new Uint8Array(e)}function Ts(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>uw(s,n,r)),uw(null,n,r),e.join("")}function B4(t){return Math.round(Date.now()/1e3)+t}function U4(){return Symbol("auth-callback")}const Ze=()=>typeof window<"u"&&typeof document<"u",ps={tested:!1,writable:!1},nE=()=>{if(!Ze())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ps.tested)return ps.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),ps.tested=!0,ps.writable=!0}catch{ps.tested=!0,ps.writable=!1}return ps.writable};function hw(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const rE=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),z4=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Xn=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},ot=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return null}},xt=async(t,e)=>{await t.removeItem(e)};class fd{constructor(){this.promise=new fd.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}fd.promiseConstructor=Promise;function ql(t){const e=t.split(".");if(e.length!==3)throw new fu("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!P4.test(e[r]))throw new fu("JWT not in base64url format");return{header:JSON.parse(dw(e[0])),payload:JSON.parse(dw(e[1])),signature:$i(e[2]),raw:{header:e[0],payload:e[1]}}}async function W4(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function H4(t,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function sE(t){return("0"+t.toString(16)).substr(-2)}function q4(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(e),Array.from(e,sE).join("")}async function K4(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function G4(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const n=await K4(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const Z4=/^[a-zA-Z0-9_-]{8,64}$/;function xc(t){return typeof t=="string"&&Z4.test(t)?t:null}function Y4(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,sE).join("")}let t="";for(let e=0;e<32;e++)t+=Math.floor(Math.random()*16).toString(16);return t}const io=(t,e)=>`${t}-flow-${e}-code-verifier`,Ba=t=>`${t}-flows-code-verifier`;async function dg(t,e){const n=await ot(t,Ba(e));return Array.isArray(n)?n.filter(r=>xc(r)!==null):[]}async function J4(t,e,n,r,s){await Xn(t,io(e,n),r);const i=(await dg(t,e)).filter(o=>o!==n);for(i.push(n);i.length>R4;){const o=i.shift();await xt(t,io(e,o)),s==null||s(o)}await Xn(t,Ba(e),i),await Xn(t,`${e}-code-verifier`,r)}async function Q4(t,e,n){if(n){const s=await ot(t,io(e,n));return{verifier:typeof s=="string"?s:null,flowId:n}}const r=await ot(t,`${e}-code-verifier`);return{verifier:typeof r=="string"?r:null,flowId:null}}async function rn(t,e,n){const r=`${e}-code-verifier`;if(!n){await xt(t,r);return}const s=io(e,n),i=await ot(t,s);await xt(t,s);const o=await dg(t,e),a=o.filter(l=>l!==n);a.length!==o.length&&(a.length>0?await Xn(t,Ba(e),a):await xt(t,Ba(e))),i!=null&&i===await ot(t,r)&&await xt(t,r)}async function X4(t,e){const n=await dg(t,e);for(const r of n)await xt(t,io(e,r));await xt(t,Ba(e)),await xt(t,`${e}-code-verifier`)}function eV(t,e){const n=t.indexOf("#");let r=n===-1?t:t.slice(0,n);const s=n===-1?"":t.slice(n),i=r.indexOf("?");if(i!==-1){const a=r.slice(0,i),l=r.slice(i+1).split("&").filter(c=>c!==""&&c!==Cs&&!c.startsWith(`${Cs}=`));r=l.length>0?`${a}?${l.join("&")}`:a}const o=r.includes("?")?"&":"?";return`${r}${o}${Cs}=${encodeURIComponent(e)}${s}`}async function tV(t,e,n=!1,r){const s=q4();let i=s;n&&(i+="/recovery");const o=Y4();await J4(t,e,o,i,r);const a=await G4(s);return[a,s===a?"plain":"s256",o]}const nV=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function rV(t){const e=t.headers.get(hp);if(!e||!e.match(nV))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function sV(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function iV(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const oV=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Un(t){if(!oV.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function on(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function xh(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;
268if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function aV(t,e){return new Proxy(t,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!e.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(n,r,s)}})}function fw(t){return JSON.parse(JSON.stringify(t))}const ws=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},pw=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function mw(t){var e;if(!z4(t))throw new wc(ws(t),0);let n;try{n=await t.json()}catch(i){throw pw.includes(t.status)?new wc(t.statusText||`HTTP ${t.status}`,t.status):new pn(ws(i),i)}if(pw.includes(t.status))throw new wc(ws(n),t.status);let r;const s=rV(t);if(s&&s.getTime()>=eE["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 lw(ws(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new qe}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new lw(ws(n),t.status,n.weak_password.reasons);throw new N4(ws(n),t.status||500,r)}const lV=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function H(t,e,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[hp]||(i[hp]=eE["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await cV(t,e,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function cV(t,e,n,r,s,i){const o=lV(e,r,s,i);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw new wc(ws(l),0)}if(a.ok||await mw(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await mw(l)}}function Vt(t){var e;let n=null;hV(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=B4(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:typeof(t==null?void 0:t.id)=="string"?t:null;return{data:{session:n,user:r},error:null}}function gw(t){const e=Vt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Rr(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function uV(t){return{data:t,error:null}}function dV(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=t,o=hd(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function yw(t){return t}function hV(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const bh=["global","local","others"];class fV{constructor({url:e="",headers:n={},fetch:r,experimental:s}){this.url=e,this.headers=n,this.fetch=rE(r),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,n=bh[0]){if(bh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${bh.join(", ")}`);try{return await H(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await H(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Rr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=hd(e,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await H(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:dV,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(F(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await H(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Rr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await H(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:yw});if(u.error)throw u.error;const h=await u.json(),p=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(m=>{const y=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(m.split(";")[1].split("=")[1]);c[`${x}Page`]=y}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(F(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){Un(e);try{return await H(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Rr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Un(e);try{return await H(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Rr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Un(e);
268try{return await H(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Rr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Un(e.userId);try{const{data:n,error:r}=await H(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(F(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Un(e.userId),Un(e.id);try{return{data:await H(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await H(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:yw});if(u.error)throw u.error;const h=await u.json(),p=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(m=>{const y=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(m.split(";")[1].split("=")[1]);c[`${x}Page`]=y}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(F(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await H(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await H(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await H(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await H(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await H(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e!=null&&e.type&&(n.type=e.type),await H(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(F(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await H(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await H(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await H(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(e){try{return await H(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}async _adminListPasskeys(e){on(this.experimental),Un(e.userId);try{return await H(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(e){on(this.experimental),Un(e.userId),Un(e.passkeyId);
268try{return await H(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}}function vw(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}globalThis&&nE()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class pV extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function mV(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function iE(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function gV(t){return parseInt(t,16)}function yV(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function vV(t){var e;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:h,version:p}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 269`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const f=iE(t.address),m=u?`${u}://${r}`:r,y=t.statement?`${t.statement} 270`:"",x=`${m} wants you to sign in with your Ethereum account: 271${f} 272 273${y}`;let v=`URI: ${h} 274Version: ${p} 275Chain ID: ${n}${o?` 276Nonce: ${o}`:""} 277Issued At: ${i.toISOString()}`;if(s&&(v+=` 278Expiration Time: ${s.toISOString()}`),a&&(v+=` 279Not Before: ${a.toISOString()}`),l&&(v+=` 280Request ID: ${l}`),c){let g=` 281Resources:`;for(const w of c){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);g+=` 282- ${w}`}v+=g}return`${x} 283${v}`}class $e extends Error{constructor({message:e,code:n,cause:r,name:s}){var i;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class mu extends $e{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function wV({error:t,options:e}){var n,r,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new $e({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new $e({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new $e({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new $e({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new $e({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new $e({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new $e({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new $e({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(oE(o)){if(i.rp.id!==o)return new $e({message:`The RP ID "${i.rp.id}
283" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new $e({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new $e({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new $e({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new $e({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function xV({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new $e({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new $e({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(oE(r)){if(n.rpId!==r)return new $e({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new $e({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new $e({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new $e({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class bV{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const fp=new bV;function ww(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:r}=t,s=hd(t,["challenge","user","excludeCredentials"]),i=$i(e).buffer,o=Object.assign(Object.assign({},n),{id:$i(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:$i(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function xw(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,r=hd(t,["challenge","allowCredentials"]),s=$i(e).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:$i(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function bw(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:Ts(new Uint8Array(t.response.attestationObject)),clientDataJSON:Ts(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function _w(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,r=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Ts(new Uint8Array(s.authenticatorData)),clientDataJSON:Ts(new Uint8Array(s.clientDataJSON)),signature:Ts(new Uint8Array(s.signature)),userHandle:s.userHandle?Ts(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function oE(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function gu(){var t,e;return!!(Ze()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function aE(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new mu("Browser returned unexpected credential type",e)}:{data:null,error:new mu("Empty credential response",e)}}catch(e){return{data:null,error:wV({error:e,options:t})}}}async function lE(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new mu("Browser returned unexpected credential type",e)}:{data:null,error:new mu("Empty credential response",e)}}catch(e){return{data:null,error:xV({error:e,options:t})}}}const _V={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},kV={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function yu(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(e(o)){const a=r[i];e(a)?r[i]=yu(a,o):r[i]=yu(o)}else r[i]=o}return r}function SV(t,e){return yu(_V,t,e||{})}function EV(t,e){return yu(kV,t,e||{})}class CV{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!a)return{data:null,error:l};const c=s??fp.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const h=r;if(h)u.name=`${u.id}:${h}`;else{const f=(await this.client.getUser()).data.user,m=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${m}`}}u.displayName||(u.displayName=u.name)}
283switch(a.webauthn.type){case"create":{const u=SV(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:p}=await aE({publicKey:u,signal:c});return h?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}case"request":{const u=EV(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:p}=await lE(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return h?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}}}catch(a){return F(a)?{data:null,error:a}:{data:null,error:new pn("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Fa("rpId is required for WebAuthn authentication")};try{if(!gu())return{data:null,error:new pn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return F(o)?{data:null,error:o}:{data:null,error:new pn("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Fa("rpId is required for WebAuthn registration")};try{if(!gu())return{data:null,error:new pn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(u=>{var h;return(h=u.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===e&&p.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return F(o)?{data:null,error:o}:{data:null,error:new pn("Unexpected error in register",o)}}}}mV();const TV={url:C4,storageKey:T4,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:A4,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},oi={};let kw=!1;class Ua{get jwks(){var e,n;return(n=(e=oi[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){oi[this.storageKey]=Object.assign(Object.assign({},oi[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=oi[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){oi[this.storageKey]=Object.assign(Object.assign({},oi[this.storageKey]),{cachedAt:e})}constructor(e){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},TV),e);if(this.storageKey=i.storageKey,this.instanceID=(n=Ua.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ua.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Ze()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.experimental=(r=i.experimental)!==null&&r!==void 0?r:{},this.admin=new fV({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=rE(i.fetch),this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock!=null&&(this.lock=i.lock,kw||(kw=!0,console.warn(`${this._logPrefix()} The "lock" option is deprecated and will be removed in v3. The client now coordinates session refreshes without a lock, so most apps can drop the option. See https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/migrations/lockless-coordination.md`))),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new CV(this)}
283,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:nE()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=vw(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=vw(this.memoryStorage)),Ze()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${XS}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){var e;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const n=await this.initializePromise,r=(e=this._pendingInitNotifications)!==null&&e!==void 0?e:[];this._pendingInitNotifications=null;for(const s of r)await this._notifyAllSubscribers(s.event,s.session,s.broadcast);return n}async _initialize(){var e;try{let n={},r="none";if(Ze()&&(n=hw(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Ze()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),O4(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return F(n)?this._returnResult({error:n}):this._returnResult({error:new pn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:Vt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var n,r,s;let i=null;try{let o;if("email"in e){const{email:h,password:p,options:f}=e;let m=null,y=null;this.flowType==="pkce"&&([m,y,i]=await this._getCodeChallengeAndMethod()),o=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(f==null?void 0:f.emailRedirectTo,i),body:{email:h,password:p,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:m,code_challenge_method:y},xform:Vt})}else if("phone"in e){const{phone:h,password:p,options:f}=e;o=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:h,password:p,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Vt})}else throw new zl("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return await rn(this.storage,this.storageKey,i),this._returnResult({data:{user:null,session:null},error:l});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(o){if(await rn(this.storage,this.storageKey,i),F(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(e){try{let n;if("email"in e){const{email:i,password:o,options:a}=e;n=await H(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:gw})}else if("phone"in e){const{phone:i,password:o,options:a}=e;n=await H(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:gw})}else throw new zl("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new ii;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(F(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,r,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e,n){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e,n)):this._exchangeCodeForSession(e,n)}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,s,i,o,a,l,c,u,h,p;let f,m;if("message"in e)f=e.message,m=e.signature;else{const{chain:y,wallet:x,statement:v,options:g}=e;let w;if(Ze())if(typeof x=="object")w=x;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")w=A.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=x}const _=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href),k=await w.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=iE(k[0]);let E=(r=g==null?void 0:g.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const A=await w.request({method:"eth_chainId"});E=gV(A)}const C={domain:_.host,address:S,statement:v,uri:_.href,version:"1",chainId:E,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=vV(C),m=await w.request({method:"personal_sign",params:[yV(f),S]})}try{const{data:y,error:x}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:m}
283,!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Vt});if(x)throw x;if(!y||!y.session||!y.user){const v=new ii;return this._returnResult({data:{user:null,session:null},error:v})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:x})}catch(y){if(F(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(e){var n,r,s,i,o,a,l,c,u,h,p,f;let m,y;if("message"in e)m=e.message,y=e.signature;else{const{chain:x,wallet:v,statement:g,options:w}=e;let _;if(Ze())if(typeof v=="object")_=v;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))_=S.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=v}const k=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const S=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),g?{statement:g}:null));let E;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")E=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)E=S;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)m=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");m=[`${k.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(u=w==null?void 0:w.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||h===void 0)&&h.length?["Resources",...w.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 284`);const S=await _.signMessage(new TextEncoder().encode(m),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=S}}try{const{data:x,error:v}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:m,signature:Ts(y)},!((p=e.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Vt});if(v)throw v;if(!x||!x.session||!x.user){const g=new ii;return this._returnResult({data:{user:null,session:null},error:g})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:v})}
284catch(x){if(F(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(e,n){const r=(n==null?void 0:n.flowId)!=null,s=r?xc(n==null?void 0:n.flowId):Ze()?xc(hw(window.location.href)[Cs]):null;r&&!s&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",n==null?void 0:n.flowId);const{verifier:i,flowId:o}=r&&!s?{verifier:null,flowId:null}:await Q4(this.storage,this.storageKey,s),[a,l]=(i??"").split("/");try{if(!a&&this.flowType==="pkce")throw new I4;const{data:c,error:u}=await H(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:a},xform:Vt});if(await rn(this.storage,this.storageKey,o),u)throw u;if(!c||!c.session||!c.user){const h=new ii;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:l??null}),error:u})}catch(c){if(await rn(this.storage,this.storageKey,o),F(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=e,a=await H(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Vt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new ii;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(F(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,r,s,i,o;let a=null;try{if("email"in e){const{email:l,options:c}=e;let u=null,h=null;this.flowType==="pkce"&&([u,h,a]=await this._getCodeChallengeAndMethod());const{error:p}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:h},redirectTo:this._maybeAppendFlowIdToRedirect(c==null?void 0:c.emailRedirectTo,a)});return this._returnResult({data:{user:null,session:null},error:p})}if("phone"in e){const{phone:l,options:c}=e,{data:u,error:h}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:h})}throw new zl("You must provide either an email or phone number.")}catch(l){if(await rn(this.storage,this.storageKey,a),F(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(e){var n,r;try{let s,i;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await H(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Vt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var n,r,s,i;let o=null;try{let a=null,l=null;this.flowType==="pkce"&&([a,l,o]=await this._getCodeChallengeAndMethod());const c=await H(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect((n=e.options)===null||n===void 0?void 0:n.redirectTo,o)}),!((r=e==null?void 0:e.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:uV});return!((s=c.data)===null||s===void 0)&&s.url&&Ze()&&!(!((i=e.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await rn(this.storage,this.storageKey,o),F(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new qe;const{error:s}=await H(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(F(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){let n=null;try{const r=`${this.url}/resend`;if("email"in e){const{email:s,type:i,options:o}=e;let a=null,l=null;this.flowType==="pkce"&&([a,l,n]=await this._getCodeChallengeAndMethod());const{error:c}=await H(this.fetch,"POST",r,{headers:this.headers,body:{email:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken},code_challenge:a,code_challenge_method:l},redirectTo:this._maybeAppendFlowIdToRedirect(o==null?void 0:o.emailRedirectTo,n)});return c&&await rn(this.storage,this.storageKey,n),this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in e){const{phone:s,type:i,options:o}=e,{data:a,error:l}=await H(this.fetch,"POST",r,{headers:this.headers,body:{phone:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new zl("You must provide either an email or phone number and a type")}catch(r){if(await rn(this.storage,this.storageKey,n),F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const n=await ot(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
284id"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<wh:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const o=await ot(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=xh()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=aV(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);if(i){if(!!(e.expires_at&&e.expires_at*1e3>Date.now())){const a=await ot(this.storage,this.storageKey);if(a&&a.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await H(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Rr}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new qe}:await H(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Rr})})}catch(n){if(F(n))return Ul(n)&&await this._removeSession(),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n)):await this._updateUser(e,n)}async _updateUser(e,n={}){let r=null;try{return await this._useSession(async s=>{const{data:i,error:o}=s;if(o)throw o;if(!i.session)throw new qe;const a=i.session;let l=null,c=null;this.flowType==="pkce"&&e.email!=null&&([l,c,r]=await this._getCodeChallengeAndMethod());const{data:u,error:h}=await H(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n==null?void 0:n.emailRedirectTo,r),body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:Rr});if(h)throw h;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(s){if(await rn(this.storage,this.storageKey,r),F(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new qe;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=ql(e.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(F(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:o,error:a}=n;
284if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new qe;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(F(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){var r;try{if(!Ze())throw new Wl("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Wl(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new ow("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Wl("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new ow("No code detected.");const{data:w,error:_}=await this._exchangeCodeForSession(e.code,{flowId:e[Cs]});if(_)throw _;const k=new URL(window.location.href);return k.searchParams.delete("code"),k.searchParams.delete(Cs),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:w.session,redirectType:(r=w.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=e;if(!o||!l||!a||!u)throw new Wl("No session defined in URL");const h=Math.round(Date.now()/1e3),p=parseInt(l);let f=h+p;c&&(f=parseInt(c));const m=f-h;m*1e3<=Yn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${p}s`);const y=f-p;h-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,h):h-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,h);const{data:x,error:v}=await this._getUser(o);if(v)throw v;const g={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:p,expires_at:f,refresh_token:a,token_type:u,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(s){if(F(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){if(!e.code)return!1;const n=xc(e[Cs]);return n&&await ot(this.storage,io(this.storageKey,n))?!0:!!await ot(this.storage,`${this.storageKey}-code-verifier`)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const s=async()=>{await this._removeSession()},{data:i,error:o}=n;if(o&&!Ul(o))return this._returnResult({error:o});const a=(r=i.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:l}=await this.admin.signOut(a,e);if(l&&!(iw(l)&&(l.status===404||l.status===401||l.status===403)||Ul(l)))return e!=="others"&&await s(),this._returnResult({error:l})}return e!=="others"&&await s(),this._returnResult({error:null})})}onAuthStateChange(e){const n=U4(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;
284if(o)throw o;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),Ul(i)||Hl(i)||iw(i)&&(i.code==="refresh_token_not_found"||i.code==="refresh_token_already_used"||i.code==="session_expired")?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null,i=null;this.flowType==="pkce"&&([r,s,i]=await this._getCodeChallengeAndMethod(!0));try{return await H(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n.redirectTo,i)})}catch(o){if(await rn(this.storage,this.storageKey,i),F(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;let r=null;try{const{data:s,error:i}=await this._useSession(async o=>{var a,l,c,u,h;const{data:p,error:f}=o;if(f)throw f;const{url:m,flowId:y}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(a=e.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=e.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=e.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return r=y,await H(this.fetch,"GET",m,{headers:this.headers,jwt:(h=(u=p.session)===null||u===void 0?void 0:u.access_token)!==null&&h!==void 0?h:void 0})});if(i)throw i;return Ze()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),this._returnResult({data:{provider:e.provider,url:s==null?void 0:s.url,flowId:r},error:null})}catch(s){if(F(s))return this._returnResult({data:{provider:e.provider,url:null,flowId:r},error:s});throw s}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=e,h=await H(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Vt}),{data:p,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new ii}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await rn(this.storage,this.storageKey,null),F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await H(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const r=Date.now();return await H4(async s=>(s>0&&await W4(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await H(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Vt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Hl(i)&&Date.now()+o-r<Yn})}catch(r){if(this._debug(n,"error",r),F(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const{url:r,flowId:s}=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),Ze()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r,flowId:s},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await ot(this.storage,this.storageKey);if(s&&this.userStorage){let o=await ot(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Xn(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:xh()}else if(s&&!s.user&&!s.user){const o=await ot(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await xt(this.storage,this.storageKey+"-user"),await Xn(this.storage,this.storageKey,s)):s.user=xh()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not val
284id"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<wh;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${wh}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(L4(o)?this._debug(r,"refresh discarded by commit guard",o):this._debug(r,"refresh failed",o))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),Hl(s)?console.warn(s):console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new qe;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new fd,this.refreshingDeferred.promise.then(void 0,()=>{});const i=await ot(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(e);if(a)throw a;if(!o.session)throw new qe;const l=await ot(this.storage,this.storageKey);if(i!==null&&(l===null||l.refresh_token!==i.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:l?"replaced":"cleared"});const p={data:null,error:new aw};return this.refreshingDeferred.resolve(p),p}const u=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==u){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await xt(this.storage,this.storageKey),this.userStorage&&await xt(this.userStorage,this.storageKey+"-user");const p={data:null,error:new aw};return this.refreshingDeferred.resolve(p),p}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const h={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(h),h}catch(i){if(this._debug(s,"error",i),F(i)){const o={data:null,error:i};if(!Hl(i)){const a=await ot(this.storage,this.storageKey);!!(a!=null&&a.expires_at&&a.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:o,expiresAt:Date.now()+E4},(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,n,r=!0){if(this._pendingInitNotifications!==null&&r){this._pendingInitNotifications.push({event:e,session:n,broadcast:r});return}const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Xn(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=fw(s);await Xn(this.storage,this.storageKey,i)}else{const s=fw(n);await Xn(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await xt(this.storage,this.storageKey),await X4(this.storage,this.storageKey),await xt(this.storage,this.storageKey+"-user"),this.userStorage&&await xt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ze()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
284catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Yn);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/Yn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Yn}ms, refresh threshold is ${Ho} ticks`),s<=Ho&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof pV)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/Yn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Yn}ms, refresh threshold is ${Ho} ticks`),s<=Ho&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ze()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,r){let s=r==null?void 0:r.redirectTo,i=null,o=null,a=null;this.flowType==="pkce"&&([i,o,a]=await this._getCodeChallengeAndMethod(),s=this._maybeAppendFlowIdToRedirect(s,a));const l=[`provider=${encodeURIComponent(n)}`];if(s&&l.push(`redirect_to=${encodeURIComponent(s)}
284`),r!=null&&r.scopes&&l.push(`scopes=${encodeURIComponent(r.scopes)}`),i!=null&&o!=null){const c=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});l.push(c.toString())}if(r!=null&&r.queryParams){const c=new URLSearchParams(r.queryParams);l.push(c.toString())}return r!=null&&r.skipBrowserRedirect&&l.push(`skip_http_redirect=${r.skipBrowserRedirect}`),{url:`${e}?${l.join("&")}`,flowId:a}}_maybeAppendFlowIdToRedirect(e,n){return!e||!n||!this.experimental.appendPkceFlowIdToRedirects?e??void 0:eV(e,n)}async _getCodeChallengeAndMethod(e=!1){return tV(this.storage,this.storageKey,e,n=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",n))}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await H(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await H(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){const n=async()=>{try{return await this._useSession(async r=>{var s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?bw(e.webauthn.credential_response):_w(e.webauthn.credential_response)})}:{code:e.code}),{data:l,error:c}=await H(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:a,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(e){const n=async()=>{try{return await this._useSession(async r=>{var s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=await H(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:ww(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:xw(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=n==null?void 0:n.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,r,s,i;if(e)try{const{payload:f}=ql(e);let m=null;f.aal&&(m=f.aal);let y=m;const{data:{user:x},error:v}=await this.getUser(e);if(v)return this._returnResult({data:null,error:v});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(_=>_.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(y="aal2");const w=f.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:w},error:null}}catch(f){if(F(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
284=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=ql(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const p=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await H(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new qe})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new qe});const o=await H(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ze()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new qe});const o=await H(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ze()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;return r?this._returnResult({data:null,error:r}):n?await H(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new qe})})}catch(e){if(F(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await H(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new qe})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+j4>s)return r;const{data:i,error:o}=await H(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:f,error:m}
284=await this.getSession();if(m||!f.session)return this._returnResult({data:null,error:m});r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=ql(r);if(!(n!=null&&n.allowExpired))try{sV(i.exp)}catch(f){throw new fu(f instanceof Error?f.message:"JWT validation failed")}const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=iV(s.alg),h=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,o,F4(`${a}.${l}`)))throw new fu("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(e){var n,r,s;on(this.experimental);try{if(!gu())return this._returnResult({data:null,error:new pn("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=xw(i.options),l=(s=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:fp.createNewAbortSignal(),{data:c,error:u}=await lE({publicKey:a,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new pn("WebAuthn ceremony failed",null)});const h=_w(c);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:h})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var n,r;on(this.experimental);try{if(!gu())return this._returnResult({data:null,error:new pn("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=ww(s.options),a=(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:fp.createNewAbortSignal(),{data:l,error:c}=await aE({publicKey:o,signal:a});if(c||!l)return this._returnResult({data:null,error:c??new pn("WebAuthn ceremony failed",null)});const u=bw(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if(F(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){on(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new qe});const{data:s,error:i}=await H(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if(F(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){on(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new qe});const{data:i,error:o}=await H(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(e){var n;on(this.experimental);try{const{data:r,error:s}=await H(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(e){on(this.experimental);try{const{data:n,error:r}=await H(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Vt});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){on(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new qe});const{data:s,error:i}=await H(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if(F(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){on(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new qe});const{data:i,error:o}=await H(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(e){on(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new qe});const{error:i}
284=await H(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}}Ua.nextInstanceID={};const AV=Ua,PV="2.112.4";let qo="",vu;if(typeof Deno<"u"){var _h;qo="deno",vu=(_h=Deno.version)===null||_h===void 0?void 0:_h.deno}else if(typeof document<"u")qo="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")qo="react-native";else{var kh;qo="node";const t=globalThis.process;vu=t==null||(kh=t.version)===null||kh===void 0?void 0:kh.replace(/^v/,"")}const cE=[`runtime=${qo}`];vu&&cE.push(`runtime-version=${vu}`);const RV={"X-Client-Info":`supabase-js/${PV}; ${cE.join("; ")}`},jV={headers:RV},NV={schema:"public"},OV={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},IV={},LV={enabled:!1,respectSamplingDecision:!0};function DV(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[n,r,s,i]=e;if(n.length!==2||r.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(s)||!o.test(i)||r==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:n,traceId:r,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function MV(t,e){if(!t||!e||e.length===0)return!1;let n;if(t instanceof URL)n=t;else try{n=new URL(t)}catch{return!1}for(const r of e)try{if(typeof r=="string"){if($V(n.hostname,r))return!0}else if(r instanceof RegExp){if(r.test(n.hostname))return!0}else if(typeof r=="function"&&r(n))return!0}catch{continue}return!1}function $V(t,e){if(e===t)return!0;if(e.startsWith("*.")){const n=e.slice(2);if(t.endsWith(n)&&(t===n||t.endsWith("."+n)))return!0}return!1}function VV(t){const e=[];try{const n=new URL(t);e.push(n.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function za(t){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},za(t)}function FV(t,e){if(za(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(za(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function BV(t){var e=FV(t,"string");return za(e)=="symbol"?e:e+""}function UV(t,e,n){return(e=BV(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Ne(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Sw(Object(n),!0).forEach(function(r){UV(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sw(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const zV=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),WV=()=>Headers,uE=t=>t.startsWith("sb_publishable_")||t.startsWith("sb_secret_"),HV="sb_temp_",Ew=new Set,qV=t=>{var e,n;if(!t.startsWith("sb_")||uE(t)||t.startsWith(HV))return;const r=(e=(n=t.match(/^sb_[a-zA-Z0-9]+_/))===null||n===void 0?void 0:n[0])!==null&&e!==void 0?e:"unknown";Ew.has(r)||(Ew.add(r),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},Cw=(t,e,n,r,s,i)=>{const o=zV(r),a=WV(),l=(s==null?void 0:s.enabled)===!0,c=(s==null?void 0:s.respectSamplingDecision)!==!1,u=l?VV(e):null,h=!(i!=null&&i.omitApiKeyAsBearer&&uE(t));return async(p,f)=>{const m=await n();let y=new a(f==null?void 0:f.headers);if(y.has("apikey")||y.set("apikey",t),!y.has("Authorization")){const x=m??(h?t:null);x&&y.set("Authorization",`Bearer ${x}`)}if(u){const x=KV(p,u,c);x&&(x.traceparent&&!y.has("traceparent")&&y.set("traceparent",x.traceparent),x.tracestate&&!y.has("tracestate")&&y.set("tracestate",x.tracestate),x.baggage&&!y.has("baggage")&&y.set("baggage",x.baggage))}return o(p,Ne(Ne({},f),{},{headers:y}))}};let Tw=!1,Aw=!1;function KV(t,e,n){const r=qM();if(!r)return Tw||(Tw=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!MV(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const s=r();if(!s||!s.traceparent){var i;if(!(s==null||(i=s.carrierKeys)===null||i===void 0)&&i.length&&!Aw
284){Aw=!0;const o=s.carrierKeys.includes("sentry-trace")?" Sentry detected: set `propagateTraceparent: true` in Sentry.init() to emit it.":" Configure your tracing SDK to emit W3C trace context on outgoing requests.";console.warn(`@supabase/supabase-js: tracePropagation is enabled and a tracing SDK is active, but its propagator wrote [${s.carrierKeys.join(", ")}] and no W3C traceparent header, so trace headers will not be attached.`+o)}return null}if(n){const o=DV(s.traceparent);if(o&&!o.isSampled)return{traceparent:s.traceparent}}return s}function Pw(t){return typeof t=="boolean"?{enabled:t}:t}function GV(t){return t.endsWith("/")?t:t+"/"}function ZV(t,e){var n,r,s,i,o,a;const{db:l,auth:c,realtime:u,global:h}=t,{db:p,auth:f,realtime:m,global:y}=e,x=Pw(t.tracePropagation),v=Pw(e.tracePropagation),g={db:Ne(Ne({},p),l),auth:Ne(Ne({},f),c),realtime:Ne(Ne({},m),u),storage:{},global:Ne(Ne(Ne({},y),h),{},{headers:Ne(Ne({},(n=y==null?void 0:y.headers)!==null&&n!==void 0?n:{}),(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{})}),tracePropagation:{enabled:(s=(i=x==null?void 0:x.enabled)!==null&&i!==void 0?i:v==null?void 0:v.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=x==null?void 0:x.respectSamplingDecision)!==null&&a!==void 0?a:v==null?void 0:v.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return t.accessToken?g.accessToken=t.accessToken:delete g.accessToken,g}function YV(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(GV(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var JV=class extends AV{constructor(t){super(t)}},QV=class{constructor(t,e,n){var r,s;this.supabaseUrl=t,this.supabaseKey=e;const i=YV(t);if(!e)throw new Error("supabaseKey is required.");qV(e),this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:NV,realtime:IV,auth:Ne(Ne({},OV),{},{storageKey:o}),global:jV,tracePropagation:LV},l=ZV(n??{},a);if(this.settings=l,this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=Cw(e,t,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation),this.functionsFetch=Cw(e,t,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Ne({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new i$(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit,retry:l.db.retry}),this.storage=new S4(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new YM(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:r}=await t.auth.getSession();
284return(e=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:null}async _getAccessToken(){var t=this,e;return(e=await t._getSessionToken())!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:h,skipAutoInitialize:p},f,m){const y={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new JV({url:this.authUrl.href,headers:Ne(Ne({},y),f),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,fetch:m,lockAcquireTimeout:h,skipAutoInitialize:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(x=>x.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new G$(this.realtimeUrl.href,Ne(Ne({},t),{},{params:Ne(Ne({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN"||t==="INITIAL_SESSION")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const XV=(t,e,n)=>new QV(t,e,n);function e5(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}e5()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function t5(){var x,v;if(typeof window>"u")return;const t=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(g=>t===g||t.endsWith("."+g)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((x=t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((v=t.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:v[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",h=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(g,w,_)=>new Promise(k=>{const S=p();let E=!1,C;const A=N=>{E||(E=!0,clearTimeout(C),window.removeEventListener("message",T),k(N))},T=N=>{if(c.indexOf(N.origin)<0)return;const z=N.data;z&&z.type===u&&z.requestId===S&&A(z)};window.addEventListener("message",T);const O={type:g,requestId:S,projectId:s,key:w};_!==void 0&&(O.value=_);for(const N of c)window.parent.postMessage(O,N);C=setTimeout(()=>A(null),h)});let m=!0;const y=250;return{getItem:async g=>{let w=await f("lovable-preview-auth:get",g);return!w&&m&&(await new Promise(_=>setTimeout(_,y)),w=await f("lovable-preview-auth:get",g)),m=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(g),null):w.value:localStorage.getItem(g)},setItem:(g,w)=>(localStorage.setItem(g,w),f("lovable-preview-auth:set",g,w).then(()=>{})),removeItem:g=>(localStorage.removeItem(g),f("lovable-preview-auth:remove",g).then(()=>{}))}}const n5="https://bwapqmvndvwcjrxyhxrn.supabase.co",r5="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ3YXBxbXZuZHZ3Y2pyeHloeHJuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQxMTcwMzgsImV4cCI6MjA3OTY5MzAzOH0.b5pGLwAz9Bxnb1lUqRTcGDj_z94GpZt0bS-Jv67mSos",hg=XV(n5,r5,{auth:{storage:t5(),persistSession:!0,autoRefreshToken:!0}}),dE="zaptor_debug_events",s5=50,pp=new Set,fg=()=>{try{const t=sessionStorage.getItem(dE);return t?JSON.parse(t):[]}catch{return[]}},pg=t=>{try{sessionStorage.setItem(dE,JSON.stringify(t.slice(0,s5)))}catch{}
284pp.forEach(e=>e(t))},Rw=()=>fg(),i5=t=>(pp.add(t),()=>pp.delete(t)),o5=()=>pg([]),jw=(t,e,n,r="pending")=>{const s=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,i={id:s,at:new Date().toISOString(),name:t,payload:e,sink:n,status:r};return pg([i,...fg()]),s},Nw=(t,e,n)=>{const r=fg().map(s=>s.id===t?{...s,status:e,detail:n}:s);pg(r)},Ht=(t,e={})=>{const n={event_name:t,properties:e.properties??{},page_path:window.location.pathname,referrer:document.referrer||null,user_agent:navigator.userAgent},r=jw(t,n,"analytics_events table");hg.from("analytics_events").insert(n).then(({error:o})=>{o?(console.warn("Analytics insert failed:",o.message),Nw(r,"failed",o.message)):Nw(r,"delivered")});const s=window.posthog;s==null||s.capture(t,n.properties),!!document.querySelector('script[src*="googletagmanager.com/gtag/js"]')||jw(t,n.properties,"Google Ads tag","skipped")},Ow=[{label:"Product",href:"/#product"},{label:"How It Works",href:"/#how-it-works"},{label:"Value Intelligence",href:"/#value-intelligence"},{label:"Integrations",href:"/#integrations"},{label:"Security",href:"/#security"},{label:"Company",href:"/#company"},{label:"Early Access",href:"/#waitlist"}],Iw="mailto:[email protected]?subject=Book%20a%20demo%20of%20Zaptor",ol=()=>{const[t,e]=b.useState(!1),[n,r]=b.useState(!1);b.useEffect(()=>{const i=()=>r(window.scrollY>20);return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)},[]);const s=i=>{Ht("demo_request_click",{properties:{cta:i}}),e(!1)};return d.jsx($.nav,{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${n?"bg-background/90 backdrop-blur-xl border-b border-border shadow-sm":"bg-background/70 backdrop-blur-sm"}`,initial:{y:-100},animate:{y:0},transition:{duration:.6,ease:[.22,1,.36,1]},children:d.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[d.jsxs("div",{className:"flex justify-between items-center h-16 md:h-20 gap-6",children:[d.jsxs("a",{href:"/",className:"flex items-center gap-2 shrink-0",children:[d.jsx("img",{src:"/zaptor-logo.png",alt:"Zaptor logo",className:"w-8 h-8",width:32,height:32}),d.jsx("span",{className:"text-xl font-semibold text-foreground",children:"Zaptor"})]}),d.jsx("div",{className:"hidden lg:flex items-center gap-0.5",children:Ow.map(i=>d.jsx("a",{href:i.href,className:"px-3 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors rounded-lg hover:bg-muted/60",children:i.label},i.label))}),d.jsx("div",{className:"hidden lg:flex items-center",children:d.jsx(Ce,{className:"text-sm",asChild:!0,onClick:()=>s("nav_book_demo"),children:d.jsx("a",{href:Iw,children:"Book a Demo"})})}),d.jsx("button",{className:"lg:hidden p-2 rounded-lg hover:bg-muted/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:()=>e(!t),"aria-label":"Toggle menu","aria-expanded":t,children:t?d.jsx(n1,{className:"h-5 w-5"}):d.jsx(MP,{className:"h-5 w-5"})})]}),d.jsx(ag,{children:t&&d.jsx($.div,{className:"lg:hidden absolute top-full left-0 right-0 bg-background/95 backdrop-blur-xl border-b border-border",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:d.jsxs("div",{className:"px-6 py-6 space-y-1",children:[Ow.map(i=>d.jsx("a",{href:i.href,className:"block px-4 py-3 text-foreground hover:bg-muted rounded-lg transition-colors",onClick:()=>e(!1),children:i.label},i.label)),d.jsx("div",{className:"pt-4",children:d.jsx(Ce,{className:"w-full",asChild:!0,onClick:()=>s("nav_mobile_book_demo"),children:d.jsx("a",{href:Iw,children:"Book a Demo"})})})]})})})]})})},hE=[.22,1,.36,1],Mo={hidden:{opacity:0,y:24},visible:(t=0)=>({opacity:1,y:0,transition:{delay:t,duration:.6,ease:hE}})},a5={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.15}}},l5=[{value:"$48.2M",label:"ARR managed"},{value:"$6.4M",label:"Value documented"},{value:"$1.7M",label:"Unrealized value identified"},{value:"$840K",label:"Expansion opportunity"}],c5=[{name:"Acme",arr:"$420K",realized:"59%",realizedValue:"$710K",unrealized:"$490K",renew
284al:"147 days",action:"Executive value review"},{name:"Northwind",arr:"$680K",realized:"82%",realizedValue:"$1.4M",unrealized:"$310K",renewal:"94 days",action:"Expansion business case"},{name:"Belmont Health",arr:"$310K",realized:"34%",realizedValue:"$210K",unrealized:"$400K",renewal:"61 days",action:"Onboarding outcome reset"},{name:"Ridgeway Data",arr:"$530K",realized:"71%",realizedValue:"$980K",unrealized:"$260K",renewal:"212 days",action:"Confirm KPI evidence"}],u5=()=>d.jsxs("section",{className:"relative overflow-hidden bg-background pt-28 pb-16 lg:pt-36","aria-labelledby":"hero-heading",children:[d.jsx("div",{className:"absolute inset-0 bg-grid opacity-[0.35]","aria-hidden":"true"}),d.jsxs("div",{className:"relative max-w-7xl mx-auto px-6 lg:px-8",children:[d.jsxs($.div,{className:"max-w-4xl",initial:"hidden",animate:"visible",variants:a5,children:[d.jsx($.div,{variants:Mo,custom:0,children:d.jsx("span",{className:"inline-flex items-center gap-2 badge-primary tracking-wider",children:"CUSTOMER VALUE INTELLIGENCE"})}),d.jsx($.h1,{id:"hero-heading",className:"mt-8 text-4xl sm:text-5xl lg:text-6xl font-bold tracking-tight leading-[1.08] text-foreground",variants:Mo,custom:.1,children:"Know exactly which customers are getting value from your product."}),d.jsx($.p,{className:"mt-7 max-w-3xl text-lg lg:text-xl text-muted-foreground leading-relaxed",variants:Mo,custom:.2,children:"Zaptor connects customer goals, product adoption, business outcomes, and revenue signals so your team can prove value, identify exposed ARR, and uncover the next expansion opportunity."}),d.jsxs($.div,{className:"mt-10 flex flex-col sm:flex-row gap-3",variants:Mo,custom:.3,children:[d.jsx(Ce,{size:"lg",className:"h-12 px-6 gap-2 group",asChild:!0,onClick:()=>Ht("demo_request_click",{properties:{cta:"hero_book_demo"}}),children:d.jsxs("a",{href:"mailto:[email protected]?subject=Book%20an%20Early%20Access%20Demo%20of%20Zaptor",children:["Book an Early Access Demo",d.jsx(eo,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})}),d.jsx(Ce,{size:"lg",variant:"outline",className:"h-12 px-6",onClick:()=>{var t;return(t=document.getElementById("value-brief"))==null?void 0:t.scrollIntoView({behavior:"smooth",block:"start"})},children:"View Example Value Brief"})]}),d.jsx($.p,{className:"mt-6 text-sm text-muted-foreground",variants:Mo,custom:.4,children:"Built for B2B SaaS customer revenue teams."})]}),d.jsx($.div,{className:"relative mt-16",initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{delay:.35,duration:.8,ease:hE},children:d.jsxs("div",{className:"rounded-2xl border border-border bg-card shadow-elegant overflow-hidden",children:[d.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-border bg-muted/40 px-5 py-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-border"}),d.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-border"}),d.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-border"}),d.jsx("span",{className:"ml-3 text-sm font-medium text-foreground",children:"Portfolio value overview"})]}),d.jsx("span",{className:"rounded-full border border-border bg-background px-3 py-1 text-xs text-muted-foreground",children:"Illustrative product example"})]}),d.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 divide-border border-b border-border lg:divide-x",children:l5.map((t,e)=>d.jsxs($.div,{className:"p-6 border-b border-border last:border-b-0 lg:border-b-0",initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.5+e*.08,duration:.5},children:[d.jsx("p",{className:"text-2xl lg:text-3xl font-semibold tracking-tight text-foreground",children:t.value}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t.label})]},t.label))}),d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full min-w-[640px] text-left text-sm",children:[d.jsx("caption",{className:"sr-only",children:"Illustrative example of realized customer value, renewal exposure and expansion opportunity per account"}),d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border text-xs uppercase tracking-wider text-muted-foreground",children:[d.jsx("th",{scope:"col",className:"px-6 py-3 font-medium",children:"Account"}),d.jsx("th",{scope:"col",className:"px-6 py-3 font-medium",children:"ARR"}),d.jsx("th",{scope:"col",className:"px-6 py-3 font-medium",children:"Value realized"}),d.jsx("th",{scope:"col",className:"px-6 py-3 font-medium",children:"Unrealized"}),d.jsx("th",{scope:"col",className:"px-6 py-3 font-medium",children:"Renewal"}),d.jsx("th",{scope:"col",className:"px-6 py-3 font-medium",children:"Next action"})]})}),d.jsx("tbody",{className:"divide-y divide-border",children:c5.map(t=>d.jsxs("tr",{children:[d.jsx("td",{className:"px-6 py-4 font-medium text-foreground",children:t.name}),d.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:t.arr}),d.jsxs("td",{className:"px-6 py-4",children:[d.jsx("span",{className:"font-semibold text-foreground",children:t.realized}),d.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:t.realizedValue})]}),d.jsx("td",{className:"px-6 py-4 text-primary font-medium",children:t.unrealized}),d.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:t.renewal}),d.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:t.action})]},t.name))})]})})]})})]})]}),d5=[.22,1,.36,1],h5={hidden:{opacity:0}
284,visible:{opacity:1,transition:{staggerChildren:.08,delayChildren:.1}}},f5={hidden:{opacity:0,y:16},visible:{opacity:1,y:0,transition:{duration:.5,ease:d5}}},p5=["Built with enterprise CS operators","Designed for complex B2B SaaS customer journeys","Built to connect customer activity to measurable business value","Early access now open"],m5=()=>d.jsx("section",{className:"py-12 border-y border-border bg-muted/30","aria-label":"How Zaptor is being built",children:d.jsx("div",{className:"max-w-7xl mx-auto px-6",children:d.jsx($.ul,{className:"grid gap-y-6 gap-x-10 sm:grid-cols-2 lg:grid-cols-4",initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-50px"},variants:h5,children:p5.map(t=>d.jsxs($.li,{className:"flex items-start gap-3 text-sm text-muted-foreground",variants:f5,children:[d.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-primary","aria-hidden":"true"}),d.jsx("span",{children:t})]},t))})})}),g5=["Product usage","NPS","Support tickets","Engagement","Sentiment","Renewal date","Health score"],y5=["What did the customer buy us to accomplish?","Which outcomes have been achieved?","What evidence proves the impact?","What value remains unrealized?","Why is ARR exposed?","Where is expansion justified?","What should the team do next?"],v5=()=>d.jsx("section",{id:"value",className:"section-padding bg-muted/30","aria-labelledby":"value-vs-health-heading",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs($.div,{className:"max-w-3xl mb-14",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"THE GAP"}),d.jsx("h2",{id:"value-vs-health-heading",className:"heading-lg mb-6",children:"Customer health is not the same as customer value."}),d.jsx("p",{className:"text-body",children:"Usage, sentiment, tickets, and engagement tell you what is happening. They do not prove why a customer should renew."})]}),d.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[d.jsxs($.div,{className:"rounded-2xl border border-border bg-background p-8",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[d.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-muted",children:d.jsx(_P,{className:"h-5 w-5 text-muted-foreground","aria-hidden":"true"})}),d.jsx("h3",{className:"text-xl font-semibold",children:"Traditional customer health"})]}),d.jsx("ul",{className:"flex flex-wrap gap-2",children:g5.map(t=>d.jsx("li",{className:"rounded-full border border-border bg-muted/50 px-4 py-1.5 text-sm text-muted-foreground",children:t},t))})]}),d.jsxs($.div,{className:"rounded-2xl border border-primary/30 bg-background p-8 shadow-elegant",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{delay:.1,duration:.6},children:[d.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[d.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10",children:d.jsx(HP,{className:"h-5 w-5 text-primary","aria-hidden":"true"})}),d.jsx("h3",{className:"text-xl font-semibold",children:"Zaptor Customer Value Intelligence"})]}),d.jsx("ul",{className:"space-y-3",children:y5.map(t=>d.jsxs("li",{className:"flex gap-3 text-foreground",children:[d.jsx("span",{className:"mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-primary","aria-hidden":"true"}),d.jsx("span",{children:t})]},t))})]})]}),d.jsxs($.p,{className:"mt-12 max-w-3xl text-xl font-semibold leading-snug text-foreground sm:text-2xl",initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.55},children:["Health scores describe the account."," ",d.jsx("span",{className:"text-primary",children:"Zaptor explains the economics behind the account."})]})]})}),Lw=[{label:"Customer Objective",detail:"What the customer set out to change"},{label:"Use Case",detail:"How they intended to get there"}
284,{label:"Product Capability",detail:"What they bought to do it"},{label:"Adoption",detail:"What their teams actually use"},{label:"Business KPI",detail:"The metric that moved"},{label:"Economic Impact",detail:"Value in dollars, with evidence"},{label:"Executive Priority",detail:"Why the sponsor cares this quarter"},{label:"Renewal or Expansion",detail:"What it means for revenue"}],w5=()=>d.jsx("section",{id:"how-it-works",className:"section-padding bg-background","aria-labelledby":"value-graph-heading",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs($.div,{className:"max-w-3xl mb-14",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"THE ZAPTOR VALUE GRAPH"}),d.jsx("h2",{id:"value-graph-heading",className:"heading-lg mb-6",children:"Understand how customer activity becomes business value."}),d.jsx("p",{className:"text-body mb-4",children:"Zaptor builds a living Value Graph for every account, connecting what the customer originally wanted to achieve with what they adopted, what changed in their business, and what that outcome means for revenue."}),d.jsx("p",{className:"text-body",children:"Instead of treating customer activity as isolated signals, Zaptor connects those signals into an explainable value story."})]}),d.jsx("ol",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:Lw.map((t,e)=>d.jsxs($.li,{className:"relative rounded-2xl border border-border bg-card p-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{delay:e*.05,duration:.5},children:[d.jsx("span",{className:"text-xs font-semibold tracking-wider text-primary",children:String(e+1).padStart(2,"0")}),d.jsx("h3",{className:"mt-2 font-semibold leading-snug text-foreground",children:t.label}),d.jsx("p",{className:"mt-2 text-sm text-muted-foreground leading-relaxed",children:t.detail}),e<Lw.length-1&&d.jsx("span",{className:"pointer-events-none absolute right-[-10px] top-1/2 hidden h-px w-4 -translate-y-1/2 bg-border lg:block","aria-hidden":"true"})]},t.label))}),d.jsx($.p,{className:"mt-10 max-w-2xl text-sm text-muted-foreground",initial:{opacity:0}
284,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5},children:"Every link in the chain carries its own evidence, so a value claim can be traced back to the meeting, the record or the usage data it came from."})]})}),x5=[{name:"Salesforce",role:"Customer record",status:"Planned"},{name:"Gainsight",role:"CS workflow",status:"Planned"},{name:"HubSpot",role:"CRM and marketing",status:"Planned"},{name:"Gong",role:"Customer conversations",status:"Planned"},{name:"Zoom",role:"Meetings",status:"Planned"},{name:"Slack",role:"Internal signal",status:"Planned"},{name:"Zendesk",role:"Support history",status:"Planned"},{name:"Jira",role:"Delivery and escalation",status:"Planned"},{name:"Snowflake",role:"Warehouse data",status:"Planned"},{name:"Product telemetry",role:"Adoption evidence",status:"Early access"}],b5=()=>d.jsx("section",{id:"integrations",className:"section-padding bg-background","aria-labelledby":"integrations-heading",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs($.div,{className:"max-w-3xl mb-12",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"INTEGRATIONS"}),d.jsx("h2",{id:"integrations-heading",className:"heading-lg mb-6",children:"Make your existing customer stack economically intelligent."}),d.jsx("p",{className:"text-body",children:"Zaptor sits above the tools your customer teams already use and connects fragmented customer signals into a measurable value story."})]}),d.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:x5.map((t,e)=>d.jsxs($.div,{className:"rounded-xl border border-border bg-card p-5",initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{delay:e*.04,duration:.45},children:[d.jsx("p",{className:"font-semibold text-foreground",children:t.name}),d.jsx("p",{className:"mt-1 text-xs uppercase tracking-wide text-muted-foreground",children:t.role}),d.jsx("span",{className:"mt-3 inline-block rounded-full border border-border bg-muted/50 px-2.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:t.status})]},t.name))}),d.jsx($.p,{className:"mt-10 max-w-3xl text-lg font-semibold text-foreground",initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.5},children:"Keep your systems of record. Zaptor becomes the intelligence layer that connects them to customer value."}),d.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:"Integration coverage is being built during early access. Tell us which systems your team depends on and we will prioritise accordingly."})]})}),_5=[{label:"Customer",value:"Acme Corp"},{label:"ARR",value:"$420K"},{label:"Renewal",value:"147 days"},{label:"Original value case",value:"$1.2M annual impact"},{label:"Validated value realized",value:"$710K",emphasis:!0},{label:"Value realization",value:"59%",emphasis:!0},{label:"Unrealized value",value:"$490K",emphasis:!0},{label:"ARR exposure",value:"$180K",emphasis:!0},{label:"Expansion opportunity",value:"$120K",emphasis:!0},{label:"Business outcomes achieved",value:"2 of 5"},{label:"Primary value gap",value:"Workflow adoption stalled"},{label:"Recommended action",value:"Schedule executive value review"},{label:"Evidence confidence",value:"91%"}],k5=["Salesforce","Gong","Product usage","Support data","Customer KPI"],S5=()=>{const t=()=>{Ht("demo_request_click",{properties:{cta:"generate_executive_qbr"}})};return d.jsx("section",{id:"value-brief",className:"section-padding bg-background","aria-labelledby":"value-brief-heading",children:d.jsxs("div",{className:"container-tight grid lg:grid-cols-2 gap-14 items-start",children:[d.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"THE ARTIFACT"}),d.jsx("h2",{id:"value-brief-heading",className:"heading-lg mb-6",children:"The Zaptor Customer Value Brief"}),d.jsx("p",{className:"text-body mb-6",children:"One page per account that an executive sponsor can read in two minutes: what the customer set out to achieve, what value has been validated, what remains unrealized, how much ARR is exposed, and what the account team should do next â each figure traceable to its source."}),d.jsx("p",{className:"text-body mb-8",children:"The same brief becomes the spine of a quarterly business review, so your team walks in with the numbers already assembled."}),d.jsx(Ce,{size:"lg",className:"gap-2 group",asChild:!0,onClick:t,children:d.jsxs("a",{href:"mailto:[email protected]?subject=Generate%20an%20Executive%20QBR%20with%20Zaptor",children:["Generate Executive QBR",d.jsx(eo,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})})]}),d.jsxs($.div,{className:"rounded-2xl border border-border bg-card shadow-elegant overflow-hidden",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{delay:.1,duration:.7},children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-muted/40 px-6 py-4",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10",children:d.jsx(jP,{className:"h-4 w-4 text-primary","aria-hidden":"true"})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-semibold leading-tight",children:"Value Brief · Acme Corp"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Illustrative product example"})]})]}),d.jsx("span",{className:"rounded-full border border-border bg-background px-3 py-1 text-xs text-muted-foreground",children:"Sample data"})]}),d.jsx("dl",{className:"divide-y divide-border",children:_5.map(e=>d.jsxs("div",{className:"flex flex-col gap-1 px-6 py-3.5 sm:flex-row sm:items-center sm:justify-between sm:gap-6",children:[d.jsx("dt",{className:"text-sm text-muted-foreground",children:e.label}),d.jsx("dd",{className:`text-sm sm:text-right ${e.emphasis?"font-semibold text-primary":"font-medium text-foreground"}`,children:e.value})]},e.label))}),d.jsxs("div",{className:"border-t border-border bg-muted/20 px-6 py-5",children:[d.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Evidence sources"}),d.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:k5.map(e=>d.jsx("li",{className:"rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground",children:e},e))})]})]})]})})},E5=["Only 2 of 5 agreed business outcomes have been achieved.","Workflow adoption has remained below target for 63 days.","Executive engagement declined over the last quarter."],C5=()=>d.jsx("section",{id:"value-risk",className:"section-padding bg-muted/30","aria-labelledby":"value-risk-heading",children:d.jsxs("div",{className:"container-tight grid lg:grid-cols-2 gap-14 items-start",children:[d.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"VALUE RISK"}),d.jsx("h2",{id:"value-risk-heading",className:"heading-lg mb-6",children:"Know why ARR is exposed."}),d.jsx("p",{className:"text-body mb-6",children:"Zaptor identifies where customers are falling short of the outcomes they purchased, then explains the evidence behind the risk."}),d.jsx("p",{className:"text-body",children:"A number on its own does not survive an executive conversation. Exposure is stated with the outcomes that are missing, the adoption that stalled, and the sponsor relationship behind it."})]}),d.jsxs($.div,{className:"rounded-2xl border border-border bg-card shadow-elegant overflow-hidden",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{delay:.1,duration:.7},children:[d.jsx("div",{className:"flex items-center justify-between gap-4 border-b border-border bg-muted/40 px-6 py-4",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10",children:d.jsx(qP,{className:"h-4 w-4 text-primary","aria-hidden":"true"})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-semibold leading-tight",children:"Acme Corp · value risk"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Illustrative product example"})]})]})}),d.jsxs("div",{className:"p-6",children:[d.jsx("p",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"$180K"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"ARR exposure"}),d.jsx("p",{className:"mt-7 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Why"}),d.jsx("ul",{className:"mt-3 space-y-3",children:E5.map(t=>d.jsxs("li",{className:"flex gap-3 text-sm text-foreground",children:[d.jsx("span",{className:"mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-primary","aria-hidden":"true"}),d.jsx("span",{children:t})]},t))}),d.jsxs("div",{className:"mt-7 rounded-xl border border-primary/30 bg-primary/5 p-5",children:[d.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-primary",children:"Recommended action"}),d.jsx("p",{className:"mt-2 text-sm font-medium text-foreground",children:"Run an executive value review focu
284sed on unrealized workflow savings."})]})]})]})]})}),T5=[{label:"Customer objective",value:"Reduce operational cost by $1.2M annually"},{label:"Current validated value",value:"$710K"},{label:"Remaining opportunity",value:"$490K",emphasis:!0},{label:"Recommended expansion",value:"Analytics module"},{label:"Estimated incremental impact",value:"$210K annual value"},{label:"Potential expansion ARR",value:"$120K",emphasis:!0}],A5=()=>d.jsx("section",{id:"value-opportunity",className:"section-padding bg-background","aria-labelledby":"value-opportunity-heading",children:d.jsxs("div",{className:"container-tight grid lg:grid-cols-2 gap-14 items-start",children:[d.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"VALUE OPPORTUNITY"}),d.jsx("h2",{id:"value-opportunity-heading",className:"heading-lg mb-6",children:"Turn unrealized value into expansion."}),d.jsx("p",{className:"text-body mb-6",children:"Expansion becomes easier to defend when it is connected to an outcome the customer already cares about."}),d.jsx("p",{className:"text-body",children:"Zaptor quantifies the gap between the business case a customer bought and the value they have realized, then shows which capability closes it."})]}),d.jsxs($.div,{className:"rounded-2xl border border-border bg-card shadow-elegant overflow-hidden",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{delay:.1,duration:.7},children:[d.jsx("div",{className:"flex items-center justify-between gap-4 border-b border-border bg-muted/40 px-6 py-4",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10",children:d.jsx(t1,{className:"h-4 w-4 text-primary","aria-hidden":"true"})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-semibold leading-tight",children:"$120K expansion opportunity"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Illustrative product example"})]})]})}),d.jsx("dl",{className:"divide-y divide-border",children:T5.map(t=>d.jsxs("div",{className:"flex flex-col gap-1 px-6 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6",children:[d.jsx("dt",{className:"text-sm text-muted-foreground",children:t.label}),d.jsx("dd",{className:`text-sm sm:text-right ${t.emphasis?"font-semibold text-primary":"font-medium text-foreground"}`,children:t.value})]},t.label))})]})]})}),P5=[{icon:WP,label:"PROTECT",question:"Which ARR is exposed?",body:"Identify accounts where promised business outcomes are not being realized."},{icon:NP,label:"PROVE",question:"Why should this customer renew?",body:"Generate evidence backed value narratives for renewal conversations, executive reviews, and QBRs."},{icon:t1,label:"EXPAND",question:"Where is additional value available?",body:"Identify unrealized business value that can support a credible expansion conversation."}],R5=()=>d.jsx("section",{id:"decisions",className:"section-padding bg-muted/30","aria-labelledby":"executive-decisions-heading",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs($.div,{className:"max-w-3xl mb-14",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"EXECUTIVE VIEW"}),d.jsx("h2",{id:"executive-decisions-heading",className:"heading-lg mb-6",children:"Turn customer value into revenue decisions."}),d.jsx("p",{className:"text-body",children:"The same value model answers the three questions a customer revenue leader has to answer every quarter â for GRR, for NRR, and for the board."})]}),d.jsx("div",{className:"grid gap-6 lg:grid-cols-3",children:P5.map((t,e)=>d.jsxs($.div,{className:"rounded-2xl border border-border bg-background p-8",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{delay:e*.08,duration:.55},children:[d.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10",children:d.jsx(t.icon,{className:"h-5 w-5 text-primary","aria-hidden":"true"})}),d.jsx("p",{className:"mt-5 text-xs font-semibold uppercase tracking-wider text-primary",children:t.label}),d.jsx("h3",{className:"mt-2 text-xl font-semibold leading-snug text-foreground",children:t.question}),d.jsx("p",{className:"mt-3 text-body",children:t.body})]},t.label))})]})}
284),j5=["Customer business case","Product telemetry","Salesforce","Gong","Zendesk","Customer supplied KPI"],N5=()=>d.jsx("section",{id:"evidence",className:"section-padding bg-background","aria-labelledby":"value-evidence-heading",children:d.jsxs("div",{className:"container-tight grid lg:grid-cols-2 gap-14 items-center",children:[d.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"EVIDENCE"}),d.jsx("h2",{id:"value-evidence-heading",className:"heading-lg mb-6",children:"Every value claim should have evidence."}),d.jsx("p",{className:"text-body mb-6",children:"Zaptor connects every business outcome to the signals and source systems that support it."}),d.jsx("p",{className:"text-body",children:"Generated value claims are not enough. Zaptor shows where the conclusion came from, so customer teams can defend it in executive conversations."})]}),d.jsxs($.div,{className:"rounded-2xl border border-primary/30 bg-card p-8 shadow-elegant",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{delay:.1,duration:.7},children:[d.jsxs("div",{className:"flex flex-wrap items-end gap-x-12 gap-y-6",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-4xl font-semibold tracking-tight text-foreground",children:"$710K"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Validated value"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-4xl font-semibold tracking-tight text-primary",children:"91%"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Evidence confidence"})]})]}),d.jsx("p",{className:"mt-8 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Sources"}),d.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:j5.map(t=>d.jsx("li",{className:"rounded-full border border-border bg-background px-4 py-1.5 text-sm text-foreground",children:t},t))}),d.jsx("p",{className:"mt-6 text-xs text-muted-foreground",children:"Illustrative product example"})]})]})}),O5=["High ACV enterprise accounts","Multiple stakeholders per customer","Complex implementation","Executive business reviews","Renewal and expansion motions","Customer outcomes that need to be quantified"],I5=["VP Customer Success","Chief Customer Officer","CRO","CS Operations","Revenue Operations"],L5=()=>d.jsx("section",{id:"company",className:"section-padding bg-muted/30","aria-labelledby":"icp-heading",children:d.jsxs("div",{className:"container-tight grid lg:grid-cols-2 gap-14 items-start",children:[d.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"WHO IT IS FOR"}),d.jsx("h2",{id:"icp-heading",className:"heading-lg mb-6",children:"Built for complex B2B SaaS customer relationships."}),d.jsx("p",{className:"text-body mb-8",children:"Zaptor is designed for customer revenue teams whose accounts are large enough that a renewal has to be argued, not assumed."}),d.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-3",children:"Built for"}),d.jsx("ul",{className:"flex flex-wrap gap-2",children:I5.map(t=>d.jsx("li",{className:"rounded-full border border-border bg-background px-4 py-1.5 text-sm text-foreground",children:t},t))}),d.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:"Used day to day by CSMs, strategic account managers and account managers."})]}),d.jsx($.ul,{className:"grid gap-3 sm:grid-cols-2",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{delay:.1,duration:.6},children:O5.map(t=>d.jsx("li",{className:"rounded-xl border border-border bg-background px-5 py-4 text-sm font-medium text-foreground",children:t},t))})]})}),Dw="/assets/dashboard-main-CZ7aenmB.png",D5="/assets/dashboard-health-config-Dopy1M0C.png",M5="/assets/dashboard-settings-DpP1cvAv.png",zn=[{image:Dw,title:"Portfolio value overview",subtitle:"Realized value across the book of business",description:"See documented value, unrealized opportunity and renewal exposure across every account in one view"},{image:Dw,title:"Renewal exposure",subtitle:"ARR at risk, with the reason",description:"Accounts ranked by exposed ARR, each tied to the outcome that has not yet been delivered"},{image:D5,title:"Value model configuration",subtitle:"Outcomes defined the way you sell them",description:"Define the business outcomes, calculations and evidence requirements that matter in your category"},{image:M5,title:"Connected systems",subtitle:"Your existing customer stack",description:"Salesforce, Gainsight, HubSpot, Gong, Zoom, Slack, Zendesk, Jira, Snowflake and product telemetry"}],$5=()=>{const[t,e]=b.useState(0),[n,r]=b.useState(0),[s,i]=b.useState(!1),o=zM();b.useEffect(()=>{if(o||s)return;const c=setInterval(()=>{r(1),e(u=>(u+1)%zn.length)},6e3);return()=>clearInterval(c)},[o,s]);const a={enter:c=>({x:c>0?100:-100,opacity:0}
284),center:{zIndex:1,x:0,opacity:1},exit:c=>({zIndex:0,x:c<0?100:-100,opacity:0})},l=c=>{r(c),e(u=>{const h=u+c;return h<0?zn.length-1:h>=zn.length?0:h})};return d.jsxs("section",{className:"section-padding bg-background relative overflow-hidden",id:"product","aria-labelledby":"showcase-heading",children:[d.jsx("div",{className:"absolute inset-0 bg-dots opacity-50"}),d.jsxs("div",{className:"container-tight relative",children:[d.jsxs($.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.7,ease:[.22,1,.36,1]},className:"text-center mb-16",children:[d.jsx($.p,{className:"text-sm font-medium text-primary mb-4",initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{delay:.1,duration:.5},children:"PRODUCT"}),d.jsx($.h2,{id:"showcase-heading",className:"heading-lg mb-4",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2,duration:.6},children:"One screen for a whole book of business"}),d.jsx($.p,{className:"text-body max-w-2xl mx-auto",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.3,duration:.6},children:"Realized value, renewal exposure, expansion opportunity and the recommended next action for every account. Product views shown are illustrative examples."})]}),d.jsxs("div",{className:"relative",children:[d.jsxs($.div,{className:"text-center mb-8",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},"aria-live":"polite","aria-atomic":"true",children:[d.jsx("p",{className:"text-sm text-primary font-medium mb-2",children:zn[t].subtitle}),d.jsx("h3",{className:"heading-md mb-3",children:zn[t].title}),d.jsx("p",{className:"text-muted-foreground max-w-xl mx-auto",children:zn[t].description})]},t),d.jsxs("div",{className:"relative aspect-[16/10] max-w-5xl mx-auto rounded-2xl overflow-hidden border border-border/50 shadow-elegant bg-muted/30",children:[d.jsx(ag,{initial:!1,custom:n,mode:"wait",children:d.jsx($.div,{custom:n,variants:a,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},className:"absolute inset-0",children:d.jsx("img",{src:zn[t].image,alt:zn[t].title,className:"w-full h-full object-cover object-top",draggable:!1})},t)}),d.jsx("button",{onClick:()=>l(-1),className:"absolute left-4 top-1/2 -translate-y-1/2 bg-background/90 hover:bg-background text-foreground p-3 rounded-full shadow-lg transition-all hover:scale-110 z-10 border border-border/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-label":"Previous slide",children:d.jsx(EP,{className:"h-5 w-5"})}),d.jsx("button",{onClick:()=>l(1),className:"absolute right-4 top-1/2 -translate-y-1/2 bg-background/90 hover:bg-background text-foreground p-3 rounded-full shadow-lg transition-all hover:scale-110 z-10 border border-border/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-label":"Next slide",children:d.jsx(CP,{className:"h-5 w-5"})})]}),d.jsxs("div",{className:"flex items-center justify-center gap-2 mt-8",children:[d.jsx("div",{className:"flex gap-2",role:"tablist","aria-label":"Product showcase slides",children:zn.map((c,u)=>d.jsx("button",{onClick:()=>{r(u>t?1:-1),e(u)},className:`transition-all duration-300 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ${u===t?"w-8 h-2 bg-primary":"w-2 h-2 bg-border hover:bg-muted-foreground/50"}`,"aria-label":`Go to slide ${u+1}`,role:"tab","aria-selected":u===t},u))}),d.jsx("button",{onClick:()=>i(!s),className:"ml-4 p-2 rounded-full bg-background border border-border hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-label":s?"Play slideshow":"Pause slideshow",children:s?d.jsx(VP,{className:"h-4 w-4"}):d.jsx($P,{className:"h-4 w-4"})})]})]})]})]})},V5=[{traditional:"Is the customer engaged?",zaptor:"What business value has the customer realized?"},{traditional:"What is their health score?",zaptor:"Which outcomes have actually been achieved?"},{traditional:"Are they using the product?",zaptor:"Is adoption producing business impact?"}
284,{traditional:"Are they at risk?",zaptor:"Why is ARR exposed?"},{traditional:"Is there an expansion signal?",zaptor:"What unrealized value supports expansion?"},{traditional:"Prepare the QBR.",zaptor:"Prove the renewal."}],F5=[{system:"Your CRM",role:"keeps the customer record"},{system:"Your CS platform",role:"runs the customer workflow"},{system:"Zaptor",role:"connects that activity to customer value",highlight:!0}],B5=()=>d.jsx("section",{id:"differentiation",className:"section-padding bg-muted/30","aria-labelledby":"differentiation-heading",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs($.div,{className:"max-w-3xl mb-14",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"DIFFERENCE"}),d.jsx("h2",{id:"differentiation-heading",className:"heading-lg mb-6",children:"Not another customer health score."}),d.jsx("p",{className:"text-body",children:"Zaptor is complementary to the systems you already run. It keeps your systems of record in place and answers a different question."})]}),d.jsxs($.div,{className:"overflow-hidden rounded-2xl border border-border bg-background",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsxs("div",{className:"hidden grid-cols-2 border-b border-border bg-muted/40 sm:grid",children:[d.jsx("p",{className:"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Traditional CS platform"}),d.jsx("p",{className:"border-l border-border px-6 py-4 text-xs font-semibold uppercase tracking-wider text-primary",children:"Zaptor"})]}),d.jsx("ul",{className:"divide-y divide-border",children:V5.map(t=>d.jsxs("li",{className:"grid sm:grid-cols-2",children:[d.jsxs("div",{className:"px-6 py-4",children:[d.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground sm:hidden",children:"Traditional CS platform"}),d.jsx("p",{className:"mt-1 text-muted-foreground sm:mt-0",children:t.traditional})]}),d.jsxs("div",{className:"border-t border-border px-6 py-4 sm:border-l sm:border-t-0",children:[d.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-primary sm:hidden",children:"Zaptor"}),d.jsx("p",{className:"mt-1 font-medium text-foreground sm:mt-0",children:t.zaptor})]})]},t.zaptor))})]}),d.jsx("div",{className:"mt-8 grid gap-4 sm:grid-cols-3",children:F5.map((t,e)=>d.jsxs($.div,{className:`rounded-xl border p-6 ${t.highlight?"border-primary/40 bg-background":"border-border bg-background/60"}`,initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{delay:e*.08,duration:.5},children:[d.jsx("p",{className:`font-semibold ${t.highlight?"text-primary":"text-foreground"}`,children:t.system}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t.role})]},t.system))})]})}),U5=["Which outcomes correlate with renewals","Which value gaps precede churn","Which interventions change account outcomes","Which capabilities create measurable business impact","Which unrealized outcomes create expansion"],z5=["Customer objectives","Success metrics","Executive priorities","Adoption evidence","Business outcomes","Value calculations","Interventions","Renewal outcomes","Expansion outcomes"],W5=()=>d.jsx("section",{id:"value-intelligence",className:"section-padding bg-background","aria-labelledby":"value-intelligence-heading",children:d.jsxs("div",{className:"container-tight grid lg:grid-cols-2 gap-14",children:[d.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"VALUE INTELLIGENCE"}),d.jsx("h2",{id:"value-intelligence-heading",className:"heading-lg mb-6",children:"Zaptor gets smarter about what drives your renewals."}),d.jsx("p",{className:"text-body mb-6",children:"Every customer objective, adoption milestone, business outcome, intervention, and revenue result becomes part of your company's Value Graph. Over time, Zaptor learns:"}),d.jsx("ul",{className:"space-y-3 mb-8",children:U5.map(t=>d.jsxs("li",{className:"flex gap-3 text-foreground",children:[d.jsx("span",{className:"mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-primary","aria-hidden":"true"}),d.jsx("span",{children:t})]},t))}),d.jsx("p",{className:"text-body",children:"Build institutional knowledge about customer value instead of losing it across spreadsheets, call notes, CRM fields, and individual CSMs."})]}),d.jsxs($.div,{className:"self-start rounded-2xl border border-border bg-card p-8",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{delay:.1,duration:.6},children:[d.jsx("h3",{className:"text-xl font-semibold mb-2",children:"A living system of record for customer value."}),d.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Persistent, account-level memory that survives handovers, reorgs, and quarters."}),d.jsx("ul",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:z5.map(t=>d.jsx("li",{className:"rounded-xl border border-border bg-background px-5 py-4 text-sm font-medium text-foreground",children:t},t))})]})]})}),H5=[{category:"Digital Employee Experience",outcomes:["Ticket reduction","MTTR reduction","Hardware avoidance","Employee productivity","Automation savings"]},{category:"Cybersecurity",outcomes:["Threat reduction","Mean time to remediation","Analyst hours avoided","Compliance exposure reduction"]},{category:"FinOps",outcomes:["Cloud savings","Utilization improvement","Commitment optimization","Engineering efficiency"]}
284,{category:"AI Platforms",outcomes:["Inference cost reduction","Developer productivity","Workflow automation","Revenue acceleration"]},{category:"Developer Tools",outcomes:["Cycle time reduction","Release frequency","Engineering hours recovered","Change failure reduction"]},{category:"Data Platforms",outcomes:["Query cost reduction","Pipeline reliability","Time to insight","Analyst hours recovered"]}],q5=()=>d.jsx("section",{className:"section-padding bg-muted/30","aria-labelledby":"vertical-models-heading",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs($.div,{className:"max-w-3xl mb-12",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"VALUE MODEL TEMPLATES"}),d.jsx("h2",{id:"vertical-models-heading",className:"heading-lg mb-6",children:"Built for how enterprise SaaS creates value."}),d.jsx("p",{className:"text-body",children:"Value looks different in every category, so Zaptor ships value model templates: the business outcomes that matter for your market, with the calculation and the evidence each one needs. These templates are in development and arrive with early access."})]}),d.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:H5.map((t,e)=>d.jsxs($.div,{className:"rounded-2xl border border-border bg-background p-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{delay:e*.05,duration:.5},children:[d.jsxs("div",{className:"mb-4 flex items-start justify-between gap-3",children:[d.jsx("h3",{className:"text-lg font-semibold leading-snug",children:t.category}),d.jsx("span",{className:"shrink-0 rounded-full border border-border bg-muted/60 px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Early access"})]}),d.jsx("ul",{className:"space-y-2",children:t.outcomes.map(n=>d.jsxs("li",{className:"flex gap-2.5 text-sm text-muted-foreground",children:[d.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-primary/60","aria-hidden":"true"}),d.jsx("span",{children:n})]},n))})]},t.category))})]})}),K5=[{icon:zP,title:"SOC 2",detail:"On the enterprise security roadmap. Not yet certified â we will not claim otherwise."},{icon:DP,title:"Data encryption",detail:"Customer data encrypted in transit and at rest."},{icon:KP,title:"Role based access",detail:"Scoped permissions by team, book of business and account."},{icon:IP,title:"SSO",detail:"SAML and OIDC single sign-on planned for early access customers."}
284,{icon:RP,title:"Data residency",detail:"Regional hosting options under evaluation for EU-based deployments."},{icon:FP,title:"Integration security",detail:"Least-privilege, revocable credentials per connected system."},{icon:PP,title:"Customer data isolation",detail:"Tenant-level separation of every customer's data."},{icon:BP,title:"Audit logs",detail:"Record of access and changes to value data and account records."}],G5=()=>d.jsx("section",{id:"security",className:"section-padding bg-background","aria-labelledby":"security-heading",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs($.div,{className:"max-w-3xl mb-12",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"SECURITY"}),d.jsx("h2",{id:"security-heading",className:"heading-lg mb-6",children:"Security controls designed for B2B SaaS teams"}),d.jsx("p",{className:"text-body",children:"Zaptor is pre-launch, so this is an enterprise security roadmap rather than a certification list. Below is what is in place and what is planned, stated plainly for your security reviewers."})]}),d.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:K5.map((t,e)=>d.jsxs($.div,{className:"rounded-2xl border border-border bg-card p-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{delay:e*.04,duration:.5},children:[d.jsx("span",{className:"mb-4 flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10",children:d.jsx(t.icon,{className:"h-5 w-5 text-primary","aria-hidden":"true"})}),d.jsx("h3",{className:"font-semibold",children:t.title}),d.jsx("p",{className:"mt-2 text-sm text-muted-foreground leading-relaxed",children:t.detail})]},t.title))}),d.jsx("div",{className:"mt-10",children:d.jsx(Ce,{variant:"outline",asChild:!0,children:d.jsx("a",{href:"mailto:[email protected]?subject=Zaptor%20security%20documentation%20request",children:"Contact us for security documentation"})})})]})}),Z5=()=>{const t=()=>{Ht("demo_request_click",{properties:{cta:"design_partner_book_demo"}})},e=()=>{Ht("demo_request_click",{properties:{cta:"customer_value_audit"}})},n=()=>{Ht("design_partner_cta_click",{properties:{cta:"become_design_partner"}});const r=document.getElementById("waitlist");r==null||r.scrollIntoView({behavior:"smooth",block:"center"})};return d.jsx("section",{className:"section-padding bg-secondary text-secondary-foreground","aria-labelledby":"design-partners-heading",children:d.jsxs("div",{className:"container-tight max-w-3xl text-center",children:[d.jsx($.p,{className:"text-sm font-medium text-primary-glow mb-4",initial:{opacity:0}
vendor: 6,413 bytes, line 284
284,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5},children:"EARLY ACCESS"}),d.jsx($.h2,{id:"design-partners-heading",className:"heading-lg mb-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:"We're looking for ten design partners"}),d.jsx($.p,{className:"text-lg leading-relaxed text-secondary-foreground/80 mb-10",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1,duration:.6},children:"We are working with a small group of B2B SaaS customer teams to build the next generation of customer value intelligence. Zaptor is pre-launch, so we have no reviews and no published customer results to show you. What we have is ten places in an early access program: a founding price locked for as long as you stay, direct access to the founders, and real influence over the value models we build. In return we ask for honest feedback and, once there are outcomes worth publishing, a named case study."}),d.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2,duration:.6},className:"mb-16",children:[d.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 sm:flex-row",children:[d.jsx(Ce,{size:"lg",className:"gap-2 group",asChild:!0,onClick:t,children:d.jsxs("a",{href:"mailto:[email protected]?subject=Book%20an%20Early%20Access%20Demo%20of%20Zaptor",children:["Book an Early Access Demo",d.jsx(eo,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})}),d.jsx(Ce,{size:"lg",variant:"outline",onClick:n,children:"Become a Design Partner"})]}),d.jsxs("p",{className:"mt-8 text-sm text-secondary-foreground/70",children:["Optional: ",d.jsx("a",{className:"underline underline-offset-4",href:"mailto:[email protected]?subject=Customer%20Value%20Audit%20request",onClick:e,children:"Get a Customer Value Audit"})," â bring one strategic account and we will map the customer's goals, adoption, value gaps, and renewal case with you."]})]}),d.jsx($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.35,duration:.6},className:"mx-auto max-w-2xl","aria-labelledby":"case-study-placeholder-heading",children:d.jsxs("div",{className:"relative rounded-2xl border border-dashed border-border bg-background/50 p-8 text-center backdrop-blur-sm",children:[d.jsx("span",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-secondary px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Coming soon"}),d.jsx("div",{className:"mx-auto mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-secondary",children:d.jsx(OP,{className:"h-6 w-6 text-muted-foreground","aria-hidden":"true"})}),d.jsx("h3",{id:"case-study-placeholder-heading",className:"mb-2 text-xl font-semibold text-foreground",children:"First named case study"}),d.jsx("p",{className:"mb-6 text-muted-foreground",children:"Once a design partner has results worth sharing, we'll publish a detailed write-up here â with their permission, their logo, and the measured value Zaptor helped document."}),d.jsxs("div",{className:"grid grid-cols-3 gap-4 border-t border-border/60 pt-6",children:[d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Company"}),d.jsx("p",{className:"mt-1 font-medium text-foreground/70",children:"To be announced"})]}),d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Industry"}),d.jsx("p",{className:"mt-1 font-medium text-foreground/70",children:"â"})]}),d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Key outcome"}),d.jsx("p",{className:"mt-1 font-medium text-foreground/70",children:"â"})]})]})]})})]})})};var pd="Collapsible",[Y5,fE]=mo(pd),[J5,mg]=Y5(pd),pE=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[l,c]=Wu({prop:r,defaultProp:s??!1,onChange:o,caller:pd});return d.jsx(J5,{scope:n,disabled:i,contentId:f1(),open:l,onOpenToggle:b.useCallback(()=>c(u=>!u),[c]),children:d.jsx(Be.div,{"data-state":yg(l),"data-disabled":i?"":void 0,...a,ref:e})})});pE.displayName=pd;var mE="CollapsibleTrigger",gE=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=mg(mE,n);return d.jsx(Be.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":yg(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:De(t.onClick,s.onOpenToggle)})});gE.displayName=mE;var gg="CollapsibleContent",yE=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=mg(gg,t.__scopeCollapsible);return d.jsx(zu,{present:n||s.open,children:({present:i})=>d.jsx(Q5,{...r,ref:e,present:i})})});yE.displayName=gg;var Q5=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=t,o=mg(gg,n),[a,l]=b.useState(r),c=b.useRef(null),u=It(e,c),h=b.useRef(0),p=h.current,f=b.useRef(0),m=f.current,y=o.open||a,x=b.useRef(y),v=b.useRef(void 0);return b.useEffect(()=>{const g=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(g)},[]),Dn(()=>{const g=c.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const w=g.getBoundingClientRect();h.current=w.height,f.current=w.width,x.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),l(r)}},[o.open,r]),d.jsx(Be.div,{"data-state":yg(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y,...i,ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...t.style},children:y&&s})});function yg(t){return t?"open":"closed"}var X5=pE,eF=gE,tF=yE,nF=b.createContext(void 0);function rF(t){const e=b.useContext(nF);return t||e||"ltr"}var bn="Accordion",sF=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vg,iF,oF]=T_(bn),[md,jB]=mo(bn,[oF,fE]),wg=fE(),vE=I.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,i=r;return d.jsx(vg.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?d.jsx(uF,{...i,ref:e}):d.jsx(cF,{...s,ref:e})})});vE.displayName=bn;
284var[wE,aF]=md(bn),[xE,lF]=md(bn,{collapsible:!1}),cF=I.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...o}=t,[a,l]=Wu({prop:n,defaultProp:r??"",onChange:s,caller:bn});return d.jsx(wE,{scope:t.__scopeAccordion,value:I.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:I.useCallback(()=>i&&l(""),[i,l]),children:d.jsx(xE,{scope:t.__scopeAccordion,collapsible:i,children:d.jsx(bE,{...o,ref:e})})})}),uF=I.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[o,a]=Wu({prop:n,defaultProp:r??[],onChange:s,caller:bn}),l=I.useCallback(u=>a((h=[])=>[...h,u]),[a]),c=I.useCallback(u=>a((h=[])=>h.filter(p=>p!==u)),[a]);return d.jsx(wE,{scope:t.__scopeAccordion,value:o,onItemOpen:l,onItemClose:c,children:d.jsx(xE,{scope:t.__scopeAccordion,collapsible:!0,children:d.jsx(bE,{...i,ref:e})})})}),[dF,gd]=md(bn),bE=I.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...o}=t,a=I.useRef(null),l=It(a,e),c=iF(n),h=rF(s)==="ltr",p=De(t.onKeyDown,f=>{var C;if(!sF.includes(f.key))return;const m=f.target,y=c().filter(A=>{var T;return!((T=A.ref.current)!=null&&T.disabled)}),x=y.findIndex(A=>A.ref.current===m),v=y.length;if(x===-1)return;f.preventDefault();let g=x;const w=0,_=v-1,k=()=>{g=x+1,g>_&&(g=w)},S=()=>{g=x-1,g<w&&(g=_)};switch(f.key){case"Home":g=w;break;case"End":g=_;break;case"ArrowRight":i==="horizontal"&&(h?k():S());break;case"ArrowDown":i==="vertical"&&k();break;case"ArrowLeft":i==="horizontal"&&(h?S():k());break;case"ArrowUp":i==="vertical"&&S();break}const E=g%v;(C=y[E].ref.current)==null||C.focus()});return d.jsx(dF,{scope:n,disabled:r,direction:s,orientation:i,children:d.jsx(vg.Slot,{scope:n,children:d.jsx(Be.div,{...o,"data-orientation":i,ref:l,onKeyDown:r?void 0:p})})})}),wu="AccordionItem",[hF,xg]=md(wu),_E=I.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...s}=t,i=gd(wu,n),o=aF(wu,n),a=wg(n),l=f1(),c=r&&o.value.includes(r)||!1,u=i.disabled||t.disabled;return d.jsx(hF,{scope:n,open:c,disabled:u,triggerId:l,children:d.jsx(X5,{"data-orientation":i.orientation,"data-state":AE(c),...a,...s,ref:e,disabled:u,open:c,onOpenChange:h=>{h?o.onItemOpen(r):o.onItemClose(r)}})})});_E.displayName=wu;var kE="AccordionHeader",SE=I.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=gd(bn,n),i=xg(kE,n);return d.jsx(Be.h3,{"data-orientation":s.orientation,"data-state":AE(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:e})});SE.displayName=kE;var mp="AccordionTrigger",EE=I.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=gd(bn,n),i=xg(mp,n),o=lF(mp,n),a=wg(n);return d.jsx(vg.ItemSlot,{scope:n,children:d.jsx(eF,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...r,ref:e})})});EE.displayName=mp;var CE="AccordionContent",TE=I.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=gd(bn,n),i=xg(CE,n),o=wg(n);return d.jsx(tF,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});TE.displayName=CE;function AE(t){return t?"open":"closed"}var fF=vE,pF=_E,mF=SE,PE=EE,RE=TE;const jE=fF,bg=b.forwardRef(({className:t,...e},n)=>d.jsx(pF,{ref:n,className:He("border-b",t),...e}));bg.displayName="AccordionItem";const _g=b.forwardRef(({className:t,children:e,...n},r)=>d.jsx(mF,{className:"flex",children:d.jsxs(PE,{ref:r,className:He("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,d.jsx(SP,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));_g.displayName=PE.displayName;const kg=b.forwardRef(({className:t,children:e,...n},r)=>d.jsx(RE,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:d.jsx("div",{className:He("pb-4 pt-0",t),children:e})}));kg.displayName=RE.displayName;const NE=[{question:"What is Zaptor?",answer:"Zaptor is the customer value intelligence layer for B2B SaaS. It connects what customers were promised, what they actually adopted, the business outcomes they achieved, and the revenue opportunities that come next â so account teams and executives can see realized value, renewal exposure and expansion potential per account."},{question:"How is customer value intelligence different from a health score?",answer:"A health score summarises proxies such as usage, engagement, NPS, support tickets and sentiment. Customer value intelligence answers a different question: what did the customer buy us to accomplish, how much of that value has been realized, what evidence proves it, what remains unrealized, and what should the account team do next."},{question:"Who is Zaptor built for?",answer:"Enterprise B2B SaaS companies between roughly $10M and $150M ARR, with average contract values above $50K, 10 to 75 CSMs, complex implementations, multiple stakeholders per customer and a strong dependency on renew
284als and expansion. Buyers are typically VP Customer Success, Chief Customer Officers, CROs, CS Operations and Revenue Operations; day-to-day users are CSMs and account managers."},{question:"Does Zaptor replace our CRM or CS platform?",answer:"No. Salesforce manages the customer record, your CS platform manages the workflow, and Zaptor connects customer activity to business value. It sits on top of the stack you already run â Salesforce, Gainsight, HubSpot, Gong, Zoom, Slack, Zendesk, Jira, Snowflake and product telemetry."},{question:"What is a Zaptor Value Brief?",answer:"A one-page account artifact covering ARR, renewal date, the original business case, validated value realized, value realization percentage, unrealized opportunity, business outcomes achieved, primary risk, expansion opportunity and estimated value, the recommended next action, and the evidence sources behind each figure. It also forms the basis of an executive QBR."},{question:"What is Pascal?",answer:"Pascal is the AI assistant embedded inside Zaptor. Ask Pascal to summarize an account, identify value gaps, or recommend the next action, and it answers from the customer value graph and the evidence behind it."},{question:"Is Zaptor available today?",answer:"Zaptor is pre-launch with early access open. There are no customer reviews, ratings or published results yet, and vertical value model templates and parts of the integration coverage arrive during early access."},{question:"How does Zaptor handle security and enterprise requirements?",answer:"Customer data is encrypted in transit and at rest with tenant-level isolation and role-based access. SSO, data residency options, audit logs and SOC 2 are part of the enterprise security roadmap rather than completed certifications. Contact [email protected] for security documentation."}],gF=()=>d.jsx("section",{id:"faq",className:"section-padding bg-muted/30","aria-labelledby":"faq-heading",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"max-w-3xl mb-12",children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"FAQ"}),d.jsx("h2",{id:"faq-heading",className:"heading-lg mb-6",children:"Questions, answered"}),d.jsx("p",{className:"text-body",children:"What Zaptor does, who it is for, and where it fits alongside the systems you already run."})]}),d.jsx($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.15,duration:.6},className:"max-w-3xl",children:d.jsx(jE,{type:"single",collapsible:!0,className:"space-y-4",children:NE.map((t,e)=>d.jsxs(bg,{value:`item-${e}`,className:"bg-background border border-border rounded-xl px-6 data-[state=open]:shadow-sm",children:[d.jsx(_g,{className:"text-left font-medium py-5 hover:no-underline",children:t.question}),d.jsx(kg,{className:"text-muted-foreground pb-5 leading-relaxed",children:t.answer})]},e))})})]})}),kr=b.forwardRef(({className:t,type:e,...n},r)=>d.jsx("input",{type:e,className:He("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));kr.displayName="Input";var yF="Label",OE=b.forwardRef((t,e)=>d.jsx(Be.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));OE.displayName=yF;var IE=OE;const vF=bm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ui=b.forwardRef(({className:t,...e},n)=>d.jsx(IE,{ref:n,className:He(vF(),t),...e}));ui.displayName=IE.displayName;var he;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>
vendor: 1,156 bytes, line 284
284typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(he||(he={}));var Mw;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Mw||(Mw={}));const q=he.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cr=t=>{switch(typeof t){case"undefined":return q.undefined;case"string":return q.string;case"number":return Number.isNaN(t)?q.nan:q.number;case"boolean":return q.boolean;case"function":return q.function;case"bigint":return q.bigint;case"symbol":return q.symbol;case"object":return Array.isArray(t)?q.array:t===null?q.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?q.promise:typeof Map<"u"&&t instanceof Map?q.map:typeof Set<"u"&&t instanceof Set?q.set:typeof Date<"u"&&t instanceof Date?q.date:q.object;default:return q.unknown}},D=he.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invali
284d_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ur extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),r}static assert(e){if(!(e instanceof ur))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,he.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ur.create=t=>new ur(t);const gp=(t,e)=>{let n;switch(t.code){case D.invalid_type:t.received===q.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case D.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,he.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:n=`Unrecognized key(s) in object: ${he.joinValues(t.keys,", ")}`;break;case D.invalid_union:n="Invalid input";break;case D.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${he.joinValues(t.options)}`;break;case D.invalid_enum_value:n=`Invalid enum value. Expected ${he.joinValues(t.options)}, received '${t.received}'`;break;case D.invalid_arguments:n="Invalid function arguments";break;case D.invalid_return_type:n="Invalid function return type";break;case D.invalid_date:n="Invalid date";break;case D.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:he.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case D.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case D.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case D.custom:n="Invalid input";break;case D.invalid_intersection_types:n="Intersection results could not be merged";break;case D.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case D.not_finite:n="Number must be finite";break;default:n=e.defaultError,he.assertNever(t)}return{message:n}};let wF=gp;function xF(){return wF}const bF=t=>
vendor: 29,058 bytes, line 284
284{const{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}};function B(t,e){const n=xF(),r=bF({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===gp?void 0:gp].filter(s=>!!s)});t.common.issues.push(r)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return X;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Lt.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return X;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:e.value,value:r}}}const X=Object.freeze({status:"aborted"}),Ko=t=>({status:"dirty",value:t}),Yt=t=>({status:"valid",value:t}),$w=t=>t.status==="aborted",Vw=t=>t.status==="dirty",oo=t=>t.status==="valid",xu=t=>typeof Promise<"u"&&t instanceof Promise;var K;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(K||(K={}));class ss{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Fw=(t,e)=>{if(oo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ur(t.common.issues);return this._error=n,this._error}}};function ie(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:s}}class ue{get description(){return this._def.description}_getType(e){return Cr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lt,ctx:{common:e.parent.common,data:e.data,parsedType:Cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(xu(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Cr(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Fw(r,s)}"~validate"(e){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Cr(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return oo(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>oo(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Cr(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(xu(s)?s:Promise.resolve(s));return Fw(r,i)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=e(s),a=()=>i.addIssue({code:D.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new co({schema:this,typeName:ee.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Gr.create(this,this._def)}nullable(){return uo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ln.create(this)}promise(){return Su.create(this,this._def)}or(e){return _u.create([this,e],this._def)}and(e){return ku.create(this,e,this._def)}transform(e){return new co({...ie(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new vp({...ie(this._def),innerType:this,defaultValue:n,typeName:ee.ZodDefault})}brand(){return new WF({typeName:ee.ZodBranded,type:this,...ie(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new wp({...ie(this._def),innerType:this,catchValue:n,typeName:ee.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Sg.create(this,e)}readonly(){return xp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _F=/^c[^\s-]{8,}$/i,kF=/^[0-9a-z]+$/,SF=/^[0-9A-HJKMNP-TV-Z]{26}$/i,EF=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,CF=/^[a-z0-9_-]{21}$/i,TF=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,AF=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,PF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,RF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Sh;const jF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,NF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,OF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,IF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,LF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,DF=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,LE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",MF=new RegExp(`^${LE}$`);function DE(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function $F(t){return new RegExp(`^${DE(t)}$`)}function VF(t){let e=`${LE}T${DE(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function FF(t,e){return!!((e==="v4"||!e)&&jF.test(t)||(e==="v6"||!e)&&OF.test(t))}function BF(t,e){if(!TF.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function UF(t,e){return!!((e==="v4"||!e)&&NF.test(t)||(e==="v6"||!e)&&IF.test(t))}class nr extends ue{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){const i=this._getOrReturnCtx(e);return B(i,{code:D.invalid_type,expected:q.string,received:i.parsedType}),X}const r=new Lt;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),B(s,{code:D.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),B(s,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?B(s,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&B(s,{code:D.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")PF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"email",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Sh||(Sh=new RegExp(RF,"u")),Sh.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"emoji",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")EF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"uuid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")CF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"nanoid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")_F.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"cuid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")kF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"cuid2",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")SF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"ulid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),B(s,{validation:"url",code:D.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"regex",code:D.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),B(s,{code:D.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),B(s,{code:D.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),B(s,{code:D.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?VF(i).test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{code:D.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?MF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{code:D.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?$F(i).test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{code:D.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?AF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"duration",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?FF(e.data,i.version)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"ip",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?BF(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"jwt",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?UF(e.data,i.version)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"cidr",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?LF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"base64",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?DF.test(e.data)||(s=this._getOrReturnCtx(e,s),B(s,{validation:"base64url",code:D.invalid_string,message:i.message}),r.dirty()):he.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:D.invalid_string,...K.errToObj(r)})}_addCheck(e){return new nr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...K.errToObj(e)})}url(e){return this._addCheck({kind:"url",...K.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...K.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...K.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...K.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...K.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...K.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...K.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...K.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...K.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...K.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...K.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...K.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...K.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...K.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...K.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...K.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...K.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...K.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...K.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...K.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...K.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...K.errToObj(n)})}nonempty(e){return this.min(1,K.errToObj(e))}trim(){return new nr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new nr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new nr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}nr.create=t=>new nr({checks:[],typeName:ee.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...ie(t)});function zF(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}class Hs extends ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q.number){const i=this._getOrReturnCtx(e);return B(i,{code:D.invalid_type,expected:q.number,received:i.parsedType}),X}let r;const s=new Lt;for(const i of this._def.checks)i.kind==="int"?he.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),B(r,{code:D.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),B(r,{code:D.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),B(r,{code:D.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?zF(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),B(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),B(r,{code:D.not_finite,message:i.message}),s.dirty()):he.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,K.toString(n))}gt(e,n){return this.setLimit("min",e,!1,K.toString(n))}lte(e,n){return this.setLimit("max",e,!0,K.toString(n))}lt(e,n){return this.setLimit("max",e,!1,K.toString(n))}setLimit(e,n,r,s){return new Hs({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:K.toString(s)}]})}_addCheck(e){return new Hs({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:K.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:K.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:K.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:K.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:K.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:K.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&he.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Hs.create=t=>new Hs({checks:[],typeName:ee.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ie(t)});class qs extends ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==q.bigint)return this._getInvalidInput(e);let r;const s=new Lt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),B(r,{code:D.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),B(r,{code:D.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),B(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):he.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return B(n,{code:D.invalid_type,expected:q.bigint,received:n.parsedType}),X}gte(e,n){return this.setLimit("min",e,!0,K.toString(n))}gt(e,n){return this.setLimit("min",e,!1,K.toString(n))}lte(e,n){return this.setLimit("max",e,!0,K.toString(n))}lt(e,n){return this.setLimit("max",e,!1,K.toString(n))}setLimit(e,n,r,s){return new qs({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:K.toString(s)}]})}_addCheck(e){return new qs({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:K.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:K.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}qs.create=t=>new qs({checks:[],typeName:ee.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...ie(t)});class bu extends ue{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){const r=this._getOrReturnCtx(e);return B(r,{code:D.invalid_type,expected:q.boolean,received:r.parsedType}),X}return Yt(e.data)}}bu.create=t=>new bu({typeName:ee.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ie(t)});class ao extends ue{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){const i=this._getOrReturnCtx(e);return B(i,{code:D.invalid_type,expected:q.date,received:i.parsedType}),X}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return B(i,{code:D.invalid_date}),X}const r=new Lt;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),B(s,{code:D.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),B(s,{code:D.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):he.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ao({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:K.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:K.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}ao.create=t=>new ao({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ee.ZodDate,...ie(t)});class Bw extends ue{_parse(e){if(this._getType(e)!==q.symbol){const r=this._getOrReturnCtx(e);return B(r,{code:D.invalid_type,expected:q.symbol,received:r.parsedType}),X}return Yt(e.data)}}Bw.create=t=>new Bw({typeName:ee.ZodSymbol,...ie(t)});class Uw extends ue{_parse(e){if(this._getType(e)!==q.undefined){const r=this._getOrReturnCtx(e);return B(r,{code:D.invalid_type,expected:q.undefined,received:r.parsedType}),X}return Yt(e.data)}}Uw.create=t=>new Uw({typeName:ee.ZodUndefined,...ie(t)});class zw extends ue{_parse(e){if(this._getType(e)!==q.null){const r=this._getOrReturnCtx(e);return B(r,{code:D.invalid_type,expected:q.null,received:r.parsedType}),X}return Yt(e.data)}}zw.create=t=>new zw({typeName:ee.ZodNull,...ie(t)});class Ww extends ue{constructor(){super(...arguments),this._any=!0}_parse(e){return Yt(e.data)}}Ww.create=t=>new Ww({typeName:ee.ZodAny,...ie(t)});class Hw extends ue{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Yt(e.data)}}Hw.create=t=>new Hw({typeName:ee.ZodUnknown,...ie(t)});class is extends ue{_parse(e){const n=this._getOrReturnCtx(e);return B(n,{code:D.invalid_type,expected:q.never,received:n.parsedType}),X}}is.create=t=>new is({typeName:ee.ZodNever,...ie(t)});class qw extends ue{_parse(e){if(this._getType(e)!==q.undefined){const r=this._getOrReturnCtx(e);return B(r,{code:D.invalid_type,expected:q.void,received:r.parsedType}),X}return Yt(e.data)}}qw.create=t=>new qw({typeName:ee.ZodVoid,...ie(t)});class Ln extends ue{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==q.array)return B(n,{code:D.invalid_type,expected:q.array,received:n.parsedType}),X;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(B(n,{code:o?D.too_big:D.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(B(n,{code:D.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(B(n,{code:D.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new ss(n,o,n.path,a)))).then(o=>Lt.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new ss(n,o,n.path,a)));return Lt.mergeArray(r,i)}
vendor: 5,073 bytes, line 284
284get element(){return this._def.type}min(e,n){return new Ln({...this._def,minLength:{value:e,message:K.toString(n)}})}max(e,n){return new Ln({...this._def,maxLength:{value:e,message:K.toString(n)}})}length(e,n){return new Ln({...this._def,exactLength:{value:e,message:K.toString(n)}})}nonempty(e){return this.min(1,e)}}Ln.create=(t,e)=>new Ln({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...ie(e)});function di(t){if(t instanceof Oe){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Gr.create(di(r))}return new Oe({...t._def,shape:()=>e})}else return t instanceof Ln?new Ln({...t._def,type:di(t.element)}):t instanceof Gr?Gr.create(di(t.unwrap())):t instanceof uo?uo.create(di(t.unwrap())):t instanceof Ks?Ks.create(t.items.map(e=>di(e))):t}class Oe extends ue{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=he.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==q.object){const c=this._getOrReturnCtx(e);return B(c,{code:D.invalid_type,expected:q.object,received:c.parsedType}),X}const{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof is&&this._def.unknownKeys==="strip"))for(const c in s.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=i[c],h=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ss(s,h,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof is){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(B(s,{code:D.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const h=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ss(s,h,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const h=await u.key,p=await u.value;c.push({key:h,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Lt.mergeObjectSync(r,c)):Lt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return K.errToObj,new Oe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:K.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new Oe({...this._def,unknownKeys:"strip"})}passthrough(){return new Oe({...this._def,unknownKeys:"passthrough"})}extend(e){return new Oe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Oe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ee.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Oe({...this._def,catchall:e})}pick(e){const n={};for(const r of he.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Oe({...this._def,shape:()=>n})}omit(e){const n={};for(const r of he.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new Oe({...this._def,shape:()=>n})}deepPartial(){return di(this)}partial(e){const n={};for(const r of he.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new Oe({...this._def,shape:()=>n})}required(e){const n={};for(const r of he.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Gr;)i=i._def.innerType;n[r]=i}return new Oe({...this._def,shape:()=>n})}keyof(){return ME(he.objectKeys(this.shape))}}Oe.create=(t,e)=>new Oe({shape:()=>t,unknownKeys:"strip",catchall:is.create(),typeName:ee.ZodObject,...ie(e)});Oe.strictCreate=(t,e)=>new Oe({shape:()=>t,unknownKeys:"strict",catchall:is.create(),typeName:ee.ZodObject,...ie(e)});Oe.lazycreate=(t,e)=>new Oe({shape:t,unknownKeys:"strip",catchall:is.create(),typeName:ee.ZodObject,...ie(e)});class _u extends ue{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new ur(a.ctx.common.issues));return B(n,{code:D.invalid_union,unionErrors:o}),X}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;
vendor: 4,999 bytes, line 284
284const a=o.map(l=>new ur(l));return B(n,{code:D.invalid_union,unionErrors:a}),X}}get options(){return this._def.options}}_u.create=(t,e)=>new _u({options:t,typeName:ee.ZodUnion,...ie(e)});function yp(t,e){const n=Cr(t),r=Cr(e);if(t===e)return{valid:!0,data:t};if(n===q.object&&r===q.object){const s=he.objectKeys(e),i=he.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(const a of i){const l=yp(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===q.array&&r===q.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],a=e[i],l=yp(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===q.date&&r===q.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ku extends ue{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(i,o)=>{if($w(i)||$w(o))return X;const a=yp(i.value,o.value);return a.valid?((Vw(i)||Vw(o))&&n.dirty(),{status:n.value,value:a.data}):(B(r,{code:D.invalid_intersection_types}),X)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ku.create=(t,e,n)=>new ku({left:t,right:e,typeName:ee.ZodIntersection,...ie(n)});class Ks extends ue{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==q.array)return B(r,{code:D.invalid_type,expected:q.array,received:r.parsedType}),X;if(r.data.length<this._def.items.length)return B(r,{code:D.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),X;!this._def.rest&&r.data.length>this._def.items.length&&(B(r,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new ss(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Lt.mergeArray(n,o)):Lt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Ks({...this._def,rest:e})}}Ks.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ks({items:t,typeName:ee.ZodTuple,rest:null,...ie(e)})};class Kw extends ue{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==q.map)return B(r,{code:D.invalid_type,expected:q.map,received:r.parsedType}),X;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new ss(r,a,r.path,[c,"key"])),value:i._parse(new ss(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return X;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return X;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Kw.create=(t,e,n)=>new Kw({valueType:e,keyType:t,typeName:ee.ZodMap,...ie(n)});class Wa extends ue{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==q.set)return B(r,{code:D.invalid_type,expected:q.set,received:r.parsedType}),X;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(B(r,{code:D.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(B(r,{code:D.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return X;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new ss(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,n){return new Wa({...this._def,minSize:{value:e,message:K.toString(n)}})}max(e,n){return new Wa({...this._def,maxSize:{value:e,message:K.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Wa.create=(t,e)=>new Wa({valueType:t,minSize:null,maxSize:null,typeName:ee.ZodSet,...ie(e)});class Gw extends ue{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Gw.create=(t,e)=>new Gw({getter:t,typeName:ee.ZodLazy,...ie(e)});class Zw extends ue{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return B(n,{received:n.data,code:D.invalid_literal,expected:this._def.value}),X}
vendor: 5,353 bytes, line 284
284return{status:"valid",value:e.data}}get value(){return this._def.value}}Zw.create=(t,e)=>new Zw({value:t,typeName:ee.ZodLiteral,...ie(e)});function ME(t,e){return new lo({values:t,typeName:ee.ZodEnum,...ie(e)})}class lo extends ue{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return B(n,{expected:he.joinValues(r),received:n.parsedType,code:D.invalid_type}),X}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return B(n,{received:n.data,code:D.invalid_enum_value,options:r}),X}return Yt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return lo.create(e,{...this._def,...n})}exclude(e,n=this._def){return lo.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}lo.create=ME;class Yw extends ue{_parse(e){const n=he.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==q.string&&r.parsedType!==q.number){const s=he.objectValues(n);return B(r,{expected:he.joinValues(s),received:r.parsedType,code:D.invalid_type}),X}if(this._cache||(this._cache=new Set(he.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=he.objectValues(n);return B(r,{received:r.data,code:D.invalid_enum_value,options:s}),X}return Yt(e.data)}get enum(){return this._def.values}}Yw.create=(t,e)=>new Yw({values:t,typeName:ee.ZodNativeEnum,...ie(e)});class Su extends ue{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==q.promise&&n.common.async===!1)return B(n,{code:D.invalid_type,expected:q.promise,received:n.parsedType}),X;const r=n.parsedType===q.promise?n.data:Promise.resolve(n.data);return Yt(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Su.create=(t,e)=>new Su({type:t,typeName:ee.ZodPromise,...ie(e)});class co extends ue{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{B(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return X;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?X:l.status==="dirty"||n.value==="dirty"?Ko(l.value):l});{if(n.value==="aborted")return X;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?X:a.status==="dirty"||n.value==="dirty"?Ko(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?X:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?X:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!oo(o))return X;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>oo(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):X);he.assertNever(s)}}co.create=(t,e,n)=>new co({schema:t,typeName:ee.ZodEffects,effect:e,...ie(n)});co.createWithPreprocess=(t,e,n)=>new co({schema:e,effect:{type:"preprocess",transform:t},typeName:ee.ZodEffects,...ie(n)});class Gr extends ue{_parse(e){return this._getType(e)===q.undefined?Yt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Gr.create=(t,e)=>new Gr({innerType:t,typeName:ee.ZodOptional,...ie(e)});class uo extends ue{_parse(e){return this._getType(e)===q.null?Yt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}uo.create=(t,e)=>new uo({innerType:t,typeName:ee.ZodNullable,...ie(e)});class vp extends ue{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===q.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}vp.create=(t,e)=>new vp({innerType:t,typeName:ee.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ie(e)});class wp extends ue{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return xu(s)?s.then(i=>
284({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ur(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ur(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}wp.create=(t,e)=>new wp({innerType:t,typeName:ee.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ie(e)});class Jw extends ue{_parse(e){if(this._getType(e)!==q.nan){const r=this._getOrReturnCtx(e);return B(r,{code:D.invalid_type,expected:q.nan,received:r.parsedType}),X}return{status:"valid",value:e.data}}}Jw.create=t=>new Jw({typeName:ee.ZodNaN,...ie(t)});class WF extends ue{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Sg extends ue{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?X:i.status==="dirty"?(n.dirty(),Ko(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?X:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new Sg({in:e,out:n,typeName:ee.ZodPipeline})}}class xp extends ue{_parse(e){const n=this._def.innerType._parse(e),r=s=>(oo(s)&&(s.value=Object.freeze(s.value)),s);return xu(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}xp.create=(t,e)=>new xp({innerType:t,typeName:ee.ZodReadonly,...ie(e)});Oe.lazycreate;var ee;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ee||(ee={}));const bp=nr.create;Hs.create;qs.create;bu.create;ao.create;is.create;Ln.create;const HF=Oe.create;Oe.strictCreate;_u.create;ku.create;Ks.create;lo.create;Su.create;Gr.create;uo.create;const Qw={string:t=>nr.create({...t,coerce:!0}),number:t=>Hs.create({...t,coerce:!0}),boolean:t=>bu.create({...t,coerce:!0}),bigint:t=>qs.create({...t,coerce:!0}),date:t=>ao.create({...t,coerce:!0})},$E=bp().trim().email({message:"Please enter a valid email"}).max(255),qF=HF({email:$E,company:bp().trim().min(1,{message:"Company is required"}).max(120),accountsManaged:Qw.number({invalid_type_error:"Enter a number of accounts"}).int().min(0,{message:"Enter a number of accounts"}).max(1e5),csmCount:Qw.number({invalid_type_error:"Enter a number of CSMs"}).int().min(0,{message:"Enter a number of CSMs"}).max(1e4),currentTool:bp().trim().max(120).optional()}),Eg=({variant:t="default",className:e="",plan:n,submitLabel:r})=>{const[s,i]=b.useState(""),[o,a]=b.useState(""),[l,c]=b.useState(""),[u,h]=b.useState(""),[p,f]=b.useState(""),[m,y]=b.useState(!1),[x,v]=b.useState(!1),[g,w]=b.useState(""),_=b.useRef();b.useEffect(()=>()=>clearTimeout(_.current),[]);const k=()=>{v(!0),_.current=setTimeout(()=>v(!1),6e3)},S=async O=>{y(!0);const N=`${O.company!=null?"qualified":"email-only"}:${n??t}`;
284Ht("waitlist_form_submit",{properties:{variant:N,qualified:O.company!=null}});try{const{data:z,error:M}=await hg.functions.invoke("waitlist-signup",{body:O});if(M)throw M;(z==null?void 0:z.status)==="duplicate"?(Ht("waitlist_signup_duplicate",{properties:{variant:N}}),lc.info("You're already on the waitlist!"),k()):(Ht("waitlist_signup_success",{properties:{variant:N,plan:n??null,accounts_managed:O.accounts_managed??null,csm_count:O.csm_count??null}}),lc.success("You're on the list! Check your inbox for a confirmation email."),k()),i(""),a(""),c(""),h(""),f("")}catch(z){Ht("waitlist_signup_error",{properties:{variant:N}}),console.error("Waitlist signup error:",z),lc.error("Something went wrong. Please try again.")}finally{y(!1)}},E=async O=>{O.preventDefault(),w("");const N=$E.safeParse(s);if(!N.success){w(N.error.errors[0].message);return}await S({email:N.data,plan:n??null})},C=async O=>{O.preventDefault(),w("");const N=qF.safeParse({email:s,company:o,accountsManaged:l,csmCount:u,currentTool:p});if(!N.success){w(N.error.errors[0].message);return}const z=N.data;await S({email:z.email,plan:n??null,company:z.company,accounts_managed:z.accountsManaged,csm_count:z.csmCount,current_tool:z.currentTool||null})};if(x)return d.jsxs($.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:`flex items-center justify-center gap-2 text-success ${e}`,role:"status",children:[d.jsx(TP,{className:"w-5 h-5"}),d.jsx("span",{className:"font-medium",children:"You're on the waitlist!"})]});if(t==="inline")return d.jsxs("form",{onSubmit:E,className:`flex flex-col gap-2 ${e}`,children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx(kr,{type:"email",placeholder:"Enter your work email","aria-label":"Work email address",value:s,onChange:O=>i(O.target.value),className:"flex-1 bg-background/50 border-border",disabled:m}),d.jsx(Ce,{type:"submit",disabled:m,size:"sm","aria-label":m?"Joining waitlist":"Join waitlist",children:m?d.jsx(ac,{className:"w-4 h-4 animate-spin"}):"Join"})]}),g&&d.jsx($.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"text-sm text-destructive",children:g})]});if(t==="dark")return d.jsxs("form",{onSubmit:E,className:`flex flex-col sm:flex-row gap-3 ${e}`,children:[d.jsx(kr,{type:"email",placeholder:"Enter your work email","aria-label":"Work email address",value:s,onChange:O=>{i(O.target.value),w("")},className:"bg-white/10 border-white/20 text-secondary-foreground placeholder:text-secondary-foreground/50 focus:border-primary",disabled:m}),d.jsx(Ce,{type:"submit",disabled:m,"aria-label":m?"Joining waitlist":"Subscribe to waitlist",className:"bg-primary hover:bg-primary-light text-primary-foreground px-6 gap-2 whitespace-nowrap group",children:m?d.jsx(ac,{className:"w-4 h-4 animate-spin"}):d.jsxs(d.Fragment,{children:["Subscribe",d.jsx(eo,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})}),g&&d.jsx("p",{className:"text-sm text-destructive",children:g})]});const A=t==="hero",T=`wl-${n??t}`;return d.jsxs("form",{onSubmit:C,className:`space-y-3 ${A?"rounded-2xl border border-border/60 bg-background/70 backdrop-blur-sm p-5":""} ${e}`,children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[d.jsxs("div",{className:"space-y-1.5 sm:col-span-2",children:[d.jsx(ui,{htmlFor:`${T}-email`,className:"text-xs font-medium text-muted-foreground",children:"Work email"}),d.jsx(kr,{id:`${T}-email`,type:"email",required:!0,placeholder:"[email protected]",value:s,onChange:O=>{i(O.target.value),w("")},className:"h-11",disabled:m})]}),d.jsxs("div",{className:"space-y-1.5 sm:col-span-2",children:[d.jsx(ui,{htmlFor:`${T}-company`,className:"text-xs font-medium text-muted-foreground",children:"Company"}),d.jsx(kr,{id:`${T}-company`,required:!0,placeholder:"Company name",value:o,onChange:O=>{a(O.target.value),w("")},className:"h-11",disabled:m})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(ui,{htmlFor:`${T}-accounts`,className:"text-xs font-medium text-muted-foreground",children:"Customer accounts managed"}),d.jsx(kr,{id:`${T}-accounts`,type:"number",min:0,required:!0,inputMode:"numeric",placeholder:"e.g. 40",value:l,onCh
284ange:O=>{c(O.target.value),w("")},className:"h-11",disabled:m})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(ui,{htmlFor:`${T}-csms`,className:"text-xs font-medium text-muted-foreground",children:"CSMs on the team"}),d.jsx(kr,{id:`${T}-csms`,type:"number",min:0,required:!0,inputMode:"numeric",placeholder:"e.g. 4",value:u,onChange:O=>{h(O.target.value),w("")},className:"h-11",disabled:m})]}),d.jsxs("div",{className:"space-y-1.5 sm:col-span-2",children:[d.jsxs(ui,{htmlFor:`${T}-tool`,className:"text-xs font-medium text-muted-foreground",children:["Current CS tool ",d.jsx("span",{className:"font-normal",children:"(optional)"})]}),d.jsx(kr,{id:`${T}-tool`,placeholder:"Gainsight, spreadsheets, noneâ¦",value:p,onChange:O=>f(O.target.value),className:"h-11",disabled:m})]})]}),d.jsx(Ce,{type:"submit",disabled:m,size:"lg",className:"w-full h-12","aria-label":m?"Joining waitlist":r??"Join the waitlist",children:m?d.jsx(ac,{className:"w-5 h-5 animate-spin"}):d.jsxs(d.Fragment,{children:[r??"Join the waitlist",d.jsx(eo,{className:"ml-2 w-4 h-4"})]})}),g&&d.jsx($.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"text-sm text-destructive",role:"alert",children:g})]})},KF=()=>d.jsx("section",{className:"section-padding bg-background border-t border-border","aria-labelledby":"cta-heading",children:d.jsx("div",{className:"container-tight",children:d.jsxs($.div,{className:"grid lg:grid-cols-2 gap-12 items-start",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-primary mb-4",children:"EARLY ACCESS"}),d.jsx("h2",{id:"cta-heading",className:"heading-lg mb-6",children:"Turn customer value into a revenue advantage."}),d.jsx("p",{className:"text-body mb-8",children:"Know which customers are realizing value, where revenue is exposed, and where your team should act next."}),d.jsx(Ce,{size:"lg",className:"h-12 px-6 gap-2 group",asChild:!0,onClick:()=>Ht("demo_request_click",{properties:{cta:"footer_book_demo"}}),children:d.jsxs("a",{href:"mailto:[email protected]?subject=Book%20an%20Early%20Access%20Demo%20of%20Zaptor",children:["Book an Early Access Demo",d.jsx(eo,{className:"h-4 w-4 transition-transform group-hover:translate-x-1"})]})})]}),d.jsxs("div",{id:"waitlist",className:"scroll-mt-28 rounded-2xl border border-border bg-card p-8",children:[d.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Join Early Access"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Tell us about your book of business and we will be in touch as places open."}),d.jsx(Eg,{variant:"hero",plan:"cta-section"})]})]})})}),Eu="cookie_consent",Cu="cookie_consent_reopen",GF=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB","CH","CA"];async function Cg(){var t;try{const e=await fetch("/cdn-cgi/trace",{signal:AbortSignal.timeout(2e3)});if(!e.ok)return!0;const n=(t=(await e.text()).match(/^loc=([A-Z0-9]{2})$/m))==null?void 0:t[1];return!n||n==="XX"||n==="T1"?!0:GF.includes(n)}catch{return!0}}async function ZF(){const t=localStorage.getItem(Eu);return t?t==="granted":sessionStorage.getItem(Cu)?!1:!await Cg()}function VE(){localStorage.removeItem(Eu),sessionStorage.setItem(Cu,"1"),location.reload()}function Xw(t){var e;(e=window.gtag)==null||e.call(window,"consent","update",{ad_storage:t,ad_user_data:t,ad_personalization:t,analytics_storage:t})}const YF=()=>{const[t,e]=b.useState(!1);b.useEffect(()=>{const r=localStorage.getItem(Eu);if(r==="granted"||r==="denied"){Xw(r);return}if(sessionStorage.getItem(Cu)){e(!0);return}let s=!1;return Cg().then(i=>{i&&!s&&e(!0)}),()=>{s=!0}},[]);const n=r=>{localStorage.setItem(Eu,r),sessionStorage.removeItem(Cu),Xw(r),e(!1)};return d.jsx(ag,{children:t&&d.jsx($.div,{role:"dialog","aria-label":"Cookie consent",initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},transition:{type:"spring",stiffness:260,damping:26},className:"fixed inset-x-0 bottom-0 z-50 border-t border-border bg-background/95 backdrop-blur-md",children:d.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(AP,{className:"h-5 w-5 text-primary mt-0.5 shrink-0","aria-hidden":"true"}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:["We use cookies to measure our advertising and site analytics. You can change this any time from"," ",d.jsx("span",{className:"text-foreground",children:"Cookie settings"})," in the footer. See our"," ",d.jsx("a",{href:"/privacy",className:"underline text-foreground hover:text-primary",children:"privacy policy"}),"."]})]}),d.jsxs("div",{className:"flex gap-2 shrink-0",children:[d.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>n("denied"),children:"Reject"}),d.jsx(Ce,{size:"sm",onClick:()=>n("granted"),children:"Accept"})]})]})})})},JF=[.22,1,.36,1],QF={hidden:{opacity:0}
284,visible:{opacity:1,transition:{staggerChildren:.08,delayChildren:.1}}},ex={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:JF}}},XF={Product:[{label:"Product",href:"/#product"},{label:"How it works",href:"/#how-it-works"},{label:"Value Intelligence",href:"/#value-intelligence"},{label:"Integrations",href:"/#integrations"},{label:"Security",href:"/#security"},{label:"Pricing",href:"/pricing"},{label:"FAQ",href:"/#faq"},{label:"Early access",href:"/#waitlist"}],Company:[{label:"Book a demo",href:"mailto:[email protected]?subject=Book%20a%20demo%20of%20Zaptor"},{label:"Contact",href:"mailto:[email protected]?subject=Zaptor%20inquiry"},{label:"Support",href:"mailto:[email protected]?subject=Zaptor%20support"}],Legal:[{label:"Privacy",href:"/privacy"},{label:"Terms",href:"/terms"}]},al=()=>d.jsxs("footer",{id:"company",className:"bg-secondary text-secondary-foreground scroll-mt-24",children:[d.jsx("div",{className:"border-b border-white/10",children:d.jsx($.div,{className:"container-tight py-16",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.6},children:d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-8",children:[d.jsxs($.div,{className:"max-w-md",initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:.1,duration:.5},children:[d.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Stay up to date"}),d.jsx("p",{className:"text-secondary-foreground/70",children:"Get early access news and customer value research. No spam, unsubscribe anytime."})]}),d.jsx($.div,{className:"max-w-md w-full lg:w-auto",initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:.2,duration:.5},children:d.jsx(Eg,{variant:"dark",plan:"footer-newsletter"})})]})})}),d.jsxs("div",{className:"container-tight py-16",children:[d.jsxs($.div,{className:"grid lg:grid-cols-5 gap-12",initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-50px"},variants:QF,children:[d.jsxs($.div,{className:"lg:col-span-2",variants:ex,children:[d.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[d.jsx($.div,{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center",whileHover:{scale:1.1,rotate:5},transition:{type:"spring",stiffness:400},children:d.jsx("span",{className:"text-primary-foreground font-bold text-sm",children:"Z"})}),d.jsx("span",{className:"text-xl font-semibold",children:"Zaptor"})]}),d.jsx("p",{className:"text-secondary-foreground/70 mb-6 leading-relaxed text-sm",children:"The customer value intelligence layer for B2B SaaS. Zaptor connects customer goals, product adoption, business outcomes and revenue signals into one measurable value story."}),d.jsx($.a,{href:"https://www.linkedin.com/company/zaptor-ai",target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 bg-white/10 rounded-lg flex items-center justify-center hover:bg-white/20 transition-colors","aria-label":"Zaptor.ai on LinkedIn",whileHover:{scale:1.1,y:-2},transition:{type:"spring",stiffness:400},children:d.jsx(LP,{className:"h-4 w-4"})})]}),Object.entries(XF).map(([t,e])=>d.jsxs($.div,{variants:ex,children:[d.jsx("h4",{className:"font-semibold mb-4 text-sm",children:t}),d.jsx("ul",{className:"space-y-3",children:e.map(n=>d.jsx("li",{children:d.jsx($.a,{href:n.href,className:"text-sm text-secondary-foreground/70 hover:text-secondary-foreground transition-colors",whileHover:{x:4},transition:{type:"spring",stiffness:400},children:n.label})},n.label))})]},t))]}),d.jsxs($.div,{className:"mt-16 pt-8 border-t border-white/10 flex flex-col md:flex-row justify-between items-center gap-4",initial:{opacity:0}
284,whileInView:{opacity:1},viewport:{once:!0},transition:{delay:.3,duration:.5},children:[d.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-2 sm:gap-4",children:[d.jsxs("p",{className:"text-sm text-secondary-foreground/50",children:["© ",new Date().getFullYear()," Zaptor.ai LLC. All rights reserved."]}),d.jsx("button",{type:"button",onClick:VE,className:"text-sm text-secondary-foreground/50 hover:text-secondary-foreground underline transition-colors",children:"Cookie settings"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"relative flex h-2 w-2",children:[d.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),d.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),d.jsx("span",{className:"text-sm text-secondary-foreground/50",children:"Early access open"})]})]})]})]}),eB=()=>(b.useEffect(()=>{const t={"@context":"https://schema.org","@type":"Organization",name:"Zaptor.ai LLC",alternateName:"Zaptor",url:"https://zaptor.ai",logo:"https://zaptor.ai/favicon.png",email:"[email protected]",foundingLocation:"California, USA",description:"Zaptor.ai LLC builds Zaptor, the customer value intelligence layer for B2B SaaS, connecting customer goals, product adoption, business outcomes and revenue signals.",sameAs:["https://www.linkedin.com/company/zaptor-ai"]},e={"@context":"https://schema.org","@type":"SoftwareApplication",name:"Zaptor",alternateName:["Zaptor Customer Value Intelligence","Zaptor.ai"],applicationCategory:"BusinessApplication",applicationSubCategory:"Customer value intelligence platform",operatingSystem:"Web",url:"https://zaptor.ai/",description:"Zaptor connects what customers were promised, what they actually adopted, the business outcomes they achieved, and the revenue opportunities that come next â showing realized value, renewal exposure and expansion opportunity per account.",featureList:["Customer Value Graph: business objective through to renewal or expansion impact","Value Brief per account with validated value realized and unrealized opportunity","Renewal exposure and expansion opportunity identification","Executive QBR generation from the Value Brief","Value model templates by category (arriving in early access)","Pascal, the AI assistant embedded in Zaptor"],audience:{"@type":"Audience",audienceType:"VP Customer Success, Chief Customer Officer, CRO, CS Operations, Revenue Operations, Customer Success Managers at B2B enterprise SaaS companies"}},n={"@context":"https://schema.org","@type":"FAQPage",mainEntity:NE.map(i=>({"@type":"Question",name:i.question,acceptedAnswer:{"@type":"Answer",text:i.answer}}))},s=[t,e,n,{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://zaptor.ai"}]}].map(i=>{const o=document.createElement("script");return o.type="application/ld+json",o.text=JSON.stringify(i),o});return s.forEach(i=>document.head.appendChild(i)),()=>{s.forEach(i=>{document.head.contains(i)&&document.head.removeChild(i)})}},[]),null),tB=()=>d.jsxs("div",{className:"min-h-screen",children:[d.jsx(eB,{}),d.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 bg-primary text-primary-foreground px-4 py-2 rounded-md z-50",children:"Skip to main content"}),d.jsx(ol,{}),d.jsx(u5,{}),d.jsx(m5,{}),d.jsxs("main",{id:"main-content",role:"main",children:[d.jsx(S5,{}),d.jsx(v5,{}),d.jsx(w5,{}),d.jsx(C5,{}),d.jsx(A5,{}),d.jsx(R5,{}),d.jsx(b5,{}),d.jsx(N5,{}),d.jsx($5,{}),d.jsx(B5,{}),d.jsx(W5,{}),d.jsx(L5,{}),d.jsx(q5,{}),d.jsx(G5,{}),d.jsx(Z5,{}),d.jsx(gF,{})]}),d.jsx(KF,{}),d.jsx(al,{})]}),bc="live_44ce33a2023550f468b81958563";function Tg(){return bc!=null&&bc.startsWith("test_")?"sandbox":"live"}let tx=!1;async function nB(){if(!tx)return new Promise((t,e)=>{const n=document.createElement("script");n.src="https://cdn.paddle.com/paddle/v2/paddle.js",n.onload=()=>{const r=Tg()==="sandbox"?"sandbox":"production";window.Paddle.Environment.set(r),window.Paddle.Initialize({token:bc}),tx=!0,t()},n.onerror=e,document.head.appendChild(n)})}async function rB(t){const e=Tg(),{data:n,error:r}=await hg.functions.invoke("get-paddle-price",{body:{priceId:t,environment:e}});if(r||!(n!=null&&n.paddleId))throw new Error(`Failed to resolve price: ${t}`);return n.paddleId}function sB(){return Tg()!=="sandbox"?null:d.jsxs("div",{className:"w-full bg-orange-100 border-b border-orange-300 px-4 py-2 text-center text-sm text-orange-800",children:["All payments made in the preview are in test mode."," ",d.jsx("a",{href:"https://docs.lovable.dev/features/payments#test-and-live-environments",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"Read more"})]})}const FE=b.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:He("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));
284FE.displayName="Card";const iB=b.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:He("flex flex-col space-y-1.5 p-6",t),...e}));iB.displayName="CardHeader";const oB=b.forwardRef(({className:t,...e},n)=>d.jsx("h3",{ref:n,className:He("text-2xl font-semibold leading-none tracking-tight",t),...e}));oB.displayName="CardTitle";const aB=b.forwardRef(({className:t,...e},n)=>d.jsx("p",{ref:n,className:He("text-sm text-muted-foreground",t),...e}));aB.displayName="CardDescription";const lB=b.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:He("p-6 pt-0",t),...e}));lB.displayName="CardContent";const cB=b.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:He("flex items-center p-6 pt-0",t),...e}));cB.displayName="CardFooter";function uB(){const[t,e]=b.useState(null);return{openCheckout:async r=>{e(r.priceId);try{await nB();const s=await rB(r.priceId);window.Paddle.Checkout.open({items:[{priceId:s,quantity:r.quantity??1}],customer:r.customerEmail?{email:r.customerEmail}:void 0,customData:r.customData,settings:{displayMode:"overlay",successUrl:r.successUrl||`${window.location.origin}/pricing?checkout=success`,allowLogout:!1,variant:"one-page"}})}catch(s){console.error("Checkout error:",s),lc.error("Couldn't open checkout. Please try again or email [email protected].")}finally{e(null)}},loadingPriceId:t}}const dB=[{name:"Starter",monthlyPrice:249,monthlyPriceId:"starter_monthly",annualPriceId:"starter_annual",description:"For a single CSM getting their book under AI coverage",features:["Up to 15 customer accounts","2 user seats included","Customer value realization scoring","Churn risk detection","Weekly digest reports","2 integrations (CRM, Support)","Fair-use AI allowance ($0.02 / 1K tokens overage)"],highlighted:!1},{name:"Professional",monthlyPrice:699,monthlyPriceId:"professional_monthly",annualPriceId:"professional_annual",description:"For CS teams running full books with automation and client-ready output",features:["Up to 50 customer accounts","Seats sold separately ($89/seat/month)","Value risk detection with evidence-backed insights","Upsell & expansion opportunity detection","Real-time health monitoring","Custom playbooks & automations","Weekly customer summaries","Exportable client reports (PPT, PDF)","Quarterly business reviews","Unlimited integrations","Higher fair-use AI allowance ($0.02 / 1K tokens overage)"],highlighted:!0},{name:"Enterprise",monthlyPrice:null,monthlyPriceId:null,annualPriceId:null,description:"Custom programs from $1,500/month â schedule a call for scoping",features:["Unlimited customer accounts","Full AI agent automation","Custom data models & scoring","Custom AI workflows & automation","White-label options","Advanced security controls & compliance roadmap","Unlimited user seats","Custom integrations","Quarterly business reviews","Committed AI capacity with negotiated overage rate"],highlighted:!1}],hB=()=>{const[t,e]=b.useState(!1),[n,r]=b.useState(null),{openCheckout:s,loadingPriceId:i}=uB(),o=h=>{const p=t?h.annualPriceId:h.monthlyPriceId;p&&(Ht("checkout_open",{properties:{plan:h.name,price_id:p,billing:t?"annual":"monthly"}}),s({priceId:p,customData:{plan:h.name}}))},a=h=>h===null?"From $1,500":t?`$${Math.round(h*10/12)}`:`$${h}`,l=h=>h===null?null:h*2,c={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},u={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5}}};return d.jsx("section",{className:"py-16 px-4","aria-labelledby":"pricing-heading",children:d.jsxs("div",{className:"container mx-auto max-w-7xl",children:[d.jsxs($.div,{className:"flex items-center justify-center gap-4 mb-12",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[d.jsx("span",{className:`text-sm font-medium transition-colors ${t?"text-muted-foreground":"text-foreground"}`,children:"Monthly"}),d.jsx("button",{onClick:()=>e(!t),className:`relative w-14 h-7 rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ${t?"bg-primary":"bg-muted"}`,"aria-label":"Toggle annual billing",role:"switch","aria-checked":t,children:d.jsx($.div,{className:"absolute top-1 left-1 w-5 h-5 rounded-full bg-white shadow-md",animate:{x:t?28:0},transition:{type:"spring",stiffness:500,damping:30}})}),d.jsx("span",{className:`text-sm font-medium transition-colors ${t?"text-foreground":"text-muted-foreground"}`,children:"Annual"}),d.jsx("span",{className:"bg-primary/10 text-primary text-xs font-semibold px-2 py-1 rounded-full",children:"2 months free"})]}
284),d.jsx($.div,{variants:c,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},className:"grid md:grid-cols-3 gap-8",children:dB.map(h=>d.jsx($.div,{variants:u,children:d.jsxs(FE,{className:`p-8 h-full flex flex-col ${h.highlighted?"border-primary shadow-elegant scale-105":"border-border"}`,children:[h.highlighted&&d.jsx("div",{className:"bg-primary text-primary-foreground text-sm font-semibold py-1 px-3 rounded-full inline-block mb-4 self-start",children:"Most Popular"}),d.jsx("h2",{className:"text-2xl font-bold mb-2 text-foreground",children:h.name}),d.jsxs("div",{className:"mb-4",children:[d.jsx("span",{className:"text-4xl font-bold text-foreground",children:a(h.monthlyPrice)}),d.jsx("span",{className:"text-muted-foreground",children:"/month"}),t&&h.monthlyPrice!==null&&d.jsxs("div",{className:"mt-1",children:[d.jsxs("span",{className:"text-sm text-muted-foreground line-through mr-2",children:["$",h.monthlyPrice,"/mo"]}),d.jsxs("span",{className:"text-sm text-primary font-medium",children:["Save $",l(h.monthlyPrice),"/yr"]})]}),!t&&h.monthlyPrice!==null&&d.jsx("div",{className:"mt-1 h-5"})]}),d.jsx("p",{className:"text-muted-foreground mb-6",children:h.description}),d.jsx("ul",{className:"space-y-3 mb-8 flex-grow",children:h.features.map((p,f)=>d.jsxs("li",{className:"flex items-start gap-3",children:[d.jsx(kP,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5"}),d.jsx("span",{className:"text-foreground",children:p})]},f))}),h.name==="Enterprise"?d.jsx(Ce,{variant:"outline",className:"w-full",size:"lg",asChild:!0,children:d.jsx("a",{href:"mailto:[email protected]?subject=Zaptor%20Enterprise%20call%20request",children:"Schedule a Call"})}):n===h.name?d.jsx(Eg,{plan:h.name}):d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ce,{variant:h.highlighted?"default":"outline",className:"w-full",size:"lg",onClick:()=>o(h),disabled:i!==null,children:i===(t?h.annualPriceId:h.monthlyPriceId)?d.jsx(ac,{className:"w-5 h-5 animate-spin"}):`Get ${h.name}`}),d.jsx(Ce,{variant:"ghost",className:"w-full",size:"sm",onClick:()=>r(h.name),children:"Or join the waitlist"})]})]})},h.name))}),d.jsxs("p",{className:"text-center text-sm text-muted-foreground mt-8",children:[t?"Billed annually. All prices in USD. ":"All prices in USD. ","Every plan includes a fair-use AI allowance; additional AI usage is billed at a published overage rate of $0.02 per 1,000 tokens."]})]})})},fB=[{question:"Can I change plans at any time?",answer:"Yes! You can upgrade or downgrade your plan at any time. Changes take effect immediately, and we'll prorate any billing adjustments."},{question:"What payment methods do you accept?",answer:"At launch we plan to accept all major credit cards and to offer invoicing for annual Enterprise plans. No payment is collected while Zaptor is in waitlist stage."},{question:"Is there a free trial available?",answer:"Zaptor is pre-launch, so there is no trial yet. Waitlist members get first access to the early-access program before general availability."},{question:"What happens if I exceed my customer account limit?",answer:"Starter includes up to 15 customer accounts and Professional includes up to 50. We'll notify you when you approach your limit, and you can upgrade or contact sales for an add-on pack."},{question:"How do user seats work?",answer:"Starter includes 2 seats. Professional includes the account capacity, with seats sold separately at $89 per seat per month so your seat count can match the size of your CS team. Enterprise includes unlimited seats."},{question:"Is there a limit on AI usage?",answer:"Every plan includes a fair-use AI allowance that covers daily health scoring, churn analysis, meeting summaries, weekly digests and copilot queries for the accounts on your plan. Nothing is throttled if you go beyond it: additional AI usage is billed at a published overage rate of $0.02 per 1,000 tokens, shown on your usage page before it is charged."},{question:"Do you offer discounts for annual billing?",answer:"Yes! Annual billing comes with 2 months free (about 17% savings). Contact our sales team to discu
284ss custom payment terms for Enterprise plans."},{question:"What kind of support is included?",answer:"All plans include support through our embedded AI assistant, Pascal. Professional plans get enhanced AI response prioritization and advanced troubleshooting capabilities. Enterprise plans receive 24/7 AI agent assistance with custom response patterns tailored to your organization."},{question:"Can I integrate Zaptor with my existing tools?",answer:"Yes. Zaptor offers pre-built integrations with popular CRM and support platforms. Starter includes 2 integrations, Professional includes unlimited integrations, and Enterprise adds custom integrations. Contact us for specific integration requirements."},{question:"Is my data secure?",answer:"Security is a core design goal: data is encrypted in transit and at rest with strict access controls. Formal certifications such as SOC 2 are planned for the enterprise tier and are not in place yet."}],pB=()=>d.jsx("section",{className:"py-16 px-4 bg-muted/30","aria-labelledby":"pricing-faq-heading",children:d.jsxs("div",{className:"container mx-auto max-w-3xl",children:[d.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"text-center mb-12",children:[d.jsx("h2",{id:"pricing-faq-heading",className:"text-3xl md:text-4xl font-bold mb-4 text-foreground",children:"Questions, answered"}),d.jsx("p",{className:"text-lg text-muted-foreground",children:"Everything you need to know about our pricing"})]}),d.jsx($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.2},children:d.jsx(jE,{type:"single",collapsible:!0,className:"space-y-4",children:fB.map((t,e)=>d.jsxs(bg,{value:`item-${e}`,className:"bg-background border border-border rounded-lg px-6",children:[d.jsx(_g,{className:"text-left text-foreground hover:text-primary",children:t.question}),d.jsx(kg,{className:"text-muted-foreground",children:t.answer})]},e))})}),d.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.4},className:"text-center mt-12",children:[d.jsx("p",{className:"text-muted-foreground mb-4",children:"Still have questions?"}),d.jsx(Ce,{size:"lg",asChild:!0,children:d.jsx("a",{href:"mailto:[email protected]?subject=Zaptor%20pricing%20question",children:"Contact Sales"})})]})]})}),mB=()=>(b.useEffect(()=>{var e;document.title="Pricing | Zaptor Customer Value Intelligence",(e=document.querySelector('meta[name="description"]'))==null||e.setAttribute("content","Compare Zaptor pricing plans for customer value intelligence. Monthly or annual billing with two months free, from early-stage teams to enterprise.");let t=document.querySelector('link[rel="canonical"]');t||(t=document.createElement("link"),t.setAttribute("rel","canonical"),document.head.appendChild(t)),t.setAttribute("href","https://zaptor.ai/pricing")},[]),d.jsxs(d.Fragment,{children:[d.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 bg-primary text-primary-foreground px-4 py-2 rounded-md z-50",children:"Skip to main content"}),d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(sB,{}),d.jsx(ol,{}),d.jsxs("main",{id:"main-content",children:[d.jsx("section",{className:"pt-32 pb-16 px-4",children:d.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[d.jsx($.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},id:"pricing-heading",className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-6 text-foreground",children:"Simple, Transparent Pricing"}),d.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},className:"text-lg md:text-xl text-muted-foreground",children:"Zaptor is launching soon. Prices below are our planned launch pricingâjoin the waitlist for a plan and we'll reach out with early access."})]})}),d.jsx(hB,{}),d.jsx(pB,{})]}),d.jsx(al,{})]})]})),gB=()=>(b.useEffect(()=>{var t;document.title="Privacy Policy | Zaptor",(t=document.querySelector('meta[name="description"]'))==null||t.setAttribute("content","How Zaptor.ai LLC collects, uses, and protects information submitted through the Zaptor website, including waitlist email addresses.")},[]),d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx("a",{href:"#main-content",className:"sr-only focu
284s:not-sr-only focus:absolute focus:top-4 focus:left-4 bg-primary text-primary-foreground px-4 py-2 rounded-md z-50",children:"Skip to main content"}),d.jsx(ol,{}),d.jsx("main",{id:"main-content",className:"pt-32 pb-24 px-6",children:d.jsxs("div",{className:"container-tight max-w-3xl",children:[d.jsx("h1",{className:"heading-lg mb-4",children:"Privacy Policy"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-10",children:"Last updated: August 29, 2026"}),d.jsxs("div",{className:"space-y-8 text-muted-foreground leading-relaxed",children:[d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Who we are"}),d.jsxs("p",{children:['This website is operated by Zaptor.ai LLC, a limited liability company formed in California, USA ("we", "us"). Zaptor is our forthcoming customer value intelligence product. You can reach us at'," ",d.jsx("a",{className:"text-primary hover:underline underline",href:"mailto:[email protected]",children:"[email protected]"}),"."]})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"What we collect"}),d.jsx("p",{children:"We only collect what you give us. Today that is the email address you submit to join the waitlist or the newsletter, along with the time of submission and, optionally, which pricing plan or page the signup came from. We do not ask for names, payment details, or customer data, and Zaptor is not yet generally available."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"How we use it"}),d.jsx("p",{children:"We use your email address to tell you when Zaptor launches, to invite you to early access, and to send occasional product updates. We do not sell your information, and we do not share it with third parties except the infrastructure providers that host this site and store the waitlist on our behalf."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Retention and security"}),d.jsx("p",{children:"Waitlist entries are kept until launch communications are complete or until you ask us to remove them. Data is stored with access controls in place so that signup emails are not publicly readable, and is encrypted in transit."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Your rights"}),d.jsxs("p",{children:["Depending on where you live, including under the California Consumer Privacy Act and the EU/UK GDPR, you may request access to, correction of, or deletion of your information, and you may opt out of marketing email at any time. Email"," ",d.jsx("a",{className:"text-primary hover:underline underline",href:"mailto:[email protected]?subject=Privacy%20request",children:"[email protected]"})," ","and we will action the request."]})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Cookies, analytics and advertising"}),d.jsx("p",{children:'We use cookies and similar technologies to measure site usage and the performance of our advertising, including Google Ads conversion measurement. Where consent is required (for example in the EEA, the UK, Switzerland and Canada) these are set only after you accept them in our cookie banner, and you can withdraw or change your choice at any time using the "Cookie settings" link in the site footer. If you reject them, we still record aggregate, non-identifying measurement from the ad platform itself.'}),d.jsx("p",{className:"mt-3",children:"When you join the waitlist we may share a secure, irreversible (hashed) version of your email address with Google solely to measure whether an advertisement led to your signup. This is never used to identify you to other visitors, and we share no other personal information with advertising providers."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Changes"}),d.jsx("p",{children:'We may update this policy as the product develops. Material changes will be reflected here with a new "last updated" date.'})]})]})]})}),d.jsx(al,{})]})),yB=()=>(b.useEffect(()=>{var t;document.title="Terms of Use | Zaptor",(t=document.querySelector('meta[name="description"]'))==null||t.setAttribute("content","Terms of use for the Zaptor website, including waitlist signups, pre-launch pricing information, and limitations of liability.")},[]),d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx("a",{href:"#main-content",className:"sr-only focu
284s:not-sr-only focus:absolute focus:top-4 focus:left-4 bg-primary text-primary-foreground px-4 py-2 rounded-md z-50",children:"Skip to main content"}),d.jsx(ol,{}),d.jsx("main",{id:"main-content",className:"pt-32 pb-24 px-6",children:d.jsxs("div",{className:"container-tight max-w-3xl",children:[d.jsx("h1",{className:"heading-lg mb-4",children:"Terms of Use"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-10",children:"Last updated: August 29, 2026"}),d.jsxs("div",{className:"space-y-8 text-muted-foreground leading-relaxed",children:[d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Acceptance"}),d.jsx("p",{children:"By using this website you agree to these terms. The site is operated by Zaptor.ai LLC, a California limited liability company. If you do not agree, please do not use the site."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Pre-launch status"}),d.jsx("p",{children:"Zaptor is not yet generally available. Descriptions of features, integrations, and timelines on this site are forward-looking and may change. Joining the waitlist does not create a contract, reserve capacity, or guarantee access, pricing, or availability."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Pricing information"}),d.jsx("p",{children:"Prices shown are indicative for the planned launch and may change before general availability. Any paid subscription will be governed by a separate agreement presented at the time of purchase."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Acceptable use"}),d.jsx("p",{children:"You agree not to submit email addresses you do not control, to attempt to disrupt or overload the site, or to access the site by automated means for scraping or abuse."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Intellectual property"}),d.jsx("p",{children:"The Zaptor and Zaptor.ai names, logos, site content, and design are owned by Zaptor.ai LLC. You may not copy or reuse them without permission."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Disclaimer and liability"}),d.jsx("p",{children:'The site is provided "as is" without warranties of any kind. To the maximum extent permitted by law, Zaptor.ai LLC is not liable for any indirect, incidental, or consequential damages arising from your use of the site or reliance on its content.'})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Governing law"}),d.jsx("p",{children:"These terms are governed by the laws of the State of California, without regard to conflict-of-law rules."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Contact"}),d.jsxs("p",{children:["Questions about these terms:"," ",d.jsx("a",{className:"text-primary hover:underline underline",href:"mailto:[email protected]?subject=Terms%20question",children:"[email protected]"}),"."]})]})]})]})}),d.jsx(al,{})]})),vB=()=>{const t=nk();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname);const e=document.createElement("meta");e.name="robots",e.content="noindex, nofollow",document.head.appendChild(e);const n=document.title;return document.title="Page not found (404) | Zaptor",()=>{e.remove(),document.title=n}},[t.pathname]),d.jsxs("div",{className:"min-h-screen flex flex-col",children:[d.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 bg-primary text-primary-foreground px-4 py-2 rounded-md z-50",children:"Skip to main content"}),d.jsx(ol,{}),d.jsx("main",{id:"main-content",className:"flex-1 flex items-center justify-center bg-gradient-subtle py-20",children:d.jsxs("div",{className:"max-w-2xl mx-auto px-6 text-center",children:[d.jsxs("div",{className:"mb-8",children:[d.jsx("div",{className:"text-8xl font-bold text-primary/20 mb-4",children:"404"}),d.jsx("div",{className:"w-24 h-1 bg-primary mx-auto rounded-full"})]}),d.jsx("h1",{className:"text-4xl lg:text-5xl font-bold mb-6",children:"Page Not Found"}),d.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"The page you're looking for doesn't exist. It might have been moved, deleted, or you entered the wrong URL."}),d.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-card mb-8",children:[d.jsx("h2",{className:"text-xl font-semibold mb-4",children:"What can you do?"}),d.jsxs("ul",{className:"text-left space-y-3 text-muted-foreground",children:[d.jsxs("li",{className:"flex items-center gap-3",children:[d.jsx(UP,{className:"h-5 w-5 text-primary"}),"Check the URL for typos"]}),d.jsxs("li",{className:"flex items-center gap-3",children:[d.jsx(Jy,{
284className:"h-5 w-5 text-primary"}),"Go back to the previous page"]}),d.jsxs("li",{className:"flex items-center gap-3",children:[d.jsx(Qy,{className:"h-5 w-5 text-primary"}),"Return to our homepage"]})]})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[d.jsxs(Ce,{onClick:()=>window.history.back(),variant:"outline",size:"lg",className:"btn-ghost",children:[d.jsx(Jy,{className:"mr-2 h-5 w-5"}),"Go Back"]}),d.jsxs(Ce,{onClick:()=>window.location.href="/",size:"lg",className:"btn-primary",children:[d.jsx(Qy,{className:"mr-2 h-5 w-5"}),"Back to Home"]})]}),d.jsxs("div",{className:"mt-12 pt-8 border-t border-border",children:[d.jsx("p",{className:"text-muted-foreground mb-4",children:"Still need help? Our CS team is here for you."}),d.jsx(Ce,{variant:"outline",onClick:()=>window.location.href="mailto:[email protected]?subject=Help with Navigation",children:"Contact Support"})]})]})}),d.jsx(al,{})]})},wB={pending:"bg-muted text-muted-foreground",delivered:"bg-success/10 text-success",failed:"bg-destructive/10 text-destructive",skipped:"bg-muted text-muted-foreground"},$o=({label:t,value:e})=>d.jsxs("div",{className:"flex items-baseline justify-between gap-4 py-2 border-b border-border/60 last:border-0",children:[d.jsx("span",{className:"text-sm text-muted-foreground",children:t}),d.jsx("span",{className:"text-sm font-medium text-foreground text-right break-all",children:e})]}),xB=()=>{const[t,e]=b.useState([]),[n,r]=b.useState("checkingâ¦"),[s,i]=b.useState("checkingâ¦"),[o,a]=b.useState([]);b.useEffect(()=>{document.title="Event debug | Zaptor";const u=document.createElement("meta");return u.name="robots",u.content="noindex, nofollow",document.head.appendChild(u),()=>u.remove()},[]),b.useEffect(()=>{e(Rw());const u=i5(e),h=setInterval(()=>{e(Rw()),a([...window.dataLayer??[]])},1e3);return ZF().then(p=>r(p?"granted (ads measurable)":"denied (ads not measured)")),Cg().then(p=>i(p?"consent required (banner shown)":"no consent required (banner hidden)")),()=>{u(),clearInterval(h)}},[]);const l=Array.from(document.querySelectorAll("script[src]")).filter(u=>u.src.includes("googletagmanager.com/gtag/js")),c=l.map(u=>new URL(u.src).searchParams.get("id")).filter(u=>!!u);return d.jsx("main",{className:"min-h-screen bg-background py-16 px-6",children:d.jsxs("div",{className:"max-w-3xl mx-auto space-y-10",children:[d.jsxs("header",{className:"space-y-2",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-primary",children:"Internal tool"}),d.jsx("h1",{className:"text-3xl font-semibold text-foreground",children:"Conversion event debug"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Live view of every tracked event's payload and delivery outcome in this browser session. Not indexed, not linked from the site. Trigger a waitlist signup in another tab, then return here."})]}),d.jsxs("section",{className:"rounded-xl border border-border p-5",children:[d.jsx("h2",{className:"font-semibold text-foreground mb-3",children:"Tracking environment"}),d.jsx($o,{label:"Consent verdict",value:n}),d.jsx($o,{label:"Visitor region",value:s}),d.jsx($o,{label:"Google tag script loaded",value:l.length?`yes (${l.length})`:"no â conversion tag not installed yet"}),d.jsx($o,{label:"Google Ads tag IDs found",value:c.length?[...new Set(c)].join(", "):"none"}),d.jsx($o,{label:"Consent Mode entries in dataLayer",value:String(o.length)}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx(Ce,{size:"sm",variant:"outline",onClick:VE,children:"Reopen consent banner"}),d.jsx(Ce,{size:"sm",variant:"outline",onClick:()=>o5(),children:"Clear captured events"})]})]}),d.jsxs("section",{className:"rounded-xl border border-border p-5",children:[d.jsxs("h2",{className:"font-semibold text-foreground mb-3",children:["Captured events (",t.length,")"]}),t.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No events captured in this session yet."}):d.jsx("ul",{className:"space-y-3",children:t.map(u=>d.jsxs("li",{className:"rounded-lg bg-muted/40 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-2",children:[d.jsx("span",{className:"font-medium text-sm text-foreground",children:u.name}),d.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${wB[u.status]}`,children:u.status})]}),d.jsxs("p",{className:"text-xs text-muted-foreground mb-2",children:[new Date(u.at).toLocaleTimeString()," · sink: ",u.sink,u.detail?` · ${u.detail}`:""]}),d.jsx("pre",{className:"text-xs overflow-x-auto text-foreground
284/80 whitespace-pre-wrap",children:JSON.stringify(u.payload,null,2)})]},u.id))})]}),d.jsxs("section",{className:"rounded-xl border border-border p-5",children:[d.jsx("h2",{className:"font-semibold text-foreground mb-3",children:"Raw dataLayer"}),d.jsx("pre",{className:"text-xs overflow-x-auto text-foreground/80 whitespace-pre-wrap",children:JSON.stringify(o,null,2)})]})]})})},bB=new iO,_B=()=>d.jsx(aO,{client:bB,children:d.jsx(LN,{children:d.jsxs(FD,{reducedMotion:"user",children:[d.jsx(PR,{}),d.jsx(aj,{}),d.jsxs(qO,{children:[d.jsxs(zO,{children:[d.jsx(ys,{path:"/",element:d.jsx(tB,{})}),d.jsx(ys,{path:"/pricing",element:d.jsx(mB,{})}),d.jsx(ys,{path:"/privacy",element:d.jsx(gB,{})}),d.jsx(ys,{path:"/terms",element:d.jsx(yB,{})}),d.jsx(ys,{path:"/debug/events",element:d.jsx(xB,{})}),d.jsx(ys,{path:"*",element:d.jsx(vB,{})})]}),d.jsx(YF,{})]})]})})});S_(document.getElementById("root")).render(d.jsx(_B,{}));
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.