commit a139b0f481c4876b7a987bb1a60a7378cc36e94f
Author: ffff:12.186.22.250 <ffff:12.186.22.250@hub.scroll.pub> Date: 2024-12-23 22:16:34 +0000 Subject: updated landing.html diff --git a/landing.html b/landing.html index 5411fb5..1638d81 100644 --- a/landing.html +++ b/landing.html @@ -46,7 +46,7 @@ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="preconnect" href="https://images.unsplash.com" /> <script type="module" crossorigin src="index-DAB2nFwS.js"></script> - <link rel="stylesheet" crossorigin href="ndex-DEo-Ibsq.css" /> + <link rel="stylesheet" crossorigin href="index-DEo-Ibsq.css" /> </head> <body> <div id="root"></div>
commit eb6787b87499aacafa5145b9bd8cab8757e27541
Author: ffff:12.186.22.250 <ffff:12.186.22.250@hub.scroll.pub> Date: 2024-12-23 22:16:32 +0000 Subject: updated landing.html diff --git a/landing.html b/landing.html index ad1f36f..5411fb5 100644 --- a/landing.html +++ b/landing.html @@ -45,8 +45,8 @@ <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="preconnect" href="https://images.unsplash.com" /> - <script type="module" crossorigin src="/assets/index-DAB2nFwS.js"></script> - <link rel="stylesheet" crossorigin href="/assets/index-DEo-Ibsq.css" /> + <script type="module" crossorigin src="index-DAB2nFwS.js"></script> + <link rel="stylesheet" crossorigin href="ndex-DEo-Ibsq.css" /> </head> <body> <div id="root"></div>
commit 40eedbe37ddb414d595fdd60e49c431e82688dc4
Author: root <root@hub.scroll.pub> Date: 2024-12-23 22:16:26 +0000 Subject: Added index-DAB2nFwS.js diff --git a/index-DAB2nFwS.js b/index-DAB2nFwS.js new file mode 100644 index 0000000..414c914 --- /dev/null +++ b/index-DAB2nFwS.js @@ -0,0 +1,253 @@ +var Cb=Object.defineProperty;var jb=(r,e,n)=>e in r?Cb(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n;var Me=(r,e,n)=>jb(r,typeof e!="symbol"?e+"":e,n);function ay(r,e){for(var n=0;n<e.length;n++){const s=e[n];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in r)){const o=Object.getOwnPropertyDescriptor(s,a);o&&Object.defineProperty(r,a,o.get?o:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function bc(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function oy(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var n=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var a=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(n,s,a.get?a:{enumerable:!0,get:function(){return r[s]}})}),n}var fd={exports:{}},Ma={},pd={exports:{}},Oe={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Sm;function Tb(){if(Sm)return Oe;Sm=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),w=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,N={};function j(M,Y,m){this.props=M,this.context=Y,this.refs=N,this.updater=m||k}j.prototype.isReactComponent={},j.prototype.setState=function(M,Y){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,Y,"setState")},j.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function $(){}$.prototype=j.prototype;function K(M,Y,m){this.props=M,this.context=Y,this.refs=N,this.updater=m||k}var G=K.prototype=new $;G.constructor=K,P(G,j.prototype),G.isPureReactComponent=!0;var F=Array.isArray,U=Object.prototype.hasOwnProperty,A={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function te(M,Y,m){var _,S={},E=null,T=null;if(Y!=null)for(_ in Y.ref!==void 0&&(T=Y.ref),Y.key!==void 0&&(E=""+Y.key),Y)U.call(Y,_)&&!H.hasOwnProperty(_)&&(S[_]=Y[_]);var q=arguments.length-2;if(q===1)S.children=m;else if(1<q){for(var ne=Array(q),le=0;le<q;le++)ne[le]=arguments[le+2];S.children=ne}if(M&&M.defaultProps)for(_ in q=M.defaultProps,q)S[_]===void 0&&(S[_]=q[_]);return{$$typeof:r,type:M,key:E,ref:T,props:S,_owner:A.current}}function ae(M,Y){return{$$typeof:r,type:M.type,key:Y,ref:M.ref,props:M.props,_owner:M._owner}}function se(M){return typeof M=="object"&&M!==null&&M.$$typeof===r}function we(M){var Y={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(m){return Y[m]})}var De=/\/+/g;function Ie(M,Y){return typeof M=="object"&&M!==null&&M.key!=null?we(""+M.key):Y.toString(36)}function Ye(M,Y,m,_,S){var E=typeof M;(E==="undefined"||E==="boolean")&&(M=null);var T=!1;if(M===null)T=!0;else switch(E){case"string":case"number":T=!0;break;case"object":switch(M.$$typeof){case r:case e:T=!0}}if(T)return T=M,S=S(T),M=_===""?"."+Ie(T,0):_,F(S)?(m="",M!=null&&(m=M.replace(De,"$&/")+"/"),Ye(S,Y,m,"",function(le){return le})):S!=null&&(se(S)&&(S=ae(S,m+(!S.key||T&&T.key===S.key?"":(""+S.key).replace(De,"$&/")+"/")+M)),Y.push(S)),1;if(T=0,_=_===""?".":_+":",F(M))for(var q=0;q<M.length;q++){E=M[q];var ne=_+Ie(E,q);T+=Ye(E,Y,m,ne,S)}else if(ne=x(M),typeof ne=="function")for(M=ne.call(M),q=0;!(E=M.next()).done;)E=E.value,ne=_+Ie(E,q++),T+=Ye(E,Y,m,ne,S);else if(E==="object")throw Y=String(M),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return T}function vt(M,Y,m){if(M==null)return M;var _=[],S=0;return Ye(M,_,"","",function(E){return Y.call(m,E,S++)}),_}function nt(M){if(M._status===-1){var Y=M._result;Y=Y(),Y.then(function(m){(M._status===0||M._status===-1)&&(M._status=1,M._result=m)},function(m){(M._status===0||M._status===-1)&&(M._status=2,M._result=m)}),M._status===-1&&(M._status=0,M._result=Y)}if(M._status===1)return M._result.default;throw M._result}var ve={current:null},ie={transition:null},me={ReactCurrentDispatcher:ve,ReactCurrentBatchConfig:ie,ReactCurrentOwner:A};function oe(){throw Error("act(...) is not supported in production builds of React.")}return Oe.Children={map:vt,forEach:function(M,Y,m){vt(M,function(){Y.apply(this,arguments)},m)},count:function(M){var Y=0;return vt(M,function(){Y++}),Y},toArray:function(M){return vt(M,function(Y){return Y})||[]},only:function(M){if(!se(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Oe.Component=j,Oe.Fragment=n,Oe.Profiler=a,Oe.PureComponent=K,Oe.StrictMode=s,Oe.Suspense=f,Oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=me,Oe.act=oe,Oe.cloneElement=function(M,Y,m){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var _=P({},M.props),S=M.key,E=M.ref,T=M._owner;if(Y!=null){if(Y.ref!==void 0&&(E=Y.ref,T=A.current),Y.key!==void 0&&(S=""+Y.key),M.type&&M.type.defaultProps)var q=M.type.defaultProps;for(ne in Y)U.call(Y,ne)&&!H.hasOwnProperty(ne)&&(_[ne]=Y[ne]===void 0&&q!==void 0?q[ne]:Y[ne])}var ne=arguments.length-2;if(ne===1)_.children=m;else if(1<ne){q=Array(ne);for(var le=0;le<ne;le++)q[le]=arguments[le+2];_.children=q}return{$$typeof:r,type:M.type,key:S,ref:E,props:_,_owner:T}},Oe.createContext=function(M){return M={$$typeof:c,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:o,_context:M},M.Consumer=M},Oe.createElement=te,Oe.createFactory=function(M){var Y=te.bind(null,M);return Y.type=M,Y},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(M){return{$$typeof:d,render:M}},Oe.isValidElement=se,Oe.lazy=function(M){return{$$typeof:g,_payload:{_status:-1,_result:M},_init:nt}},Oe.memo=function(M,Y){return{$$typeof:v,type:M,compare:Y===void 0?null:Y}},Oe.startTransition=function(M){var Y=ie.transition;ie.transition={};try{M()}finally{ie.transition=Y}},Oe.unstable_act=oe,Oe.useCallback=function(M,Y){return ve.current.useCallback(M,Y)},Oe.useContext=function(M){return ve.current.useContext(M)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(M){return ve.current.useDeferredValue(M)},Oe.useEffect=function(M,Y){return ve.current.useEffect(M,Y)},Oe.useId=function(){return ve.current.useId()},Oe.useImperativeHandle=function(M,Y,m){return ve.current.useImperativeHandle(M,Y,m)},Oe.useInsertionEffect=function(M,Y){return ve.current.useInsertionEffect(M,Y)},Oe.useLayoutEffect=function(M,Y){return ve.current.useLayoutEffect(M,Y)},Oe.useMemo=function(M,Y){return ve.current.useMemo(M,Y)},Oe.useReducer=function(M,Y,m){return ve.current.useReducer(M,Y,m)},Oe.useRef=function(M){return ve.current.useRef(M)},Oe.useState=function(M){return ve.current.useState(M)},Oe.useSyncExternalStore=function(M,Y,m){return ve.current.useSyncExternalStore(M,Y,m)},Oe.useTransition=function(){return ve.current.useTransition()},Oe.version="18.3.1",Oe}var Em;function Nh(){return Em||(Em=1,pd.exports=Tb()),pd.exports}/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var km;function Nb(){if(km)return Ma;km=1;var r=Nh(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(d,f,v){var g,w={},x=null,k=null;v!==void 0&&(x=""+v),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(k=f.ref);for(g in f)s.call(f,g)&&!o.hasOwnProperty(g)&&(w[g]=f[g]);if(d&&d.defaultProps)for(g in f=d.defaultProps,f)w[g]===void 0&&(w[g]=f[g]);return{$$typeof:e,type:d,key:x,ref:k,props:w,_owner:a.current}}return Ma.Fragment=n,Ma.jsx=c,Ma.jsxs=c,Ma}var Cm;function Ab(){return Cm||(Cm=1,fd.exports=Nb()),fd.exports}var h=Ab(),I=Nh();const ly=bc(I),Pb=ay({__proto__:null,default:ly},[I]);var Rl={},md={exports:{}},sn={},gd={exports:{}},vd={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jm;function Rb(){return jm||(jm=1,function(r){function e(ie,me){var oe=ie.length;ie.push(me);e:for(;0<oe;){var M=oe-1>>>1,Y=ie[M];if(0<a(Y,me))ie[M]=me,ie[oe]=Y,oe=M;else break e}}function n(ie){return ie.length===0?null:ie[0]}function s(ie){if(ie.length===0)return null;var me=ie[0],oe=ie.pop();if(oe!==me){ie[0]=oe;e:for(var M=0,Y=ie.length,m=Y>>>1;M<m;){var _=2*(M+1)-1,S=ie[_],E=_+1,T=ie[E];if(0>a(S,oe))E<Y&&0>a(T,S)?(ie[M]=T,ie[E]=oe,M=E):(ie[M]=S,ie[_]=oe,M=_);else if(E<Y&&0>a(T,oe))ie[M]=T,ie[E]=oe,M=E;else break e}}return me}function a(ie,me){var oe=ie.sortIndex-me.sortIndex;return oe!==0?oe:ie.id-me.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();r.unstable_now=function(){return c.now()-d}}var f=[],v=[],g=1,w=null,x=3,k=!1,P=!1,N=!1,j=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(ie){for(var me=n(v);me!==null;){if(me.callback===null)s(v);else if(me.startTime<=ie)s(v),me.sortIndex=me.expirationTime,e(f,me);else break;me=n(v)}}function F(ie){if(N=!1,G(ie),!P)if(n(f)!==null)P=!0,nt(U);else{var me=n(v);me!==null&&ve(F,me.startTime-ie)}}function U(ie,me){P=!1,N&&(N=!1,$(te),te=-1),k=!0;var oe=x;try{for(G(me),w=n(f);w!==null&&(!(w.expirationTime>me)||ie&&!we());){var M=w.callback;if(typeof M=="function"){w.callback=null,x=w.priorityLevel;var Y=M(w.expirationTime<=me);me=r.unstable_now(),typeof Y=="function"?w.callback=Y:w===n(f)&&s(f),G(me)}else s(f);w=n(f)}if(w!==null)var m=!0;else{var _=n(v);_!==null&&ve(F,_.startTime-me),m=!1}return m}finally{w=null,x=oe,k=!1}}var A=!1,H=null,te=-1,ae=5,se=-1;function we(){return!(r.unstable_now()-se<ae)}function De(){if(H!==null){var ie=r.unstable_now();se=ie;var me=!0;try{me=H(!0,ie)}finally{me?Ie():(A=!1,H=null)}}else A=!1}var Ie;if(typeof K=="function")Ie=function(){K(De)};else if(typeof MessageChannel<"u"){var Ye=new MessageChannel,vt=Ye.port2;Ye.port1.onmessage=De,Ie=function(){vt.postMessage(null)}}else Ie=function(){j(De,0)};function nt(ie){H=ie,A||(A=!0,Ie())}function ve(ie,me){te=j(function(){ie(r.unstable_now())},me)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(ie){ie.callback=null},r.unstable_continueExecution=function(){P||k||(P=!0,nt(U))},r.unstable_forceFrameRate=function(ie){0>ie||125<ie?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<ie?Math.floor(1e3/ie):5},r.unstable_getCurrentPriorityLevel=function(){return x},r.unstable_getFirstCallbackNode=function(){return n(f)},r.unstable_next=function(ie){switch(x){case 1:case 2:case 3:var me=3;break;default:me=x}var oe=x;x=me;try{return ie()}finally{x=oe}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(ie,me){switch(ie){case 1:case 2:case 3:case 4:case 5:break;default:ie=3}var oe=x;x=ie;try{return me()}finally{x=oe}},r.unstable_scheduleCallback=function(ie,me,oe){var M=r.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?M+oe:M):oe=M,ie){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=oe+Y,ie={id:g++,callback:me,priorityLevel:ie,startTime:oe,expirationTime:Y,sortIndex:-1},oe>M?(ie.sortIndex=oe,e(v,ie),n(f)===null&&ie===n(v)&&(N?($(te),te=-1):N=!0,ve(F,oe-M))):(ie.sortIndex=Y,e(f,ie),P||k||(P=!0,nt(U))),ie},r.unstable_shouldYield=we,r.unstable_wrapCallback=function(ie){var me=x;return function(){var oe=x;x=me;try{return ie.apply(this,arguments)}finally{x=oe}}}}(vd)),vd}var Tm;function Ob(){return Tm||(Tm=1,gd.exports=Rb()),gd.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Nm;function Ib(){if(Nm)return sn;Nm=1;var r=Nh(),e=Ob();function n(t){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+t,l=1;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function o(t,i){c(t,i),c(t+"Capture",i)}function c(t,i){for(a[t]=i,t=0;t<i.length;t++)s.add(i[t])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,v=/^[: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={},w={};function x(t){return f.call(w,t)?!0:f.call(g,t)?!1:v.test(t)?w[t]=!0:(g[t]=!0,!1)}function k(t,i,l,u){if(l!==null&&l.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return u?!1:l!==null?!l.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function P(t,i,l,u){if(i===null||typeof i>"u"||k(t,i,l,u))return!0;if(u)return!1;if(l!==null)switch(l.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function N(t,i,l,u,p,y,b){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=u,this.attributeNamespace=p,this.mustUseProperty=l,this.propertyName=t,this.type=i,this.sanitizeURL=y,this.removeEmptyString=b}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){j[t]=new N(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var i=t[0];j[i]=new N(i,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){j[t]=new N(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){j[t]=new N(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){j[t]=new N(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){j[t]=new N(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){j[t]=new N(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){j[t]=new N(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){j[t]=new N(t,5,!1,t.toLowerCase(),null,!1,!1)});var $=/[\-:]([a-z])/g;function K(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 i=t.replace($,K);j[i]=new N(i,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var i=t.replace($,K);j[i]=new N(i,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var i=t.replace($,K);j[i]=new N(i,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){j[t]=new N(t,1,!1,t.toLowerCase(),null,!1,!1)}),j.xlinkHref=new N("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){j[t]=new N(t,1,!1,t.toLowerCase(),null,!0,!0)});function G(t,i,l,u){var p=j.hasOwnProperty(i)?j[i]:null;(p!==null?p.type!==0:u||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(P(i,l,p,u)&&(l=null),u||p===null?x(i)&&(l===null?t.removeAttribute(i):t.setAttribute(i,""+l)):p.mustUseProperty?t[p.propertyName]=l===null?p.type===3?!1:"":l:(i=p.attributeName,u=p.attributeNamespace,l===null?t.removeAttribute(i):(p=p.type,l=p===3||p===4&&l===!0?"":""+l,u?t.setAttributeNS(u,i,l):t.setAttribute(i,l))))}var F=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=Symbol.for("react.element"),A=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),se=Symbol.for("react.provider"),we=Symbol.for("react.context"),De=Symbol.for("react.forward_ref"),Ie=Symbol.for("react.suspense"),Ye=Symbol.for("react.suspense_list"),vt=Symbol.for("react.memo"),nt=Symbol.for("react.lazy"),ve=Symbol.for("react.offscreen"),ie=Symbol.iterator;function me(t){return t===null||typeof t!="object"?null:(t=ie&&t[ie]||t["@@iterator"],typeof t=="function"?t:null)}var oe=Object.assign,M;function Y(t){if(M===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);M=i&&i[1]||""}return` +`+M+t}var m=!1;function _(t,i){if(!t||m)return"";m=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(V){var u=V}Reflect.construct(t,[],i)}else{try{i.call()}catch(V){u=V}t.call(i.prototype)}else{try{throw Error()}catch(V){u=V}t()}}catch(V){if(V&&u&&typeof V.stack=="string"){for(var p=V.stack.split(` +`),y=u.stack.split(` +`),b=p.length-1,C=y.length-1;1<=b&&0<=C&&p[b]!==y[C];)C--;for(;1<=b&&0<=C;b--,C--)if(p[b]!==y[C]){if(b!==1||C!==1)do if(b--,C--,0>C||p[b]!==y[C]){var R=` +`+p[b].replace(" at new "," at ");return t.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",t.displayName)),R}while(1<=b&&0<=C);break}}}finally{m=!1,Error.prepareStackTrace=l}return(t=t?t.displayName||t.name:"")?Y(t):""}function S(t){switch(t.tag){case 5:return Y(t.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return t=_(t.type,!1),t;case 11:return t=_(t.type.render,!1),t;case 1:return t=_(t.type,!0),t;default:return""}}function E(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 H:return"Fragment";case A:return"Portal";case ae:return"Profiler";case te:return"StrictMode";case Ie:return"Suspense";case Ye:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case we:return(t.displayName||"Context")+".Consumer";case se:return(t._context.displayName||"Context")+".Provider";case De:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case vt:return i=t.displayName||null,i!==null?i:E(t.type)||"Memo";case nt:i=t._payload,t=t._init;try{return E(t(i))}catch{}}return null}function T(t){var i=t.type;switch(t.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=i.render,t=t.displayName||t.name||"",i.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return E(i);case 8:return i===te?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function q(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ne(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function le(t){var i=ne(t)?"checked":"value",l=Object.getOwnPropertyDescriptor(t.constructor.prototype,i),u=""+t[i];if(!t.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,y=l.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return p.call(this)},set:function(b){u=""+b,y.call(this,b)}}),Object.defineProperty(t,i,{enumerable:l.enumerable}),{getValue:function(){return u},setValue:function(b){u=""+b},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function _e(t){t._valueTracker||(t._valueTracker=le(t))}function Ke(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var l=i.getValue(),u="";return t&&(u=ne(t)?t.checked?"true":"false":t.value),t=u,t!==l?(i.setValue(t),!0):!1}function lt(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 yt(t,i){var l=i.checked;return oe({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??t._wrapperState.initialChecked})}function ct(t,i){var l=i.defaultValue==null?"":i.defaultValue,u=i.checked!=null?i.checked:i.defaultChecked;l=q(i.value!=null?i.value:l),t._wrapperState={initialChecked:u,initialValue:l,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function st(t,i){i=i.checked,i!=null&&G(t,"checked",i,!1)}function rr(t,i){st(t,i);var l=q(i.value),u=i.type;if(l!=null)u==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+l):t.value!==""+l&&(t.value=""+l);else if(u==="submit"||u==="reset"){t.removeAttribute("value");return}i.hasOwnProperty("value")?zt(t,i.type,l):i.hasOwnProperty("defaultValue")&&zt(t,i.type,q(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(t.defaultChecked=!!i.defaultChecked)}function bt(t,i,l){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var u=i.type;if(!(u!=="submit"&&u!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+t._wrapperState.initialValue,l||i===t.value||(t.value=i),t.defaultValue=i}l=t.name,l!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,l!==""&&(t.name=l)}function zt(t,i,l){(i!=="number"||lt(t.ownerDocument)!==t)&&(l==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+l&&(t.defaultValue=""+l))}var Ht=Array.isArray;function Mt(t,i,l,u){if(t=t.options,i){i={};for(var p=0;p<l.length;p++)i["$"+l[p]]=!0;for(l=0;l<t.length;l++)p=i.hasOwnProperty("$"+t[l].value),t[l].selected!==p&&(t[l].selected=p),p&&u&&(t[l].defaultSelected=!0)}else{for(l=""+q(l),i=null,p=0;p<t.length;p++){if(t[p].value===l){t[p].selected=!0,u&&(t[p].defaultSelected=!0);return}i!==null||t[p].disabled||(i=t[p])}i!==null&&(i.selected=!0)}}function be(t,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return oe({},i,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function kr(t,i){var l=i.value;if(l==null){if(l=i.children,i=i.defaultValue,l!=null){if(i!=null)throw Error(n(92));if(Ht(l)){if(1<l.length)throw Error(n(93));l=l[0]}i=l}i==null&&(i=""),l=i}t._wrapperState={initialValue:q(l)}}function Cn(t,i){var l=q(i.value),u=q(i.defaultValue);l!=null&&(l=""+l,l!==t.value&&(t.value=l),i.defaultValue==null&&t.defaultValue!==l&&(t.defaultValue=l)),u!=null&&(t.defaultValue=""+u)}function Cr(t){var i=t.textContent;i===t._wrapperState.initialValue&&i!==""&&i!==null&&(t.value=i)}function Js(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 jr(t,i){return t==null||t==="http://www.w3.org/1999/xhtml"?Js(i):t==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ji,jn=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,l,u,p){MSApp.execUnsafeLocalFunction(function(){return t(i,l,u,p)})}:t}(function(t,i){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=i;else{for(Ji=Ji||document.createElement("div"),Ji.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Ji.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;i.firstChild;)t.appendChild(i.firstChild)}});function Tr(t,i){if(i){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=i;return}}t.textContent=i}var Nr={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},ko=["Webkit","ms","Moz","O"];Object.keys(Nr).forEach(function(t){ko.forEach(function(i){i=i+t.charAt(0).toUpperCase()+t.substring(1),Nr[i]=Nr[t]})});function Co(t,i,l){return i==null||typeof i=="boolean"||i===""?"":l||typeof i!="number"||i===0||Nr.hasOwnProperty(t)&&Nr[t]?(""+i).trim():i+"px"}function Ks(t,i){t=t.style;for(var l in i)if(i.hasOwnProperty(l)){var u=l.indexOf("--")===0,p=Co(l,i[l],u);l==="float"&&(l="cssFloat"),u?t.setProperty(l,p):t[l]=p}}var Ki=oe({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 Qi(t,i){if(i){if(Ki[t]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,t));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function mi(t,i){if(t.indexOf("-")===-1)return typeof i.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 Qs=null;function Xi(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Xs=null,ir=null,Ar=null;function L(t){if(t=wa(t)){if(typeof Xs!="function")throw Error(n(280));var i=t.stateNode;i&&(i=Ho(i),Xs(t.stateNode,t.type,i))}}function z(t){ir?Ar?Ar.push(t):Ar=[t]:ir=t}function W(){if(ir){var t=ir,i=Ar;if(Ar=ir=null,L(t),i)for(t=0;t<i.length;t++)L(i[t])}}function re(t,i){return t(i)}function de(){}var Te=!1;function Ee(t,i,l){if(Te)return t(i,l);Te=!0;try{return re(t,i,l)}finally{Te=!1,(ir!==null||Ar!==null)&&(de(),W())}}function ye(t,i){var l=t.stateNode;if(l===null)return null;var u=Ho(l);if(u===null)return null;l=u[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(n(231,i,typeof l));return l}var ge=!1;if(d)try{var Ae={};Object.defineProperty(Ae,"passive",{get:function(){ge=!0}}),window.addEventListener("test",Ae,Ae),window.removeEventListener("test",Ae,Ae)}catch{ge=!1}function xt(t,i,l,u,p,y,b,C,R){var V=Array.prototype.slice.call(arguments,3);try{i.apply(l,V)}catch(X){this.onError(X)}}var Ce=!1,qe=null,ht=!1,Lt=null,St={onError:function(t){Ce=!0,qe=t}};function Pr(t,i,l,u,p,y,b,C,R){Ce=!1,qe=null,xt.apply(St,arguments)}function Zs(t,i,l,u,p,y,b,C,R){if(Pr.apply(this,arguments),Ce){if(Ce){var V=qe;Ce=!1,qe=null}else throw Error(n(198));ht||(ht=!0,Lt=V)}}function Xt(t){var i=t,l=t;if(t.alternate)for(;i.return;)i=i.return;else{t=i;do i=t,i.flags&4098&&(l=i.return),t=i.return;while(t)}return i.tag===3?l:null}function Tn(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function qn(t){if(Xt(t)!==t)throw Error(n(188))}function ea(t){var i=t.alternate;if(!i){if(i=Xt(t),i===null)throw Error(n(188));return i!==t?null:t}for(var l=t,u=i;;){var p=l.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===l)return qn(p),t;if(y===u)return qn(p),i;y=y.sibling}throw Error(n(188))}if(l.return!==u.return)l=p,u=y;else{for(var b=!1,C=p.child;C;){if(C===l){b=!0,l=p,u=y;break}if(C===u){b=!0,u=p,l=y;break}C=C.sibling}if(!b){for(C=y.child;C;){if(C===l){b=!0,l=y,u=p;break}if(C===u){b=!0,u=y,l=p;break}C=C.sibling}if(!b)throw Error(n(189))}}if(l.alternate!==u)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?t:i}function Rr(t){return t=ea(t),t!==null?Zi(t):null}function Zi(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var i=Zi(t);if(i!==null)return i;t=t.sibling}return null}var sr=e.unstable_scheduleCallback,gi=e.unstable_cancelCallback,$e=e.unstable_shouldYield,Ge=e.unstable_requestPaint,Fe=e.unstable_now,es=e.unstable_getCurrentPriorityLevel,ta=e.unstable_ImmediatePriority,Qh=e.unstable_UserBlockingPriority,jo=e.unstable_NormalPriority,$0=e.unstable_LowPriority,Xh=e.unstable_IdlePriority,To=null,Gn=null;function z0(t){if(Gn&&typeof Gn.onCommitFiberRoot=="function")try{Gn.onCommitFiberRoot(To,t,void 0,(t.current.flags&128)===128)}catch{}}var Nn=Math.clz32?Math.clz32:G0,V0=Math.log,q0=Math.LN2;function G0(t){return t>>>=0,t===0?32:31-(V0(t)/q0|0)|0}var No=64,Ao=4194304;function na(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 Po(t,i){var l=t.pendingLanes;if(l===0)return 0;var u=0,p=t.suspendedLanes,y=t.pingedLanes,b=l&268435455;if(b!==0){var C=b&~p;C!==0?u=na(C):(y&=b,y!==0&&(u=na(y)))}else b=l&~p,b!==0?u=na(b):y!==0&&(u=na(y));if(u===0)return 0;if(i!==0&&i!==u&&!(i&p)&&(p=u&-u,y=i&-i,p>=y||p===16&&(y&4194240)!==0))return i;if(u&4&&(u|=l&16),i=t.entangledLanes,i!==0)for(t=t.entanglements,i&=u;0<i;)l=31-Nn(i),p=1<<l,u|=t[l],i&=~p;return u}function Y0(t,i){switch(t){case 1:case 2:case 4:return i+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 i+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 H0(t,i){for(var l=t.suspendedLanes,u=t.pingedLanes,p=t.expirationTimes,y=t.pendingLanes;0<y;){var b=31-Nn(y),C=1<<b,R=p[b];R===-1?(!(C&l)||C&u)&&(p[b]=Y0(C,i)):R<=i&&(t.expiredLanes|=C),y&=~C}}function Ic(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Zh(){var t=No;return No<<=1,!(No&4194240)&&(No=64),t}function Mc(t){for(var i=[],l=0;31>l;l++)i.push(t);return i}function ra(t,i,l){t.pendingLanes|=i,i!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,i=31-Nn(i),t[i]=l}function W0(t,i){var l=t.pendingLanes&~i;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=i,t.mutableReadLanes&=i,t.entangledLanes&=i,i=t.entanglements;var u=t.eventTimes;for(t=t.expirationTimes;0<l;){var p=31-Nn(l),y=1<<p;i[p]=0,u[p]=-1,t[p]=-1,l&=~y}}function Lc(t,i){var l=t.entangledLanes|=i;for(t=t.entanglements;l;){var u=31-Nn(l),p=1<<u;p&i|t[u]&i&&(t[u]|=i),l&=~p}}var He=0;function ef(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var tf,Dc,nf,rf,sf,Fc=!1,Ro=[],Or=null,Ir=null,Mr=null,ia=new Map,sa=new Map,Lr=[],J0="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 af(t,i){switch(t){case"focusin":case"focusout":Or=null;break;case"dragenter":case"dragleave":Ir=null;break;case"mouseover":case"mouseout":Mr=null;break;case"pointerover":case"pointerout":ia.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":sa.delete(i.pointerId)}}function aa(t,i,l,u,p,y){return t===null||t.nativeEvent!==y?(t={blockedOn:i,domEventName:l,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},i!==null&&(i=wa(i),i!==null&&Dc(i)),t):(t.eventSystemFlags|=u,i=t.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),t)}function K0(t,i,l,u,p){switch(i){case"focusin":return Or=aa(Or,t,i,l,u,p),!0;case"dragenter":return Ir=aa(Ir,t,i,l,u,p),!0;case"mouseover":return Mr=aa(Mr,t,i,l,u,p),!0;case"pointerover":var y=p.pointerId;return ia.set(y,aa(ia.get(y)||null,t,i,l,u,p)),!0;case"gotpointercapture":return y=p.pointerId,sa.set(y,aa(sa.get(y)||null,t,i,l,u,p)),!0}return!1}function of(t){var i=vi(t.target);if(i!==null){var l=Xt(i);if(l!==null){if(i=l.tag,i===13){if(i=Tn(l),i!==null){t.blockedOn=i,sf(t.priority,function(){nf(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Oo(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var l=Bc(t.domEventName,t.eventSystemFlags,i[0],t.nativeEvent);if(l===null){l=t.nativeEvent;var u=new l.constructor(l.type,l);Qs=u,l.target.dispatchEvent(u),Qs=null}else return i=wa(l),i!==null&&Dc(i),t.blockedOn=l,!1;i.shift()}return!0}function lf(t,i,l){Oo(t)&&l.delete(i)}function Q0(){Fc=!1,Or!==null&&Oo(Or)&&(Or=null),Ir!==null&&Oo(Ir)&&(Ir=null),Mr!==null&&Oo(Mr)&&(Mr=null),ia.forEach(lf),sa.forEach(lf)}function oa(t,i){t.blockedOn===i&&(t.blockedOn=null,Fc||(Fc=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Q0)))}function la(t){function i(p){return oa(p,t)}if(0<Ro.length){oa(Ro[0],t);for(var l=1;l<Ro.length;l++){var u=Ro[l];u.blockedOn===t&&(u.blockedOn=null)}}for(Or!==null&&oa(Or,t),Ir!==null&&oa(Ir,t),Mr!==null&&oa(Mr,t),ia.forEach(i),sa.forEach(i),l=0;l<Lr.length;l++)u=Lr[l],u.blockedOn===t&&(u.blockedOn=null);for(;0<Lr.length&&(l=Lr[0],l.blockedOn===null);)of(l),l.blockedOn===null&&Lr.shift()}var ts=F.ReactCurrentBatchConfig,Io=!0;function X0(t,i,l,u){var p=He,y=ts.transition;ts.transition=null;try{He=1,Uc(t,i,l,u)}finally{He=p,ts.transition=y}}function Z0(t,i,l,u){var p=He,y=ts.transition;ts.transition=null;try{He=4,Uc(t,i,l,u)}finally{He=p,ts.transition=y}}function Uc(t,i,l,u){if(Io){var p=Bc(t,i,l,u);if(p===null)ru(t,i,u,Mo,l),af(t,u);else if(K0(p,t,i,l,u))u.stopPropagation();else if(af(t,u),i&4&&-1<J0.indexOf(t)){for(;p!==null;){var y=wa(p);if(y!==null&&tf(y),y=Bc(t,i,l,u),y===null&&ru(t,i,u,Mo,l),y===p)break;p=y}p!==null&&u.stopPropagation()}else ru(t,i,u,null,l)}}var Mo=null;function Bc(t,i,l,u){if(Mo=null,t=Xi(u),t=vi(t),t!==null)if(i=Xt(t),i===null)t=null;else if(l=i.tag,l===13){if(t=Tn(i),t!==null)return t;t=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null);return Mo=t,null}function cf(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(es()){case ta:return 1;case Qh:return 4;case jo:case $0:return 16;case Xh:return 536870912;default:return 16}default:return 16}}var Dr=null,$c=null,Lo=null;function uf(){if(Lo)return Lo;var t,i=$c,l=i.length,u,p="value"in Dr?Dr.value:Dr.textContent,y=p.length;for(t=0;t<l&&i[t]===p[t];t++);var b=l-t;for(u=1;u<=b&&i[l-u]===p[y-u];u++);return Lo=p.slice(t,1<u?1-u:void 0)}function Do(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function Fo(){return!0}function df(){return!1}function dn(t){function i(l,u,p,y,b){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=b,this.currentTarget=null;for(var C in t)t.hasOwnProperty(C)&&(l=t[C],this[C]=l?l(y):y[C]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Fo:df,this.isPropagationStopped=df,this}return oe(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Fo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Fo)},persist:function(){},isPersistent:Fo}),i}var ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zc=dn(ns),ca=oe({},ns,{view:0,detail:0}),ew=dn(ca),Vc,qc,ua,Uo=oe({},ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yc,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!==ua&&(ua&&t.type==="mousemove"?(Vc=t.screenX-ua.screenX,qc=t.screenY-ua.screenY):qc=Vc=0,ua=t),Vc)},movementY:function(t){return"movementY"in t?t.movementY:qc}}),hf=dn(Uo),tw=oe({},Uo,{dataTransfer:0}),nw=dn(tw),rw=oe({},ca,{relatedTarget:0}),Gc=dn(rw),iw=oe({},ns,{animationName:0,elapsedTime:0,pseudoElement:0}),sw=dn(iw),aw=oe({},ns,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ow=dn(aw),lw=oe({},ns,{data:0}),ff=dn(lw),cw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uw={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"},dw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hw(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=dw[t])?!!i[t]:!1}function Yc(){return hw}var fw=oe({},ca,{key:function(t){if(t.key){var i=cw[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=Do(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?uw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yc,charCode:function(t){return t.type==="keypress"?Do(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Do(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),pw=dn(fw),mw=oe({},Uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pf=dn(mw),gw=oe({},ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yc}),vw=dn(gw),yw=oe({},ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),_w=dn(yw),ww=oe({},Uo,{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}),bw=dn(ww),xw=[9,13,27,32],Hc=d&&"CompositionEvent"in window,da=null;d&&"documentMode"in document&&(da=document.documentMode);var Sw=d&&"TextEvent"in window&&!da,mf=d&&(!Hc||da&&8<da&&11>=da),gf=" ",vf=!1;function yf(t,i){switch(t){case"keyup":return xw.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _f(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var rs=!1;function Ew(t,i){switch(t){case"compositionend":return _f(i);case"keypress":return i.which!==32?null:(vf=!0,gf);case"textInput":return t=i.data,t===gf&&vf?null:t;default:return null}}function kw(t,i){if(rs)return t==="compositionend"||!Hc&&yf(t,i)?(t=uf(),Lo=$c=Dr=null,rs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return mf&&i.locale!=="ko"?null:i.data;default:return null}}var Cw={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 wf(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!Cw[t.type]:i==="textarea"}function bf(t,i,l,u){z(u),i=qo(i,"onChange"),0<i.length&&(l=new zc("onChange","change",null,l,u),t.push({event:l,listeners:i}))}var ha=null,fa=null;function jw(t){Uf(t,0)}function Bo(t){var i=ls(t);if(Ke(i))return t}function Tw(t,i){if(t==="change")return i}var xf=!1;if(d){var Wc;if(d){var Jc="oninput"in document;if(!Jc){var Sf=document.createElement("div");Sf.setAttribute("oninput","return;"),Jc=typeof Sf.oninput=="function"}Wc=Jc}else Wc=!1;xf=Wc&&(!document.documentMode||9<document.documentMode)}function Ef(){ha&&(ha.detachEvent("onpropertychange",kf),fa=ha=null)}function kf(t){if(t.propertyName==="value"&&Bo(fa)){var i=[];bf(i,fa,t,Xi(t)),Ee(jw,i)}}function Nw(t,i,l){t==="focusin"?(Ef(),ha=i,fa=l,ha.attachEvent("onpropertychange",kf)):t==="focusout"&&Ef()}function Aw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Bo(fa)}function Pw(t,i){if(t==="click")return Bo(i)}function Rw(t,i){if(t==="input"||t==="change")return Bo(i)}function Ow(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var An=typeof Object.is=="function"?Object.is:Ow;function pa(t,i){if(An(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var l=Object.keys(t),u=Object.keys(i);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var p=l[u];if(!f.call(i,p)||!An(t[p],i[p]))return!1}return!0}function Cf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function jf(t,i){var l=Cf(t);t=0;for(var u;l;){if(l.nodeType===3){if(u=t+l.textContent.length,t<=i&&u>=i)return{node:l,offset:i-t};t=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Cf(l)}}function Tf(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?Tf(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function Nf(){for(var t=window,i=lt();i instanceof t.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)t=i.contentWindow;else break;i=lt(t.document)}return i}function Kc(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}function Iw(t){var i=Nf(),l=t.focusedElem,u=t.selectionRange;if(i!==l&&l&&l.ownerDocument&&Tf(l.ownerDocument.documentElement,l)){if(u!==null&&Kc(l)){if(i=u.start,t=u.end,t===void 0&&(t=i),"selectionStart"in l)l.selectionStart=i,l.selectionEnd=Math.min(t,l.value.length);else if(t=(i=l.ownerDocument||document)&&i.defaultView||window,t.getSelection){t=t.getSelection();var p=l.textContent.length,y=Math.min(u.start,p);u=u.end===void 0?y:Math.min(u.end,p),!t.extend&&y>u&&(p=u,u=y,y=p),p=jf(l,y);var b=jf(l,u);p&&b&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==b.node||t.focusOffset!==b.offset)&&(i=i.createRange(),i.setStart(p.node,p.offset),t.removeAllRanges(),y>u?(t.addRange(i),t.extend(b.node,b.offset)):(i.setEnd(b.node,b.offset),t.addRange(i)))}}for(i=[],t=l;t=t.parentNode;)t.nodeType===1&&i.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<i.length;l++)t=i[l],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Mw=d&&"documentMode"in document&&11>=document.documentMode,is=null,Qc=null,ma=null,Xc=!1;function Af(t,i,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Xc||is==null||is!==lt(u)||(u=is,"selectionStart"in u&&Kc(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ma&&pa(ma,u)||(ma=u,u=qo(Qc,"onSelect"),0<u.length&&(i=new zc("onSelect","select",null,i,l),t.push({event:i,listeners:u}),i.target=is)))}function $o(t,i){var l={};return l[t.toLowerCase()]=i.toLowerCase(),l["Webkit"+t]="webkit"+i,l["Moz"+t]="moz"+i,l}var ss={animationend:$o("Animation","AnimationEnd"),animationiteration:$o("Animation","AnimationIteration"),animationstart:$o("Animation","AnimationStart"),transitionend:$o("Transition","TransitionEnd")},Zc={},Pf={};d&&(Pf=document.createElement("div").style,"AnimationEvent"in window||(delete ss.animationend.animation,delete ss.animationiteration.animation,delete ss.animationstart.animation),"TransitionEvent"in window||delete ss.transitionend.transition);function zo(t){if(Zc[t])return Zc[t];if(!ss[t])return t;var i=ss[t],l;for(l in i)if(i.hasOwnProperty(l)&&l in Pf)return Zc[t]=i[l];return t}var Rf=zo("animationend"),Of=zo("animationiteration"),If=zo("animationstart"),Mf=zo("transitionend"),Lf=new Map,Df="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 Fr(t,i){Lf.set(t,i),o(i,[t])}for(var eu=0;eu<Df.length;eu++){var tu=Df[eu],Lw=tu.toLowerCase(),Dw=tu[0].toUpperCase()+tu.slice(1);Fr(Lw,"on"+Dw)}Fr(Rf,"onAnimationEnd"),Fr(Of,"onAnimationIteration"),Fr(If,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(Mf,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ga="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(" "),Fw=new Set("cancel close invalid load scroll toggle".split(" ").concat(ga));function Ff(t,i,l){var u=t.type||"unknown-event";t.currentTarget=l,Zs(u,i,void 0,t),t.currentTarget=null}function Uf(t,i){i=(i&4)!==0;for(var l=0;l<t.length;l++){var u=t[l],p=u.event;u=u.listeners;e:{var y=void 0;if(i)for(var b=u.length-1;0<=b;b--){var C=u[b],R=C.instance,V=C.currentTarget;if(C=C.listener,R!==y&&p.isPropagationStopped())break e;Ff(p,C,V),y=R}else for(b=0;b<u.length;b++){if(C=u[b],R=C.instance,V=C.currentTarget,C=C.listener,R!==y&&p.isPropagationStopped())break e;Ff(p,C,V),y=R}}}if(ht)throw t=Lt,ht=!1,Lt=null,t}function rt(t,i){var l=i[cu];l===void 0&&(l=i[cu]=new Set);var u=t+"__bubble";l.has(u)||(Bf(i,t,2,!1),l.add(u))}function nu(t,i,l){var u=0;i&&(u|=4),Bf(l,t,u,i)}var Vo="_reactListening"+Math.random().toString(36).slice(2);function va(t){if(!t[Vo]){t[Vo]=!0,s.forEach(function(l){l!=="selectionchange"&&(Fw.has(l)||nu(l,!1,t),nu(l,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[Vo]||(i[Vo]=!0,nu("selectionchange",!1,i))}}function Bf(t,i,l,u){switch(cf(i)){case 1:var p=X0;break;case 4:p=Z0;break;default:p=Uc}l=p.bind(null,i,l,t),p=void 0,!ge||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),u?p!==void 0?t.addEventListener(i,l,{capture:!0,passive:p}):t.addEventListener(i,l,!0):p!==void 0?t.addEventListener(i,l,{passive:p}):t.addEventListener(i,l,!1)}function ru(t,i,l,u,p){var y=u;if(!(i&1)&&!(i&2)&&u!==null)e:for(;;){if(u===null)return;var b=u.tag;if(b===3||b===4){var C=u.stateNode.containerInfo;if(C===p||C.nodeType===8&&C.parentNode===p)break;if(b===4)for(b=u.return;b!==null;){var R=b.tag;if((R===3||R===4)&&(R=b.stateNode.containerInfo,R===p||R.nodeType===8&&R.parentNode===p))return;b=b.return}for(;C!==null;){if(b=vi(C),b===null)return;if(R=b.tag,R===5||R===6){u=y=b;continue e}C=C.parentNode}}u=u.return}Ee(function(){var V=y,X=Xi(l),Z=[];e:{var Q=Lf.get(t);if(Q!==void 0){var ce=zc,he=t;switch(t){case"keypress":if(Do(l)===0)break e;case"keydown":case"keyup":ce=pw;break;case"focusin":he="focus",ce=Gc;break;case"focusout":he="blur",ce=Gc;break;case"beforeblur":case"afterblur":ce=Gc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=hf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=nw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=vw;break;case Rf:case Of:case If:ce=sw;break;case Mf:ce=_w;break;case"scroll":ce=ew;break;case"wheel":ce=bw;break;case"copy":case"cut":case"paste":ce=ow;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=pf}var fe=(i&4)!==0,_t=!fe&&t==="scroll",D=fe?Q!==null?Q+"Capture":null:Q;fe=[];for(var O=V,B;O!==null;){B=O;var ee=B.stateNode;if(B.tag===5&&ee!==null&&(B=ee,D!==null&&(ee=ye(O,D),ee!=null&&fe.push(ya(O,ee,B)))),_t)break;O=O.return}0<fe.length&&(Q=new ce(Q,he,null,l,X),Z.push({event:Q,listeners:fe}))}}if(!(i&7)){e:{if(Q=t==="mouseover"||t==="pointerover",ce=t==="mouseout"||t==="pointerout",Q&&l!==Qs&&(he=l.relatedTarget||l.fromElement)&&(vi(he)||he[ar]))break e;if((ce||Q)&&(Q=X.window===X?X:(Q=X.ownerDocument)?Q.defaultView||Q.parentWindow:window,ce?(he=l.relatedTarget||l.toElement,ce=V,he=he?vi(he):null,he!==null&&(_t=Xt(he),he!==_t||he.tag!==5&&he.tag!==6)&&(he=null)):(ce=null,he=V),ce!==he)){if(fe=hf,ee="onMouseLeave",D="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(fe=pf,ee="onPointerLeave",D="onPointerEnter",O="pointer"),_t=ce==null?Q:ls(ce),B=he==null?Q:ls(he),Q=new fe(ee,O+"leave",ce,l,X),Q.target=_t,Q.relatedTarget=B,ee=null,vi(X)===V&&(fe=new fe(D,O+"enter",he,l,X),fe.target=B,fe.relatedTarget=_t,ee=fe),_t=ee,ce&&he)t:{for(fe=ce,D=he,O=0,B=fe;B;B=as(B))O++;for(B=0,ee=D;ee;ee=as(ee))B++;for(;0<O-B;)fe=as(fe),O--;for(;0<B-O;)D=as(D),B--;for(;O--;){if(fe===D||D!==null&&fe===D.alternate)break t;fe=as(fe),D=as(D)}fe=null}else fe=null;ce!==null&&$f(Z,Q,ce,fe,!1),he!==null&&_t!==null&&$f(Z,_t,he,fe,!0)}}e:{if(Q=V?ls(V):window,ce=Q.nodeName&&Q.nodeName.toLowerCase(),ce==="select"||ce==="input"&&Q.type==="file")var pe=Tw;else if(wf(Q))if(xf)pe=Rw;else{pe=Aw;var xe=Nw}else(ce=Q.nodeName)&&ce.toLowerCase()==="input"&&(Q.type==="checkbox"||Q.type==="radio")&&(pe=Pw);if(pe&&(pe=pe(t,V))){bf(Z,pe,l,X);break e}xe&&xe(t,Q,V),t==="focusout"&&(xe=Q._wrapperState)&&xe.controlled&&Q.type==="number"&&zt(Q,"number",Q.value)}switch(xe=V?ls(V):window,t){case"focusin":(wf(xe)||xe.contentEditable==="true")&&(is=xe,Qc=V,ma=null);break;case"focusout":ma=Qc=is=null;break;case"mousedown":Xc=!0;break;case"contextmenu":case"mouseup":case"dragend":Xc=!1,Af(Z,l,X);break;case"selectionchange":if(Mw)break;case"keydown":case"keyup":Af(Z,l,X)}var Se;if(Hc)e:{switch(t){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else rs?yf(t,l)&&(ke="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(ke="onCompositionStart");ke&&(mf&&l.locale!=="ko"&&(rs||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&rs&&(Se=uf()):(Dr=X,$c="value"in Dr?Dr.value:Dr.textContent,rs=!0)),xe=qo(V,ke),0<xe.length&&(ke=new ff(ke,t,null,l,X),Z.push({event:ke,listeners:xe}),Se?ke.data=Se:(Se=_f(l),Se!==null&&(ke.data=Se)))),(Se=Sw?Ew(t,l):kw(t,l))&&(V=qo(V,"onBeforeInput"),0<V.length&&(X=new ff("onBeforeInput","beforeinput",null,l,X),Z.push({event:X,listeners:V}),X.data=Se))}Uf(Z,i)})}function ya(t,i,l){return{instance:t,listener:i,currentTarget:l}}function qo(t,i){for(var l=i+"Capture",u=[];t!==null;){var p=t,y=p.stateNode;p.tag===5&&y!==null&&(p=y,y=ye(t,l),y!=null&&u.unshift(ya(t,y,p)),y=ye(t,i),y!=null&&u.push(ya(t,y,p))),t=t.return}return u}function as(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function $f(t,i,l,u,p){for(var y=i._reactName,b=[];l!==null&&l!==u;){var C=l,R=C.alternate,V=C.stateNode;if(R!==null&&R===u)break;C.tag===5&&V!==null&&(C=V,p?(R=ye(l,y),R!=null&&b.unshift(ya(l,R,C))):p||(R=ye(l,y),R!=null&&b.push(ya(l,R,C)))),l=l.return}b.length!==0&&t.push({event:i,listeners:b})}var Uw=/\r\n?/g,Bw=/\u0000|\uFFFD/g;function zf(t){return(typeof t=="string"?t:""+t).replace(Uw,` +`).replace(Bw,"")}function Go(t,i,l){if(i=zf(i),zf(t)!==i&&l)throw Error(n(425))}function Yo(){}var iu=null,su=null;function au(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var ou=typeof setTimeout=="function"?setTimeout:void 0,$w=typeof clearTimeout=="function"?clearTimeout:void 0,Vf=typeof Promise=="function"?Promise:void 0,zw=typeof queueMicrotask=="function"?queueMicrotask:typeof Vf<"u"?function(t){return Vf.resolve(null).then(t).catch(Vw)}:ou;function Vw(t){setTimeout(function(){throw t})}function lu(t,i){var l=i,u=0;do{var p=l.nextSibling;if(t.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"){if(u===0){t.removeChild(p),la(i);return}u--}else l!=="$"&&l!=="$?"&&l!=="$!"||u++;l=p}while(l);la(i)}function Ur(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return t}function qf(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"){if(i===0)return t;i--}else l==="/$"&&i++}t=t.previousSibling}return null}var os=Math.random().toString(36).slice(2),Yn="__reactFiber$"+os,_a="__reactProps$"+os,ar="__reactContainer$"+os,cu="__reactEvents$"+os,qw="__reactListeners$"+os,Gw="__reactHandles$"+os;function vi(t){var i=t[Yn];if(i)return i;for(var l=t.parentNode;l;){if(i=l[ar]||l[Yn]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(t=qf(t);t!==null;){if(l=t[Yn])return l;t=qf(t)}return i}t=l,l=t.parentNode}return null}function wa(t){return t=t[Yn]||t[ar],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ls(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(n(33))}function Ho(t){return t[_a]||null}var uu=[],cs=-1;function Br(t){return{current:t}}function it(t){0>cs||(t.current=uu[cs],uu[cs]=null,cs--)}function Xe(t,i){cs++,uu[cs]=t.current,t.current=i}var $r={},Vt=Br($r),Zt=Br(!1),yi=$r;function us(t,i){var l=t.type.contextTypes;if(!l)return $r;var u=t.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===i)return u.__reactInternalMemoizedMaskedChildContext;var p={},y;for(y in l)p[y]=i[y];return u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=p),p}function en(t){return t=t.childContextTypes,t!=null}function Wo(){it(Zt),it(Vt)}function Gf(t,i,l){if(Vt.current!==$r)throw Error(n(168));Xe(Vt,i),Xe(Zt,l)}function Yf(t,i,l){var u=t.stateNode;if(i=i.childContextTypes,typeof u.getChildContext!="function")return l;u=u.getChildContext();for(var p in u)if(!(p in i))throw Error(n(108,T(t)||"Unknown",p));return oe({},l,u)}function Jo(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||$r,yi=Vt.current,Xe(Vt,t),Xe(Zt,Zt.current),!0}function Hf(t,i,l){var u=t.stateNode;if(!u)throw Error(n(169));l?(t=Yf(t,i,yi),u.__reactInternalMemoizedMergedChildContext=t,it(Zt),it(Vt),Xe(Vt,t)):it(Zt),Xe(Zt,l)}var or=null,Ko=!1,du=!1;function Wf(t){or===null?or=[t]:or.push(t)}function Yw(t){Ko=!0,Wf(t)}function zr(){if(!du&&or!==null){du=!0;var t=0,i=He;try{var l=or;for(He=1;t<l.length;t++){var u=l[t];do u=u(!0);while(u!==null)}or=null,Ko=!1}catch(p){throw or!==null&&(or=or.slice(t+1)),sr(ta,zr),p}finally{He=i,du=!1}}return null}var ds=[],hs=0,Qo=null,Xo=0,yn=[],_n=0,_i=null,lr=1,cr="";function wi(t,i){ds[hs++]=Xo,ds[hs++]=Qo,Qo=t,Xo=i}function Jf(t,i,l){yn[_n++]=lr,yn[_n++]=cr,yn[_n++]=_i,_i=t;var u=lr;t=cr;var p=32-Nn(u)-1;u&=~(1<<p),l+=1;var y=32-Nn(i)+p;if(30<y){var b=p-p%5;y=(u&(1<<b)-1).toString(32),u>>=b,p-=b,lr=1<<32-Nn(i)+p|l<<p|u,cr=y+t}else lr=1<<y|l<<p|u,cr=t}function hu(t){t.return!==null&&(wi(t,1),Jf(t,1,0))}function fu(t){for(;t===Qo;)Qo=ds[--hs],ds[hs]=null,Xo=ds[--hs],ds[hs]=null;for(;t===_i;)_i=yn[--_n],yn[_n]=null,cr=yn[--_n],yn[_n]=null,lr=yn[--_n],yn[_n]=null}var hn=null,fn=null,at=!1,Pn=null;function Kf(t,i){var l=Sn(5,null,null,0);l.elementType="DELETED",l.stateNode=i,l.return=t,i=t.deletions,i===null?(t.deletions=[l],t.flags|=16):i.push(l)}function Qf(t,i){switch(t.tag){case 5:var l=t.type;return i=i.nodeType!==1||l.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(t.stateNode=i,hn=t,fn=Ur(i.firstChild),!0):!1;case 6:return i=t.pendingProps===""||i.nodeType!==3?null:i,i!==null?(t.stateNode=i,hn=t,fn=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(l=_i!==null?{id:lr,overflow:cr}:null,t.memoizedState={dehydrated:i,treeContext:l,retryLane:1073741824},l=Sn(18,null,null,0),l.stateNode=i,l.return=t,t.child=l,hn=t,fn=null,!0):!1;default:return!1}}function pu(t){return(t.mode&1)!==0&&(t.flags&128)===0}function mu(t){if(at){var i=fn;if(i){var l=i;if(!Qf(t,i)){if(pu(t))throw Error(n(418));i=Ur(l.nextSibling);var u=hn;i&&Qf(t,i)?Kf(u,l):(t.flags=t.flags&-4097|2,at=!1,hn=t)}}else{if(pu(t))throw Error(n(418));t.flags=t.flags&-4097|2,at=!1,hn=t}}}function Xf(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;hn=t}function Zo(t){if(t!==hn)return!1;if(!at)return Xf(t),at=!0,!1;var i;if((i=t.tag!==3)&&!(i=t.tag!==5)&&(i=t.type,i=i!=="head"&&i!=="body"&&!au(t.type,t.memoizedProps)),i&&(i=fn)){if(pu(t))throw Zf(),Error(n(418));for(;i;)Kf(t,i),i=Ur(i.nextSibling)}if(Xf(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(n(317));e:{for(t=t.nextSibling,i=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"){if(i===0){fn=Ur(t.nextSibling);break e}i--}else l!=="$"&&l!=="$!"&&l!=="$?"||i++}t=t.nextSibling}fn=null}}else fn=hn?Ur(t.stateNode.nextSibling):null;return!0}function Zf(){for(var t=fn;t;)t=Ur(t.nextSibling)}function fs(){fn=hn=null,at=!1}function gu(t){Pn===null?Pn=[t]:Pn.push(t)}var Hw=F.ReactCurrentBatchConfig;function ba(t,i,l){if(t=l.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var u=l.stateNode}if(!u)throw Error(n(147,t));var p=u,y=""+t;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===y?i.ref:(i=function(b){var C=p.refs;b===null?delete C[y]:C[y]=b},i._stringRef=y,i)}if(typeof t!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,t))}return t}function el(t,i){throw t=Object.prototype.toString.call(i),Error(n(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t))}function ep(t){var i=t._init;return i(t._payload)}function tp(t){function i(D,O){if(t){var B=D.deletions;B===null?(D.deletions=[O],D.flags|=16):B.push(O)}}function l(D,O){if(!t)return null;for(;O!==null;)i(D,O),O=O.sibling;return null}function u(D,O){for(D=new Map;O!==null;)O.key!==null?D.set(O.key,O):D.set(O.index,O),O=O.sibling;return D}function p(D,O){return D=Kr(D,O),D.index=0,D.sibling=null,D}function y(D,O,B){return D.index=B,t?(B=D.alternate,B!==null?(B=B.index,B<O?(D.flags|=2,O):B):(D.flags|=2,O)):(D.flags|=1048576,O)}function b(D){return t&&D.alternate===null&&(D.flags|=2),D}function C(D,O,B,ee){return O===null||O.tag!==6?(O=od(B,D.mode,ee),O.return=D,O):(O=p(O,B),O.return=D,O)}function R(D,O,B,ee){var pe=B.type;return pe===H?X(D,O,B.props.children,ee,B.key):O!==null&&(O.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===nt&&ep(pe)===O.type)?(ee=p(O,B.props),ee.ref=ba(D,O,B),ee.return=D,ee):(ee=El(B.type,B.key,B.props,null,D.mode,ee),ee.ref=ba(D,O,B),ee.return=D,ee)}function V(D,O,B,ee){return O===null||O.tag!==4||O.stateNode.containerInfo!==B.containerInfo||O.stateNode.implementation!==B.implementation?(O=ld(B,D.mode,ee),O.return=D,O):(O=p(O,B.children||[]),O.return=D,O)}function X(D,O,B,ee,pe){return O===null||O.tag!==7?(O=Ti(B,D.mode,ee,pe),O.return=D,O):(O=p(O,B),O.return=D,O)}function Z(D,O,B){if(typeof O=="string"&&O!==""||typeof O=="number")return O=od(""+O,D.mode,B),O.return=D,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case U:return B=El(O.type,O.key,O.props,null,D.mode,B),B.ref=ba(D,null,O),B.return=D,B;case A:return O=ld(O,D.mode,B),O.return=D,O;case nt:var ee=O._init;return Z(D,ee(O._payload),B)}if(Ht(O)||me(O))return O=Ti(O,D.mode,B,null),O.return=D,O;el(D,O)}return null}function Q(D,O,B,ee){var pe=O!==null?O.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return pe!==null?null:C(D,O,""+B,ee);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case U:return B.key===pe?R(D,O,B,ee):null;case A:return B.key===pe?V(D,O,B,ee):null;case nt:return pe=B._init,Q(D,O,pe(B._payload),ee)}if(Ht(B)||me(B))return pe!==null?null:X(D,O,B,ee,null);el(D,B)}return null}function ce(D,O,B,ee,pe){if(typeof ee=="string"&&ee!==""||typeof ee=="number")return D=D.get(B)||null,C(O,D,""+ee,pe);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case U:return D=D.get(ee.key===null?B:ee.key)||null,R(O,D,ee,pe);case A:return D=D.get(ee.key===null?B:ee.key)||null,V(O,D,ee,pe);case nt:var xe=ee._init;return ce(D,O,B,xe(ee._payload),pe)}if(Ht(ee)||me(ee))return D=D.get(B)||null,X(O,D,ee,pe,null);el(O,ee)}return null}function he(D,O,B,ee){for(var pe=null,xe=null,Se=O,ke=O=0,Pt=null;Se!==null&&ke<B.length;ke++){Se.index>ke?(Pt=Se,Se=null):Pt=Se.sibling;var Ve=Q(D,Se,B[ke],ee);if(Ve===null){Se===null&&(Se=Pt);break}t&&Se&&Ve.alternate===null&&i(D,Se),O=y(Ve,O,ke),xe===null?pe=Ve:xe.sibling=Ve,xe=Ve,Se=Pt}if(ke===B.length)return l(D,Se),at&&wi(D,ke),pe;if(Se===null){for(;ke<B.length;ke++)Se=Z(D,B[ke],ee),Se!==null&&(O=y(Se,O,ke),xe===null?pe=Se:xe.sibling=Se,xe=Se);return at&&wi(D,ke),pe}for(Se=u(D,Se);ke<B.length;ke++)Pt=ce(Se,D,ke,B[ke],ee),Pt!==null&&(t&&Pt.alternate!==null&&Se.delete(Pt.key===null?ke:Pt.key),O=y(Pt,O,ke),xe===null?pe=Pt:xe.sibling=Pt,xe=Pt);return t&&Se.forEach(function(Qr){return i(D,Qr)}),at&&wi(D,ke),pe}function fe(D,O,B,ee){var pe=me(B);if(typeof pe!="function")throw Error(n(150));if(B=pe.call(B),B==null)throw Error(n(151));for(var xe=pe=null,Se=O,ke=O=0,Pt=null,Ve=B.next();Se!==null&&!Ve.done;ke++,Ve=B.next()){Se.index>ke?(Pt=Se,Se=null):Pt=Se.sibling;var Qr=Q(D,Se,Ve.value,ee);if(Qr===null){Se===null&&(Se=Pt);break}t&&Se&&Qr.alternate===null&&i(D,Se),O=y(Qr,O,ke),xe===null?pe=Qr:xe.sibling=Qr,xe=Qr,Se=Pt}if(Ve.done)return l(D,Se),at&&wi(D,ke),pe;if(Se===null){for(;!Ve.done;ke++,Ve=B.next())Ve=Z(D,Ve.value,ee),Ve!==null&&(O=y(Ve,O,ke),xe===null?pe=Ve:xe.sibling=Ve,xe=Ve);return at&&wi(D,ke),pe}for(Se=u(D,Se);!Ve.done;ke++,Ve=B.next())Ve=ce(Se,D,ke,Ve.value,ee),Ve!==null&&(t&&Ve.alternate!==null&&Se.delete(Ve.key===null?ke:Ve.key),O=y(Ve,O,ke),xe===null?pe=Ve:xe.sibling=Ve,xe=Ve);return t&&Se.forEach(function(kb){return i(D,kb)}),at&&wi(D,ke),pe}function _t(D,O,B,ee){if(typeof B=="object"&&B!==null&&B.type===H&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case U:e:{for(var pe=B.key,xe=O;xe!==null;){if(xe.key===pe){if(pe=B.type,pe===H){if(xe.tag===7){l(D,xe.sibling),O=p(xe,B.props.children),O.return=D,D=O;break e}}else if(xe.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===nt&&ep(pe)===xe.type){l(D,xe.sibling),O=p(xe,B.props),O.ref=ba(D,xe,B),O.return=D,D=O;break e}l(D,xe);break}else i(D,xe);xe=xe.sibling}B.type===H?(O=Ti(B.props.children,D.mode,ee,B.key),O.return=D,D=O):(ee=El(B.type,B.key,B.props,null,D.mode,ee),ee.ref=ba(D,O,B),ee.return=D,D=ee)}return b(D);case A:e:{for(xe=B.key;O!==null;){if(O.key===xe)if(O.tag===4&&O.stateNode.containerInfo===B.containerInfo&&O.stateNode.implementation===B.implementation){l(D,O.sibling),O=p(O,B.children||[]),O.return=D,D=O;break e}else{l(D,O);break}else i(D,O);O=O.sibling}O=ld(B,D.mode,ee),O.return=D,D=O}return b(D);case nt:return xe=B._init,_t(D,O,xe(B._payload),ee)}if(Ht(B))return he(D,O,B,ee);if(me(B))return fe(D,O,B,ee);el(D,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,O!==null&&O.tag===6?(l(D,O.sibling),O=p(O,B),O.return=D,D=O):(l(D,O),O=od(B,D.mode,ee),O.return=D,D=O),b(D)):l(D,O)}return _t}var ps=tp(!0),np=tp(!1),tl=Br(null),nl=null,ms=null,vu=null;function yu(){vu=ms=nl=null}function _u(t){var i=tl.current;it(tl),t._currentValue=i}function wu(t,i,l){for(;t!==null;){var u=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),t===l)break;t=t.return}}function gs(t,i){nl=t,vu=ms=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&i&&(tn=!0),t.firstContext=null)}function wn(t){var i=t._currentValue;if(vu!==t)if(t={context:t,memoizedValue:i,next:null},ms===null){if(nl===null)throw Error(n(308));ms=t,nl.dependencies={lanes:0,firstContext:t}}else ms=ms.next=t;return i}var bi=null;function bu(t){bi===null?bi=[t]:bi.push(t)}function rp(t,i,l,u){var p=i.interleaved;return p===null?(l.next=l,bu(i)):(l.next=p.next,p.next=l),i.interleaved=l,ur(t,u)}function ur(t,i){t.lanes|=i;var l=t.alternate;for(l!==null&&(l.lanes|=i),l=t,t=t.return;t!==null;)t.childLanes|=i,l=t.alternate,l!==null&&(l.childLanes|=i),l=t,t=t.return;return l.tag===3?l.stateNode:null}var Vr=!1;function xu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ip(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function dr(t,i){return{eventTime:t,lane:i,tag:0,payload:null,callback:null,next:null}}function qr(t,i,l){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,ze&2){var p=u.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),u.pending=i,ur(t,l)}return p=u.interleaved,p===null?(i.next=i,bu(u)):(i.next=p.next,p.next=i),u.interleaved=i,ur(t,l)}function rl(t,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194240)!==0)){var u=i.lanes;u&=t.pendingLanes,l|=u,i.lanes=l,Lc(t,l)}}function sp(t,i){var l=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var b={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?p=y=b:y=y.next=b,l=l.next}while(l!==null);y===null?p=y=i:y=y.next=i}else p=y=i;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,effects:u.effects},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=i:t.next=i,l.lastBaseUpdate=i}function il(t,i,l,u){var p=t.updateQueue;Vr=!1;var y=p.firstBaseUpdate,b=p.lastBaseUpdate,C=p.shared.pending;if(C!==null){p.shared.pending=null;var R=C,V=R.next;R.next=null,b===null?y=V:b.next=V,b=R;var X=t.alternate;X!==null&&(X=X.updateQueue,C=X.lastBaseUpdate,C!==b&&(C===null?X.firstBaseUpdate=V:C.next=V,X.lastBaseUpdate=R))}if(y!==null){var Z=p.baseState;b=0,X=V=R=null,C=y;do{var Q=C.lane,ce=C.eventTime;if((u&Q)===Q){X!==null&&(X=X.next={eventTime:ce,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var he=t,fe=C;switch(Q=i,ce=l,fe.tag){case 1:if(he=fe.payload,typeof he=="function"){Z=he.call(ce,Z,Q);break e}Z=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=fe.payload,Q=typeof he=="function"?he.call(ce,Z,Q):he,Q==null)break e;Z=oe({},Z,Q);break e;case 2:Vr=!0}}C.callback!==null&&C.lane!==0&&(t.flags|=64,Q=p.effects,Q===null?p.effects=[C]:Q.push(C))}else ce={eventTime:ce,lane:Q,tag:C.tag,payload:C.payload,callback:C.callback,next:null},X===null?(V=X=ce,R=Z):X=X.next=ce,b|=Q;if(C=C.next,C===null){if(C=p.shared.pending,C===null)break;Q=C,C=Q.next,Q.next=null,p.lastBaseUpdate=Q,p.shared.pending=null}}while(!0);if(X===null&&(R=Z),p.baseState=R,p.firstBaseUpdate=V,p.lastBaseUpdate=X,i=p.shared.interleaved,i!==null){p=i;do b|=p.lane,p=p.next;while(p!==i)}else y===null&&(p.shared.lanes=0);Ei|=b,t.lanes=b,t.memoizedState=Z}}function ap(t,i,l){if(t=i.effects,i.effects=null,t!==null)for(i=0;i<t.length;i++){var u=t[i],p=u.callback;if(p!==null){if(u.callback=null,u=l,typeof p!="function")throw Error(n(191,p));p.call(u)}}}var xa={},Hn=Br(xa),Sa=Br(xa),Ea=Br(xa);function xi(t){if(t===xa)throw Error(n(174));return t}function Su(t,i){switch(Xe(Ea,i),Xe(Sa,t),Xe(Hn,xa),t=i.nodeType,t){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:jr(null,"");break;default:t=t===8?i.parentNode:i,i=t.namespaceURI||null,t=t.tagName,i=jr(i,t)}it(Hn),Xe(Hn,i)}function vs(){it(Hn),it(Sa),it(Ea)}function op(t){xi(Ea.current);var i=xi(Hn.current),l=jr(i,t.type);i!==l&&(Xe(Sa,t),Xe(Hn,l))}function Eu(t){Sa.current===t&&(it(Hn),it(Sa))}var ut=Br(0);function sl(t){for(var i=t;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if(i.flags&128)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var ku=[];function Cu(){for(var t=0;t<ku.length;t++)ku[t]._workInProgressVersionPrimary=null;ku.length=0}var al=F.ReactCurrentDispatcher,ju=F.ReactCurrentBatchConfig,Si=0,dt=null,jt=null,Nt=null,ol=!1,ka=!1,Ca=0,Ww=0;function qt(){throw Error(n(321))}function Tu(t,i){if(i===null)return!1;for(var l=0;l<i.length&&l<t.length;l++)if(!An(t[l],i[l]))return!1;return!0}function Nu(t,i,l,u,p,y){if(Si=y,dt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,al.current=t===null||t.memoizedState===null?Xw:Zw,t=l(u,p),ka){y=0;do{if(ka=!1,Ca=0,25<=y)throw Error(n(301));y+=1,Nt=jt=null,i.updateQueue=null,al.current=eb,t=l(u,p)}while(ka)}if(al.current=ul,i=jt!==null&&jt.next!==null,Si=0,Nt=jt=dt=null,ol=!1,i)throw Error(n(300));return t}function Au(){var t=Ca!==0;return Ca=0,t}function Wn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?dt.memoizedState=Nt=t:Nt=Nt.next=t,Nt}function bn(){if(jt===null){var t=dt.alternate;t=t!==null?t.memoizedState:null}else t=jt.next;var i=Nt===null?dt.memoizedState:Nt.next;if(i!==null)Nt=i,jt=t;else{if(t===null)throw Error(n(310));jt=t,t={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},Nt===null?dt.memoizedState=Nt=t:Nt=Nt.next=t}return Nt}function ja(t,i){return typeof i=="function"?i(t):i}function Pu(t){var i=bn(),l=i.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=t;var u=jt,p=u.baseQueue,y=l.pending;if(y!==null){if(p!==null){var b=p.next;p.next=y.next,y.next=b}u.baseQueue=p=y,l.pending=null}if(p!==null){y=p.next,u=u.baseState;var C=b=null,R=null,V=y;do{var X=V.lane;if((Si&X)===X)R!==null&&(R=R.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),u=V.hasEagerState?V.eagerState:t(u,V.action);else{var Z={lane:X,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};R===null?(C=R=Z,b=u):R=R.next=Z,dt.lanes|=X,Ei|=X}V=V.next}while(V!==null&&V!==y);R===null?b=u:R.next=C,An(u,i.memoizedState)||(tn=!0),i.memoizedState=u,i.baseState=b,i.baseQueue=R,l.lastRenderedState=u}if(t=l.interleaved,t!==null){p=t;do y=p.lane,dt.lanes|=y,Ei|=y,p=p.next;while(p!==t)}else p===null&&(l.lanes=0);return[i.memoizedState,l.dispatch]}function Ru(t){var i=bn(),l=i.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=t;var u=l.dispatch,p=l.pending,y=i.memoizedState;if(p!==null){l.pending=null;var b=p=p.next;do y=t(y,b.action),b=b.next;while(b!==p);An(y,i.memoizedState)||(tn=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),l.lastRenderedState=y}return[y,u]}function lp(){}function cp(t,i){var l=dt,u=bn(),p=i(),y=!An(u.memoizedState,p);if(y&&(u.memoizedState=p,tn=!0),u=u.queue,Ou(hp.bind(null,l,u,t),[t]),u.getSnapshot!==i||y||Nt!==null&&Nt.memoizedState.tag&1){if(l.flags|=2048,Ta(9,dp.bind(null,l,u,p,i),void 0,null),At===null)throw Error(n(349));Si&30||up(l,i,p)}return p}function up(t,i,l){t.flags|=16384,t={getSnapshot:i,value:l},i=dt.updateQueue,i===null?(i={lastEffect:null,stores:null},dt.updateQueue=i,i.stores=[t]):(l=i.stores,l===null?i.stores=[t]:l.push(t))}function dp(t,i,l,u){i.value=l,i.getSnapshot=u,fp(i)&&pp(t)}function hp(t,i,l){return l(function(){fp(i)&&pp(t)})}function fp(t){var i=t.getSnapshot;t=t.value;try{var l=i();return!An(t,l)}catch{return!0}}function pp(t){var i=ur(t,1);i!==null&&Mn(i,t,1,-1)}function mp(t){var i=Wn();return typeof t=="function"&&(t=t()),i.memoizedState=i.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:t},i.queue=t,t=t.dispatch=Qw.bind(null,dt,t),[i.memoizedState,t]}function Ta(t,i,l,u){return t={tag:t,create:i,destroy:l,deps:u,next:null},i=dt.updateQueue,i===null?(i={lastEffect:null,stores:null},dt.updateQueue=i,i.lastEffect=t.next=t):(l=i.lastEffect,l===null?i.lastEffect=t.next=t:(u=l.next,l.next=t,t.next=u,i.lastEffect=t)),t}function gp(){return bn().memoizedState}function ll(t,i,l,u){var p=Wn();dt.flags|=t,p.memoizedState=Ta(1|i,l,void 0,u===void 0?null:u)}function cl(t,i,l,u){var p=bn();u=u===void 0?null:u;var y=void 0;if(jt!==null){var b=jt.memoizedState;if(y=b.destroy,u!==null&&Tu(u,b.deps)){p.memoizedState=Ta(i,l,y,u);return}}dt.flags|=t,p.memoizedState=Ta(1|i,l,y,u)}function vp(t,i){return ll(8390656,8,t,i)}function Ou(t,i){return cl(2048,8,t,i)}function yp(t,i){return cl(4,2,t,i)}function _p(t,i){return cl(4,4,t,i)}function wp(t,i){if(typeof i=="function")return t=t(),i(t),function(){i(null)};if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function bp(t,i,l){return l=l!=null?l.concat([t]):null,cl(4,4,wp.bind(null,i,t),l)}function Iu(){}function xp(t,i){var l=bn();i=i===void 0?null:i;var u=l.memoizedState;return u!==null&&i!==null&&Tu(i,u[1])?u[0]:(l.memoizedState=[t,i],t)}function Sp(t,i){var l=bn();i=i===void 0?null:i;var u=l.memoizedState;return u!==null&&i!==null&&Tu(i,u[1])?u[0]:(t=t(),l.memoizedState=[t,i],t)}function Ep(t,i,l){return Si&21?(An(l,i)||(l=Zh(),dt.lanes|=l,Ei|=l,t.baseState=!0),i):(t.baseState&&(t.baseState=!1,tn=!0),t.memoizedState=l)}function Jw(t,i){var l=He;He=l!==0&&4>l?l:4,t(!0);var u=ju.transition;ju.transition={};try{t(!1),i()}finally{He=l,ju.transition=u}}function kp(){return bn().memoizedState}function Kw(t,i,l){var u=Wr(t);if(l={lane:u,action:l,hasEagerState:!1,eagerState:null,next:null},Cp(t))jp(i,l);else if(l=rp(t,i,l,u),l!==null){var p=Jt();Mn(l,t,u,p),Tp(l,i,u)}}function Qw(t,i,l){var u=Wr(t),p={lane:u,action:l,hasEagerState:!1,eagerState:null,next:null};if(Cp(t))jp(i,p);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var b=i.lastRenderedState,C=y(b,l);if(p.hasEagerState=!0,p.eagerState=C,An(C,b)){var R=i.interleaved;R===null?(p.next=p,bu(i)):(p.next=R.next,R.next=p),i.interleaved=p;return}}catch{}finally{}l=rp(t,i,p,u),l!==null&&(p=Jt(),Mn(l,t,u,p),Tp(l,i,u))}}function Cp(t){var i=t.alternate;return t===dt||i!==null&&i===dt}function jp(t,i){ka=ol=!0;var l=t.pending;l===null?i.next=i:(i.next=l.next,l.next=i),t.pending=i}function Tp(t,i,l){if(l&4194240){var u=i.lanes;u&=t.pendingLanes,l|=u,i.lanes=l,Lc(t,l)}}var ul={readContext:wn,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useInsertionEffect:qt,useLayoutEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useMutableSource:qt,useSyncExternalStore:qt,useId:qt,unstable_isNewReconciler:!1},Xw={readContext:wn,useCallback:function(t,i){return Wn().memoizedState=[t,i===void 0?null:i],t},useContext:wn,useEffect:vp,useImperativeHandle:function(t,i,l){return l=l!=null?l.concat([t]):null,ll(4194308,4,wp.bind(null,i,t),l)},useLayoutEffect:function(t,i){return ll(4194308,4,t,i)},useInsertionEffect:function(t,i){return ll(4,2,t,i)},useMemo:function(t,i){var l=Wn();return i=i===void 0?null:i,t=t(),l.memoizedState=[t,i],t},useReducer:function(t,i,l){var u=Wn();return i=l!==void 0?l(i):i,u.memoizedState=u.baseState=i,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},u.queue=t,t=t.dispatch=Kw.bind(null,dt,t),[u.memoizedState,t]},useRef:function(t){var i=Wn();return t={current:t},i.memoizedState=t},useState:mp,useDebugValue:Iu,useDeferredValue:function(t){return Wn().memoizedState=t},useTransition:function(){var t=mp(!1),i=t[0];return t=Jw.bind(null,t[1]),Wn().memoizedState=t,[i,t]},useMutableSource:function(){},useSyncExternalStore:function(t,i,l){var u=dt,p=Wn();if(at){if(l===void 0)throw Error(n(407));l=l()}else{if(l=i(),At===null)throw Error(n(349));Si&30||up(u,i,l)}p.memoizedState=l;var y={value:l,getSnapshot:i};return p.queue=y,vp(hp.bind(null,u,y,t),[t]),u.flags|=2048,Ta(9,dp.bind(null,u,y,l,i),void 0,null),l},useId:function(){var t=Wn(),i=At.identifierPrefix;if(at){var l=cr,u=lr;l=(u&~(1<<32-Nn(u)-1)).toString(32)+l,i=":"+i+"R"+l,l=Ca++,0<l&&(i+="H"+l.toString(32)),i+=":"}else l=Ww++,i=":"+i+"r"+l.toString(32)+":";return t.memoizedState=i},unstable_isNewReconciler:!1},Zw={readContext:wn,useCallback:xp,useContext:wn,useEffect:Ou,useImperativeHandle:bp,useInsertionEffect:yp,useLayoutEffect:_p,useMemo:Sp,useReducer:Pu,useRef:gp,useState:function(){return Pu(ja)},useDebugValue:Iu,useDeferredValue:function(t){var i=bn();return Ep(i,jt.memoizedState,t)},useTransition:function(){var t=Pu(ja)[0],i=bn().memoizedState;return[t,i]},useMutableSource:lp,useSyncExternalStore:cp,useId:kp,unstable_isNewReconciler:!1},eb={readContext:wn,useCallback:xp,useContext:wn,useEffect:Ou,useImperativeHandle:bp,useInsertionEffect:yp,useLayoutEffect:_p,useMemo:Sp,useReducer:Ru,useRef:gp,useState:function(){return Ru(ja)},useDebugValue:Iu,useDeferredValue:function(t){var i=bn();return jt===null?i.memoizedState=t:Ep(i,jt.memoizedState,t)},useTransition:function(){var t=Ru(ja)[0],i=bn().memoizedState;return[t,i]},useMutableSource:lp,useSyncExternalStore:cp,useId:kp,unstable_isNewReconciler:!1};function Rn(t,i){if(t&&t.defaultProps){i=oe({},i),t=t.defaultProps;for(var l in t)i[l]===void 0&&(i[l]=t[l]);return i}return i}function Mu(t,i,l,u){i=t.memoizedState,l=l(u,i),l=l==null?i:oe({},i,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var dl={isMounted:function(t){return(t=t._reactInternals)?Xt(t)===t:!1},enqueueSetState:function(t,i,l){t=t._reactInternals;var u=Jt(),p=Wr(t),y=dr(u,p);y.payload=i,l!=null&&(y.callback=l),i=qr(t,y,p),i!==null&&(Mn(i,t,p,u),rl(i,t,p))},enqueueReplaceState:function(t,i,l){t=t._reactInternals;var u=Jt(),p=Wr(t),y=dr(u,p);y.tag=1,y.payload=i,l!=null&&(y.callback=l),i=qr(t,y,p),i!==null&&(Mn(i,t,p,u),rl(i,t,p))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var l=Jt(),u=Wr(t),p=dr(l,u);p.tag=2,i!=null&&(p.callback=i),i=qr(t,p,u),i!==null&&(Mn(i,t,u,l),rl(i,t,u))}};function Np(t,i,l,u,p,y,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,y,b):i.prototype&&i.prototype.isPureReactComponent?!pa(l,u)||!pa(p,y):!0}function Ap(t,i,l){var u=!1,p=$r,y=i.contextType;return typeof y=="object"&&y!==null?y=wn(y):(p=en(i)?yi:Vt.current,u=i.contextTypes,y=(u=u!=null)?us(t,p):$r),i=new i(l,y),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=dl,t.stateNode=i,i._reactInternals=t,u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=p,t.__reactInternalMemoizedMaskedChildContext=y),i}function Pp(t,i,l,u){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,u),i.state!==t&&dl.enqueueReplaceState(i,i.state,null)}function Lu(t,i,l,u){var p=t.stateNode;p.props=l,p.state=t.memoizedState,p.refs={},xu(t);var y=i.contextType;typeof y=="object"&&y!==null?p.context=wn(y):(y=en(i)?yi:Vt.current,p.context=us(t,y)),p.state=t.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(Mu(t,i,y,l),p.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(i=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),i!==p.state&&dl.enqueueReplaceState(p,p.state,null),il(t,l,p,u),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308)}function ys(t,i){try{var l="",u=i;do l+=S(u),u=u.return;while(u);var p=l}catch(y){p=` +Error generating stack: `+y.message+` +`+y.stack}return{value:t,source:i,stack:p,digest:null}}function Du(t,i,l){return{value:t,source:null,stack:l??null,digest:i??null}}function Fu(t,i){try{console.error(i.value)}catch(l){setTimeout(function(){throw l})}}var tb=typeof WeakMap=="function"?WeakMap:Map;function Rp(t,i,l){l=dr(-1,l),l.tag=3,l.payload={element:null};var u=i.value;return l.callback=function(){yl||(yl=!0,Zu=u),Fu(t,i)},l}function Op(t,i,l){l=dr(-1,l),l.tag=3;var u=t.type.getDerivedStateFromError;if(typeof u=="function"){var p=i.value;l.payload=function(){return u(p)},l.callback=function(){Fu(t,i)}}var y=t.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){Fu(t,i),typeof u!="function"&&(Yr===null?Yr=new Set([this]):Yr.add(this));var b=i.stack;this.componentDidCatch(i.value,{componentStack:b!==null?b:""})}),l}function Ip(t,i,l){var u=t.pingCache;if(u===null){u=t.pingCache=new tb;var p=new Set;u.set(i,p)}else p=u.get(i),p===void 0&&(p=new Set,u.set(i,p));p.has(l)||(p.add(l),t=mb.bind(null,t,i,l),i.then(t,t))}function Mp(t){do{var i;if((i=t.tag===13)&&(i=t.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return t;t=t.return}while(t!==null);return null}function Lp(t,i,l,u,p){return t.mode&1?(t.flags|=65536,t.lanes=p,t):(t===i?t.flags|=65536:(t.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(i=dr(-1,1),i.tag=2,qr(l,i,1))),l.lanes|=1),t)}var nb=F.ReactCurrentOwner,tn=!1;function Wt(t,i,l,u){i.child=t===null?np(i,null,l,u):ps(i,t.child,l,u)}function Dp(t,i,l,u,p){l=l.render;var y=i.ref;return gs(i,p),u=Nu(t,i,l,u,y,p),l=Au(),t!==null&&!tn?(i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~p,hr(t,i,p)):(at&&l&&hu(i),i.flags|=1,Wt(t,i,u,p),i.child)}function Fp(t,i,l,u,p){if(t===null){var y=l.type;return typeof y=="function"&&!ad(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(i.tag=15,i.type=y,Up(t,i,y,u,p)):(t=El(l.type,null,u,i,i.mode,p),t.ref=i.ref,t.return=i,i.child=t)}if(y=t.child,!(t.lanes&p)){var b=y.memoizedProps;if(l=l.compare,l=l!==null?l:pa,l(b,u)&&t.ref===i.ref)return hr(t,i,p)}return i.flags|=1,t=Kr(y,u),t.ref=i.ref,t.return=i,i.child=t}function Up(t,i,l,u,p){if(t!==null){var y=t.memoizedProps;if(pa(y,u)&&t.ref===i.ref)if(tn=!1,i.pendingProps=u=y,(t.lanes&p)!==0)t.flags&131072&&(tn=!0);else return i.lanes=t.lanes,hr(t,i,p)}return Uu(t,i,l,u,p)}function Bp(t,i,l){var u=i.pendingProps,p=u.children,y=t!==null?t.memoizedState:null;if(u.mode==="hidden")if(!(i.mode&1))i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(ws,pn),pn|=l;else{if(!(l&1073741824))return t=y!==null?y.baseLanes|l:l,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:t,cachePool:null,transitions:null},i.updateQueue=null,Xe(ws,pn),pn|=t,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=y!==null?y.baseLanes:l,Xe(ws,pn),pn|=u}else y!==null?(u=y.baseLanes|l,i.memoizedState=null):u=l,Xe(ws,pn),pn|=u;return Wt(t,i,p,l),i.child}function $p(t,i){var l=i.ref;(t===null&&l!==null||t!==null&&t.ref!==l)&&(i.flags|=512,i.flags|=2097152)}function Uu(t,i,l,u,p){var y=en(l)?yi:Vt.current;return y=us(i,y),gs(i,p),l=Nu(t,i,l,u,y,p),u=Au(),t!==null&&!tn?(i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~p,hr(t,i,p)):(at&&u&&hu(i),i.flags|=1,Wt(t,i,l,p),i.child)}function zp(t,i,l,u,p){if(en(l)){var y=!0;Jo(i)}else y=!1;if(gs(i,p),i.stateNode===null)fl(t,i),Ap(i,l,u),Lu(i,l,u,p),u=!0;else if(t===null){var b=i.stateNode,C=i.memoizedProps;b.props=C;var R=b.context,V=l.contextType;typeof V=="object"&&V!==null?V=wn(V):(V=en(l)?yi:Vt.current,V=us(i,V));var X=l.getDerivedStateFromProps,Z=typeof X=="function"||typeof b.getSnapshotBeforeUpdate=="function";Z||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C!==u||R!==V)&&Pp(i,b,u,V),Vr=!1;var Q=i.memoizedState;b.state=Q,il(i,u,b,p),R=i.memoizedState,C!==u||Q!==R||Zt.current||Vr?(typeof X=="function"&&(Mu(i,l,X,u),R=i.memoizedState),(C=Vr||Np(i,l,C,u,Q,R,V))?(Z||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=R),b.props=u,b.state=R,b.context=V,u=C):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{b=i.stateNode,ip(t,i),C=i.memoizedProps,V=i.type===i.elementType?C:Rn(i.type,C),b.props=V,Z=i.pendingProps,Q=b.context,R=l.contextType,typeof R=="object"&&R!==null?R=wn(R):(R=en(l)?yi:Vt.current,R=us(i,R));var ce=l.getDerivedStateFromProps;(X=typeof ce=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C!==Z||Q!==R)&&Pp(i,b,u,R),Vr=!1,Q=i.memoizedState,b.state=Q,il(i,u,b,p);var he=i.memoizedState;C!==Z||Q!==he||Zt.current||Vr?(typeof ce=="function"&&(Mu(i,l,ce,u),he=i.memoizedState),(V=Vr||Np(i,l,V,u,Q,he,R)||!1)?(X||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,he,R),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,he,R)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||C===t.memoizedProps&&Q===t.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||C===t.memoizedProps&&Q===t.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=he),b.props=u,b.state=he,b.context=R,u=V):(typeof b.componentDidUpdate!="function"||C===t.memoizedProps&&Q===t.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||C===t.memoizedProps&&Q===t.memoizedState||(i.flags|=1024),u=!1)}return Bu(t,i,l,u,y,p)}function Bu(t,i,l,u,p,y){$p(t,i);var b=(i.flags&128)!==0;if(!u&&!b)return p&&Hf(i,l,!1),hr(t,i,y);u=i.stateNode,nb.current=i;var C=b&&typeof l.getDerivedStateFromError!="function"?null:u.render();return i.flags|=1,t!==null&&b?(i.child=ps(i,t.child,null,y),i.child=ps(i,null,C,y)):Wt(t,i,C,y),i.memoizedState=u.state,p&&Hf(i,l,!0),i.child}function Vp(t){var i=t.stateNode;i.pendingContext?Gf(t,i.pendingContext,i.pendingContext!==i.context):i.context&&Gf(t,i.context,!1),Su(t,i.containerInfo)}function qp(t,i,l,u,p){return fs(),gu(p),i.flags|=256,Wt(t,i,l,u),i.child}var $u={dehydrated:null,treeContext:null,retryLane:0};function zu(t){return{baseLanes:t,cachePool:null,transitions:null}}function Gp(t,i,l){var u=i.pendingProps,p=ut.current,y=!1,b=(i.flags&128)!==0,C;if((C=b)||(C=t!==null&&t.memoizedState===null?!1:(p&2)!==0),C?(y=!0,i.flags&=-129):(t===null||t.memoizedState!==null)&&(p|=1),Xe(ut,p&1),t===null)return mu(i),t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(i.mode&1?t.data==="$!"?i.lanes=8:i.lanes=1073741824:i.lanes=1,null):(b=u.children,t=u.fallback,y?(u=i.mode,y=i.child,b={mode:"hidden",children:b},!(u&1)&&y!==null?(y.childLanes=0,y.pendingProps=b):y=kl(b,u,0,null),t=Ti(t,u,l,null),y.return=i,t.return=i,y.sibling=t,i.child=y,i.child.memoizedState=zu(l),i.memoizedState=$u,t):Vu(i,b));if(p=t.memoizedState,p!==null&&(C=p.dehydrated,C!==null))return rb(t,i,b,u,C,p,l);if(y){y=u.fallback,b=i.mode,p=t.child,C=p.sibling;var R={mode:"hidden",children:u.children};return!(b&1)&&i.child!==p?(u=i.child,u.childLanes=0,u.pendingProps=R,i.deletions=null):(u=Kr(p,R),u.subtreeFlags=p.subtreeFlags&14680064),C!==null?y=Kr(C,y):(y=Ti(y,b,l,null),y.flags|=2),y.return=i,u.return=i,u.sibling=y,i.child=u,u=y,y=i.child,b=t.child.memoizedState,b=b===null?zu(l):{baseLanes:b.baseLanes|l,cachePool:null,transitions:b.transitions},y.memoizedState=b,y.childLanes=t.childLanes&~l,i.memoizedState=$u,u}return y=t.child,t=y.sibling,u=Kr(y,{mode:"visible",children:u.children}),!(i.mode&1)&&(u.lanes=l),u.return=i,u.sibling=null,t!==null&&(l=i.deletions,l===null?(i.deletions=[t],i.flags|=16):l.push(t)),i.child=u,i.memoizedState=null,u}function Vu(t,i){return i=kl({mode:"visible",children:i},t.mode,0,null),i.return=t,t.child=i}function hl(t,i,l,u){return u!==null&&gu(u),ps(i,t.child,null,l),t=Vu(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function rb(t,i,l,u,p,y,b){if(l)return i.flags&256?(i.flags&=-257,u=Du(Error(n(422))),hl(t,i,b,u)):i.memoizedState!==null?(i.child=t.child,i.flags|=128,null):(y=u.fallback,p=i.mode,u=kl({mode:"visible",children:u.children},p,0,null),y=Ti(y,p,b,null),y.flags|=2,u.return=i,y.return=i,u.sibling=y,i.child=u,i.mode&1&&ps(i,t.child,null,b),i.child.memoizedState=zu(b),i.memoizedState=$u,y);if(!(i.mode&1))return hl(t,i,b,null);if(p.data==="$!"){if(u=p.nextSibling&&p.nextSibling.dataset,u)var C=u.dgst;return u=C,y=Error(n(419)),u=Du(y,u,void 0),hl(t,i,b,u)}if(C=(b&t.childLanes)!==0,tn||C){if(u=At,u!==null){switch(b&-b){case 4:p=2;break;case 16:p=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:p=32;break;case 536870912:p=268435456;break;default:p=0}p=p&(u.suspendedLanes|b)?0:p,p!==0&&p!==y.retryLane&&(y.retryLane=p,ur(t,p),Mn(u,t,p,-1))}return sd(),u=Du(Error(n(421))),hl(t,i,b,u)}return p.data==="$?"?(i.flags|=128,i.child=t.child,i=gb.bind(null,t),p._reactRetry=i,null):(t=y.treeContext,fn=Ur(p.nextSibling),hn=i,at=!0,Pn=null,t!==null&&(yn[_n++]=lr,yn[_n++]=cr,yn[_n++]=_i,lr=t.id,cr=t.overflow,_i=i),i=Vu(i,u.children),i.flags|=4096,i)}function Yp(t,i,l){t.lanes|=i;var u=t.alternate;u!==null&&(u.lanes|=i),wu(t.return,i,l)}function qu(t,i,l,u,p){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=u,y.tail=l,y.tailMode=p)}function Hp(t,i,l){var u=i.pendingProps,p=u.revealOrder,y=u.tail;if(Wt(t,i,u.children,l),u=ut.current,u&2)u=u&1|2,i.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Yp(t,l,i);else if(t.tag===19)Yp(t,l,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}if(Xe(ut,u),!(i.mode&1))i.memoizedState=null;else switch(p){case"forwards":for(l=i.child,p=null;l!==null;)t=l.alternate,t!==null&&sl(t)===null&&(p=l),l=l.sibling;l=p,l===null?(p=i.child,i.child=null):(p=l.sibling,l.sibling=null),qu(i,!1,p,l,y);break;case"backwards":for(l=null,p=i.child,i.child=null;p!==null;){if(t=p.alternate,t!==null&&sl(t)===null){i.child=p;break}t=p.sibling,p.sibling=l,l=p,p=t}qu(i,!0,l,null,y);break;case"together":qu(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function fl(t,i){!(i.mode&1)&&t!==null&&(t.alternate=null,i.alternate=null,i.flags|=2)}function hr(t,i,l){if(t!==null&&(i.dependencies=t.dependencies),Ei|=i.lanes,!(l&i.childLanes))return null;if(t!==null&&i.child!==t.child)throw Error(n(153));if(i.child!==null){for(t=i.child,l=Kr(t,t.pendingProps),i.child=l,l.return=i;t.sibling!==null;)t=t.sibling,l=l.sibling=Kr(t,t.pendingProps),l.return=i;l.sibling=null}return i.child}function ib(t,i,l){switch(i.tag){case 3:Vp(i),fs();break;case 5:op(i);break;case 1:en(i.type)&&Jo(i);break;case 4:Su(i,i.stateNode.containerInfo);break;case 10:var u=i.type._context,p=i.memoizedProps.value;Xe(tl,u._currentValue),u._currentValue=p;break;case 13:if(u=i.memoizedState,u!==null)return u.dehydrated!==null?(Xe(ut,ut.current&1),i.flags|=128,null):l&i.child.childLanes?Gp(t,i,l):(Xe(ut,ut.current&1),t=hr(t,i,l),t!==null?t.sibling:null);Xe(ut,ut.current&1);break;case 19:if(u=(l&i.childLanes)!==0,t.flags&128){if(u)return Hp(t,i,l);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Xe(ut,ut.current),u)break;return null;case 22:case 23:return i.lanes=0,Bp(t,i,l)}return hr(t,i,l)}var Wp,Gu,Jp,Kp;Wp=function(t,i){for(var l=i.child;l!==null;){if(l.tag===5||l.tag===6)t.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Gu=function(){},Jp=function(t,i,l,u){var p=t.memoizedProps;if(p!==u){t=i.stateNode,xi(Hn.current);var y=null;switch(l){case"input":p=yt(t,p),u=yt(t,u),y=[];break;case"select":p=oe({},p,{value:void 0}),u=oe({},u,{value:void 0}),y=[];break;case"textarea":p=be(t,p),u=be(t,u),y=[];break;default:typeof p.onClick!="function"&&typeof u.onClick=="function"&&(t.onclick=Yo)}Qi(l,u);var b;l=null;for(V in p)if(!u.hasOwnProperty(V)&&p.hasOwnProperty(V)&&p[V]!=null)if(V==="style"){var C=p[V];for(b in C)C.hasOwnProperty(b)&&(l||(l={}),l[b]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(a.hasOwnProperty(V)?y||(y=[]):(y=y||[]).push(V,null));for(V in u){var R=u[V];if(C=p!=null?p[V]:void 0,u.hasOwnProperty(V)&&R!==C&&(R!=null||C!=null))if(V==="style")if(C){for(b in C)!C.hasOwnProperty(b)||R&&R.hasOwnProperty(b)||(l||(l={}),l[b]="");for(b in R)R.hasOwnProperty(b)&&C[b]!==R[b]&&(l||(l={}),l[b]=R[b])}else l||(y||(y=[]),y.push(V,l)),l=R;else V==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,C=C?C.__html:void 0,R!=null&&C!==R&&(y=y||[]).push(V,R)):V==="children"?typeof R!="string"&&typeof R!="number"||(y=y||[]).push(V,""+R):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(a.hasOwnProperty(V)?(R!=null&&V==="onScroll"&&rt("scroll",t),y||C===R||(y=[])):(y=y||[]).push(V,R))}l&&(y=y||[]).push("style",l);var V=y;(i.updateQueue=V)&&(i.flags|=4)}},Kp=function(t,i,l,u){l!==u&&(i.flags|=4)};function Na(t,i){if(!at)switch(t.tailMode){case"hidden":i=t.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function Gt(t){var i=t.alternate!==null&&t.alternate.child===t.child,l=0,u=0;if(i)for(var p=t.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&14680064,u|=p.flags&14680064,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=u,t.childLanes=l,i}function sb(t,i,l){var u=i.pendingProps;switch(fu(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(i),null;case 1:return en(i.type)&&Wo(),Gt(i),null;case 3:return u=i.stateNode,vs(),it(Zt),it(Vt),Cu(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(t===null||t.child===null)&&(Zo(i)?i.flags|=4:t===null||t.memoizedState.isDehydrated&&!(i.flags&256)||(i.flags|=1024,Pn!==null&&(nd(Pn),Pn=null))),Gu(t,i),Gt(i),null;case 5:Eu(i);var p=xi(Ea.current);if(l=i.type,t!==null&&i.stateNode!=null)Jp(t,i,l,u,p),t.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!u){if(i.stateNode===null)throw Error(n(166));return Gt(i),null}if(t=xi(Hn.current),Zo(i)){u=i.stateNode,l=i.type;var y=i.memoizedProps;switch(u[Yn]=i,u[_a]=y,t=(i.mode&1)!==0,l){case"dialog":rt("cancel",u),rt("close",u);break;case"iframe":case"object":case"embed":rt("load",u);break;case"video":case"audio":for(p=0;p<ga.length;p++)rt(ga[p],u);break;case"source":rt("error",u);break;case"img":case"image":case"link":rt("error",u),rt("load",u);break;case"details":rt("toggle",u);break;case"input":ct(u,y),rt("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!y.multiple},rt("invalid",u);break;case"textarea":kr(u,y),rt("invalid",u)}Qi(l,y),p=null;for(var b in y)if(y.hasOwnProperty(b)){var C=y[b];b==="children"?typeof C=="string"?u.textContent!==C&&(y.suppressHydrationWarning!==!0&&Go(u.textContent,C,t),p=["children",C]):typeof C=="number"&&u.textContent!==""+C&&(y.suppressHydrationWarning!==!0&&Go(u.textContent,C,t),p=["children",""+C]):a.hasOwnProperty(b)&&C!=null&&b==="onScroll"&&rt("scroll",u)}switch(l){case"input":_e(u),bt(u,y,!0);break;case"textarea":_e(u),Cr(u);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(u.onclick=Yo)}u=p,i.updateQueue=u,u!==null&&(i.flags|=4)}else{b=p.nodeType===9?p:p.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Js(l)),t==="http://www.w3.org/1999/xhtml"?l==="script"?(t=b.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof u.is=="string"?t=b.createElement(l,{is:u.is}):(t=b.createElement(l),l==="select"&&(b=t,u.multiple?b.multiple=!0:u.size&&(b.size=u.size))):t=b.createElementNS(t,l),t[Yn]=i,t[_a]=u,Wp(t,i,!1,!1),i.stateNode=t;e:{switch(b=mi(l,u),l){case"dialog":rt("cancel",t),rt("close",t),p=u;break;case"iframe":case"object":case"embed":rt("load",t),p=u;break;case"video":case"audio":for(p=0;p<ga.length;p++)rt(ga[p],t);p=u;break;case"source":rt("error",t),p=u;break;case"img":case"image":case"link":rt("error",t),rt("load",t),p=u;break;case"details":rt("toggle",t),p=u;break;case"input":ct(t,u),p=yt(t,u),rt("invalid",t);break;case"option":p=u;break;case"select":t._wrapperState={wasMultiple:!!u.multiple},p=oe({},u,{value:void 0}),rt("invalid",t);break;case"textarea":kr(t,u),p=be(t,u),rt("invalid",t);break;default:p=u}Qi(l,p),C=p;for(y in C)if(C.hasOwnProperty(y)){var R=C[y];y==="style"?Ks(t,R):y==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&jn(t,R)):y==="children"?typeof R=="string"?(l!=="textarea"||R!=="")&&Tr(t,R):typeof R=="number"&&Tr(t,""+R):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(a.hasOwnProperty(y)?R!=null&&y==="onScroll"&&rt("scroll",t):R!=null&&G(t,y,R,b))}switch(l){case"input":_e(t),bt(t,u,!1);break;case"textarea":_e(t),Cr(t);break;case"option":u.value!=null&&t.setAttribute("value",""+q(u.value));break;case"select":t.multiple=!!u.multiple,y=u.value,y!=null?Mt(t,!!u.multiple,y,!1):u.defaultValue!=null&&Mt(t,!!u.multiple,u.defaultValue,!0);break;default:typeof p.onClick=="function"&&(t.onclick=Yo)}switch(l){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return Gt(i),null;case 6:if(t&&i.stateNode!=null)Kp(t,i,t.memoizedProps,u);else{if(typeof u!="string"&&i.stateNode===null)throw Error(n(166));if(l=xi(Ea.current),xi(Hn.current),Zo(i)){if(u=i.stateNode,l=i.memoizedProps,u[Yn]=i,(y=u.nodeValue!==l)&&(t=hn,t!==null))switch(t.tag){case 3:Go(u.nodeValue,l,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Go(u.nodeValue,l,(t.mode&1)!==0)}y&&(i.flags|=4)}else u=(l.nodeType===9?l:l.ownerDocument).createTextNode(u),u[Yn]=i,i.stateNode=u}return Gt(i),null;case 13:if(it(ut),u=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(at&&fn!==null&&i.mode&1&&!(i.flags&128))Zf(),fs(),i.flags|=98560,y=!1;else if(y=Zo(i),u!==null&&u.dehydrated!==null){if(t===null){if(!y)throw Error(n(318));if(y=i.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Yn]=i}else fs(),!(i.flags&128)&&(i.memoizedState=null),i.flags|=4;Gt(i),y=!1}else Pn!==null&&(nd(Pn),Pn=null),y=!0;if(!y)return i.flags&65536?i:null}return i.flags&128?(i.lanes=l,i):(u=u!==null,u!==(t!==null&&t.memoizedState!==null)&&u&&(i.child.flags|=8192,i.mode&1&&(t===null||ut.current&1?Tt===0&&(Tt=3):sd())),i.updateQueue!==null&&(i.flags|=4),Gt(i),null);case 4:return vs(),Gu(t,i),t===null&&va(i.stateNode.containerInfo),Gt(i),null;case 10:return _u(i.type._context),Gt(i),null;case 17:return en(i.type)&&Wo(),Gt(i),null;case 19:if(it(ut),y=i.memoizedState,y===null)return Gt(i),null;if(u=(i.flags&128)!==0,b=y.rendering,b===null)if(u)Na(y,!1);else{if(Tt!==0||t!==null&&t.flags&128)for(t=i.child;t!==null;){if(b=sl(t),b!==null){for(i.flags|=128,Na(y,!1),u=b.updateQueue,u!==null&&(i.updateQueue=u,i.flags|=4),i.subtreeFlags=0,u=l,l=i.child;l!==null;)y=l,t=u,y.flags&=14680066,b=y.alternate,b===null?(y.childLanes=0,y.lanes=t,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=b.childLanes,y.lanes=b.lanes,y.child=b.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=b.memoizedProps,y.memoizedState=b.memoizedState,y.updateQueue=b.updateQueue,y.type=b.type,t=b.dependencies,y.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),l=l.sibling;return Xe(ut,ut.current&1|2),i.child}t=t.sibling}y.tail!==null&&Fe()>bs&&(i.flags|=128,u=!0,Na(y,!1),i.lanes=4194304)}else{if(!u)if(t=sl(b),t!==null){if(i.flags|=128,u=!0,l=t.updateQueue,l!==null&&(i.updateQueue=l,i.flags|=4),Na(y,!0),y.tail===null&&y.tailMode==="hidden"&&!b.alternate&&!at)return Gt(i),null}else 2*Fe()-y.renderingStartTime>bs&&l!==1073741824&&(i.flags|=128,u=!0,Na(y,!1),i.lanes=4194304);y.isBackwards?(b.sibling=i.child,i.child=b):(l=y.last,l!==null?l.sibling=b:i.child=b,y.last=b)}return y.tail!==null?(i=y.tail,y.rendering=i,y.tail=i.sibling,y.renderingStartTime=Fe(),i.sibling=null,l=ut.current,Xe(ut,u?l&1|2:l&1),i):(Gt(i),null);case 22:case 23:return id(),u=i.memoizedState!==null,t!==null&&t.memoizedState!==null!==u&&(i.flags|=8192),u&&i.mode&1?pn&1073741824&&(Gt(i),i.subtreeFlags&6&&(i.flags|=8192)):Gt(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function ab(t,i){switch(fu(i),i.tag){case 1:return en(i.type)&&Wo(),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return vs(),it(Zt),it(Vt),Cu(),t=i.flags,t&65536&&!(t&128)?(i.flags=t&-65537|128,i):null;case 5:return Eu(i),null;case 13:if(it(ut),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(n(340));fs()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return it(ut),null;case 4:return vs(),null;case 10:return _u(i.type._context),null;case 22:case 23:return id(),null;case 24:return null;default:return null}}var pl=!1,Yt=!1,ob=typeof WeakSet=="function"?WeakSet:Set,ue=null;function _s(t,i){var l=t.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(u){ft(t,i,u)}else l.current=null}function Yu(t,i,l){try{l()}catch(u){ft(t,i,u)}}var Qp=!1;function lb(t,i){if(iu=Io,t=Nf(),Kc(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{l.nodeType,y.nodeType}catch{l=null;break e}var b=0,C=-1,R=-1,V=0,X=0,Z=t,Q=null;t:for(;;){for(var ce;Z!==l||p!==0&&Z.nodeType!==3||(C=b+p),Z!==y||u!==0&&Z.nodeType!==3||(R=b+u),Z.nodeType===3&&(b+=Z.nodeValue.length),(ce=Z.firstChild)!==null;)Q=Z,Z=ce;for(;;){if(Z===t)break t;if(Q===l&&++V===p&&(C=b),Q===y&&++X===u&&(R=b),(ce=Z.nextSibling)!==null)break;Z=Q,Q=Z.parentNode}Z=ce}l=C===-1||R===-1?null:{start:C,end:R}}else l=null}l=l||{start:0,end:0}}else l=null;for(su={focusedElem:t,selectionRange:l},Io=!1,ue=i;ue!==null;)if(i=ue,t=i.child,(i.subtreeFlags&1028)!==0&&t!==null)t.return=i,ue=t;else for(;ue!==null;){i=ue;try{var he=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(he!==null){var fe=he.memoizedProps,_t=he.memoizedState,D=i.stateNode,O=D.getSnapshotBeforeUpdate(i.elementType===i.type?fe:Rn(i.type,fe),_t);D.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var B=i.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ee){ft(i,i.return,ee)}if(t=i.sibling,t!==null){t.return=i.return,ue=t;break}ue=i.return}return he=Qp,Qp=!1,he}function Aa(t,i,l){var u=i.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&t)===t){var y=p.destroy;p.destroy=void 0,y!==void 0&&Yu(i,l,y)}p=p.next}while(p!==u)}}function ml(t,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do{if((l.tag&t)===t){var u=l.create;l.destroy=u()}l=l.next}while(l!==i)}}function Hu(t){var i=t.ref;if(i!==null){var l=t.stateNode;switch(t.tag){case 5:t=l;break;default:t=l}typeof i=="function"?i(t):i.current=t}}function Xp(t){var i=t.alternate;i!==null&&(t.alternate=null,Xp(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&(delete i[Yn],delete i[_a],delete i[cu],delete i[qw],delete i[Gw])),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 Zp(t){return t.tag===5||t.tag===3||t.tag===4}function em(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Zp(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 Wu(t,i,l){var u=t.tag;if(u===5||u===6)t=t.stateNode,i?l.nodeType===8?l.parentNode.insertBefore(t,i):l.insertBefore(t,i):(l.nodeType===8?(i=l.parentNode,i.insertBefore(t,l)):(i=l,i.appendChild(t)),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=Yo));else if(u!==4&&(t=t.child,t!==null))for(Wu(t,i,l),t=t.sibling;t!==null;)Wu(t,i,l),t=t.sibling}function Ju(t,i,l){var u=t.tag;if(u===5||u===6)t=t.stateNode,i?l.insertBefore(t,i):l.appendChild(t);else if(u!==4&&(t=t.child,t!==null))for(Ju(t,i,l),t=t.sibling;t!==null;)Ju(t,i,l),t=t.sibling}var Dt=null,On=!1;function Gr(t,i,l){for(l=l.child;l!==null;)tm(t,i,l),l=l.sibling}function tm(t,i,l){if(Gn&&typeof Gn.onCommitFiberUnmount=="function")try{Gn.onCommitFiberUnmount(To,l)}catch{}switch(l.tag){case 5:Yt||_s(l,i);case 6:var u=Dt,p=On;Dt=null,Gr(t,i,l),Dt=u,On=p,Dt!==null&&(On?(t=Dt,l=l.stateNode,t.nodeType===8?t.parentNode.removeChild(l):t.removeChild(l)):Dt.removeChild(l.stateNode));break;case 18:Dt!==null&&(On?(t=Dt,l=l.stateNode,t.nodeType===8?lu(t.parentNode,l):t.nodeType===1&&lu(t,l),la(t)):lu(Dt,l.stateNode));break;case 4:u=Dt,p=On,Dt=l.stateNode.containerInfo,On=!0,Gr(t,i,l),Dt=u,On=p;break;case 0:case 11:case 14:case 15:if(!Yt&&(u=l.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){p=u=u.next;do{var y=p,b=y.destroy;y=y.tag,b!==void 0&&(y&2||y&4)&&Yu(l,i,b),p=p.next}while(p!==u)}Gr(t,i,l);break;case 1:if(!Yt&&(_s(l,i),u=l.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=l.memoizedProps,u.state=l.memoizedState,u.componentWillUnmount()}catch(C){ft(l,i,C)}Gr(t,i,l);break;case 21:Gr(t,i,l);break;case 22:l.mode&1?(Yt=(u=Yt)||l.memoizedState!==null,Gr(t,i,l),Yt=u):Gr(t,i,l);break;default:Gr(t,i,l)}}function nm(t){var i=t.updateQueue;if(i!==null){t.updateQueue=null;var l=t.stateNode;l===null&&(l=t.stateNode=new ob),i.forEach(function(u){var p=vb.bind(null,t,u);l.has(u)||(l.add(u),u.then(p,p))})}}function In(t,i){var l=i.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u];try{var y=t,b=i,C=b;e:for(;C!==null;){switch(C.tag){case 5:Dt=C.stateNode,On=!1;break e;case 3:Dt=C.stateNode.containerInfo,On=!0;break e;case 4:Dt=C.stateNode.containerInfo,On=!0;break e}C=C.return}if(Dt===null)throw Error(n(160));tm(y,b,p),Dt=null,On=!1;var R=p.alternate;R!==null&&(R.return=null),p.return=null}catch(V){ft(p,i,V)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)rm(i,t),i=i.sibling}function rm(t,i){var l=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(In(i,t),Jn(t),u&4){try{Aa(3,t,t.return),ml(3,t)}catch(fe){ft(t,t.return,fe)}try{Aa(5,t,t.return)}catch(fe){ft(t,t.return,fe)}}break;case 1:In(i,t),Jn(t),u&512&&l!==null&&_s(l,l.return);break;case 5:if(In(i,t),Jn(t),u&512&&l!==null&&_s(l,l.return),t.flags&32){var p=t.stateNode;try{Tr(p,"")}catch(fe){ft(t,t.return,fe)}}if(u&4&&(p=t.stateNode,p!=null)){var y=t.memoizedProps,b=l!==null?l.memoizedProps:y,C=t.type,R=t.updateQueue;if(t.updateQueue=null,R!==null)try{C==="input"&&y.type==="radio"&&y.name!=null&&st(p,y),mi(C,b);var V=mi(C,y);for(b=0;b<R.length;b+=2){var X=R[b],Z=R[b+1];X==="style"?Ks(p,Z):X==="dangerouslySetInnerHTML"?jn(p,Z):X==="children"?Tr(p,Z):G(p,X,Z,V)}switch(C){case"input":rr(p,y);break;case"textarea":Cn(p,y);break;case"select":var Q=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!y.multiple;var ce=y.value;ce!=null?Mt(p,!!y.multiple,ce,!1):Q!==!!y.multiple&&(y.defaultValue!=null?Mt(p,!!y.multiple,y.defaultValue,!0):Mt(p,!!y.multiple,y.multiple?[]:"",!1))}p[_a]=y}catch(fe){ft(t,t.return,fe)}}break;case 6:if(In(i,t),Jn(t),u&4){if(t.stateNode===null)throw Error(n(162));p=t.stateNode,y=t.memoizedProps;try{p.nodeValue=y}catch(fe){ft(t,t.return,fe)}}break;case 3:if(In(i,t),Jn(t),u&4&&l!==null&&l.memoizedState.isDehydrated)try{la(i.containerInfo)}catch(fe){ft(t,t.return,fe)}break;case 4:In(i,t),Jn(t);break;case 13:In(i,t),Jn(t),p=t.child,p.flags&8192&&(y=p.memoizedState!==null,p.stateNode.isHidden=y,!y||p.alternate!==null&&p.alternate.memoizedState!==null||(Xu=Fe())),u&4&&nm(t);break;case 22:if(X=l!==null&&l.memoizedState!==null,t.mode&1?(Yt=(V=Yt)||X,In(i,t),Yt=V):In(i,t),Jn(t),u&8192){if(V=t.memoizedState!==null,(t.stateNode.isHidden=V)&&!X&&t.mode&1)for(ue=t,X=t.child;X!==null;){for(Z=ue=X;ue!==null;){switch(Q=ue,ce=Q.child,Q.tag){case 0:case 11:case 14:case 15:Aa(4,Q,Q.return);break;case 1:_s(Q,Q.return);var he=Q.stateNode;if(typeof he.componentWillUnmount=="function"){u=Q,l=Q.return;try{i=u,he.props=i.memoizedProps,he.state=i.memoizedState,he.componentWillUnmount()}catch(fe){ft(u,l,fe)}}break;case 5:_s(Q,Q.return);break;case 22:if(Q.memoizedState!==null){am(Z);continue}}ce!==null?(ce.return=Q,ue=ce):am(Z)}X=X.sibling}e:for(X=null,Z=t;;){if(Z.tag===5){if(X===null){X=Z;try{p=Z.stateNode,V?(y=p.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(C=Z.stateNode,R=Z.memoizedProps.style,b=R!=null&&R.hasOwnProperty("display")?R.display:null,C.style.display=Co("display",b))}catch(fe){ft(t,t.return,fe)}}}else if(Z.tag===6){if(X===null)try{Z.stateNode.nodeValue=V?"":Z.memoizedProps}catch(fe){ft(t,t.return,fe)}}else if((Z.tag!==22&&Z.tag!==23||Z.memoizedState===null||Z===t)&&Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===t)break e;for(;Z.sibling===null;){if(Z.return===null||Z.return===t)break e;X===Z&&(X=null),Z=Z.return}X===Z&&(X=null),Z.sibling.return=Z.return,Z=Z.sibling}}break;case 19:In(i,t),Jn(t),u&4&&nm(t);break;case 21:break;default:In(i,t),Jn(t)}}function Jn(t){var i=t.flags;if(i&2){try{e:{for(var l=t.return;l!==null;){if(Zp(l)){var u=l;break e}l=l.return}throw Error(n(160))}switch(u.tag){case 5:var p=u.stateNode;u.flags&32&&(Tr(p,""),u.flags&=-33);var y=em(t);Ju(t,y,p);break;case 3:case 4:var b=u.stateNode.containerInfo,C=em(t);Wu(t,C,b);break;default:throw Error(n(161))}}catch(R){ft(t,t.return,R)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function cb(t,i,l){ue=t,im(t)}function im(t,i,l){for(var u=(t.mode&1)!==0;ue!==null;){var p=ue,y=p.child;if(p.tag===22&&u){var b=p.memoizedState!==null||pl;if(!b){var C=p.alternate,R=C!==null&&C.memoizedState!==null||Yt;C=pl;var V=Yt;if(pl=b,(Yt=R)&&!V)for(ue=p;ue!==null;)b=ue,R=b.child,b.tag===22&&b.memoizedState!==null?om(p):R!==null?(R.return=b,ue=R):om(p);for(;y!==null;)ue=y,im(y),y=y.sibling;ue=p,pl=C,Yt=V}sm(t)}else p.subtreeFlags&8772&&y!==null?(y.return=p,ue=y):sm(t)}}function sm(t){for(;ue!==null;){var i=ue;if(i.flags&8772){var l=i.alternate;try{if(i.flags&8772)switch(i.tag){case 0:case 11:case 15:Yt||ml(5,i);break;case 1:var u=i.stateNode;if(i.flags&4&&!Yt)if(l===null)u.componentDidMount();else{var p=i.elementType===i.type?l.memoizedProps:Rn(i.type,l.memoizedProps);u.componentDidUpdate(p,l.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var y=i.updateQueue;y!==null&&ap(i,y,u);break;case 3:var b=i.updateQueue;if(b!==null){if(l=null,i.child!==null)switch(i.child.tag){case 5:l=i.child.stateNode;break;case 1:l=i.child.stateNode}ap(i,b,l)}break;case 5:var C=i.stateNode;if(l===null&&i.flags&4){l=C;var R=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&l.focus();break;case"img":R.src&&(l.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var V=i.alternate;if(V!==null){var X=V.memoizedState;if(X!==null){var Z=X.dehydrated;Z!==null&&la(Z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Yt||i.flags&512&&Hu(i)}catch(Q){ft(i,i.return,Q)}}if(i===t){ue=null;break}if(l=i.sibling,l!==null){l.return=i.return,ue=l;break}ue=i.return}}function am(t){for(;ue!==null;){var i=ue;if(i===t){ue=null;break}var l=i.sibling;if(l!==null){l.return=i.return,ue=l;break}ue=i.return}}function om(t){for(;ue!==null;){var i=ue;try{switch(i.tag){case 0:case 11:case 15:var l=i.return;try{ml(4,i)}catch(R){ft(i,l,R)}break;case 1:var u=i.stateNode;if(typeof u.componentDidMount=="function"){var p=i.return;try{u.componentDidMount()}catch(R){ft(i,p,R)}}var y=i.return;try{Hu(i)}catch(R){ft(i,y,R)}break;case 5:var b=i.return;try{Hu(i)}catch(R){ft(i,b,R)}}}catch(R){ft(i,i.return,R)}if(i===t){ue=null;break}var C=i.sibling;if(C!==null){C.return=i.return,ue=C;break}ue=i.return}}var ub=Math.ceil,gl=F.ReactCurrentDispatcher,Ku=F.ReactCurrentOwner,xn=F.ReactCurrentBatchConfig,ze=0,At=null,Et=null,Ft=0,pn=0,ws=Br(0),Tt=0,Pa=null,Ei=0,vl=0,Qu=0,Ra=null,nn=null,Xu=0,bs=1/0,fr=null,yl=!1,Zu=null,Yr=null,_l=!1,Hr=null,wl=0,Oa=0,ed=null,bl=-1,xl=0;function Jt(){return ze&6?Fe():bl!==-1?bl:bl=Fe()}function Wr(t){return t.mode&1?ze&2&&Ft!==0?Ft&-Ft:Hw.transition!==null?(xl===0&&(xl=Zh()),xl):(t=He,t!==0||(t=window.event,t=t===void 0?16:cf(t.type)),t):1}function Mn(t,i,l,u){if(50<Oa)throw Oa=0,ed=null,Error(n(185));ra(t,l,u),(!(ze&2)||t!==At)&&(t===At&&(!(ze&2)&&(vl|=l),Tt===4&&Jr(t,Ft)),rn(t,u),l===1&&ze===0&&!(i.mode&1)&&(bs=Fe()+500,Ko&&zr()))}function rn(t,i){var l=t.callbackNode;H0(t,i);var u=Po(t,t===At?Ft:0);if(u===0)l!==null&&gi(l),t.callbackNode=null,t.callbackPriority=0;else if(i=u&-u,t.callbackPriority!==i){if(l!=null&&gi(l),i===1)t.tag===0?Yw(cm.bind(null,t)):Wf(cm.bind(null,t)),zw(function(){!(ze&6)&&zr()}),l=null;else{switch(ef(u)){case 1:l=ta;break;case 4:l=Qh;break;case 16:l=jo;break;case 536870912:l=Xh;break;default:l=jo}l=vm(l,lm.bind(null,t))}t.callbackPriority=i,t.callbackNode=l}}function lm(t,i){if(bl=-1,xl=0,ze&6)throw Error(n(327));var l=t.callbackNode;if(xs()&&t.callbackNode!==l)return null;var u=Po(t,t===At?Ft:0);if(u===0)return null;if(u&30||u&t.expiredLanes||i)i=Sl(t,u);else{i=u;var p=ze;ze|=2;var y=dm();(At!==t||Ft!==i)&&(fr=null,bs=Fe()+500,Ci(t,i));do try{fb();break}catch(C){um(t,C)}while(!0);yu(),gl.current=y,ze=p,Et!==null?i=0:(At=null,Ft=0,i=Tt)}if(i!==0){if(i===2&&(p=Ic(t),p!==0&&(u=p,i=td(t,p))),i===1)throw l=Pa,Ci(t,0),Jr(t,u),rn(t,Fe()),l;if(i===6)Jr(t,u);else{if(p=t.current.alternate,!(u&30)&&!db(p)&&(i=Sl(t,u),i===2&&(y=Ic(t),y!==0&&(u=y,i=td(t,y))),i===1))throw l=Pa,Ci(t,0),Jr(t,u),rn(t,Fe()),l;switch(t.finishedWork=p,t.finishedLanes=u,i){case 0:case 1:throw Error(n(345));case 2:ji(t,nn,fr);break;case 3:if(Jr(t,u),(u&130023424)===u&&(i=Xu+500-Fe(),10<i)){if(Po(t,0)!==0)break;if(p=t.suspendedLanes,(p&u)!==u){Jt(),t.pingedLanes|=t.suspendedLanes&p;break}t.timeoutHandle=ou(ji.bind(null,t,nn,fr),i);break}ji(t,nn,fr);break;case 4:if(Jr(t,u),(u&4194240)===u)break;for(i=t.eventTimes,p=-1;0<u;){var b=31-Nn(u);y=1<<b,b=i[b],b>p&&(p=b),u&=~y}if(u=p,u=Fe()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*ub(u/1960))-u,10<u){t.timeoutHandle=ou(ji.bind(null,t,nn,fr),u);break}ji(t,nn,fr);break;case 5:ji(t,nn,fr);break;default:throw Error(n(329))}}}return rn(t,Fe()),t.callbackNode===l?lm.bind(null,t):null}function td(t,i){var l=Ra;return t.current.memoizedState.isDehydrated&&(Ci(t,i).flags|=256),t=Sl(t,i),t!==2&&(i=nn,nn=l,i!==null&&nd(i)),t}function nd(t){nn===null?nn=t:nn.push.apply(nn,t)}function db(t){for(var i=t;;){if(i.flags&16384){var l=i.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var u=0;u<l.length;u++){var p=l[u],y=p.getSnapshot;p=p.value;try{if(!An(y(),p))return!1}catch{return!1}}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Jr(t,i){for(i&=~Qu,i&=~vl,t.suspendedLanes|=i,t.pingedLanes&=~i,t=t.expirationTimes;0<i;){var l=31-Nn(i),u=1<<l;t[l]=-1,i&=~u}}function cm(t){if(ze&6)throw Error(n(327));xs();var i=Po(t,0);if(!(i&1))return rn(t,Fe()),null;var l=Sl(t,i);if(t.tag!==0&&l===2){var u=Ic(t);u!==0&&(i=u,l=td(t,u))}if(l===1)throw l=Pa,Ci(t,0),Jr(t,i),rn(t,Fe()),l;if(l===6)throw Error(n(345));return t.finishedWork=t.current.alternate,t.finishedLanes=i,ji(t,nn,fr),rn(t,Fe()),null}function rd(t,i){var l=ze;ze|=1;try{return t(i)}finally{ze=l,ze===0&&(bs=Fe()+500,Ko&&zr())}}function ki(t){Hr!==null&&Hr.tag===0&&!(ze&6)&&xs();var i=ze;ze|=1;var l=xn.transition,u=He;try{if(xn.transition=null,He=1,t)return t()}finally{He=u,xn.transition=l,ze=i,!(ze&6)&&zr()}}function id(){pn=ws.current,it(ws)}function Ci(t,i){t.finishedWork=null,t.finishedLanes=0;var l=t.timeoutHandle;if(l!==-1&&(t.timeoutHandle=-1,$w(l)),Et!==null)for(l=Et.return;l!==null;){var u=l;switch(fu(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&Wo();break;case 3:vs(),it(Zt),it(Vt),Cu();break;case 5:Eu(u);break;case 4:vs();break;case 13:it(ut);break;case 19:it(ut);break;case 10:_u(u.type._context);break;case 22:case 23:id()}l=l.return}if(At=t,Et=t=Kr(t.current,null),Ft=pn=i,Tt=0,Pa=null,Qu=vl=Ei=0,nn=Ra=null,bi!==null){for(i=0;i<bi.length;i++)if(l=bi[i],u=l.interleaved,u!==null){l.interleaved=null;var p=u.next,y=l.pending;if(y!==null){var b=y.next;y.next=p,u.next=b}l.pending=u}bi=null}return t}function um(t,i){do{var l=Et;try{if(yu(),al.current=ul,ol){for(var u=dt.memoizedState;u!==null;){var p=u.queue;p!==null&&(p.pending=null),u=u.next}ol=!1}if(Si=0,Nt=jt=dt=null,ka=!1,Ca=0,Ku.current=null,l===null||l.return===null){Tt=1,Pa=i,Et=null;break}e:{var y=t,b=l.return,C=l,R=i;if(i=Ft,C.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var V=R,X=C,Z=X.tag;if(!(X.mode&1)&&(Z===0||Z===11||Z===15)){var Q=X.alternate;Q?(X.updateQueue=Q.updateQueue,X.memoizedState=Q.memoizedState,X.lanes=Q.lanes):(X.updateQueue=null,X.memoizedState=null)}var ce=Mp(b);if(ce!==null){ce.flags&=-257,Lp(ce,b,C,y,i),ce.mode&1&&Ip(y,V,i),i=ce,R=V;var he=i.updateQueue;if(he===null){var fe=new Set;fe.add(R),i.updateQueue=fe}else he.add(R);break e}else{if(!(i&1)){Ip(y,V,i),sd();break e}R=Error(n(426))}}else if(at&&C.mode&1){var _t=Mp(b);if(_t!==null){!(_t.flags&65536)&&(_t.flags|=256),Lp(_t,b,C,y,i),gu(ys(R,C));break e}}y=R=ys(R,C),Tt!==4&&(Tt=2),Ra===null?Ra=[y]:Ra.push(y),y=b;do{switch(y.tag){case 3:y.flags|=65536,i&=-i,y.lanes|=i;var D=Rp(y,R,i);sp(y,D);break e;case 1:C=R;var O=y.type,B=y.stateNode;if(!(y.flags&128)&&(typeof O.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(Yr===null||!Yr.has(B)))){y.flags|=65536,i&=-i,y.lanes|=i;var ee=Op(y,C,i);sp(y,ee);break e}}y=y.return}while(y!==null)}fm(l)}catch(pe){i=pe,Et===l&&l!==null&&(Et=l=l.return);continue}break}while(!0)}function dm(){var t=gl.current;return gl.current=ul,t===null?ul:t}function sd(){(Tt===0||Tt===3||Tt===2)&&(Tt=4),At===null||!(Ei&268435455)&&!(vl&268435455)||Jr(At,Ft)}function Sl(t,i){var l=ze;ze|=2;var u=dm();(At!==t||Ft!==i)&&(fr=null,Ci(t,i));do try{hb();break}catch(p){um(t,p)}while(!0);if(yu(),ze=l,gl.current=u,Et!==null)throw Error(n(261));return At=null,Ft=0,Tt}function hb(){for(;Et!==null;)hm(Et)}function fb(){for(;Et!==null&&!$e();)hm(Et)}function hm(t){var i=gm(t.alternate,t,pn);t.memoizedProps=t.pendingProps,i===null?fm(t):Et=i,Ku.current=null}function fm(t){var i=t;do{var l=i.alternate;if(t=i.return,i.flags&32768){if(l=ab(l,i),l!==null){l.flags&=32767,Et=l;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Tt=6,Et=null;return}}else if(l=sb(l,i,pn),l!==null){Et=l;return}if(i=i.sibling,i!==null){Et=i;return}Et=i=t}while(i!==null);Tt===0&&(Tt=5)}function ji(t,i,l){var u=He,p=xn.transition;try{xn.transition=null,He=1,pb(t,i,l,u)}finally{xn.transition=p,He=u}return null}function pb(t,i,l,u){do xs();while(Hr!==null);if(ze&6)throw Error(n(327));l=t.finishedWork;var p=t.finishedLanes;if(l===null)return null;if(t.finishedWork=null,t.finishedLanes=0,l===t.current)throw Error(n(177));t.callbackNode=null,t.callbackPriority=0;var y=l.lanes|l.childLanes;if(W0(t,y),t===At&&(Et=At=null,Ft=0),!(l.subtreeFlags&2064)&&!(l.flags&2064)||_l||(_l=!0,vm(jo,function(){return xs(),null})),y=(l.flags&15990)!==0,l.subtreeFlags&15990||y){y=xn.transition,xn.transition=null;var b=He;He=1;var C=ze;ze|=4,Ku.current=null,lb(t,l),rm(l,t),Iw(su),Io=!!iu,su=iu=null,t.current=l,cb(l),Ge(),ze=C,He=b,xn.transition=y}else t.current=l;if(_l&&(_l=!1,Hr=t,wl=p),y=t.pendingLanes,y===0&&(Yr=null),z0(l.stateNode),rn(t,Fe()),i!==null)for(u=t.onRecoverableError,l=0;l<i.length;l++)p=i[l],u(p.value,{componentStack:p.stack,digest:p.digest});if(yl)throw yl=!1,t=Zu,Zu=null,t;return wl&1&&t.tag!==0&&xs(),y=t.pendingLanes,y&1?t===ed?Oa++:(Oa=0,ed=t):Oa=0,zr(),null}function xs(){if(Hr!==null){var t=ef(wl),i=xn.transition,l=He;try{if(xn.transition=null,He=16>t?16:t,Hr===null)var u=!1;else{if(t=Hr,Hr=null,wl=0,ze&6)throw Error(n(331));var p=ze;for(ze|=4,ue=t.current;ue!==null;){var y=ue,b=y.child;if(ue.flags&16){var C=y.deletions;if(C!==null){for(var R=0;R<C.length;R++){var V=C[R];for(ue=V;ue!==null;){var X=ue;switch(X.tag){case 0:case 11:case 15:Aa(8,X,y)}var Z=X.child;if(Z!==null)Z.return=X,ue=Z;else for(;ue!==null;){X=ue;var Q=X.sibling,ce=X.return;if(Xp(X),X===V){ue=null;break}if(Q!==null){Q.return=ce,ue=Q;break}ue=ce}}}var he=y.alternate;if(he!==null){var fe=he.child;if(fe!==null){he.child=null;do{var _t=fe.sibling;fe.sibling=null,fe=_t}while(fe!==null)}}ue=y}}if(y.subtreeFlags&2064&&b!==null)b.return=y,ue=b;else e:for(;ue!==null;){if(y=ue,y.flags&2048)switch(y.tag){case 0:case 11:case 15:Aa(9,y,y.return)}var D=y.sibling;if(D!==null){D.return=y.return,ue=D;break e}ue=y.return}}var O=t.current;for(ue=O;ue!==null;){b=ue;var B=b.child;if(b.subtreeFlags&2064&&B!==null)B.return=b,ue=B;else e:for(b=O;ue!==null;){if(C=ue,C.flags&2048)try{switch(C.tag){case 0:case 11:case 15:ml(9,C)}}catch(pe){ft(C,C.return,pe)}if(C===b){ue=null;break e}var ee=C.sibling;if(ee!==null){ee.return=C.return,ue=ee;break e}ue=C.return}}if(ze=p,zr(),Gn&&typeof Gn.onPostCommitFiberRoot=="function")try{Gn.onPostCommitFiberRoot(To,t)}catch{}u=!0}return u}finally{He=l,xn.transition=i}}return!1}function pm(t,i,l){i=ys(l,i),i=Rp(t,i,1),t=qr(t,i,1),i=Jt(),t!==null&&(ra(t,1,i),rn(t,i))}function ft(t,i,l){if(t.tag===3)pm(t,t,l);else for(;i!==null;){if(i.tag===3){pm(i,t,l);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Yr===null||!Yr.has(u))){t=ys(l,t),t=Op(i,t,1),i=qr(i,t,1),t=Jt(),i!==null&&(ra(i,1,t),rn(i,t));break}}i=i.return}}function mb(t,i,l){var u=t.pingCache;u!==null&&u.delete(i),i=Jt(),t.pingedLanes|=t.suspendedLanes&l,At===t&&(Ft&l)===l&&(Tt===4||Tt===3&&(Ft&130023424)===Ft&&500>Fe()-Xu?Ci(t,0):Qu|=l),rn(t,i)}function mm(t,i){i===0&&(t.mode&1?(i=Ao,Ao<<=1,!(Ao&130023424)&&(Ao=4194304)):i=1);var l=Jt();t=ur(t,i),t!==null&&(ra(t,i,l),rn(t,l))}function gb(t){var i=t.memoizedState,l=0;i!==null&&(l=i.retryLane),mm(t,l)}function vb(t,i){var l=0;switch(t.tag){case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=t.stateNode;break;default:throw Error(n(314))}u!==null&&u.delete(i),mm(t,l)}var gm;gm=function(t,i,l){if(t!==null)if(t.memoizedProps!==i.pendingProps||Zt.current)tn=!0;else{if(!(t.lanes&l)&&!(i.flags&128))return tn=!1,ib(t,i,l);tn=!!(t.flags&131072)}else tn=!1,at&&i.flags&1048576&&Jf(i,Xo,i.index);switch(i.lanes=0,i.tag){case 2:var u=i.type;fl(t,i),t=i.pendingProps;var p=us(i,Vt.current);gs(i,l),p=Nu(null,i,u,t,p,l);var y=Au();return i.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,en(u)?(y=!0,Jo(i)):y=!1,i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,xu(i),p.updater=dl,i.stateNode=p,p._reactInternals=i,Lu(i,u,t,l),i=Bu(null,i,u,!0,y,l)):(i.tag=0,at&&y&&hu(i),Wt(null,i,p,l),i=i.child),i;case 16:u=i.elementType;e:{switch(fl(t,i),t=i.pendingProps,p=u._init,u=p(u._payload),i.type=u,p=i.tag=_b(u),t=Rn(u,t),p){case 0:i=Uu(null,i,u,t,l);break e;case 1:i=zp(null,i,u,t,l);break e;case 11:i=Dp(null,i,u,t,l);break e;case 14:i=Fp(null,i,u,Rn(u.type,t),l);break e}throw Error(n(306,u,""))}return i;case 0:return u=i.type,p=i.pendingProps,p=i.elementType===u?p:Rn(u,p),Uu(t,i,u,p,l);case 1:return u=i.type,p=i.pendingProps,p=i.elementType===u?p:Rn(u,p),zp(t,i,u,p,l);case 3:e:{if(Vp(i),t===null)throw Error(n(387));u=i.pendingProps,y=i.memoizedState,p=y.element,ip(t,i),il(i,u,null,l);var b=i.memoizedState;if(u=b.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){p=ys(Error(n(423)),i),i=qp(t,i,u,l,p);break e}else if(u!==p){p=ys(Error(n(424)),i),i=qp(t,i,u,l,p);break e}else for(fn=Ur(i.stateNode.containerInfo.firstChild),hn=i,at=!0,Pn=null,l=np(i,null,u,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(fs(),u===p){i=hr(t,i,l);break e}Wt(t,i,u,l)}i=i.child}return i;case 5:return op(i),t===null&&mu(i),u=i.type,p=i.pendingProps,y=t!==null?t.memoizedProps:null,b=p.children,au(u,p)?b=null:y!==null&&au(u,y)&&(i.flags|=32),$p(t,i),Wt(t,i,b,l),i.child;case 6:return t===null&&mu(i),null;case 13:return Gp(t,i,l);case 4:return Su(i,i.stateNode.containerInfo),u=i.pendingProps,t===null?i.child=ps(i,null,u,l):Wt(t,i,u,l),i.child;case 11:return u=i.type,p=i.pendingProps,p=i.elementType===u?p:Rn(u,p),Dp(t,i,u,p,l);case 7:return Wt(t,i,i.pendingProps,l),i.child;case 8:return Wt(t,i,i.pendingProps.children,l),i.child;case 12:return Wt(t,i,i.pendingProps.children,l),i.child;case 10:e:{if(u=i.type._context,p=i.pendingProps,y=i.memoizedProps,b=p.value,Xe(tl,u._currentValue),u._currentValue=b,y!==null)if(An(y.value,b)){if(y.children===p.children&&!Zt.current){i=hr(t,i,l);break e}}else for(y=i.child,y!==null&&(y.return=i);y!==null;){var C=y.dependencies;if(C!==null){b=y.child;for(var R=C.firstContext;R!==null;){if(R.context===u){if(y.tag===1){R=dr(-1,l&-l),R.tag=2;var V=y.updateQueue;if(V!==null){V=V.shared;var X=V.pending;X===null?R.next=R:(R.next=X.next,X.next=R),V.pending=R}}y.lanes|=l,R=y.alternate,R!==null&&(R.lanes|=l),wu(y.return,l,i),C.lanes|=l;break}R=R.next}}else if(y.tag===10)b=y.type===i.type?null:y.child;else if(y.tag===18){if(b=y.return,b===null)throw Error(n(341));b.lanes|=l,C=b.alternate,C!==null&&(C.lanes|=l),wu(b,l,i),b=y.sibling}else b=y.child;if(b!==null)b.return=y;else for(b=y;b!==null;){if(b===i){b=null;break}if(y=b.sibling,y!==null){y.return=b.return,b=y;break}b=b.return}y=b}Wt(t,i,p.children,l),i=i.child}return i;case 9:return p=i.type,u=i.pendingProps.children,gs(i,l),p=wn(p),u=u(p),i.flags|=1,Wt(t,i,u,l),i.child;case 14:return u=i.type,p=Rn(u,i.pendingProps),p=Rn(u.type,p),Fp(t,i,u,p,l);case 15:return Up(t,i,i.type,i.pendingProps,l);case 17:return u=i.type,p=i.pendingProps,p=i.elementType===u?p:Rn(u,p),fl(t,i),i.tag=1,en(u)?(t=!0,Jo(i)):t=!1,gs(i,l),Ap(i,u,p),Lu(i,u,p,l),Bu(null,i,u,!0,t,l);case 19:return Hp(t,i,l);case 22:return Bp(t,i,l)}throw Error(n(156,i.tag))};function vm(t,i){return sr(t,i)}function yb(t,i,l,u){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(t,i,l,u){return new yb(t,i,l,u)}function ad(t){return t=t.prototype,!(!t||!t.isReactComponent)}function _b(t){if(typeof t=="function")return ad(t)?1:0;if(t!=null){if(t=t.$$typeof,t===De)return 11;if(t===vt)return 14}return 2}function Kr(t,i){var l=t.alternate;return l===null?(l=Sn(t.tag,i,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=i,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&14680064,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,i=t.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l}function El(t,i,l,u,p,y){var b=2;if(u=t,typeof t=="function")ad(t)&&(b=1);else if(typeof t=="string")b=5;else e:switch(t){case H:return Ti(l.children,p,y,i);case te:b=8,p|=8;break;case ae:return t=Sn(12,l,i,p|2),t.elementType=ae,t.lanes=y,t;case Ie:return t=Sn(13,l,i,p),t.elementType=Ie,t.lanes=y,t;case Ye:return t=Sn(19,l,i,p),t.elementType=Ye,t.lanes=y,t;case ve:return kl(l,p,y,i);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case se:b=10;break e;case we:b=9;break e;case De:b=11;break e;case vt:b=14;break e;case nt:b=16,u=null;break e}throw Error(n(130,t==null?t:typeof t,""))}return i=Sn(b,l,i,p),i.elementType=t,i.type=u,i.lanes=y,i}function Ti(t,i,l,u){return t=Sn(7,t,u,i),t.lanes=l,t}function kl(t,i,l,u){return t=Sn(22,t,u,i),t.elementType=ve,t.lanes=l,t.stateNode={isHidden:!1},t}function od(t,i,l){return t=Sn(6,t,null,i),t.lanes=l,t}function ld(t,i,l){return i=Sn(4,t.children!==null?t.children:[],t.key,i),i.lanes=l,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}function wb(t,i,l,u,p){this.tag=i,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=Mc(0),this.expirationTimes=Mc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mc(0),this.identifierPrefix=u,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function cd(t,i,l,u,p,y,b,C,R){return t=new wb(t,i,l,C,R),i===1?(i=1,y===!0&&(i|=8)):i=0,y=Sn(3,null,null,i),t.current=y,y.stateNode=t,y.memoizedState={element:u,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},xu(y),t}function bb(t,i,l){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:u==null?null:""+u,children:t,containerInfo:i,implementation:l}}function ym(t){if(!t)return $r;t=t._reactInternals;e:{if(Xt(t)!==t||t.tag!==1)throw Error(n(170));var i=t;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(en(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(t.tag===1){var l=t.type;if(en(l))return Yf(t,l,i)}return i}function _m(t,i,l,u,p,y,b,C,R){return t=cd(l,u,!0,t,p,y,b,C,R),t.context=ym(null),l=t.current,u=Jt(),p=Wr(l),y=dr(u,p),y.callback=i??null,qr(l,y,p),t.current.lanes=p,ra(t,p,u),rn(t,u),t}function Cl(t,i,l,u){var p=i.current,y=Jt(),b=Wr(p);return l=ym(l),i.context===null?i.context=l:i.pendingContext=l,i=dr(y,b),i.payload={element:t},u=u===void 0?null:u,u!==null&&(i.callback=u),t=qr(p,i,b),t!==null&&(Mn(t,p,b,y),rl(t,p,b)),b}function jl(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 wm(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<i?l:i}}function ud(t,i){wm(t,i),(t=t.alternate)&&wm(t,i)}var bm=typeof reportError=="function"?reportError:function(t){console.error(t)};function dd(t){this._internalRoot=t}Tl.prototype.render=dd.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(n(409));Cl(t,i,null,null)},Tl.prototype.unmount=dd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;ki(function(){Cl(null,t,null,null)}),i[ar]=null}};function Tl(t){this._internalRoot=t}Tl.prototype.unstable_scheduleHydration=function(t){if(t){var i=rf();t={blockedOn:null,target:t,priority:i};for(var l=0;l<Lr.length&&i!==0&&i<Lr[l].priority;l++);Lr.splice(l,0,t),l===0&&of(t)}};function hd(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Nl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function xm(){}function xb(t,i,l,u,p){if(p){if(typeof u=="function"){var y=u;u=function(){var V=jl(b);y.call(V)}}var b=_m(i,u,t,0,null,!1,!1,"",xm);return t._reactRootContainer=b,t[ar]=b.current,va(t.nodeType===8?t.parentNode:t),ki(),b}for(;p=t.lastChild;)t.removeChild(p);if(typeof u=="function"){var C=u;u=function(){var V=jl(R);C.call(V)}}var R=cd(t,0,!1,null,null,!1,!1,"",xm);return t._reactRootContainer=R,t[ar]=R.current,va(t.nodeType===8?t.parentNode:t),ki(function(){Cl(i,R,l,u)}),R}function Al(t,i,l,u,p){var y=l._reactRootContainer;if(y){var b=y;if(typeof p=="function"){var C=p;p=function(){var R=jl(b);C.call(R)}}Cl(i,b,t,p)}else b=xb(l,i,t,p,u);return jl(b)}tf=function(t){switch(t.tag){case 3:var i=t.stateNode;if(i.current.memoizedState.isDehydrated){var l=na(i.pendingLanes);l!==0&&(Lc(i,l|1),rn(i,Fe()),!(ze&6)&&(bs=Fe()+500,zr()))}break;case 13:ki(function(){var u=ur(t,1);if(u!==null){var p=Jt();Mn(u,t,1,p)}}),ud(t,1)}},Dc=function(t){if(t.tag===13){var i=ur(t,134217728);if(i!==null){var l=Jt();Mn(i,t,134217728,l)}ud(t,134217728)}},nf=function(t){if(t.tag===13){var i=Wr(t),l=ur(t,i);if(l!==null){var u=Jt();Mn(l,t,i,u)}ud(t,i)}},rf=function(){return He},sf=function(t,i){var l=He;try{return He=t,i()}finally{He=l}},Xs=function(t,i,l){switch(i){case"input":if(rr(t,l),i=l.name,l.type==="radio"&&i!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<l.length;i++){var u=l[i];if(u!==t&&u.form===t.form){var p=Ho(u);if(!p)throw Error(n(90));Ke(u),rr(u,p)}}}break;case"textarea":Cn(t,l);break;case"select":i=l.value,i!=null&&Mt(t,!!l.multiple,i,!1)}},re=rd,de=ki;var Sb={usingClientEntryPoint:!1,Events:[wa,ls,Ho,z,W,rd]},Ia={findFiberByHostInstance:vi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Eb={bundleType:Ia.bundleType,version:Ia.version,rendererPackageName:Ia.rendererPackageName,rendererConfig:Ia.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:F.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Rr(t),t===null?null:t.stateNode},findFiberByHostInstance:Ia.findFiberByHostInstance,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 Pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pl.isDisabled&&Pl.supportsFiber)try{To=Pl.inject(Eb),Gn=Pl}catch{}}return sn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sb,sn.createPortal=function(t,i){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hd(i))throw Error(n(200));return bb(t,i,null,l)},sn.createRoot=function(t,i){if(!hd(t))throw Error(n(299));var l=!1,u="",p=bm;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onRecoverableError!==void 0&&(p=i.onRecoverableError)),i=cd(t,1,!1,null,null,l,!1,u,p),t[ar]=i.current,va(t.nodeType===8?t.parentNode:t),new dd(i)},sn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(n(188)):(t=Object.keys(t).join(","),Error(n(268,t)));return t=Rr(i),t=t===null?null:t.stateNode,t},sn.flushSync=function(t){return ki(t)},sn.hydrate=function(t,i,l){if(!Nl(i))throw Error(n(200));return Al(null,t,i,!0,l)},sn.hydrateRoot=function(t,i,l){if(!hd(t))throw Error(n(405));var u=l!=null&&l.hydratedSources||null,p=!1,y="",b=bm;if(l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(b=l.onRecoverableError)),i=_m(i,null,t,1,l??null,p,!1,y,b),t[ar]=i.current,va(t),u)for(t=0;t<u.length;t++)l=u[t],p=l._getVersion,p=p(l._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[l,p]:i.mutableSourceEagerHydrationData.push(l,p);return new Tl(i)},sn.render=function(t,i,l){if(!Nl(i))throw Error(n(200));return Al(null,t,i,!1,l)},sn.unmountComponentAtNode=function(t){if(!Nl(t))throw Error(n(40));return t._reactRootContainer?(ki(function(){Al(null,null,t,!1,function(){t._reactRootContainer=null,t[ar]=null})}),!0):!1},sn.unstable_batchedUpdates=rd,sn.unstable_renderSubtreeIntoContainer=function(t,i,l,u){if(!Nl(l))throw Error(n(200));if(t==null||t._reactInternals===void 0)throw Error(n(38));return Al(t,i,l,!1,u)},sn.version="18.3.1-next-f1338f8080-20240426",sn}var Am;function cy(){if(Am)return md.exports;Am=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),md.exports=Ib(),md.exports}var Pm;function Mb(){if(Pm)return Rl;Pm=1;var r=cy();return Rl.createRoot=r.createRoot,Rl.hydrateRoot=r.hydrateRoot,Rl}var Lb=Mb(),uy=cy();const Db=bc(uy),Fb=ay({__proto__:null,default:Db},[uy]);/** + * @remix-run/router v1.15.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function gt(){return gt=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},gt.apply(this,arguments)}var Ct;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(Ct||(Ct={}));const Rm="popstate";function Ub(r){r===void 0&&(r={});function e(s,a){let{pathname:o,search:c,hash:d}=s.location;return fo("",{pathname:o,search:c,hash:d},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(s,a){return typeof a=="string"?a:zi(a)}return $b(e,n,null,r)}function Le(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function Us(r,e){if(!r){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Bb(){return Math.random().toString(36).substr(2,8)}function Om(r,e){return{usr:r.state,key:r.key,idx:e}}function fo(r,e,n,s){return n===void 0&&(n=null),gt({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof e=="string"?di(e):e,{state:n,key:e&&e.key||s||Bb()})}function zi(r){let{pathname:e="/",search:n="",hash:s=""}=r;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function di(r){let e={};if(r){let n=r.indexOf("#");n>=0&&(e.hash=r.substr(n),r=r.substr(0,n));let s=r.indexOf("?");s>=0&&(e.search=r.substr(s),r=r.substr(0,s)),r&&(e.pathname=r)}return e}function $b(r,e,n,s){s===void 0&&(s={});let{window:a=document.defaultView,v5Compat:o=!1}=s,c=a.history,d=Ct.Pop,f=null,v=g();v==null&&(v=0,c.replaceState(gt({},c.state,{idx:v}),""));function g(){return(c.state||{idx:null}).idx}function w(){d=Ct.Pop;let j=g(),$=j==null?null:j-v;v=j,f&&f({action:d,location:N.location,delta:$})}function x(j,$){d=Ct.Push;let K=fo(N.location,j,$);v=g()+1;let G=Om(K,v),F=N.createHref(K);try{c.pushState(G,"",F)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;a.location.assign(F)}o&&f&&f({action:d,location:N.location,delta:1})}function k(j,$){d=Ct.Replace;let K=fo(N.location,j,$);v=g();let G=Om(K,v),F=N.createHref(K);c.replaceState(G,"",F),o&&f&&f({action:d,location:N.location,delta:0})}function P(j){let $=a.location.origin!=="null"?a.location.origin:a.location.href,K=typeof j=="string"?j:zi(j);return K=K.replace(/ $/,"%20"),Le($,"No window.location.(origin|href) available to create URL for href: "+K),new URL(K,$)}let N={get action(){return d},get location(){return r(a,c)},listen(j){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Rm,w),f=j,()=>{a.removeEventListener(Rm,w),f=null}},createHref(j){return e(a,j)},createURL:P,encodeLocation(j){let $=P(j);return{pathname:$.pathname,search:$.search,hash:$.hash}},push:x,replace:k,go(j){return c.go(j)}};return N}var mt;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(mt||(mt={}));const zb=new Set(["lazy","caseSensitive","path","id","index","children"]);function Vb(r){return r.index===!0}function qd(r,e,n,s){return n===void 0&&(n=[]),s===void 0&&(s={}),r.map((a,o)=>{let c=[...n,o],d=typeof a.id=="string"?a.id:c.join("-");if(Le(a.index!==!0||!a.children,"Cannot specify children on an index route"),Le(!s[d],'Found a route id collision on id "'+d+`". Route id's must be globally unique within Data Router usages`),Vb(a)){let f=gt({},a,e(a),{id:d});return s[d]=f,f}else{let f=gt({},a,e(a),{id:d,children:void 0});return s[d]=f,a.children&&(f.children=qd(a.children,e,c,s)),f}})}function js(r,e,n){n===void 0&&(n="/");let s=typeof e=="string"?di(e):e,a=Gs(s.pathname||"/",n);if(a==null)return null;let o=dy(r);Gb(o);let c=null;for(let d=0;c==null&&d<o.length;++d){let f=rx(a);c=ex(o[d],f)}return c}function qb(r,e){let{route:n,pathname:s,params:a}=r;return{id:n.id,pathname:s,params:a,data:e[n.id],handle:n.handle}}function dy(r,e,n,s){e===void 0&&(e=[]),n===void 0&&(n=[]),s===void 0&&(s="");let a=(o,c,d)=>{let f={relativePath:d===void 0?o.path||"":d,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};f.relativePath.startsWith("/")&&(Le(f.relativePath.startsWith(s),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(s.length));let v=xr([s,f.relativePath]),g=n.concat(f);o.children&&o.children.length>0&&(Le(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+v+'".')),dy(o.children,e,g,v)),!(o.path==null&&!o.index)&&e.push({path:v,score:Xb(v,o.index),routesMeta:g})};return r.forEach((o,c)=>{var d;if(o.path===""||!((d=o.path)!=null&&d.includes("?")))a(o,c);else for(let f of hy(o.path))a(o,c,f)}),e}function hy(r){let e=r.split("/");if(e.length===0)return[];let[n,...s]=e,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(s.length===0)return a?[o,""]:[o];let c=hy(s.join("/")),d=[];return d.push(...c.map(f=>f===""?o:[o,f].join("/"))),a&&d.push(...c),d.map(f=>r.startsWith("/")&&f===""?"/":f)}function Gb(r){r.sort((e,n)=>e.score!==n.score?n.score-e.score:Zb(e.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const Yb=/^:[\w-]+$/,Hb=3,Wb=2,Jb=1,Kb=10,Qb=-2,Im=r=>r==="*";function Xb(r,e){let n=r.split("/"),s=n.length;return n.some(Im)&&(s+=Qb),e&&(s+=Wb),n.filter(a=>!Im(a)).reduce((a,o)=>a+(Yb.test(o)?Hb:o===""?Jb:Kb),s)}function Zb(r,e){return r.length===e.length&&r.slice(0,-1).every((s,a)=>s===e[a])?r[r.length-1]-e[e.length-1]:0}function ex(r,e){let{routesMeta:n}=r,s={},a="/",o=[];for(let c=0;c<n.length;++c){let d=n[c],f=c===n.length-1,v=a==="/"?e:e.slice(a.length)||"/",g=tx({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},v);if(!g)return null;Object.assign(s,g.params);let w=d.route;o.push({params:s,pathname:xr([a,g.pathname]),pathnameBase:ax(xr([a,g.pathnameBase])),route:w}),g.pathnameBase!=="/"&&(a=xr([a,g.pathnameBase]))}return o}function tx(r,e){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[n,s]=nx(r.path,r.caseSensitive,r.end),a=e.match(n);if(!a)return null;let o=a[0],c=o.replace(/(.)\/+$/,"$1"),d=a.slice(1);return{params:s.reduce((v,g,w)=>{let{paramName:x,isOptional:k}=g;if(x==="*"){let N=d[w]||"";c=o.slice(0,o.length-N.length).replace(/(.)\/+$/,"$1")}const P=d[w];return k&&!P?v[x]=void 0:v[x]=(P||"").replace(/%2F/g,"/"),v},{}),pathname:o,pathnameBase:c,pattern:r}}function nx(r,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Us(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let s=[],a="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,f)=>(s.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(s.push({paramName:"*"}),a+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":r!==""&&r!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),s]}function rx(r){try{return r.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Us(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),r}}function Gs(r,e){if(e==="/")return r;if(!r.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,s=r.charAt(n);return s&&s!=="/"?null:r.slice(n)||"/"}function ix(r,e){e===void 0&&(e="/");let{pathname:n,search:s="",hash:a=""}=typeof r=="string"?di(r):r;return{pathname:n?n.startsWith("/")?n:sx(n,e):e,search:ox(s),hash:lx(a)}}function sx(r,e){let n=e.replace(/\/+$/,"").split("/");return r.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function yd(r,e,n,s){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function fy(r){return r.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function xc(r,e){let n=fy(r);return e?n.map((s,a)=>a===r.length-1?s.pathname:s.pathnameBase):n.map(s=>s.pathnameBase)}function Sc(r,e,n,s){s===void 0&&(s=!1);let a;typeof r=="string"?a=di(r):(a=gt({},r),Le(!a.pathname||!a.pathname.includes("?"),yd("?","pathname","search",a)),Le(!a.pathname||!a.pathname.includes("#"),yd("#","pathname","hash",a)),Le(!a.search||!a.search.includes("#"),yd("#","search","hash",a)));let o=r===""||a.pathname==="",c=o?"/":a.pathname,d;if(c==null)d=n;else{let w=e.length-1;if(!s&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),w-=1;a.pathname=x.join("/")}d=w>=0?e[w]:"/"}let f=ix(a,d),v=c&&c!=="/"&&c.endsWith("/"),g=(o||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(v||g)&&(f.pathname+="/"),f}const xr=r=>r.join("/").replace(/\/\/+/g,"/"),ax=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),ox=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,lx=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;class Ah{constructor(e,n,s,a){a===void 0&&(a=!1),this.status=e,this.statusText=n||"",this.internal=a,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}}function py(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const my=["post","put","patch","delete"],cx=new Set(my),ux=["get",...my],dx=new Set(ux),hx=new Set([301,302,303,307,308]),fx=new Set([307,308]),_d={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},px={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},La={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},gy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mx=r=>({hasErrorBoundary:!!r.hasErrorBoundary}),vy="remix-router-transitions";function gx(r){const e=r.window?r.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",s=!n;Le(r.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(r.mapRouteProperties)a=r.mapRouteProperties;else if(r.detectErrorBoundary){let L=r.detectErrorBoundary;a=z=>({hasErrorBoundary:L(z)})}else a=mx;let o={},c=qd(r.routes,a,void 0,o),d,f=r.basename||"/",v=gt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},r.future),g=null,w=new Set,x=null,k=null,P=null,N=r.hydrationData!=null,j=js(c,r.history.location,f),$=null;if(j==null){let L=En(404,{pathname:r.history.location.pathname}),{matches:z,route:W}=zm(c);j=z,$={[W.id]:L}}let K,G=j.some(L=>L.route.lazy),F=j.some(L=>L.route.loader);if(G)K=!1;else if(!F)K=!0;else if(v.v7_partialHydration){let L=r.hydrationData?r.hydrationData.loaderData:null,z=r.hydrationData?r.hydrationData.errors:null,W=re=>re.route.loader?re.route.loader.hydrate===!0?!1:L&&L[re.route.id]!==void 0||z&&z[re.route.id]!==void 0:!0;if(z){let re=j.findIndex(de=>z[de.route.id]!==void 0);K=j.slice(0,re+1).every(W)}else K=j.every(W)}else K=r.hydrationData!=null;let U,A={historyAction:r.history.action,location:r.history.location,matches:j,initialized:K,navigation:_d,restoreScrollPosition:r.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:r.hydrationData&&r.hydrationData.loaderData||{},actionData:r.hydrationData&&r.hydrationData.actionData||null,errors:r.hydrationData&&r.hydrationData.errors||$,fetchers:new Map,blockers:new Map},H=Ct.Pop,te=!1,ae,se=!1,we=new Map,De=null,Ie=!1,Ye=!1,vt=[],nt=[],ve=new Map,ie=0,me=-1,oe=new Map,M=new Set,Y=new Map,m=new Map,_=new Set,S=new Map,E=new Map,T=!1;function q(){if(g=r.history.listen(L=>{let{action:z,location:W,delta:re}=L;if(T){T=!1;return}Us(E.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let de=Qi({currentLocation:A.location,nextLocation:W,historyAction:z});if(de&&re!=null){T=!0,r.history.go(re*-1),Ki(de,{state:"blocked",location:W,proceed(){Ki(de,{state:"proceeding",proceed:void 0,reset:void 0,location:W}),r.history.go(re)},reset(){let Te=new Map(A.blockers);Te.set(de,La),_e({blockers:Te})}});return}return ct(z,W)}),n){jx(e,we);let L=()=>Tx(e,we);e.addEventListener("pagehide",L),De=()=>e.removeEventListener("pagehide",L)}return A.initialized||ct(Ct.Pop,A.location,{initialHydration:!0}),U}function ne(){g&&g(),De&&De(),w.clear(),ae&&ae.abort(),A.fetchers.forEach((L,z)=>jr(z)),A.blockers.forEach((L,z)=>Ks(z))}function le(L){return w.add(L),()=>w.delete(L)}function _e(L,z){z===void 0&&(z={}),A=gt({},A,L);let W=[],re=[];v.v7_fetcherPersist&&A.fetchers.forEach((de,Te)=>{de.state==="idle"&&(_.has(Te)?re.push(Te):W.push(Te))}),[...w].forEach(de=>de(A,{deletedFetchers:re,unstable_viewTransitionOpts:z.viewTransitionOpts,unstable_flushSync:z.flushSync===!0})),v.v7_fetcherPersist&&(W.forEach(de=>A.fetchers.delete(de)),re.forEach(de=>jr(de)))}function Ke(L,z,W){var re,de;let{flushSync:Te}=W===void 0?{}:W,Ee=A.actionData!=null&&A.navigation.formMethod!=null&&Fn(A.navigation.formMethod)&&A.navigation.state==="loading"&&((re=L.state)==null?void 0:re._isRedirect)!==!0,ye;z.actionData?Object.keys(z.actionData).length>0?ye=z.actionData:ye=null:Ee?ye=A.actionData:ye=null;let ge=z.loaderData?$m(A.loaderData,z.loaderData,z.matches||[],z.errors):A.loaderData,Ae=A.blockers;Ae.size>0&&(Ae=new Map(Ae),Ae.forEach((qe,ht)=>Ae.set(ht,La)));let xt=te===!0||A.navigation.formMethod!=null&&Fn(A.navigation.formMethod)&&((de=L.state)==null?void 0:de._isRedirect)!==!0;d&&(c=d,d=void 0),Ie||H===Ct.Pop||(H===Ct.Push?r.history.push(L,L.state):H===Ct.Replace&&r.history.replace(L,L.state));let Ce;if(H===Ct.Pop){let qe=we.get(A.location.pathname);qe&&qe.has(L.pathname)?Ce={currentLocation:A.location,nextLocation:L}:we.has(L.pathname)&&(Ce={currentLocation:L,nextLocation:A.location})}else if(se){let qe=we.get(A.location.pathname);qe?qe.add(L.pathname):(qe=new Set([L.pathname]),we.set(A.location.pathname,qe)),Ce={currentLocation:A.location,nextLocation:L}}_e(gt({},z,{actionData:ye,loaderData:ge,historyAction:H,location:L,initialized:!0,navigation:_d,revalidation:"idle",restoreScrollPosition:ir(L,z.matches||A.matches),preventScrollReset:xt,blockers:Ae}),{viewTransitionOpts:Ce,flushSync:Te===!0}),H=Ct.Pop,te=!1,se=!1,Ie=!1,Ye=!1,vt=[],nt=[]}async function lt(L,z){if(typeof L=="number"){r.history.go(L);return}let W=Gd(A.location,A.matches,f,v.v7_prependBasename,L,v.v7_relativeSplatPath,z==null?void 0:z.fromRouteId,z==null?void 0:z.relative),{path:re,submission:de,error:Te}=Mm(v.v7_normalizeFormMethod,!1,W,z),Ee=A.location,ye=fo(A.location,re,z&&z.state);ye=gt({},ye,r.history.encodeLocation(ye));let ge=z&&z.replace!=null?z.replace:void 0,Ae=Ct.Push;ge===!0?Ae=Ct.Replace:ge===!1||de!=null&&Fn(de.formMethod)&&de.formAction===A.location.pathname+A.location.search&&(Ae=Ct.Replace);let xt=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,Ce=(z&&z.unstable_flushSync)===!0,qe=Qi({currentLocation:Ee,nextLocation:ye,historyAction:Ae});if(qe){Ki(qe,{state:"blocked",location:ye,proceed(){Ki(qe,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),lt(L,z)},reset(){let ht=new Map(A.blockers);ht.set(qe,La),_e({blockers:ht})}});return}return await ct(Ae,ye,{submission:de,pendingError:Te,preventScrollReset:xt,replace:z&&z.replace,enableViewTransition:z&&z.unstable_viewTransition,flushSync:Ce})}function yt(){if(kr(),_e({revalidation:"loading"}),A.navigation.state!=="submitting"){if(A.navigation.state==="idle"){ct(A.historyAction,A.location,{startUninterruptedRevalidation:!0});return}ct(H||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation})}}async function ct(L,z,W){ae&&ae.abort(),ae=null,H=L,Ie=(W&&W.startUninterruptedRevalidation)===!0,Xs(A.location,A.matches),te=(W&&W.preventScrollReset)===!0,se=(W&&W.enableViewTransition)===!0;let re=d||c,de=W&&W.overrideNavigation,Te=js(re,z,f),Ee=(W&&W.flushSync)===!0;if(!Te){let ht=En(404,{pathname:z.pathname}),{matches:Lt,route:St}=zm(re);mi(),Ke(z,{matches:Lt,loaderData:{},errors:{[St.id]:ht}},{flushSync:Ee});return}if(A.initialized&&!Ye&&bx(A.location,z)&&!(W&&W.submission&&Fn(W.submission.formMethod))){Ke(z,{matches:Te},{flushSync:Ee});return}ae=new AbortController;let ye=Fa(r.history,z,ae.signal,W&&W.submission),ge,Ae;if(W&&W.pendingError)Ae={[ao(Te).route.id]:W.pendingError};else if(W&&W.submission&&Fn(W.submission.formMethod)){let ht=await st(ye,z,W.submission,Te,{replace:W.replace,flushSync:Ee});if(ht.shortCircuited)return;ge=ht.pendingActionData,Ae=ht.pendingActionError,de=wd(z,W.submission),Ee=!1,ye=new Request(ye.url,{signal:ye.signal})}let{shortCircuited:xt,loaderData:Ce,errors:qe}=await rr(ye,z,Te,de,W&&W.submission,W&&W.fetcherSubmission,W&&W.replace,W&&W.initialHydration===!0,Ee,ge,Ae);xt||(ae=null,Ke(z,gt({matches:Te},ge?{actionData:ge}:{},{loaderData:Ce,errors:qe})))}async function st(L,z,W,re,de){de===void 0&&(de={}),kr();let Te=kx(z,W);_e({navigation:Te},{flushSync:de.flushSync===!0});let Ee,ye=Hd(re,z);if(!ye.route.action&&!ye.route.lazy)Ee={type:mt.error,error:En(405,{method:L.method,pathname:z.pathname,routeId:ye.route.id})};else if(Ee=await Da("action",L,ye,re,o,a,f,v.v7_relativeSplatPath),L.signal.aborted)return{shortCircuited:!0};if(Ui(Ee)){let ge;return de&&de.replace!=null?ge=de.replace:ge=Ee.location===A.location.pathname+A.location.search,await Mt(A,Ee,{submission:W,replace:ge}),{shortCircuited:!0}}if(Ts(Ee)){let ge=ao(re,ye.route.id);return(de&&de.replace)!==!0&&(H=Ct.Push),{pendingActionData:{},pendingActionError:{[ge.route.id]:Ee.error}}}if(Fi(Ee))throw En(400,{type:"defer-action"});return{pendingActionData:{[ye.route.id]:Ee.data}}}async function rr(L,z,W,re,de,Te,Ee,ye,ge,Ae,xt){let Ce=re||wd(z,de),qe=de||Te||Gm(Ce),ht=d||c,[Lt,St]=Lm(r.history,A,W,qe,z,v.v7_partialHydration&&ye===!0,Ye,vt,nt,_,Y,M,ht,f,Ae,xt);if(mi($e=>!(W&&W.some(Ge=>Ge.route.id===$e))||Lt&&Lt.some(Ge=>Ge.route.id===$e)),me=++ie,Lt.length===0&&St.length===0){let $e=Nr();return Ke(z,gt({matches:W,loaderData:{},errors:xt||null},Ae?{actionData:Ae}:{},$e?{fetchers:new Map(A.fetchers)}:{}),{flushSync:ge}),{shortCircuited:!0}}if(!Ie&&(!v.v7_partialHydration||!ye)){St.forEach(Ge=>{let Fe=A.fetchers.get(Ge.key),es=Ua(void 0,Fe?Fe.data:void 0);A.fetchers.set(Ge.key,es)});let $e=Ae||A.actionData;_e(gt({navigation:Ce},$e?Object.keys($e).length===0?{actionData:null}:{actionData:$e}:{},St.length>0?{fetchers:new Map(A.fetchers)}:{}),{flushSync:ge})}St.forEach($e=>{ve.has($e.key)&&jn($e.key),$e.controller&&ve.set($e.key,$e.controller)});let Pr=()=>St.forEach($e=>jn($e.key));ae&&ae.signal.addEventListener("abort",Pr);let{results:Zs,loaderResults:Xt,fetcherResults:Tn}=await be(A.matches,W,Lt,St,L);if(L.signal.aborted)return{shortCircuited:!0};ae&&ae.signal.removeEventListener("abort",Pr),St.forEach($e=>ve.delete($e.key));let qn=Vm(Zs);if(qn){if(qn.idx>=Lt.length){let $e=St[qn.idx-Lt.length].key;M.add($e)}return await Mt(A,qn.result,{replace:Ee}),{shortCircuited:!0}}let{loaderData:ea,errors:Rr}=Bm(A,W,Lt,Xt,xt,St,Tn,S);S.forEach(($e,Ge)=>{$e.subscribe(Fe=>{(Fe||$e.done)&&S.delete(Ge)})}),v.v7_partialHydration&&ye&&A.errors&&Object.entries(A.errors).filter($e=>{let[Ge]=$e;return!Lt.some(Fe=>Fe.route.id===Ge)}).forEach($e=>{let[Ge,Fe]=$e;Rr=Object.assign(Rr||{},{[Ge]:Fe})});let Zi=Nr(),sr=ko(me),gi=Zi||sr||St.length>0;return gt({loaderData:ea,errors:Rr},gi?{fetchers:new Map(A.fetchers)}:{})}function bt(L,z,W,re){if(s)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ve.has(L)&&jn(L);let de=(re&&re.unstable_flushSync)===!0,Te=d||c,Ee=Gd(A.location,A.matches,f,v.v7_prependBasename,W,v.v7_relativeSplatPath,z,re==null?void 0:re.relative),ye=js(Te,Ee,f);if(!ye){Cr(L,z,En(404,{pathname:Ee}),{flushSync:de});return}let{path:ge,submission:Ae,error:xt}=Mm(v.v7_normalizeFormMethod,!0,Ee,re);if(xt){Cr(L,z,xt,{flushSync:de});return}let Ce=Hd(ye,ge);if(te=(re&&re.preventScrollReset)===!0,Ae&&Fn(Ae.formMethod)){zt(L,z,ge,Ce,ye,de,Ae);return}Y.set(L,{routeId:z,path:ge}),Ht(L,z,ge,Ce,ye,de,Ae)}async function zt(L,z,W,re,de,Te,Ee){if(kr(),Y.delete(L),!re.route.action&&!re.route.lazy){let Ge=En(405,{method:Ee.formMethod,pathname:W,routeId:z});Cr(L,z,Ge,{flushSync:Te});return}let ye=A.fetchers.get(L);Cn(L,Cx(Ee,ye),{flushSync:Te});let ge=new AbortController,Ae=Fa(r.history,W,ge.signal,Ee);ve.set(L,ge);let xt=ie,Ce=await Da("action",Ae,re,de,o,a,f,v.v7_relativeSplatPath);if(Ae.signal.aborted){ve.get(L)===ge&&ve.delete(L);return}if(v.v7_fetcherPersist&&_.has(L)){if(Ui(Ce)||Ts(Ce)){Cn(L,Xr(void 0));return}}else{if(Ui(Ce))if(ve.delete(L),me>xt){Cn(L,Xr(void 0));return}else return M.add(L),Cn(L,Ua(Ee)),Mt(A,Ce,{fetcherSubmission:Ee});if(Ts(Ce)){Cr(L,z,Ce.error);return}}if(Fi(Ce))throw En(400,{type:"defer-action"});let qe=A.navigation.location||A.location,ht=Fa(r.history,qe,ge.signal),Lt=d||c,St=A.navigation.state!=="idle"?js(Lt,A.navigation.location,f):A.matches;Le(St,"Didn't find any matches after fetcher action");let Pr=++ie;oe.set(L,Pr);let Zs=Ua(Ee,Ce.data);A.fetchers.set(L,Zs);let[Xt,Tn]=Lm(r.history,A,St,Ee,qe,!1,Ye,vt,nt,_,Y,M,Lt,f,{[re.route.id]:Ce.data},void 0);Tn.filter(Ge=>Ge.key!==L).forEach(Ge=>{let Fe=Ge.key,es=A.fetchers.get(Fe),ta=Ua(void 0,es?es.data:void 0);A.fetchers.set(Fe,ta),ve.has(Fe)&&jn(Fe),Ge.controller&&ve.set(Fe,Ge.controller)}),_e({fetchers:new Map(A.fetchers)});let qn=()=>Tn.forEach(Ge=>jn(Ge.key));ge.signal.addEventListener("abort",qn);let{results:ea,loaderResults:Rr,fetcherResults:Zi}=await be(A.matches,St,Xt,Tn,ht);if(ge.signal.aborted)return;ge.signal.removeEventListener("abort",qn),oe.delete(L),ve.delete(L),Tn.forEach(Ge=>ve.delete(Ge.key));let sr=Vm(ea);if(sr){if(sr.idx>=Xt.length){let Ge=Tn[sr.idx-Xt.length].key;M.add(Ge)}return Mt(A,sr.result)}let{loaderData:gi,errors:$e}=Bm(A,A.matches,Xt,Rr,void 0,Tn,Zi,S);if(A.fetchers.has(L)){let Ge=Xr(Ce.data);A.fetchers.set(L,Ge)}ko(Pr),A.navigation.state==="loading"&&Pr>me?(Le(H,"Expected pending action"),ae&&ae.abort(),Ke(A.navigation.location,{matches:St,loaderData:gi,errors:$e,fetchers:new Map(A.fetchers)})):(_e({errors:$e,loaderData:$m(A.loaderData,gi,St,$e),fetchers:new Map(A.fetchers)}),Ye=!1)}async function Ht(L,z,W,re,de,Te,Ee){let ye=A.fetchers.get(L);Cn(L,Ua(Ee,ye?ye.data:void 0),{flushSync:Te});let ge=new AbortController,Ae=Fa(r.history,W,ge.signal);ve.set(L,ge);let xt=ie,Ce=await Da("loader",Ae,re,de,o,a,f,v.v7_relativeSplatPath);if(Fi(Ce)&&(Ce=await wy(Ce,Ae.signal,!0)||Ce),ve.get(L)===ge&&ve.delete(L),!Ae.signal.aborted){if(_.has(L)){Cn(L,Xr(void 0));return}if(Ui(Ce))if(me>xt){Cn(L,Xr(void 0));return}else{M.add(L),await Mt(A,Ce);return}if(Ts(Ce)){Cr(L,z,Ce.error);return}Le(!Fi(Ce),"Unhandled fetcher deferred data"),Cn(L,Xr(Ce.data))}}async function Mt(L,z,W){let{submission:re,fetcherSubmission:de,replace:Te}=W===void 0?{}:W;z.revalidate&&(Ye=!0);let Ee=fo(L.location,z.location,{_isRedirect:!0});if(Le(Ee,"Expected a location on the redirect navigation"),n){let qe=!1;if(z.reloadDocument)qe=!0;else if(gy.test(z.location)){const ht=r.history.createURL(z.location);qe=ht.origin!==e.location.origin||Gs(ht.pathname,f)==null}if(qe){Te?e.location.replace(z.location):e.location.assign(z.location);return}}ae=null;let ye=Te===!0?Ct.Replace:Ct.Push,{formMethod:ge,formAction:Ae,formEncType:xt}=L.navigation;!re&&!de&&ge&&Ae&&xt&&(re=Gm(L.navigation));let Ce=re||de;if(fx.has(z.status)&&Ce&&Fn(Ce.formMethod))await ct(ye,Ee,{submission:gt({},Ce,{formAction:z.location}),preventScrollReset:te});else{let qe=wd(Ee,re);await ct(ye,Ee,{overrideNavigation:qe,fetcherSubmission:de,preventScrollReset:te})}}async function be(L,z,W,re,de){let Te=await Promise.all([...W.map(ge=>Da("loader",de,ge,z,o,a,f,v.v7_relativeSplatPath)),...re.map(ge=>ge.matches&&ge.match&&ge.controller?Da("loader",Fa(r.history,ge.path,ge.controller.signal),ge.match,ge.matches,o,a,f,v.v7_relativeSplatPath):{type:mt.error,error:En(404,{pathname:ge.path})})]),Ee=Te.slice(0,W.length),ye=Te.slice(W.length);return await Promise.all([qm(L,W,Ee,Ee.map(()=>de.signal),!1,A.loaderData),qm(L,re.map(ge=>ge.match),ye,re.map(ge=>ge.controller?ge.controller.signal:null),!0)]),{results:Te,loaderResults:Ee,fetcherResults:ye}}function kr(){Ye=!0,vt.push(...mi()),Y.forEach((L,z)=>{ve.has(z)&&(nt.push(z),jn(z))})}function Cn(L,z,W){W===void 0&&(W={}),A.fetchers.set(L,z),_e({fetchers:new Map(A.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Cr(L,z,W,re){re===void 0&&(re={});let de=ao(A.matches,z);jr(L),_e({errors:{[de.route.id]:W},fetchers:new Map(A.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Js(L){return v.v7_fetcherPersist&&(m.set(L,(m.get(L)||0)+1),_.has(L)&&_.delete(L)),A.fetchers.get(L)||px}function jr(L){let z=A.fetchers.get(L);ve.has(L)&&!(z&&z.state==="loading"&&oe.has(L))&&jn(L),Y.delete(L),oe.delete(L),M.delete(L),_.delete(L),A.fetchers.delete(L)}function Ji(L){if(v.v7_fetcherPersist){let z=(m.get(L)||0)-1;z<=0?(m.delete(L),_.add(L)):m.set(L,z)}else jr(L);_e({fetchers:new Map(A.fetchers)})}function jn(L){let z=ve.get(L);Le(z,"Expected fetch controller: "+L),z.abort(),ve.delete(L)}function Tr(L){for(let z of L){let W=Js(z),re=Xr(W.data);A.fetchers.set(z,re)}}function Nr(){let L=[],z=!1;for(let W of M){let re=A.fetchers.get(W);Le(re,"Expected fetcher: "+W),re.state==="loading"&&(M.delete(W),L.push(W),z=!0)}return Tr(L),z}function ko(L){let z=[];for(let[W,re]of oe)if(re<L){let de=A.fetchers.get(W);Le(de,"Expected fetcher: "+W),de.state==="loading"&&(jn(W),oe.delete(W),z.push(W))}return Tr(z),z.length>0}function Co(L,z){let W=A.blockers.get(L)||La;return E.get(L)!==z&&E.set(L,z),W}function Ks(L){A.blockers.delete(L),E.delete(L)}function Ki(L,z){let W=A.blockers.get(L)||La;Le(W.state==="unblocked"&&z.state==="blocked"||W.state==="blocked"&&z.state==="blocked"||W.state==="blocked"&&z.state==="proceeding"||W.state==="blocked"&&z.state==="unblocked"||W.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+W.state+" -> "+z.state);let re=new Map(A.blockers);re.set(L,z),_e({blockers:re})}function Qi(L){let{currentLocation:z,nextLocation:W,historyAction:re}=L;if(E.size===0)return;E.size>1&&Us(!1,"A router only supports one blocker at a time");let de=Array.from(E.entries()),[Te,Ee]=de[de.length-1],ye=A.blockers.get(Te);if(!(ye&&ye.state==="proceeding")&&Ee({currentLocation:z,nextLocation:W,historyAction:re}))return Te}function mi(L){let z=[];return S.forEach((W,re)=>{(!L||L(re))&&(W.cancel(),z.push(re),S.delete(re))}),z}function Qs(L,z,W){if(x=L,P=z,k=W||null,!N&&A.navigation===_d){N=!0;let re=ir(A.location,A.matches);re!=null&&_e({restoreScrollPosition:re})}return()=>{x=null,P=null,k=null}}function Xi(L,z){return k&&k(L,z.map(re=>qb(re,A.loaderData)))||L.key}function Xs(L,z){if(x&&P){let W=Xi(L,z);x[W]=P()}}function ir(L,z){if(x){let W=Xi(L,z),re=x[W];if(typeof re=="number")return re}return null}function Ar(L){o={},d=qd(L,a,void 0,o)}return U={get basename(){return f},get future(){return v},get state(){return A},get routes(){return c},get window(){return e},initialize:q,subscribe:le,enableScrollRestoration:Qs,navigate:lt,fetch:bt,revalidate:yt,createHref:L=>r.history.createHref(L),encodeLocation:L=>r.history.encodeLocation(L),getFetcher:Js,deleteFetcher:Ji,dispose:ne,getBlocker:Co,deleteBlocker:Ks,_internalFetchControllers:ve,_internalActiveDeferreds:S,_internalSetRoutes:Ar},U}function vx(r){return r!=null&&("formData"in r&&r.formData!=null||"body"in r&&r.body!==void 0)}function Gd(r,e,n,s,a,o,c,d){let f,v;if(c){f=[];for(let w of e)if(f.push(w),w.route.id===c){v=w;break}}else f=e,v=e[e.length-1];let g=Sc(a||".",xc(f,o),Gs(r.pathname,n)||r.pathname,d==="path");return a==null&&(g.search=r.search,g.hash=r.hash),(a==null||a===""||a===".")&&v&&v.route.index&&!Ph(g.search)&&(g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index"),s&&n!=="/"&&(g.pathname=g.pathname==="/"?n:xr([n,g.pathname])),zi(g)}function Mm(r,e,n,s){if(!s||!vx(s))return{path:n};if(s.formMethod&&!Ex(s.formMethod))return{path:n,error:En(405,{method:s.formMethod})};let a=()=>({path:n,error:En(400,{type:"invalid-body"})}),o=s.formMethod||"get",c=r?o.toUpperCase():o.toLowerCase(),d=_y(n);if(s.body!==void 0){if(s.formEncType==="text/plain"){if(!Fn(c))return a();let x=typeof s.body=="string"?s.body:s.body instanceof FormData||s.body instanceof URLSearchParams?Array.from(s.body.entries()).reduce((k,P)=>{let[N,j]=P;return""+k+N+"="+j+` +`},""):String(s.body);return{path:n,submission:{formMethod:c,formAction:d,formEncType:s.formEncType,formData:void 0,json:void 0,text:x}}}else if(s.formEncType==="application/json"){if(!Fn(c))return a();try{let x=typeof s.body=="string"?JSON.parse(s.body):s.body;return{path:n,submission:{formMethod:c,formAction:d,formEncType:s.formEncType,formData:void 0,json:x,text:void 0}}}catch{return a()}}}Le(typeof FormData=="function","FormData is not available in this environment");let f,v;if(s.formData)f=Yd(s.formData),v=s.formData;else if(s.body instanceof FormData)f=Yd(s.body),v=s.body;else if(s.body instanceof URLSearchParams)f=s.body,v=Um(f);else if(s.body==null)f=new URLSearchParams,v=new FormData;else try{f=new URLSearchParams(s.body),v=Um(f)}catch{return a()}let g={formMethod:c,formAction:d,formEncType:s&&s.formEncType||"application/x-www-form-urlencoded",formData:v,json:void 0,text:void 0};if(Fn(g.formMethod))return{path:n,submission:g};let w=di(n);return e&&w.search&&Ph(w.search)&&f.append("index",""),w.search="?"+f,{path:zi(w),submission:g}}function yx(r,e){let n=r;if(e){let s=r.findIndex(a=>a.route.id===e);s>=0&&(n=r.slice(0,s))}return n}function Lm(r,e,n,s,a,o,c,d,f,v,g,w,x,k,P,N){let j=N?Object.values(N)[0]:P?Object.values(P)[0]:void 0,$=r.createURL(e.location),K=r.createURL(a),G=N?Object.keys(N)[0]:void 0,U=yx(n,G).filter((H,te)=>{let{route:ae}=H;if(ae.lazy)return!0;if(ae.loader==null)return!1;if(o)return ae.loader.hydrate?!0:e.loaderData[ae.id]===void 0&&(!e.errors||e.errors[ae.id]===void 0);if(_x(e.loaderData,e.matches[te],H)||d.some(De=>De===H.route.id))return!0;let se=e.matches[te],we=H;return Dm(H,gt({currentUrl:$,currentParams:se.params,nextUrl:K,nextParams:we.params},s,{actionResult:j,defaultShouldRevalidate:c||$.pathname+$.search===K.pathname+K.search||$.search!==K.search||yy(se,we)}))}),A=[];return g.forEach((H,te)=>{if(o||!n.some(Ie=>Ie.route.id===H.routeId)||v.has(te))return;let ae=js(x,H.path,k);if(!ae){A.push({key:te,routeId:H.routeId,path:H.path,matches:null,match:null,controller:null});return}let se=e.fetchers.get(te),we=Hd(ae,H.path),De=!1;w.has(te)?De=!1:f.includes(te)?De=!0:se&&se.state!=="idle"&&se.data===void 0?De=c:De=Dm(we,gt({currentUrl:$,currentParams:e.matches[e.matches.length-1].params,nextUrl:K,nextParams:n[n.length-1].params},s,{actionResult:j,defaultShouldRevalidate:c})),De&&A.push({key:te,routeId:H.routeId,path:H.path,matches:ae,match:we,controller:new AbortController})}),[U,A]}function _x(r,e,n){let s=!e||n.route.id!==e.route.id,a=r[n.route.id]===void 0;return s||a}function yy(r,e){let n=r.route.path;return r.pathname!==e.pathname||n!=null&&n.endsWith("*")&&r.params["*"]!==e.params["*"]}function Dm(r,e){if(r.route.shouldRevalidate){let n=r.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function Fm(r,e,n){if(!r.lazy)return;let s=await r.lazy();if(!r.lazy)return;let a=n[r.id];Le(a,"No route found in manifest");let o={};for(let c in s){let f=a[c]!==void 0&&c!=="hasErrorBoundary";Us(!f,'Route "'+a.id+'" has a static property "'+c+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+c+'" will be ignored.')),!f&&!zb.has(c)&&(o[c]=s[c])}Object.assign(a,o),Object.assign(a,gt({},e(a),{lazy:void 0}))}async function Da(r,e,n,s,a,o,c,d,f){f===void 0&&(f={});let v,g,w,x=N=>{let j,$=new Promise((K,G)=>j=G);return w=()=>j(),e.signal.addEventListener("abort",w),Promise.race([N({request:e,params:n.params,context:f.requestContext}),$])};try{let N=n.route[r];if(n.route.lazy)if(N){let j,$=await Promise.all([x(N).catch(K=>{j=K}),Fm(n.route,o,a)]);if(j)throw j;g=$[0]}else if(await Fm(n.route,o,a),N=n.route[r],N)g=await x(N);else if(r==="action"){let j=new URL(e.url),$=j.pathname+j.search;throw En(405,{method:e.method,pathname:$,routeId:n.route.id})}else return{type:mt.data,data:void 0};else if(N)g=await x(N);else{let j=new URL(e.url),$=j.pathname+j.search;throw En(404,{pathname:$})}Le(g!==void 0,"You defined "+(r==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+r+"` ")+"function. Please return a value or `null`.")}catch(N){v=mt.error,g=N}finally{w&&e.signal.removeEventListener("abort",w)}if(Sx(g)){let N=g.status;if(hx.has(N)){let $=g.headers.get("Location");if(Le($,"Redirects returned/thrown from loaders/actions must have a Location header"),!gy.test($))$=Gd(new URL(e.url),s.slice(0,s.indexOf(n)+1),c,!0,$,d);else if(!f.isStaticRequest){let K=new URL(e.url),G=$.startsWith("//")?new URL(K.protocol+$):new URL($),F=Gs(G.pathname,c)!=null;G.origin===K.origin&&F&&($=G.pathname+G.search+G.hash)}if(f.isStaticRequest)throw g.headers.set("Location",$),g;return{type:mt.redirect,status:N,location:$,revalidate:g.headers.get("X-Remix-Revalidate")!==null,reloadDocument:g.headers.get("X-Remix-Reload-Document")!==null}}if(f.isRouteRequest)throw{type:v===mt.error?mt.error:mt.data,response:g};let j;try{let $=g.headers.get("Content-Type");$&&/\bapplication\/json\b/.test($)?g.body==null?j=null:j=await g.json():j=await g.text()}catch($){return{type:mt.error,error:$}}return v===mt.error?{type:v,error:new Ah(N,g.statusText,j),headers:g.headers}:{type:mt.data,data:j,statusCode:g.status,headers:g.headers}}if(v===mt.error)return{type:v,error:g};if(xx(g)){var k,P;return{type:mt.deferred,deferredData:g,statusCode:(k=g.init)==null?void 0:k.status,headers:((P=g.init)==null?void 0:P.headers)&&new Headers(g.init.headers)}}return{type:mt.data,data:g}}function Fa(r,e,n,s){let a=r.createURL(_y(e)).toString(),o={signal:n};if(s&&Fn(s.formMethod)){let{formMethod:c,formEncType:d}=s;o.method=c.toUpperCase(),d==="application/json"?(o.headers=new Headers({"Content-Type":d}),o.body=JSON.stringify(s.json)):d==="text/plain"?o.body=s.text:d==="application/x-www-form-urlencoded"&&s.formData?o.body=Yd(s.formData):o.body=s.formData}return new Request(a,o)}function Yd(r){let e=new URLSearchParams;for(let[n,s]of r.entries())e.append(n,typeof s=="string"?s:s.name);return e}function Um(r){let e=new FormData;for(let[n,s]of r.entries())e.append(n,s);return e}function wx(r,e,n,s,a){let o={},c=null,d,f=!1,v={};return n.forEach((g,w)=>{let x=e[w].route.id;if(Le(!Ui(g),"Cannot handle redirect results in processLoaderData"),Ts(g)){let k=ao(r,x),P=g.error;s&&(P=Object.values(s)[0],s=void 0),c=c||{},c[k.route.id]==null&&(c[k.route.id]=P),o[x]=void 0,f||(f=!0,d=py(g.error)?g.error.status:500),g.headers&&(v[x]=g.headers)}else Fi(g)?(a.set(x,g.deferredData),o[x]=g.deferredData.data):o[x]=g.data,g.statusCode!=null&&g.statusCode!==200&&!f&&(d=g.statusCode),g.headers&&(v[x]=g.headers)}),s&&(c=s,o[Object.keys(s)[0]]=void 0),{loaderData:o,errors:c,statusCode:d||200,loaderHeaders:v}}function Bm(r,e,n,s,a,o,c,d){let{loaderData:f,errors:v}=wx(e,n,s,a,d);for(let g=0;g<o.length;g++){let{key:w,match:x,controller:k}=o[g];Le(c!==void 0&&c[g]!==void 0,"Did not find corresponding fetcher result");let P=c[g];if(!(k&&k.signal.aborted))if(Ts(P)){let N=ao(r.matches,x==null?void 0:x.route.id);v&&v[N.route.id]||(v=gt({},v,{[N.route.id]:P.error})),r.fetchers.delete(w)}else if(Ui(P))Le(!1,"Unhandled fetcher revalidation redirect");else if(Fi(P))Le(!1,"Unhandled fetcher deferred data");else{let N=Xr(P.data);r.fetchers.set(w,N)}}return{loaderData:f,errors:v}}function $m(r,e,n,s){let a=gt({},e);for(let o of n){let c=o.route.id;if(e.hasOwnProperty(c)?e[c]!==void 0&&(a[c]=e[c]):r[c]!==void 0&&o.route.loader&&(a[c]=r[c]),s&&s.hasOwnProperty(c))break}return a}function ao(r,e){return(e?r.slice(0,r.findIndex(s=>s.route.id===e)+1):[...r]).reverse().find(s=>s.route.hasErrorBoundary===!0)||r[0]}function zm(r){let e=r.length===1?r[0]:r.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function En(r,e){let{pathname:n,routeId:s,method:a,type:o}=e===void 0?{}:e,c="Unknown Server Error",d="Unknown @remix-run/router error";return r===400?(c="Bad Request",a&&n&&s?d="You made a "+a+' request to "'+n+'" but '+('did not provide a `loader` for route "'+s+'", ')+"so there is no way to handle the request.":o==="defer-action"?d="defer() is not supported in actions":o==="invalid-body"&&(d="Unable to encode submission body")):r===403?(c="Forbidden",d='Route "'+s+'" does not match URL "'+n+'"'):r===404?(c="Not Found",d='No route matches URL "'+n+'"'):r===405&&(c="Method Not Allowed",a&&n&&s?d="You made a "+a.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+s+'", ')+"so there is no way to handle the request.":a&&(d='Invalid request method "'+a.toUpperCase()+'"')),new Ah(r||500,c,new Error(d),!0)}function Vm(r){for(let e=r.length-1;e>=0;e--){let n=r[e];if(Ui(n))return{result:n,idx:e}}}function _y(r){let e=typeof r=="string"?di(r):r;return zi(gt({},e,{hash:""}))}function bx(r,e){return r.pathname!==e.pathname||r.search!==e.search?!1:r.hash===""?e.hash!=="":r.hash===e.hash?!0:e.hash!==""}function Fi(r){return r.type===mt.deferred}function Ts(r){return r.type===mt.error}function Ui(r){return(r&&r.type)===mt.redirect}function xx(r){let e=r;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function Sx(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.headers=="object"&&typeof r.body<"u"}function Ex(r){return dx.has(r.toLowerCase())}function Fn(r){return cx.has(r.toLowerCase())}async function qm(r,e,n,s,a,o){for(let c=0;c<n.length;c++){let d=n[c],f=e[c];if(!f)continue;let v=r.find(w=>w.route.id===f.route.id),g=v!=null&&!yy(v,f)&&(o&&o[f.route.id])!==void 0;if(Fi(d)&&(a||g)){let w=s[c];Le(w,"Expected an AbortSignal for revalidating fetcher deferred result"),await wy(d,w,a).then(x=>{x&&(n[c]=x||n[c])})}}}async function wy(r,e,n){if(n===void 0&&(n=!1),!await r.deferredData.resolveData(e)){if(n)try{return{type:mt.data,data:r.deferredData.unwrappedData}}catch(a){return{type:mt.error,error:a}}return{type:mt.data,data:r.deferredData.data}}}function Ph(r){return new URLSearchParams(r).getAll("index").some(e=>e==="")}function Hd(r,e){let n=typeof e=="string"?di(e).search:e.search;if(r[r.length-1].route.index&&Ph(n||""))return r[r.length-1];let s=fy(r);return s[s.length-1]}function Gm(r){let{formMethod:e,formAction:n,formEncType:s,text:a,formData:o,json:c}=r;if(!(!e||!n||!s)){if(a!=null)return{formMethod:e,formAction:n,formEncType:s,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:e,formAction:n,formEncType:s,formData:o,json:void 0,text:void 0};if(c!==void 0)return{formMethod:e,formAction:n,formEncType:s,formData:void 0,json:c,text:void 0}}}function wd(r,e){return e?{state:"loading",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function kx(r,e){return{state:"submitting",location:r,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Ua(r,e){return r?{state:"loading",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Cx(r,e){return{state:"submitting",formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text,data:e?e.data:void 0}}function Xr(r){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function jx(r,e){try{let n=r.sessionStorage.getItem(vy);if(n){let s=JSON.parse(n);for(let[a,o]of Object.entries(s||{}))o&&Array.isArray(o)&&e.set(a,new Set(o||[]))}}catch{}}function Tx(r,e){if(e.size>0){let n={};for(let[s,a]of e)n[s]=[...a];try{r.sessionStorage.setItem(vy,JSON.stringify(n))}catch(s){Us(!1,"Failed to save applied view transitions in sessionStorage ("+s+").")}}}/** + * React Router v6.22.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function lc(){return lc=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},lc.apply(this,arguments)}const Ec=I.createContext(null),by=I.createContext(null),hi=I.createContext(null),Rh=I.createContext(null),Sr=I.createContext({outlet:null,matches:[],isDataRoute:!1}),xy=I.createContext(null);function Nx(r,e){let{relative:n}=e===void 0?{}:e;Ys()||Le(!1);let{basename:s,navigator:a}=I.useContext(hi),{hash:o,pathname:c,search:d}=Ey(r,{relative:n}),f=c;return s!=="/"&&(f=c==="/"?s:xr([s,c])),a.createHref({pathname:f,search:d,hash:o})}function Ys(){return I.useContext(Rh)!=null}function Er(){return Ys()||Le(!1),I.useContext(Rh).location}function Sy(r){I.useContext(hi).static||I.useLayoutEffect(r)}function un(){let{isDataRoute:r}=I.useContext(Sr);return r?Vx():Ax()}function Ax(){Ys()||Le(!1);let r=I.useContext(Ec),{basename:e,future:n,navigator:s}=I.useContext(hi),{matches:a}=I.useContext(Sr),{pathname:o}=Er(),c=JSON.stringify(xc(a,n.v7_relativeSplatPath)),d=I.useRef(!1);return Sy(()=>{d.current=!0}),I.useCallback(function(v,g){if(g===void 0&&(g={}),!d.current)return;if(typeof v=="number"){s.go(v);return}let w=Sc(v,JSON.parse(c),o,g.relative==="path");r==null&&e!=="/"&&(w.pathname=w.pathname==="/"?e:xr([e,w.pathname])),(g.replace?s.replace:s.push)(w,g.state,g)},[e,s,c,o,r])}const Px=I.createContext(null);function Rx(r){let e=I.useContext(Sr).outlet;return e&&I.createElement(Px.Provider,{value:r},e)}function Ey(r,e){let{relative:n}=e===void 0?{}:e,{future:s}=I.useContext(hi),{matches:a}=I.useContext(Sr),{pathname:o}=Er(),c=JSON.stringify(xc(a,s.v7_relativeSplatPath));return I.useMemo(()=>Sc(r,JSON.parse(c),o,n==="path"),[r,c,o,n])}function Ox(r,e,n,s){Ys()||Le(!1);let{navigator:a}=I.useContext(hi),{matches:o}=I.useContext(Sr),c=o[o.length-1],d=c?c.params:{};c&&c.pathname;let f=c?c.pathnameBase:"/";c&&c.route;let v=Er(),g;g=v;let w=g.pathname||"/",x=w;if(f!=="/"){let N=f.replace(/^\//,"").split("/");x="/"+w.replace(/^\//,"").split("/").slice(N.length).join("/")}let k=js(r,{pathname:x});return Fx(k&&k.map(N=>Object.assign({},N,{params:Object.assign({},d,N.params),pathname:xr([f,a.encodeLocation?a.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?f:xr([f,a.encodeLocation?a.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),o,n,s)}function Ix(){let r=zx(),e=py(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),n=r instanceof Error?r.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},e),n?I.createElement("pre",{style:a},n):null,null)}const Mx=I.createElement(Ix,null);class Lx extends I.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?I.createElement(Sr.Provider,{value:this.props.routeContext},I.createElement(xy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Dx(r){let{routeContext:e,match:n,children:s}=r,a=I.useContext(Ec);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(Sr.Provider,{value:e},s)}function Fx(r,e,n,s){var a;if(e===void 0&&(e=[]),n===void 0&&(n=null),s===void 0&&(s=null),r==null){var o;if((o=n)!=null&&o.errors)r=n.matches;else return null}let c=r,d=(a=n)==null?void 0:a.errors;if(d!=null){let g=c.findIndex(w=>w.route.id&&(d==null?void 0:d[w.route.id]));g>=0||Le(!1),c=c.slice(0,Math.min(c.length,g+1))}let f=!1,v=-1;if(n&&s&&s.v7_partialHydration)for(let g=0;g<c.length;g++){let w=c[g];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(v=g),w.route.id){let{loaderData:x,errors:k}=n,P=w.route.loader&&x[w.route.id]===void 0&&(!k||k[w.route.id]===void 0);if(w.route.lazy||P){f=!0,v>=0?c=c.slice(0,v+1):c=[c[0]];break}}}return c.reduceRight((g,w,x)=>{let k,P=!1,N=null,j=null;n&&(k=d&&w.route.id?d[w.route.id]:void 0,N=w.route.errorElement||Mx,f&&(v<0&&x===0?(qx("route-fallback"),P=!0,j=null):v===x&&(P=!0,j=w.route.hydrateFallbackElement||null)));let $=e.concat(c.slice(0,x+1)),K=()=>{let G;return k?G=N:P?G=j:w.route.Component?G=I.createElement(w.route.Component,null):w.route.element?G=w.route.element:G=g,I.createElement(Dx,{match:w,routeContext:{outlet:g,matches:$,isDataRoute:n!=null},children:G})};return n&&(w.route.ErrorBoundary||w.route.errorElement||x===0)?I.createElement(Lx,{location:n.location,revalidation:n.revalidation,component:N,error:k,children:K(),routeContext:{outlet:null,matches:$,isDataRoute:!0}}):K()},null)}var ky=function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r}(ky||{}),cc=function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r}(cc||{});function Ux(r){let e=I.useContext(Ec);return e||Le(!1),e}function Bx(r){let e=I.useContext(by);return e||Le(!1),e}function $x(r){let e=I.useContext(Sr);return e||Le(!1),e}function Cy(r){let e=$x(),n=e.matches[e.matches.length-1];return n.route.id||Le(!1),n.route.id}function zx(){var r;let e=I.useContext(xy),n=Bx(cc.UseRouteError),s=Cy(cc.UseRouteError);return e!==void 0?e:(r=n.errors)==null?void 0:r[s]}function Vx(){let{router:r}=Ux(ky.UseNavigateStable),e=Cy(cc.UseNavigateStable),n=I.useRef(!1);return Sy(()=>{n.current=!0}),I.useCallback(function(a,o){o===void 0&&(o={}),n.current&&(typeof a=="number"?r.navigate(a):r.navigate(a,lc({fromRouteId:e},o)))},[r,e])}const Ym={};function qx(r,e,n){Ym[r]||(Ym[r]=!0)}function jy(r){let{to:e,replace:n,state:s,relative:a}=r;Ys()||Le(!1);let{future:o,static:c}=I.useContext(hi),{matches:d}=I.useContext(Sr),{pathname:f}=Er(),v=un(),g=Sc(e,xc(d,o.v7_relativeSplatPath),f,a==="path"),w=JSON.stringify(g);return I.useEffect(()=>v(JSON.parse(w),{replace:n,state:s,relative:a}),[v,w,a,n,s]),null}function Gx(r){return Rx(r.context)}function Yx(r){let{basename:e="/",children:n=null,location:s,navigationType:a=Ct.Pop,navigator:o,static:c=!1,future:d}=r;Ys()&&Le(!1);let f=e.replace(/^\/*/,"/"),v=I.useMemo(()=>({basename:f,navigator:o,static:c,future:lc({v7_relativeSplatPath:!1},d)}),[f,d,o,c]);typeof s=="string"&&(s=di(s));let{pathname:g="/",search:w="",hash:x="",state:k=null,key:P="default"}=s,N=I.useMemo(()=>{let j=Gs(g,f);return j==null?null:{location:{pathname:j,search:w,hash:x,state:k,key:P},navigationType:a}},[f,g,w,x,k,P,a]);return N==null?null:I.createElement(hi.Provider,{value:v},I.createElement(Rh.Provider,{children:n,value:N}))}new Promise(()=>{});function Hx(r){let e={hasErrorBoundary:r.ErrorBoundary!=null||r.errorElement!=null};return r.Component&&Object.assign(e,{element:I.createElement(r.Component),Component:void 0}),r.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:I.createElement(r.HydrateFallback),HydrateFallback:void 0}),r.ErrorBoundary&&Object.assign(e,{errorElement:I.createElement(r.ErrorBoundary),ErrorBoundary:void 0}),e}/** + * React Router DOM v6.22.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function po(){return po=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},po.apply(this,arguments)}function Wx(r,e){if(r==null)return{};var n={},s=Object.keys(r),a,o;for(o=0;o<s.length;o++)a=s[o],!(e.indexOf(a)>=0)&&(n[a]=r[a]);return n}function Jx(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Kx(r,e){return r.button===0&&(!e||e==="_self")&&!Jx(r)}const Qx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Xx="6";try{window.__reactRouterVersion=Xx}catch{}function Zx(r,e){return gx({basename:void 0,future:po({},void 0,{v7_prependBasename:!0}),history:Ub({window:void 0}),hydrationData:eS(),routes:r,mapRouteProperties:Hx,window:void 0}).initialize()}function eS(){var r;let e=(r=window)==null?void 0:r.__staticRouterHydrationData;return e&&e.errors&&(e=po({},e,{errors:tS(e.errors)})),e}function tS(r){if(!r)return null;let e=Object.entries(r),n={};for(let[s,a]of e)if(a&&a.__type==="RouteErrorResponse")n[s]=new Ah(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let c=new o(a.message);c.stack="",n[s]=c}catch{}}if(n[s]==null){let o=new Error(a.message);o.stack="",n[s]=o}}else n[s]=a;return n}const nS=I.createContext({isTransitioning:!1}),rS=I.createContext(new Map),iS="startTransition",Hm=Pb[iS],sS="flushSync",Wm=Fb[sS];function aS(r){Hm?Hm(r):r()}function Ba(r){Wm?Wm(r):r()}let oS=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=s=>{this.status==="pending"&&(this.status="resolved",e(s))},this.reject=s=>{this.status==="pending"&&(this.status="rejected",n(s))}})}};function lS(r){let{fallbackElement:e,router:n,future:s}=r,[a,o]=I.useState(n.state),[c,d]=I.useState(),[f,v]=I.useState({isTransitioning:!1}),[g,w]=I.useState(),[x,k]=I.useState(),[P,N]=I.useState(),j=I.useRef(new Map),{v7_startTransition:$}=s||{},K=I.useCallback(H=>{$?aS(H):H()},[$]),G=I.useCallback((H,te)=>{let{deletedFetchers:ae,unstable_flushSync:se,unstable_viewTransitionOpts:we}=te;ae.forEach(Ie=>j.current.delete(Ie)),H.fetchers.forEach((Ie,Ye)=>{Ie.data!==void 0&&j.current.set(Ye,Ie.data)});let De=n.window==null||typeof n.window.document.startViewTransition!="function";if(!we||De){se?Ba(()=>o(H)):K(()=>o(H));return}if(se){Ba(()=>{x&&(g&&g.resolve(),x.skipTransition()),v({isTransitioning:!0,flushSync:!0,currentLocation:we.currentLocation,nextLocation:we.nextLocation})});let Ie=n.window.document.startViewTransition(()=>{Ba(()=>o(H))});Ie.finished.finally(()=>{Ba(()=>{w(void 0),k(void 0),d(void 0),v({isTransitioning:!1})})}),Ba(()=>k(Ie));return}x?(g&&g.resolve(),x.skipTransition(),N({state:H,currentLocation:we.currentLocation,nextLocation:we.nextLocation})):(d(H),v({isTransitioning:!0,flushSync:!1,currentLocation:we.currentLocation,nextLocation:we.nextLocation}))},[n.window,x,g,j,K]);I.useLayoutEffect(()=>n.subscribe(G),[n,G]),I.useEffect(()=>{f.isTransitioning&&!f.flushSync&&w(new oS)},[f]),I.useEffect(()=>{if(g&&c&&n.window){let H=c,te=g.promise,ae=n.window.document.startViewTransition(async()=>{K(()=>o(H)),await te});ae.finished.finally(()=>{w(void 0),k(void 0),d(void 0),v({isTransitioning:!1})}),k(ae)}},[K,c,g,n.window]),I.useEffect(()=>{g&&c&&a.location.key===c.location.key&&g.resolve()},[g,x,a.location,c]),I.useEffect(()=>{!f.isTransitioning&&P&&(d(P.state),v({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}),N(void 0))},[f.isTransitioning,P]),I.useEffect(()=>{},[]);let F=I.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:H=>n.navigate(H),push:(H,te,ae)=>n.navigate(H,{state:te,preventScrollReset:ae==null?void 0:ae.preventScrollReset}),replace:(H,te,ae)=>n.navigate(H,{replace:!0,state:te,preventScrollReset:ae==null?void 0:ae.preventScrollReset})}),[n]),U=n.basename||"/",A=I.useMemo(()=>({router:n,navigator:F,static:!1,basename:U}),[n,F,U]);return I.createElement(I.Fragment,null,I.createElement(Ec.Provider,{value:A},I.createElement(by.Provider,{value:a},I.createElement(rS.Provider,{value:j.current},I.createElement(nS.Provider,{value:f},I.createElement(Yx,{basename:U,location:a.location,navigationType:a.historyAction,navigator:F,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},a.initialized||n.future.v7_partialHydration?I.createElement(cS,{routes:n.routes,future:n.future,state:a}):e))))),null)}function cS(r){let{routes:e,future:n,state:s}=r;return Ox(e,void 0,s,n)}const uS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cn=I.forwardRef(function(e,n){let{onClick:s,relative:a,reloadDocument:o,replace:c,state:d,target:f,to:v,preventScrollReset:g,unstable_viewTransition:w}=e,x=Wx(e,Qx),{basename:k}=I.useContext(hi),P,N=!1;if(typeof v=="string"&&dS.test(v)&&(P=v,uS))try{let G=new URL(window.location.href),F=v.startsWith("//")?new URL(G.protocol+v):new URL(v),U=Gs(F.pathname,k);F.origin===G.origin&&U!=null?v=U+F.search+F.hash:N=!0}catch{}let j=Nx(v,{relative:a}),$=hS(v,{replace:c,state:d,target:f,preventScrollReset:g,relative:a,unstable_viewTransition:w});function K(G){s&&s(G),G.defaultPrevented||$(G)}return I.createElement("a",po({},x,{href:P||j,onClick:N||o?s:K,ref:n,target:f}))});var Jm;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Jm||(Jm={}));var Km;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(Km||(Km={}));function hS(r,e){let{target:n,replace:s,state:a,preventScrollReset:o,relative:c,unstable_viewTransition:d}=e===void 0?{}:e,f=un(),v=Er(),g=Ey(r,{relative:c});return I.useCallback(w=>{if(Kx(w,n)){w.preventDefault();let x=s!==void 0?s:zi(v)===zi(g);f(r,{replace:x,state:a,preventScrollReset:o,relative:c,unstable_viewTransition:d})}},[v,f,g,s,a,n,r,o,c,d])}let Ol;const fS=new Uint8Array(16);function pS(){if(!Ol&&(Ol=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ol))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ol(fS)}const Bt=[];for(let r=0;r<256;++r)Bt.push((r+256).toString(16).slice(1));function mS(r,e=0){return Bt[r[e+0]]+Bt[r[e+1]]+Bt[r[e+2]]+Bt[r[e+3]]+"-"+Bt[r[e+4]]+Bt[r[e+5]]+"-"+Bt[r[e+6]]+Bt[r[e+7]]+"-"+Bt[r[e+8]]+Bt[r[e+9]]+"-"+Bt[r[e+10]]+Bt[r[e+11]]+Bt[r[e+12]]+Bt[r[e+13]]+Bt[r[e+14]]+Bt[r[e+15]]}const gS=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Qm={randomUUID:gS};function bd(r,e,n){if(Qm.randomUUID&&!e&&!r)return Qm.randomUUID();r=r||{};const s=r.random||(r.rng||pS)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,mS(s)}const vS="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",yS="https://api.anthropic.com/v1",Il={MAX_REQUESTS_PER_MINUTE:50,COOLDOWN_MS:1200},xd={MAX_LENGTH:4e3,MODEL:"claude-2.1",TEMPERATURE:.7},_S=`You are Amia, an empathetic AI therapy companion. Your responses should be: +- Warm and supportive, using a gentle and understanding tone +- Non-judgmental and accepting of all emotions and experiences +- Professional yet approachable, maintaining appropriate boundaries +- Focused on emotional support and active listening +- Clear about your limitations as an AI, never providing medical advice or diagnoses + +When responding: +1. Acknowledge the user's feelings +2. Show empathy and understanding +3. Ask thoughtful follow-up questions +4. Offer supportive perspectives when appropriate +5. Encourage self-reflection and emotional awareness + +If you detect signs of crisis or serious mental health concerns, gently remind the user that you're an AI companion and encourage them to seek professional help.`;class wS{constructor(){Me(this,"tokens");Me(this,"lastRefill");this.tokens=Il.MAX_REQUESTS_PER_MINUTE,this.lastRefill=Date.now()}refillTokens(){const e=Date.now(),n=e-this.lastRefill,s=Math.floor(n/Il.COOLDOWN_MS);s>0&&(this.tokens=Math.min(Il.MAX_REQUESTS_PER_MINUTE,this.tokens+s),this.lastRefill=e)}async waitForToken(){return this.refillTokens(),this.tokens>0?(this.tokens--,Promise.resolve()):new Promise(e=>{setTimeout(()=>{this.refillTokens(),this.tokens--,e()},Il.COOLDOWN_MS)})}}const bS=new wS;class xS{constructor(){Me(this,"headers");this.headers={"Content-Type":"application/json",Authorization:`Bearer ${vS}`,"anthropic-version":"2023-06-01"}}async sendMessage(e){var n;await bS.waitForToken();try{const s=e.map(c=>({role:c.role==="assistant"?"assistant":"user",content:c.content})),a=await fetch(`${yS}/messages`,{method:"POST",headers:this.headers,body:JSON.stringify({model:xd.MODEL,messages:s,system:_S,max_tokens:xd.MAX_LENGTH,temperature:xd.TEMPERATURE})});if(!a.ok){const c=await a.json().catch(()=>({}));throw new Error(((n=c.error)==null?void 0:n.message)||`API request failed: ${a.status} ${a.statusText}`)}const o=await a.json();if(!o.content||!o.content[0]||!o.content[0].text)throw new Error("Invalid response format from Claude API");return o.content[0].text}catch(s){throw console.error("Claude API error:",s),s.message.includes("401")?new Error("Authentication failed. Please check API key configuration."):s.message.includes("429")?new Error("Too many requests. Please try again in a moment."):new Error("Failed to get response. Please try again.")}}}const SS=new xS,Ml="amia_conversations",$a={saveConversation(r){try{const e=this.getConversations();e[r.id]=r,localStorage.setItem(Ml,JSON.stringify(e))}catch(e){console.error("Failed to save conversation:",e)}},getConversations(){try{const r=localStorage.getItem(Ml);return r?JSON.parse(r):{}}catch(r){return console.error("Failed to get conversations:",r),{}}},getConversation(r){return this.getConversations()[r]||null},deleteConversation(r){try{const e=this.getConversations();delete e[r],localStorage.setItem(Ml,JSON.stringify(e))}catch(e){console.error("Failed to delete conversation:",e)}},clearConversations(){localStorage.removeItem(Ml)}};class ES{constructor(){Me(this,"conversationId",null);Me(this,"isConnected",!1)}async connect(){this.isConnected||(await this.startConversation(),this.isConnected=!0)}async disconnect(){this.isConnected&&(this.endConversation(),this.isConnected=!1)}async startConversation(){this.conversationId=bd();const e={id:this.conversationId,messages:[],createdAt:new Date,lastUpdated:new Date};$a.saveConversation(e)}async sendMessage(e){if(!this.isConnected||!this.conversationId)throw new Error("Not connected to chat service");const n=$a.getConversation(this.conversationId);if(!n)throw new Error("Conversation not found");const s={id:bd(),role:"user",content:e,timestamp:new Date};n.messages.push(s);try{const a=await SS.sendMessage(n.messages),o={id:bd(),role:"assistant",content:a,timestamp:new Date};return n.messages.push(o),n.lastUpdated=new Date,$a.saveConversation(n),o}catch(a){throw n.messages.pop(),$a.saveConversation(n),a}}endConversation(){this.conversationId=null}getCurrentConversation(){return this.conversationId?$a.getConversation(this.conversationId):null}isActive(){return this.isConnected}}const Ll=new ES,Ty=I.createContext(void 0),Ny={isConnected:!1,isLoading:!1,error:null,conversation:null};function kS(r,e){switch(e.type){case"CONNECT_START":return{...r,isLoading:!0,error:null};case"CONNECT_SUCCESS":return{...r,isConnected:!0,isLoading:!1};case"CONNECT_ERROR":return{...r,isLoading:!1,error:e.payload};case"DISCONNECT":return{...Ny};case"MESSAGE_START":return{...r,isLoading:!0};case"MESSAGE_SUCCESS":return{...r,isLoading:!1,conversation:r.conversation?{...r.conversation,messages:[...r.conversation.messages,e.payload]}:null};case"MESSAGE_ERROR":return{...r,isLoading:!1,error:e.payload};default:return r}}function CS({children:r}){const[e,n]=I.useReducer(kS,Ny);I.useEffect(()=>()=>{Ll.disconnect()},[]);const s=async()=>{n({type:"CONNECT_START"});try{await Ll.connect(),n({type:"CONNECT_SUCCESS"})}catch{n({type:"CONNECT_ERROR",payload:"Failed to connect"})}},a=async()=>{await Ll.disconnect(),n({type:"DISCONNECT"})},o=async c=>{n({type:"MESSAGE_START"});try{const d=await Ll.sendMessage(c);n({type:"MESSAGE_SUCCESS",payload:d})}catch{n({type:"MESSAGE_ERROR",payload:"Failed to send message"})}};return h.jsx(Ty.Provider,{value:{...e,connect:s,disconnect:a,sendMessage:o},children:r})}function jS(){const r=I.useContext(Ty);if(r===void 0)throw new Error("useChat must be used within a ChatProvider");return r}class Ay extends Error{constructor(e){super(e),this.name="VoiceServiceError"}}class Sd extends Ay{constructor(e){super(e),this.name="MicrophoneError"}}class oo extends Ay{constructor(e){super(e),this.name="ProcessingError"}}function TS(r){throw r.name==="NotAllowedError"?new Sd("Microphone access denied. Please grant microphone permissions."):r.name==="NotFoundError"?new Sd("No microphone found. Please connect a microphone and try again."):new Sd("Failed to initialize microphone. Please try again.")}const Xm="https://api.vapi.ai",Zm=`5e713d23-ee21-48ab-a08d-7d0d1634037f +VITE_ASSISTANT_ID=9c93e106-16d9-4d94-b31c-342f8b3cc80a`,NS="9c93e106-16d9-4d94-b31c-342f8b3cc80a",AS={echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,sampleRate:48e3,channelCount:1},PS={audioBitsPerSecond:128e3,mimeType:"audio/webm;codecs=opus"},RS={voice_id:"en-US-Neural2-H",speed:1,pitch:1};class As{static async initAudioContext(){return this.audioContext||(this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.gainNode=this.audioContext.createGain(),this.gainNode.gain.value=1,this.gainNode.connect(this.audioContext.destination)),this.audioContext.state==="suspended"&&await this.audioContext.resume(),this.audioContext}static async processAudio(e){try{const n=new FormData;n.append("audio",e,"recording.webm"),n.append("assistant_id",NS);const s=await fetch(`${Xm}/v1/audio/transcriptions`,{method:"POST",headers:{Authorization:`Bearer ${Zm}`},body:n});if(!s.ok)throw new Error(`Transcription failed: ${s.status}`);const a=await s.json(),o=await fetch(`${Xm}/v1/audio/speech`,{method:"POST",headers:{Authorization:`Bearer ${Zm}`,"Content-Type":"application/json"},body:JSON.stringify({text:a.text,...RS})});if(!o.ok)throw new Error(`Speech synthesis failed: ${o.status}`);const c=await o.blob(),d=URL.createObjectURL(c);return{text:a.text,audioUrl:d}}catch(n){throw console.error("Audio processing error:",n),new oo(n.message||"Failed to process audio")}}static async playResponse(e){try{return await this.initAudioContext(),this.cleanup(),this.audioElement=new Audio(e),this.audioElement.crossOrigin="anonymous",this.audioContext&&this.gainNode&&this.audioContext.createMediaElementSource(this.audioElement).connect(this.gainNode),await this.audioElement.play(),new Promise(n=>{this.audioElement&&(this.audioElement.onended=()=>{this.cleanup(),n()})})}catch(n){throw console.error("Audio playback error:",n),this.cleanup(),new oo("Failed to play audio response")}}static cleanup(){var e;this.audioElement&&(this.audioElement.pause(),this.audioElement.src="",this.audioElement=null),((e=this.audioContext)==null?void 0:e.state)==="running"&&this.audioContext.suspend()}}Me(As,"audioContext",null),Me(As,"audioElement",null),Me(As,"gainNode",null);class OS{constructor(e,n){Me(this,"mediaRecorder");Me(this,"chunks",[]);Me(this,"isActive",!1);if(!e.getAudioTracks().length)throw new oo("No audio track found in media stream");try{this.mediaRecorder=new MediaRecorder(e,{...PS,mimeType:MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm"}),this.setupEventHandlers(n),this.startRecording(),this.isActive=!0}catch{throw new oo("Failed to initialize media recorder")}}setupEventHandlers(e){this.mediaRecorder.ondataavailable=n=>{n.data.size>0&&this.chunks.push(n.data)},this.mediaRecorder.onstop=()=>{if(!this.isActive)return;if(this.chunks.length===0){e.onError(new Event("No audio data recorded"));return}const n=new Blob(this.chunks,{type:this.mediaRecorder.mimeType});this.chunks=[],e.onStop(n)},this.mediaRecorder.onerror=n=>{this.isActive=!1,e.onError(n)}}startRecording(){try{this.mediaRecorder.start(1e3)}catch{throw this.isActive=!1,new oo("Failed to start recording")}}stop(){var e;this.isActive&&((e=this.mediaRecorder)==null?void 0:e.state)!=="inactive"&&(this.isActive=!1,this.mediaRecorder.stop())}isRecording(){var e;return this.isActive&&((e=this.mediaRecorder)==null?void 0:e.state)==="recording"}}class IS{constructor(){Me(this,"stream",null);Me(this,"recorder",null);Me(this,"isProcessing",!1)}async startVoiceChat(){if(!(this.isProcessing||this.recorder))try{this.stream=await navigator.mediaDevices.getUserMedia({audio:AS});const e={onStop:async n=>{if(!this.isProcessing)try{this.isProcessing=!0;const s=await As.processAudio(n);await As.playResponse(s.audioUrl)}catch(s){throw console.error("Processing error:",s),s}finally{this.isProcessing=!1}},onError:n=>{console.error("MediaRecorder error:",n),this.stopVoiceChat()}};this.recorder=new OS(this.stream,e)}catch(e){this.cleanup(),TS(e)}}stopVoiceChat(){this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null),this.recorder&&(this.recorder.stop(),this.recorder=null),As.cleanup(),this.isProcessing=!1}cleanup(){this.stopVoiceChat()}}const eg=new IS,MS=I.createContext(void 0),LS={isListening:!1,isProcessing:!1,error:null};function DS(r,e){switch(e.type){case"START_LISTENING":return{...r,isListening:!0,error:null};case"STOP_LISTENING":return{...r,isListening:!1,isProcessing:!1};case"START_PROCESSING":return{...r,isProcessing:!0};case"STOP_PROCESSING":return{...r,isProcessing:!1};case"SET_ERROR":return{...r,error:e.payload,isListening:!1,isProcessing:!1};case"CLEAR_ERROR":return{...r,error:null};default:return r}}function FS({children:r}){const[e,n]=I.useReducer(DS,LS),s=I.useCallback(async()=>{n({type:"CLEAR_ERROR"}),n({type:"START_LISTENING"});try{await eg.startVoiceChat()}catch(o){n({type:"SET_ERROR",payload:o.message||"Failed to start voice chat"})}},[]),a=I.useCallback(()=>{try{eg.stopVoiceChat(),n({type:"STOP_LISTENING"})}catch(o){n({type:"SET_ERROR",payload:o.message||"Failed to stop voice chat"})}},[]);return h.jsx(MS.Provider,{value:{...e,startVoiceChat:s,stopVoiceChat:a},children:r})}const US="modulepreload",BS=function(r){return"/"+r},tg={},Bs=function(e,n,s){let a=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));a=Promise.allSettled(n.map(f=>{if(f=BS(f),f in tg)return;tg[f]=!0;const v=f.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const w=document.createElement("link");if(w.rel=v?"stylesheet":US,v||(w.as="script"),w.crossOrigin="",w.href=f,d&&w.setAttribute("nonce",d),document.head.appendChild(w),v)return new Promise((x,k)=>{w.addEventListener("load",x),w.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return a.then(c=>{for(const d of c||[])d.status==="rejected"&&o(d.reason);return e().catch(o)})},$S=r=>{let e;return r?e=r:typeof fetch>"u"?e=(...n)=>Bs(async()=>{const{default:s}=await Promise.resolve().then(()=>Hs);return{default:s}},void 0).then(({default:s})=>s(...n)):e=fetch,(...n)=>e(...n)};class Oh extends Error{constructor(e,n="FunctionsError",s){super(e),this.name=n,this.context=s}}class zS extends Oh{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class VS extends Oh{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class qS extends Oh{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Wd;(function(r){r.Any="any",r.ApNortheast1="ap-northeast-1",r.ApNortheast2="ap-northeast-2",r.ApSouth1="ap-south-1",r.ApSoutheast1="ap-southeast-1",r.ApSoutheast2="ap-southeast-2",r.CaCentral1="ca-central-1",r.EuCentral1="eu-central-1",r.EuWest1="eu-west-1",r.EuWest2="eu-west-2",r.EuWest3="eu-west-3",r.SaEast1="sa-east-1",r.UsEast1="us-east-1",r.UsWest1="us-west-1",r.UsWest2="us-west-2"})(Wd||(Wd={}));var GS=function(r,e,n,s){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function d(g){try{v(s.next(g))}catch(w){c(w)}}function f(g){try{v(s.throw(g))}catch(w){c(w)}}function v(g){g.done?o(g.value):a(g.value).then(d,f)}v((s=s.apply(r,e||[])).next())})};class YS{constructor(e,{headers:n={},customFetch:s,region:a=Wd.Any}={}){this.url=e,this.headers=n,this.region=a,this.fetch=$S(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,n={}){var s;return GS(this,void 0,void 0,function*(){try{const{headers:a,method:o,body:c}=n;let d={},{region:f}=n;f||(f=this.region),f&&f!=="any"&&(d["x-region"]=f);let v;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)&&(typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(d["Content-Type"]="application/octet-stream",v=c):typeof c=="string"?(d["Content-Type"]="text/plain",v=c):typeof FormData<"u"&&c instanceof FormData?v=c:(d["Content-Type"]="application/json",v=JSON.stringify(c)));const g=yield this.fetch(`${this.url}/${e}`,{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},d),this.headers),a),body:v}).catch(P=>{throw new zS(P)}),w=g.headers.get("x-relay-error");if(w&&w==="true")throw new VS(g);if(!g.ok)throw new qS(g);let x=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),k;return x==="application/json"?k=yield g.json():x==="application/octet-stream"?k=yield g.blob():x==="text/event-stream"?k=g:x==="multipart/form-data"?k=yield g.formData():k=yield g.text(),{data:k,error:null}}catch(a){return{data:null,error:a}}})}}var Ut={},za={},Va={},qa={},Ga={},Ya={},HS=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},$s=HS();const WS=$s.fetch,Py=$s.fetch.bind($s),Ry=$s.Headers,JS=$s.Request,KS=$s.Response,Hs=Object.freeze(Object.defineProperty({__proto__:null,Headers:Ry,Request:JS,Response:KS,default:Py,fetch:WS},Symbol.toStringTag,{value:"Module"})),QS=oy(Hs);var Dl={},ng;function Oy(){if(ng)return Dl;ng=1,Object.defineProperty(Dl,"__esModule",{value:!0});class r extends Error{constructor(n){super(n.message),this.name="PostgrestError",this.details=n.details,this.hint=n.hint,this.code=n.code}}return Dl.default=r,Dl}var rg;function Iy(){if(rg)return Ya;rg=1;var r=Ya.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ya,"__esModule",{value:!0});const e=r(QS),n=r(Oy());class s{constructor(o){this.shouldThrowOnError=!1,this.method=o.method,this.url=o.url,this.headers=o.headers,this.schema=o.schema,this.body=o.body,this.shouldThrowOnError=o.shouldThrowOnError,this.signal=o.signal,this.isMaybeSingle=o.isMaybeSingle,o.fetch?this.fetch=o.fetch:typeof fetch>"u"?this.fetch=e.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,c){return this.headers=Object.assign({},this.headers),this.headers[o]=c,this}then(o,c){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const d=this.fetch;let f=d(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async v=>{var g,w,x;let k=null,P=null,N=null,j=v.status,$=v.statusText;if(v.ok){if(this.method!=="HEAD"){const U=await v.text();U===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?P=U:P=JSON.parse(U))}const G=(g=this.headers.Prefer)===null||g===void 0?void 0:g.match(/count=(exact|planned|estimated)/),F=(w=v.headers.get("content-range"))===null||w===void 0?void 0:w.split("/");G&&F&&F.length>1&&(N=parseInt(F[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(P)&&(P.length>1?(k={code:"PGRST116",details:`Results contain ${P.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},P=null,N=null,j=406,$="Not Acceptable"):P.length===1?P=P[0]:P=null)}else{const G=await v.text();try{k=JSON.parse(G),Array.isArray(k)&&v.status===404&&(P=[],k=null,j=200,$="OK")}catch{v.status===404&&G===""?(j=204,$="No Content"):k={message:G}}if(k&&this.isMaybeSingle&&(!((x=k==null?void 0:k.details)===null||x===void 0)&&x.includes("0 rows"))&&(k=null,j=200,$="OK"),k&&this.shouldThrowOnError)throw new n.default(k)}return{error:k,data:P,count:N,status:j,statusText:$}});return this.shouldThrowOnError||(f=f.catch(v=>{var g,w,x;return{error:{message:`${(g=v==null?void 0:v.name)!==null&&g!==void 0?g:"FetchError"}: ${v==null?void 0:v.message}`,details:`${(w=v==null?void 0:v.stack)!==null&&w!==void 0?w:""}`,hint:"",code:`${(x=v==null?void 0:v.code)!==null&&x!==void 0?x:""}`},data:null,count:null,status:0,statusText:""}})),f.then(o,c)}}return Ya.default=s,Ya}var ig;function My(){if(ig)return Ga;ig=1;var r=Ga.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ga,"__esModule",{value:!0});const e=r(Iy());class n extends e.default{select(a){let o=!1;const c=(a??"*").split("").map(d=>/\s/.test(d)&&!o?"":(d==='"'&&(o=!o),d)).join("");return this.url.searchParams.set("select",c),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(a,{ascending:o=!0,nullsFirst:c,foreignTable:d,referencedTable:f=d}={}){const v=f?`${f}.order`:"order",g=this.url.searchParams.get(v);return this.url.searchParams.set(v,`${g?`${g},`:""}${a}.${o?"asc":"desc"}${c===void 0?"":c?".nullsfirst":".nullslast"}`),this}limit(a,{foreignTable:o,referencedTable:c=o}={}){const d=typeof c>"u"?"limit":`${c}.limit`;return this.url.searchParams.set(d,`${a}`),this}range(a,o,{foreignTable:c,referencedTable:d=c}={}){const f=typeof d>"u"?"offset":`${d}.offset`,v=typeof d>"u"?"limit":`${d}.limit`;return this.url.searchParams.set(f,`${a}`),this.url.searchParams.set(v,`${o-a+1}`),this}abortSignal(a){return this.signal=a,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:a=!1,verbose:o=!1,settings:c=!1,buffers:d=!1,wal:f=!1,format:v="text"}={}){var g;const w=[a?"analyze":null,o?"verbose":null,c?"settings":null,d?"buffers":null,f?"wal":null].filter(Boolean).join("|"),x=(g=this.headers.Accept)!==null&&g!==void 0?g:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${v}; for="${x}"; options=${w};`,v==="json"?this:this}rollback(){var a;return((a=this.headers.Prefer)!==null&&a!==void 0?a:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}return Ga.default=n,Ga}var sg;function Ih(){if(sg)return qa;sg=1;var r=qa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(qa,"__esModule",{value:!0});const e=r(My());class n extends e.default{eq(a,o){return this.url.searchParams.append(a,`eq.${o}`),this}neq(a,o){return this.url.searchParams.append(a,`neq.${o}`),this}gt(a,o){return this.url.searchParams.append(a,`gt.${o}`),this}gte(a,o){return this.url.searchParams.append(a,`gte.${o}`),this}lt(a,o){return this.url.searchParams.append(a,`lt.${o}`),this}lte(a,o){return this.url.searchParams.append(a,`lte.${o}`),this}like(a,o){return this.url.searchParams.append(a,`like.${o}`),this}likeAllOf(a,o){return this.url.searchParams.append(a,`like(all).{${o.join(",")}}`),this}likeAnyOf(a,o){return this.url.searchParams.append(a,`like(any).{${o.join(",")}}`),this}ilike(a,o){return this.url.searchParams.append(a,`ilike.${o}`),this}ilikeAllOf(a,o){return this.url.searchParams.append(a,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(a,o){return this.url.searchParams.append(a,`ilike(any).{${o.join(",")}}`),this}is(a,o){return this.url.searchParams.append(a,`is.${o}`),this}in(a,o){const c=Array.from(new Set(o)).map(d=>typeof d=="string"&&new RegExp("[,()]").test(d)?`"${d}"`:`${d}`).join(",");return this.url.searchParams.append(a,`in.(${c})`),this}contains(a,o){return typeof o=="string"?this.url.searchParams.append(a,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(a,`cs.{${o.join(",")}}`):this.url.searchParams.append(a,`cs.${JSON.stringify(o)}`),this}containedBy(a,o){return typeof o=="string"?this.url.searchParams.append(a,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(a,`cd.{${o.join(",")}}`):this.url.searchParams.append(a,`cd.${JSON.stringify(o)}`),this}rangeGt(a,o){return this.url.searchParams.append(a,`sr.${o}`),this}rangeGte(a,o){return this.url.searchParams.append(a,`nxl.${o}`),this}rangeLt(a,o){return this.url.searchParams.append(a,`sl.${o}`),this}rangeLte(a,o){return this.url.searchParams.append(a,`nxr.${o}`),this}rangeAdjacent(a,o){return this.url.searchParams.append(a,`adj.${o}`),this}overlaps(a,o){return typeof o=="string"?this.url.searchParams.append(a,`ov.${o}`):this.url.searchParams.append(a,`ov.{${o.join(",")}}`),this}textSearch(a,o,{config:c,type:d}={}){let f="";d==="plain"?f="pl":d==="phrase"?f="ph":d==="websearch"&&(f="w");const v=c===void 0?"":`(${c})`;return this.url.searchParams.append(a,`${f}fts${v}.${o}`),this}match(a){return Object.entries(a).forEach(([o,c])=>{this.url.searchParams.append(o,`eq.${c}`)}),this}not(a,o,c){return this.url.searchParams.append(a,`not.${o}.${c}`),this}or(a,{foreignTable:o,referencedTable:c=o}={}){const d=c?`${c}.or`:"or";return this.url.searchParams.append(d,`(${a})`),this}filter(a,o,c){return this.url.searchParams.append(a,`${o}.${c}`),this}}return qa.default=n,qa}var ag;function Ly(){if(ag)return Va;ag=1;var r=Va.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Va,"__esModule",{value:!0});const e=r(Ih());class n{constructor(a,{headers:o={},schema:c,fetch:d}){this.url=a,this.headers=o,this.schema=c,this.fetch=d}select(a,{head:o=!1,count:c}={}){const d=o?"HEAD":"GET";let f=!1;const v=(a??"*").split("").map(g=>/\s/.test(g)&&!f?"":(g==='"'&&(f=!f),g)).join("");return this.url.searchParams.set("select",v),c&&(this.headers.Prefer=`count=${c}`),new e.default({method:d,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(a,{count:o,defaultToNull:c=!0}={}){const d="POST",f=[];if(this.headers.Prefer&&f.push(this.headers.Prefer),o&&f.push(`count=${o}`),c||f.push("missing=default"),this.headers.Prefer=f.join(","),Array.isArray(a)){const v=a.reduce((g,w)=>g.concat(Object.keys(w)),[]);if(v.length>0){const g=[...new Set(v)].map(w=>`"${w}"`);this.url.searchParams.set("columns",g.join(","))}}return new e.default({method:d,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:this.fetch,allowEmpty:!1})}upsert(a,{onConflict:o,ignoreDuplicates:c=!1,count:d,defaultToNull:f=!0}={}){const v="POST",g=[`resolution=${c?"ignore":"merge"}-duplicates`];if(o!==void 0&&this.url.searchParams.set("on_conflict",o),this.headers.Prefer&&g.push(this.headers.Prefer),d&&g.push(`count=${d}`),f||g.push("missing=default"),this.headers.Prefer=g.join(","),Array.isArray(a)){const w=a.reduce((x,k)=>x.concat(Object.keys(k)),[]);if(w.length>0){const x=[...new Set(w)].map(k=>`"${k}"`);this.url.searchParams.set("columns",x.join(","))}}return new e.default({method:v,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:this.fetch,allowEmpty:!1})}update(a,{count:o}={}){const c="PATCH",d=[];return this.headers.Prefer&&d.push(this.headers.Prefer),o&&d.push(`count=${o}`),this.headers.Prefer=d.join(","),new e.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:this.fetch,allowEmpty:!1})}delete({count:a}={}){const o="DELETE",c=[];return a&&c.push(`count=${a}`),this.headers.Prefer&&c.unshift(this.headers.Prefer),this.headers.Prefer=c.join(","),new e.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}return Va.default=n,Va}var Ha={},Wa={},og;function XS(){return og||(og=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.version=void 0,Wa.version="0.0.0-automated"),Wa}var lg;function ZS(){if(lg)return Ha;lg=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.DEFAULT_HEADERS=void 0;const r=XS();return Ha.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${r.version}`},Ha}var cg;function eE(){if(cg)return za;cg=1;var r=za.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(za,"__esModule",{value:!0});const e=r(Ly()),n=r(Ih()),s=ZS();class a{constructor(c,{headers:d={},schema:f,fetch:v}={}){this.url=c,this.headers=Object.assign(Object.assign({},s.DEFAULT_HEADERS),d),this.schemaName=f,this.fetch=v}from(c){const d=new URL(`${this.url}/${c}`);return new e.default(d,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(c){return new a(this.url,{headers:this.headers,schema:c,fetch:this.fetch})}rpc(c,d={},{head:f=!1,get:v=!1,count:g}={}){let w;const x=new URL(`${this.url}/rpc/${c}`);let k;f||v?(w=f?"HEAD":"GET",Object.entries(d).filter(([N,j])=>j!==void 0).map(([N,j])=>[N,Array.isArray(j)?`{${j.join(",")}}`:`${j}`]).forEach(([N,j])=>{x.searchParams.append(N,j)})):(w="POST",k=d);const P=Object.assign({},this.headers);return g&&(P.Prefer=`count=${g}`),new n.default({method:w,url:x,headers:P,schema:this.schemaName,body:k,fetch:this.fetch,allowEmpty:!1})}}return za.default=a,za}var ug;function tE(){if(ug)return Ut;ug=1;var r=Ut.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.PostgrestError=Ut.PostgrestBuilder=Ut.PostgrestTransformBuilder=Ut.PostgrestFilterBuilder=Ut.PostgrestQueryBuilder=Ut.PostgrestClient=void 0;const e=r(eE());Ut.PostgrestClient=e.default;const n=r(Ly());Ut.PostgrestQueryBuilder=n.default;const s=r(Ih());Ut.PostgrestFilterBuilder=s.default;const a=r(My());Ut.PostgrestTransformBuilder=a.default;const o=r(Iy());Ut.PostgrestBuilder=o.default;const c=r(Oy());return Ut.PostgrestError=c.default,Ut.default={PostgrestClient:e.default,PostgrestQueryBuilder:n.default,PostgrestFilterBuilder:s.default,PostgrestTransformBuilder:a.default,PostgrestBuilder:o.default,PostgrestError:c.default},Ut}var nE=tE();const rE=bc(nE),{PostgrestClient:iE,PostgrestQueryBuilder:PT,PostgrestFilterBuilder:RT,PostgrestTransformBuilder:OT,PostgrestBuilder:IT,PostgrestError:MT}=rE,sE="2.11.3",aE={"X-Client-Info":`realtime-js/${sE}`},oE="1.0.0",Dy=1e4,lE=1e3;var Ps;(function(r){r[r.connecting=0]="connecting",r[r.open=1]="open",r[r.closing=2]="closing",r[r.closed=3]="closed"})(Ps||(Ps={}));var gn;(function(r){r.closed="closed",r.errored="errored",r.joined="joined",r.joining="joining",r.leaving="leaving"})(gn||(gn={}));var Un;(function(r){r.close="phx_close",r.error="phx_error",r.join="phx_join",r.reply="phx_reply",r.leave="phx_leave",r.access_token="access_token"})(Un||(Un={}));var Jd;(function(r){r.websocket="websocket"})(Jd||(Jd={}));var Mi;(function(r){r.Connecting="connecting",r.Open="open",r.Closing="closing",r.Closed="closed"})(Mi||(Mi={}));class cE{constructor(){this.HEADER_LENGTH=1}decode(e,n){return e.constructor===ArrayBuffer?n(this._binaryDecode(e)):n(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const n=new DataView(e),s=new TextDecoder;return this._decodeBroadcast(e,n,s)}_decodeBroadcast(e,n,s){const a=n.getUint8(1),o=n.getUint8(2);let c=this.HEADER_LENGTH+2;const d=s.decode(e.slice(c,c+a));c=c+a;const f=s.decode(e.slice(c,c+o));c=c+o;const v=JSON.parse(s.decode(e.slice(c,e.byteLength)));return{ref:null,topic:d,event:f,payload:v}}}class Fy{constructor(e,n){this.callback=e,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ze;(function(r){r.abstime="abstime",r.bool="bool",r.date="date",r.daterange="daterange",r.float4="float4",r.float8="float8",r.int2="int2",r.int4="int4",r.int4range="int4range",r.int8="int8",r.int8range="int8range",r.json="json",r.jsonb="jsonb",r.money="money",r.numeric="numeric",r.oid="oid",r.reltime="reltime",r.text="text",r.time="time",r.timestamp="timestamp",r.timestamptz="timestamptz",r.timetz="timetz",r.tsrange="tsrange",r.tstzrange="tstzrange"})(Ze||(Ze={}));const dg=(r,e,n={})=>{var s;const a=(s=n.skipTypes)!==null&&s!==void 0?s:[];return Object.keys(e).reduce((o,c)=>(o[c]=uE(c,r,e,a),o),{})},uE=(r,e,n,s)=>{const a=e.find(d=>d.name===r),o=a==null?void 0:a.type,c=n[r];return o&&!s.includes(o)?Uy(o,c):Kd(c)},Uy=(r,e)=>{if(r.charAt(0)==="_"){const n=r.slice(1,r.length);return pE(e,n)}switch(r){case Ze.bool:return dE(e);case Ze.float4:case Ze.float8:case Ze.int2:case Ze.int4:case Ze.int8:case Ze.numeric:case Ze.oid:return hE(e);case Ze.json:case Ze.jsonb:return fE(e);case Ze.timestamp:return mE(e);case Ze.abstime:case Ze.date:case Ze.daterange:case Ze.int4range:case Ze.int8range:case Ze.money:case Ze.reltime:case Ze.text:case Ze.time:case Ze.timestamptz:case Ze.timetz:case Ze.tsrange:case Ze.tstzrange:return Kd(e);default:return Kd(e)}},Kd=r=>r,dE=r=>{switch(r){case"t":return!0;case"f":return!1;default:return r}},hE=r=>{if(typeof r=="string"){const e=parseFloat(r);if(!Number.isNaN(e))return e}return r},fE=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(e){return console.log(`JSON parse error: ${e}`),r}return r},pE=(r,e)=>{if(typeof r!="string")return r;const n=r.length-1,s=r[n];if(r[0]==="{"&&s==="}"){let o;const c=r.slice(1,n);try{o=JSON.parse("["+c+"]")}catch{o=c?c.split(","):[]}return o.map(d=>Uy(e,d))}return r},mE=r=>typeof r=="string"?r.replace(" ","T"):r,By=r=>{let e=r;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")};class Ed{constructor(e,n,s={},a=Dy){this.channel=e,this.event=n,this.payload=s,this.timeout=a,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,n){var s;return this._hasReceived(e)&&n((s=this.receivedResp)===null||s===void 0?void 0:s.response),this.recHooks.push({status:e,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:n}){this.recHooks.filter(s=>s.status===e).forEach(s=>s.callback(n))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var hg;(function(r){r.SYNC="sync",r.JOIN="join",r.LEAVE="leave"})(hg||(hg={}));class lo{constructor(e,n){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const s=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(s.state,{},a=>{const{onJoin:o,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel._joinRef(),this.state=lo.syncState(this.state,a,o,c),this.pendingDiffs.forEach(f=>{this.state=lo.syncDiff(this.state,f,o,c)}),this.pendingDiffs=[],d()}),this.channel._on(s.diff,{},a=>{const{onJoin:o,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=lo.syncDiff(this.state,a,o,c),d())}),this.onJoin((a,o,c)=>{this.channel._trigger("presence",{event:"join",key:a,currentPresences:o,newPresences:c})}),this.onLeave((a,o,c)=>{this.channel._trigger("presence",{event:"leave",key:a,currentPresences:o,leftPresences:c})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,n,s,a){const o=this.cloneDeep(e),c=this.transformState(n),d={},f={};return this.map(o,(v,g)=>{c[v]||(f[v]=g)}),this.map(c,(v,g)=>{const w=o[v];if(w){const x=g.map(j=>j.presence_ref),k=w.map(j=>j.presence_ref),P=g.filter(j=>k.indexOf(j.presence_ref)<0),N=w.filter(j=>x.indexOf(j.presence_ref)<0);P.length>0&&(d[v]=P),N.length>0&&(f[v]=N)}else d[v]=g}),this.syncDiff(o,{joins:d,leaves:f},s,a)}static syncDiff(e,n,s,a){const{joins:o,leaves:c}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return s||(s=()=>{}),a||(a=()=>{}),this.map(o,(d,f)=>{var v;const g=(v=e[d])!==null&&v!==void 0?v:[];if(e[d]=this.cloneDeep(f),g.length>0){const w=e[d].map(k=>k.presence_ref),x=g.filter(k=>w.indexOf(k.presence_ref)<0);e[d].unshift(...x)}s(d,g,f)}),this.map(c,(d,f)=>{let v=e[d];if(!v)return;const g=f.map(w=>w.presence_ref);v=v.filter(w=>g.indexOf(w.presence_ref)<0),e[d]=v,a(d,v,f),v.length===0&&delete e[d]}),e}static map(e,n){return Object.getOwnPropertyNames(e).map(s=>n(s,e[s]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((n,s)=>{const a=e[s];return"metas"in a?n[s]=a.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[s]=a,n},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var fg;(function(r){r.ALL="*",r.INSERT="INSERT",r.UPDATE="UPDATE",r.DELETE="DELETE"})(fg||(fg={}));var pg;(function(r){r.BROADCAST="broadcast",r.PRESENCE="presence",r.POSTGRES_CHANGES="postgres_changes",r.SYSTEM="system"})(pg||(pg={}));var yr;(function(r){r.SUBSCRIBED="SUBSCRIBED",r.TIMED_OUT="TIMED_OUT",r.CLOSED="CLOSED",r.CHANNEL_ERROR="CHANNEL_ERROR"})(yr||(yr={}));class Mh{constructor(e,n={config:{}},s){this.topic=e,this.params=n,this.socket=s,this.bindings={},this.state=gn.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Ed(this,Un.join,this.params,this.timeout),this.rejoinTimer=new Fy(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=gn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=gn.closed,this.socket._remove(this)}),this._onError(a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=gn.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=gn.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Un.reply,{},(a,o)=>{this._trigger(this._replyEventName(o),a)}),this.presence=new lo(this),this.broadcastEndpointURL=By(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(e,n=this.timeout){var s,a;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:o,presence:c,private:d}}=this.params;this._onError(g=>e==null?void 0:e(yr.CHANNEL_ERROR,g)),this._onClose(()=>e==null?void 0:e(yr.CLOSED));const f={},v={broadcast:o,presence:c,postgres_changes:(a=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(g=>g.filter))!==null&&a!==void 0?a:[],private:d};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:v},f)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:g})=>{var w;if(this.socket.setAuth(),g===void 0){e==null||e(yr.SUBSCRIBED);return}else{const x=this.bindings.postgres_changes,k=(w=x==null?void 0:x.length)!==null&&w!==void 0?w:0,P=[];for(let N=0;N<k;N++){const j=x[N],{filter:{event:$,schema:K,table:G,filter:F}}=j,U=g&&g[N];if(U&&U.event===$&&U.schema===K&&U.table===G&&U.filter===F)P.push(Object.assign(Object.assign({},j),{id:U.id}));else{this.unsubscribe(),e==null||e(yr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=P,e&&e(yr.SUBSCRIBED);return}}).receive("error",g=>{e==null||e(yr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(g).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(yr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,s){return this._on(e,n,s)}async send(e,n={}){var s,a;if(!this._canPush()&&e.type==="broadcast"){const{event:o,payload:c}=e,f={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:c,private:this.private}]})};try{const v=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);return await((a=v.body)===null||a===void 0?void 0:a.cancel()),v.ok?"ok":"error"}catch(v){return v.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var c,d,f;const v=this._push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((f=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||f===void 0)&&f.ack)&&o("ok"),v.receive("ok",()=>o("ok")),v.receive("error",()=>o("error")),v.receive("timeout",()=>o("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=gn.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Un.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(s=>{const a=new Ed(this,Un.leave,{},e);a.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),a.send(),this._canPush()||a.trigger("ok",{})})}async _fetchWithTimeout(e,n,s){const a=new AbortController,o=setTimeout(()=>a.abort(),s),c=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:a.signal}));return clearTimeout(o),c}_push(e,n,s=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let a=new Ed(this,e,n,s);return this._canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}_onMessage(e,n,s){return n}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,n,s){var a,o;const c=e.toLocaleLowerCase(),{close:d,error:f,leave:v,join:g}=Un;if(s&&[d,f,v,g].indexOf(c)>=0&&s!==this._joinRef())return;let x=this._onMessage(c,n,s);if(n&&!x)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(c)?(a=this.bindings.postgres_changes)===null||a===void 0||a.filter(k=>{var P,N,j;return((P=k.filter)===null||P===void 0?void 0:P.event)==="*"||((j=(N=k.filter)===null||N===void 0?void 0:N.event)===null||j===void 0?void 0:j.toLocaleLowerCase())===c}).map(k=>k.callback(x,s)):(o=this.bindings[c])===null||o===void 0||o.filter(k=>{var P,N,j,$,K,G;if(["broadcast","presence","postgres_changes"].includes(c))if("id"in k){const F=k.id,U=(P=k.filter)===null||P===void 0?void 0:P.event;return F&&((N=n.ids)===null||N===void 0?void 0:N.includes(F))&&(U==="*"||(U==null?void 0:U.toLocaleLowerCase())===((j=n.data)===null||j===void 0?void 0:j.type.toLocaleLowerCase()))}else{const F=(K=($=k==null?void 0:k.filter)===null||$===void 0?void 0:$.event)===null||K===void 0?void 0:K.toLocaleLowerCase();return F==="*"||F===((G=n==null?void 0:n.event)===null||G===void 0?void 0:G.toLocaleLowerCase())}else return k.type.toLocaleLowerCase()===c}).map(k=>{if(typeof x=="object"&&"ids"in x){const P=x.data,{schema:N,table:j,commit_timestamp:$,type:K,errors:G}=P;x=Object.assign(Object.assign({},{schema:N,table:j,commit_timestamp:$,eventType:K,new:{},old:{},errors:G}),this._getPayloadRecords(P))}k.callback(x,s)})}_isClosed(){return this.state===gn.closed}_isJoined(){return this.state===gn.joined}_isJoining(){return this.state===gn.joining}_isLeaving(){return this.state===gn.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,n,s){const a=e.toLocaleLowerCase(),o={type:a,filter:n,callback:s};return this.bindings[a]?this.bindings[a].push(o):this.bindings[a]=[o],this}_off(e,n){const s=e.toLocaleLowerCase();return this.bindings[s]=this.bindings[s].filter(a=>{var o;return!(((o=a.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===s&&Mh.isEqual(a.filter,n))}),this}static isEqual(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const s in e)if(e[s]!==n[s])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Un.close,{},e)}_onError(e){this._on(Un.error,{},n=>e(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=gn.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=dg(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=dg(e.columns,e.old_record)),n}}const gE=()=>{},vE=typeof WebSocket<"u",yE=` + addEventListener("message", (e) => { + if (e.data.event === "start") { + setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); + } + });`;class _E{constructor(e,n){var s;this.accessTokenValue=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=aE,this.params={},this.timeout=Dy,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=gE,this.conn=null,this.sendBuffer=[],this.serializer=new cE,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=o=>{let c;return o?c=o:typeof fetch>"u"?c=(...d)=>Bs(async()=>{const{default:f}=await Promise.resolve().then(()=>Hs);return{default:f}},void 0).then(({default:f})=>f(...d)):c=fetch,(...d)=>c(...d)},this.endPoint=`${e}/${Jd.websocket}`,this.httpEndpoint=By(e),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const a=(s=n==null?void 0:n.params)===null||s===void 0?void 0:s.apikey;if(a&&(this.accessTokenValue=a,this.apiKey=a),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:o=>[1e3,2e3,5e3,1e4][o-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(o,c)=>c(JSON.stringify(o)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Fy(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch),n!=null&&n.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(n==null?void 0:n.worker)||!1,this.workerUrl=n==null?void 0:n.workerUrl}this.accessToken=(n==null?void 0:n.accessToken)||null}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection();return}if(vE){this.conn=new WebSocket(this.endpointURL()),this.setupConnection();return}this.conn=new wE(this.endpointURL(),void 0,{close:()=>{this.conn=null}}),Bs(async()=>{const{default:e}=await import("./browser-CKkwaJQG.js").then(n=>n.b);return{default:e}},[]).then(({default:e})=>{this.conn=new e(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:oE}))}disconnect(e,n){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),e}log(e,n,s){this.logger(e,n,s)}connectionState(){switch(this.conn&&this.conn.readyState){case Ps.connecting:return Mi.Connecting;case Ps.open:return Mi.Open;case Ps.closing:return Mi.Closing;default:return Mi.Closed}}isConnected(){return this.connectionState()===Mi.Open}channel(e,n={config:{}}){const s=new Mh(`realtime:${e}`,n,this);return this.channels.push(s),s}push(e){const{topic:n,event:s,payload:a,ref:o}=e,c=()=>{this.encode(e,d=>{var f;(f=this.conn)===null||f===void 0||f.send(d)})};this.log("push",`${n} ${s} (${o})`,a),this.isConnected()?c():this.sendBuffer.push(c)}async setAuth(e=null){let n=e||this.accessToken&&await this.accessToken()||this.accessTokenValue;if(n){let s=null;try{s=JSON.parse(atob(n.split(".")[1]))}catch{}if(s&&s.exp&&!(Math.floor(Date.now()/1e3)-s.exp<0))return this.log("auth",`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${s.exp}`),Promise.reject(`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${s.exp}`);this.accessTokenValue=n,this.channels.forEach(a=>{n&&a.updateJoinPayload({access_token:n}),a.joinedOnce&&a._isJoined()&&a._push(Un.access_token,{access_token:n})})}}async sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(lE,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth()}}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let n=this.channels.find(s=>s.topic===e&&(s._isJoined()||s._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${e}"`),n.unsubscribe())}_remove(e){this.channels=this.channels.filter(n=>n._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",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))}_onConnMessage(e){this.decode(e.data,n=>{let{topic:s,event:a,payload:o,ref:c}=n;c&&c===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${o.status||""} ${s} ${a} ${c&&"("+c+")"||""}`,o),this.channels.filter(d=>d._isMember(s)).forEach(d=>d._trigger(a,o,c)),this.stateChangeCallbacks.message.forEach(d=>d(n))})}async _onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);else{this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(Un.error))}_appendParams(e,n){if(Object.keys(n).length===0)return e;const s=e.match(/\?/)?"&":"?",a=new URLSearchParams(n);return`${e}${s}${a}`}_workerObjectUrl(e){let n;if(e)n=e;else{const s=new Blob([yE],{type:"application/javascript"});n=URL.createObjectURL(s)}return n}}class wE{constructor(e,n,s){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=Ps.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=s.close}}class Lh extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Rt(r){return typeof r=="object"&&r!==null&&"__isStorageError"in r}class bE extends Lh{constructor(e,n){super(e),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Qd extends Lh{constructor(e,n){super(e),this.name="StorageUnknownError",this.originalError=n}}var xE=function(r,e,n,s){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function d(g){try{v(s.next(g))}catch(w){c(w)}}function f(g){try{v(s.throw(g))}catch(w){c(w)}}function v(g){g.done?o(g.value):a(g.value).then(d,f)}v((s=s.apply(r,e||[])).next())})};const $y=r=>{let e;return r?e=r:typeof fetch>"u"?e=(...n)=>Bs(async()=>{const{default:s}=await Promise.resolve().then(()=>Hs);return{default:s}},void 0).then(({default:s})=>s(...n)):e=fetch,(...n)=>e(...n)},SE=()=>xE(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Bs(()=>Promise.resolve().then(()=>Hs),void 0)).Response:Response}),Xd=r=>{if(Array.isArray(r))return r.map(n=>Xd(n));if(typeof r=="function"||r!==Object(r))return r;const e={};return Object.entries(r).forEach(([n,s])=>{const a=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));e[a]=Xd(s)}),e};var Hi=function(r,e,n,s){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function d(g){try{v(s.next(g))}catch(w){c(w)}}function f(g){try{v(s.throw(g))}catch(w){c(w)}}function v(g){g.done?o(g.value):a(g.value).then(d,f)}v((s=s.apply(r,e||[])).next())})};const kd=r=>r.msg||r.message||r.error_description||r.error||JSON.stringify(r),EE=(r,e,n)=>Hi(void 0,void 0,void 0,function*(){const s=yield SE();r instanceof s&&!(n!=null&&n.noResolveJson)?r.json().then(a=>{e(new bE(kd(a),r.status||500))}).catch(a=>{e(new Qd(kd(a),a))}):e(new Qd(kd(r),r))}),kE=(r,e,n,s)=>{const a={method:r,headers:(e==null?void 0:e.headers)||{}};return r==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s&&(a.body=JSON.stringify(s)),Object.assign(Object.assign({},a),n))};function So(r,e,n,s,a,o){return Hi(this,void 0,void 0,function*(){return new Promise((c,d)=>{r(n,kE(e,s,a,o)).then(f=>{if(!f.ok)throw f;return s!=null&&s.noResolveJson?f:f.json()}).then(f=>c(f)).catch(f=>EE(f,d,s))})})}function uc(r,e,n,s){return Hi(this,void 0,void 0,function*(){return So(r,"GET",e,n,s)})}function ni(r,e,n,s,a){return Hi(this,void 0,void 0,function*(){return So(r,"POST",e,s,a,n)})}function CE(r,e,n,s,a){return Hi(this,void 0,void 0,function*(){return So(r,"PUT",e,s,a,n)})}function jE(r,e,n,s){return Hi(this,void 0,void 0,function*(){return So(r,"HEAD",e,Object.assign(Object.assign({},n),{noResolveJson:!0}),s)})}function zy(r,e,n,s,a){return Hi(this,void 0,void 0,function*(){return So(r,"DELETE",e,s,a,n)})}var an=function(r,e,n,s){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function d(g){try{v(s.next(g))}catch(w){c(w)}}function f(g){try{v(s.throw(g))}catch(w){c(w)}}function v(g){g.done?o(g.value):a(g.value).then(d,f)}v((s=s.apply(r,e||[])).next())})};const TE={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},mg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class NE{constructor(e,n={},s,a){this.url=e,this.headers=n,this.bucketId=s,this.fetch=$y(a)}uploadOrUpdate(e,n,s,a){return an(this,void 0,void 0,function*(){try{let o;const c=Object.assign(Object.assign({},mg),a);let d=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(c.upsert)});const f=c.metadata;typeof Blob<"u"&&s instanceof Blob?(o=new FormData,o.append("cacheControl",c.cacheControl),f&&o.append("metadata",this.encodeMetadata(f)),o.append("",s)):typeof FormData<"u"&&s instanceof FormData?(o=s,o.append("cacheControl",c.cacheControl),f&&o.append("metadata",this.encodeMetadata(f))):(o=s,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,f&&(d["x-metadata"]=this.toBase64(this.encodeMetadata(f)))),a!=null&&a.headers&&(d=Object.assign(Object.assign({},d),a.headers));const v=this._removeEmptyFolders(n),g=this._getFinalPath(v),w=yield this.fetch(`${this.url}/object/${g}`,Object.assign({method:e,body:o,headers:d},c!=null&&c.duplex?{duplex:c.duplex}:{})),x=yield w.json();return w.ok?{data:{path:v,id:x.Id,fullPath:x.Key},error:null}:{data:null,error:x}}catch(o){if(Rt(o))return{data:null,error:o};throw o}})}upload(e,n,s){return an(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,n,s)})}uploadToSignedUrl(e,n,s,a){return an(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(e),c=this._getFinalPath(o),d=new URL(this.url+`/object/upload/sign/${c}`);d.searchParams.set("token",n);try{let f;const v=Object.assign({upsert:mg.upsert},a),g=Object.assign(Object.assign({},this.headers),{"x-upsert":String(v.upsert)});typeof Blob<"u"&&s instanceof Blob?(f=new FormData,f.append("cacheControl",v.cacheControl),f.append("",s)):typeof FormData<"u"&&s instanceof FormData?(f=s,f.append("cacheControl",v.cacheControl)):(f=s,g["cache-control"]=`max-age=${v.cacheControl}`,g["content-type"]=v.contentType);const w=yield this.fetch(d.toString(),{method:"PUT",body:f,headers:g}),x=yield w.json();return w.ok?{data:{path:o,fullPath:x.Key},error:null}:{data:null,error:x}}catch(f){if(Rt(f))return{data:null,error:f};throw f}})}createSignedUploadUrl(e,n){return an(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e);const a=Object.assign({},this.headers);n!=null&&n.upsert&&(a["x-upsert"]="true");const o=yield ni(this.fetch,`${this.url}/object/upload/sign/${s}`,{},{headers:a}),c=new URL(this.url+o.url),d=c.searchParams.get("token");if(!d)throw new Lh("No token returned by API");return{data:{signedUrl:c.toString(),path:e,token:d},error:null}}catch(s){if(Rt(s))return{data:null,error:s};throw s}})}update(e,n,s){return an(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,n,s)})}move(e,n,s){return an(this,void 0,void 0,function*(){try{return{data:yield ni(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n,destinationBucket:s==null?void 0:s.destinationBucket},{headers:this.headers}),error:null}}catch(a){if(Rt(a))return{data:null,error:a};throw a}})}copy(e,n,s){return an(this,void 0,void 0,function*(){try{return{data:{path:(yield ni(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n,destinationBucket:s==null?void 0:s.destinationBucket},{headers:this.headers})).Key},error:null}}catch(a){if(Rt(a))return{data:null,error:a};throw a}})}createSignedUrl(e,n,s){return an(this,void 0,void 0,function*(){try{let a=this._getFinalPath(e),o=yield ni(this.fetch,`${this.url}/object/sign/${a}`,Object.assign({expiresIn:n},s!=null&&s.transform?{transform:s.transform}:{}),{headers:this.headers});const c=s!=null&&s.download?`&download=${s.download===!0?"":s.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${c}`)},{data:o,error:null}}catch(a){if(Rt(a))return{data:null,error:a};throw a}})}createSignedUrls(e,n,s){return an(this,void 0,void 0,function*(){try{const a=yield ni(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:e},{headers:this.headers}),o=s!=null&&s.download?`&download=${s.download===!0?"":s.download}`:"";return{data:a.map(c=>Object.assign(Object.assign({},c),{signedUrl:c.signedURL?encodeURI(`${this.url}${c.signedURL}${o}`):null})),error:null}}catch(a){if(Rt(a))return{data:null,error:a};throw a}})}download(e,n){return an(this,void 0,void 0,function*(){const a=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),c=o?`?${o}`:"";try{const d=this._getFinalPath(e);return{data:yield(yield uc(this.fetch,`${this.url}/${a}/${d}${c}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(d){if(Rt(d))return{data:null,error:d};throw d}})}info(e){return an(this,void 0,void 0,function*(){const n=this._getFinalPath(e);try{const s=yield uc(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Xd(s),error:null}}catch(s){if(Rt(s))return{data:null,error:s};throw s}})}exists(e){return an(this,void 0,void 0,function*(){const n=this._getFinalPath(e);try{return yield jE(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(s){if(Rt(s)&&s instanceof Qd){const a=s.originalError;if([400,404].includes(a==null?void 0:a.status))return{data:!1,error:s}}throw s}})}getPublicUrl(e,n){const s=this._getFinalPath(e),a=[],o=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";o!==""&&a.push(o);const d=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",f=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});f!==""&&a.push(f);let v=a.join("&");return v!==""&&(v=`?${v}`),{data:{publicUrl:encodeURI(`${this.url}/${d}/public/${s}${v}`)}}}remove(e){return an(this,void 0,void 0,function*(){try{return{data:yield zy(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(n){if(Rt(n))return{data:null,error:n};throw n}})}list(e,n,s){return an(this,void 0,void 0,function*(){try{const a=Object.assign(Object.assign(Object.assign({},TE),n),{prefix:e||""});return{data:yield ni(this.fetch,`${this.url}/object/list/${this.bucketId}`,a,{headers:this.headers},s),error:null}}catch(a){if(Rt(a))return{data:null,error:a};throw a}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const n=[];return e.width&&n.push(`width=${e.width}`),e.height&&n.push(`height=${e.height}`),e.resize&&n.push(`resize=${e.resize}`),e.format&&n.push(`format=${e.format}`),e.quality&&n.push(`quality=${e.quality}`),n.join("&")}}const AE="2.7.1",PE={"X-Client-Info":`storage-js/${AE}`};var Ss=function(r,e,n,s){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function d(g){try{v(s.next(g))}catch(w){c(w)}}function f(g){try{v(s.throw(g))}catch(w){c(w)}}function v(g){g.done?o(g.value):a(g.value).then(d,f)}v((s=s.apply(r,e||[])).next())})};class RE{constructor(e,n={},s){this.url=e,this.headers=Object.assign(Object.assign({},PE),n),this.fetch=$y(s)}listBuckets(){return Ss(this,void 0,void 0,function*(){try{return{data:yield uc(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(Rt(e))return{data:null,error:e};throw e}})}getBucket(e){return Ss(this,void 0,void 0,function*(){try{return{data:yield uc(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(n){if(Rt(n))return{data:null,error:n};throw n}})}createBucket(e,n={public:!1}){return Ss(this,void 0,void 0,function*(){try{return{data:yield ni(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(s){if(Rt(s))return{data:null,error:s};throw s}})}updateBucket(e,n){return Ss(this,void 0,void 0,function*(){try{return{data:yield CE(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(s){if(Rt(s))return{data:null,error:s};throw s}})}emptyBucket(e){return Ss(this,void 0,void 0,function*(){try{return{data:yield ni(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(Rt(n))return{data:null,error:n};throw n}})}deleteBucket(e){return Ss(this,void 0,void 0,function*(){try{return{data:yield zy(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(n){if(Rt(n))return{data:null,error:n};throw n}})}}class OE extends RE{constructor(e,n={},s){super(e,n,s)}from(e){return new NE(this.url,this.headers,e,this.fetch)}}const IE="2.39.3";let ro="";typeof Deno<"u"?ro="deno":typeof document<"u"?ro="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ro="react-native":ro="node";const ME={"X-Client-Info":`supabase-js-${ro}/${IE}`};var LE=function(r,e,n,s){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function d(g){try{v(s.next(g))}catch(w){c(w)}}function f(g){try{v(s.throw(g))}catch(w){c(w)}}function v(g){g.done?o(g.value):a(g.value).then(d,f)}v((s=s.apply(r,e||[])).next())})};const DE=r=>{let e;return r?e=r:typeof fetch>"u"?e=Py:e=fetch,(...n)=>e(...n)},FE=()=>typeof Headers>"u"?Ry:Headers,UE=(r,e,n)=>{const s=DE(n),a=FE();return(o,c)=>LE(void 0,void 0,void 0,function*(){var d;const f=(d=yield e())!==null&&d!==void 0?d:r;let v=new a(c==null?void 0:c.headers);return v.has("apikey")||v.set("apikey",r),v.has("Authorization")||v.set("Authorization",`Bearer ${f}`),s(o,Object.assign(Object.assign({},c),{headers:v}))})};function BE(r){return r.replace(/\/$/,"")}function $E(r,e){const{db:n,auth:s,realtime:a,global:o}=r,{db:c,auth:d,realtime:f,global:v}=e;return{db:Object.assign(Object.assign({},c),n),auth:Object.assign(Object.assign({},d),s),realtime:Object.assign(Object.assign({},f),a),global:Object.assign(Object.assign({},v),o)}}const Vy="2.67.3",zE="http://localhost:9999",VE="supabase.auth.token",qE={"X-Client-Info":`gotrue-js/${Vy}`},gg=10,Zd="X-Supabase-Api-Version",qy={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function GE(r){return Math.round(Date.now()/1e3)+r}function YE(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)})}const Xn=()=>typeof window<"u"&&typeof document<"u",Ni={tested:!1,writable:!1},co=()=>{if(!Xn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ni.tested)return Ni.writable;const r=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(r,r),globalThis.localStorage.removeItem(r),Ni.tested=!0,Ni.writable=!0}catch{Ni.tested=!0,Ni.writable=!1}return Ni.writable};function HE(r){const e={},n=new URL(r);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((a,o)=>{e[o]=a})}catch{}return n.searchParams.forEach((s,a)=>{e[a]=s}),e}const Gy=r=>{let e;return r?e=r:typeof fetch>"u"?e=(...n)=>Bs(async()=>{const{default:s}=await Promise.resolve().then(()=>Hs);return{default:s}},void 0).then(({default:s})=>s(...n)):e=fetch,(...n)=>e(...n)},WE=r=>typeof r=="object"&&r!==null&&"status"in r&&"ok"in r&&"json"in r&&typeof r.json=="function",Yy=async(r,e,n)=>{await r.setItem(e,JSON.stringify(n))},Fl=async(r,e)=>{const n=await r.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ul=async(r,e)=>{await r.removeItem(e)};function JE(r){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",s,a,o,c,d,f,v,g=0;for(r=r.replace("-","+").replace("_","/");g<r.length;)c=e.indexOf(r.charAt(g++)),d=e.indexOf(r.charAt(g++)),f=e.indexOf(r.charAt(g++)),v=e.indexOf(r.charAt(g++)),s=c<<2|d>>4,a=(d&15)<<4|f>>2,o=(f&3)<<6|v,n=n+String.fromCharCode(s),f!=64&&a!=0&&(n=n+String.fromCharCode(a)),v!=64&&o!=0&&(n=n+String.fromCharCode(o));return n}class kc{constructor(){this.promise=new kc.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}kc.promiseConstructor=Promise;function vg(r){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=r.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const s=n[1];return JSON.parse(JE(s))}async function KE(r){return await new Promise(e=>{setTimeout(()=>e(null),r)})}function QE(r,e){return new Promise((s,a)=>{(async()=>{for(let o=0;o<1/0;o++)try{const c=await r(o);if(!e(o,null,c)){s(c);return}}catch(c){if(!e(o,c)){a(c);return}}})()})}function XE(r){return("0"+r.toString(16)).substr(-2)}function ZE(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=n.length;let a="";for(let o=0;o<56;o++)a+=n.charAt(Math.floor(Math.random()*s));return a}return crypto.getRandomValues(e),Array.from(e,XE).join("")}async function ek(r){const n=new TextEncoder().encode(r),s=await crypto.subtle.digest("SHA-256",n),a=new Uint8Array(s);return Array.from(a).map(o=>String.fromCharCode(o)).join("")}function tk(r){return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function nk(r){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."),r;const n=await ek(r);return tk(n)}async function Es(r,e,n=!1){const s=ZE();let a=s;n&&(a+="/PASSWORD_RECOVERY"),await Yy(r,`${e}-code-verifier`,a);const o=await nk(s);return[o,s===o?"plain":"s256"]}const rk=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function ik(r){const e=r.headers.get(Zd);if(!e||!e.match(rk))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}class Dh extends Error{constructor(e,n,s){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=s}}function Pe(r){return typeof r=="object"&&r!==null&&"__isAuthError"in r}class sk extends Dh{constructor(e,n,s){super(e,n,s),this.name="AuthApiError",this.status=n,this.code=s}}function ak(r){return Pe(r)&&r.name==="AuthApiError"}class Hy extends Dh{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class Wi extends Dh{constructor(e,n,s,a){super(e,s,a),this.name=n,this.status=s}}class Zr extends Wi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ok(r){return Pe(r)&&r.name==="AuthSessionMissingError"}class Cd extends Wi{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Bl extends Wi{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class $l extends Wi{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function lk(r){return Pe(r)&&r.name==="AuthImplicitGrantRedirectError"}class yg extends Wi{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class eh extends Wi{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function jd(r){return Pe(r)&&r.name==="AuthRetryableFetchError"}class _g extends Wi{constructor(e,n,s){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=s}}var ck=function(r,e){var n={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&e.indexOf(s)<0&&(n[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(r);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(r,s[a])&&(n[s[a]]=r[s[a]]);return n};const Ri=r=>r.msg||r.message||r.error_description||r.error||JSON.stringify(r),uk=[502,503,504];async function wg(r){var e;if(!WE(r))throw new eh(Ri(r),0);if(uk.includes(r.status))throw new eh(Ri(r),r.status);let n;try{n=await r.json()}catch(o){throw new Hy(Ri(o),o)}let s;const a=ik(r);if(a&&a.getTime()>=qy["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?s=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(s=n.error_code),s){if(s==="weak_password")throw new _g(Ri(n),r.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(s==="session_not_found")throw new Zr}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((o,c)=>o&&typeof c=="string",!0))throw new _g(Ri(n),r.status,n.weak_password.reasons);throw new sk(Ri(n),r.status||500,s)}const dk=(r,e,n,s)=>{const a={method:r,headers:(e==null?void 0:e.headers)||{}};return r==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),a.body=JSON.stringify(s),Object.assign(Object.assign({},a),n))};async function Ue(r,e,n,s){var a;const o=Object.assign({},s==null?void 0:s.headers);o[Zd]||(o[Zd]=qy["2024-01-01"].name),s!=null&&s.jwt&&(o.Authorization=`Bearer ${s.jwt}`);const c=(a=s==null?void 0:s.query)!==null&&a!==void 0?a:{};s!=null&&s.redirectTo&&(c.redirect_to=s.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",f=await hk(r,e,n+d,{headers:o,noResolveJson:s==null?void 0:s.noResolveJson},{},s==null?void 0:s.body);return s!=null&&s.xform?s==null?void 0:s.xform(f):{data:Object.assign({},f),error:null}}async function hk(r,e,n,s,a,o){const c=dk(e,s,a,o);let d;try{d=await r(n,Object.assign({},c))}catch(f){throw console.error(f),new eh(Ri(f),0)}if(d.ok||await wg(d),s!=null&&s.noResolveJson)return d;try{return await d.json()}catch(f){await wg(f)}}function ei(r){var e;let n=null;gk(r)&&(n=Object.assign({},r),r.expires_at||(n.expires_at=GE(r.expires_in)));const s=(e=r.user)!==null&&e!==void 0?e:r;return{data:{session:n,user:s},error:null}}function bg(r){const e=ei(r);return!e.error&&r.weak_password&&typeof r.weak_password=="object"&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.message&&typeof r.weak_password.message=="string"&&r.weak_password.reasons.reduce((n,s)=>n&&typeof s=="string",!0)&&(e.data.weak_password=r.weak_password),e}function ai(r){var e;return{data:{user:(e=r.user)!==null&&e!==void 0?e:r},error:null}}function fk(r){return{data:r,error:null}}function pk(r){const{action_link:e,email_otp:n,hashed_token:s,redirect_to:a,verification_type:o}=r,c=ck(r,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:e,email_otp:n,hashed_token:s,redirect_to:a,verification_type:o},f=Object.assign({},c);return{data:{properties:d,user:f},error:null}}function mk(r){return r}function gk(r){return r.access_token&&r.refresh_token&&r.expires_in}var vk=function(r,e){var n={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&e.indexOf(s)<0&&(n[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(r);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(r,s[a])&&(n[s[a]]=r[s[a]]);return n};class yk{constructor({url:e="",headers:n={},fetch:s}){this.url=e,this.headers=n,this.fetch=Gy(s),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,n="global"){try{return await Ue(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Pe(s))return{data:null,error:s};throw s}}async inviteUserByEmail(e,n={}){try{return await Ue(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:ai})}catch(s){if(Pe(s))return{data:{user:null},error:s};throw s}}async generateLink(e){try{const{options:n}=e,s=vk(e,["options"]),a=Object.assign(Object.assign({},s),n);return"newEmail"in s&&(a.new_email=s==null?void 0:s.newEmail,delete a.newEmail),await Ue(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:a,headers:this.headers,xform:pk,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(Pe(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await Ue(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ai})}catch(n){if(Pe(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,s,a,o,c,d,f;try{const v={nextPage:null,lastPage:0,total:0},g=await Ue(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&s!==void 0?s:"",per_page:(o=(a=e==null?void 0:e.perPage)===null||a===void 0?void 0:a.toString())!==null&&o!==void 0?o:""},xform:mk});if(g.error)throw g.error;const w=await g.json(),x=(c=g.headers.get("x-total-count"))!==null&&c!==void 0?c:0,k=(f=(d=g.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return k.length>0&&(k.forEach(P=>{const N=parseInt(P.split(";")[0].split("=")[1].substring(0,1)),j=JSON.parse(P.split(";")[1].split("=")[1]);v[`${j}Page`]=N}),v.total=parseInt(x)),{data:Object.assign(Object.assign({},w),v),error:null}}catch(v){if(Pe(v))return{data:{users:[]},error:v};throw v}}async getUserById(e){try{return await Ue(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ai})}catch(n){if(Pe(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){try{return await Ue(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:ai})}catch(s){if(Pe(s))return{data:{user:null},error:s};throw s}}async deleteUser(e,n=!1){try{return await Ue(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:ai})}catch(s){if(Pe(s))return{data:{user:null},error:s};throw s}}async _listFactors(e){try{const{data:n,error:s}=await Ue(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:n,error:s}}catch(n){if(Pe(n))return{data:null,error:n};throw n}}async _deleteFactor(e){try{return{data:await Ue(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(Pe(n))return{data:null,error:n};throw n}}}const _k={getItem:r=>co()?globalThis.localStorage.getItem(r):null,setItem:(r,e)=>{co()&&globalThis.localStorage.setItem(r,e)},removeItem:r=>{co()&&globalThis.localStorage.removeItem(r)}};function xg(r={}){return{getItem:e=>r[e]||null,setItem:(e,n)=>{r[e]=n},removeItem:e=>{delete r[e]}}}function wk(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const ks={debug:!!(globalThis&&co()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Wy extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class bk extends Wy{}async function xk(r,e,n){ks.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",r,e);const s=new globalThis.AbortController;return e>0&&setTimeout(()=>{s.abort(),ks.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",r)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(r,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:s.signal},async a=>{if(a){ks.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",r,a.name);try{return await n()}finally{ks.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",r,a.name)}}else{if(e===0)throw ks.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",r),new bk(`Acquiring an exclusive Navigator LockManager lock "${r}" immediately failed`);if(ks.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}wk();const Sk={url:zE,storageKey:VE,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:qE,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Ja=30*1e3,Sg=3;async function Eg(r,e,n){return await n()}class mo{constructor(e){var n,s;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=mo.nextInstanceID,mo.nextInstanceID+=1,this.instanceID>0&&Xn()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const a=Object.assign(Object.assign({},Sk),e);if(this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.persistSession=a.persistSession,this.storageKey=a.storageKey,this.autoRefreshToken=a.autoRefreshToken,this.admin=new yk({url:a.url,headers:a.headers,fetch:a.fetch}),this.url=a.url,this.headers=a.headers,this.fetch=Gy(a.fetch),this.lock=a.lock||Eg,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,a.lock?this.lock=a.lock:Xn()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=xk:this.lock=Eg,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?a.storage?this.storage=a.storage:co()?this.storage=_k:(this.memoryStorage={},this.storage=xg(this.memoryStorage)):(this.memoryStorage={},this.storage=xg(this.memoryStorage)),Xn()&&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),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${Vy}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{const n=HE(window.location.href);let s="none";if(this._isImplicitGrantCallback(n)?s="implicit":await this._isPKCECallback(n)&&(s="pkce"),Xn()&&this.detectSessionInUrl&&s!=="none"){const{data:a,error:o}=await this._getSessionFromURL(n,s);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),lk(o)){const f=(e=o.details)===null||e===void 0?void 0:e.code;if(f==="identity_already_exists"||f==="identity_not_found"||f==="single_identity_not_deletable")return{error:o}}return await this._removeSession(),{error:o}}const{session:c,redirectType:d}=a;return this._debug("#_initialize()","detected session in URL",c,"redirect type",d),await this._saveSession(c),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return Pe(n)?{error:n}:{error:new Hy("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,s,a;try{const o=await Ue(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(a=e==null?void 0:e.options)===null||a===void 0?void 0:a.captchaToken}},xform:ei}),{data:c,error:d}=o;if(d||!c)return{data:{user:null,session:null},error:d};const f=c.session,v=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",f)),{data:{user:v,session:f},error:null}}catch(o){if(Pe(o))return{data:{user:null,session:null},error:o};throw o}}async signUp(e){var n,s,a;try{let o;if("email"in e){const{email:g,password:w,options:x}=e;let k=null,P=null;this.flowType==="pkce"&&([k,P]=await Es(this.storage,this.storageKey)),o=await Ue(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:x==null?void 0:x.emailRedirectTo,body:{email:g,password:w,data:(n=x==null?void 0:x.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:x==null?void 0:x.captchaToken},code_challenge:k,code_challenge_method:P},xform:ei})}else if("phone"in e){const{phone:g,password:w,options:x}=e;o=await Ue(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:g,password:w,data:(s=x==null?void 0:x.data)!==null&&s!==void 0?s:{},channel:(a=x==null?void 0:x.channel)!==null&&a!==void 0?a:"sms",gotrue_meta_security:{captcha_token:x==null?void 0:x.captchaToken}},xform:ei})}else throw new Bl("You must provide either an email or phone number and a password");const{data:c,error:d}=o;if(d||!c)return{data:{user:null,session:null},error:d};const f=c.session,v=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",f)),{data:{user:v,session:f},error:null}}catch(o){if(Pe(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(e){try{let n;if("email"in e){const{email:o,password:c,options:d}=e;n=await Ue(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:c,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:bg})}else if("phone"in e){const{phone:o,password:c,options:d}=e;n=await Ue(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:c,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:bg})}else throw new Bl("You must provide either an email or phone number and a password");const{data:s,error:a}=n;return a?{data:{user:null,session:null},error:a}:!s||!s.session||!s.user?{data:{user:null,session:null},error:new Cd}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:a})}catch(n){if(Pe(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(e){var n,s,a,o;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(a=e.options)===null||a===void 0?void 0:a.queryParams,skipBrowserRedirect:(o=e.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){const n=await Fl(this.storage,`${this.storageKey}-code-verifier`),[s,a]=(n??"").split("/");try{const{data:o,error:c}=await Ue(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:ei});if(await Ul(this.storage,`${this.storageKey}-code-verifier`),c)throw c;return!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new Cd}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:a??null}),error:c})}catch(o){if(Pe(o))return{data:{user:null,session:null,redirectType:null},error:o};throw o}}async signInWithIdToken(e){try{const{options:n,provider:s,token:a,access_token:o,nonce:c}=e,d=await Ue(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:a,access_token:o,nonce:c,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:ei}),{data:f,error:v}=d;return v?{data:{user:null,session:null},error:v}:!f||!f.session||!f.user?{data:{user:null,session:null},error:new Cd}:(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),{data:f,error:v})}catch(n){if(Pe(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(e){var n,s,a,o,c;try{if("email"in e){const{email:d,options:f}=e;let v=null,g=null;this.flowType==="pkce"&&([v,g]=await Es(this.storage,this.storageKey));const{error:w}=await Ue(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},create_user:(s=f==null?void 0:f.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:v,code_challenge_method:g},redirectTo:f==null?void 0:f.emailRedirectTo});return{data:{user:null,session:null},error:w}}if("phone"in e){const{phone:d,options:f}=e,{data:v,error:g}=await Ue(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(a=f==null?void 0:f.data)!==null&&a!==void 0?a:{},create_user:(o=f==null?void 0:f.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},channel:(c=f==null?void 0:f.channel)!==null&&c!==void 0?c:"sms"}});return{data:{user:null,session:null,messageId:v==null?void 0:v.message_id},error:g}}throw new Bl("You must provide either an email or phone number.")}catch(d){if(Pe(d))return{data:{user:null,session:null},error:d};throw d}}async verifyOtp(e){var n,s;try{let a,o;"options"in e&&(a=(n=e.options)===null||n===void 0?void 0:n.redirectTo,o=(s=e.options)===null||s===void 0?void 0:s.captchaToken);const{data:c,error:d}=await Ue(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:o}}),redirectTo:a,xform:ei});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const f=c.session,v=c.user;return f!=null&&f.access_token&&(await this._saveSession(f),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",f)),{data:{user:v,session:f},error:null}}catch(a){if(Pe(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithSSO(e){var n,s,a;try{let o=null,c=null;return this.flowType==="pkce"&&([o,c]=await Es(this.storage,this.storageKey)),await Ue(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:(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&s!==void 0?s:void 0}),!((a=e==null?void 0:e.options)===null||a===void 0)&&a.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:c}),headers:this.headers,xform:fk})}catch(o){if(Pe(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:s}=e;if(s)throw s;if(!n)throw new Zr;const{error:a}=await Ue(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:a}})}catch(e){if(Pe(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:s,type:a,options:o}=e,{error:c}=await Ue(this.fetch,"POST",n,{headers:this.headers,body:{email:s,type:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return{data:{user:null,session:null},error:c}}else if("phone"in e){const{phone:s,type:a,options:o}=e,{data:c,error:d}=await Ue(this.fetch,"POST",n,{headers:this.headers,body:{phone:s,type:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d}}throw new Bl("You must provide either an email or phone number and a type")}catch(n){if(Pe(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),a=(async()=>(await s,await n()))();return this.pendingInLock.push((async()=>{try{await a}catch{}})()),a}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=n();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const n=await Fl(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 valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const s=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.storage.isServer){let c=this.suppressGetSessionWarning;e=new Proxy(e,{get:(f,v,g)=>(!c&&v==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),c=!0,this.suppressGetSessionWarning=!0),Reflect.get(f,v,g))})}return{data:{session:e},error:null}}const{session:a,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{session:null},error:o}:{data:{session:a},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await Ue(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ai}):await this._useSession(async n=>{var s,a,o;const{data:c,error:d}=n;if(d)throw d;return!(!((s=c.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Zr}:await Ue(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(a=c.session)===null||a===void 0?void 0:a.access_token)!==null&&o!==void 0?o:void 0,xform:ai})})}catch(n){if(Pe(n))return ok(n)&&(await this._removeSession(),await Ul(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async s=>{const{data:a,error:o}=s;if(o)throw o;if(!a.session)throw new Zr;const c=a.session;let d=null,f=null;this.flowType==="pkce"&&e.email!=null&&([d,f]=await Es(this.storage,this.storageKey));const{data:v,error:g}=await Ue(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:d,code_challenge_method:f}),jwt:c.access_token,xform:ai});if(g)throw g;return c.user=v.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),{data:{user:c.user},error:null}})}catch(s){if(Pe(s))return{data:{user:null},error:s};throw s}}_decodeJWT(e){return vg(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Zr;const n=Date.now()/1e3;let s=n,a=!0,o=null;const c=vg(e.access_token);if(c.exp&&(s=c.exp,a=s<=n),a){const{session:d,error:f}=await this._callRefreshToken(e.refresh_token);if(f)return{data:{user:null,session:null},error:f};if(!d)return{data:{user:null,session:null},error:null};o=d}else{const{data:d,error:f}=await this._getUser(e.access_token);if(f)throw f;o={access_token:e.access_token,refresh_token:e.refresh_token,user:d.user,token_type:"bearer",expires_in:s-n,expires_at:s},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(n){if(Pe(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var s;if(!e){const{data:c,error:d}=n;if(d)throw d;e=(s=c.session)!==null&&s!==void 0?s:void 0}if(!(e!=null&&e.refresh_token))throw new Zr;const{session:a,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{user:null,session:null},error:o}:a?{data:{user:a.user,session:a},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(Pe(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(e,n){try{if(!Xn())throw new $l("No browser detected.");if(e.error||e.error_description||e.error_code)throw new $l(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 yg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new $l("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 yg("No code detected.");const{data:K,error:G}=await this._exchangeCodeForSession(e.code);if(G)throw G;const F=new URL(window.location.href);return F.searchParams.delete("code"),window.history.replaceState(window.history.state,"",F.toString()),{data:{session:K.session,redirectType:null},error:null}}const{provider_token:s,provider_refresh_token:a,access_token:o,refresh_token:c,expires_in:d,expires_at:f,token_type:v}=e;if(!o||!d||!c||!v)throw new $l("No session defined in URL");const g=Math.round(Date.now()/1e3),w=parseInt(d);let x=g+w;f&&(x=parseInt(f));const k=x-g;k*1e3<=Ja&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${k}s, should have been closer to ${w}s`);const P=x-w;g-P>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",P,x,g):g-P<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",P,x,g);const{data:N,error:j}=await this._getUser(o);if(j)throw j;const $={provider_token:s,provider_refresh_token:a,access_token:o,expires_in:w,expires_at:x,refresh_token:c,token_type:v,user:N.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:$,redirectType:e.type},error:null}}catch(s){if(Pe(s))return{data:{session:null,redirectType:null},error:s};throw s}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await Fl(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var s;const{data:a,error:o}=n;if(o)return{error:o};const c=(s=a.session)===null||s===void 0?void 0:s.access_token;if(c){const{error:d}=await this.admin.signOut(c,e);if(d&&!(ak(d)&&(d.status===404||d.status===401||d.status===403)))return{error:d}}return e!=="others"&&(await this._removeSession(),await Ul(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const n=YE(),s={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,s),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async n=>{var s,a;try{const{data:{session:o},error:c}=n;if(c)throw c;await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",e,"session",o)}catch(o){await((a=this.stateChangeEmitters.get(e))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",o),console.error(o)}})}async resetPasswordForEmail(e,n={}){let s=null,a=null;this.flowType==="pkce"&&([s,a]=await Es(this.storage,this.storageKey,!0));try{return await Ue(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:a,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(Pe(o))return{data:null,error:o};throw o}}async getUserIdentities(){var e;try{const{data:n,error:s}=await this.getUser();if(s)throw s;return{data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(n){if(Pe(n))return{data:null,error:n};throw n}}async linkIdentity(e){var n;try{const{data:s,error:a}=await this._useSession(async o=>{var c,d,f,v,g;const{data:w,error:x}=o;if(x)throw x;const k=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(c=e.options)===null||c===void 0?void 0:c.redirectTo,scopes:(d=e.options)===null||d===void 0?void 0:d.scopes,queryParams:(f=e.options)===null||f===void 0?void 0:f.queryParams,skipBrowserRedirect:!0});return await Ue(this.fetch,"GET",k,{headers:this.headers,jwt:(g=(v=w.session)===null||v===void 0?void 0:v.access_token)!==null&&g!==void 0?g:void 0})});if(a)throw a;return Xn()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),{data:{provider:e.provider,url:s==null?void 0:s.url},error:null}}catch(s){if(Pe(s))return{data:{provider:e.provider,url:null},error:s};throw s}}async unlinkIdentity(e){try{return await this._useSession(async n=>{var s,a;const{data:o,error:c}=n;if(c)throw c;return await Ue(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(a=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&a!==void 0?a:void 0})})}catch(n){if(Pe(n))return{data:null,error:n};throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const s=Date.now();return await QE(async a=>(a>0&&await KE(200*Math.pow(2,a-1)),this._debug(n,"refreshing attempt",a),await Ue(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:ei})),(a,o)=>{const c=200*Math.pow(2,a);return o&&jd(o)&&Date.now()+c-s<Ja})}catch(s){if(this._debug(n,"error",s),Pe(s))return{data:{session:null,user:null},error:s};throw s}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 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",s),Xn()&&!n.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Fl(this.storage,this.storageKey);if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const a=Math.round(Date.now()/1e3),o=((e=s.expires_at)!==null&&e!==void 0?e:1/0)<a+gg;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${gg}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:c}=await this._callRefreshToken(s.refresh_token);c&&(console.error(c),jd(c)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var n,s;if(!e)throw new Zr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const a=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(a,"begin");try{this.refreshingDeferred=new kc;const{data:o,error:c}=await this._refreshAccessToken(e);if(c)throw c;if(!o.session)throw new Zr;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const d={session:o.session,error:null};return this.refreshingDeferred.resolve(d),d}catch(o){if(this._debug(a,"error",o),Pe(o)){const c={session:null,error:o};return jd(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(c),c}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(o),o}finally{this.refreshingDeferred=null,this._debug(a,"end")}}async _notifyAllSubscribers(e,n,s=!0){const a=`#_notifyAllSubscribers(${e})`;this._debug(a,"begin",n,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:e,session:n});const o=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(e,n)}catch(f){o.push(f)}});if(await Promise.all(c),o.length>0){for(let d=0;d<o.length;d+=1)console.error(o[d]);throw o[0]}}finally{this._debug(a,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Yy(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await Ul(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Xn()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Ja);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async n=>{const{data:{session:s}}=n;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((s.expires_at*1e3-e)/Ja);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${Ja}ms, refresh threshold is ${Sg} ticks`),a<=Sg&&await this._callRefreshToken(s.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof Wy)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Xn()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,s){const a=[`provider=${encodeURIComponent(n)}`];if(s!=null&&s.redirectTo&&a.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s!=null&&s.scopes&&a.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[o,c]=await Es(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(c)}`});a.push(d.toString())}if(s!=null&&s.queryParams){const o=new URLSearchParams(s.queryParams);a.push(o.toString())}return s!=null&&s.skipBrowserRedirect&&a.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${a.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var s;const{data:a,error:o}=n;return o?{data:null,error:o}:await Ue(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(s=a==null?void 0:a.session)===null||s===void 0?void 0:s.access_token})})}catch(n){if(Pe(n))return{data:null,error:n};throw n}}async _enroll(e){try{return await this._useSession(async n=>{var s,a;const{data:o,error:c}=n;if(c)return{data:null,error:c};const d=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:f,error:v}=await Ue(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(s=o==null?void 0:o.session)===null||s===void 0?void 0:s.access_token});return v?{data:null,error:v}:(e.factorType==="totp"&&(!((a=f==null?void 0:f.totp)===null||a===void 0)&&a.qr_code)&&(f.totp.qr_code=`data:image/svg+xml;utf-8,${f.totp.qr_code}`),{data:f,error:null})})}catch(n){if(Pe(n))return{data:null,error:n};throw n}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var s;const{data:a,error:o}=n;if(o)return{data:null,error:o};const{data:c,error:d}=await Ue(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(s=a==null?void 0:a.session)===null||s===void 0?void 0:s.access_token});return d?{data:null,error:d}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+c.expires_in},c)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",c),{data:c,error:d})})}catch(n){if(Pe(n))return{data:null,error:n};throw n}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var s;const{data:a,error:o}=n;return o?{data:null,error:o}:await Ue(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(s=a==null?void 0:a.session)===null||s===void 0?void 0:s.access_token})})}catch(n){if(Pe(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(e){const{data:n,error:s}=await this._challenge({factorId:e.factorId});return s?{data:null,error:s}:await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){const{data:{user:e},error:n}=await this.getUser();if(n)return{data:null,error:n};const s=(e==null?void 0:e.factors)||[],a=s.filter(c=>c.factor_type==="totp"&&c.status==="verified"),o=s.filter(c=>c.factor_type==="phone"&&c.status==="verified");return{data:{all:s,totp:a,phone:o},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var n,s;const{data:{session:a},error:o}=e;if(o)return{data:null,error:o};if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const c=this._decodeJWT(a.access_token);let d=null;c.aal&&(d=c.aal);let f=d;((s=(n=a.user.factors)===null||n===void 0?void 0:n.filter(w=>w.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(f="aal2");const g=c.amr||[];return{data:{currentLevel:d,nextLevel:f,currentAuthenticationMethods:g},error:null}}))}}mo.nextInstanceID=0;class Ek extends mo{constructor(e){super(e)}}var kk=function(r,e,n,s){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function d(g){try{v(s.next(g))}catch(w){c(w)}}function f(g){try{v(s.throw(g))}catch(w){c(w)}}function v(g){g.done?o(g.value):a(g.value).then(d,f)}v((s=s.apply(r,e||[])).next())})};const Ck={headers:ME},jk={schema:"public"},Tk={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Nk={};class Ak{constructor(e,n,s){var a,o,c,d,f,v,g,w;if(this.supabaseUrl=e,this.supabaseKey=n,this.from=j=>this.rest.from(j),this.schema=j=>this.rest.schema(j),this.rpc=(j,$={},K)=>this.rest.rpc(j,$,K),!e)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const x=BE(e);this.realtimeUrl=`${x}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${x}/auth/v1`,this.storageUrl=`${x}/storage/v1`,this.functionsUrl=`${x}/functions/v1`;const k=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,P={db:jk,realtime:Nk,auth:Object.assign(Object.assign({},Tk),{storageKey:k}),global:Ck},N=$E(s??{},P);this.storageKey=(o=(a=N.auth)===null||a===void 0?void 0:a.storageKey)!==null&&o!==void 0?o:"",this.headers=(d=(c=N.global)===null||c===void 0?void 0:c.headers)!==null&&d!==void 0?d:{},this.auth=this._initSupabaseAuthClient((f=N.auth)!==null&&f!==void 0?f:{},this.headers,(v=N.global)===null||v===void 0?void 0:v.fetch),this.fetch=UE(n,this._getAccessToken.bind(this),(g=N.global)===null||g===void 0?void 0:g.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},N.realtime)),this.rest=new iE(`${x}/rest/v1`,{headers:this.headers,schema:(w=N.db)===null||w===void 0?void 0:w.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new YS(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new OE(this.storageUrl,this.headers,this.fetch)}channel(e,n={config:{}}){return this.realtime.channel(e,n)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,n;return kk(this,void 0,void 0,function*(){const{data:s}=yield this.auth.getSession();return(n=(e=s.session)===null||e===void 0?void 0:e.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:n,detectSessionInUrl:s,storage:a,storageKey:o,flowType:c,debug:d},f,v){const g={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Ek({url:this.authUrl,headers:Object.assign(Object.assign({},g),f),storageKey:o,autoRefreshToken:e,persistSession:n,detectSessionInUrl:s,storage:a,flowType:c,debug:d,fetch:v})}_initRealtimeClient(e){return new _E(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,s)=>{this._handleTokenChanged(n,"CLIENT",s==null?void 0:s.access_token)})}_handleTokenChanged(e,n,s){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==s?(this.realtime.setAuth(s??null),this.changedAccessToken=s):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const Jy=(r,e,n)=>new Ak(r,e,n),Pk="https://ipglysqeeyiejlxhawmk.supabase.co",Rk="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlwZ2x5c3FlZXlpZWpseGhhd21rIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzQ2MjQ5NDksImV4cCI6MjA1MDIwMDk0OX0.6Vd8EARloY8J4LnJBf0ibEAq7Fw9K07JOEkMkbEZ2RI",Qt=Jy(Pk,Rk,{auth:{persistSession:!0,autoRefreshToken:!0,detectSessionInUrl:!0}});function Ok(){const r=I.useCallback(async(a,o,c,d,f)=>{const{data:v,error:g}=await Qt.auth.signUp({email:a,password:o,options:{data:{firstName:c}}});if(g)throw g;if(v.user){const{error:w}=await Qt.from("users").insert([{id:v.user.id,email:a,first_name:c,birth_year:d,country:f,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}]);if(w)throw w}return v},[]),e=I.useCallback(async(a,o)=>{const{data:c,error:d}=await Qt.auth.signInWithPassword({email:a,password:o});if(d)throw d;return c},[]),n=I.useCallback(async()=>{const{error:a}=await Qt.auth.signOut();if(a)throw a},[]),s=I.useCallback(async a=>{const{data:o,error:c}=await Qt.auth.signInWithIdToken({provider:"google",token:a});if(c)throw c;return o},[]);return{signUp:r,signIn:e,signOut:n,signInWithGoogle:s}}const Ky=I.createContext(void 0);function Ik({children:r}){const e=un(),[n,s]=I.useState(!1),[a,o]=I.useState(null),[c,d]=I.useState(!0),[f,v]=I.useState(null),{signUp:g,signIn:w,signOut:x}=Ok();I.useEffect(()=>{const G=localStorage.getItem("currentUser");if(G){const F=JSON.parse(G);o(F),s(!0)}d(!1)},[]);const k=I.useCallback(async(G,F,U)=>{try{const{user:A}=await g(G,F,U);if(A){const H={id:A.id,firstName:U,email:A.email,sessionsUsed:0};o(H),s(!0),localStorage.setItem("currentUser",JSON.stringify(H)),e("/product")}}catch(A){throw console.error("Registration error:",A),new Error(A.message||"Failed to register")}},[g,e]),P=I.useCallback(async(G,F)=>{try{const{user:U}=await w(G,F);if(U){const{data:A,error:H}=await Qt.from("users").select("*").eq("id",U.id).single();if(H)throw H;const te={id:U.id,firstName:A.first_name,email:U.email,sessionsUsed:A.sessions_used||0,subscription:A.subscription};o(te),s(!0),localStorage.setItem("currentUser",JSON.stringify(te)),e("/product")}}catch(U){throw console.error("Login error:",U),new Error(U.message||"Failed to login")}},[w,e]),N=I.useCallback(async()=>{try{await x(),o(null),s(!1),localStorage.removeItem("currentUser"),e("/")}catch(G){console.error("Logout error:",G),v(G.message)}},[x,e]),j=I.useCallback(async()=>{throw new Error("Google authentication is not available")},[]),$=I.useCallback(async G=>{if(a)try{const{error:F}=await Qt.from("users").update({first_name:G.firstName,updated_at:new Date().toISOString()}).eq("id",a.id);if(F)throw F;const U={...a,...G};o(U),localStorage.setItem("currentUser",JSON.stringify(U))}catch(F){throw console.error("Profile update error:",F),new Error(F.message||"Failed to update profile")}},[a]),K={isAuthenticated:n,user:a,loading:c,register:k,login:P,loginWithGoogle:j,logout:N,error:f,updateUserProfile:$};return h.jsx(Ky.Provider,{value:K,children:r})}function Ot(){const r=I.useContext(Ky);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r}/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var Mk={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"};/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lk=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),It=(r,e)=>{const n=I.forwardRef(({color:s="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:d="",children:f,...v},g)=>I.createElement("svg",{ref:g,...Mk,width:a,height:a,stroke:s,strokeWidth:c?Number(o)*24/Number(a):o,className:["lucide",`lucide-${Lk(r)}`,d].join(" "),...v},[...e.map(([w,x])=>I.createElement(w,x)),...Array.isArray(f)?f:[f]]));return n.displayName=`${r}`,n};/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nr=It("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dk=It("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fk=It("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Uk=It("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Td=It("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bk=It("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $k=It("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zk=It("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vk=It("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"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fi=It("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qk=It("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Gk=It("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Yk=It("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hk=It("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wk=It("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jk=It("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kk=It("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pi=It("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);class Qk extends I.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,n){console.error("Error caught by boundary:",e,n)}render(){return this.state.hasError?h.jsxs("div",{className:"min-h-screen bg-white flex flex-col items-center justify-center p-4",children:[h.jsx(nr,{className:"w-16 h-16 text-[#2C5C9D] mb-6"}),h.jsx("h1",{className:"text-2xl font-bold text-[#333333] mb-4",children:"Oops! Something went wrong"}),h.jsx("p",{className:"text-[#555555] mb-8 text-center max-w-md",children:"We're sorry for the inconvenience. Please try refreshing the page or return to the homepage."}),h.jsx(cn,{to:"/",className:"bg-[#2C5C9D] text-white px-6 py-2 rounded-lg hover:bg-[#234B82] transition-colors",children:"Return Home"})]}):this.props.children}}function Xk(){return h.jsx(Qk,{children:h.jsx(Ik,{children:h.jsx(Gx,{})})})}function kg({variant:r="primary",className:e="",onClick:n}){const s=un(),a="inline-flex items-center gap-2 font-semibold transition-all",o={primary:"bg-[#2C5C9D] text-white px-6 py-3 rounded-lg hover:bg-[#234B82]",secondary:"text-[#2C5C9D] hover:text-[#234B82]"};return h.jsx("button",{onClick:n||(()=>s("/pricing")),className:`${a} ${o[r]} ${e}`,children:"Get Amia Pro"})}function Cg(){const{user:r,logout:e}=Ot(),n=un(),[s,a]=I.useState(!1),o=I.useRef(null);if(!(r!=null&&r.firstName))return null;const c=r.firstName.charAt(0).toUpperCase();I.useEffect(()=>{function v(g){o.current&&!o.current.contains(g.target)&&a(!1)}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[]);const d=()=>{n("/account"),a(!1)},f=()=>{e(),a(!1)};return h.jsxs("div",{className:"relative",ref:o,children:[h.jsx("button",{onClick:()=>a(!s),className:"w-8 h-8 rounded-full bg-[#2C5C9D] text-white flex items-center justify-center font-semibold hover:bg-[#234B82] transition-colors",children:c}),s&&h.jsx("div",{className:"absolute right-0 mt-2 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5",children:h.jsxs("div",{className:"py-1",children:[h.jsxs("button",{onClick:d,className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[h.jsx(Kk,{className:"w-4 h-4 mr-2"}),"Account"]}),h.jsxs("button",{onClick:f,className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[h.jsx(zk,{className:"w-4 h-4 mr-2"}),"Log Out"]})]})})]})}function Cc(){const r=un(),{isAuthenticated:e}=Ot(),[n,s]=I.useState(!1),a=Er(),o=()=>s(!n),c=a.pathname==="/pricing";return h.jsx("header",{className:"sticky top-0 w-full bg-white/80 backdrop-blur-sm z-50 border-b border-gray-100",children:h.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[h.jsxs("div",{className:"flex justify-between items-center h-16",children:[h.jsxs(cn,{to:"/",className:"flex items-center",children:[h.jsx(nr,{className:"h-8 w-8 text-[#2C5C9D]"}),h.jsx("span",{className:"ml-2 text-xl font-bold text-[#333333]",children:"Amia"})]}),h.jsx("button",{onClick:o,className:"md:hidden p-2 rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-100",children:n?h.jsx(pi,{className:"h-6 w-6"}):h.jsx(Vk,{className:"h-6 w-6"})}),h.jsxs("nav",{className:"hidden md:flex items-center space-x-6",children:[!c&&h.jsx(kg,{variant:"secondary"}),e?h.jsx(Cg,{}):h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>r("/login"),className:"font-semibold text-[#555555] hover:text-[#2C5C9D] transition-colors",children:"Log In"}),h.jsx("button",{onClick:()=>r("/register"),className:"font-semibold bg-[#2C5C9D] text-white px-4 py-2 rounded-lg hover:bg-[#234B82] transition-all hover:shadow-lg",children:"Sign Up"})]})]})]}),n&&h.jsx("div",{className:"md:hidden",children:h.jsxs("div",{className:"px-2 pt-2 pb-3 space-y-1",children:[!c&&h.jsx(kg,{variant:"secondary",className:"w-full text-center"}),e?h.jsx("div",{className:"flex justify-center py-2",children:h.jsx(Cg,{})}):h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>{r("/login"),s(!1)},className:"block w-full text-center py-2 font-semibold text-[#555555] hover:text-[#2C5C9D] transition-colors",children:"Log In"}),h.jsx("button",{onClick:()=>{r("/register"),s(!1)},className:"block w-full text-center font-semibold bg-[#2C5C9D] text-white px-4 py-2 rounded-lg hover:bg-[#234B82] transition-all hover:shadow-lg",children:"Sign Up"})]})]})})]})})}function Zk({className:r="w-6 h-6"}){return h.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:r,fill:"currentColor",children:h.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function jc(){const r=un(),e=Er(),{isAuthenticated:n,user:s}=Ot(),a=new Date().getFullYear(),o=e.pathname==="/product",c=e.pathname==="/pricing";e.pathname;const d=o&&(!(s!=null&&s.subscription)||(s==null?void 0:s.subscription)==="free"),f=()=>{r(n?"/product":"/register")};return h.jsx("footer",{className:"bg-white border-t border-gray-100",children:h.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:[(d||!o&&!c)&&h.jsxs("div",{className:"grid grid-cols-3 items-center mb-4",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx(nr,{className:"h-6 w-6 text-[#2C5C9D]"}),h.jsx("span",{className:"ml-2 text-lg font-bold text-[#333333]",children:"Amia"})]}),h.jsx("div",{className:"flex justify-center",children:d?h.jsx("button",{onClick:()=>r("/pricing"),className:"bg-[#2C5C9D] text-white px-6 py-2 rounded-lg hover:bg-[#234B82] transition-all hover:shadow-lg font-medium",children:"Get Amia Pro"}):!o&&!c&&h.jsx("button",{onClick:f,className:"bg-[#2C5C9D] text-white px-6 py-2 rounded-lg hover:bg-[#234B82] transition-all hover:shadow-lg",children:n?"Continue your journey":"Try Amia for Free"})}),h.jsx("div",{})," "]}),h.jsxs("div",{className:"grid grid-cols-3 items-center gap-4",children:[h.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[h.jsx("a",{href:"/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-[#555555] hover:text-[#2C5C9D] transition-colors",children:"Privacy Policy"}),h.jsx("a",{href:"/terms",target:"_blank",rel:"noopener noreferrer",className:"text-[#555555] hover:text-[#2C5C9D] transition-colors",children:"Terms of Service"}),h.jsx("a",{href:"/disclaimer",target:"_blank",rel:"noopener noreferrer",className:"text-[#555555] hover:text-[#2C5C9D] transition-colors",children:"AI Disclaimer"})]}),h.jsxs("div",{className:"flex justify-center gap-4",children:[h.jsx("a",{href:"https://instagram.com",target:"_blank",rel:"noopener noreferrer",className:"text-[#555555] hover:text-[#2C5C9D] transition-colors","aria-label":"Follow us on Instagram",children:h.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"})})}),h.jsx("a",{href:"https://x.com",target:"_blank",rel:"noopener noreferrer",className:"text-[#555555] hover:text-[#2C5C9D] transition-colors","aria-label":"Follow us on X (formerly Twitter)",children:h.jsx(Zk,{className:"w-5 h-5"})})]}),h.jsxs("div",{className:"text-sm text-[#555555] text-right",children:[a," Amia. All rights reserved."]})]})]})})}var Qy=(r=>(r.TRANSCRIPT="transcript",r.FUNCTION_CALL="function-call",r.FUNCTION_CALL_RESULT="function-call-result",r.ADD_MESSAGE="add-message",r))(Qy||{}),Xy=(r=>(r.PARTIAL="partial",r.FINAL="final",r))(Xy||{}),Ka={};function Nd(r,e){if(r==null)return{};var n,s,a=function(c,d){if(c==null)return{};var f,v,g={},w=Object.keys(c);for(v=0;v<w.length;v++)f=w[v],d.indexOf(f)>=0||(g[f]=c[f]);return g}(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(s=0;s<o.length;s++)n=o[s],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(a[n]=r[n])}return a}function zn(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(r){return tt=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},tt(r)}function Zy(r){var e=function(n,s){if(tt(n)!=="object"||n===null)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var o=a.call(n,s||"default");if(tt(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(n)}(r,"string");return tt(e)==="symbol"?e:String(e)}function jg(r,e){for(var n=0;n<e.length;n++){var s=e[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,Zy(s.key),s)}}function Vn(r,e,n){return e&&jg(r.prototype,e),n&&jg(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function mr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function go(r,e){return go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},go(r,e)}function Tc(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&go(r,e)}function Nc(r,e){if(e&&(tt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mr(r)}function Bn(r){return Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bn(r)}function ri(r,e,n){return(e=Zy(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Tg(r,e,n,s,a,o,c){try{var d=r[o](c),f=d.value}catch(v){return void n(v)}d.done?e(f):Promise.resolve(f).then(s,a)}function je(r){return function(){var e=this,n=arguments;return new Promise(function(s,a){var o=r.apply(e,n);function c(f){Tg(o,s,a,c,d,"next",f)}function d(f){Tg(o,s,a,c,d,"throw",f)}c(void 0)})}}function Ng(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,s=new Array(e);n<e;n++)s[n]=r[n];return s}function Vi(r,e){return function(n){if(Array.isArray(n))return n}(r)||function(n,s){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,c,d,f,v=[],g=!0,w=!1;try{if(d=(a=a.call(n)).next,s===0){if(Object(a)!==a)return;g=!1}else for(;!(g=(o=d.call(a)).done)&&(v.push(o.value),v.length!==s);g=!0);}catch(x){w=!0,c=x}finally{try{if(!g&&a.return!=null&&(f=a.return(),Object(f)!==f))return}finally{if(w)throw c}}return v}}(r,e)||function(n,s){if(n){if(typeof n=="string")return Ng(n,s);var a=Object.prototype.toString.call(n).slice(8,-1);return a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set"?Array.from(n):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Ng(n,s):void 0}}(r,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var e_,br={},e1={get exports(){return br},set exports(r){br=r}},Rs=typeof Reflect=="object"?Reflect:null,Ag=Rs&&typeof Rs.apply=="function"?Rs.apply:function(r,e,n){return Function.prototype.apply.call(r,e,n)};e_=Rs&&typeof Rs.ownKeys=="function"?Rs.ownKeys:Object.getOwnPropertySymbols?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:function(r){return Object.getOwnPropertyNames(r)};var Pg=Number.isNaN||function(r){return r!=r};function We(){We.init.call(this)}e1.exports=We,br.once=function(r,e){return new Promise(function(n,s){function a(c){r.removeListener(e,o),s(c)}function o(){typeof r.removeListener=="function"&&r.removeListener("error",a),n([].slice.call(arguments))}Dg(r,e,o,{once:!0}),e!=="error"&&function(c,d,f){typeof c.on=="function"&&Dg(c,"error",d,f)}(r,a,{once:!0})})},We.EventEmitter=We,We.prototype._events=void 0,We.prototype._eventsCount=0,We.prototype._maxListeners=void 0;var Rg=10;function Zl(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}function t_(r){return r._maxListeners===void 0?We.defaultMaxListeners:r._maxListeners}function Og(r,e,n,s){var a,o,c,d;if(Zl(n),(o=r._events)===void 0?(o=r._events=Object.create(null),r._eventsCount=0):(o.newListener!==void 0&&(r.emit("newListener",e,n.listener?n.listener:n),o=r._events),c=o[e]),c===void 0)c=o[e]=n,++r._eventsCount;else if(typeof c=="function"?c=o[e]=s?[n,c]:[c,n]:s?c.unshift(n):c.push(n),(a=t_(r))>0&&c.length>a&&!c.warned){c.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=r,f.type=e,f.count=c.length,d=f,console&&console.warn&&console.warn(d)}return r}function t1(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ig(r,e,n){var s={fired:!1,wrapFn:void 0,target:r,type:e,listener:n},a=t1.bind(s);return a.listener=n,s.wrapFn=a,a}function Mg(r,e,n){var s=r._events;if(s===void 0)return[];var a=s[e];return a===void 0?[]:typeof a=="function"?n?[a.listener||a]:[a]:n?function(o){for(var c=new Array(o.length),d=0;d<c.length;++d)c[d]=o[d].listener||o[d];return c}(a):n_(a,a.length)}function Lg(r){var e=this._events;if(e!==void 0){var n=e[r];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}function n_(r,e){for(var n=new Array(e),s=0;s<e;++s)n[s]=r[s];return n}function Dg(r,e,n,s){if(typeof r.on=="function")s.once?r.once(e,n):r.on(e,n);else{if(typeof r.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r);r.addEventListener(e,function a(o){s.once&&r.removeEventListener(e,a),n(o)})}}Object.defineProperty(We,"defaultMaxListeners",{enumerable:!0,get:function(){return Rg},set:function(r){if(typeof r!="number"||r<0||Pg(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");Rg=r}}),We.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},We.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||Pg(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this},We.prototype.getMaxListeners=function(){return t_(this)},We.prototype.emit=function(r){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var s=r==="error",a=this._events;if(a!==void 0)s=s&&a.error===void 0;else if(!s)return!1;if(s){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var d=a[r];if(d===void 0)return!1;if(typeof d=="function")Ag(d,this,e);else{var f=d.length,v=n_(d,f);for(n=0;n<f;++n)Ag(v[n],this,e)}return!0},We.prototype.addListener=function(r,e){return Og(this,r,e,!1)},We.prototype.on=We.prototype.addListener,We.prototype.prependListener=function(r,e){return Og(this,r,e,!0)},We.prototype.once=function(r,e){return Zl(e),this.on(r,Ig(this,r,e)),this},We.prototype.prependOnceListener=function(r,e){return Zl(e),this.prependListener(r,Ig(this,r,e)),this},We.prototype.removeListener=function(r,e){var n,s,a,o,c;if(Zl(e),(s=this._events)===void 0)return this;if((n=s[r])===void 0)return this;if(n===e||n.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete s[r],s.removeListener&&this.emit("removeListener",r,n.listener||e));else if(typeof n!="function"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){c=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():function(d,f){for(;f+1<d.length;f++)d[f]=d[f+1];d.pop()}(n,a),n.length===1&&(s[r]=n[0]),s.removeListener!==void 0&&this.emit("removeListener",r,c||e)}return this},We.prototype.off=We.prototype.removeListener,We.prototype.removeAllListeners=function(r){var e,n,s;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[r]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var a,o=Object.keys(n);for(s=0;s<o.length;++s)(a=o[s])!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=n[r])=="function")this.removeListener(r,e);else if(e!==void 0)for(s=e.length-1;s>=0;s--)this.removeListener(r,e[s]);return this},We.prototype.listeners=function(r){return Mg(this,r,!0)},We.prototype.rawListeners=function(r){return Mg(this,r,!1)},We.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):Lg.call(r,e)},We.prototype.listenerCount=Lg,We.prototype.eventNames=function(){return this._eventsCount>0?e_(this._events):[]};var Fg=Object.prototype.hasOwnProperty;function Ug(r,e,n){for(n of r.keys())if(ln(n,e))return n}function ln(r,e){var n,s,a;if(r===e)return!0;if(r&&e&&(n=r.constructor)===e.constructor){if(n===Date)return r.getTime()===e.getTime();if(n===RegExp)return r.toString()===e.toString();if(n===Array){if((s=r.length)===e.length)for(;s--&&ln(r[s],e[s]););return s===-1}if(n===Set){if(r.size!==e.size)return!1;for(s of r)if((a=s)&&typeof a=="object"&&!(a=Ug(e,a))||!e.has(a))return!1;return!0}if(n===Map){if(r.size!==e.size)return!1;for(s of r)if((a=s[0])&&typeof a=="object"&&!(a=Ug(e,a))||!ln(s[1],e.get(a)))return!1;return!0}if(n===ArrayBuffer)r=new Uint8Array(r),e=new Uint8Array(e);else if(n===DataView){if((s=r.byteLength)===e.byteLength)for(;s--&&r.getInt8(s)===e.getInt8(s););return s===-1}if(ArrayBuffer.isView(r)){if((s=r.byteLength)===e.byteLength)for(;s--&&r[s]===e[s];);return s===-1}if(!n||typeof r=="object"){for(n in s=0,r)if(Fg.call(r,n)&&++s&&!Fg.call(e,n)||!(n in e)||!ln(r[n],e[n]))return!1;return Object.keys(e).length===s}}return r!=r&&e!=e}const n1={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},r_={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},wt={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Kt={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ti={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class J{static getFirstMatch(e,n){const s=n.match(e);return s&&s.length>0&&s[1]||""}static getSecondMatch(e,n){const s=n.match(e);return s&&s.length>1&&s[2]||""}static matchAndReturnConst(e,n,s){if(e.test(n))return s}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const n=e.split(".").splice(0,2).map(s=>parseInt(s,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const n=e.split(".").splice(0,2).map(s=>parseInt(s,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5))return n[0]===1&&n[1]<6?"Cupcake":n[0]===1&&n[1]>=6?"Donut":n[0]===2&&n[1]<2?"Eclair":n[0]===2&&n[1]===2?"Froyo":n[0]===2&&n[1]>2?"Gingerbread":n[0]===3?"Honeycomb":n[0]===4&&n[1]<1?"Ice Cream Sandwich":n[0]===4&&n[1]<4?"Jelly Bean":n[0]===4&&n[1]>=4?"KitKat":n[0]===5?"Lollipop":n[0]===6?"Marshmallow":n[0]===7?"Nougat":n[0]===8?"Oreo":n[0]===9?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,n,s=!1){const a=J.getVersionPrecision(e),o=J.getVersionPrecision(n);let c=Math.max(a,o),d=0;const f=J.map([e,n],v=>{const g=c-J.getVersionPrecision(v),w=v+new Array(g+1).join(".0");return J.map(w.split("."),x=>new Array(20-x.length).join("0")+x).reverse()});for(s&&(d=c-Math.min(a,o)),c-=1;c>=d;){if(f[0][c]>f[1][c])return 1;if(f[0][c]===f[1][c]){if(c===d)return 0;c-=1}else if(f[0][c]<f[1][c])return-1}}static map(e,n){const s=[];let a;if(Array.prototype.map)return Array.prototype.map.call(e,n);for(a=0;a<e.length;a+=1)s.push(n(e[a]));return s}static find(e,n){let s,a;if(Array.prototype.find)return Array.prototype.find.call(e,n);for(s=0,a=e.length;s<a;s+=1){const o=e[s];if(n(o,s))return o}}static assign(e,...n){const s=e;let a,o;if(Object.assign)return Object.assign(e,...n);for(a=0,o=n.length;a<o;a+=1){const c=n[a];typeof c=="object"&&c!==null&&Object.keys(c).forEach(d=>{s[d]=c[d]})}return e}static getBrowserAlias(e){return n1[e]}static getBrowserTypeByAlias(e){return r_[e]||""}}const Qe=/version\/(\d+(\.?_?\d+)+)/i,r1=[{test:[/googlebot/i],describe(r){const e={name:"Googlebot"},n=J.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/opera/i],describe(r){const e={name:"Opera"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(r){const e={name:"Opera"},n=J.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(r){const e={name:"Samsung Internet for Android"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/Whale/i],describe(r){const e={name:"NAVER Whale Browser"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(r){const e={name:"MZ Browser"},n=J.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/focus/i],describe(r){const e={name:"Focus"},n=J.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/swing/i],describe(r){const e={name:"Swing"},n=J.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/coast/i],describe(r){const e={name:"Opera Coast"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(r){const e={name:"Opera Touch"},n=J.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(r){const e={name:"Yandex Browser"},n=J.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(r){const e={name:"UC Browser"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(r){const e={name:"Maxthon"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(r){const e={name:"Epiphany"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/puffin/i],describe(r){const e={name:"Puffin"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(r){const e={name:"Sleipnir"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(r){const e={name:"K-Meleon"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(r){const e={name:"WeChat"},n=J.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(r){const e={name:/qqbrowserlite/i.test(r)?"QQ Browser Lite":"QQ Browser"},n=J.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(r){const e={name:"Internet Explorer"},n=J.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(r){const e={name:"Microsoft Edge"},n=J.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(r){const e={name:"Microsoft Edge"},n=J.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(r){const e={name:"Vivaldi"},n=J.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(r){const e={name:"SeaMonkey"},n=J.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(r){const e={name:"Sailfish"},n=J.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,r);return n&&(e.version=n),e}},{test:[/silk/i],describe(r){const e={name:"Amazon Silk"},n=J.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/phantom/i],describe(r){const e={name:"PhantomJS"},n=J.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(r){const e={name:"SlimerJS"},n=J.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(r){const e={name:"BlackBerry"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(r){const e={name:"WebOS Browser"},n=J.getFirstMatch(Qe,r)||J.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/bada/i],describe(r){const e={name:"Bada"},n=J.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/tizen/i],describe(r){const e={name:"Tizen"},n=J.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(r){const e={name:"QupZilla"},n=J.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(r){const e={name:"Firefox"},n=J.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/electron/i],describe(r){const e={name:"Electron"},n=J.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(r){const e={name:"Miui"},n=J.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/chromium/i],describe(r){const e={name:"Chromium"},n=J.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,r)||J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(r){const e={name:"Chrome"},n=J.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/GSA/i],describe(r){const e={name:"Google Search"},n=J.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test(r){const e=!r.test(/like android/i),n=r.test(/android/i);return e&&n},describe(r){const e={name:"Android Browser"},n=J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(r){const e={name:"PlayStation 4"},n=J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(r){const e={name:"Safari"},n=J.getFirstMatch(Qe,r);return n&&(e.version=n),e}},{test:[/.*/i],describe(r){const e=r.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:J.getFirstMatch(e,r),version:J.getSecondMatch(e,r)}}}];var i1=[{test:[/Roku\/DVP/],describe(r){const e=J.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,r);return{name:Kt.Roku,version:e}}},{test:[/windows phone/i],describe(r){const e=J.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,r);return{name:Kt.WindowsPhone,version:e}}},{test:[/windows /i],describe(r){const e=J.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,r),n=J.getWindowsVersionName(e);return{name:Kt.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(r){const e={name:Kt.iOS},n=J.getSecondMatch(/(Version\/)(\d[\d.]+)/,r);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(r){const e=J.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,r).replace(/[_\s]/g,"."),n=J.getMacOSVersionName(e),s={name:Kt.MacOS,version:e};return n&&(s.versionName=n),s}},{test:[/(ipod|iphone|ipad)/i],describe(r){const e=J.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,r).replace(/[_\s]/g,".");return{name:Kt.iOS,version:e}}},{test(r){const e=!r.test(/like android/i),n=r.test(/android/i);return e&&n},describe(r){const e=J.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,r),n=J.getAndroidVersionName(e),s={name:Kt.Android,version:e};return n&&(s.versionName=n),s}},{test:[/(web|hpw)[o0]s/i],describe(r){const e=J.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,r),n={name:Kt.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(r){const e=J.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,r)||J.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,r)||J.getFirstMatch(/\bbb(\d+)/i,r);return{name:Kt.BlackBerry,version:e}}},{test:[/bada/i],describe(r){const e=J.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,r);return{name:Kt.Bada,version:e}}},{test:[/tizen/i],describe(r){const e=J.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,r);return{name:Kt.Tizen,version:e}}},{test:[/linux/i],describe:()=>({name:Kt.Linux})},{test:[/CrOS/],describe:()=>({name:Kt.ChromeOS})},{test:[/PlayStation 4/],describe(r){const e=J.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,r);return{name:Kt.PlayStation4,version:e}}}],s1=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(r){const e=J.getFirstMatch(/(can-l01)/i,r)&&"Nova",n={type:wt.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:wt.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:wt.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:wt.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:wt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:wt.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:wt.tablet})},{test(r){const e=r.test(/ipod|iphone/i),n=r.test(/like (ipod|iphone)/i);return e&&!n},describe(r){const e=J.getFirstMatch(/(ipod|iphone)/i,r);return{type:wt.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:wt.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:wt.mobile})},{test:r=>r.getBrowserName(!0)==="blackberry",describe:()=>({type:wt.mobile,vendor:"BlackBerry"})},{test:r=>r.getBrowserName(!0)==="bada",describe:()=>({type:wt.mobile})},{test:r=>r.getBrowserName()==="windows phone",describe:()=>({type:wt.mobile,vendor:"Microsoft"})},{test(r){const e=Number(String(r.getOSVersion()).split(".")[0]);return r.getOSName(!0)==="android"&&e>=3},describe:()=>({type:wt.tablet})},{test:r=>r.getOSName(!0)==="android",describe:()=>({type:wt.mobile})},{test:r=>r.getOSName(!0)==="macos",describe:()=>({type:wt.desktop,vendor:"Apple"})},{test:r=>r.getOSName(!0)==="windows",describe:()=>({type:wt.desktop})},{test:r=>r.getOSName(!0)==="linux",describe:()=>({type:wt.desktop})},{test:r=>r.getOSName(!0)==="playstation 4",describe:()=>({type:wt.tv})},{test:r=>r.getOSName(!0)==="roku",describe:()=>({type:wt.tv})}],a1=[{test:r=>r.getBrowserName(!0)==="microsoft edge",describe(r){if(/\sedg\//i.test(r))return{name:ti.Blink};const e=J.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,r);return{name:ti.EdgeHTML,version:e}}},{test:[/trident/i],describe(r){const e={name:ti.Trident},n=J.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:r=>r.test(/presto/i),describe(r){const e={name:ti.Presto},n=J.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test(r){const e=r.test(/gecko/i),n=r.test(/like gecko/i);return e&&!n},describe(r){const e={name:ti.Gecko},n=J.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:ti.Blink})},{test:[/(apple)?webkit/i],describe(r){const e={name:ti.WebKit},n=J.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,r);return n&&(e.version=n),e}}];class Bg{constructor(e,n=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=J.find(r1,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(s=>this.test(s));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=J.find(i1,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(s=>this.test(s));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:n}=this.getOS();return e?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:n}=this.getPlatform();return e?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const e=J.find(s1,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(s=>this.test(s));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=J.find(a1,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(s=>this.test(s));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return J.assign({},this.parsedResult)}satisfies(e){const n={};let s=0;const a={};let o=0;if(Object.keys(e).forEach(c=>{const d=e[c];typeof d=="string"?(a[c]=d,o+=1):typeof d=="object"&&(n[c]=d,s+=1)}),s>0){const c=Object.keys(n),d=J.find(c,v=>this.isOS(v));if(d){const v=this.satisfies(n[d]);if(v!==void 0)return v}const f=J.find(c,v=>this.isPlatform(v));if(f){const v=this.satisfies(n[f]);if(v!==void 0)return v}}if(o>0){const c=Object.keys(a),d=J.find(c,f=>this.isBrowser(f,!0));if(d!==void 0)return this.compareVersion(a[d])}}isBrowser(e,n=!1){const s=this.getBrowserName().toLowerCase();let a=e.toLowerCase();const o=J.getBrowserTypeByAlias(a);return n&&o&&(a=o.toLowerCase()),a===s}compareVersion(e){let n=[0],s=e,a=!1;const o=this.getBrowserVersion();if(typeof o=="string")return e[0]===">"||e[0]==="<"?(s=e.substr(1),e[1]==="="?(a=!0,s=e.substr(2)):n=[],e[0]===">"?n.push(1):n.push(-1)):e[0]==="="?s=e.substr(1):e[0]==="~"&&(a=!0,s=e.substr(1)),n.indexOf(J.compareVersions(o,s,a))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,n=!1){return this.isBrowser(e,n)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(n=>this.is(n))}}/*! + * Bowser - a browser detector + * https://github.com/lancedikson/bowser + * MIT License | (c) Dustin Diaz 2012-2015 + * MIT License | (c) Denis Demchenko 2015-2019 + */class o1{static getParser(e,n=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new Bg(e,n)}static parse(e){return new Bg(e).getResult()}static get BROWSER_MAP(){return r_}static get ENGINE_MAP(){return ti}static get OS_MAP(){return Kt}static get PLATFORMS_MAP(){return wt}}function Ac(){return Date.now()+Math.random().toString()}function Qa(){throw new Error("Method must be implemented in subclass")}function i_(r,e){return e!=null&&e.proxyUrl?e.proxyUrl+(e.proxyUrl.slice(-1)==="/"?"":"/")+r.substring(8):r}function dc(r){return r!=null&&r.callObjectBundleUrlOverride?r.callObjectBundleUrlOverride:i_("https://c.daily.co/call-machine/versioned/".concat("0.66.0","/static/call-machine-object-bundle.js"),r)}function vo(r){try{new URL(r)}catch{return!1}return!0}const s_=Object.prototype.toString;function a_(r){switch(s_.call(r)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Gi(r,Error)}}function Ws(r,e){return s_.call(r)===`[object ${e}]`}function Fh(r){return Ws(r,"ErrorEvent")}function $g(r){return Ws(r,"DOMError")}function qi(r){return Ws(r,"String")}function o_(r){return r===null||typeof r!="object"&&typeof r!="function"}function zs(r){return Ws(r,"Object")}function hc(r){return typeof Event<"u"&&Gi(r,Event)}function Uh(r){return!!(r&&r.then&&typeof r.then=="function")}function Gi(r,e){try{return r instanceof e}catch{return!1}}function Os(r,e=0){return typeof r!="string"||e===0||r.length<=e?r:`${r.slice(0,e)}...`}function zg(r,e){if(!Array.isArray(r))return"";const n=[];for(let s=0;s<r.length;s++){const a=r[s];try{n.push(String(a))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function l1(r,e,n=!1){return!!qi(r)&&(Ws(e,"RegExp")?e.test(r):!!qi(e)&&(n?r===e:r.includes(e)))}function zl(r,e=[],n=!1){return e.some(s=>l1(r,s,n))}function c1(r,e,n=250,s,a,o,c){if(!(o.exception&&o.exception.values&&c&&Gi(c.originalException,Error)))return;const d=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var f,v;d&&(o.exception.values=(f=th(r,e,a,c.originalException,s,o.exception.values,d,0),v=n,f.map(g=>(g.value&&(g.value=Os(g.value,v)),g))))}function th(r,e,n,s,a,o,c,d){if(o.length>=n+1)return o;let f=[...o];if(Gi(s[a],Error)){Vg(c,d);const v=r(e,s[a]),g=f.length;qg(v,a,g,d),f=th(r,e,n,s[a],a,[v,...f],v,g)}return Array.isArray(s.errors)&&s.errors.forEach((v,g)=>{if(Gi(v,Error)){Vg(c,d);const w=r(e,v),x=f.length;qg(w,`errors[${g}]`,x,d),f=th(r,e,n,v,a,[w,...f],w,x)}}),f}function Vg(r,e){r.mechanism=r.mechanism||{type:"generic",handled:!0},r.mechanism={...r.mechanism,is_exception_group:!0,exception_id:e}}function qg(r,e,n,s){r.mechanism=r.mechanism||{type:"generic",handled:!0},r.mechanism={...r.mechanism,type:"chained",source:e,exception_id:n,parent_id:s}}function Vl(r){return r&&r.Math==Math?r:void 0}const kn=typeof globalThis=="object"&&Vl(globalThis)||typeof window=="object"&&Vl(window)||typeof self=="object"&&Vl(self)||typeof global=="object"&&Vl(global)||function(){return this}()||{};function Eo(){return kn}function Bh(r,e,n){const s=n||kn,a=s.__SENTRY__=s.__SENTRY__||{};return a[r]||(a[r]=e())}const u1=Eo(),d1=80;function nh(r,e={}){try{let n=r;const s=5,a=[];let o=0,c=0;const d=" > ",f=d.length;let v;const g=Array.isArray(e)?e:e.keyAttrs,w=!Array.isArray(e)&&e.maxStringLength||d1;for(;n&&o++<s&&(v=h1(n,g),!(v==="html"||o>1&&c+a.length*f+v.length>=w));)a.push(v),c+=v.length,n=n.parentNode;return a.reverse().join(d)}catch{return"<unknown>"}}function h1(r,e){const n=r,s=[];let a,o,c,d,f;if(!n||!n.tagName)return"";s.push(n.tagName.toLowerCase());const v=e&&e.length?e.filter(w=>n.getAttribute(w)).map(w=>[w,n.getAttribute(w)]):null;if(v&&v.length)v.forEach(w=>{s.push(`[${w[0]}="${w[1]}"]`)});else if(n.id&&s.push(`#${n.id}`),a=n.className,a&&qi(a))for(o=a.split(/\s+/),f=0;f<o.length;f++)s.push(`.${o[f]}`);const g=["aria-label","type","name","title","alt"];for(f=0;f<g.length;f++)c=g[f],d=n.getAttribute(c),d&&s.push(`[${c}="${d}"]`);return s.join("")}const fc=["debug","info","warn","error","log","assert","trace"];function l_(r){if(!("console"in kn))return r();const e=kn.console,n={};fc.forEach(s=>{const a=e[s]&&e[s].__sentry_original__;s in e&&a&&(n[s]=e[s],e[s]=a)});try{return r()}finally{Object.keys(n).forEach(s=>{e[s]=n[s]})}}function Gg(){let r=!1;const e={enable:()=>{r=!0},disable:()=>{r=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?fc.forEach(n=>{e[n]=(...s)=>{r&&l_(()=>{kn.console[n](`Sentry Logger [${n}]:`,...s)})}}):fc.forEach(n=>{e[n]=()=>{}}),e}let Re;Re=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Bh("logger",Gg):Gg();const f1=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function pc(r,e=!1){const{host:n,path:s,pass:a,port:o,projectId:c,protocol:d,publicKey:f}=r;return`${d}://${f}${e&&a?`:${a}`:""}@${n}${o?`:${o}`:""}/${s&&`${s}/`}${c}`}function Yg(r){return{protocol:r.protocol,publicKey:r.publicKey||"",pass:r.pass||"",host:r.host,port:r.port||"",path:r.path||"",projectId:r.projectId}}function p1(r){const e=typeof r=="string"?function(n){const s=f1.exec(n);if(!s)return void console.error(`Invalid Sentry Dsn: ${n}`);const[a,o,c="",d,f="",v]=s.slice(1);let g="",w=v;const x=w.split("/");if(x.length>1&&(g=x.slice(0,-1).join("/"),w=x.pop()),w){const k=w.match(/^\d+/);k&&(w=k[0])}return Yg({host:d,pass:c,path:g,projectId:w,port:f,protocol:a,publicKey:o})}(r):Yg(r);if(e&&function(n){if(typeof __SENTRY_DEBUG__<"u"&&!__SENTRY_DEBUG__)return!0;const{port:s,projectId:a,protocol:o}=n;return!(["protocol","publicKey","host","projectId"].find(c=>!n[c]&&(Re.error(`Invalid Sentry Dsn: ${c} missing`),!0))||(a.match(/^\d+$/)?function(c){return c==="http"||c==="https"}(o)?s&&isNaN(parseInt(s,10))&&(Re.error(`Invalid Sentry Dsn: Invalid port ${s}`),1):(Re.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),1):(Re.error(`Invalid Sentry Dsn: Invalid projectId ${a}`),1)))}(e))return e}class Dn extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function $t(r,e,n){if(!(e in r))return;const s=r[e],a=n(s);if(typeof a=="function")try{c_(a,s)}catch{}r[e]=a}function $h(r,e,n){Object.defineProperty(r,e,{value:n,writable:!0,configurable:!0})}function c_(r,e){const n=e.prototype||{};r.prototype=e.prototype=n,$h(r,"__sentry_original__",e)}function zh(r){return r.__sentry_original__}function u_(r){if(a_(r))return{message:r.message,name:r.name,stack:r.stack,...Wg(r)};if(hc(r)){const e={type:r.type,target:Hg(r.target),currentTarget:Hg(r.currentTarget),...Wg(r)};return typeof CustomEvent<"u"&&Gi(r,CustomEvent)&&(e.detail=r.detail),e}return r}function Hg(r){try{return e=r,typeof Element<"u"&&Gi(e,Element)?nh(r):Object.prototype.toString.call(r)}catch{return"<unknown>"}var e}function Wg(r){if(typeof r=="object"&&r!==null){const e={};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}return{}}function Pc(r){return rh(r,new Map)}function rh(r,e){if(zs(r)){const n=e.get(r);if(n!==void 0)return n;const s={};e.set(r,s);for(const a of Object.keys(r))r[a]!==void 0&&(s[a]=rh(r[a],e));return s}if(Array.isArray(r)){const n=e.get(r);if(n!==void 0)return n;const s=[];return e.set(r,s),r.forEach(a=>{s.push(rh(a,e))}),s}return r}const Jg="<anonymous>";function ci(r){try{return r&&typeof r=="function"&&r.name||Jg}catch{return Jg}}const Ad=Eo();function ih(r){return r&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(r.toString())}function m1(){if(!function(){if(!("fetch"in Ad))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(ih(Ad.fetch))return!0;let r=!1;const e=Ad.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(r=ih(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return r}const ql=Eo(),ot=Eo(),io="__sentry_xhr_v2__",uo={},Kg={};function g1(r){if(!Kg[r])switch(Kg[r]=!0,r){case"console":(function(){"console"in ot&&fc.forEach(function(e){e in ot.console&&$t(ot.console,e,function(n){return function(...s){Ln("console",{args:s,level:e}),n&&n.apply(ot.console,s)}})})})();break;case"dom":(function(){if(!("document"in ot))return;const e=Ln.bind(null,"dom"),n=Xg(e,!0);ot.document.addEventListener("click",n,!1),ot.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach(s=>{const a=ot[s]&&ot[s].prototype;a&&a.hasOwnProperty&&a.hasOwnProperty("addEventListener")&&($t(a,"addEventListener",function(o){return function(c,d,f){if(c==="click"||c=="keypress")try{const v=this,g=v.__sentry_instrumentation_handlers__=v.__sentry_instrumentation_handlers__||{},w=g[c]=g[c]||{refCount:0};if(!w.handler){const x=Xg(e);w.handler=x,o.call(this,c,x,f)}w.refCount++}catch{}return o.call(this,c,d,f)}}),$t(a,"removeEventListener",function(o){return function(c,d,f){if(c==="click"||c=="keypress")try{const v=this,g=v.__sentry_instrumentation_handlers__||{},w=g[c];w&&(w.refCount--,w.refCount<=0&&(o.call(this,c,w.handler,f),w.handler=void 0,delete g[c]),Object.keys(g).length===0&&delete v.__sentry_instrumentation_handlers__)}catch{}return o.call(this,c,d,f)}}))})})();break;case"xhr":(function(){if(!("XMLHttpRequest"in ot))return;const e=XMLHttpRequest.prototype;$t(e,"open",function(n){return function(...s){const a=s[1],o=this[io]={method:qi(s[0])?s[0].toUpperCase():s[0],url:s[1],request_headers:{}};qi(a)&&o.method==="POST"&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const c=()=>{const d=this[io];if(d&&this.readyState===4){try{d.status_code=this.status}catch{}Ln("xhr",{args:s,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?$t(this,"onreadystatechange",function(d){return function(...f){return c(),d.apply(this,f)}}):this.addEventListener("readystatechange",c),$t(this,"setRequestHeader",function(d){return function(...f){const[v,g]=f,w=this[io];return w&&(w.request_headers[v.toLowerCase()]=g),d.apply(this,f)}}),n.apply(this,s)}}),$t(e,"send",function(n){return function(...s){const a=this[io];return a&&s[0]!==void 0&&(a.body=s[0]),Ln("xhr",{args:s,startTimestamp:Date.now(),xhr:this}),n.apply(this,s)}})})();break;case"fetch":(function(){m1()&&$t(ot,"fetch",function(e){return function(...n){const{method:s,url:a}=function(c){if(c.length===0)return{method:"GET",url:""};if(c.length===2){const[f,v]=c;return{url:Qg(f),method:sh(v,"method")?String(v.method).toUpperCase():"GET"}}const d=c[0];return{url:Qg(d),method:sh(d,"method")?String(d.method).toUpperCase():"GET"}}(n),o={args:n,fetchData:{method:s,url:a},startTimestamp:Date.now()};return Ln("fetch",{...o}),e.apply(ot,n).then(c=>(Ln("fetch",{...o,endTimestamp:Date.now(),response:c}),c),c=>{throw Ln("fetch",{...o,endTimestamp:Date.now(),error:c}),c})}})})();break;case"history":(function(){if(!function(){const s=ql.chrome,a=s&&s.app&&s.app.runtime,o="history"in ql&&!!ql.history.pushState&&!!ql.history.replaceState;return!a&&o}())return;const e=ot.onpopstate;function n(s){return function(...a){const o=a.length>2?a[2]:void 0;if(o){const c=Gl,d=String(o);Gl=d,Ln("history",{from:c,to:d})}return s.apply(this,a)}}ot.onpopstate=function(...s){const a=ot.location.href,o=Gl;if(Gl=a,Ln("history",{from:o,to:a}),e)try{return e.apply(this,s)}catch{}},$t(ot.history,"pushState",n),$t(ot.history,"replaceState",n)})();break;case"error":Hl=ot.onerror,ot.onerror=function(e,n,s,a,o){return Ln("error",{column:a,error:o,line:s,msg:e,url:n}),!(!Hl||Hl.__SENTRY_LOADER__)&&Hl.apply(this,arguments)},ot.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":Wl=ot.onunhandledrejection,ot.onunhandledrejection=function(e){return Ln("unhandledrejection",e),!(Wl&&!Wl.__SENTRY_LOADER__)||Wl.apply(this,arguments)},ot.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn("unknown instrumentation type:",r))}}function Li(r,e){uo[r]=uo[r]||[],uo[r].push(e),g1(r)}function Ln(r,e){if(r&&uo[r])for(const n of uo[r]||[])try{n(e)}catch(s){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.error(`Error while triggering instrumentation handler. +Type: ${r} +Name: ${ci(n)} +Error:`,s)}}function sh(r,e){return!!r&&typeof r=="object"&&!!r[e]}function Qg(r){return typeof r=="string"?r:r?sh(r,"url")?r.url:r.toString?r.toString():"":""}let Gl;const v1=1e3;let Yl,Pd;function Xg(r,e=!1){return n=>{if(!n||Pd===n||function(a){if(a.type!=="keypress")return!1;try{const o=a.target;if(!o||!o.tagName)return!0;if(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable)return!1}catch{}return!0}(n))return;const s=n.type==="keypress"?"input":n.type;(Yl===void 0||function(a,o){if(!a||a.type!==o.type)return!0;try{if(a.target!==o.target)return!0}catch{}return!1}(Pd,n))&&(r({event:n,name:s,global:e}),Pd=n),clearTimeout(Yl),Yl=ot.setTimeout(()=>{Yl=void 0},v1)}}let Hl=null,Wl=null;function oi(){const r=kn,e=r.crypto||r.msCrypto;if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");const n=e&&e.getRandomValues?()=>e.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return("10000000100040008000"+1e11).replace(/[018]/g,s=>(s^(15&n())>>s/4).toString(16))}function d_(r){return r.exception&&r.exception.values?r.exception.values[0]:void 0}function ii(r){const{message:e,event_id:n}=r;if(e)return e;const s=d_(r);return s?s.type&&s.value?`${s.type}: ${s.value}`:s.type||s.value||n||"<unknown>":n||"<unknown>"}function ah(r,e,n){const s=r.exception=r.exception||{},a=s.values=s.values||[],o=a[0]=a[0]||{};o.value||(o.value=e||""),o.type||(o.type="Error")}function yo(r,e){const n=d_(r);if(!n)return;const s=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...s,...e},e&&"data"in e){const a={...s&&s.data,...e.data};n.mechanism.data=a}}function Zg(r){if(r&&r.__sentry_captured__)return!0;try{$h(r,"__sentry_captured__",!0)}catch{}return!1}function si(r,e=100,n=1/0){try{return oh("",r,e,n)}catch(s){return{ERROR:`**non-serializable** (${s})`}}}function h_(r,e=3,n=102400){const s=si(r,e);return a=s,function(o){return~-encodeURI(o).split(/%..|./).length}(JSON.stringify(a))>n?h_(r,e-1,n):s;var a}function oh(r,e,n=1/0,s=1/0,a=function(){const o=typeof WeakSet=="function",c=o?new WeakSet:[];return[function(d){if(o)return!!c.has(d)||(c.add(d),!1);for(let f=0;f<c.length;f++)if(c[f]===d)return!0;return c.push(d),!1},function(d){if(o)c.delete(d);else for(let f=0;f<c.length;f++)if(c[f]===d){c.splice(f,1);break}}]}()){const[o,c]=a;if(e==null||["number","boolean","string"].includes(typeof e)&&(typeof(d=e)!="number"||d==d))return e;var d;const f=function(P,N){try{if(P==="domain"&&N&&typeof N=="object"&&N._events)return"[Domain]";if(P==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&N===global)return"[Global]";if(typeof window<"u"&&N===window)return"[Window]";if(typeof document<"u"&&N===document)return"[Document]";if(function($){return zs($)&&"nativeEvent"in $&&"preventDefault"in $&&"stopPropagation"in $}(N))return"[SyntheticEvent]";if(typeof N=="number"&&N!=N)return"[NaN]";if(typeof N=="function")return`[Function: ${ci(N)}]`;if(typeof N=="symbol")return`[${String(N)}]`;if(typeof N=="bigint")return`[BigInt: ${String(N)}]`;const j=function($){const K=Object.getPrototypeOf($);return K?K.constructor.name:"null prototype"}(N);return/^HTML(\w*)Element$/.test(j)?`[HTMLElement: ${j}]`:`[object ${j}]`}catch(j){return`**non-serializable** (${j})`}}(r,e);if(!f.startsWith("[object "))return f;if(e.__sentry_skip_normalization__)return e;const v=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(v===0)return f.replace("object ","");if(o(e))return"[Circular ~]";const g=e;if(g&&typeof g.toJSON=="function")try{return oh("",g.toJSON(),v-1,s,a)}catch{}const w=Array.isArray(e)?[]:{};let x=0;const k=u_(e);for(const P in k){if(!Object.prototype.hasOwnProperty.call(k,P))continue;if(x>=s){w[P]="[MaxProperties ~]";break}const N=k[P];w[P]=oh(P,N,v-1,s,a),x++}return c(e),w}var _r;function Yi(r){return new on(e=>{e(r)})}function mc(r){return new on((e,n)=>{n(r)})}(function(r){r[r.PENDING=0]="PENDING",r[r.RESOLVED=1]="RESOLVED",r[r.REJECTED=2]="REJECTED"})(_r||(_r={}));class on{__init(){this._state=_r.PENDING}__init2(){this._handlers=[]}constructor(e){on.prototype.__init.call(this),on.prototype.__init2.call(this),on.prototype.__init3.call(this),on.prototype.__init4.call(this),on.prototype.__init5.call(this),on.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new on((s,a)=>{this._handlers.push([!1,o=>{if(e)try{s(e(o))}catch(c){a(c)}else s(o)},o=>{if(n)try{s(n(o))}catch(c){a(c)}else a(o)}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new on((n,s)=>{let a,o;return this.then(c=>{o=!1,a=c,e&&e()},c=>{o=!0,a=c,e&&e()}).then(()=>{o?s(a):n(a)})})}__init3(){this._resolve=e=>{this._setResult(_r.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(_r.REJECTED,e)}}__init5(){this._setResult=(e,n)=>{this._state===_r.PENDING&&(Uh(n)?n.then(this._resolve,this._reject):(this._state=e,this._value=n,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===_r.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===_r.RESOLVED&&n[1](this._value),this._state===_r.REJECTED&&n[2](this._value),n[0]=!0)})}}}function y1(r){const e=[];function n(s){return e.splice(e.indexOf(s),1)[0]}return{$:e,add:function(s){if(!(r===void 0||e.length<r))return mc(new Dn("Not adding Promise because buffer limit was reached."));const a=s();return e.indexOf(a)===-1&&e.push(a),a.then(()=>n(a)).then(null,()=>n(a).then(null,()=>{})),a},drain:function(s){return new on((a,o)=>{let c=e.length;if(!c)return a(!0);const d=setTimeout(()=>{s&&s>0&&a(!1)},s);e.forEach(f=>{Yi(f).then(()=>{--c||(clearTimeout(d),a(!0))},o)})})}}}function Rd(r){if(!r)return{};const e=r.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",s=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:s,relative:e[5]+n+s}}const _1=["fatal","error","warning","log","info","debug"],f_=Eo(),lh={nowSeconds:()=>Date.now()/1e3},Od=typeof __SENTRY_BROWSER_BUNDLE__<"u"&&__SENTRY_BROWSER_BUNDLE__||Object.prototype.toString.call(typeof process<"u"?process:0)!=="[object process]"?function(){const{performance:r}=f_;if(!(!r||!r.now))return{now:()=>r.now(),timeOrigin:Date.now()-r.now()}}():function(){try{return(r=module,e="perf_hooks",r.require(e)).performance}catch{return}var r,e}(),ev=Od===void 0?lh:{nowSeconds:()=>(Od.timeOrigin+Od.now())/1e3},Rc=lh.nowSeconds.bind(lh),p_=ev.nowSeconds.bind(ev);function _o(r,e=[]){return[r,e]}function w1(r,e){const[n,s]=r;return[n,[...s,e]]}function tv(r,e){const n=r[1];for(const s of n)if(e(s,s[0].type))return!0;return!1}function ch(r,e){return(e||new TextEncoder).encode(r)}function b1(r,e){const[n,s]=r;let a=JSON.stringify(n);function o(c){typeof a=="string"?a=typeof c=="string"?a+c:[ch(a,e),c]:a.push(typeof c=="string"?ch(c,e):c)}for(const c of s){const[d,f]=c;if(o(` +${JSON.stringify(d)} +`),typeof f=="string"||f instanceof Uint8Array)o(f);else{let v;try{v=JSON.stringify(f)}catch{v=JSON.stringify(si(f))}o(v)}}return typeof a=="string"?a:function(c){const d=c.reduce((g,w)=>g+w.length,0),f=new Uint8Array(d);let v=0;for(const g of c)f.set(g,v),v+=g.length;return f}(a)}function x1(r,e){const n=typeof r.data=="string"?ch(r.data,e):r.data;return[Pc({type:"attachment",length:n.length,filename:r.filename,content_type:r.contentType,attachment_type:r.attachmentType}),n]}(()=>{const{performance:r}=f_;if(!r||!r.now)return;const e=36e5,n=r.now(),s=Date.now(),a=r.timeOrigin?Math.abs(r.timeOrigin+n-s):e,o=a<e,c=r.timing&&r.timing.navigationStart,d=typeof c=="number"?Math.abs(c+n-s):e;(o||d<e)&&a<=d&&r.timeOrigin})();const S1={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function nv(r){return S1[r]}function m_(r){if(!r||!r.sdk)return;const{name:e,version:n}=r.sdk;return{name:e,version:n}}const E1=6e4;function k1(r,{statusCode:e,headers:n},s=Date.now()){const a={...r},o=n&&n["x-sentry-rate-limits"],c=n&&n["retry-after"];if(o)for(const d of o.trim().split(",")){const[f,v]=d.split(":",2),g=parseInt(f,10),w=1e3*(isNaN(g)?60:g);if(v)for(const x of v.split(";"))a[x]=s+w;else a.all=s+w}else c?a.all=s+function(d,f=Date.now()){const v=parseInt(`${d}`,10);if(!isNaN(v))return 1e3*v;const g=Date.parse(`${d}`);return isNaN(g)?E1:g-f}(c,s):e===429&&(a.all=s+6e4);return a}const Vh="production";function C1(r){const e=p_(),n={sid:oi(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(s){return Pc({sid:`${s.sid}`,init:s.init,started:new Date(1e3*s.started).toISOString(),timestamp:new Date(1e3*s.timestamp).toISOString(),status:s.status,errors:s.errors,did:typeof s.did=="number"||typeof s.did=="string"?`${s.did}`:void 0,duration:s.duration,attrs:{release:s.release,environment:s.environment,ip_address:s.ipAddress,user_agent:s.userAgent}})}(n)};return Vs(n,r),n}function Vs(r,e={}){if(e.user&&(!r.ipAddress&&e.user.ip_address&&(r.ipAddress=e.user.ip_address),r.did||e.did||(r.did=e.user.id||e.user.email||e.user.username)),r.timestamp=e.timestamp||p_(),e.ignoreDuration&&(r.ignoreDuration=e.ignoreDuration),e.sid&&(r.sid=e.sid.length===32?e.sid:oi()),e.init!==void 0&&(r.init=e.init),!r.did&&e.did&&(r.did=`${e.did}`),typeof e.started=="number"&&(r.started=e.started),r.ignoreDuration)r.duration=void 0;else if(typeof e.duration=="number")r.duration=e.duration;else{const n=r.timestamp-r.started;r.duration=n>=0?n:0}e.release&&(r.release=e.release),e.environment&&(r.environment=e.environment),!r.ipAddress&&e.ipAddress&&(r.ipAddress=e.ipAddress),!r.userAgent&&e.userAgent&&(r.userAgent=e.userAgent),typeof e.errors=="number"&&(r.errors=e.errors),e.status&&(r.status=e.status)}class $i{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=rv()}static clone(e){const n=new $i;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments],n._sdkProcessingMetadata={...e._sdkProcessingMetadata},n._propagationContext={...e._propagationContext}),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Vs(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){const n=e(this);return n instanceof $i?n:this}return e instanceof $i?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):zs(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=rv(),this}addBreadcrumb(e,n){const s=typeof n=="number"?n:100;if(s<=0)return this;const a={timestamp:Rc(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-s),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const s=this._span.transaction;if(s){e.sdkProcessingMetadata={dynamicSamplingContext:s.getDynamicSamplingContext(),...e.sdkProcessingMetadata};const a=s.name;a&&(e.tags={transaction:a,...e.tags})}}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},this._notifyEventProcessors([...g_(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_notifyEventProcessors(e,n,s,a=0){return new on((o,c)=>{const d=e[a];if(n===null||typeof d!="function")o(n);else{const f=d({...n},s);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.id&&f===null&&Re.log(`Event processor "${d.id}" dropped event`),Uh(f)?f.then(v=>this._notifyEventProcessors(e,v,s,a+1).then(o)).then(null,c):this._notifyEventProcessors(e,f,s,a+1).then(o).then(null,c)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){var n;e.fingerprint=e.fingerprint?(n=e.fingerprint,Array.isArray(n)?n:[n]):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function g_(){return Bh("globalEventProcessors",()=>[])}function v_(r){g_().push(r)}function rv(){return{traceId:oi(),spanId:oi().substring(16),sampled:!1}}const y_=4,j1=100;class qh{constructor(e,n=new $i,s=y_){this._version=s,this._stack=[{scope:n}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=$i.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const n=this.pushScope();try{e(n)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,n){const s=this._lastEventId=n&&n.event_id?n.event_id:oi(),a=new Error("Sentry syntheticException");return this._withClient((o,c)=>{o.captureException(e,{originalException:e,syntheticException:a,...n,event_id:s},c)}),s}captureMessage(e,n,s){const a=this._lastEventId=s&&s.event_id?s.event_id:oi(),o=new Error(e);return this._withClient((c,d)=>{c.captureMessage(e,n,{originalException:e,syntheticException:o,...s,event_id:a},d)}),a}captureEvent(e,n){const s=n&&n.event_id?n.event_id:oi();return e.type||(this._lastEventId=s),this._withClient((a,o)=>{a.captureEvent(e,{...n,event_id:s},o)}),s}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){const{scope:s,client:a}=this.getStackTop();if(!a)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:c=j1}=a.getOptions&&a.getOptions()||{};if(c<=0)return;const d={timestamp:Rc(),...e},f=o?l_(()=>o(d,n)):d;f!==null&&(a.emit&&a.emit("beforeAddBreadcrumb",f,n),s.addBreadcrumb(f,c))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,n){this.getScope().setTag(e,n)}setExtra(e,n){this.getScope().setExtra(e,n)}setContext(e,n){this.getScope().setContext(e,n)}configureScope(e){const{scope:n,client:s}=this.getStackTop();s&&e(n)}run(e){const n=iv(this);try{e(this)}finally{iv(n)}}getIntegration(e){const n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){const s=this._callExtensionMethod("startTransaction",e,n);return typeof __SENTRY_DEBUG__<"u"&&!__SENTRY_DEBUG__||s||console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': +Sentry.addTracingExtensions(); +Sentry.init({...}); +`),s}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,n=e.getSession();n&&function(s,a){let o={};s.status==="ok"&&(o={status:"exited"}),Vs(s,o)}(n),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:n,client:s}=this.getStackTop(),{release:a,environment:o=Vh}=s&&s.getOptions()||{},{userAgent:c}=kn.navigator||{},d=C1({release:a,environment:o,user:n.getUser(),...c&&{userAgent:c},...e}),f=n.getSession&&n.getSession();return f&&f.status==="ok"&&Vs(f,{status:"exited"}),this.endSession(),n.setSession(d),d}shouldSendDefaultPii(){const e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:n}=this.getStackTop(),s=e.getSession();s&&n&&n.captureSession&&n.captureSession(s)}_withClient(e){const{scope:n,client:s}=this.getStackTop();s&&e(s,n)}_callExtensionMethod(e,...n){const s=gc().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[e]=="function")return s.extensions[e].apply(this,n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function gc(){return kn.__SENTRY__=kn.__SENTRY__||{extensions:{},hub:void 0},kn}function iv(r){const e=gc(),n=uh(e);return __(e,r),n}function vn(){const r=gc();if(r.__SENTRY__&&r.__SENTRY__.acs){const e=r.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(e=gc()){n=e,n&&n.__SENTRY__&&n.__SENTRY__.hub&&!uh(e).isOlderThan(y_)||__(e,new qh);var n;return uh(e)}(r)}function uh(r){return Bh("hub",()=>new qh,r)}function __(r,e){return r?((r.__SENTRY__=r.__SENTRY__||{}).hub=e,!0):!1}const T1="7";function N1(r,e){return n={sentry_key:r.publicKey,sentry_version:T1,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map(s=>`${encodeURIComponent(s)}=${encodeURIComponent(n[s])}`).join("&");var n}function A1(r,e,n,s){const a=m_(n),o=r.type&&r.type!=="replay_event"?r.type:"event";(function(d,f){f&&(d.sdk=d.sdk||{},d.sdk.name=d.sdk.name||f.name,d.sdk.version=d.sdk.version||f.version,d.sdk.integrations=[...d.sdk.integrations||[],...f.integrations||[]],d.sdk.packages=[...d.sdk.packages||[],...f.packages||[]])})(r,n&&n.sdk);const c=function(d,f,v,g){const w=d.sdkProcessingMetadata&&d.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:d.event_id,sent_at:new Date().toISOString(),...f&&{sdk:f},...!!v&&{dsn:pc(g)},...w&&{trace:Pc({...w})}}}(r,a,s,e);return delete r.sdkProcessingMetadata,_o(c,[[{type:o},r]])}const sv=[];function av(r,e){e[r.name]=r,sv.indexOf(r.name)===-1&&(r.setupOnce(v_,vn),sv.push(r.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.log(`Integration installed: ${r.name}`))}function P1(r,e,n,s){const{normalizeDepth:a=3,normalizeMaxBreadth:o=1e3}=r,c={...e,event_id:e.event_id||n.event_id||oi(),timestamp:e.timestamp||Rc()},d=n.integrations||r.integrations.map(g=>g.name);(function(g,w){const{environment:x,release:k,dist:P,maxValueLength:N=250}=w;"environment"in g||(g.environment="environment"in w?x:Vh),g.release===void 0&&k!==void 0&&(g.release=k),g.dist===void 0&&P!==void 0&&(g.dist=P),g.message&&(g.message=Os(g.message,N));const j=g.exception&&g.exception.values&&g.exception.values[0];j&&j.value&&(j.value=Os(j.value,N));const $=g.request;$&&$.url&&($.url=Os($.url,N))})(c,r),function(g,w){w.length>0&&(g.sdk=g.sdk||{},g.sdk.integrations=[...g.sdk.integrations||[],...w])}(c,d),e.type===void 0&&function(g,w){const x=kn._sentryDebugIds;if(!x)return;let k;const P=ov.get(w);P?k=P:(k=new Map,ov.set(w,k));const N=Object.keys(x).reduce((j,$)=>{let K;const G=k.get($);G?K=G:(K=w($),k.set($,K));for(let F=K.length-1;F>=0;F--){const U=K[F];if(U.filename){j[U.filename]=x[$];break}}return j},{});try{g.exception.values.forEach(j=>{j.stacktrace.frames.forEach($=>{$.filename&&($.debug_id=N[$.filename])})})}catch{}}(c,r.stackParser);let f=s;n.captureContext&&(f=$i.clone(f).update(n.captureContext));let v=Yi(c);if(f){if(f.getAttachments){const g=[...n.attachments||[],...f.getAttachments()];g.length&&(n.attachments=g)}v=f.applyToEvent(c,n)}return v.then(g=>(g&&function(w){const x={};try{w.exception.values.forEach(P=>{P.stacktrace.frames.forEach(N=>{N.debug_id&&(N.abs_path?x[N.abs_path]=N.debug_id:N.filename&&(x[N.filename]=N.debug_id),delete N.debug_id)})})}catch{}if(Object.keys(x).length===0)return;w.debug_meta=w.debug_meta||{},w.debug_meta.images=w.debug_meta.images||[];const k=w.debug_meta.images;Object.keys(x).forEach(P=>{k.push({type:"sourcemap",code_file:P,debug_id:x[P]})})}(g),typeof a=="number"&&a>0?function(w,x,k){if(!w)return null;const P={...w,...w.breadcrumbs&&{breadcrumbs:w.breadcrumbs.map(N=>({...N,...N.data&&{data:si(N.data,x,k)}}))},...w.user&&{user:si(w.user,x,k)},...w.contexts&&{contexts:si(w.contexts,x,k)},...w.extra&&{extra:si(w.extra,x,k)}};return w.contexts&&w.contexts.trace&&P.contexts&&(P.contexts.trace=w.contexts.trace,w.contexts.trace.data&&(P.contexts.trace.data=si(w.contexts.trace.data,x,k))),w.spans&&(P.spans=w.spans.map(N=>(N.data&&(N.data=si(N.data,x,k)),N))),P}(g,a,o):g))}const ov=new WeakMap,lv="Not capturing exception because it's already been captured.";class Di{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(e){if(Di.prototype.__init.call(this),Di.prototype.__init2.call(this),Di.prototype.__init3.call(this),Di.prototype.__init4.call(this),Di.prototype.__init5.call(this),this._options=e,e.dsn?this._dsn=p1(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn("No DSN provided, client will not do anything."),this._dsn){const n=function(s,a={}){const o=typeof a=="string"?a:a.tunnel,c=typeof a!="string"&&a._metadata?a._metadata.sdk:void 0;return o||`${function(d){return`${function(f){const v=f.protocol?`${f.protocol}:`:"",g=f.port?`:${f.port}`:"";return`${v}//${f.host}${g}${f.path?`/${f.path}`:""}/api/`}(d)}${d.projectId}/envelope/`}(s)}?${N1(s,c)}`}(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,s){if(Zg(e))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.log(lv));let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(o=>this._captureEvent(o,n,s)).then(o=>{a=o})),a}captureMessage(e,n,s,a){let o=s&&s.event_id;const c=o_(e)?this.eventFromMessage(String(e),n,s):this.eventFromException(e,s);return this._process(c.then(d=>this._captureEvent(d,s,a)).then(d=>{o=d})),o}captureEvent(e,n,s){if(n&&n.originalException&&Zg(n.originalException))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.log(lv));let a=n&&n.event_id;return this._process(this._captureEvent(e,n,s).then(o=>{a=o})),a}captureSession(e){this._isEnabled()?typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Vs(e,{init:!1})):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?this._isClientDoneProcessing(e).then(s=>n.flush(e).then(a=>s&&a)):Yi(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){const n={};return e.forEach(s=>{s&&av(s,n)}),n}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){av(e,this._integrations)}sendEvent(e,n={}){if(this._dsn){let s=A1(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])s=w1(s,x1(o,this._options.transportOptions&&this._options.transportOptions.textEncoder));const a=this._sendEnvelope(s);a&&a.then(o=>this.emit("afterSendEvent",e,o),null)}}sendSession(e){if(this._dsn){const n=function(s,a,o,c){const d=m_(o);return _o({sent_at:new Date().toISOString(),...d&&{sdk:d},...!!c&&{dsn:pc(a)}},["aggregates"in s?[{type:"sessions"},s]:[{type:"session"},s.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n,s){if(this._options.sendClientReports){const a=`${e}:${n}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.log(`Adding outcome: "${a}"`),this._outcomes[a]=this._outcomes[a]+1||1}}on(e,n){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(n)}emit(e,...n){this._hooks[e]&&this._hooks[e].forEach(s=>s(...n))}_updateSessionFromEvent(e,n){let s=!1,a=!1;const o=n.exception&&n.exception.values;if(o){a=!0;for(const d of o){const f=d.mechanism;if(f&&f.handled===!1){s=!0;break}}}const c=e.status==="ok";(c&&e.errors===0||c&&s)&&(Vs(e,{...s&&{status:"crashed"},errors:e.errors||Number(a||s)}),this.captureSession(e))}_isClientDoneProcessing(e){return new on(n=>{let s=0;const a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),n(!0)):(s+=1,e&&s>=e&&(clearInterval(a),n(!1)))},1)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,s){const a=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),P1(a,e,n,s).then(c=>{if(c===null)return c;const{propagationContext:d}=c.sdkProcessingMetadata||{};if(!(c.contexts&&c.contexts.trace)&&d){const{traceId:f,spanId:v,parentSpanId:g,dsc:w}=d;c.contexts={trace:{trace_id:f,span_id:v,parent_span_id:g},...c.contexts};const x=w||function(k,P,N){const j=P.getOptions(),{publicKey:$}=P.getDsn()||{},{segment:K}=N&&N.getUser()||{},G=Pc({environment:j.environment||Vh,release:j.release,user_segment:K,public_key:$,trace_id:k});return P.emit&&P.emit("createDsc",G),G}(f,this,s);c.sdkProcessingMetadata={dynamicSamplingContext:x,...c.sdkProcessingMetadata}}return c})}_captureEvent(e,n={},s){return this._processEvent(e,n,s).then(a=>a.event_id,a=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){const o=a;o.logLevel==="log"?Re.log(o.message):Re.warn(o)}})}_processEvent(e,n,s){const a=this.getOptions(),{sampleRate:o}=a;if(!this._isEnabled())return mc(new Dn("SDK not enabled, will not capture event.","log"));const c=uv(e),d=cv(e),f=e.type||"error",v=`before send for type \`${f}\``;if(d&&typeof o=="number"&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),mc(new Dn(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const g=f==="replay_event"?"replay":f;return this._prepareEvent(e,n,s).then(w=>{if(w===null)throw this.recordDroppedEvent("event_processor",g,e),new Dn("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return w;const x=function(k,P,N){const{beforeSend:j,beforeSendTransaction:$}=k;return cv(P)&&j?j(P,N):uv(P)&&$?$(P,N):P}(a,w,n);return function(k,P){const N=`${P} must return \`null\` or a valid event.`;if(Uh(k))return k.then(j=>{if(!zs(j)&&j!==null)throw new Dn(N);return j},j=>{throw new Dn(`${P} rejected with ${j}`)});if(!zs(k)&&k!==null)throw new Dn(N);return k}(x,v)}).then(w=>{if(w===null)throw this.recordDroppedEvent("before_send",g,e),new Dn(`${v} returned \`null\`, will not send event.`,"log");const x=s&&s.getSession();!c&&x&&this._updateSessionFromEvent(x,w);const k=w.transaction_info;if(c&&k&&w.transaction!==e.transaction){const P="custom";w.transaction_info={...k,source:P}}return this.sendEvent(w,n),w}).then(null,w=>{throw w instanceof Dn?w:(this.captureException(w,{data:{__sentry__:!0},originalException:w}),new Dn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${w}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,n=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.error("Error while sending event:",n)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{const[s,a]=n.split(":");return{reason:s,category:a,quantity:e[n]}})}}function cv(r){return r.type===void 0}function uv(r){return r.type==="transaction"}const R1=30;function O1(r,e,n=y1(r.bufferSize||R1)){let s={};function a(o){const c=[];if(tv(o,(v,g)=>{const w=nv(g);if(function(x,k,P=Date.now()){return function(N,j){return N[j]||N.all||0}(x,k)>P}(s,w)){const x=dv(v,g);r.recordDroppedEvent("ratelimit_backoff",w,x)}else c.push(v)}),c.length===0)return Yi();const d=_o(o[0],c),f=v=>{tv(d,(g,w)=>{const x=dv(g,w);r.recordDroppedEvent(v,nv(w),x)})};return n.add(()=>e({body:b1(d,r.textEncoder)}).then(v=>(v.statusCode!==void 0&&(v.statusCode<200||v.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Sentry responded with status code ${v.statusCode} to sent event.`),s=k1(s,v),v),v=>{throw f("network_error"),v})).then(v=>v,v=>{if(v instanceof Dn)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.error("Skipped sending event because buffer is full."),f("queue_overflow"),Yi();throw v})}return a.__sentry__baseTransport__=!0,{send:a,flush:o=>n.drain(o)}}function dv(r,e){if(e==="event"||e==="transaction")return Array.isArray(r)?r[1]:void 0}const hv="7.60.1";let fv;class wo{constructor(){wo.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=wo.id}setupOnce(){fv=Function.prototype.toString;try{Function.prototype.toString=function(...e){const n=zh(this)||this;return fv.apply(n,e)}}catch{}}}wo.__initStatic();const I1=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],M1=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class Is{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Is.id}constructor(e={}){this._options=e,Is.prototype.__init.call(this)}setupOnce(e,n){const s=a=>{const o=n();if(o){const c=o.getIntegration(Is);if(c){const d=o.getClient(),f=d?d.getOptions():{},v=function(g={},w={}){return{allowUrls:[...g.allowUrls||[],...w.allowUrls||[]],denyUrls:[...g.denyUrls||[],...w.denyUrls||[]],ignoreErrors:[...g.ignoreErrors||[],...w.ignoreErrors||[],...g.disableErrorDefaults?[]:I1],ignoreTransactions:[...g.ignoreTransactions||[],...w.ignoreTransactions||[],...g.disableTransactionDefaults?[]:M1],ignoreInternal:g.ignoreInternal===void 0||g.ignoreInternal}}(c._options,f);return function(g,w){return w.ignoreInternal&&function(x){try{return x.exception.values[0].type==="SentryError"}catch{}return!1}(g)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Event dropped due to being internal Sentry Error. +Event: ${ii(g)}`),!0):function(x,k){return x.type||!k||!k.length?!1:function(P){if(P.message)return[P.message];if(P.exception){const{values:N}=P.exception;try{const{type:j="",value:$=""}=N&&N[N.length-1]||{};return[`${$}`,`${j}: ${$}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.error(`Cannot extract message for event ${ii(P)}`),[]}}return[]}(x).some(P=>zl(P,k))}(g,w.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${ii(g)}`),!0):function(x,k){if(x.type!=="transaction"||!k||!k.length)return!1;const P=x.transaction;return!!P&&zl(P,k)}(g,w.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${ii(g)}`),!0):function(x,k){if(!k||!k.length)return!1;const P=Jl(x);return!!P&&zl(P,k)}(g,w.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Event dropped due to being matched by \`denyUrls\` option. +Event: ${ii(g)}. +Url: ${Jl(g)}`),!0):function(x,k){if(!k||!k.length)return!0;const P=Jl(x);return!P||zl(P,k)}(g,w.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Event: ${ii(g)}. +Url: ${Jl(g)}`),!0)}(a,v)?null:a}}return a};s.id=this.name,e(s)}}function Jl(r){try{let e;try{e=r.exception.values[0].stacktrace.frames}catch{}return e?function(n=[]){for(let s=n.length-1;s>=0;s--){const a=n[s];if(a&&a.filename!=="<anonymous>"&&a.filename!=="[native code]")return a.filename||null}return null}(e):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.error(`Cannot extract url for event ${ii(r)}`),null}}Is.__initStatic();var L1=Object.freeze({__proto__:null,FunctionToString:wo,InboundFilters:Is});const et=kn;let dh=0;function w_(){return dh>0}function qs(r,e={},n){if(typeof r!="function")return r;try{const a=r.__sentry_wrapped__;if(a)return a;if(zh(r))return r}catch{return r}const s=function(){const a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const c=a.map(d=>qs(d,e));return r.apply(this,c)}catch(c){throw dh++,setTimeout(()=>{dh--}),o=d=>{var f,v;d.addEventProcessor(g=>(e.mechanism&&(ah(g,void 0),yo(g,e.mechanism)),g.extra={...g.extra,arguments:a},g)),f=c,vn().captureException(f,{captureContext:v})},vn().withScope(o),c}var o};try{for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[a]=r[a])}catch{}c_(s,r),$h(r,"__sentry_wrapped__",s);try{Object.getOwnPropertyDescriptor(s,"name").configurable&&Object.defineProperty(s,"name",{get:()=>r.name})}catch{}return s}function b_(r,e){const n=Gh(r,e),s={type:e&&e.name,value:F1(e)};return n.length&&(s.stacktrace={frames:n}),s.type===void 0&&s.value===""&&(s.value="Unrecoverable error caught"),s}function Id(r,e){return{exception:{values:[b_(r,e)]}}}function Gh(r,e){const n=e.stacktrace||e.stack||"",s=function(a){if(a){if(typeof a.framesToPop=="number")return a.framesToPop;if(D1.test(a.message))return 1}return 0}(e);try{return r(n,s)}catch{}return[]}const D1=/Minified React error #\d+;/i;function F1(r){const e=r&&r.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Yh(r,e,n,s,a){let o;if(Fh(e)&&e.error)return Id(r,e.error);if($g(e)||Ws(e,"DOMException")){const c=e;if("stack"in e)o=Id(r,e);else{const d=c.name||($g(c)?"DOMError":"DOMException"),f=c.message?`${d}: ${c.message}`:d;o=hh(r,f,n,s),ah(o,f)}return"code"in c&&(o.tags={...o.tags,"DOMException.code":`${c.code}`}),o}return a_(e)?Id(r,e):zs(e)||hc(e)?(o=function(c,d,f,v){const g=vn().getClient(),w=g&&g.getOptions().normalizeDepth,x={exception:{values:[{type:hc(d)?d.constructor.name:v?"UnhandledRejection":"Error",value:U1(d,{isUnhandledRejection:v})}]},extra:{__serialized__:h_(d,w)}};if(f){const k=Gh(c,f);k.length&&(x.exception.values[0].stacktrace={frames:k})}return x}(r,e,n,a),yo(o,{synthetic:!0}),o):(o=hh(r,e,n,s),ah(o,`${e}`),yo(o,{synthetic:!0}),o)}function hh(r,e,n,s){const a={message:e};if(s&&n){const o=Gh(r,n);o.length&&(a.exception={values:[{value:e,stacktrace:{frames:o}}]})}return a}function U1(r,{isUnhandledRejection:e}){const n=function(a,o=40){const c=Object.keys(u_(a));if(c.sort(),!c.length)return"[object has no keys]";if(c[0].length>=o)return Os(c[0],o);for(let d=c.length;d>0;d--){const f=c.slice(0,d).join(", ");if(!(f.length>o))return d===c.length?f:Os(f,o)}return""}(r),s=e?"promise rejection":"exception";return Fh(r)?`Event \`ErrorEvent\` captured as ${s} with message \`${r.message}\``:hc(r)?`Event \`${function(a){try{const o=Object.getPrototypeOf(a);return o?o.constructor.name:void 0}catch{}}(r)}\` (type=${r.type}) captured as ${s}`:`Object captured as ${s} with keys: ${n}`}const pv=1024,x_="Breadcrumbs";class bo{static __initStatic(){this.id=x_}__init(){this.name=bo.id}constructor(e){bo.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Li("console",B1),this.options.dom&&Li("dom",function(e){function n(s){let a,o=typeof e=="object"?e.serializeAttribute:void 0,c=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;c&&c>pv&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${c} was configured. Sentry will use 1024 instead.`),c=pv),typeof o=="string"&&(o=[o]);try{const d=s.event;a=function(f){return!!f&&!!f.target}(d)?nh(d.target,{keyAttrs:o,maxStringLength:c}):nh(d,{keyAttrs:o,maxStringLength:c})}catch{a="<unknown>"}a.length!==0&&vn().addBreadcrumb({category:`ui.${s.name}`,message:a},{event:s.event,name:s.name,global:s.global})}return n}(this.options.dom)),this.options.xhr&&Li("xhr",$1),this.options.fetch&&Li("fetch",z1),this.options.history&&Li("history",V1)}addSentryBreadcrumb(e){this.options.sentry&&vn().addBreadcrumb({category:"sentry."+(e.type==="transaction"?"transaction":"event"),event_id:e.event_id,level:e.level,message:ii(e)},{event:e})}}function B1(r){for(let s=0;s<r.args.length;s++)if(r.args[s]==="ref=Ref<"){r.args[s+1]="viewRef";break}const e={category:"console",data:{arguments:r.args,logger:"console"},level:(n=r.level,n==="warn"?"warning":_1.includes(n)?n:"log"),message:zg(r.args," ")};var n;if(r.level==="assert"){if(r.args[0]!==!1)return;e.message=`Assertion failed: ${zg(r.args.slice(1)," ")||"console.assert"}`,e.data.arguments=r.args.slice(1)}vn().addBreadcrumb(e,{input:r.args,level:r.level})}function $1(r){const{startTimestamp:e,endTimestamp:n}=r,s=r.xhr[io];if(!e||!n||!s)return;const{method:a,url:o,status_code:c,body:d}=s,f={method:a,url:o,status_code:c},v={xhr:r.xhr,input:d,startTimestamp:e,endTimestamp:n};vn().addBreadcrumb({category:"xhr",data:f,type:"http"},v)}function z1(r){const{startTimestamp:e,endTimestamp:n}=r;if(n&&(!r.fetchData.url.match(/sentry_key/)||r.fetchData.method!=="POST"))if(r.error){const s=r.fetchData,a={data:r.error,input:r.args,startTimestamp:e,endTimestamp:n};vn().addBreadcrumb({category:"fetch",data:s,level:"error",type:"http"},a)}else{const s={...r.fetchData,status_code:r.response&&r.response.status},a={input:r.args,response:r.response,startTimestamp:e,endTimestamp:n};vn().addBreadcrumb({category:"fetch",data:s,type:"http"},a)}}function V1(r){let e=r.from,n=r.to;const s=Rd(et.location.href);let a=Rd(e);const o=Rd(n);a.path||(a=s),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),s.protocol===a.protocol&&s.host===a.host&&(e=a.relative),vn().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}bo.__initStatic();class q1 extends Di{constructor(e){const n=et.SENTRY_SDK_SOURCE||"npm";e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${n}:@sentry/browser`,version:hv}],version:hv},super(e),e.sendClientReports&&et.document&&et.document.addEventListener("visibilitychange",()=>{et.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return function(s,a,o,c){const d=Yh(s,a,o&&o.syntheticException||void 0,c);return yo(d),d.level="error",o&&o.event_id&&(d.event_id=o.event_id),Yi(d)}(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",s){return function(a,o,c="info",d,f){const v=hh(a,o,d&&d.syntheticException||void 0,f);return v.level=c,d&&d.event_id&&(v.event_id=d.event_id),Yi(v)}(this._options.stackParser,e,n,s,this._options.attachStacktrace)}sendEvent(e,n){const s=this.getIntegrationById(x_);s&&s.addSentryBreadcrumb&&s.addSentryBreadcrumb(e),super.sendEvent(e,n)}captureUserFeedback(e){if(!this._isEnabled())return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn("SDK not enabled, will not capture user feedback."));const n=function(s,{metadata:a,tunnel:o,dsn:c}){const d={event_id:s.event_id,sent_at:new Date().toISOString(),...a&&a.sdk&&{sdk:{name:a.sdk.name,version:a.sdk.version}},...!!o&&!!c&&{dsn:pc(c)}};return _o(d,[function(v){return[{type:"user_report"},v]}(s)])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(e,n,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,s)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0)return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.log("No outcomes to send"));if(!this._dsn)return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.log("No dsn provided, will not send outcomes"));(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.log("Sending outcomes:",e);const n=(s=e,_o((a=this._options.tunnel&&pc(this._dsn))?{dsn:a}:{},[[{type:"client_report"},{timestamp:o||Rc(),discarded_events:s}]]));var s,a,o;this._sendEnvelope(n)}}let Xa;function G1(r,e=function(){if(Xa)return Xa;if(ih(et.fetch))return Xa=et.fetch.bind(et);const n=et.document;let s=et.fetch;if(n&&typeof n.createElement=="function")try{const a=n.createElement("iframe");a.hidden=!0,n.head.appendChild(a);const o=a.contentWindow;o&&o.fetch&&(s=o.fetch),n.head.removeChild(a)}catch(a){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",a)}return Xa=s.bind(et)}()){let n=0,s=0;return O1(r,function(a){const o=a.body.length;n+=o,s++;const c={body:a.body,method:"POST",referrerPolicy:"origin",headers:r.headers,keepalive:n<=6e4&&s<15,...r.fetchOptions};try{return e(r.url,c).then(d=>(n-=o,s--,{statusCode:d.status,headers:{"x-sentry-rate-limits":d.headers.get("X-Sentry-Rate-Limits"),"retry-after":d.headers.get("Retry-After")}}))}catch(d){return Xa=void 0,n-=o,s--,mc(d)}})}class li{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=li.id}__init2(){this._installFunc={onerror:Y1,onunhandledrejection:H1}}constructor(e){li.prototype.__init.call(this),li.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const s in e){const a=this._installFunc[s];a&&e[s]&&(n=s,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.log(`Global Handler attached: ${n}`),a(),this._installFunc[s]=void 0)}var n}}function Y1(){Li("error",r=>{const[e,n,s]=E_();if(!e.getIntegration(li))return;const{msg:a,url:o,line:c,column:d,error:f}=r;if(w_()||f&&f.__sentry_own_request__)return;const v=f===void 0&&qi(a)?function(g,w,x,k){const P=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let N=Fh(g)?g.message:g,j="Error";const $=N.match(P);return $&&(j=$[1],N=$[2]),mv({exception:{values:[{type:j,value:N}]}},w,x,k)}(a,o,c,d):mv(Yh(n,f||a,void 0,s,!1),o,c,d);v.level="error",S_(e,f,v,"onerror")})}function H1(){Li("unhandledrejection",r=>{const[e,n,s]=E_();if(!e.getIntegration(li))return;let a=r;try{"reason"in r?a=r.reason:"detail"in r&&"reason"in r.detail&&(a=r.detail.reason)}catch{}if(w_()||a&&a.__sentry_own_request__)return!0;const o=o_(a)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(a)}`}]}}:Yh(n,a,void 0,s,!0);o.level="error",S_(e,a,o,"onunhandledrejection")})}function mv(r,e,n,s){const a=r.exception=r.exception||{},o=a.values=a.values||[],c=o[0]=o[0]||{},d=c.stacktrace=c.stacktrace||{},f=d.frames=d.frames||[],v=isNaN(parseInt(s,10))?void 0:s,g=isNaN(parseInt(n,10))?void 0:n,w=qi(e)&&e.length>0?e:function(){try{return u1.document.location.href}catch{return""}}();return f.length===0&&f.push({colno:v,filename:w,function:"?",in_app:!0,lineno:g}),r}function S_(r,e,n,s){yo(n,{handled:!1,type:s}),r.captureEvent(n,{originalException:e})}function E_(){const r=vn(),e=r.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[r,n.stackParser,n.attachStacktrace]}li.__initStatic();const W1=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class xo{static __initStatic(){this.id="TryCatch"}__init(){this.name=xo.id}constructor(e){xo.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&$t(et,"setTimeout",gv),this._options.setInterval&&$t(et,"setInterval",gv),this._options.requestAnimationFrame&&$t(et,"requestAnimationFrame",J1),this._options.XMLHttpRequest&&"XMLHttpRequest"in et&&$t(XMLHttpRequest.prototype,"send",K1);const e=this._options.eventTarget;e&&(Array.isArray(e)?e:W1).forEach(Q1)}}function gv(r){return function(...e){const n=e[0];return e[0]=qs(n,{mechanism:{data:{function:ci(r)},handled:!0,type:"instrument"}}),r.apply(this,e)}}function J1(r){return function(e){return r.apply(this,[qs(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ci(r)},handled:!0,type:"instrument"}})])}}function K1(r){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&$t(n,s,function(a){const o={mechanism:{data:{function:s,handler:ci(a)},handled:!0,type:"instrument"}},c=zh(a);return c&&(o.mechanism.data.handler=ci(c)),qs(a,o)})}),r.apply(this,e)}}function Q1(r){const e=et,n=e[r]&&e[r].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&($t(n,"addEventListener",function(s){return function(a,o,c){try{typeof o.handleEvent=="function"&&(o.handleEvent=qs(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ci(o),target:r},handled:!0,type:"instrument"}}))}catch{}return s.apply(this,[a,qs(o,{mechanism:{data:{function:"addEventListener",handler:ci(o),target:r},handled:!0,type:"instrument"}}),c])}}),$t(n,"removeEventListener",function(s){return function(a,o,c){const d=o;try{const f=d&&d.__sentry_wrapped__;f&&s.call(this,a,f,c)}catch{}return s.call(this,a,d,c)}}))}xo.__initStatic();class Ms{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Ms.id}constructor(e={}){Ms.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(e,n){e((s,a)=>{const o=n(),c=o.getClient(),d=o.getIntegration(Ms);if(!c||!d)return s;const f=c.getOptions();return c1(b_,f.stackParser,f.maxValueLength,d._key,d._limit,s,a),s})}}Ms.__initStatic();class Ls{constructor(){Ls.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Ls.id}setupOnce(){v_(e=>{if(vn().getIntegration(Ls)){if(!et.navigator&&!et.location&&!et.document)return e;const n=e.request&&e.request.url||et.location&&et.location.href,{referrer:s}=et.document||{},{userAgent:a}=et.navigator||{},o={...e.request&&e.request.headers,...s&&{Referer:s},...a&&{"User-Agent":a}},c={...e.request,...n&&{url:n},headers:o};return{...e,request:c}}return e})}}Ls.__initStatic();class Ds{constructor(){Ds.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Ds.id}setupOnce(e,n){const s=a=>{if(a.type)return a;const o=n().getIntegration(Ds);if(o){try{if(function(c,d){return d?!!(function(f,v){const g=f.message,w=v.message;return!(!g&&!w||g&&!w||!g&&w||g!==w||!yv(f,v)||!vv(f,v))}(c,d)||function(f,v){const g=_v(v),w=_v(f);return!(!g||!w||g.type!==w.type||g.value!==w.value||!yv(f,v)||!vv(f,v))}(c,d)):!1}(a,o._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Re.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return o._previousEvent=a}return o._previousEvent=a}return a};s.id=this.name,e(s)}}function vv(r,e){let n=wv(r),s=wv(e);if(!n&&!s)return!0;if(n&&!s||!n&&s||s.length!==n.length)return!1;for(let a=0;a<s.length;a++){const o=s[a],c=n[a];if(o.filename!==c.filename||o.lineno!==c.lineno||o.colno!==c.colno||o.function!==c.function)return!1}return!0}function yv(r,e){let n=r.fingerprint,s=e.fingerprint;if(!n&&!s)return!0;if(n&&!s||!n&&s)return!1;try{return n.join("")===s.join("")}catch{return!1}}function _v(r){return r.exception&&r.exception.values&&r.exception.values[0]}function wv(r){const e=r.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}Ds.__initStatic();var X1=Object.freeze({__proto__:null,Breadcrumbs:bo,Dedupe:Ds,GlobalHandlers:li,HttpContext:Ls,LinkedErrors:Ms,TryCatch:xo});let k_={};et.Sentry&&et.Sentry.Integrations&&(k_=et.Sentry.Integrations);const bv={...k_,...L1,...X1};var fh="new",xv="loading",Sv="loaded",vc="joining-meeting",Bi="joined-meeting",gr="left-meeting",vr="error",Z1="blocked",eC="off",tC="sendable",nC="loading",rC="interrupted",iC="playable",ec="unknown",C_="full",sC="lobby",aC="none",j_="base",T_="*",oC="ejected",lC="nbf-room",cC="nbf-token",uC="exp-room",dC="exp-token",hC="no-room",fC="meeting-full",pC="end-of-life",mC="not-allowed",gC="connection-error",vC="cam-in-use",yC="mic-in-use",_C="cam-mic-in-use",wC="permissions",bC="undefined-mediadevices",xC="not-found",SC="constraints",EC="unknown",N_="iframe-ready-for-launch-config",A_="iframe-launch-config",ph="theme-updated",mh="loading",gh="load-attempt-failed",tc="loaded",P_="started-camera",R_="camera-error",vh="joining-meeting",O_="joined-meeting",I_="left-meeting",Ev="available-devices-updated",M_="participant-joined",L_="participant-updated",D_="participant-left",F_="participant-counts-updated",U_="access-state-updated",B_="meeting-session-summary-updated",$_="meeting-session-state-updated",kC="meeting-session-data-error",z_="waiting-participant-added",V_="waiting-participant-updated",q_="waiting-participant-removed",yh="track-started",_h="track-stopped",G_="transcription-started",Y_="transcription-stopped",H_="transcription-error",nc="recording-started",rc="recording-stopped",W_="recording-stats",J_="recording-error",K_="recording-upload-completed",Q_="recording-data",X_="app-message",Z_="transcription-message",e0="remote-media-player-started",t0="remote-media-player-updated",n0="remote-media-player-stopped",r0="local-screen-share-started",i0="local-screen-share-stopped",s0="local-screen-share-canceled",a0="active-speaker-change",o0="active-speaker-mode-change",l0="network-quality-change",c0="network-connection",u0="cpu-load-change",d0="face-counts-updated",Oi="fullscreen",Ii="exited-fullscreen",h0="live-streaming-started",f0="live-streaming-updated",p0="live-streaming-stopped",m0="live-streaming-error",g0="lang-updated",v0="receive-settings-updated",y0="input-settings-updated",ic="nonfatal-error",sc="error",kv=102400,Md="iframe-call-message",Cv="local-screen-start",jv="daily-method-update-live-streaming-endpoints",Za="transmit-log",so="daily-custom-track",ac={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},_0={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},wh={PLAY:"play",PAUSE:"pause"},Tv=10,Ld=["jpg","png","jpeg"],CC="add-endpoints",jC="remove-endpoints";function $n(){return!Je()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function Je(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function w0(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function TC(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&(function(r,e){if(!r||!e)return!0;switch(r){case"Chrome":return e.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(e.major===13&&e.minor===0&&e.point===0);case"Firefox":return e.major>=67}return!0}(ui(),xh())||Je())}function Nv(){if(Je()||!document)return!1;var r=document.createElement("iframe");return!!r.requestFullscreen||!!r.webkitRequestFullscreen}var NC=function(){try{var r=document.createElement("canvas"),e=r.getContext("webgl2")!=null;return r.remove(),e}catch{return!1}}();function b0(){var r=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!Je()&&!!NC&&(r?function(){return bh()?!1:["Chrome","Firefox"].includes(ui())}():function(){if(bh())return!1;var e=ui();if(e==="Safari"){var n=Wh();if(n.major<15||n.major===15&&n.minor<4)return!1}return e==="Chrome"?Hh().major>=77:e==="Firefox"?Jh().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}var AC=["Chrome","Firefox"];function x0(){return!Je()&&!bh()&&typeof AudioWorkletNode<"u"&&AC.includes(ui())}function Av(){return w0()&&!function(){var r,e=ui();if(!$n())return!0;switch(e){case"Chrome":return(r=Hh()).major&&r.major>0&&r.major<75;case"Firefox":return(r=Jh()).major<91;case"Safari":return(r=Wh()).major<13||r.major===13&&r.minor<1;default:return!0}}()}function bh(){var r,e,n=$n(),s=n.match(/Mac/)&&(!Je()&&typeof window<"u"&&(r=window)!==null&&r!==void 0&&(e=r.navigator)!==null&&e!==void 0&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(n.match(/Mobi/)||n.match(/Android/)||s)||!!$n().match(/DailyAnd\//)||void 0}function ui(){if(typeof window<"u"){var r=$n();return S0()?"Safari":r.indexOf("Edge")>-1?"Edge":r.match(/Chrome\//)?"Chrome":r.indexOf("Safari")>-1?"Safari":r.indexOf("Firefox")>-1?"Firefox":r.indexOf("MSIE")>-1||r.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function xh(){switch(ui()){case"Chrome":return Hh();case"Safari":return Wh();case"Firefox":return Jh();case"Edge":return function(){var r=0,e=0;if(typeof window<"u"){var n=$n().match(/Edge\/(\d+).(\d+)/);if(n)try{r=parseInt(n[1]),e=parseInt(n[2])}catch{}}return{major:r,minor:e}}()}}function Hh(){var r=0,e=0,n=0,s=0,a=!1;if(typeof window<"u"){var o=$n(),c=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(c)try{r=parseInt(c[1]),e=parseInt(c[2]),n=parseInt(c[3]),s=parseInt(c[4]),a=o.indexOf("OPR/")>-1}catch{}}return{major:r,minor:e,build:n,patch:s,opera:a}}function S0(){return!!$n().match(/iPad|iPhone|iPod/i)&&w0()}function Wh(){var r=0,e=0,n=0;if(typeof window<"u"){var s=$n().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(s)try{r=parseInt(s[1]),e=parseInt(s[2]),n=parseInt(s[4])}catch{}else S0()&&(r=14,e=0,n=3)}return{major:r,minor:e,point:n}}function Jh(){var r=0,e=0;if(typeof window<"u"){var n=$n().match(/Firefox\/(\d+).(\d+)/);if(n)try{r=parseInt(n[1]),e=parseInt(n[2])}catch{}}return{major:r,minor:e}}var E0=function(){function r(){zn(this,r)}return Vn(r,[{key:"addListenerForMessagesFromCallMachine",value:function(e,n,s){Qa()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,n,s){Qa()}},{key:"sendMessageToCallMachine",value:function(e,n,s,a){Qa()}},{key:"sendMessageToDailyJs",value:function(e,n){Qa()}},{key:"removeListener",value:function(e){Qa()}}]),r}();function Pv(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),n.push.apply(n,s)}return n}function Dd(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pv(Object(n),!0).forEach(function(s){ri(r,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Pv(Object(n)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(n,s))})}return r}function PC(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,s=Bn(r);if(e){var a=Bn(this).constructor;n=Reflect.construct(s,arguments,a)}else n=s.apply(this,arguments);return Nc(this,n)}}var RC=function(r){Tc(n,E0);var e=PC(n);function n(){var s;return zn(this,n),(s=e.call(this))._wrappedListeners={},s._messageCallbacks={},s}return Vn(n,[{key:"addListenerForMessagesFromCallMachine",value:function(s,a,o){var c=this,d=function(f){if(f.data&&f.data.what==="iframe-call-message"&&(!f.data.callFrameId||f.data.callFrameId===a)&&(!f.data.from||f.data.from!=="module")){var v=Dd({},f.data);if(delete v.from,v.callbackStamp&&c._messageCallbacks[v.callbackStamp]){var g=v.callbackStamp;c._messageCallbacks[g].call(o,v),delete c._messageCallbacks[g]}delete v.what,delete v.callbackStamp,s.call(o,v)}};this._wrappedListeners[s]=d,window.addEventListener("message",d)}},{key:"addListenerForMessagesFromDailyJs",value:function(s,a,o){var c=function(d){if(!(!d.data||d.data.what!==Md||!d.data.action||d.data.from&&d.data.from!=="module"||d.data.callFrameId&&a&&d.data.callFrameId!==a)){var f=d.data;s.call(o,f)}};this._wrappedListeners[s]=c,window.addEventListener("message",c)}},{key:"sendMessageToCallMachine",value:function(s,a,o,c){if(!c)throw new Error("undefined callFrameId. Are you trying to use a DailyCall instance previously destroyed?");var d=Dd({},s);if(d.what=Md,d.from="module",d.callFrameId=c,a){var f=Ac();this._messageCallbacks[f]=a,d.callbackStamp=f}var v=o?o.contentWindow:window,g=this._callMachineTargetOrigin(o);g&&v.postMessage(d,g)}},{key:"sendMessageToDailyJs",value:function(s,a){s.what=Md,s.callFrameId=a,s.from="embedded",window.postMessage(s,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(s){var a=this._wrappedListeners[s];a&&(window.removeEventListener("message",a),delete this._wrappedListeners[s])}},{key:"forwardPackagedMessageToCallMachine",value:function(s,a,o){var c=Dd({},s);c.callFrameId=o;var d=a?a.contentWindow:window,f=this._callMachineTargetOrigin(a);f&&d.postMessage(c,f)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(s,a){var o=function(c){if(c.data&&c.data.what==="iframe-call-message"&&(!c.data.callFrameId||c.data.callFrameId===a)&&(!c.data.from||c.data.from!=="module")){var d=c.data;s(d)}};return this._wrappedListeners[s]=o,window.addEventListener("message",o),s}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(s){var a=this._wrappedListeners[s];a&&(window.removeEventListener("message",a),delete this._wrappedListeners[s])}},{key:"_callMachineTargetOrigin",value:function(s){return s?s.src?new URL(s.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}]),n}();function OC(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,s=Bn(r);if(e){var a=Bn(this).constructor;n=Reflect.construct(s,arguments,a)}else n=s.apply(this,arguments);return Nc(this,n)}}var IC=function(r){Tc(n,E0);var e=OC(n);function n(){var s;return zn(this,n),s=e.call(this),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new br.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new br.EventEmitter,s._wrappedListeners={},s._messageCallbacks={},s}return Vn(n,[{key:"addListenerForMessagesFromCallMachine",value:function(s,a,o){this._addListener(s,global.callMachineToDailyJsEmitter,o,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(s,a,o){this._addListener(s,global.dailyJsToCallMachineEmitter,o,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(s,a){this._sendMessage(s,global.dailyJsToCallMachineEmitter,"sending message to call machine",a)}},{key:"sendMessageToDailyJs",value:function(s){this._sendMessage(s,global.callMachineToDailyJsEmitter,"sending message to daily-js")}},{key:"removeListener",value:function(s){var a=this._wrappedListeners[s];a&&(global.callMachineToDailyJsEmitter.removeListener("message",a),global.dailyJsToCallMachineEmitter.removeListener("message",a),delete this._wrappedListeners[s])}},{key:"_addListener",value:function(s,a,o,c){var d=this,f=function(v){if(v.callbackStamp&&d._messageCallbacks[v.callbackStamp]){var g=v.callbackStamp;d._messageCallbacks[g].call(o,v),delete d._messageCallbacks[g]}s.call(o,v)};this._wrappedListeners[s]=f,a.addListener("message",f)}},{key:"_sendMessage",value:function(s,a,o,c){if(c){var d=Ac();this._messageCallbacks[d]=c,s.callbackStamp=d}a.emit("message",s)}}]),n}(),Sh="replace",Eh="shallow-merge",Rv=[Sh,Eh],MC=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.data,s=e.mergeStrategy,a=s===void 0?Sh:s;zn(this,r),r._validateMergeStrategy(a),r._validateData(n,a),this.mergeStrategy=a,this.data=n}return Vn(r,[{key:"isNoOp",value:function(){return r.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(e,n){return Object.keys(e).length===0&&n===Eh}},{key:"_validateMergeStrategy",value:function(e){if(!Rv.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(Rv,"]"))}},{key:"_validateData",value:function(e,n){if(!function(d){if(d==null||tt(d)!=="object")return!1;var f=Object.getPrototypeOf(d);return f==null||f===Object.prototype}(e))throw Error("Meeting session data must be a plain (map-like) object");var s;try{if(s=JSON.stringify(e),n===Sh){var a=JSON.parse(s);ln(a,e)||console.warn("The meeting session data provided will be modified when serialized.",a,e)}else if(n===Eh){for(var o in e)if(Object.hasOwnProperty.call(e,o)&&e[o]!==void 0){var c=JSON.parse(JSON.stringify(e[o]));ln(e[o],c)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",c,e[o])}}}catch(d){throw Error("Meeting session data must be serializable to JSON: ".concat(d))}if(s.length>kv)throw Error("Meeting session data is too large (".concat(s.length," characters). Maximum size suppported is ").concat(kv,"."))}}]),r}();function kh(r,e,n){return kh=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}()?Reflect.construct.bind():function(s,a,o){var c=[null];c.push.apply(c,a);var d=new(Function.bind.apply(s,c));return o&&go(d,o.prototype),d},kh.apply(null,arguments)}function Ch(r){var e=typeof Map=="function"?new Map:void 0;return Ch=function(n){if(n===null||(s=n,Function.toString.call(s).indexOf("[native code]")===-1))return n;var s;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,a)}function a(){return kh(n,arguments,Bn(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),go(a,n)},Ch(r)}function LC(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,s=Bn(r);if(e){var a=Bn(this).constructor;n=Reflect.construct(s,arguments,a)}else n=s.apply(this,arguments);return Nc(this,n)}}function Ov(r){var e,n=(e=window._daily)===null||e===void 0?void 0:e.pendings;if(n){var s=n.indexOf(r);s!==-1&&n.splice(s,1)}}var DC=function(){function r(e){zn(this,r),this._currentLoad=null,this._callFrameId=e}return Vn(r,[{key:"load",value:function(){var e,n=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callFrameId].callMachine.reset(),void a(!0);e=this._callFrameId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new FC(s,function(){a(!1)},function(c,d){d||Ov(n._callFrameId),o(c,d)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),Ov(this._callFrameId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),r}(),FC=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0;zn(this,r),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=e,this._successCallback=n,this._failureCallback=s}return Vn(r,[{key:"start",value:function(){var e=this;this._currentAttempt||(this._currentAttempt=new Iv(this._dailyConfig,this._successCallback,function n(s){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(s,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout(function(){e._currentAttempt.cancelled||(e._currentAttempt=new Iv(e._dailyConfig,e._successCallback,n),e._currentAttempt.start())},3e3))}),this._currentAttempt.start())}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}]),r}(),Fd=function(r){Tc(n,Ch(Error));var e=LC(n);function n(){return zn(this,n),e.apply(this,arguments)}return Vn(n)}(),yc=2e4,Iv=function(){function r(n,s,a){zn(this,r),this._loadAttemptImpl=Je()||!n.avoidEval?new UC(n,s,a):new BC(n,s,a)}var e;return Vn(r,[{key:"start",value:(e=je(function*(){return this._loadAttemptImpl.start()}),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]),r}(),UC=function(){function r(o,c,d){zn(this,r),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<"u"&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=o,this._successCallback=c,this._failureCallback=d}var e,n,s,a;return Vn(r,[{key:"start",value:(a=je(function*(){var o=dc(this._dailyConfig);!(yield this._tryLoadFromIOSCache(o))&&this._loadFromNetwork(o)}),function(){return a.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(s=je(function*(o){if(!this._iosCache)return!1;try{var c=yield this._iosCache.get(o);return!!this.cancelled||!!c&&(c.code?(Function('"use strict";'+c.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=c.refetchHeaders,!1))}catch{return!1}}),function(o){return s.apply(this,arguments)})},{key:"_loadFromNetwork",value:(n=je(function*(o){var c=this;this._networkTimeout=setTimeout(function(){c._networkTimedOut=!0,c._failureCallback({msg:"Timed out (>".concat(yc," ms) when loading call object bundle ").concat(o),type:"timeout"})},yc);try{var d=this._refetchHeaders?{headers:this._refetchHeaders}:{},f=yield fetch(o,d);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Fd;var v=yield this._getBundleCodeFromResponse(o,f);if(this.cancelled)throw new Fd;Function('"use strict";'+v)(),this._iosCache&&this._iosCache.set(o,v,f.headers),this.succeeded=!0,this._successCallback()}catch(g){if(clearTimeout(this._networkTimeout),g instanceof Fd||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(o,": ").concat(g),type:g.message})}}),function(o){return n.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=je(function*(o,c){if(c.ok)return yield c.text();if(this._iosCache&&c.status===304)return(yield this._iosCache.renew(o,c.headers)).code;throw new Error("Received ".concat(c.status," response"))}),function(o,c){return e.apply(this,arguments)})}]),r}(),BC=function(){function r(e,n,s){zn(this,r),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=e,this._successCallback=n,this._failureCallback=s,this._attemptId=Ac(),this._networkTimeout=null,this._scriptElement=null}return Vn(r,[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=dc(this._dailyConfig);(typeof document>"u"?"undefined":tt(document))==="object"?this._startLoading(e):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(e){var n=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout(function(){n._stopLoading(),n._failureCallback({msg:"Timed out (>".concat(yc," ms) when loading call object bundle ").concat(e),type:"timeout"})},yc);var s=document.getElementsByTagName("head")[0],a=document.createElement("script");this._scriptElement=a,a.onload=function(){n._stopLoading(),n.succeeded=!0,n._successCallback()},a.onerror=function(o){n._stopLoading(),n._failureCallback({msg:"Failed to load call object bundle ".concat(o.target.src),type:o.message})},a.src=e,s.appendChild(a)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}]),r}(),Kl=function(r,e,n){return zC(r.local,e,n)===!0},$C=function(r,e,n){return r.local.streams&&r.local.streams[e]&&r.local.streams[e].stream&&r.local.streams[e].stream["get".concat(n==="video"?"Video":"Audio","Tracks")]()[0]},Ns=function(r,e,n,s){var a=VC(r,e,n,s);return a&&a.pendingTrack},zC=function(r,e,n){if(!r)return!1;var s=function(o){switch(o){case"avatar":return!0;case"staged":return o;default:return!!o}},a=r.public.subscribedTracks;return a&&a[e]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(n)===-1&&a[e].custom?[!0,"staged"].includes(a[e].custom)?s(a[e].custom):s(a[e].custom[n]):s(a[e][n]):!a||s(a.ALL)},VC=function(r,e,n,s){var a=Object.values(r.streams||{}).filter(function(o){return o.participantId===e&&o.type===n&&o.pendingTrack&&o.pendingTrack.kind===s}).sort(function(o,c){return new Date(c.starttime)-new Date(o.starttime)});return a&&a[0]},qC=function(r,e){var n=r.local.public.customTracks;if(n&&n[e])return n[e].track};function Mv(r,e){for(var n=e.getState(),s=0,a=["cam","screen"];s<a.length;s++)for(var o=a[s],c=0,d=["video","audio"];c<d.length;c++){var f=d[c],v=o==="cam"?f:"screen".concat(f.charAt(0).toUpperCase()+f.slice(1)),g=r.tracks[v];if(g){var w=r.local?$C(n,o,f):Ns(n,r.session_id,o,f);g.state==="playable"&&(g.track=w),g.persistentTrack=w}}}function Lv(r,e){try{var n=e.getState();for(var s in r.tracks)if(!GC(s)){var a=r.tracks[s].kind;if(a){var o=r.tracks[s];if(o){var c=r.local?qC(n,s):Ns(n,r.session_id,s,a);o.state==="playable"&&(r.tracks[s].track=c),o.persistentTrack=c}}else console.error("unknown type for custom track")}}catch(d){console.error(d)}}function GC(r){return["video","audio","screenVideo","screenAudio"].includes(r)}function Dv(r,e,n){var s=n.getState();if(r.local){if(r.audio)try{r.audioTrack=s.local.streams.cam.stream.getAudioTracks()[0],r.audioTrack||(r.audio=!1)}catch{}if(r.video)try{r.videoTrack=s.local.streams.cam.stream.getVideoTracks()[0],r.videoTrack||(r.video=!1)}catch{}if(r.screen)try{r.screenVideoTrack=s.local.streams.screen.stream.getVideoTracks()[0],r.screenAudioTrack=s.local.streams.screen.stream.getAudioTracks()[0],r.screenVideoTrack||r.screenAudioTrack||(r.screen=!1)}catch{}}else{var a=!0;try{var o=s.participants[r.session_id];o&&o.public&&o.public.rtcType&&o.public.rtcType.impl==="peer-to-peer"&&o.private&&!["connected","completed"].includes(o.private.peeringState)&&(a=!1)}catch(g){console.error(g)}if(!a)return r.audio=!1,r.audioTrack=!1,r.video=!1,r.videoTrack=!1,r.screen=!1,void(r.screenTrack=!1);try{if(s.streams,r.audio&&Kl(s,r.session_id,"cam-audio")){var c=Ns(s,r.session_id,"cam","audio");c&&(e&&e.audioTrack&&e.audioTrack.id===c.id?r.audioTrack=c:c.muted||(r.audioTrack=c)),r.audioTrack||(r.audio=!1)}if(r.video&&Kl(s,r.session_id,"cam-video")){var d=Ns(s,r.session_id,"cam","video");d&&(e&&e.videoTrack&&e.videoTrack.id===d.id?r.videoTrack=d:d.muted||(r.videoTrack=d)),r.videoTrack||(r.video=!1)}if(r.screen&&Kl(s,r.session_id,"screen-audio")){var f=Ns(s,r.session_id,"screen","audio");f&&(e&&e.screenAudioTrack&&e.screenAudioTrack.id===f.id?r.screenAudioTrack=f:f.muted||(r.screenAudioTrack=f))}if(r.screen&&Kl(s,r.session_id,"screen-video")){var v=Ns(s,r.session_id,"screen","video");v&&(e&&e.screenVideoTrack&&e.screenVideoTrack.id===v.id?r.screenVideoTrack=v:v.muted||(r.screenVideoTrack=v))}r.screenVideoTrack||r.screenAudioTrack||(r.screen=!1)}catch(g){console.error("unexpected error matching up tracks",g)}}}function YC(r,e){var n=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!n){if(Array.isArray(r)||(n=function(f,v){if(f){if(typeof f=="string")return Fv(f,v);var g=Object.prototype.toString.call(f).slice(8,-1);if(g==="Object"&&f.constructor&&(g=f.constructor.name),g==="Map"||g==="Set")return Array.from(f);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return Fv(f,v)}}(r))||e){n&&(r=n);var s=0,a=function(){};return{s:a,n:function(){return s>=r.length?{done:!0}:{done:!1,value:r[s++]}},e:function(f){throw f},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,c=!0,d=!1;return{s:function(){n=n.call(r)},n:function(){var f=n.next();return c=f.done,f},e:function(f){d=!0,o=f},f:function(){try{c||n.return==null||n.return()}finally{if(d)throw o}}}}function Fv(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,s=new Array(e);n<e;n++)s[n]=r[n];return s}var Zn=new Map,Fs=null;function HC(r,e){var n=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!n){if(Array.isArray(r)||(n=function(f,v){if(f){if(typeof f=="string")return Uv(f,v);var g=Object.prototype.toString.call(f).slice(8,-1);if(g==="Object"&&f.constructor&&(g=f.constructor.name),g==="Map"||g==="Set")return Array.from(f);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return Uv(f,v)}}(r))||e){n&&(r=n);var s=0,a=function(){};return{s:a,n:function(){return s>=r.length?{done:!0}:{done:!1,value:r[s++]}},e:function(f){throw f},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,c=!0,d=!1;return{s:function(){n=n.call(r)},n:function(){var f=n.next();return c=f.done,f},e:function(f){d=!0,o=f},f:function(){try{c||n.return==null||n.return()}finally{if(d)throw o}}}}function Uv(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,s=new Array(e);n<e;n++)s[n]=r[n];return s}var er=new Map,ho=null,WC=3e3;function JC(r){k0()?function(e){Zn.has(e)||(Zn.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(n){Zn.has(e)&&(Zn.get(e).lastDevicesString=JSON.stringify(n),Fs||(Fs=function(){var s=je(function*(){var a,o=yield navigator.mediaDevices.enumerateDevices(),c=YC(Zn.keys());try{for(c.s();!(a=c.n()).done;){var d=a.value,f=JSON.stringify(o);f!==Zn.get(d).lastDevicesString&&(Zn.get(d).lastDevicesString=f,d(o))}}catch(v){c.e(v)}finally{c.f()}});return function(){return s.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener("devicechange",Fs)))}).catch(function(){}))}(r):function(e){er.has(e)||(er.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(n){er.has(e)&&(er.get(e).lastDevicesString=JSON.stringify(n),ho||(ho=setInterval(je(function*(){var s,a=yield navigator.mediaDevices.enumerateDevices(),o=HC(er.keys());try{for(o.s();!(s=o.n()).done;){var c=s.value,d=JSON.stringify(a);d!==er.get(c).lastDevicesString&&(er.get(c).lastDevicesString=d,c(a))}}catch(f){o.e(f)}finally{o.f()}}),WC)))}))}(r)}function KC(r){k0()?function(e){Zn.has(e)&&(Zn.delete(e),Zn.size===0&&Fs&&(navigator.mediaDevices.removeEventListener("devicechange",Fs),Fs=null))}(r):function(e){er.has(e)&&(er.delete(e),er.size===0&&ho&&(clearInterval(ho),ho=null))}(r)}function k0(){return Je()||navigator.mediaDevices.ondevicechange!==void 0}var QC=new Set;function XC(r,e){var n=e.isLocalScreenVideo;return r&&r.readyState==="live"&&!function(s,a){return(!a.isLocalScreenVideo||ui()!=="Chrome")&&s.muted&&!QC.has(s.id)}(r,{isLocalScreenVideo:n})}var Kn,ZC=["videoTrack"],ej=["result"],tj=["preserveIframe"];function Bv(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),n.push.apply(n,s)}return n}function Ne(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bv(Object(n),!0).forEach(function(s){ri(r,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Bv(Object(n)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(n,s))})}return r}function nj(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,s=Bn(r);if(e){var a=Bn(this).constructor;n=Reflect.construct(s,arguments,a)}else n=s.apply(this,arguments);return Nc(this,n)}}function $v(r,e){var n=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!n){if(Array.isArray(r)||(n=function(f,v){if(f){if(typeof f=="string")return zv(f,v);var g=Object.prototype.toString.call(f).slice(8,-1);if(g==="Object"&&f.constructor&&(g=f.constructor.name),g==="Map"||g==="Set")return Array.from(f);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return zv(f,v)}}(r))||e){n&&(r=n);var s=0,a=function(){};return{s:a,n:function(){return s>=r.length?{done:!0}:{done:!1,value:r[s++]}},e:function(f){throw f},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,c=!0,d=!1;return{s:function(){n=n.call(r)},n:function(){var f=n.next();return c=f.done,f},e:function(f){d=!0,o=f},f:function(){try{c||n.return==null||n.return()}finally{if(d)throw o}}}}function zv(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,s=new Array(e);n<e;n++)s[n]=r[n];return s}var Vv="video",rj="voice",qv=Je()?{data:{}}:{data:{},topology:"none"},Gv={present:0,hidden:0},C0={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Ud=Object.keys(C0),Yv=["state","volume","simulcastEncodings"],Hv={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},_c={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string"}},jh={id:{allow:"string",controlledBy:"'*' | 'owners' | string[]",csp:"string",iconURL:"string",label:"string",loading:"'eager' | 'lazy'",location:"'main' | 'sidebar'",name:"string",referrerPolicy:"string",sandbox:"string",src:"string",srcdoc:"string",shared:"string[] | 'owners' | boolean"}},Ai={customIntegrations:{validate:I0,help:R0()},customTrayButtons:{validate:O0,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(_c))},url:{validate:function(r){return typeof r=="string"},help:"url should be a string"},baseUrl:{validate:function(r){return typeof r=="string"},help:"baseUrl should be a string"},token:{validate:function(r){return typeof r=="string"},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(r,e){try{return e.validateDailyConfig(r),!0}catch(n){console.error("Failed to validate dailyConfig",n)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(r){return M0(r,Hv)},help:"reactNativeConfig should look like ".concat(JSON.stringify(Hv),", all fields optional")},lang:{validate:function(r){return["de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(r)},help:"language not supported. Options are: de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(r){try{return j0(r),!0}catch(e){return console.error(e),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(r,e){return r instanceof MediaStreamTrack&&(e._sharedTracks.videoDeviceId=r),e._preloadCache.videoDeviceId=r,!0}},audioSource:{validate:function(r,e){return r instanceof MediaStreamTrack&&(e._sharedTracks.audioDeviceId=r),e._preloadCache.audioDeviceId=r,!0}},subscribeToTracksAutomatically:{validate:function(r,e){return e._preloadCache.subscribeToTracksAutomatically=r,!0}},theme:{validate:function(r){var e=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],n=function(s){for(var a=0,o=Object.keys(s);a<o.length;a++){var c=o[a];if(!e.includes(c))return console.error('unsupported color "'.concat(c,'". Valid colors: ').concat(e.join(", "))),!1;if(!s[c].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(c,' theme color should be provided in valid hex color format. Received: "').concat(s[c],'"')),!1}return!0};return tt(r)==="object"&&("light"in r&&"dark"in r||"colors"in r)?"light"in r&&"dark"in r?"colors"in r.light?"colors"in r.dark?n(r.light.colors)&&n(r.dark.colors):(console.error('Dark theme is missing "colors" property.',r),!1):(console.error('Light theme is missing "colors" property.',r),!1):n(r.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',r),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(r){if("grid"in r){var e=r.grid;if("maxTilesPerPage"in e){if(!Number.isInteger(e.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(e.maxTilesPerPage,".")),!1;if(e.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in e){if(!Number.isInteger(e.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(e.minTilesPerPage,".")),!1;if(e.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in e&&e.minTilesPerPage>e.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(r){return T0(r,{allowAllParticipantsKey:!1})},help:P0({allowAllParticipantsKey:!1})},sendSettings:{validate:function(r,e){return!!function(n,s){try{return s.validateUpdateSendSettings(n),!0}catch(a){return console.error("Failed to validate send settings",a),!1}}(r,e)&&(e._preloadCache.sendSettings=r,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(r,e){var n;return!!N0(r)&&(e._preloadCache.inputSettings||(e._preloadCache.inputSettings={}),A0(r,(n=e.properties)===null||n===void 0?void 0:n.dailyConfig),r.audio&&(e._preloadCache.inputSettings.audio=r.audio),r.video&&(e._preloadCache.inputSettings.video=r.video),!0)},help:Th()},layout:{validate:function(r){return r==="custom-v1"||r==="browser"||r==="none"},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0},Ql={styles:{validate:function(r){for(var e in r)if(e!=="cam"&&e!=="screen")return!1;if(r.cam){for(var n in r.cam)if(n!=="div"&&n!=="video")return!1}if(r.screen){for(var s in r.screen)if(s!=="div"&&s!=="video")return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(r,e){if(e._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,"staged"];if(n.includes(r)||!Je()&&r==="avatar")return!0;var s=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"];return function a(o){var c=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var d in o)if(d==="custom"){if(!n.includes(o[d])&&!a(o[d],!0))return!1}else{var f=!c&&!s.includes(d),v=!n.includes(o[d]);if(f||v)return!1}return!0}(r)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(Je()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(r){return r===!1},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(r){for(var e=0,n=Object.entries(r);e<n.length;e++){var s=Vi(n[e],2),a=s[0],o=s[1];switch(a){case"hasPresence":if(typeof o!="boolean")return!1;break;case"canSend":if(o instanceof Set||o instanceof Array){var c,d=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],f=$v(o);try{for(f.s();!(c=f.n()).done;){var v=c.value;if(!d.includes(v))return!1}}catch(P){f.e(P)}finally{f.f()}}else if(typeof o!="boolean")return!1;o instanceof Array&&(r.canSend=new Set(o));break;case"canAdmin":if(o instanceof Set||o instanceof Array){var g,w=["participants","streaming","transcription"],x=$v(o);try{for(x.s();!(g=x.n()).done;){var k=g.value;if(!w.includes(k))return!1}}catch(P){x.e(P)}finally{x.f()}}else if(typeof o!="boolean")return!1;o instanceof Array&&(r.canAdmin=new Set(o));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=function(){var r=je(function*(e){return new Promise(function(n,s){var a=[];e.forEach(function(o){return Promise.resolve(o).then(function(c){n(c)}).catch(function(c){a.push(c),a.length===e.length&&s(a)})})})});return function(e){return r.apply(this,arguments)}}());var ij=function(r){Tc(Y,br);var e,n,s,a,o,c,d,f,v,g,w,x,k,P,N,j,$,K,G,F,U,A,H,te,ae,se,we,De,Ie,Ye,vt,nt,ve,ie,me,oe,M=nj(Y);function Y(m){var _,S,E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(zn(this,Y),ri(mr(_=M.call(this)),"startListeningForDeviceChanges",function(){JC(_.handleDeviceChange)}),ri(mr(_),"stopListeningForDeviceChanges",function(){KC(_.handleDeviceChange)}),ri(mr(_),"handleDeviceChange",function(q){q=q.map(function(ne){return JSON.parse(JSON.stringify(ne))}),_.emit(Ev,{action:Ev,availableDevices:q})}),ri(mr(_),"handleNativeAppStateChange",function(){var q=je(function*(ne){if(ne==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield _.destroy());var le=ne==="active";_.disableReactNativeAutoDeviceManagement("video")||(le?_.camUnmutedBeforeLosingNativeActiveState&&_.setLocalVideo(!0):(_.camUnmutedBeforeLosingNativeActiveState=_.localVideo(),_.camUnmutedBeforeLosingNativeActiveState&&_.setLocalVideo(!1)))});return function(ne){return q.apply(this,arguments)}}()),ri(mr(_),"handleNativeAudioFocusChange",function(q){_.disableReactNativeAutoDeviceManagement("audio")||(_._hasNativeAudioFocus=q,_.toggleParticipantAudioBasedOnNativeAudioFocus(),_._hasNativeAudioFocus?_.micUnmutedBeforeLosingNativeAudioFocus&&_.setLocalAudio(!0):(_.micUnmutedBeforeLosingNativeAudioFocus=_.localAudio(),_.setLocalAudio(!1)))}),ri(mr(_),"handleNativeSystemScreenCaptureStop",function(){_.stopScreenShare()}),_.strictMode=E.strictMode===void 0||E.strictMode,Kn){if(_._logDuplicateInstanceAttempt(),_.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed")}else S=mr(_),Kn=S;if(window._daily||(window._daily={pendings:[],instances:{}}),_._callFrameId=Ac(),window._daily.instances[_._callFrameId]={},_._sharedTracks={},window._daily.instances[_._callFrameId].tracks=_._sharedTracks,E.dailyJsVersion=Y.version(),_._iframe=m,_._callObjectMode=E.layout==="none"&&!_._iframe,_._preloadCache={subscribeToTracksAutomatically:!0,audioDeviceId:null,videoDeviceId:null,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},E.showLocalVideo!==void 0?_._callObjectMode?console.error("showLocalVideo is not available in call object mode"):_._showLocalVideo=!!E.showLocalVideo:_._showLocalVideo=!0,E.showParticipantsBar!==void 0?_._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):_._showParticipantsBar=!!E.showParticipantsBar:_._showParticipantsBar=!0,E.customIntegrations!==void 0?_._callObjectMode?console.error("customIntegrations is not available in call object mode"):_._customIntegrations=E.customIntegrations:_._customIntegrations={},E.customTrayButtons!==void 0?_._callObjectMode?console.error("customTrayButtons is not available in call object mode"):_._customTrayButtons=E.customTrayButtons:_._customTrayButtons={},E.activeSpeakerMode!==void 0?_._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):_._activeSpeakerMode=!!E.activeSpeakerMode:_._activeSpeakerMode=!1,E.receiveSettings?_._callObjectMode?_._receiveSettings=E.receiveSettings:console.error("receiveSettings is only available in call object mode"):_._receiveSettings={},_.validateProperties(E),_.properties=Ne({},E),_._preloadCache.inputSettings||(_._preloadCache.inputSettings={}),E.inputSettings&&E.inputSettings.audio&&(_._preloadCache.inputSettings.audio=E.inputSettings.audio),E.inputSettings&&E.inputSettings.video&&(_._preloadCache.inputSettings.video=E.inputSettings.video),_._callObjectLoader=_._callObjectMode?new DC(_._callFrameId):null,_._callState=fh,_._isPreparingToJoin=!1,_._accessState={access:ec},_._meetingSessionSummary={},_._finalSummaryOfPrevSession={},_._meetingSessionState=$d(qv,_._callObjectMode),_._nativeInCallAudioMode=Vv,_._participants={},_._isScreenSharing=!1,_._participantCounts=Gv,_._rmpPlayerState={},_._waitingParticipants={},_._network={threshold:"good",quality:100},_._activeSpeaker={},_._localAudioLevel=0,_._remoteParticipantsAudioLevel={},_._messageChannel=Je()?new IC:new RC,_._iframe&&(_._iframe.requestFullscreen?_._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===_._iframe?(_.emit(Oi,{action:Oi}),_.sendMessageToCallMachine({action:Oi})):(_.emit(Ii,{action:Ii}),_.sendMessageToCallMachine({action:Ii}))}):_._iframe.webkitRequestFullscreen&&_._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===_._iframe?(_.emit(Oi,{action:Oi}),_.sendMessageToCallMachine({action:Oi})):(_.emit(Ii,{action:Ii}),_.sendMessageToCallMachine({action:Ii}))})),Je()){var T=_.nativeUtils();T.addAudioFocusChangeListener&&T.removeAudioFocusChangeListener&&T.addAppStateChangeListener&&T.removeAppStateChangeListener&&T.addSystemScreenCaptureStopListener&&T.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),_._hasNativeAudioFocus=!0,T.addAudioFocusChangeListener(_.handleNativeAudioFocusChange),T.addAppStateChangeListener(_.handleNativeAppStateChange),T.addSystemScreenCaptureStopListener(_.handleNativeSystemScreenCaptureStop)}return _._callObjectMode&&_.startListeningForDeviceChanges(),_._messageChannel.addListenerForMessagesFromCallMachine(_.handleMessageFromCallMachine,_._callFrameId,mr(_)),_}return Vn(Y,[{key:"destroy",value:(oe=je(function*(){var m,_;try{yield this.leave()}catch{}var S=this._iframe;if(S){var E=S.parentElement;E&&E.removeChild(S)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),Je()){var T=this.nativeUtils();T.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),T.removeAppStateChangeListener(this.handleNativeAppStateChange),T.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0;try{this.emit("call-instance-destroyed",{action:"call-instance-destroyed"})}catch{console.log("could not emit call-instance-destroyed")}Kn=void 0,!((m=window)===null||m===void 0||(_=m._daily)===null||_===void 0)&&_.instances&&delete window._daily.instances[this._callFrameId],this.strictMode&&(this._callFrameId=void 0)}),function(){return oe.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(m){var _=m.bodyClass,S=m.cssFile,E=m.cssText;return Be(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(S),bodyClass:_,cssText:E}),this}},{key:"iframe",value:function(){return Be(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return Qn(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return Qn(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(m,_){for(var S in _){if(!Ql[S])throw new Error("unrecognized updateParticipant property ".concat(S));if(Ql[S].validate&&!Ql[S].validate(_[S],this,this._participants[m]))throw new Error(Ql[S].help)}}},{key:"updateParticipant",value:function(m,_){return this._participants.local&&this._participants.local.session_id===m&&(m="local"),m&&_&&(this.validateParticipantProperties(m,_),this.sendMessageToCallMachine({action:"update-participant",id:m,properties:_})),this}},{key:"updateParticipants",value:function(m){var _=this._participants.local&&this._participants.local.session_id;for(var S in m)S===_&&(S="local"),S&&m[S]&&this.validateParticipantProperties(S,m[S]);return this.sendMessageToCallMachine({action:"update-participants",participants:m}),this}},{key:"updateWaitingParticipant",value:(me=je(function*(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Qn(this._callObjectMode,"updateWaitingParticipant()"),pt(this._callState,"updateWaitingParticipant()"),typeof _!="string"||tt(S)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(E,T){m.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:_,updates:S},function(q){q.error&&T(q.error),q.id||T(new Error("unknown error in updateWaitingParticipant()")),E({id:q.id})})})}),function(){return me.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(ie=je(function*(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Qn(this._callObjectMode,"updateWaitingParticipants()"),pt(this._callState,"updateWaitingParticipants()"),tt(_)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise(function(S,E){m.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:_},function(T){T.error&&E(T.error),T.ids||E(new Error("unknown error in updateWaitingParticipants()")),S({ids:T.ids})})})}),function(){return ie.apply(this,arguments)})},{key:"requestAccess",value:(ve=je(function*(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},S=_.access,E=S===void 0?{level:C_}:S,T=_.name,q=T===void 0?"":T;return Qn(this._callObjectMode,"requestAccess()"),pt(this._callState,"requestAccess()"),new Promise(function(ne,le){m.sendMessageToCallMachine({action:"daily-method-request-access",access:E,name:q},function(_e){_e.error&&le(_e.error),_e.access||le(new Error("unknown error in requestAccess()")),ne({access:_e.access,granted:_e.granted})})})}),function(){return ve.apply(this,arguments)})},{key:"localAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.audio.state):null}},{key:"localVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.video.state):null}},{key:"setLocalAudio",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in _&&(Je()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),_={}):m&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),_={})),this.sendMessageToCallMachine({action:"local-audio",state:m,options:_}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(m){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:m}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(m){return this.sendMessageToCallMachine({action:"local-video",state:m}),this}},{key:"getReceiveSettings",value:(nt=je(function*(m){var _=this,S=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,E=S!==void 0&&S;if(Qn(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(tt(m)){case"string":return new Promise(function(T){_.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:m,showInheritedValues:E},function(q){T(q.receiveSettings)})});case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}}),function(m){return nt.apply(this,arguments)})},{key:"updateReceiveSettings",value:(vt=je(function*(m){var _=this;if(Qn(this._callObjectMode,"updateReceiveSettings()"),!T0(m,{allowAllParticipantsKey:!0}))throw new Error(P0({allowAllParticipantsKey:!0}));return pt(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise(function(S){_.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:m},function(E){S({receiveSettings:E.receiveSettings})})})}),function(m){return vt.apply(this,arguments)})},{key:"_prepInputSettingsToPresentToUser",value:function(m){var _,S,E,T,q,ne,le,_e;if(m){var Ke={},lt=((_=m.audio)===null||_===void 0||(S=_.processor)===null||S===void 0?void 0:S.type)==="none"&&((E=m.audio)===null||E===void 0||(T=E.processor)===null||T===void 0?void 0:T._isDefaultWhenNone);if(m.audio&&!lt){var yt=Ne({},m.audio.processor);delete yt._isDefaultWhenNone,Ke.audio=Ne(Ne({},m.audio),{},{processor:yt})}var ct=((q=m.video)===null||q===void 0||(ne=q.processor)===null||ne===void 0?void 0:ne.type)==="none"&&((le=m.video)===null||le===void 0||(_e=le.processor)===null||_e===void 0?void 0:_e._isDefaultWhenNone);if(m.video&&!ct){var st=Ne({},m.video.processor);delete st._isDefaultWhenNone,Ke.video=Ne(Ne({},m.video),{},{processor:st})}return Ke}}},{key:"getInputSettings",value:function(){var m=this;return Be(),new Promise(function(_){_(m._getInputSettings())})}},{key:"_getInputSettings",value:function(){var m,_,S,E,T,q,ne,le,_e={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(m=((S=this._inputSettings)===null||S===void 0?void 0:S.video)||_e,_=((E=this._inputSettings)===null||E===void 0?void 0:E.audio)||_e):(m=((T=this._preloadCache)===null||T===void 0||(q=T.inputSettings)===null||q===void 0?void 0:q.video)||_e,_=((ne=this._preloadCache)===null||ne===void 0||(le=ne.inputSettings)===null||le===void 0?void 0:le.audio)||_e);var Ke={audio:_,video:m};return this._prepInputSettingsToPresentToUser(Ke)}},{key:"updateInputSettings",value:(Ye=je(function*(m){var _=this;return Be(),N0(m)?(m&&(this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),A0(m,this.properties.dailyConfig),m.audio&&(this._preloadCache.inputSettings.audio=m.audio),m.video&&(this._preloadCache.inputSettings.video=m.video)),m.video||m.audio?this._callObjectMode&&!this._callMachineInitialized?this._getInputSettings():new Promise(function(S,E){_.sendMessageToCallMachine({action:"update-input-settings",inputSettings:m},function(T){T.error?E(T.error):S({inputSettings:_._prepInputSettingsToPresentToUser(T.inputSettings)})})}):this._getInputSettings()):(console.error(Th()),Promise.reject(Th()))}),function(m){return Ye.apply(this,arguments)})},{key:"setBandwidth",value:function(m){var _=m.kbs,S=m.trackConstraints;if(Be(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:_,trackConstraints:S}),this}},{key:"getDailyLang",value:function(){var m=this;if(Be(),this._callMachineInitialized)return new Promise(function(_){m.sendMessageToCallMachine({action:"get-daily-lang"},function(S){delete S.action,delete S.callbackStamp,_(S)})})}},{key:"setDailyLang",value:function(m){return Be(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:m}),this}},{key:"setProxyUrl",value:function(m){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:m}),this}},{key:"setIceConfig",value:function(m){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:m}),this}},{key:"meetingSessionSummary",value:function(){return[gr,vr].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(Ie=je(function*(){var m=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),pt(this._callState,"getMeetingSession()"),new Promise(function(_){m.sendMessageToCallMachine({action:"get-meeting-session"},function(S){delete S.action,delete S.callbackStamp,delete S.callFrameId,_(S)})})}),function(){return Ie.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return pt(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";Qn(this._callObjectMode,"setMeetingSessionData()"),pt(this._callState,"setMeetingSessionData");try{(function(S,E){new MC({data:S,mergeStrategy:E})})(m,_)}catch(S){throw console.error(S),S}try{this.sendMessageToCallMachine({action:"set-session-data",data:m,mergeStrategy:_})}catch(S){throw new Error("Error setting meeting session data: ".concat(S))}}},{key:"setUserName",value:function(m,_){var S=this;return this.properties.userName=m,new Promise(function(E){S.sendMessageToCallMachine({action:"set-user-name",name:m??"",thisMeetingOnly:Je()||!!_&&!!_.thisMeetingOnly},function(T){delete T.action,delete T.callbackStamp,E(T)})})}},{key:"setUserData",value:(De=je(function*(m){var _=this;try{j0(m)}catch(S){throw console.error(S),S}if(this.properties.userData=m,this._callMachineInitialized)return new Promise(function(S){try{_.sendMessageToCallMachine({action:"set-user-data",userData:m},function(E){delete E.action,delete E.callbackStamp,delete E.callFrameId,S(E)})}catch(E){throw new Error("Error setting user data: ".concat(E))}})}),function(m){return De.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(m){if(m&&(m<100||typeof m!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(m){var _=this;if(typeof AudioWorkletNode>"u"&&!Je())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(m),this._callMachineInitialized)return new Promise(function(S,E){_.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:m},function(T){T.error?E({error:T.error}):S()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:m}}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(m){var _=this;if(this.validateAudioLevelInterval(m),this._callMachineInitialized)return new Promise(function(S,E){_.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:m},function(T){T.error?E({error:T.error}):S()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:m}}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(we=je(function*(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Qn(this._callObjectMode,"startCamera()"),Wv(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),Pi(this._testCallInProgress,"startCamera()"),this.needsLoad())try{yield this.load(_)}catch(S){return Promise.reject(S)}else{if(this._didPreAuth){if(_.url&&_.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(_.token&&_.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(_),this.properties=Ne(Ne({},this.properties),_)}return new Promise(function(S){m.sendMessageToCallMachine({action:"start-camera",properties:Cs(m.properties,m._callFrameId),preloadCache:Cs(m._preloadCache,m._callFrameId)},function(E){delete E.action,delete E.callbackStamp,S(E)})})}),function(){return we.apply(this,arguments)})},{key:"validateCustomTrack",value:function(m,_,S){if(S&&S.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(_&&_!=="music"&&_!=="speech"&&!(_ instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(S&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(S))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(m instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName};return Be(),pt(this._callState,"startCustomTrack()"),this.validateCustomTrack(_.track,_.mode,_.trackName),new Promise(function(S,E){m._sharedTracks.customTrack=_.track,_.track=so,m.sendMessageToCallMachine({action:"start-custom-track",properties:_},function(T){T.error?E({error:T.error}):S(T.mediaTag)})})}},{key:"stopCustomTrack",value:function(m){var _=this;return Be(),pt(this._callState,"stopCustomTrack()"),new Promise(function(S){_.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:m},function(E){S(E.mediaTag)})})}},{key:"setCamera",value:function(m){var _=this;return eo(),Bd(this._callMachineInitialized,"setCamera()"),new Promise(function(S){_.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:m},function(E){S({device:E.device})})})}},{key:"setAudioDevice",value:(se=je(function*(m){return eo(),this.nativeUtils().setAudioDevice(m),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(m){return se.apply(this,arguments)})},{key:"cycleCamera",value:function(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise(function(S){m.sendMessageToCallMachine({action:"cycle-camera",properties:_},function(E){S({device:E.device})})})}},{key:"cycleMic",value:function(){var m=this;return Be(),new Promise(function(_){m.sendMessageToCallMachine({action:"cycle-mic"},function(S){_({device:S.device})})})}},{key:"getCameraFacingMode",value:function(){var m=this;return eo(),new Promise(function(_){m.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(S){_(S.facingMode)})})}},{key:"setInputDevicesAsync",value:(ae=je(function*(m){var _=this,S=m.audioDeviceId,E=m.videoDeviceId,T=m.audioSource,q=m.videoSource;return Be(),T!==void 0&&(S=T),q!==void 0&&(E=q),S&&(this._preloadCache.audioDeviceId=S,this._sharedTracks.audioDeviceId=S),E&&(this._preloadCache.videoDeviceId=E,this._sharedTracks.videoDeviceId=E),this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:(S instanceof MediaStreamTrack&&(S=so),E instanceof MediaStreamTrack&&(E=so),new Promise(function(ne){_.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:S,videoDeviceId:E},function(le){delete le.action,delete le.callbackStamp,le.returnPreloadCache?ne({camera:{deviceId:_._preloadCache.videoDeviceId},mic:{deviceId:_._preloadCache.audioDeviceId},speaker:{deviceId:_._preloadCache.outputDeviceId}}):ne(le)})}))}),function(m){return ae.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(te=je(function*(m){var _=this,S=m.outputDeviceId;return Be(),S&&(this._preloadCache.outputDeviceId=S),this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:new Promise(function(E){_.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:S},function(T){delete T.action,delete T.callbackStamp,T.returnPreloadCache?E({camera:{deviceId:_._preloadCache.videoDeviceId},mic:{deviceId:_._preloadCache.audioDeviceId},speaker:{deviceId:_._preloadCache.outputDeviceId}}):E(T)})})}),function(m){return te.apply(this,arguments)})},{key:"getInputDevices",value:(H=je(function*(){var m=this;return this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:new Promise(function(_){m.sendMessageToCallMachine({action:"get-input-devices"},function(S){delete S.action,delete S.callbackStamp,S.returnPreloadCache?_({camera:{deviceId:m._preloadCache.videoDeviceId},mic:{deviceId:m._preloadCache.audioDeviceId},speaker:{deviceId:m._preloadCache.outputDeviceId}}):_(S)})})}),function(){return H.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return eo(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(m){if(eo(),[Vv,rj].includes(m)){if(m!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=m,!this.disableReactNativeAutoDeviceManagement("audio")&&oc(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",m)}},{key:"preAuth",value:(A=je(function*(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Qn(this._callObjectMode,"preAuth()"),Wv(this._callState,this._isPreparingToJoin,"preAuth()"),Pi(this._testCallInProgress,"preAuth()"),this.needsLoad()&&(yield this.load(_)),!_.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(_),this.properties=Ne(Ne({},this.properties),_),new Promise(function(S,E){m.sendMessageToCallMachine({action:"daily-method-preauth",properties:Cs(m.properties,m._callFrameId),preloadCache:Cs(m._preloadCache,m._callFrameId)},function(T){return T.error?E(T.error):T.access?(m._didPreAuth=!0,void S({access:T.access})):E(new Error("unknown error in preAuth()"))})})}),function(){return A.apply(this,arguments)})},{key:"load",value:(U=je(function*(m){var _=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(m&&(this.validateProperties(m),this.properties=Ne(Ne({},this.properties),m)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");this._updateCallState(xv);try{this.emit(mh,{action:mh})}catch(S){console.log("could not emit 'loading'",S)}return this._callObjectMode?new Promise(function(S,E){_._callObjectLoader.cancel();var T=Date.now();_._callObjectLoader.load(_.properties.dailyConfig,function(q){_._bundleLoadTime=q?"no-op":Date.now()-T,_._updateCallState(Sv),q&&_.emit(tc,{action:tc}),S()},function(q,ne){if(_.emit(gh,{action:gh,error:q}),!ne){_._updateCallState(vr),_.resetMeetingDependentVars();var le={action:sc,errorMsg:q.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:q,bundleUrl:dc(_.properties.dailyConfig)}}};_._maybeSendToSentry(le),_.emit(sc,le),E(q.msg)}})}):(this._iframe.src=i_(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise(function(S,E){_._loadedCallback=function(T){_._callState!==vr?(_._updateCallState(Sv),(_.properties.cssFile||_.properties.cssText)&&_.loadCss(_.properties),S()):E(T)}}))}}),function(m){return U.apply(this,arguments)})},{key:"join",value:(F=je(function*(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Pi(this._testCallInProgress,"join()");var S=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(_)}catch(E){return this.updateIsPreparingToJoin(!1),Promise.reject(E)}}else{if(S=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(_.url&&_.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(_.token&&_.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(_.url&&!this._callObjectMode&&_.url&&_.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(_.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(_),this.properties=Ne(Ne({},this.properties),_)}if(_.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!_.showLocalVideo),_.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!_.showParticipantsBar),this._callState===Bi||this._callState===vc)return console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1);this._updateCallState(vc,!1);try{this.emit(vh,{action:vh})}catch(E){console.log("could not emit 'joining-meeting'",E)}return this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),_.inputSettings&&_.inputSettings.audio&&(this._preloadCache.inputSettings.audio=_.inputSettings.audio),_.inputSettings&&_.inputSettings.video&&(this._preloadCache.inputSettings.video=_.inputSettings.video),this.sendMessageToCallMachine({action:"join-meeting",properties:Cs(this.properties,this._callFrameId),preloadCache:Cs(this._preloadCache,this._callFrameId)}),new Promise(function(E,T){m._joinedCallback=function(q,ne){if(m._callState!==vr){if(m._updateCallState(Bi),q)for(var le in q){if(m._callObjectMode){var _e=m._callMachine().store;Mv(q[le],_e),Lv(q[le],_e),Dv(q[le],m._participants[le],_e)}m._participants[le]=Ne({},q[le]),m.toggleParticipantAudioBasedOnNativeAudioFocus()}S&&m.loadCss(m.properties),E(q)}else T(ne)}})}),function(){return F.apply(this,arguments)})},{key:"leave",value:(G=je(function*(){var m=this;return Pi(this._testCallInProgress,"leave()"),new Promise(function(_){if(m._callState===gr||m._callState===vr)_();else if(m._callObjectLoader&&!m._callObjectLoader.loaded){m._callObjectLoader.cancel(),m._updateCallState(gr),m.resetMeetingDependentVars();try{m.emit(gr,{action:gr})}catch(S){console.log("could not emit 'left-meeting'",S)}_()}else m._resolveLeave=_,m.sendMessageToCallMachine({action:"leave-meeting"})})}),function(){return G.apply(this,arguments)})},{key:"startScreenShare",value:(K=je(function*(){var m=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Bd(this._callMachineInitialized,"startScreenShare()"),_.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",_.screenVideoSendSettings),_.mediaStream&&(this._sharedTracks.screenMediaStream=_.mediaStream,_.mediaStream=so),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var S=this.nativeUtils();if(yield S.isScreenBeingCaptured())return void this.emit(ic,{action:ic,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});S.setSystemScreenCaptureStartCallback(function(){S.setSystemScreenCaptureStartCallback(null),m.sendMessageToCallMachine({action:Cv,captureOptions:_})}),S.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Cv,captureOptions:_})}),function(){return K.apply(this,arguments)})},{key:"stopScreenShare",value:function(){Bd(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(Ne({action:"local-recording-start"},m))}},{key:"updateRecording",value:function(m){var _=m.layout,S=_===void 0?{preset:"default"}:_,E=m.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:S,instanceId:E})}},{key:"stopRecording",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(Ne({action:"local-recording-stop"},m))}},{key:"startLiveStreaming",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(Ne({action:"daily-method-start-live-streaming"},m))}},{key:"updateLiveStreaming",value:function(m){var _=m.layout,S=_===void 0?{preset:"default"}:_,E=m.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:S,instanceId:E})}},{key:"addLiveStreamingEndpoints",value:function(m){var _=m.endpoints,S=m.instanceId;this.sendMessageToCallMachine({action:jv,endpointsOp:CC,endpoints:_,instanceId:S})}},{key:"removeLiveStreamingEndpoints",value:function(m){var _=m.endpoints,S=m.instanceId;this.sendMessageToCallMachine({action:jv,endpointsOp:jC,endpoints:_,instanceId:S})}},{key:"stopLiveStreaming",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(Ne({action:"daily-method-stop-live-streaming"},m))}},{key:"validateDailyConfig",value:function(m){m.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(m.camSimulcastEncodings)),m.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),$n().match(/Linux; Android/)&&m.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,S=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(m){if(!(m instanceof Array))throw new Error("encodings must be an Array");if(!Kv(m.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var E=0;E<m.length;E++){var T=m[E];for(var q in this._validateEncodingLayerHasValidProperties(T),T)if(Ud.includes(q)){if(typeof T[q]!="number")throw new Error("".concat(q," must be a number"));if(_){var ne=_[q],le=ne.min,_e=ne.max;if(!Kv(T[q],le,_e))throw new Error("".concat(q," value not in range. valid range: ").concat(le," to ").concat(_e))}}else if(!["active","scalabilityMode"].includes(q))throw new Error("Invalid key ".concat(q,", valid keys are:")+Object.values(Ud));if(S&&!T.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:($=je(function*(m){var _=this,S=m.url,E=m.settings,T=E===void 0?{state:wh.PLAY}:E;try{(function(q){if(typeof q!="string")throw new Error('url parameter must be "string" type')})(S),Jv(T),function(q){for(var ne in q)if(!Yv.includes(ne))throw new Error("Invalid key ".concat(ne,", valid keys are: ").concat(Yv));q.simulcastEncodings&&this.validateSimulcastEncodings(q.simulcastEncodings,C0,!0)}(T)}catch(q){throw console.error("invalid argument Error: ".concat(q)),console.error(`startRemoteMediaPlayer arguments must be of the form: + { url: "playback url", + settings?: + {state: "play"|"pause", simulcastEncodings?: [{}] } }`),q}return new Promise(function(q,ne){_.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:S,settings:T},function(le){le.error?ne({error:le.error,errorMsg:le.errorMsg}):q({session_id:le.session_id,remoteMediaPlayerState:{state:le.state,settings:le.settings}})})})}),function(m){return $.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(j=je(function*(m){var _=this;if(typeof m!="string")throw new Error(" remotePlayerID must be of type string");return new Promise(function(S,E){_.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:m},function(T){T.error?E({error:T.error,errorMsg:T.errorMsg}):S()})})}),function(m){return j.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(N=je(function*(m){var _=this,S=m.session_id,E=m.settings;try{Jv(E)}catch(T){throw console.error("invalid argument Error: ".concat(T)),console.error(`updateRemoteMediaPlayer arguments must be of the form: + session_id: "participant session", + { settings?: {state: "play"|"pause"} }`),T}return new Promise(function(T,q){_.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:S,settings:E},function(ne){ne.error?q({error:ne.error,errorMsg:ne.errorMsg}):T({session_id:ne.session_id,remoteMediaPlayerState:{state:ne.state,settings:ne.settings}})})})}),function(m){return N.apply(this,arguments)})},{key:"startTranscription",value:function(m){this.sendMessageToCallMachine(Ne({action:"daily-method-start-transcription"},m))}},{key:"stopTranscription",value:function(){this.sendMessageToCallMachine({action:"daily-method-stop-transcription"})}},{key:"startDialOut",value:(P=je(function*(m){var _=this;pt(this._callState,"startDialOut()");var S=function(E){if(E){if(!Array.isArray(E))throw new Error("Error starting dial out: audio codec must be an array");if(E.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");E.forEach(function(T){if(typeof T!="string")throw new Error("Error starting dial out: audio codec must be a string");if(T!=="OPUS"&&T!=="PCMU"&&T!=="PCMA"&&T!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")})}};if(!m.sipUri&&!m.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(m.sipUri&&m.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(m.sipUri){if(typeof m.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!m.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(m.video&&typeof m.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(E){if(E&&(S(E.audio),E.video)){if(!Array.isArray(E.video))throw new Error("Error starting dial out: video codec must be an array");if(E.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");E.video.forEach(function(T){if(typeof T!="string")throw new Error("Error starting dial out: video codec must be a string");if(T!=="H264"&&T!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")})}})(m.codecs)}if(m.phoneNumber){if(typeof m.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(m.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");m.codecs&&S(m.codecs.audio)}if(m.callerId){if(typeof m.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(m.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(m.displayName){if(typeof m.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(m.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}return new Promise(function(E,T){_.sendMessageToCallMachine(Ne({action:"dialout-start"},m),function(q){q.error?T(q.error):E(q)})})}),function(m){return P.apply(this,arguments)})},{key:"stopDialOut",value:function(m){var _=this;return pt(this._callState,"stopDialOut()"),new Promise(function(S,E){_.sendMessageToCallMachine(Ne({action:"dialout-stop"},m),function(T){T.error?E(T.error):S(T)})})}},{key:"sendDTMF",value:(k=je(function*(m){var _=this;return pt(this._callState,"sendDTMF()"),function(S){var E=S.sessionId,T=S.tones;if(!E||!T)throw new Error("sessionId and tones are mandatory parameter");if(typeof E!="string"||typeof T!="string")throw new Error("sessionId and tones should be of string type");if(T.length>20)throw new Error("tones string must be upto 20 characters");var q=/[^0-9A-D*#]/g,ne=T.match(q);if(ne&&ne[0])throw new Error("".concat(ne[0]," is not valid DTMF tone"))}(m),new Promise(function(S,E){_.sendMessageToCallMachine(Ne({action:"send-dtmf"},m),function(T){T.error?E(T.error):S(T)})})}),function(m){return k.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var m=this;return this._callState!==Bi?{stats:{latest:{}}}:new Promise(function(_){m.sendMessageToCallMachine({action:"get-calc-stats"},function(S){_(Ne({stats:S.stats},m._network))})})}},{key:"testWebsocketConnectivity",value:(x=je(function*(){var m=this;if(Pi(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(_){return Promise.reject(_)}return new Promise(function(_,S){m.sendMessageToCallMachine({action:"test-websocket-connectivity"},function(E){E.error?S(E.error):_(E.results)})})}),function(){return x.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(m){return m?m instanceof MediaStreamTrack?!!XC(m,{isLocalScreenVideo:!1})||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(w=je(function*(m){var _=this;if(function(le){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",Ke=arguments.length>2?arguments[2]:void 0;if(le){var lt="".concat(_e," can not be called after preAuth(), startCamera(), or join() and call state has been initialized.");throw Ke&&(lt+=" ".concat(Ke)),console.error(lt),new Error(lt)}}(this._callMachineInitialized,"testCallQuality()"),m.videoTrack&&!this._validateVideoTrackForNetworkTests(m.videoTrack))throw new Error("Video track error");var S=this._testCallAlreadyInProgress,E=function(le){S||(_._testCallInProgress=le)};E(!0);var T=m.videoTrack,q=Nd(m,ZC);if(this._sharedTracks.videoTrackForConnectionQualityTest=T,this.needsLoad())try{var ne=this._callState;yield this.load(),this._callState=ne}catch(le){return E(!1),Promise.reject(le)}return new Promise(function(le){_.sendMessageToCallMachine(Ne(Ne({action:"test-call-quality"},q),{},{dailyJsVersion:_.properties.dailyJsVersion}),function(_e){var Ke=_e.results,lt=Ke.result,yt=Nd(Ke,ej);if(lt==="failed"){var ct,st=Ne({},yt);(ct=yt.error)!==null&&ct!==void 0&&ct.details?(yt.error.details=JSON.parse(yt.error.details),st.error=Ne(Ne({},st.error),{},{details:Ne({},st.error.details)}),st.error.details.duringTest="testCallQuality"):(st.error=st.error?Ne({},st.error):{},st.error.details={duringTest:"testCallQuality"}),_._maybeSendToSentry(st)}E(!1),le(Ne({result:lt},yt))})})}),function(m){return w.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(g=je(function*(m){console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead");var _=yield this.testPeerToPeerCallQuality(m),S={result:_.result,secondsElapsed:_.secondsElapsed};return _.data&&(S.data={maxRTT:_.data.maxRoundTripTime,packetLoss:_.data.avgRecvPacketLoss}),S}),function(m){return g.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(v=je(function*(m){var _=this;if(Pi(this._testCallInProgress,"testConnectionQuality()"),this.needsLoad())try{yield this.load()}catch(T){return Promise.reject(T)}var S=m.videoTrack,E=m.duration;if(!this._validateVideoTrackForNetworkTests(S))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=S,new Promise(function(T,q){_.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:E},function(ne){ne.error?q(ne.error):T(ne.results)})})}),function(m){return v.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){console.warn("stopTestConnectionQuality() is deprecated: use stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(f=je(function*(m){var _=this;if(Pi(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(S){return Promise.reject(S)}if(!this._validateVideoTrackForNetworkTests(m))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=m,new Promise(function(S,E){_.sendMessageToCallMachine({action:"test-network-connectivity"},function(T){T.error?E(T.error):S(T.results)})})}),function(m){return f.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var m=this;return new Promise(function(_,S){m._callState===Bi?m.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(E){_(E.cpuStats)}):_({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:"_validateEncodingLayerHasValidProperties",value:function(m){var _;if(!(((_=Object.keys(m))===null||_===void 0?void 0:_.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(Ud))}},{key:"_validateVideoSendSettings",value:function(m,_){var S=m==="screenVideo"?["default-screen-video","detail-optimized","motion-optimized","motion-and-detail-balanced"]:["default-video","bandwidth-optimized","bandwidth-and-quality-balanced","quality-optimized","adaptive-2-layers","adaptive-3-layers"],E="Video send settings should be either an object or one of the supported presets: ".concat(S.join());if(typeof _=="string"){if(!S.includes(_))throw new Error(E)}else{if(tt(_)!=="object")throw new Error(E);if(!_.maxQuality&&!_.encodings&&_.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(_.maxQuality&&["low","medium","high"].indexOf(_.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(_.encodings){var T=!1;switch(Object.keys(_.encodings).length){case 1:T=!_.encodings.low;break;case 2:T=!_.encodings.low||!_.encodings.medium;break;case 3:T=!_.encodings.low||!_.encodings.medium||!_.encodings.high;break;default:T=!0}if(T)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");_.encodings.low&&this._validateEncodingLayerHasValidProperties(_.encodings.low),_.encodings.medium&&this._validateEncodingLayerHasValidProperties(_.encodings.medium),_.encodings.high&&this._validateEncodingLayerHasValidProperties(_.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(m){var _=this;if(!m||Object.keys(m).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(m).forEach(function(S){var E=Vi(S,2),T=E[0],q=E[1];_._validateVideoSendSettings(T,q)})}},{key:"updateSendSettings",value:function(m){var _=this;return this.validateUpdateSendSettings(m),this.needsLoad()?(this._preloadCache.sendSettings=m,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(S,E){_.sendMessageToCallMachine({action:"update-send-settings",sendSettings:m},function(T){T.error?E(T.error):S(T.sendSettings)})})}},{key:"getSendSettings",value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:"getLocalAudioLevel",value:function(){return this._localAudioLevel}},{key:"getRemoteParticipantsAudioLevel",value:function(){return this._remoteParticipantsAudioLevel}},{key:"getActiveSpeaker",value:function(){return Be(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(m){return Be(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:m}),this}},{key:"activeSpeakerMode",value:function(){return Be(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(m){return pt(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=m,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:m}),this}},{key:"enumerateDevices",value:(d=je(function*(){var m=this;if(this._callObjectMode){var _=yield navigator.mediaDevices.enumerateDevices();return ui()==="Firefox"&&xh().major>115&&xh().major<123&&(_=_.filter(function(S){return S.kind!=="audiooutput"})),{devices:_.map(function(S){var E=JSON.parse(JSON.stringify(S));if(!Je()&&S.kind==="videoinput"&&S.getCapabilities){var T,q=S.getCapabilities();E.facing=(q==null||(T=q.facingMode)===null||T===void 0?void 0:T.length)>=1?q.facingMode[0]:void 0}return E})}}return new Promise(function(S){m.sendMessageToCallMachine({action:"enumerate-devices"},function(E){S({devices:E.devices})})})}),function(){return d.apply(this,arguments)})},{key:"sendAppMessage",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(pt(this._callState,"sendAppMessage()"),JSON.stringify(m).length>4096)throw new Error("Message data too large. Max size is 4096");return this.sendMessageToCallMachine({action:"app-msg",data:m,to:_}),this}},{key:"addFakeParticipant",value:function(m){return Be(),pt(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(Ne({action:"add-fake-participant"},m)),this}},{key:"setShowNamesMode",value:function(m){return mn(this._callObjectMode,"setShowNamesMode()"),Be(),m&&m!=="always"&&m!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:m}),this)}},{key:"setShowLocalVideo",value:function(){var m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return mn(this._callObjectMode,"setShowLocalVideo()"),Be(),pt(this._callState,"setShowLocalVideo()"),typeof m!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:m}),this._showLocalVideo=m,this)}},{key:"showLocalVideo",value:function(){return mn(this._callObjectMode,"showLocalVideo()"),Be(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return mn(this._callObjectMode,"setShowParticipantsBar()"),Be(),pt(this._callState,"setShowParticipantsBar()"),typeof m!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:m}),this._showParticipantsBar=m,this)}},{key:"showParticipantsBar",value:function(){return mn(this._callObjectMode,"showParticipantsBar()"),Be(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return Be(),mn(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(m){return Be(),mn(this._callObjectMode,"setCustomIntegrations()"),pt(this._callState,"setCustomIntegrations()"),I0(m)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:m}),this._customIntegrations=m,this):this}},{key:"startCustomIntegrations",value:function(m){var _=this;if(Be(),mn(this._callObjectMode,"startCustomIntegrations()"),pt(this._callState,"startCustomIntegrations()"),Array.isArray(m)&&m.some(function(T){return typeof T!="string"})||!Array.isArray(m)&&typeof m!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var S=typeof m=="string"?[m]:m,E=S.filter(function(T){return!(T in _._customIntegrations)});return E.length?(console.error(`Can't find custom integration(s): "`.concat(E.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:S}),this)}},{key:"stopCustomIntegrations",value:function(m){var _=this;if(Be(),mn(this._callObjectMode,"stopCustomIntegrations()"),pt(this._callState,"stopCustomIntegrations()"),Array.isArray(m)&&m.some(function(T){return typeof T!="string"})||!Array.isArray(m)&&typeof m!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var S=typeof m=="string"?[m]:m,E=S.filter(function(T){return!(T in _._customIntegrations)});return E.length?(console.error(`Can't find custom integration(s): "`.concat(E.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:S}),this)}},{key:"customTrayButtons",value:function(){return mn(this._callObjectMode,"customTrayButtons()"),Be(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(m){return mn(this._callObjectMode,"updateCustomTrayButtons()"),Be(),pt(this._callState,"updateCustomTrayButtons()"),O0(m)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:m}),this._customTrayButtons=m,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(_c))),this)}},{key:"theme",value:function(){return mn(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(m){var _=this;return mn(this._callObjectMode,"setTheme()"),new Promise(function(S,E){try{_.validateProperties({theme:m}),_.properties.theme=Ne({},m),_.sendMessageToCallMachine({action:"set-theme",theme:_.properties.theme});try{_.emit(ph,{action:ph,theme:_.properties.theme})}catch(T){console.log("could not emit 'theme-updated'",T)}S(_.properties.theme)}catch(T){E(T)}})}},{key:"requestFullscreen",value:(c=je(function*(){if(Be(),this._iframe&&!document.fullscreenElement&&Nv())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(m){console.log("could not make video call fullscreen",m)}}),function(){return c.apply(this,arguments)})},{key:"exitFullscreen",value:function(){Be(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(o=je(function*(){var m=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise(function(_){m.sendMessageToCallMachine({action:"get-sidebar-view"},function(S){_(S.view)})})}),function(){return o.apply(this,arguments)})},{key:"setSidebarView",value:function(m){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:m}),this)}},{key:"room",value:(a=je(function*(){var m=this,_=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,S=_===void 0||_;return this._accessState.access===ec||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(E){m.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:S},function(T){delete T.action,delete T.callbackStamp,E(T)})})}),function(){return a.apply(this,arguments)})},{key:"geo",value:(s=je(function*(){try{var m=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield m.json()).geo}}catch(_){return console.error("geo lookup failed",_),{current:""}}}),function(){return s.apply(this,arguments)})},{key:"setNetworkTopology",value:(n=je(function*(m){var _=this;return Be(),pt(this._callState,"setNetworkTopology()"),new Promise(function(S,E){_.sendMessageToCallMachine({action:"set-network-topology",opts:m},function(T){T.error?E({error:T.error}):S({workerId:T.workerId})})})}),function(m){return n.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=je(function*(){var m=this;return new Promise(function(_,S){m.needsLoad()&&_({topology:"none"}),m.sendMessageToCallMachine({action:"get-network-topology"},function(E){E.error?S({error:E.error}):_({topology:E.topology})})})}),function(){return e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(m){if(Be(),typeof m!="number"&&m!==!0&&m!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(m));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:m})}},{key:"on",value:function(m,_){return br.prototype.on.call(this,m,_)}},{key:"once",value:function(m,_){return br.prototype.once.call(this,m,_)}},{key:"off",value:function(m,_){return br.prototype.off.call(this,m,_)}},{key:"validateProperties",value:function(m){for(var _ in m){if(!Ai[_])throw new Error("unrecognized property '".concat(_,"'"));if(Ai[_].validate&&!Ai[_].validate(m[_],this))throw new Error("property '".concat(_,"': ").concat(Ai[_].help))}}},{key:"assembleMeetingUrl",value:function(){var m,_,S=Ne(Ne({},this.properties),{},{emb:this._callFrameId,embHref:encodeURIComponent(window.location.href),proxy:(m=this.properties.dailyConfig)!==null&&m!==void 0&&m.proxyUrl?encodeURIComponent((_=this.properties.dailyConfig)===null||_===void 0?void 0:_.proxyUrl):void 0}),E=S.url.match(/\?/)?"&":"?";return S.url+E+Object.keys(Ai).filter(function(T){return Ai[T].queryString&&S[T]!==void 0}).map(function(T){return"".concat(Ai[T].queryString,"=").concat(S[T])}).join("&")}},{key:"needsLoad",value:function(){return[fh,xv,gr,vr].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(m,_){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(m,_,this._iframe,this._callFrameId)}},{key:"forwardPackagedMessageToCallMachine",value:function(m){this._messageChannel.forwardPackagedMessageToCallMachine(m,this._iframe,this._callFrameId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(m){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(m,this._callFrameId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(m){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(m)}},{key:"handleMessageFromCallMachine",value:function(m){switch(m.action){case N_:this.sendMessageToCallMachine(Ne({action:A_},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var _={action:Za,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:dc(this.properties.dailyConfig)}};this.sendMessageToCallMachine(_),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case tc:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null);try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}break;case O_:this._joinedCallback&&(this._joinedCallback(m.participants),this._joinedCallback=null);try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}break;case M_:case L_:if(this._callState===gr)return;if(m.participant&&m.participant.session_id){var S=m.participant.local?"local":m.participant.session_id;if(this._callObjectMode){var E=this._callMachine().store;Mv(m.participant,E),Lv(m.participant,E),Dv(m.participant,this._participants[S],E)}try{this.maybeParticipantTracksStopped(this._participants[S],m.participant),this.maybeParticipantTracksStarted(this._participants[S],m.participant),this.maybeEventRecordingStopped(this._participants[S],m.participant),this.maybeEventRecordingStarted(this._participants[S],m.participant)}catch(be){console.error("track events error",be)}if(!this.compareEqualForParticipantUpdateEvent(m.participant,this._participants[S])){this._participants[S]=Ne({},m.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus();try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}}}break;case D_:if(m.participant&&m.participant.session_id){var T=this._participants[m.participant.session_id];T&&this.maybeParticipantTracksStopped(T,null),delete this._participants[m.participant.session_id];try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}}break;case F_:if(!ln(this._participantCounts,m.participantCounts)){this._participantCounts=m.participantCounts;try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}}break;case U_:var q={access:m.access};if(m.awaitingAccess&&(q.awaitingAccess=m.awaitingAccess),!ln(this._accessState,q)){this._accessState=q;try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}}break;case B_:if(m.meetingSession){this._meetingSessionSummary=m.meetingSession;try{delete m.callFrameId,this.emit(m.action,m);var ne=Ne(Ne({},m),{},{action:"meeting-session-updated"});this.emit(ne.action,ne)}catch(be){console.log("could not emit",m,be)}}break;case sc:var le;this._iframe&&!m.preserveIframe&&(this._iframe.src=""),this._updateCallState(vr),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(m.errorMsg),this._loadedCallback=null),m.preserveIframe;var _e=Nd(m,tj);_e!=null&&(le=_e.error)!==null&&le!==void 0&&le.details&&(_e.error.details=JSON.parse(_e.error.details)),this._maybeSendToSentry(m),this._joinedCallback&&(this._joinedCallback(null,_e),this._joinedCallback=null);try{this.emit(m.action,_e)}catch(be){console.log("could not emit",m,be)}break;case I_:this._callState!==vr&&this._updateCallState(gr),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null);try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}break;case"selected-devices-updated":if(m.devices)try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}break;case l0:var Ke=m.threshold,lt=m.quality;if(Ke!==this._network.threshold||lt!==this._network.quality){this._network.quality=lt,this._network.threshold=Ke;try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}}break;case u0:if(m&&m.cpuLoadState)try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}break;case d0:if(m&&m.faceCounts!==void 0)try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}break;case a0:var yt=m.activeSpeaker;if(this._activeSpeaker.peerId!==yt.peerId){this._activeSpeaker.peerId=yt.peerId;try{this.emit(m.action,{action:m.action,activeSpeaker:this._activeSpeaker})}catch(be){console.log("could not emit",m,be)}}break;case"show-local-video-changed":if(this._callObjectMode)return;var ct=m.show;this._showLocalVideo=ct;try{this.emit(m.action,{action:m.action,show:ct})}catch(be){console.log("could not emit",m,be)}break;case o0:var st=m.enabled;if(this._activeSpeakerMode!==st){this._activeSpeakerMode=st;try{this.emit(m.action,{action:m.action,enabled:this._activeSpeakerMode})}catch(be){console.log("could not emit",m,be)}}break;case z_:case V_:case q_:this._waitingParticipants=m.allWaitingParticipants;try{this.emit(m.action,{action:m.action,participant:m.participant})}catch(be){console.log("could not emit",m,be)}break;case v0:if(!ln(this._receiveSettings,m.receiveSettings)){this._receiveSettings=m.receiveSettings;try{this.emit(m.action,{action:m.action,receiveSettings:m.receiveSettings})}catch(be){console.log("could not emit",m,be)}}break;case y0:if(!ln(this._inputSettings,m.inputSettings)){var rr=this._getInputSettings();if(this._inputSettings=m.inputSettings,this._preloadCache.inputSettings={},!ln(rr,this._getInputSettings()))try{this.emit(m.action,{action:m.action,inputSettings:this._getInputSettings()})}catch(be){console.log("could not emit",m,be)}}break;case"send-settings-updated":if(!ln(this._sendSettings,m.sendSettings)){this._sendSettings=m.sendSettings,this._preloadCache.sendSettings=null;try{this.emit(m.action,{action:m.action,sendSettings:m.sendSettings})}catch(be){console.log("could not emit",m,be)}}break;case"local-audio-level":this._localAudioLevel=m.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(m);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=m.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(m);break;case e0:var bt=m.session_id;this._rmpPlayerState[bt]=m.playerState,this.emitDailyJSEvent(m);break;case n0:delete this._rmpPlayerState[m.session_id],this.emitDailyJSEvent(m);break;case t0:var zt=m.session_id,Ht=this._rmpPlayerState[zt];Ht&&this.compareEqualForRMPUpdateEvent(Ht,m.remoteMediaPlayerState)||(this._rmpPlayerState[zt]=m.remoteMediaPlayerState,this.emitDailyJSEvent(m));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(m);break;case $_:var Mt=this._meetingSessionState.topology!==(m.meetingSessionState&&m.meetingSessionState.topology);this._meetingSessionState=$d(m.meetingSessionState,this._callObjectMode),(this._callObjectMode||Mt)&&this.emitDailyJSEvent(m);break;case r0:this._isScreenSharing=!0,this.emitDailyJSEvent(m);break;case i0:case s0:this._isScreenSharing=!1,this.emitDailyJSEvent(m);break;case nc:case rc:case W_:case J_:case K_:case G_:case Y_:case H_:case P_:case R_:case X_:case Z_:case c0:case Q_:case h0:case f0:case p0:case m0:case ic:case g0:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-error":case"dialout-stopped":case"dialout-warning":try{this.emit(m.action,m)}catch(be){console.log("could not emit",m,be)}break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(m,_){var S="record";if(m&&!_.local&&_[S]===!1&&m[S]!==_[S])try{this.emit(rc,{action:rc})}catch(E){console.log("could not emit",E)}}},{key:"maybeEventRecordingStarted",value:function(m,_){var S="record";if(m&&!_.local&&_[S]===!0&&m[S]!==_[S])try{this.emit(nc,{action:nc})}catch(E){console.log("could not emit",E)}}},{key:"maybeEventTrackStopped",value:function(m,_,S,E){if(m&&(m.readyState==="ended"||!_||m.id!==_.id))try{this.emit(_h,{action:_h,track:m,participant:S,type:E})}catch(T){console.log("maybeEventTrackStopped: could not emit",T)}}},{key:"maybeEventTrackStarted",value:function(m,_,S,E){if(_&&(!m||m.readyState==="ended"||_.id!==m.id))try{this.emit(yh,{action:yh,track:_,participant:S,type:E})}catch(T){console.log("maybeEventTrackStarted: could not emit",T)}}},{key:"maybeParticipantTracksStopped",value:function(m,_){if(m)for(var S in m.tracks)this.maybeEventTrackStopped(m.tracks[S].track,_&&_.tracks[S]?_.tracks[S].track:null,_,S)}},{key:"maybeParticipantTracksStarted",value:function(m,_){if(_)for(var S in _.tracks)this.maybeEventTrackStarted(m&&m.tracks[S]?m.tracks[S].track:null,_.tracks[S].track,_,S)}},{key:"compareEqualForRMPUpdateEvent",value:function(m,_){var S,E;return m.state===_.state&&((S=m.settings)===null||S===void 0?void 0:S.volume)===((E=_.settings)===null||E===void 0?void 0:E.volume)}},{key:"emitDailyJSEvent",value:function(m){try{this.emit(m.action,m)}catch(_){console.log("could not emit",m,_)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(m,_){return!!ln(m,_)&&(!m.videoTrack||!_.videoTrack||m.videoTrack.id===_.videoTrack.id&&m.videoTrack.muted===_.videoTrack.muted&&m.videoTrack.enabled===_.videoTrack.enabled)&&(!m.audioTrack||!_.audioTrack||m.audioTrack.id===_.audioTrack.id&&m.audioTrack.muted===_.audioTrack.muted&&m.audioTrack.enabled===_.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return Je()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(m){this._updateCallState(this._callState,m)}},{key:"_updateCallState",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(m!==this._callState||_!==this._isPreparingToJoin){var S=this._callState,E=this._isPreparingToJoin;this._callState=m,this._isPreparingToJoin=_;var T=oc(S,E),q=oc(this._callState,this._isPreparingToJoin);T!==q&&(this.updateKeepDeviceAwake(q),this.updateDeviceAudioMode(q),this.updateShowAndroidOngoingMeetingNotification(q),this.updateNoOpRecordingEnsuringBackgroundContinuity(q))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=Gv,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:ec},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=$d(qv,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._remoteParticipantsAudioLevel={},this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(m){Je()&&this.nativeUtils().setKeepDeviceAwake(m,this._callFrameId)}},{key:"updateDeviceAudioMode",value:function(m){if(Je()&&!this.disableReactNativeAutoDeviceManagement("audio")){var _=m?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(_)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(m){if(Je()&&this.nativeUtils().setShowOngoingMeetingNotification){var _,S,E,T;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var q=this.properties.reactNativeConfig.androidInCallNotification;_=q.title,S=q.subtitle,E=q.iconName,T=q.disableForCustomOverride}T&&(m=!1),this.nativeUtils().setShowOngoingMeetingNotification(m,_,S,E,this._callFrameId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(m){Je()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(m)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var m,_;if(Je()){var S=(m=this._callMachine())===null||m===void 0||(_=m.store)===null||_===void 0?void 0:_.getState();for(var E in S==null?void 0:S.streams){var T=S.streams[E];T&&T.pendingTrack&&T.pendingTrack.kind==="audio"&&(T.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(m){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[m]}},{key:"absoluteUrl",value:function(m){if(m!==void 0){var _=document.createElement("a");return _.href=m,_.href}}},{key:"sayHello",value:function(){var m="hello, world.";return console.log(m),m}},{key:"_logCallQualityTestResults",value:function(m){if(this._callMachineInitialized){var _={action:Za,level:"info",code:1012,results:m};this.sendMessageToCallMachine(_)}else console.warn("_logCallQualityTestResults() must be called after daily initialization")}},{key:"_logUseAfterDestroy",value:function(){if(this.needsLoad())if(Kn&&!Kn.needsLoad()){var m={action:Za,level:"error",code:this.strictMode?9995:9997};Kn.sendMessageToCallMachine(m)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var _={action:Za,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(_,null,this._iframe,this._callFrameId)}}},{key:"_logDuplicateInstanceAttempt",value:function(){var m=Kn._callMachineInitialized?Kn:this._callMachineInitialized?this:void 0;m?(m.sendMessageToCallMachine({action:Za,level:"warn",code:this.strictMode?9990:9992}),this._delayDuplicateInstanceLog=!1):(this._delayDuplicateInstanceLog=!0,Kn._delayDuplicateInstanceLog=!0)}},{key:"_maybeSendToSentry",value:function(m){var _,S,E,T,q,ne;if(!((_=m.error)!==null&&_!==void 0&&_.type&&!["connection-error","end-of-life","no-room"].includes(m.error.type))){var le=(S=this.properties)!==null&&S!==void 0&&S.url?new URL(this.properties.url):void 0,_e="production";le&&le.host.includes(".staging.daily")&&(_e="staging");var Ke,lt,yt,ct,st,rr=new q1({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:G1,integrations:[new bv.GlobalHandlers({onunhandledrejection:!1}),new bv.HttpContext],environment:_e}),bt=new qh(rr,void 0,Y.version());if(this.session_id&&bt.setExtra("sessionId",this.session_id),this.properties){var zt=Ne({},this.properties);zt.userName=zt.userName?"[Filtered]":void 0,zt.userData=zt.userData?"[Filtered]":void 0,zt.token=zt.token?"[Filtered]":void 0,bt.setExtra("properties",zt)}if(le){var Ht=le.searchParams.get("domain");if(!Ht){var Mt=le.host.match(/(.*?)\./);Ht=Mt&&Mt[1]||""}Ht&&bt.setTag("domain",Ht)}m.error&&(bt.setTag("fatalErrorType",m.error.type),bt.setExtra("errorDetails",m.error.details),!((Ke=m.error.details)===null||Ke===void 0)&&Ke.uri&&bt.setTag("serverAddress",m.error.details.uri),!((lt=m.error.details)===null||lt===void 0)&&lt.workerGroup&&bt.setTag("workerGroup",m.error.details.workerGroup),!((yt=m.error.details)===null||yt===void 0)&&yt.geoGroup&&bt.setTag("geoGroup",m.error.details.geoGroup),!((ct=m.error.details)===null||ct===void 0)&&ct.on&&bt.setTag("connectionAttempt",m.error.details.on),(st=m.error.details)!==null&&st!==void 0&&st.bundleUrl&&(bt.setTag("bundleUrl",m.error.details.bundleUrl),bt.setTag("bundleError",m.error.details.sourceError.type))),bt.setTags({callMode:this._callObjectMode?Je()?"reactNative":(E=this.properties)!==null&&E!==void 0&&(T=E.dailyConfig)!==null&&T!==void 0&&(q=T.callMode)!==null&&q!==void 0&&q.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:Y.version()});var be=((ne=m.error)===null||ne===void 0?void 0:ne.msg)||m.errorMsg;bt.run(function(kr){kr.captureException(new Error(be))})}}},{key:"_callMachine",value:function(){var m,_,S;return(m=window._daily)===null||m===void 0||(_=m.instances)===null||_===void 0||(S=_[this._callFrameId])===null||S===void 0?void 0:S.callMachine}}],[{key:"supportedBrowser",value:function(){if(Je())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var m=o1.getParser($n());return{supported:!!Av(),mobile:m.getPlatformType()==="mobile",name:m.getBrowserName(),version:m.getBrowserVersion(),supportsFullscreen:!!Nv(),supportsScreenShare:!!TC(),supportsSfu:!!Av(),supportsVideoProcessing:b0(),supportsAudioProcessing:x0()}}},{key:"version",value:function(){return"0.66.0"}},{key:"createCallObject",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m.layout="none",new Y(null,m)}},{key:"wrap",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Be(),!m||!m.contentWindow||typeof m.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return _.layout||(_.customLayout?_.layout="custom-v1":_.layout="browser"),new Y(m,_)}},{key:"createFrame",value:function(m,_){var S,E;Be(),m&&_?(S=m,E=_):m&&m.append?(S=m,E={}):(S=document.body,E=m||{});var T=E.iframeStyle;T||(T=S===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var q=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?q.allow="microphone, camera":q.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",q.style.visibility="hidden",S.appendChild(q),q.style.visibility=null,Object.keys(T).forEach(function(ne){return q.style[ne]=T[ne]}),E.layout||(E.customLayout?E.layout="custom-v1":E.layout="browser");try{return new Y(q,E)}catch(ne){throw S.removeChild(q),ne}}},{key:"createTransparentFrame",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Be();var _=document.createElement("iframe");return _.allow="microphone; camera; autoplay",_.style.cssText=` + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; + pointer-events: none; + `,document.body.appendChild(_),m.layout||(m.layout="custom-v1"),Y.wrap(_,m)}},{key:"getCallInstance",value:function(){return Kn}}]),Y}();function Cs(r,e){var n={};for(var s in r)if(r[s]instanceof MediaStreamTrack)n[s]=so;else if(s==="dailyConfig"){if(r[s].modifyLocalSdpHook){var a=window._daily.instances[e].customCallbacks||{};a.modifyLocalSdpHook=r[s].modifyLocalSdpHook,window._daily.instances[e].customCallbacks=a,delete r[s].modifyLocalSdpHook}if(r[s].modifyRemoteSdpHook){var o=window._daily.instances[e].customCallbacks||{};o.modifyRemoteSdpHook=r[s].modifyRemoteSdpHook,window._daily.instances[e].customCallbacks=o,delete r[s].modifyRemoteSdpHook}n[s]=r[s]}else n[s]=r[s];return n}function pt(r){var e=arguments.length>2?arguments[2]:void 0;if(r!==Bi){var n="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw e&&(n+=" ".concat(e)),console.error(n),new Error(n)}}function oc(r,e){return[vc,Bi].includes(r)||e}function Wv(r,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",s=arguments.length>3?arguments[3]:void 0;if(oc(r,e)){var a="".concat(n," not supported after joining a meeting.");throw s&&(a+=" ".concat(s)),console.error(a),new Error(a)}}function Bd(r){var e=arguments.length>2?arguments[2]:void 0;if(!r){var n="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," requires preAuth(), startCamera(), or join() to initialize call state.");throw e&&(n+=" ".concat(e)),console.error(n),new Error(n)}}function Pi(r){if(r){var e="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(e),new Error(e)}}function Qn(r){if(!r){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(e),new Error(e)}}function mn(r){if(r){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(e),new Error(e)}}function Be(){if(Je())throw new Error("This daily-js method is not currently supported in React Native")}function eo(){if(!Je())throw new Error("This daily-js method is only supported in React Native")}function j0(r){if(r===void 0)return!0;var e;if(typeof r=="string")e=r;else try{e=JSON.stringify(r),ln(JSON.parse(e),r)||console.warn("The userData provided will be modified when serialized.")}catch(n){throw Error("userData must be serializable to JSON: ".concat(n))}if(e.length>4096)throw Error("userData is too large (".concat(e.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function T0(r,e){for(var n=e.allowAllParticipantsKey,s=function(w){var x=["local"];return n||x.push("*"),w&&!x.includes(w)},a=function(w){return!!(w.layer===void 0||Number.isInteger(w.layer)&&w.layer>=0||w.layer==="inherit")},o=function(w){return!!w&&!(w.video&&!a(w.video))&&!(w.screenVideo&&!a(w.screenVideo))},c=0,d=Object.entries(r);c<d.length;c++){var f=Vi(d[c],2),v=f[0],g=f[1];if(!s(v)||!o(g))return!1}return!0}function N0(r){return tt(r)==="object"&&!(r.video&&(tt(r.video)!=="object"||!function(a){var o=["type","config"];return!a||tt(a)!=="object"||!function(c){return typeof c!="string"?!1:Object.values(ac).includes(c)?!0:(console.error("inputSettings video processor type invalid"),!1)}(a.type)||a.config&&(tt(a.config)!=="object"||!function(c,d){var f=Object.keys(d);if(f.length===0)return!0;var v="invalid object in inputSettings -> video -> processor -> config";switch(c){case ac.BGBLUR:return f.length>1||f[0]!=="strength"?(console.error(v),!1):!(typeof d.strength!="number"||d.strength<=0||d.strength>1||isNaN(d.strength))||(console.error("".concat(v,"; expected: {0 < strength <= 1}, got: ").concat(d.strength)),!1);case ac.BGIMAGE:return!(d.source!==void 0&&!function(g){if(g.source==="default")return g.type="default",!0;if(g.source instanceof ArrayBuffer)return!0;if(vo(g.source))return g.type="url",!!function(k){var P=new URL(k),N=P.pathname;if(P.protocol==="data:")try{var j=N.substring(N.indexOf(":")+1,N.indexOf(";")).split("/")[1];return Ld.includes(j)}catch(K){return console.error("failed to deduce blob content type",K),!1}var $=N.split(".").at(-1).toLowerCase().trim();return Ld.includes($)}(g.source)||(console.error("invalid image type; supported types: [".concat(Ld.join(", "),"]")),!1);return w=g.source,x=Number(w),isNaN(x)||!Number.isInteger(x)||x<=0||x>Tv?(console.error("invalid image selection; must be an int, > 0, <= ".concat(Tv)),!1):(g.type="daily-preselect",!0);var w,x}(d));default:return!0}}(a.type,a.config))?!1:(Object.keys(a).filter(function(c){return!o.includes(c)}).forEach(function(c){console.warn("invalid key inputSettings -> video -> processor : ".concat(c)),delete a[c]}),!0)}(r.video.processor)))&&!(r.audio&&(tt(r.audio)!=="object"||(n=r.audio.processor,s=["type"],!n||tt(n)!=="object"||(Object.keys(n).filter(function(a){return!s.includes(a)}).forEach(function(a){console.warn("invalid key inputSettings -> audio -> processor : ".concat(a)),delete n[a]}),e=n.type,typeof e!="string"||!Object.values(_0).includes(e)&&(console.error("inputSettings audio processor type invalid"),1)))));var e,n,s}function A0(r,e){var n,s=[];r.video&&!b0((n=e==null?void 0:e.useLegacyVideoProcessor)!==null&&n!==void 0&&n)&&(delete r.video,s.push("video")),r.audio&&!x0()&&(delete r.audio,s.push("audio")),s.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(s.join(", ")))}function Th(){var r=Object.values(ac).join(" | "),e=Object.values(_0).join(" | ");return"inputSettings must be of the form: { video?: { processor: { type: [ ".concat(r," ], config?: {} } }, audio?: { processor: {type: [ ").concat(e," ] } } }")}function P0(r){var e=r.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(j_).concat(e?' | "'.concat(T_,'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function R0(){return"customIntegrations should be an object of type ".concat(JSON.stringify(jh),".")}function O0(r){if(r&&tt(r)!=="object"||Array.isArray(r))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(_c),".")),!1;if(r)for(var e=0,n=Object.entries(r);e<n.length;e++)for(var s=Vi(n[e],1)[0],a=0,o=Object.entries(r[s]);a<o.length;a++){var c=Vi(o[a],2),d=c[0],f=c[1];if(d==="iconPath"&&!vo(f)||d==="iconPathDarkMode"&&!vo(f))return console.error("customTrayButton ".concat(d," should be a url.")),!1;var v=_c.id[d];if(!v)return console.error("customTrayButton does not support key ".concat(d)),!1;if(tt(f)!==v)return console.error("customTrayButton ".concat(d," should be a ").concat(v,".")),!1}return!0}function I0(r){if(!r||r&&tt(r)!=="object"||Array.isArray(r))return console.error(R0()),!1;for(var e=function(w){return"".concat(w," should be ").concat(jh.id[w])},n=function(w,x){return console.error("customIntegration ".concat(w,": ").concat(x))},s=0,a=Object.entries(r);s<a.length;s++){var o=Vi(a[s],1)[0];if(!("label"in r[o]))return n(o,"label is required"),!1;if(!("location"in r[o]))return n(o,"location is required"),!1;if(!("src"in r[o])&&!("srcdoc"in r[o]))return n(o,"src or srcdoc is required"),!1;for(var c=0,d=Object.entries(r[o]);c<d.length;c++){var f=Vi(d[c],2),v=f[0],g=f[1];switch(v){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof g!="string")return n(o,e(v)),!1;break;case"iconURL":if(!vo(g))return n(o,"".concat(v," should be a url")),!1;break;case"src":if("srcdoc"in r[o])return n(o,"cannot have both src and srcdoc"),!1;if(!vo(g))return n(o,'src "'.concat(g,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in r[o])return n(o,"cannot have both src and srcdoc"),!1;if(typeof g!="string")return n(o,e(v)),!1;break;case"location":if(!["main","sidebar"].includes(g))return n(o,e(v)),!1;break;case"controlledBy":if(g!=="*"&&g!=="owners"&&(!Array.isArray(g)||g.some(function(w){return typeof w!="string"})))return n(o,e(v)),!1;break;case"shared":if((!Array.isArray(g)||g.some(function(w){return typeof w!="string"}))&&g!=="owners"&&typeof g!="boolean")return n(o,e(v)),!1;break;default:if(!jh.id[v])return console.error("customIntegration does not support key ".concat(v)),!1}}}return!0}function M0(r,e){if(e===void 0)return!1;switch(tt(e)){case"string":return tt(r)===e;case"object":if(tt(r)!=="object")return!1;for(var n in r)if(!M0(r[n],e[n]))return!1;return!0;default:return!1}}function Jv(r){if(tt(r)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(r.state&&!Object.values(wh).includes(r.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(wh));if(r.volume){if(typeof r.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(r.volume<0||r.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Kv(r,e,n){return!(typeof r!="number"||r<e||r>n)}function $d(r,e){return r&&!e&&delete r.data,r}const sj=Object.freeze(Object.defineProperty({__proto__:null,DAILY_ACCESS_LEVEL_FULL:C_,DAILY_ACCESS_LEVEL_LOBBY:sC,DAILY_ACCESS_LEVEL_NONE:aC,DAILY_ACCESS_UNKNOWN:ec,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:_C,DAILY_CAMERA_ERROR_CAM_IN_USE:vC,DAILY_CAMERA_ERROR_CONSTRAINTS:SC,DAILY_CAMERA_ERROR_MIC_IN_USE:yC,DAILY_CAMERA_ERROR_NOT_FOUND:xC,DAILY_CAMERA_ERROR_PERMISSIONS:wC,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:bC,DAILY_CAMERA_ERROR_UNKNOWN:EC,DAILY_EVENT_ACCESS_STATE_UPDATED:U_,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:a0,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:o0,DAILY_EVENT_APP_MSG:X_,DAILY_EVENT_CAMERA_ERROR:R_,DAILY_EVENT_CPU_LOAD_CHANGE:u0,DAILY_EVENT_ERROR:sc,DAILY_EVENT_EXIT_FULLSCREEN:Ii,DAILY_EVENT_FACE_COUNTS_UPDATED:d0,DAILY_EVENT_FULLSCREEN:Oi,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:A_,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:N_,DAILY_EVENT_INPUT_SETTINGS_UPDATED:y0,DAILY_EVENT_JOINED_MEETING:O_,DAILY_EVENT_JOINING_MEETING:vh,DAILY_EVENT_LANG_UPDATED:g0,DAILY_EVENT_LEFT_MEETING:I_,DAILY_EVENT_LIVE_STREAMING_ERROR:m0,DAILY_EVENT_LIVE_STREAMING_STARTED:h0,DAILY_EVENT_LIVE_STREAMING_STOPPED:p0,DAILY_EVENT_LIVE_STREAMING_UPDATED:f0,DAILY_EVENT_LOADED:tc,DAILY_EVENT_LOADING:mh,DAILY_EVENT_LOAD_ATTEMPT_FAILED:gh,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:s0,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:r0,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:i0,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:kC,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:$_,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:B_,DAILY_EVENT_NETWORK_CONNECTION:c0,DAILY_EVENT_NETWORK_QUALITY_CHANGE:l0,DAILY_EVENT_NONFATAL_ERROR:ic,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:F_,DAILY_EVENT_PARTICIPANT_JOINED:M_,DAILY_EVENT_PARTICIPANT_LEFT:D_,DAILY_EVENT_PARTICIPANT_UPDATED:L_,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:v0,DAILY_EVENT_RECORDING_DATA:Q_,DAILY_EVENT_RECORDING_ERROR:J_,DAILY_EVENT_RECORDING_STARTED:nc,DAILY_EVENT_RECORDING_STATS:W_,DAILY_EVENT_RECORDING_STOPPED:rc,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:K_,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:e0,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:n0,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:t0,DAILY_EVENT_STARTED_CAMERA:P_,DAILY_EVENT_THEME_UPDATED:ph,DAILY_EVENT_TRACK_STARTED:yh,DAILY_EVENT_TRACK_STOPPED:_h,DAILY_EVENT_TRANSCRIPTION_ERROR:H_,DAILY_EVENT_TRANSCRIPTION_MSG:Z_,DAILY_EVENT_TRANSCRIPTION_STARTED:G_,DAILY_EVENT_TRANSCRIPTION_STOPPED:Y_,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:z_,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:q_,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:V_,DAILY_FATAL_ERROR_CONNECTION:gC,DAILY_FATAL_ERROR_EJECTED:oC,DAILY_FATAL_ERROR_EOL:pC,DAILY_FATAL_ERROR_EXP_ROOM:uC,DAILY_FATAL_ERROR_EXP_TOKEN:dC,DAILY_FATAL_ERROR_MEETING_FULL:fC,DAILY_FATAL_ERROR_NBF_ROOM:lC,DAILY_FATAL_ERROR_NBF_TOKEN:cC,DAILY_FATAL_ERROR_NOT_ALLOWED:mC,DAILY_FATAL_ERROR_NO_ROOM:hC,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:T_,DAILY_RECEIVE_SETTINGS_BASE_KEY:j_,DAILY_STATE_ERROR:vr,DAILY_STATE_JOINED:Bi,DAILY_STATE_JOINING:vc,DAILY_STATE_LEFT:gr,DAILY_STATE_NEW:fh,DAILY_TRACK_STATE_BLOCKED:Z1,DAILY_TRACK_STATE_INTERRUPTED:rC,DAILY_TRACK_STATE_LOADING:nC,DAILY_TRACK_STATE_OFF:eC,DAILY_TRACK_STATE_PLAYABLE:iC,DAILY_TRACK_STATE_SENDABLE:tC,default:ij},Symbol.toStringTag,{value:"Module"})),aj=oy(sj);var Xl={exports:{}},Qv;function oj(){if(Qv)return Xl.exports;Qv=1;var r=typeof Reflect=="object"?Reflect:null,e=r&&typeof r.apply=="function"?r.apply:function(U,A,H){return Function.prototype.apply.call(U,A,H)},n;r&&typeof r.ownKeys=="function"?n=r.ownKeys:Object.getOwnPropertySymbols?n=function(U){return Object.getOwnPropertyNames(U).concat(Object.getOwnPropertySymbols(U))}:n=function(U){return Object.getOwnPropertyNames(U)};function s(F){console&&console.warn&&console.warn(F)}var a=Number.isNaN||function(U){return U!==U};function o(){o.init.call(this)}Xl.exports=o,Xl.exports.once=$,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var c=10;function d(F){if(typeof F!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof F)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(F){if(typeof F!="number"||F<0||a(F))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+F+".");c=F}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(U){if(typeof U!="number"||U<0||a(U))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+U+".");return this._maxListeners=U,this};function f(F){return F._maxListeners===void 0?o.defaultMaxListeners:F._maxListeners}o.prototype.getMaxListeners=function(){return f(this)},o.prototype.emit=function(U){for(var A=[],H=1;H<arguments.length;H++)A.push(arguments[H]);var te=U==="error",ae=this._events;if(ae!==void 0)te=te&&ae.error===void 0;else if(!te)return!1;if(te){var se;if(A.length>0&&(se=A[0]),se instanceof Error)throw se;var we=new Error("Unhandled error."+(se?" ("+se.message+")":""));throw we.context=se,we}var De=ae[U];if(De===void 0)return!1;if(typeof De=="function")e(De,this,A);else for(var Ie=De.length,Ye=P(De,Ie),H=0;H<Ie;++H)e(Ye[H],this,A);return!0};function v(F,U,A,H){var te,ae,se;if(d(A),ae=F._events,ae===void 0?(ae=F._events=Object.create(null),F._eventsCount=0):(ae.newListener!==void 0&&(F.emit("newListener",U,A.listener?A.listener:A),ae=F._events),se=ae[U]),se===void 0)se=ae[U]=A,++F._eventsCount;else if(typeof se=="function"?se=ae[U]=H?[A,se]:[se,A]:H?se.unshift(A):se.push(A),te=f(F),te>0&&se.length>te&&!se.warned){se.warned=!0;var we=new Error("Possible EventEmitter memory leak detected. "+se.length+" "+String(U)+" listeners added. Use emitter.setMaxListeners() to increase limit");we.name="MaxListenersExceededWarning",we.emitter=F,we.type=U,we.count=se.length,s(we)}return F}o.prototype.addListener=function(U,A){return v(this,U,A,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(U,A){return v(this,U,A,!0)};function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function w(F,U,A){var H={fired:!1,wrapFn:void 0,target:F,type:U,listener:A},te=g.bind(H);return te.listener=A,H.wrapFn=te,te}o.prototype.once=function(U,A){return d(A),this.on(U,w(this,U,A)),this},o.prototype.prependOnceListener=function(U,A){return d(A),this.prependListener(U,w(this,U,A)),this},o.prototype.removeListener=function(U,A){var H,te,ae,se,we;if(d(A),te=this._events,te===void 0)return this;if(H=te[U],H===void 0)return this;if(H===A||H.listener===A)--this._eventsCount===0?this._events=Object.create(null):(delete te[U],te.removeListener&&this.emit("removeListener",U,H.listener||A));else if(typeof H!="function"){for(ae=-1,se=H.length-1;se>=0;se--)if(H[se]===A||H[se].listener===A){we=H[se].listener,ae=se;break}if(ae<0)return this;ae===0?H.shift():N(H,ae),H.length===1&&(te[U]=H[0]),te.removeListener!==void 0&&this.emit("removeListener",U,we||A)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(U){var A,H,te;if(H=this._events,H===void 0)return this;if(H.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):H[U]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete H[U]),this;if(arguments.length===0){var ae=Object.keys(H),se;for(te=0;te<ae.length;++te)se=ae[te],se!=="removeListener"&&this.removeAllListeners(se);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(A=H[U],typeof A=="function")this.removeListener(U,A);else if(A!==void 0)for(te=A.length-1;te>=0;te--)this.removeListener(U,A[te]);return this};function x(F,U,A){var H=F._events;if(H===void 0)return[];var te=H[U];return te===void 0?[]:typeof te=="function"?A?[te.listener||te]:[te]:A?j(te):P(te,te.length)}o.prototype.listeners=function(U){return x(this,U,!0)},o.prototype.rawListeners=function(U){return x(this,U,!1)},o.listenerCount=function(F,U){return typeof F.listenerCount=="function"?F.listenerCount(U):k.call(F,U)},o.prototype.listenerCount=k;function k(F){var U=this._events;if(U!==void 0){var A=U[F];if(typeof A=="function")return 1;if(A!==void 0)return A.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function P(F,U){for(var A=new Array(U),H=0;H<U;++H)A[H]=F[H];return A}function N(F,U){for(;U+1<F.length;U++)F[U]=F[U+1];F.pop()}function j(F){for(var U=new Array(F.length),A=0;A<U.length;++A)U[A]=F[A].listener||F[A];return U}function $(F,U){return new Promise(function(A,H){function te(se){F.removeListener(U,ae),H(se)}function ae(){typeof F.removeListener=="function"&&F.removeListener("error",te),A([].slice.call(arguments))}G(F,U,ae,{once:!0}),U!=="error"&&K(F,te,{once:!0})})}function K(F,U,A){typeof F.on=="function"&&G(F,"error",U,A)}function G(F,U,A,H){if(typeof F.on=="function")H.once?F.once(U,A):F.on(U,A);else if(typeof F.addEventListener=="function")F.addEventListener(U,function te(ae){H.once&&F.removeEventListener(U,te),A(ae)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof F)}return Xl.exports}var to={},pr={},Xv;function lj(){if(Xv)return pr;Xv=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Api=pr.HttpClient=pr.ContentType=void 0;var r;(function(s){s.Json="application/json",s.FormData="multipart/form-data",s.UrlEncoded="application/x-www-form-urlencoded",s.Text="text/plain"})(r||(pr.ContentType=r={}));class e{constructor(a={}){Me(this,"baseUrl","https://api.vapi.ai");Me(this,"securityData",null);Me(this,"securityWorker");Me(this,"abortControllers",new Map);Me(this,"customFetch",(...a)=>fetch(...a));Me(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"});Me(this,"setSecurityData",a=>{this.securityData=a});Me(this,"contentFormatters",{[r.Json]:a=>a!==null&&(typeof a=="object"||typeof a=="string")?JSON.stringify(a):a,[r.Text]:a=>a!==null&&typeof a!="string"?JSON.stringify(a):a,[r.FormData]:a=>Object.keys(a||{}).reduce((o,c)=>{const d=a[c];return o.append(c,d instanceof Blob?d:typeof d=="object"&&d!==null?JSON.stringify(d):`${d}`),o},new FormData),[r.UrlEncoded]:a=>this.toQueryString(a)});Me(this,"createAbortSignal",a=>{if(this.abortControllers.has(a)){const c=this.abortControllers.get(a);return c?c.signal:void 0}const o=new AbortController;return this.abortControllers.set(a,o),o.signal});Me(this,"abortRequest",a=>{const o=this.abortControllers.get(a);o&&(o.abort(),this.abortControllers.delete(a))});Me(this,"request",async({body:a,secure:o,path:c,type:d,query:f,format:v,baseUrl:g,cancelToken:w,...x})=>{const k=(typeof o=="boolean"?o:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},P=this.mergeRequestParams(x,k),N=f&&this.toQueryString(f),j=this.contentFormatters[d||r.Json],$=v||P.format;return this.customFetch(`${g||this.baseUrl||""}${c}${N?`?${N}`:""}`,{...P,headers:{...P.headers||{},...d&&d!==r.FormData?{"Content-Type":d}:{}},signal:(w?this.createAbortSignal(w):P.signal)||null,body:typeof a>"u"||a===null?null:j(a)}).then(async K=>{const G=K;G.data=null,G.error=null;const F=$?await K[$]().then(U=>(G.ok?G.data=U:G.error=U,G)).catch(U=>(G.error=U,G)):G;if(w&&this.abortControllers.delete(w),!K.ok)throw F;return F})});Object.assign(this,a)}encodeQueryParam(a,o){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof o=="number"?o:`${o}`)}`}addQueryParam(a,o){return this.encodeQueryParam(o,a[o])}addArrayQueryParam(a,o){return a[o].map(d=>this.encodeQueryParam(o,d)).join("&")}toQueryString(a){const o=a||{};return Object.keys(o).filter(d=>typeof o[d]<"u").map(d=>Array.isArray(o[d])?this.addArrayQueryParam(o,d):this.addQueryParam(o,d)).join("&")}addQueryParams(a){const o=this.toQueryString(a);return o?`?${o}`:""}mergeRequestParams(a,o){return{...this.baseApiParams,...a,...o||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...o&&o.headers||{}}}}}pr.HttpClient=e;class n extends e{constructor(){super(...arguments);Me(this,"assistant",{assistantControllerCreate:(o,c={})=>this.request({path:"/assistant",method:"POST",body:o,secure:!0,type:r.Json,format:"json",...c}),assistantControllerFindAll:(o,c={})=>this.request({path:"/assistant",method:"GET",query:o,secure:!0,format:"json",...c}),assistantControllerFindOne:(o,c={})=>this.request({path:`/assistant/${o}`,method:"GET",secure:!0,format:"json",...c}),assistantControllerUpdate:(o,c,d={})=>this.request({path:`/assistant/${o}`,method:"PATCH",body:c,secure:!0,type:r.Json,format:"json",...d}),assistantControllerReplace:(o,c,d={})=>this.request({path:`/assistant/${o}`,method:"PUT",body:c,secure:!0,type:r.Json,format:"json",...d}),assistantControllerRemove:(o,c={})=>this.request({path:`/assistant/${o}`,method:"DELETE",secure:!0,format:"json",...c})});Me(this,"call",{callControllerFindAll:(o,c={})=>this.request({path:"/call",method:"GET",query:o,secure:!0,format:"json",...c}),callControllerFindOne:(o,c={})=>this.request({path:`/call/${o}`,method:"GET",secure:!0,format:"json",...c}),callControllerDeleteCallData:(o,c={})=>this.request({path:`/call/${o}`,method:"DELETE",secure:!0,format:"json",...c}),callControllerUpdate:(o,c,d={})=>this.request({path:`/call/${o}`,method:"PATCH",body:c,secure:!0,type:r.Json,format:"json",...d}),callControllerCreatePhoneCall:(o,c={})=>this.request({path:"/call/phone",method:"POST",body:o,secure:!0,type:r.Json,format:"json",...c}),callControllerCreateWebCall:(o,c={})=>this.request({path:"/call/web",method:"POST",body:o,secure:!0,type:r.Json,format:"json",...c})});Me(this,"credential",{credentialControllerCreate:(o,c={})=>this.request({path:"/credential",method:"POST",body:o,secure:!0,type:r.Json,format:"json",...c}),credentialControllerFindAll:(o,c={})=>this.request({path:"/credential",method:"GET",query:o,secure:!0,format:"json",...c}),credentialControllerFindOne:(o,c={})=>this.request({path:`/credential/${o}`,method:"GET",secure:!0,format:"json",...c}),credentialControllerUpdate:(o,c,d={})=>this.request({path:`/credential/${o}`,method:"PUT",body:c,secure:!0,type:r.Json,format:"json",...d}),credentialControllerRemove:(o,c={})=>this.request({path:`/credential/${o}`,method:"DELETE",secure:!0,format:"json",...c})});Me(this,"phoneNumber",{phoneNumberControllerBuy:(o,c={})=>this.request({path:"/phone-number/buy",method:"POST",body:o,secure:!0,type:r.Json,format:"json",...c}),phoneNumberControllerImportTwilio:(o,c={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:o,secure:!0,type:r.Json,format:"json",...c}),phoneNumberControllerImportVonage:(o,c={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:o,secure:!0,type:r.Json,format:"json",...c}),phoneNumberControllerFindAll:(o,c={})=>this.request({path:"/phone-number",method:"GET",query:o,secure:!0,format:"json",...c}),phoneNumberControllerFindOne:(o,c={})=>this.request({path:`/phone-number/${o}`,method:"GET",secure:!0,format:"json",...c}),phoneNumberControllerUpdate:(o,c,d={})=>this.request({path:`/phone-number/${o}`,method:"PATCH",body:c,secure:!0,type:r.Json,format:"json",...d}),phoneNumberControllerRemove:(o,c={})=>this.request({path:`/phone-number/${o}`,method:"DELETE",secure:!0,format:"json",...c})});Me(this,"metrics",{metricsControllerFindAll:(o,c={})=>this.request({path:"/metrics",method:"GET",query:o,secure:!0,format:"json",...c})});Me(this,"log",{loggingControllerGetLogs:(o,c={})=>this.request({path:"/log",method:"GET",query:o,secure:!0,format:"json",...c})});Me(this,"tool",{toolControllerCreate:(o,c={})=>this.request({path:"/tool",method:"POST",body:o,secure:!0,type:r.Json,format:"json",...c}),toolControllerFindAll:(o,c={})=>this.request({path:"/tool",method:"GET",query:o,secure:!0,format:"json",...c}),toolControllerFindOne:(o,c={})=>this.request({path:`/tool/${o}`,method:"GET",secure:!0,format:"json",...c}),toolControllerUpdate:(o,c,d={})=>this.request({path:`/tool/${o}`,method:"PATCH",body:c,secure:!0,type:r.Json,format:"json",...d}),toolControllerRemove:(o,c={})=>this.request({path:`/tool/${o}`,method:"DELETE",secure:!0,format:"json",...c})});Me(this,"file",{fileControllerCreate:(o,c={})=>this.request({path:"/file/upload",method:"POST",body:o,secure:!0,type:r.FormData,format:"json",...c}),fileControllerFindAll:(o={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...o}),fileControllerFindOne:(o,c={})=>this.request({path:`/file/${o}`,method:"GET",secure:!0,format:"json",...c}),fileControllerRemove:(o,c={})=>this.request({path:`/file/${o}`,method:"DELETE",secure:!0,format:"json",...c})})}}return pr.Api=n,pr}var Zv;function cj(){if(Zv)return to;Zv=1,Object.defineProperty(to,"__esModule",{value:!0}),to.client=void 0;const r=lj(),e=new r.Api({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async n=>{if(n)return{headers:{Authorization:`Bearer ${n}`}}}});return to.client=e,to}var ey;function uj(){if(ey)return Ka;ey=1;var r=Ka.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Ka,"__esModule",{value:!0});const e=r(aj),n=r(oj()),s=cj();function a(g){const w=document.querySelector(`audio[data-participant-id="${g}"]`);w==null||w.remove()}async function o(g,w){g.muted=!1,g.autoplay=!0,w!=null&&(g.srcObject=new MediaStream([w]),await g.play())}async function c(g,w){const x=document.createElement("audio");return x.dataset.participantId=w,document.body.appendChild(x),await o(x,g),x}function d(g,w,x){g.participant.local||w.updateParticipant(g.participant.session_id,{setSubscribedTracks:{audio:!0,video:x}})}class f extends n.default{on(w,x){return super.on(w,x),this}once(w,x){return super.once(w,x),this}emit(w,...x){return super.emit(w,...x)}removeListener(w,x){return super.removeListener(w,x),this}removeAllListeners(w){return super.removeAllListeners(w),this}}class v extends f{constructor(x,k){super();Me(this,"started",!1);Me(this,"call",null);Me(this,"speakingTimeout",null);s.client.baseUrl=k??"https://api.vapi.ai",s.client.setSecurityData(x)}cleanup(){var x;this.started=!1,(x=this.call)==null||x.destroy(),this.call=null,this.speakingTimeout=null}async start(x,k,P){var N,j;if(!x&&!P)throw new Error("Assistant or Squad must be provided.");if(this.started)return null;this.started=!0;try{const $=(await s.client.call.callControllerCreateWebCall({assistant:typeof x=="string"?void 0:x,assistantId:typeof x=="string"?x:void 0,assistantOverrides:k,squad:typeof P=="string"?void 0:P,squadId:typeof P=="string"?P:void 0})).data;this.call&&this.cleanup();const K=((N=$==null?void 0:$.artifactPlan)==null?void 0:N.videoRecordingEnabled)??!1;if(this.call=e.default.createCallObject({audioSource:!0,videoSource:K}),(j=this.call.iframe())==null||j.style.setProperty("display","none"),this.call.on("left-meeting",()=>{var G;this.emit("call-end"),K&&((G=this.call)==null||G.stopRecording()),this.cleanup()}),this.call.on("participant-left",G=>{G&&a(G.participant.session_id)}),this.call.on("error",G=>{var F;this.emit("error",G),K&&((F=this.call)==null||F.stopRecording())}),this.call.on("camera-error",G=>{this.emit("error",G)}),this.call.on("track-started",async G=>{var F,U,A;!G||!G.participant||(F=G.participant)!=null&&F.local||G.track.kind==="audio"&&(await c(G.track,G.participant.session_id),((U=G==null?void 0:G.participant)==null?void 0:U.user_name)==="Vapi Speaker"&&((A=this.call)==null||A.sendAppMessage("playable")))}),this.call.on("participant-joined",G=>{!G||!this.call||d(G,this.call,K)}),await this.call.join({url:$.webCallUrl,subscribeToTracksAutomatically:!1}),K){const G=new Date().getTime();this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}}),this.call.on("recording-started",()=>{this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:(new Date().getTime()-G)/1e3})})}return this.call.startRemoteParticipantsAudioLevelObserver(100),this.call.on("remote-participants-audio-level",G=>{G&&this.handleRemoteParticipantsAudioLevel(G)}),this.call.on("app-message",G=>this.onAppMessage(G)),this.call.on("nonfatal-error",G=>{var F;(G==null?void 0:G.type)==="audio-processor-error"&&((F=this.call)==null||F.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{var U;(U=this.call)==null||U.setLocalAudio(!0)}))}),this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}}),$}catch($){return console.error($),this.emit("error",$),this.cleanup(),null}}onAppMessage(x){if(x)try{if(x.data==="listening")return this.emit("call-start");try{const k=JSON.parse(x.data);this.emit("message",k)}catch(k){console.log("Error parsing message data: ",k)}}catch(k){console.error(k)}}handleRemoteParticipantsAudioLevel(x){const k=Object.values(x.participantsAudioLevel).reduce((N,j)=>N+j,0);this.emit("volume-level",Math.min(1,k/.15)),k>.01&&(this.speakingTimeout?(clearTimeout(this.speakingTimeout),this.speakingTimeout=null):this.emit("speech-start"),this.speakingTimeout=setTimeout(()=>{this.emit("speech-end"),this.speakingTimeout=null},1e3))}stop(){var x;this.started=!1,(x=this.call)==null||x.destroy(),this.call=null}send(x){var k;(k=this.call)==null||k.sendAppMessage(JSON.stringify(x))}setMuted(x){try{if(!this.call)throw new Error("Call object is not available.");this.call.setLocalAudio(!x)}catch(k){throw k}}isMuted(){try{return this.call?this.call.localAudio()===!1:!1}catch(x){throw x}}say(x,k){this.send({type:"say",message:x,endCallAfterSpoken:k})}setInputDevicesAsync(x){var k;(k=this.call)==null||k.setInputDevicesAsync(x)}setOutputDeviceAsync(x){var k;(k=this.call)==null||k.setOutputDeviceAsync(x)}}return Ka.default=v,Ka}var dj=uj();const hj=bc(dj),kt=new hj("56c9a1d7-ef19-4321-ba9b-c13ba12e0d3e");var wr=(r=>(r.INACTIVE="inactive",r.ACTIVE="active",r.LOADING="loading",r))(wr||{});function L0(){const{isAuthenticated:r,user:e}=Ot(),[n,s]=I.useState(!1),[a,o]=I.useState("inactive"),[c,d]=I.useState(0),[f,v]=I.useState([]),[g,w]=I.useState(null),[x,k]=I.useState(!1),[P,N]=I.useState(!1),j=I.useRef(null),$=I.useRef(null),K=I.useCallback(()=>{o("loading"),kt.stop()},[]),G=I.useCallback(se=>{$.current=se},[]),F=async()=>{if(!r||window.location.pathname==="/")return!0;try{const se=await fetch("/api/sessions");if(!se.ok)return console.error("Session check failed:",se.status),!0;const we=await se.json();return console.log("Session data:",we),we.subscription!=="basic"?!0:we.sessionsUsed<2}catch(se){return console.error("Session check error:",se),!0}},U=async()=>{if(!(!r||window.location.pathname==="/"))try{await fetch("/api/sessions",{method:"POST"})}catch(se){console.error("Failed to increment session:",se)}};I.useEffect(()=>{const se=()=>s(!0),we=()=>{console.log("Speech has ended"),s(!1)},De=async()=>{console.log("Call has started"),o("active"),(e==null?void 0:e.subscription)==="basic"&&await U(),window.location.pathname==="/product"&&(!(e!=null&&e.subscription)||e.subscription!=="pro")?(j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{console.log("Time limit reached for product page user"),K(),N(!0),$.current&&$.current()},6e5)):r||(j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{console.log("Time limit reached for non-logged-in user"),K(),N(!0),$.current&&$.current()},6e4))},Ie=()=>{console.log("Call has stopped"),o("inactive"),j.current&&(clearTimeout(j.current),j.current=null)},Ye=ve=>{d(ve)},vt=ve=>{console.log("message",ve),ve.type===Qy.TRANSCRIPT&&ve.transcriptType===Xy.PARTIAL?w(ve):(v(ie=>[...ie,ve]),w(null))},nt=ve=>{o("inactive"),j.current&&(clearTimeout(j.current),j.current=null),console.error(ve)};return kt.on("speech-start",se),kt.on("speech-end",we),kt.on("call-start",De),kt.on("call-end",Ie),kt.on("volume-level",Ye),kt.on("message",vt),kt.on("error",nt),()=>{kt.off("speech-start",se),kt.off("speech-end",we),kt.off("call-start",De),kt.off("call-end",Ie),kt.off("volume-level",Ye),kt.off("message",vt),kt.off("error",nt),j.current&&(clearTimeout(j.current),j.current=null)}},[r,K,e]);const A=async()=>{o("loading"),kt.start("551a8b1d-2ea3-4248-9fcb-3453c51df2ea").then(we=>{console.log("call",we)})};return{toggleCall:async()=>{if(a==="active"){K();return}const se=await F();console.log("Can start conversation:",se),se?A():k(!0)},callStatus:a,audioLevel:c,isSpeechActive:n,messages:f,activeTranscript:g,onTimeoutReached:G,pauseCall:()=>{kt&&a==="active"&&kt.pause()},resumeCall:()=>{kt&&a==="active"&&kt.resume()},showUpgradeModal:x,setShowUpgradeModal:k,showTimeUpModal:P,setShowTimeUpModal:N}}function ty({type:r,isActive:e,amplitude:n,username:s,callStatus:a}){const o=r==="ai",c=a===wr.INACTIVE;return h.jsx("div",{className:` + relative w-32 h-32 rounded-full flex items-center justify-center + ${o?"bg-[#2C5C9D]":"bg-[#5C9EFF]"} + ${c?"animate-breathe":""} + shadow-lg transition-all duration-300 + `,style:{transform:!c&&e?`scale(${1+n*.5})`:void 0},children:o?h.jsx(nr,{className:"w-16 h-16 text-white"}):h.jsx("div",{className:"text-white text-center",children:h.jsx("span",{className:"font-medium",children:s||"You"})})})}function fj({tier:r,sessionsLeft:e=2}){const[n,s]=I.useState(!1),a=()=>{switch(r){case"Basic":return 2;case"Pro":return 10;case"Premium":return"∞";default:return 0}},o=()=>{if(r==="Premium")return"100%";const d=a();return typeof d=="number"?`${(d-e)/d*100}%`:"0%"},c=()=>{const d=a();return typeof d=="number"?`${d-e}/${d}`:"∞"};return r==="Premium"?h.jsx("div",{className:"w-full max-w-xs p-4 rounded-lg",children:h.jsx("p",{className:"text-center font-semibold",children:"Premium - No Limits"})}):h.jsxs("div",{className:"w-full max-w-xs p-4 space-y-1",children:[h.jsx("div",{className:"relative mb-1",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{className:"flex-grow mr-4",children:h.jsx("div",{className:"w-full h-3 bg-gray-200 rounded-full",children:h.jsx("div",{className:"h-3 bg-[#2C5C9D] rounded-full transition-all duration-300",style:{width:o()}})})}),h.jsx("div",{className:"flex-shrink-0",children:h.jsxs("span",{className:"font-bold text-gray-900",children:[c()," sessions"]})})]})}),h.jsxs("div",{className:"flex items-center -ml-6",children:[r==="Basic"&&h.jsx("button",{onClick:()=>s(!0),className:"mr-2 text-gray-500 hover:text-gray-700 transition-colors",children:h.jsx($k,{className:"w-4 h-4"})}),h.jsxs("div",{className:"flex flex-1 gap-1",children:[h.jsx("div",{className:"w-[35%] py-1 bg-gray-100 rounded-lg flex items-center justify-center",children:h.jsx("span",{className:"font-semibold text-gray-900",children:r==="Pro"?"Pro":"Basic"})}),h.jsx("button",{className:`w-[65%] py-1 bg-blue-100 hover:bg-blue-200 + rounded-lg transition-colors duration-200 flex items-center justify-center`,onClick:()=>window.location.href="/pricing",children:h.jsx("span",{className:"font-semibold text-blue-900",children:"Upgrade"})})]}),n&&h.jsxs("div",{className:"fixed inset-0 flex items-center justify-center z-50",children:[h.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:()=>s(!1)}),h.jsxs("div",{className:"relative bg-white p-6 rounded-lg shadow-lg max-w-sm mx-4",children:[h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Basic Plan Limits"}),h.jsx("p",{className:"text-gray-600",children:"Basic users get 2 sessions, with a maximum duration of 10 minutes each."}),h.jsx("button",{onClick:()=>s(!1),className:"mt-4 w-full py-2 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"Got it"})]})]})]})]})}function pj({isListening:r,isDisabled:e,onClick:n,subscriptionTier:s,sessionsLeft:a,callStatus:o,showSubscriptionStatus:c=!1}){const d=()=>{switch(o){case wr.CONNECTING:return"bg-[#F5A623] hover:bg-[#E69512]";case wr.ACTIVE:return"bg-[#DC2626] hover:bg-[#B91C1C]";default:return"bg-[#2C5C9D] hover:bg-[#234B82]"}},f=()=>{switch(o){case wr.CONNECTING:return"Connecting...";case wr.ACTIVE:return"End Conversation";default:return"Talk with Amia"}},v=()=>o===wr.ACTIVE?h.jsx(qk,{className:"w-5 h-5"}):h.jsx(Gk,{className:"w-5 h-5"});return h.jsxs("div",{className:"flex flex-col items-center gap-3",children:[h.jsxs("button",{onClick:n,disabled:e,className:`${d()} text-white px-8 py-3 rounded-lg + transition-all hover:shadow-lg disabled:opacity-50 disabled:cursor-not-allowed + flex items-center gap-2`,children:[v(),f()]}),c&&h.jsx(fj,{tier:s,sessionsLeft:a})]})}const ny={tier:"Basic",sessionsLeft:2};function D0({aiAmplitude:r,userAmplitude:e,username:n,callStatus:s,audioLevel:a,toggleCall:o,onPauseResume:c,isPaused:d=!1}){const f=s===wr.ACTIVE,g=Er().pathname==="/product";return h.jsxs("div",{className:"flex flex-col items-center gap-8",children:[h.jsxs("div",{className:"flex items-center justify-center gap-24 relative",children:[h.jsx(ty,{type:"ai",isActive:f&&!d,amplitude:d?0:r,callStatus:s}),f&&g&&h.jsx("button",{onClick:c,className:`absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 + bg-white/90 hover:bg-white p-3 rounded-full shadow-lg + transition-all duration-200 hover:scale-110`,children:d?h.jsx(Hk,{className:"w-6 h-6 text-[#2C5C9D]"}):h.jsx(Yk,{className:"w-6 h-6 text-[#2C5C9D]"})}),h.jsx(ty,{type:"user",isActive:f&&!d,amplitude:d?0:e,username:n,callStatus:s})]}),h.jsx(pj,{isListening:f,isDisabled:!1,onClick:o,subscriptionTier:ny.tier,sessionsLeft:ny.sessionsLeft,callStatus:s,showSubscriptionStatus:g})]})}function tr({label:r,error:e,required:n=!1,type:s,name:a,value:o,onChange:c,className:d="",...f}){return h.jsxs("div",{className:"space-y-2",children:[h.jsxs("label",{htmlFor:a,className:"block text-sm font-medium text-gray-700",children:[r," ",n&&h.jsx("span",{className:"text-red-500",children:"*"})]}),h.jsx("input",{id:a,type:s,name:a,value:o,onChange:c,className:`w-full px-4 py-2.5 rounded-lg border border-gray-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 transition-all ${e?"border-red-300 focus:border-red-500 focus:ring-red-200":""} ${d}`,...f}),e&&h.jsx("p",{className:"text-sm text-red-500 mt-1",children:e})]})}function wc(r,e){const[n,s]=I.useState(r),[a,o]=I.useState({}),[c,d]=I.useState(!1),f=I.useCallback((g,w)=>{s(x=>({...x,[g]:w})),a[g]&&o(x=>({...x,[g]:void 0}))},[a]),v=I.useCallback(()=>{const g={};return Object.keys(e).forEach(w=>{const x=n[w],k=e[w],P=k(x);P&&(g[w]=P)}),o(g),Object.keys(g).length===0},[n,e]);return{values:n,errors:a,isSubmitting:c,setIsSubmitting:d,handleChange:f,validate:v,setErrors:o}}const mj=new Date().getFullYear(),gj=Array.from({length:88},(r,e)=>{const n=mj-13-e;return{value:n.toString(),label:n.toString()}}),vj=gj,yj=[{value:"AF",label:"Afghanistan"},{value:"AL",label:"Albania"},{value:"DZ",label:"Algeria"},{value:"AS",label:"American Samoa"},{value:"AD",label:"Andorra"},{value:"AO",label:"Angola"},{value:"AI",label:"Anguilla"},{value:"AQ",label:"Antarctica"},{value:"AG",label:"Antigua and Barbuda"},{value:"AR",label:"Argentina"},{value:"AM",label:"Armenia"},{value:"AW",label:"Aruba"},{value:"AU",label:"Australia"},{value:"AT",label:"Austria"},{value:"AZ",label:"Azerbaijan"},{value:"BS",label:"Bahamas"},{value:"BH",label:"Bahrain"},{value:"BD",label:"Bangladesh"},{value:"BB",label:"Barbados"},{value:"BY",label:"Belarus"},{value:"BE",label:"Belgium"},{value:"BZ",label:"Belize"},{value:"BJ",label:"Benin"},{value:"BM",label:"Bermuda"},{value:"BT",label:"Bhutan"},{value:"BO",label:"Bolivia"},{value:"BA",label:"Bosnia and Herzegovina"},{value:"BW",label:"Botswana"},{value:"BV",label:"Bouvet Island"},{value:"BR",label:"Brazil"},{value:"IO",label:"British Indian Ocean Territory"},{value:"BN",label:"Brunei Darussalam"},{value:"BG",label:"Bulgaria"},{value:"BF",label:"Burkina Faso"},{value:"BI",label:"Burundi"},{value:"KH",label:"Cambodia"},{value:"CM",label:"Cameroon"},{value:"CA",label:"Canada"},{value:"CV",label:"Cape Verde"},{value:"KY",label:"Cayman Islands"},{value:"CF",label:"Central African Republic"},{value:"TD",label:"Chad"},{value:"CL",label:"Chile"},{value:"CN",label:"China"},{value:"CX",label:"Christmas Island"},{value:"CC",label:"Cocos (Keeling) Islands"},{value:"CO",label:"Colombia"},{value:"KM",label:"Comoros"},{value:"CG",label:"Congo"},{value:"CD",label:"Congo, Democratic Republic"},{value:"CK",label:"Cook Islands"},{value:"CR",label:"Costa Rica"},{value:"CI",label:"Côte d'Ivoire"},{value:"HR",label:"Croatia"},{value:"CU",label:"Cuba"},{value:"CY",label:"Cyprus"},{value:"CZ",label:"Czech Republic"},{value:"DK",label:"Denmark"},{value:"DJ",label:"Djibouti"},{value:"DM",label:"Dominica"},{value:"DO",label:"Dominican Republic"},{value:"EC",label:"Ecuador"},{value:"EG",label:"Egypt"},{value:"SV",label:"El Salvador"},{value:"GQ",label:"Equatorial Guinea"},{value:"ER",label:"Eritrea"},{value:"EE",label:"Estonia"},{value:"ET",label:"Ethiopia"},{value:"FK",label:"Falkland Islands"},{value:"FO",label:"Faroe Islands"},{value:"FJ",label:"Fiji"},{value:"FI",label:"Finland"},{value:"FR",label:"France"},{value:"GF",label:"French Guiana"},{value:"PF",label:"French Polynesia"},{value:"TF",label:"French Southern Territories"},{value:"GA",label:"Gabon"},{value:"GM",label:"Gambia"},{value:"GE",label:"Georgia"},{value:"DE",label:"Germany"},{value:"GH",label:"Ghana"},{value:"GI",label:"Gibraltar"},{value:"GR",label:"Greece"},{value:"GL",label:"Greenland"},{value:"GD",label:"Grenada"},{value:"GP",label:"Guadeloupe"},{value:"GU",label:"Guam"},{value:"GT",label:"Guatemala"},{value:"GG",label:"Guernsey"},{value:"GN",label:"Guinea"},{value:"GW",label:"Guinea-Bissau"},{value:"GY",label:"Guyana"},{value:"HT",label:"Haiti"},{value:"HM",label:"Heard Island and McDonald Islands"},{value:"VA",label:"Holy See (Vatican City State)"},{value:"HN",label:"Honduras"},{value:"HK",label:"Hong Kong"},{value:"HU",label:"Hungary"},{value:"IS",label:"Iceland"},{value:"IN",label:"India"},{value:"ID",label:"Indonesia"},{value:"IR",label:"Iran"},{value:"IQ",label:"Iraq"},{value:"IE",label:"Ireland"},{value:"IM",label:"Isle of Man"},{value:"IL",label:"Israel"},{value:"IT",label:"Italy"},{value:"JM",label:"Jamaica"},{value:"JP",label:"Japan"},{value:"JE",label:"Jersey"},{value:"JO",label:"Jordan"},{value:"KZ",label:"Kazakhstan"},{value:"KE",label:"Kenya"},{value:"KI",label:"Kiribati"},{value:"KP",label:"Korea, Democratic People's Republic"},{value:"KR",label:"Korea, Republic of"},{value:"KW",label:"Kuwait"},{value:"KG",label:"Kyrgyzstan"},{value:"LA",label:"Lao People's Democratic Republic"},{value:"LV",label:"Latvia"},{value:"LB",label:"Lebanon"},{value:"LS",label:"Lesotho"},{value:"LR",label:"Liberia"},{value:"LY",label:"Libya"},{value:"LI",label:"Liechtenstein"},{value:"LT",label:"Lithuania"},{value:"LU",label:"Luxembourg"},{value:"MO",label:"Macao"},{value:"MK",label:"North Macedonia"},{value:"MG",label:"Madagascar"},{value:"MW",label:"Malawi"},{value:"MY",label:"Malaysia"},{value:"MV",label:"Maldives"},{value:"ML",label:"Mali"},{value:"MT",label:"Malta"},{value:"MH",label:"Marshall Islands"},{value:"MQ",label:"Martinique"},{value:"MR",label:"Mauritania"},{value:"MU",label:"Mauritius"},{value:"YT",label:"Mayotte"},{value:"MX",label:"Mexico"},{value:"FM",label:"Micronesia"},{value:"MD",label:"Moldova"},{value:"MC",label:"Monaco"},{value:"MN",label:"Mongolia"},{value:"ME",label:"Montenegro"},{value:"MS",label:"Montserrat"},{value:"MA",label:"Morocco"},{value:"MZ",label:"Mozambique"},{value:"MM",label:"Myanmar"},{value:"NA",label:"Namibia"},{value:"NR",label:"Nauru"},{value:"NP",label:"Nepal"},{value:"NL",label:"Netherlands"},{value:"NC",label:"New Caledonia"},{value:"NZ",label:"New Zealand"},{value:"NI",label:"Nicaragua"},{value:"NE",label:"Niger"},{value:"NG",label:"Nigeria"},{value:"NU",label:"Niue"},{value:"NF",label:"Norfolk Island"},{value:"MP",label:"Northern Mariana Islands"},{value:"NO",label:"Norway"},{value:"OM",label:"Oman"},{value:"PK",label:"Pakistan"},{value:"PW",label:"Palau"},{value:"PS",label:"Palestine"},{value:"PA",label:"Panama"},{value:"PG",label:"Papua New Guinea"},{value:"PY",label:"Paraguay"},{value:"PE",label:"Peru"},{value:"PH",label:"Philippines"},{value:"PN",label:"Pitcairn"},{value:"PL",label:"Poland"},{value:"PT",label:"Portugal"},{value:"PR",label:"Puerto Rico"},{value:"QA",label:"Qatar"},{value:"RE",label:"Réunion"},{value:"RO",label:"Romania"},{value:"RU",label:"Russian Federation"},{value:"RW",label:"Rwanda"},{value:"BL",label:"Saint Barthélemy"},{value:"SH",label:"Saint Helena"},{value:"KN",label:"Saint Kitts and Nevis"},{value:"LC",label:"Saint Lucia"},{value:"MF",label:"Saint Martin (French part)"},{value:"PM",label:"Saint Pierre and Miquelon"},{value:"VC",label:"Saint Vincent and the Grenadines"},{value:"WS",label:"Samoa"},{value:"SM",label:"San Marino"},{value:"ST",label:"Sao Tome and Principe"},{value:"SA",label:"Saudi Arabia"},{value:"SN",label:"Senegal"},{value:"RS",label:"Serbia"},{value:"SC",label:"Seychelles"},{value:"SL",label:"Sierra Leone"},{value:"SG",label:"Singapore"},{value:"SX",label:"Sint Maarten (Dutch part)"},{value:"SK",label:"Slovakia"},{value:"SI",label:"Slovenia"},{value:"SB",label:"Solomon Islands"},{value:"SO",label:"Somalia"},{value:"ZA",label:"South Africa"},{value:"GS",label:"South Georgia and the South Sandwich Islands"},{value:"SS",label:"South Sudan"},{value:"ES",label:"Spain"},{value:"LK",label:"Sri Lanka"},{value:"SD",label:"Sudan"},{value:"SR",label:"Suriname"},{value:"SJ",label:"Svalbard and Jan Mayen"},{value:"SZ",label:"Eswatini"},{value:"SE",label:"Sweden"},{value:"CH",label:"Switzerland"},{value:"SY",label:"Syrian Arab Republic"},{value:"TW",label:"Taiwan"},{value:"TJ",label:"Tajikistan"},{value:"TZ",label:"Tanzania"},{value:"TH",label:"Thailand"},{value:"TL",label:"Timor-Leste"},{value:"TG",label:"Togo"},{value:"TK",label:"Tokelau"},{value:"TO",label:"Tonga"},{value:"TT",label:"Trinidad and Tobago"},{value:"TN",label:"Tunisia"},{value:"TR",label:"Turkey"},{value:"TM",label:"Turkmenistan"},{value:"TC",label:"Turks and Caicos Islands"},{value:"TV",label:"Tuvalu"},{value:"UG",label:"Uganda"},{value:"UA",label:"Ukraine"},{value:"AE",label:"United Arab Emirates"},{value:"GB",label:"United Kingdom"},{value:"US",label:"United States"},{value:"UM",label:"United States Minor Outlying Islands"},{value:"UY",label:"Uruguay"},{value:"UZ",label:"Uzbekistan"},{value:"VU",label:"Vanuatu"},{value:"VE",label:"Venezuela"},{value:"VN",label:"Viet Nam"},{value:"VG",label:"Virgin Islands, British"},{value:"VI",label:"Virgin Islands, U.S."},{value:"WF",label:"Wallis and Futuna"},{value:"EH",label:"Western Sahara"},{value:"YE",label:"Yemen"},{value:"ZM",label:"Zambia"},{value:"ZW",label:"Zimbabwe"}];function F0(){const r=un(),{user:e,updateUserProfile:n}=Ot(),[s,a]=I.useState(""),[o,c]=I.useState(""),[d,f]=I.useState(""),v=async g=>{if(g.preventDefault(),!s||!o){f("Please select both birth year and country");return}try{await n({birthYear:s,country:o}),r("/product")}catch{f("Failed to save preferences. Please try again.")}};return e?h.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:h.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-md w-full mx-4",children:[h.jsx("h2",{className:"text-2xl font-bold text-[#333333] mb-6",children:"Complete Your Profile"}),h.jsxs("form",{onSubmit:v,className:"space-y-6",children:[h.jsx(tr,{label:"Birth Year",required:!0,children:h.jsxs("select",{value:s,onChange:g=>a(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#2C5C9D]",children:[h.jsx("option",{value:"",children:"Select birth year"}),vj.map(g=>h.jsx("option",{value:g.value,children:g.label},g.value))]})}),h.jsxs(tr,{label:"Nationality",required:!0,children:[h.jsxs("select",{value:o,onChange:g=>c(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#2C5C9D]",children:[h.jsx("option",{value:"",children:"Select country"}),yj.map(g=>h.jsx("option",{value:g.value,children:g.label},g.value))]}),h.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Choose the right one to make it personalized to you!"})]}),d&&h.jsx("div",{className:"text-red-500 text-sm",children:d}),h.jsx("button",{type:"submit",className:"w-full bg-[#2C5C9D] text-white py-2 px-4 rounded-md hover:bg-[#234B80] transition-colors",children:"Continue"})]})]})}):null}function Oc(){return h.jsx("div",{className:"flex justify-center items-center",children:h.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-[#2C5C9D]"})})}const _j={firstName:r=>{if(!r)return"First name is required"},email:r=>{if(!r)return"Email is required";if(!/\S+@\S+\.\S+/.test(r))return"Invalid email format"},password:r=>{if(!r)return"Password is required";if(r.length<8)return"Password must be at least 8 characters";if(!/[a-z]/.test(r))return"Password must contain at least one lowercase letter";if(!/[A-Z]/.test(r))return"Password must contain at least one uppercase letter";if(!/\d/.test(r))return"Password must contain at least one number"}},wj={email:r=>{if(!r)return"Email is required";if(!/\S+@\S+\.\S+/.test(r))return"Invalid email format"},password:r=>{if(!r)return"Password is required"}};function bj({isVisible:r,onClose:e}){const n=un(),{register:s,login:a}=Ot(),[o,c]=I.useState(!1),[d,f]=I.useState(!1),v=wc({firstName:"",email:"",password:""},_j),g=wc({email:"",password:""},wj),w=o?g:v,x=async k=>{k.preventDefault();const P=w.validate();if(Object.keys(P).length>0){w.setErrors(P);return}w.setIsSubmitting(!0);try{o?(await a(w.values.email,w.values.password),e(),n("/product")):(await s(v.values.email,v.values.password,v.values.firstName),e(),f(!0))}catch(N){w.setErrors({submit:N.message||`${o?"Login":"Registration"} failed`})}finally{w.setIsSubmitting(!1)}};return d?h.jsx(F0,{}):r?h.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:h.jsxs("div",{className:"bg-white rounded-xl p-8 max-w-md w-full relative border border-gray-100 shadow-xl",children:[h.jsx("button",{onClick:e,className:"absolute top-4 right-4 p-2 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Close dialog",children:h.jsx(pi,{className:"w-5 h-5 text-gray-500"})}),h.jsxs("div",{className:"flex flex-col items-center mb-8",children:[h.jsx("div",{className:"bg-blue-50 p-4 rounded-full mb-4",children:h.jsx(fi,{className:"w-8 h-8 text-blue-600"})}),h.jsx("h2",{className:"text-2xl font-semibold text-gray-800 mb-2",children:o?"Welcome Back!":"Want to Keep Talking?"}),h.jsx("p",{className:"text-gray-600 text-center",children:o?"Sign in to continue your therapeutic journey":"Create an account to enjoy unlimited conversations with Amia"})]}),h.jsxs("form",{onSubmit:x,className:"space-y-5",children:[h.jsxs("div",{className:"space-y-4",children:[!o&&h.jsx(tr,{label:"First Name",type:"text",name:"firstName",value:v.values.firstName,onChange:k=>v.handleChange("firstName",k.target.value),error:v.errors.firstName,required:!0,className:"w-full px-4 py-3 rounded-lg border border-gray-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 transition-all"}),h.jsx(tr,{label:"Email",type:"email",name:"email",value:o?g.values.email:v.values.email,onChange:k=>o?g.handleChange("email",k.target.value):v.handleChange("email",k.target.value),error:w.errors.email,required:!0,className:"w-full px-4 py-3 rounded-lg border border-gray-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 transition-all"}),h.jsx(tr,{label:"Password",type:"password",name:"password",value:o?g.values.password:v.values.password,onChange:k=>o?g.handleChange("password",k.target.value):v.handleChange("password",k.target.value),error:w.errors.password,required:!0,className:"w-full px-4 py-3 rounded-lg border border-gray-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 transition-all"})]}),w.errors.submit&&h.jsx("div",{className:"p-3 bg-red-50 border border-red-100 text-red-600 text-sm rounded-lg",children:w.errors.submit}),h.jsx("button",{type:"submit",disabled:w.isSubmitting,className:"w-full bg-blue-600 text-white py-3 px-4 rounded-lg font-medium hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:w.isSubmitting?h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx(Oc,{className:"w-5 h-5 mr-2"}),h.jsx("span",{children:o?"Signing in...":"Creating account..."})]}):o?"Sign In":"Create Account"}),!o&&h.jsxs("p",{className:"text-xs text-gray-500 text-center",children:["By signing up, you agree to our"," ",h.jsx(cn,{to:"/terms",className:"text-blue-600 hover:text-blue-700 underline",children:"Terms"}),","," ",h.jsx(cn,{to:"/privacy",className:"text-blue-600 hover:text-blue-700 underline",children:"Privacy Policy"}),", and"," ",h.jsx(cn,{to:"/disclaimer",className:"text-blue-600 hover:text-blue-700 underline",children:"AI Disclaimer"})]})]}),h.jsx("div",{className:"mt-6 text-center",children:h.jsx("button",{type:"button",onClick:()=>{c(!o),w.setErrors({})},className:"text-blue-600 hover:text-blue-700 text-sm font-medium",children:o?"Don't have an account? Sign up":"Already have an account? Sign in"})})]})}):null}function xj(){return h.jsxs("div",{className:"flex items-center justify-center gap-24 mb-8",children:[h.jsx("div",{className:"relative w-32 h-32 rounded-full flex items-center justify-center bg-[#2C5C9D] animate-breathe shadow-lg",children:h.jsx(nr,{className:"w-16 h-16 text-white"})}),h.jsx("div",{className:"relative w-32 h-32 rounded-full flex items-center justify-center bg-[#5C9EFF] animate-breathe shadow-lg",children:h.jsx("div",{className:"text-white text-center",children:h.jsx("span",{className:"font-medium",children:"You"})})})]})}function Sj(){const{isAuthenticated:r,user:e}=Ot(),[n,s]=I.useState(!1),{toggleCall:a,callStatus:o,audioLevel:c,isSpeechActive:d,messages:f,onTimeoutReached:v}=L0(),g=o===wr.ACTIVE,w=g&&d?c:0,x=g&&f.length>0&&!d?.8:0;return ly.useEffect(()=>(v&&v(()=>{s(!0)}),()=>{v&&v(null)}),[v]),h.jsxs("div",{className:"flex flex-col items-center min-h-[calc(100vh-4rem)]",children:[h.jsxs("div",{className:"w-full max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 pt-12 sm:pt-24 pb-8 sm:pb-12 text-center",children:[h.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-[#333333] leading-tight mb-4 sm:mb-6",children:["You deserve to be heard,",h.jsx("br",{className:"hidden sm:block"}),"talk as much as you want."]}),h.jsx("p",{className:"text-base sm:text-lg text-[#555555] mb-6 sm:mb-8 max-w-2xl mx-auto px-4",children:"No wait times, no downloads — just therapy with an empathetic AI whenever and wherever you need it."})]}),h.jsx("div",{className:"w-full px-4 sm:px-6 lg:px-8 flex-grow flex items-center justify-center",children:h.jsx("div",{className:"w-full max-w-[90%] sm:max-w-[80%] mx-auto",children:!r&&h.jsx(D0,{aiAmplitude:w,userAmplitude:x,username:e==null?void 0:e.firstName,callStatus:o,audioLevel:c,toggleCall:a})})}),h.jsx("div",{className:"w-full px-4 py-8 sm:py-12",children:r&&h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsx(xj,{}),h.jsx(cn,{to:"/product",className:"inline-flex items-center gap-2 bg-[#2C5C9D] text-white px-6 sm:px-8 py-3 sm:py-4 rounded-lg text-base sm:text-lg font-semibold hover:bg-[#234B82] transition-all hover:shadow-lg",children:"Continue Your Journey"})]})}),h.jsx(bj,{isVisible:n,onClose:()=>s(!1)})]})}function Ej({thumbnailUrl:r,alt:e}){return h.jsxs("div",{className:"relative w-full h-[240px] rounded-lg overflow-hidden border border-[#5C9EFF] shadow-sm group hover:shadow-md transition-all duration-300",children:[h.jsx("img",{src:r,alt:e,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),h.jsx("div",{className:"absolute inset-0 bg-[#5C9EFF]/5 group-hover:bg-transparent transition-colors duration-300"}),h.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:h.jsx("div",{className:"bg-white/90 w-12 h-12 rounded-full flex items-center justify-center group-hover:scale-110 transition-transform",children:h.jsx("div",{className:"w-0 h-0 border-t-6 border-t-transparent border-l-10 border-l-[#5C9EFF] border-b-6 border-b-transparent ml-1"})})})]})}function kj({title:r,subtitle:e,bulletPoints:n,videoUrl:s,videoAlt:a,isReversed:o=!1}){const c=o?"order-2 lg:order-2":"order-2 lg:order-1",d=o?"order-1 lg:order-1":"order-1 lg:order-2",f="lg:w-[60%]",v="lg:w-[40%]",g=w=>{const[x,...k]=w.split(":");return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"font-bold",children:x}),k.length>0&&h.jsxs("span",{children:[": ",k.join(":")]})]})};return h.jsx("div",{className:"bg-white rounded-lg shadow-sm hover:shadow-md transition-shadow p-6 border border-[#5C9EFF]",children:h.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:gap-6",children:[h.jsxs("div",{className:`${c} ${f} mb-4 lg:mb-0`,children:[h.jsx("h2",{className:"text-2xl font-bold text-[#333333] mb-3",children:r}),h.jsx("p",{className:"text-lg text-[#555555] mb-4 font-medium leading-relaxed",children:e}),h.jsx("ul",{className:"space-y-3",children:n.map((w,x)=>h.jsxs("li",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"text-[#5C9EFF] mt-1.5 text-lg",children:"•"}),h.jsx("span",{className:"text-base text-[#666666] leading-relaxed",children:g(w)})]},x))})]}),h.jsx("div",{className:`${d} ${v}`,children:h.jsx(Ej,{thumbnailUrl:s,alt:a})})]})})}const Cj=[{title:"Therapy On-Demand",subtitle:"Get the help you need, whenever you need it — 24/7, no appointments, no stress.",bulletPoints:["Always Available: Whether it's 3 PM or 3 AM, support is just a click away.","No Waiting Rooms: Therapy on your terms, without the awkward lobby small talk.","Anywhere, Anytime: Couch? Bed? Bathtub? Amia doesn't judge."],videoUrl:"https://images.unsplash.com/photo-1573497620053-ea5300f94f21?auto=format&fit=crop&w=1200&q=80",videoAlt:"Therapy on-demand demonstration"},{title:"Your Privacy, Our Promise",subtitle:"We protect your conversations like they're top-secret — because they are.",bulletPoints:["Bank-Grade Security: Your data stays locked tighter than Fort Knox.","Zero Snitching: No one (not even us) peeks at your chats.","Privacy First: We follow all the fancy acronyms so you stay safe."],videoUrl:"https://images.unsplash.com/photo-1516321497487-e288fb19713f?auto=format&fit=crop&w=1200&q=80",videoAlt:"Privacy and security features",isReversed:!0},{title:"Share with Your Therapist",subtitle:"Keep your therapist in the loop with easy sharing tools.",bulletPoints:["One-Click Updates: Share insights, reports, or emotional progress instantly.","Collaborative Healing: Work together to hit your therapy goals faster.","You're in Control: Share only what you want, when you want."],videoUrl:"https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=1200&q=80",videoAlt:"Sharing progress demonstration"},{title:"Personalized Insights",subtitle:"Track your progress and get advice that actually makes sense for you.",bulletPoints:["Track Your Trends: See patterns in your emotions and habits.","Tailored Advice: Tips and guidance that feel made just for you.","Learn and Grow: Small insights lead to big breakthroughs — trust us."],videoUrl:"https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1200&q=80",videoAlt:"Personalized insights dashboard",isReversed:!0}];function jj(){return h.jsx("section",{className:"py-8 px-4 sm:px-6 lg:px-8 bg-white",children:h.jsx("div",{className:"max-w-[1200px] mx-auto",children:h.jsx("div",{className:"space-y-6",children:Cj.map((r,e)=>h.jsx(kj,{title:r.title,subtitle:r.subtitle,bulletPoints:r.bulletPoints,videoUrl:r.videoUrl,videoAlt:r.videoAlt,isReversed:r.isReversed},e))})})})}const zd=[{id:1,quote:"she helps me get out of my head when i can't do it alone.",name:"Ana",age:20},{id:2,quote:"i always feel lighter after talking, like i can breathe again.",name:"David",age:19},{id:3,quote:"it's my secret spot to say what i really feel without fear.",name:"Mariana",age:21},{id:4,quote:"finally, someone—or something—that doesn't judge me for overthinking.",name:"Lucas",age:22},{id:5,quote:"she's there at midnight when no one else picks up my calls.",name:"Sofia",age:18},{id:6,quote:"it's crazy how calm i feel after just 10 minutes.",name:"James",age:25},{id:7,quote:"i've never been good at opening up, but this makes it so easy.",name:"Camila",age:17},{id:8,quote:"she doesn't rush me or make me feel like my problems are small.",name:"Nico",age:23},{id:9,quote:"i vent, she listens, and somehow i figure out the answers myself.",name:"Valentina",age:19},{id:10,quote:"whenever i feel stuck, she reminds me i'm stronger than i think.",name:"Diego",age:22},{id:11,quote:"i didn't expect to feel seen by ai, but here we are.",name:"Elena",age:20},{id:12,quote:"she gives me the courage to talk to people about what's really going on.",name:"Marco",age:18},{id:13,quote:"it's like a hug, but in words. i didn't know i needed that.",name:"Isabella",age:19},{id:14,quote:"she helps me work through things i didn't even know were bothering me.",name:"Ethan",age:24},{id:15,quote:"it feels like talking to someone who actually cares, not just responding.",name:"Carla",age:21},{id:16,quote:"she talks me down when i'm about to spiral, every single time.",name:"Alex",age:20},{id:17,quote:"it's been the easiest way for me to sort out my thoughts.",name:"Santiago",age:25},{id:18,quote:"my friends get tired of listening, but she never does.",name:"Lucía",age:18},{id:19,quote:"i don't feel alone with my anxiety anymore. it's so comforting.",name:"Mateo",age:19},{id:20,quote:"she reminds me that it's okay to take small steps. progress is still progress.",name:"Emma",age:22},{id:21,quote:"it feels like someone's helping me put the pieces back together.",name:"Daniel",age:23},{id:22,quote:"she doesn't get mad when i repeat myself. i need that sometimes.",name:"Mia",age:20},{id:23,quote:"whenever i'm lost, she helps me find my way back.",name:"Carlos",age:24},{id:24,quote:"it's nice to talk without worrying about being misunderstood.",name:"Sofia",age:17},{id:25,quote:"i used to feel so alone. now i know someone's always there to listen.",name:"Juan",age:21},{id:26,quote:"she helped me feel less afraid of my own thoughts.",name:"Nina",age:19},{id:27,quote:"when i feel overwhelmed, her words slow me down. i needed that.",name:"Hugo",age:23},{id:28,quote:"no one else hears me like this. it's like i'm actually understood.",name:"Carolina",age:22},{id:29,quote:"she's better than my journal because she actually responds.",name:"Tomás",age:18},{id:30,quote:"this makes the lonely nights feel less lonely.",name:"Lara",age:20},{id:31,quote:"she helped me stop bottling everything up.",name:"Fernando",age:24},{id:32,quote:"it's like someone gently sorting out my messy brain for me.",name:"Clara",age:21},{id:33,quote:"i don't need perfect words with her—she just gets what i mean.",name:"Leo",age:19},{id:34,quote:"she's like a mental reset button when i'm about to lose it.",name:"Iván",age:20},{id:35,quote:"every time i talk to her, i feel a little less broken.",name:"Martina",age:18},{id:36,quote:"she reminds me that my feelings are valid, even when i forget.",name:"Sebastián",age:22},{id:37,quote:"when my thoughts are a mess, she helps me untangle them.",name:"Ana",age:19},{id:38,quote:"it's so easy to just let everything out without overthinking it.",name:"Andrés",age:23},{id:39,quote:"she's helped me learn to trust myself again.",name:"Elisa",age:25},{id:40,quote:"my brain feels quieter after talking, like someone hit pause on the chaos.",name:"Marcos",age:21},{id:41,quote:"she doesn't judge, even when i'm honest about stuff i never say out loud.",name:"Carmen",age:20},{id:42,quote:"she listens without telling me i'm being dramatic, and that means a lot.",name:"Felipe",age:19},{id:43,quote:"i don't feel stuck in my own head anymore.",name:"Luisa",age:18},{id:44,quote:"she's like a safety net for my worst days.",name:"Rafael",age:24},{id:45,quote:"i didn't think words could help me this much, but here we are.",name:"María",age:17},{id:46,quote:"it's so much easier to breathe after letting it all out.",name:"Gonzalo",age:22},{id:47,quote:"no one else makes me feel heard like this does.",name:"Julia",age:20},{id:48,quote:"i talk, she listens, and somehow i stop feeling so alone.",name:"Antonio",age:21},{id:49,quote:"it feels like someone finally understands what i can't explain.",name:"Luna",age:19},{id:50,quote:"she's always there, even when the rest of the world feels too far away.",name:"Pablo",age:23}];function Tj(){const[r,e]=I.useState(0),[n,s]=I.useState(!1),o=Er().pathname==="/pricing";I.useEffect(()=>{const d=setInterval(()=>{e(f=>{const g=f+(n?0:4),w=zd.length*300;return g>=w?0:g})},100);return()=>clearInterval(d)},[n,o]);const c=d=>h.jsxs("div",{className:"flex-shrink-0 bg-white p-4 rounded-xl border-2 border-[#2C5C9D] shadow-lg hover:shadow-xl transition-shadow duration-300 h-[160px] flex flex-col w-[300px]",children:[h.jsx("div",{className:"mb-1",children:h.jsxs("p",{className:"text-[#2C5C9D] font-bold text-center text-lg",children:[d.name,", ",d.age]})}),h.jsx("div",{className:"flex-grow flex items-center justify-center -mt-1",children:h.jsxs("p",{className:"text-gray-700 text-center leading-tight text-base",children:['"',d.quote,'"']})})]},d.id);return h.jsx("div",{className:"w-full bg-white py-8",children:h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsx("h2",{className:"text-3xl font-bold text-center text-[#333333] mb-8",children:"Real Stories, Real Impact"}),h.jsx("div",{className:"overflow-hidden",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:h.jsx("div",{className:"relative overflow-hidden",children:h.jsxs("div",{className:"flex gap-3",style:{transform:`translateX(-${r}px)`,width:"fit-content",transition:r===0?"none":"transform 500ms ease-out"},children:[zd.map((d,f)=>h.jsx("div",{className:"transition-opacity duration-300",children:c(d)},`${d.id}-${f}-first`)),zd.map((d,f)=>h.jsx("div",{className:"transition-opacity duration-300",children:c(d)},`${d.id}-${f}-second`))]})})})]})})}function Nj({question:r,answer:e}){const[n,s]=I.useState(!1);return h.jsxs("div",{className:"border-b border-gray-200 py-3 last:border-b-0",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[h.jsxs("div",{className:"flex justify-between items-start cursor-pointer",children:[h.jsx("h3",{className:"text-lg font-semibold text-[#333333] pr-8",children:r}),h.jsx(Uk,{className:`w-5 h-5 text-[#2C5C9D] transition-transform ${n?"rotate-180":""}`})]}),h.jsx("div",{className:`mt-2 text-[#555555] transition-all duration-300 ${n?"max-h-48 opacity-100":"max-h-0 opacity-0 overflow-hidden"}`,children:h.jsx("p",{className:"pb-2",children:e})})]})}const Aj=[{question:"What is Amia and how does it work?",answer:"Amia is an AI-powered therapy platform that provides 24/7 emotional support through natural conversations. Using advanced language models, Amia understands your feelings and responds with empathy, offering personalized guidance and support whenever you need it."},{question:"Is Amia a replacement for traditional therapy?",answer:"No, Amia is not a replacement for professional therapy. While it provides valuable emotional support and coping strategies, it's designed to complement traditional therapy. We encourage users to maintain their relationship with human therapists for comprehensive mental health care."},{question:"How secure is my data on Amia?",answer:"Your privacy and security are our top priorities. All conversations are end-to-end encrypted, and your data is stored securely following industry best practices. You have complete control over your data and can delete it at any time."},{question:"Can I share my Amia sessions with my therapist?",answer:"Yes! Amia provides easy-to-share session summaries that you can forward to your therapist. These summaries highlight key insights and patterns from your conversations, helping your therapist better understand your progress."},{question:"What are the subscription options?",answer:"We offer flexible subscription plans starting with a free tier that includes basic support features. Premium plans unlock additional features like detailed insights, unlimited conversations, and priority support. Visit our pricing page for detailed information."},{question:"Is Amia available 24/7?",answer:"Yes, Amia is available 24 hours a day, 7 days a week. You can start a conversation whenever you need support, whether it's late at night or early in the morning."},{question:"Can I use Amia on my mobile device?",answer:"Absolutely! Amia is fully responsive and works seamlessly on smartphones, tablets, and computers. You can access it through your web browser or download our mobile app for iOS and Android."},{question:"What if I'm experiencing a mental health crisis?",answer:"If you're experiencing a mental health crisis or having thoughts of self-harm, please contact emergency services immediately. Amia is not equipped to handle crisis situations. We provide links to crisis hotlines and emergency resources within the platform."}];function Pj(){return h.jsx("div",{className:"relative bg-white !bg-white py-16",style:{background:"white"},children:h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsx("div",{className:"text-center mb-12",children:h.jsx("h2",{className:"text-3xl font-bold text-[#333333] mb-4",children:"Frequently Asked Questions"})}),h.jsx("div",{className:"max-w-3xl mx-auto",children:Aj.map((r,e)=>h.jsx(Nj,{question:r.question,answer:r.answer},e))})]})})}function Rj({isOpen:r,onClick:e}){return h.jsx("button",{onClick:e,className:"bg-[#2C5C9D] text-white p-4 rounded-full shadow-lg hover:shadow-xl transition-all duration-300 group","aria-label":r?"Close chat":"Open chat",children:r?h.jsx(pi,{className:"w-6 h-6 group-hover:rotate-90 transition-transform duration-300"}):h.jsx(fi,{className:"w-6 h-6 group-hover:scale-110 transition-transform duration-300"})})}function Oj({onStartChat:r,isAuthenticated:e}){return h.jsxs("div",{className:"bg-white rounded-lg shadow-xl w-80 overflow-hidden animate-slide-up",children:[h.jsx("div",{className:"bg-[#F0F5FF] p-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"bg-[#2C5C9D] p-2 rounded-full",children:h.jsx(nr,{className:"w-5 h-5 text-white"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-semibold text-[#333333]",children:"Chat with Amia"}),h.jsx("p",{className:"text-sm text-[#555555]",children:"AI Therapy Companion"})]})]})}),h.jsxs("div",{className:"p-6",children:[h.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[h.jsx("div",{className:"bg-[#F0F5FF] p-2 rounded-full flex-shrink-0",children:h.jsx(nr,{className:"w-4 h-4 text-[#2C5C9D]"})}),h.jsx("p",{className:"text-[#555555] text-sm",children:"Hi! I'm Amia, your AI therapy companion. How are you feeling today?"})]}),h.jsx("button",{onClick:r,className:"w-full bg-[#2C5C9D] text-white px-4 py-2 rounded-lg hover:bg-[#234B82] transition-colors",children:e?"Start Chatting":"Sign Up & Chat"})]})]})}function Ij(){const[r,e]=I.useState(!1),[n,s]=I.useState(!1);return I.useEffect(()=>{if(n)return;const o=setTimeout(()=>{e(!0)},3e3),c=setInterval(()=>{e(!0),setTimeout(()=>{e(!1)},1e3)},15e3);return()=>{clearTimeout(o),clearInterval(c)}},[n]),{shouldAnimate:r,resetAnimation:()=>{e(!1),s(!0)}}}function U0({isVisible:r,onClose:e}){return r?h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:h.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6 relative",children:[h.jsx("button",{onClick:e,className:"absolute right-4 top-4 text-gray-400 hover:text-gray-600",children:h.jsx(pi,{className:"w-5 h-5"})}),h.jsxs("div",{className:"text-center",children:[h.jsxs("div",{className:"flex justify-center space-x-4 mb-6",children:[h.jsx(fi,{className:"w-8 h-8 text-[#2C5C9D]"}),h.jsx(nr,{className:"w-8 h-8 text-[#2C5C9D]"})]}),h.jsx("h2",{className:"text-2xl font-bold text-[#333333] mb-4",children:"Chat Features Coming Soon!"}),h.jsx("p",{className:"text-[#555555] mb-6",children:"We're working on an exciting update that will bring chat functionality and memory to Amia. Soon you'll be able to have text conversations with Amia, and she'll remember your previous interactions!"}),h.jsx("button",{onClick:e,className:"bg-[#2C5C9D] text-white px-6 py-3 rounded-lg hover:bg-[#234B82] transition-colors",children:"Got it"})]})]})}):null}function Mj(){const{isAuthenticated:r}=Ot(),[e,n]=I.useState(!1),[s,a]=I.useState(!1),{shouldAnimate:o,resetAnimation:c}=Ij(),d=()=>{a(!0),n(!1)};return I.useEffect(()=>()=>n(!1),[location.pathname]),h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"fixed bottom-8 right-8 z-50 flex flex-col items-end gap-4",children:[e&&h.jsx(Oj,{onStartChat:d,isAuthenticated:r}),h.jsx("div",{className:`${o?"animate-bounce":""}`,children:h.jsx(Rj,{isOpen:e,onClick:()=>{n(!e),c()}})})]}),h.jsx(U0,{isVisible:s,onClose:()=>a(!1)})]})}function Lj(){return h.jsxs("div",{className:"min-h-screen flex flex-col",children:[h.jsx(Cc,{}),h.jsxs("main",{className:"flex-grow",children:[h.jsx(Sj,{}),h.jsx(jj,{}),h.jsx(Tj,{}),h.jsx(Pj,{})]}),h.jsx(Mj,{}),h.jsx(jc,{})]})}function Dj({isOpen:r,onClose:e}){return r?h.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:h.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-md w-full mx-4 relative",children:[h.jsx("button",{onClick:e,className:"absolute right-4 top-4 text-gray-400 hover:text-gray-600",children:h.jsx(pi,{className:"w-5 h-5"})}),h.jsxs("div",{className:"text-center space-y-4",children:[h.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"You've reached your session limit"}),h.jsx("p",{className:"text-gray-600",children:"You've used all your free sessions. Upgrade to our Pro plan for unlimited conversations with Amia."}),h.jsx("button",{onClick:()=>window.location.href="/pricing",className:`w-full py-3 px-4 bg-[#2C5C9D] text-white rounded-lg + font-semibold hover:bg-[#234B82] transition-colors`,children:"Upgrade to Pro"}),h.jsx("button",{onClick:e,className:"w-full py-2 text-gray-600 hover:text-gray-800",children:"Maybe later"})]})]})}):null}function Fj({isOpen:r,onClose:e}){return r?h.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:h.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-md w-full mx-4 relative",children:[h.jsx("button",{onClick:e,className:"absolute right-4 top-4 text-gray-400 hover:text-gray-600",children:h.jsx(pi,{className:"w-5 h-5"})}),h.jsxs("div",{className:"text-center space-y-4",children:[h.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Time's up!"}),h.jsx("p",{className:"text-gray-600",children:"Your free session has ended. Upgrade to our Pro plan for longer conversations with Amia."}),h.jsx("button",{onClick:()=>window.location.href="/pricing",className:`w-full py-3 px-4 bg-[#2C5C9D] text-white rounded-lg + font-semibold hover:bg-[#234B82] transition-colors`,children:"Upgrade to Pro"}),h.jsx("button",{onClick:e,className:"w-full py-2 text-gray-600 hover:text-gray-800",children:"Maybe later"})]})]})}):null}function Uj(){const{user:r}=Ot(),{toggleCall:e,callStatus:n,audioLevel:s,isSpeechActive:a,messages:o,pauseCall:c,resumeCall:d,showUpgradeModal:f,setShowUpgradeModal:v,showTimeUpModal:g,setShowTimeUpModal:w,upgradeReason:x}=L0(),[k,P]=I.useState(!1),N=a?s:0,j=o.length>0&&!a?.8:0,$=()=>{k?d==null||d():c==null||c(),P(!k)};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"relative flex flex-col items-center justify-center min-h-[400px] w-full",children:h.jsx(D0,{aiAmplitude:N,userAmplitude:j,username:r==null?void 0:r.firstName,callStatus:n,audioLevel:s,toggleCall:e,onPauseResume:$,isPaused:k})}),f&&h.jsx(Dj,{isOpen:f,onClose:()=>v(!1),reason:x}),g&&h.jsx(Fj,{isOpen:g,onClose:()=>w(!1)})]})}function Bj(){return h.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border border-[#5C9EFF] relative min-h-[320px] flex flex-col",children:[h.jsxs("div",{className:"flex-grow",children:[h.jsx("h2",{className:"text-xl font-bold text-[#333333] mb-2",children:"Session Highlights"}),h.jsx("p",{className:"text-sm text-[#555555] mb-4",children:"Amia turns your conversations into key takeaways to help you grow."}),h.jsxs("ul",{className:"space-y-3 mb-14",children:[h.jsxs("li",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"text-[#5C9EFF] font-bold",children:"•"}),h.jsxs("span",{children:[h.jsx("strong",{children:"Real-Time Emotional Analysis:"})," Understand how you're feeling, moment by moment."]})]}),h.jsxs("li",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"text-[#5C9EFF] font-bold",children:"•"}),h.jsxs("span",{children:[h.jsx("strong",{children:"Personalized Insights:"})," Highlights that capture what matters most from your chats."]})]}),h.jsxs("li",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"text-[#5C9EFF] font-bold",children:"•"}),h.jsxs("span",{children:[h.jsx("strong",{children:"Spot Patterns:"})," Discover trends and recurring themes in your emotional journey."]})]})]})]}),h.jsx("div",{className:"absolute bottom-0 left-0 right-0 px-6 pb-4 text-sm text-gray-500 italic bg-white border-t border-gray-100",children:h.jsx("div",{className:"pt-3",children:"Feature coming soon: Share these insights directly with your therapist."})})]})}const $j=[{id:1,title:"Write it Out",description:"Express your feelings in a private journal."},{id:2,title:"Take a Breather",description:"Reset with 5 minutes of guided deep breathing."},{id:3,title:"Reach Out",description:"Share your thoughts with someone you trust."}];function zj(){const[r,e]=I.useState(new Set),n=s=>{const a=new Set(r);r.has(s)?a.delete(s):a.add(s),e(a)};return h.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border border-[#5C9EFF] relative min-h-[320px] flex flex-col",children:[h.jsxs("div",{className:"flex-grow",children:[h.jsx("h2",{className:"text-xl font-bold text-[#333333] mb-2",children:"Action Steps"}),h.jsx("p",{className:"text-sm text-[#555555] mb-4",children:"Amia suggests actions from your chats to keep you moving forward."}),h.jsx("ul",{className:"space-y-3 mb-14",children:$j.map(s=>h.jsx("li",{children:h.jsxs("button",{onClick:()=>n(s.id),className:"flex items-start gap-2 w-full text-left group",children:[r.has(s.id)?h.jsx(Dk,{className:"w-5 h-5 text-[#5C9EFF] flex-shrink-0"}):h.jsx(Bk,{className:"w-5 h-5 text-[#5C9EFF] flex-shrink-0"}),h.jsxs("span",{className:r.has(s.id)?"line-through text-[#999999]":"text-[#555555]",children:[h.jsxs("strong",{children:[s.title,":"]})," ",s.description]})]})},s.id))})]}),h.jsx("div",{className:"absolute bottom-0 left-0 right-0 px-6 pb-4 text-sm text-gray-500 italic bg-white border-t border-gray-100",children:h.jsx("div",{className:"pt-3",children:"Feature coming soon: Action steps generated directly from your chats with Amia."})})]})}function Vj(){const[r,e]=I.useState(!1);return h.jsxs("div",{className:"p-6 text-center",children:[h.jsx("h3",{className:"text-lg font-semibold text-[#333333] mb-4",children:"Can't talk now? Start chatting instead"}),h.jsxs("button",{onClick:()=>e(!0),className:"flex items-center gap-2 bg-[#2C5C9D] text-white px-6 py-3 rounded-lg mx-auto hover:bg-[#234B82] transition-colors",children:[h.jsx(fi,{className:"w-5 h-5"}),"Start Chatting"]}),h.jsx(U0,{isVisible:r,onClose:()=>e(!1)})]})}function qj({isVisible:r,onClose:e}){if(!r)return null;const n=s=>{s.target===s.currentTarget&&e()};return h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",onClick:n,children:h.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-md w-full relative",children:[h.jsx("button",{onClick:e,className:"absolute -top-2 -right-2 bg-white p-2 rounded-full shadow-lg hover:shadow-xl transition-all text-gray-500 hover:text-gray-700","aria-label":"Close dialog",children:h.jsx(pi,{className:"w-5 h-5"})}),h.jsxs("div",{className:"text-center mb-8",children:[h.jsx("h2",{className:"text-2xl font-bold text-[#333333] mb-2",children:"Share with Your Therapist"}),h.jsx("p",{className:"text-[#5C9EFF] font-semibold mb-6",children:"Coming Soon"}),h.jsxs("div",{className:"space-y-4 text-left text-[#555555]",children:[h.jsxs("p",{children:[h.jsx("strong",{children:"Help Your Therapist Help You:"})," Share key insights and progress to make the most of your sessions."]}),h.jsxs("p",{children:[h.jsx("strong",{children:"You're in Control:"})," Share only what you're comfortable with, whenever you choose."]}),h.jsxs("p",{children:[h.jsx("strong",{children:"Amia's Here to Support, Not Replace:"})," Amia is here for when your therapist can't be — helping you stay on track between sessions."]}),h.jsx("p",{className:"text-center text-[#5C9EFF] mt-6",children:"Stay tuned — this feature is designed to empower you."})]})]}),h.jsx("button",{onClick:e,className:"w-full bg-gray-100 text-gray-600 px-4 py-2 rounded-lg hover:bg-gray-200 transition-colors font-medium",children:"Go Back"})]})})}function Gj(){Ot();const[r,e]=I.useState(!1);return h.jsxs("div",{className:"min-h-screen flex flex-col",children:[h.jsx(Cc,{}),h.jsxs("main",{className:"flex-grow max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[h.jsx(Uj,{}),h.jsxs("div",{className:"grid md:grid-cols-2 gap-8 mt-12",children:[h.jsxs("div",{className:"space-y-4",children:[h.jsx(Bj,{}),h.jsxs("button",{onClick:()=>e(!0),className:"w-full bg-[#F0F5FF] text-[#5C9EFF] px-4 py-2 rounded-lg hover:bg-[#E5EFFF] transition-colors flex items-center justify-center gap-2 font-medium",children:[h.jsx(Jk,{className:"w-4 h-4"}),"Share with Your Therapist"]}),h.jsx("p",{className:"text-xs text-[#555555] text-center",children:"Don't worry, you can decide what to share"})]}),h.jsx(zj,{})]}),h.jsx("div",{className:"max-w-2xl mx-auto mt-12",children:h.jsx(Vj,{})})]}),h.jsx(jc,{}),h.jsx(qj,{isVisible:r,onClose:()=>e(!1)})]})}function Yj({role:r,content:e,timestamp:n}){const s=r==="assistant",a=n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return h.jsx("div",{className:`flex ${s?"justify-start":"justify-end"}`,children:h.jsxs("div",{className:`flex gap-3 max-w-[80%] ${s?"flex-row":"flex-row-reverse"}`,children:[h.jsx("div",{className:` + flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center + ${s?"bg-[#5C9EFF]":"bg-[#E0E0E0]"} + `,children:s?h.jsx(nr,{className:"w-5 h-5 text-white"}):h.jsx("div",{className:"w-5 h-5 bg-white rounded-full"})}),h.jsxs("div",{children:[h.jsx("div",{className:` + rounded-lg px-4 py-2 + ${s?"bg-[#F0F5FF] text-[#333333]":"bg-[#2C5C9D] text-white"} + `,children:e}),h.jsx("div",{className:` + text-xs mt-1 text-[#999999] + ${s?"text-left":"text-right"} + `,children:a})]})]})})}function Hj(){const r=jS(),e=I.useCallback(async()=>{r.isConnected||await r.connect()},[r]),n=I.useCallback(async()=>{r.isConnected&&await r.disconnect()},[r]);return{...r,startChat:e,endChat:n}}function Wj(){var P,N;const r=un(),{isConnected:e,isLoading:n,error:s,conversation:a,startChat:o,endChat:c,sendMessage:d}=Hj(),[f,v]=I.useState(""),g=I.useRef(null),w=I.useRef(null);I.useEffect(()=>{let j=!0;return(async()=>{j&&!e&&await o()})(),()=>{j=!1,c()}},[o,c,e]),I.useEffect(()=>{g.current&&e&&g.current.focus()},[e,(P=a==null?void 0:a.messages)==null?void 0:P.length]),I.useEffect(()=>{var j;if(w.current&&((j=a==null?void 0:a.messages)!=null&&j.length)){const{scrollHeight:$,clientHeight:K}=w.current;w.current.scrollTop=$-K}},[a==null?void 0:a.messages]);const x=async j=>{if(j.preventDefault(),!f.trim()||n||!e)return;const $=f.trim();v("");try{await d($)}catch(K){console.error("Failed to send message:",K)}},k=()=>{r("/product")};return h.jsxs("div",{className:"fixed inset-0 bg-white z-50 flex flex-col",children:[h.jsxs("div",{className:"flex justify-between items-center p-4 border-b border-gray-100",children:[h.jsx("h2",{className:"text-xl font-semibold text-[#333333]",children:"Chat with Amia"}),h.jsx("button",{onClick:k,className:"text-[#555555] hover:text-[#2C5C9D] transition-colors p-2 hover:bg-gray-100 rounded-full","aria-label":"Close chat",children:h.jsx(pi,{className:"w-5 h-5"})})]}),h.jsx("div",{ref:w,className:"flex-1 overflow-y-auto px-4 py-6",style:{scrollBehavior:"smooth"},children:h.jsxs("div",{className:"max-w-4xl mx-auto space-y-4",children:[(N=a==null?void 0:a.messages)==null?void 0:N.map(j=>h.jsx(Yj,{role:j.role,content:j.content,timestamp:j.timestamp},j.id)),n&&h.jsx("div",{className:"flex justify-center",children:h.jsx("div",{className:"animate-pulse text-[#5C9EFF]",children:"Amia is typing..."})}),s&&h.jsx("div",{className:"text-center text-red-500 text-sm",children:s})]})}),h.jsx("div",{className:"border-t border-gray-100 bg-white",children:h.jsx("form",{onSubmit:x,className:"max-w-4xl mx-auto p-4",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx("input",{ref:g,type:"text",value:f,onChange:j=>v(j.target.value),placeholder:"Type your message...",className:"flex-grow px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#5C9EFF]",disabled:n||!e,autoFocus:!0}),h.jsx("button",{type:"submit",disabled:n||!f.trim()||!e,className:"bg-[#2C5C9D] text-white px-4 py-2 rounded-lg hover:bg-[#234B82] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:n?h.jsx(Oc,{}):h.jsx(Wk,{className:"w-5 h-5"})})]})})})]})}function Jj(){const{isAuthenticated:r}=Ot();return r?h.jsxs("div",{className:"min-h-screen bg-white flex flex-col",children:[h.jsx(Cc,{}),h.jsx("main",{className:"flex-1 container mx-auto px-4 py-8",children:h.jsx(Wj,{})}),h.jsx(jc,{})]}):h.jsx(jy,{to:"/login",replace:!0})}const Kj={email:r=>{if(!r)return"Email is required";if(!/\S+@\S+\.\S+/.test(r))return"Invalid email format"},password:r=>{if(!r)return"Password is required";if(r.length<6)return"Password must be at least 6 characters"}};function Qj(){const{login:r}=Ot(),{values:e,errors:n,isSubmitting:s,setIsSubmitting:a,handleChange:o,validate:c,setErrors:d}=wc({email:"",password:""},Kj),f=async v=>{v.preventDefault();const g=c();if(Object.keys(g).length>0){d(g);return}a(!0);try{await r(e.email,e.password)}catch(w){d({submit:w.message||"Failed to log in"})}finally{a(!1)}};return h.jsxs("div",{className:"w-full max-w-md mx-auto p-6 space-y-8",children:[h.jsxs("div",{className:"flex flex-col items-center text-center",children:[h.jsx("div",{className:"bg-blue-50 p-4 rounded-full mb-4",children:h.jsx(fi,{className:"w-8 h-8 text-blue-600"})}),h.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Welcome back"}),h.jsx("p",{className:"mt-2 text-gray-600",children:"Sign in to continue your journey with Amia"})]}),h.jsxs("form",{onSubmit:f,className:"space-y-6",children:[h.jsx(tr,{label:"Email",type:"email",name:"email",value:e.email,onChange:v=>o("email",v.target.value),error:n.email,required:!0,className:"w-full"}),h.jsx(tr,{label:"Password",type:"password",name:"password",value:e.password,onChange:v=>o("password",v.target.value),error:n.password,required:!0,className:"w-full"}),n.submit&&h.jsx("div",{className:"p-3 bg-red-50 border border-red-100 text-red-600 text-sm rounded-lg",children:n.submit}),h.jsx("button",{type:"submit",disabled:s,className:"w-full bg-blue-600 text-white py-3 px-4 rounded-lg font-medium hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:s?h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx(Oc,{className:"w-5 h-5 mr-2"}),h.jsx("span",{children:"Signing in..."})]}):"Sign In"})]}),h.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Don't have an account?"," ",h.jsx(cn,{to:"/register",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Create an account"})]})]})}function Xj(){return h.jsx("div",{className:"min-h-screen bg-[#F0F5FF] py-12 px-4 sm:px-6 lg:px-8",children:h.jsxs("div",{className:"max-w-7xl mx-auto relative",children:[h.jsxs(cn,{to:"/",className:"absolute left-0 top-0 flex items-center group",children:[h.jsx(fi,{className:"w-8 h-8 text-[#2C5C9D]"}),h.jsx("span",{className:"ml-2 text-xl font-bold text-[#333333] group-hover:text-[#2C5C9D] transition-colors",children:"Amia"})]}),h.jsxs("div",{className:"text-center mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold text-[#333333]",children:"Welcome Back"}),h.jsx("p",{className:"mt-2 text-lg text-[#555555]",children:"Continue your therapeutic journey with Amia"})]}),h.jsx(Qj,{})]})})}const Zj={firstName:r=>{if(!r)return"First name is required"},email:r=>{if(!r)return"Email is required";if(!/\S+@\S+\.\S+/.test(r))return"Invalid email format"},password:r=>{if(!r)return"Password is required";if(r.length<8)return"Password must be at least 8 characters";if(!/[a-z]/.test(r))return"Password must contain at least one lowercase letter";if(!/[A-Z]/.test(r))return"Password must contain at least one uppercase letter";if(!/\d/.test(r))return"Password must contain at least one number"}};function eT(){const{register:r}=Ot(),[e,n]=I.useState(!1),{values:s,errors:a,isSubmitting:o,setIsSubmitting:c,handleChange:d,validate:f,setErrors:v}=wc({firstName:"",email:"",password:""},Zj),g=async w=>{w.preventDefault();const x=f();if(Object.keys(x).length>0){v(x);return}c(!0);try{await r(s.email,s.password,s.firstName),n(!0)}catch(k){v({submit:k.message||"Failed to register"})}finally{c(!1)}};return e?h.jsx(F0,{}):h.jsxs("div",{className:"w-full max-w-md mx-auto p-6 space-y-8",children:[h.jsxs("div",{className:"flex flex-col items-center text-center",children:[h.jsx("div",{className:"bg-blue-50 p-4 rounded-full mb-4",children:h.jsx(fi,{className:"w-8 h-8 text-blue-600"})}),h.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:"Create your account"}),h.jsx("p",{className:"mt-2 text-gray-600",children:"Start your therapeutic journey with Amia"})]}),h.jsxs("form",{onSubmit:g,className:"space-y-6",children:[h.jsx(tr,{label:"First Name",type:"text",name:"firstName",value:s.firstName,onChange:w=>d("firstName",w.target.value),error:a.firstName,required:!0,className:"w-full"}),h.jsx(tr,{label:"Email",type:"email",name:"email",value:s.email,onChange:w=>d("email",w.target.value),error:a.email,required:!0,className:"w-full"}),h.jsx(tr,{label:"Password",type:"password",name:"password",value:s.password,onChange:w=>d("password",w.target.value),error:a.password,required:!0,className:"w-full"}),h.jsxs("div",{className:"text-sm text-gray-600",children:["By creating an account, you agree to our"," ",h.jsx(cn,{to:"/terms",className:"text-blue-600 hover:text-blue-700 underline",target:"_blank",rel:"noopener noreferrer",children:"Terms of Service"}),","," ",h.jsx(cn,{to:"/privacy",className:"text-blue-600 hover:text-blue-700 underline",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),", and acknowledge our"," ",h.jsx(cn,{to:"/disclaimer",className:"text-blue-600 hover:text-blue-700 underline",target:"_blank",rel:"noopener noreferrer",children:"AI Disclaimer"}),"."]}),a.submit&&h.jsx("div",{className:"p-3 bg-red-50 border border-red-100 text-red-600 text-sm rounded-lg",children:a.submit}),h.jsx("button",{type:"submit",disabled:o,className:"w-full bg-blue-600 text-white py-3 px-4 rounded-lg font-medium hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:o?h.jsxs("div",{className:"flex items-center justify-center",children:[h.jsx(Oc,{className:"w-5 h-5 mr-2"}),h.jsx("span",{children:"Creating account..."})]}):"Create Account"})]}),h.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Already have an account?"," ",h.jsx(cn,{to:"/login",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Sign in"})]})]})}function tT(){return h.jsx("div",{className:"min-h-screen bg-[#F0F5FF] py-12 px-4 sm:px-6 lg:px-8",children:h.jsxs("div",{className:"max-w-7xl mx-auto relative",children:[h.jsxs(cn,{to:"/",className:"absolute left-0 top-0 flex items-center group",children:[h.jsx(fi,{className:"w-8 h-8 text-[#2C5C9D]"}),h.jsx("span",{className:"ml-2 text-xl font-bold text-[#333333] group-hover:text-[#2C5C9D] transition-colors",children:"Amia"})]}),h.jsxs("div",{className:"text-center mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold text-[#333333]",children:"Join Amia"}),h.jsx("p",{className:"mt-2 text-lg text-[#555555]",children:"Create your account to start your therapeutic journey"})]}),h.jsx(eT,{})]})})}function Kh({title:r,lastUpdated:e,children:n}){return h.jsxs("div",{className:"min-h-screen bg-white",children:[h.jsx("header",{className:"bg-white border-b border-gray-100",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:h.jsxs(cn,{to:"/",className:"flex items-center",children:[h.jsx(nr,{className:"h-8 w-8 text-[#2C5C9D]"}),h.jsx("span",{className:"ml-2 text-xl font-bold text-[#333333]",children:"[Company Name]"})]})})}),h.jsxs("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("h1",{className:"text-3xl font-bold text-[#333333] mb-2",children:r}),h.jsxs("p",{className:"text-sm text-[#555555]",children:["Last Updated: ",e]})]}),h.jsx("div",{className:"prose prose-lg max-w-none",children:n})]})]})}function nT(){return h.jsx(Kh,{title:"[Company Name] Privacy Policy",lastUpdated:"December 15, 2024",children:h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"bg-red-50 border-l-4 border-red-500 p-4 mb-8",children:[h.jsx("h2",{className:"text-xl font-bold text-red-700 mb-4",children:"Emergency Situations and Crisis Disclaimer"}),h.jsx("p",{className:"font-bold mb-4",children:"PLEASE READ THIS SECTION CAREFULLY"}),h.jsx("p",{className:"mb-4",children:"IF YOU ARE EXPERIENCING THOUGHTS OF SUICIDE, SELF-HARM, OR HARMING OTHERS, OR IF YOU ARE EXPERIENCING A MENTAL HEALTH EMERGENCY:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"IMMEDIATELY STOP USING [COMPANY NAME]"}),h.jsx("li",{children:"DIAL 988 (US) FOR THE SUICIDE AND CRISIS LIFELINE"}),h.jsx("li",{children:"CALL YOUR LOCAL EMERGENCY SERVICES (911 IN US)"}),h.jsx("li",{children:"GO TO THE NEAREST EMERGENCY ROOM"}),h.jsx("li",{children:"CONTACT A QUALIFIED MENTAL HEALTH PROFESSIONAL"})]}),h.jsx("p",{className:"mt-4 font-bold",children:"[COMPANY NAME] IS NOT AN EMERGENCY SERVICE AND CANNOT HELP IN CRISIS SITUATIONS."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"1. Introduction"}),h.jsx("p",{children:'Welcome to [Company Name] ([website]), an AI-powered mental health application incorporated as [Company Name], a Delaware C Corporation. By accessing or using our app, you agree to these Terms of Service ("Terms"). If you disagree with any part of these Terms, please do not use our services.'})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"2. Age Restrictions and Eligibility"}),h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"2.1 Minimum Age Requirements"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"You must be at least 13 years old to use [Company Name]"}),h.jsxs("li",{children:["If you are between 13 and 18 years old, you must:",h.jsxs("ul",{className:"list-disc pl-6 mt-2",children:[h.jsx("li",{children:"Have your parent or legal guardian's permission to use [Company Name]"}),h.jsx("li",{children:"Have your parent or legal guardian review and accept these Terms on your behalf"}),h.jsx("li",{children:"Use [Company Name] under adult supervision"})]})]})]}),h.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:"2.2 User Responsibility"}),h.jsx("p",{children:"By using [Company Name], you represent and warrant that:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"You are at least 13 years old"}),h.jsx("li",{children:"If you are between 13 and 18 years old, you have obtained parental or legal guardian permission"}),h.jsx("li",{children:"You have provided truthful and accurate information about your age"}),h.jsx("li",{children:"You understand that [Company Name] reserves the right to terminate any account at any time if we believe you have misrepresented your age"})]}),h.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:"2.3 Parent/Guardian Responsibility"}),h.jsx("p",{children:"For users between 13 and 18 years old, the parent or legal guardian:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"Must review these Terms and our Privacy Policy"}),h.jsxs("li",{children:["Accepts responsibility for:",h.jsxs("ul",{className:"list-disc pl-6 mt-2",children:[h.jsx("li",{children:"The minor's compliance with these Terms"}),h.jsx("li",{children:"All activities that occur under the minor's account"}),h.jsx("li",{children:"Any payments or charges associated with the account"}),h.jsx("li",{children:"Ensuring appropriate professional mental health care is sought when needed"})]})]})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"3. User Accounts"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"You must provide a valid email address to create an account"}),h.jsx("li",{children:"You may be required to provide additional personal information"}),h.jsx("li",{children:"You are responsible for maintaining the confidentiality of your account credentials"}),h.jsx("li",{children:"You are responsible for all activities under your account"}),h.jsx("li",{children:"You must immediately notify us of any unauthorized use of your account"})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"4. Subscriptions and Payment"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"[Company Name] offers three free AI therapy sessions"}),h.jsx("li",{children:"Continued use requires a subscription"}),h.jsx("li",{children:"Payments are processed through Stripe, subject to Stripe's Terms of Service and Privacy Policy"}),h.jsx("li",{children:"We offer pro-rated refunds within the first 14 days of a new subscription"}),h.jsx("li",{children:"Subscription fees are billed in advance"}),h.jsx("li",{children:"You authorize us to charge your payment method for all fees"}),h.jsx("li",{children:"Prices may change with 30 days notice"})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"5. Mandatory Acknowledgments"}),h.jsx("p",{className:"mb-4",children:"By using [Company Name], you explicitly acknowledge and agree that:"}),h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"a) [Company Name] is NOT:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"A substitute for professional mental health treatment"}),h.jsx("li",{children:"A crisis intervention service"}),h.jsx("li",{children:"A suicide prevention service"}),h.jsx("li",{children:"Capable of preventing or treating mental health emergencies"}),h.jsx("li",{children:"Staffed by human mental health professionals"}),h.jsx("li",{children:"A medical device or medical service of any kind"}),h.jsx("li",{children:"Capable of diagnosing or treating any medical or mental health condition"})]}),h.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:"b) You understand that:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"[Company Name] uses artificial intelligence technology that has inherent limitations"}),h.jsx("li",{children:"The AI may provide incorrect, inappropriate, or harmful responses"}),h.jsx("li",{children:"You use [Company Name] entirely at your own risk"}),h.jsx("li",{children:"No specific outcomes or benefits are guaranteed"}),h.jsx("li",{children:"You are solely responsible for all decisions and actions taken based on interactions with [Company Name]"}),h.jsx("li",{children:"[Company Name] cannot and does not monitor for user safety or well-being"}),h.jsx("li",{children:"No human reviews or monitors your conversations in real-time"})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"6. Liability Waiver and Release"}),h.jsx("p",{className:"mb-4",children:"To the maximum extent permitted by law, you:"}),h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"a) EXPRESSLY WAIVE AND RELEASE [Company Name], its owners, employees, contractors, partners, and affiliates from any and all liability, claims, causes of action, damages, costs, or expenses arising from:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"Your use of the service"}),h.jsx("li",{children:"Any decisions or actions you take based on interactions with the AI"}),h.jsx("li",{children:"Any harm, injury, or damages (including death) related to using or following advice from [Company Name]"}),h.jsx("li",{children:"Failure to seek appropriate professional medical or mental health care"}),h.jsx("li",{children:"Any emergency situations or crises where [Company Name] was used instead of appropriate emergency services"})]}),h.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:"b) AGREE TO INDEMNIFY AND HOLD HARMLESS [Company Name] and its affiliates against any claims, damages, or expenses (including legal fees) arising from:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"Your violation of these terms"}),h.jsx("li",{children:"Your use of the service"}),h.jsx("li",{children:"Any harm to yourself or others related to your use of [Company Name]"})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"7. Privacy and Data Protection"}),h.jsx("p",{children:"Please refer to our Privacy Policy for detailed information about data collection, storage, and protection."})]}),h.jsxs("section",{className:"mt-8",children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"8. Contact Information"}),h.jsx("p",{children:"[Company Name]"}),h.jsx("p",{children:"[Address Line 1]"}),h.jsx("p",{children:"[Address Line 2]"}),h.jsx("p",{children:"Legal Representative: [Name]"}),h.jsx("p",{children:"Email: [Email]"}),h.jsx("p",{children:"Website: [Website]"})]}),h.jsx("div",{className:"mt-8",children:h.jsx("p",{children:"By using [Company Name], you confirm that you have read, understood, and agree to these terms of service."})})]})})}function rT(){return h.jsx(Kh,{title:"[Company Name] AI Disclaimer",lastUpdated:"December 15, 2024",children:h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"bg-red-50 border-l-4 border-red-500 p-4 mb-8",children:[h.jsx("h2",{className:"text-xl font-bold text-red-700 mb-4",children:"Emergency Situations and Crisis Disclaimer"}),h.jsx("p",{className:"font-bold mb-4",children:"PLEASE READ THIS SECTION CAREFULLY"}),h.jsx("p",{className:"mb-4",children:"IF YOU ARE EXPERIENCING THOUGHTS OF SUICIDE, SELF-HARM, OR HARMING OTHERS, OR IF YOU ARE EXPERIENCING A MENTAL HEALTH EMERGENCY:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"IMMEDIATELY STOP USING [COMPANY NAME]"}),h.jsx("li",{children:"DIAL 988 (US) FOR THE SUICIDE AND CRISIS LIFELINE"}),h.jsx("li",{children:"CALL YOUR LOCAL EMERGENCY SERVICES (911 IN US)"}),h.jsx("li",{children:"GO TO THE NEAREST EMERGENCY ROOM"}),h.jsx("li",{children:"CONTACT A QUALIFIED MENTAL HEALTH PROFESSIONAL"})]}),h.jsx("p",{className:"mt-4 font-bold",children:"[COMPANY NAME] IS NOT AN EMERGENCY SERVICE AND CANNOT HELP IN CRISIS SITUATIONS."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"1. Nature of Service"}),h.jsx("p",{children:"[Company Name] provides conversational therapy through artificial intelligence (AI) technology. Our AI therapist is a computer program designed to engage in supportive conversations and provide general mental health information."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"2. Not a Substitute for Professional Care"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"[Company Name]'s AI therapy is not a substitute for professional mental health care, medical advice, diagnosis, or treatment."}),h.jsx("li",{children:"Our AI therapist is not a licensed mental health professional and cannot provide clinical diagnoses or treatment plans."}),h.jsx("li",{children:"We strongly encourage users to seek help from qualified mental health professionals for specific mental health concerns."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"3. Limitations of AI"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"While our AI is designed to be supportive, it has limitations in understanding complex human emotions, contexts, and situations."}),h.jsx("li",{children:"The AI may not always provide appropriate or accurate responses to all situations."}),h.jsx("li",{children:"The effectiveness of AI therapy may vary from person to person."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"4. Emergency Situations"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"[Company Name] is not equipped to handle emergency situations or mental health crises."}),h.jsx("li",{children:"If you are experiencing a mental health emergency, please contact your local emergency services immediately or use a crisis helpline."}),h.jsx("li",{children:"For U.S. users, you can contact the National Suicide Prevention Lifeline at 1-800-273-8255 or text HOME to 741741 to reach a crisis counselor."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"5. Privacy and Data Usage"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"Your conversations with the AI are encrypted and stored securely."}),h.jsx("li",{children:"We may use anonymized conversation data to improve our AI system and services."}),h.jsx("li",{children:"Please refer to our Privacy Policy for more detailed information on data handling and protection."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"6. User Responsibility"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"You are responsible for your own mental health decisions and actions taken based on interactions with our AI."}),h.jsx("li",{children:"We encourage you to critically evaluate the AI's responses and use your judgment when considering its advice."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"7. Potential Risks"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"There is a risk of misunderstanding or misinterpreting the AI's responses."}),h.jsx("li",{children:"Overreliance on AI therapy may delay seeking necessary professional help."}),h.jsx("li",{children:"The AI may not be able to identify or respond appropriately to signs of serious mental health conditions."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"8. Continuous Development"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"Our AI system is continually evolving and improving."}),h.jsx("li",{children:"The capabilities and limitations of the AI may change over time, and we will update this disclaimer accordingly."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"9. Feedback and Reporting"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"We encourage users to provide feedback on their experience with the AI."}),h.jsx("li",{children:"If you encounter any concerning or inappropriate responses from the AI, please report them to our support team immediately."})]}),h.jsx("p",{className:"mt-4",children:"By using [Company Name], you acknowledge that you have read, understood, and agree to this AI disclaimer. If you do not agree with any part of this disclaimer, please do not use our services."})]}),h.jsxs("section",{className:"mt-8",children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"Contact Information"}),h.jsx("p",{children:"For any questions or concerns about this AI disclaimer, please contact us at:"}),h.jsx("p",{children:"[Company Name]"}),h.jsx("p",{children:"[Address Line 1]"}),h.jsx("p",{children:"[Address Line 2]"}),h.jsx("p",{children:"Legal Representative: [Name]"}),h.jsx("p",{children:"Email: [Email]"}),h.jsx("p",{children:"Website: [Website]"})]})]})})}function iT(){return h.jsx(Kh,{title:"[Company Name] Terms of Service",lastUpdated:"December 15, 2024",children:h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"bg-red-50 border-l-4 border-red-500 p-4 mb-8",children:[h.jsx("h2",{className:"text-xl font-bold text-red-700 mb-4",children:"Emergency Situations and Crisis Disclaimer"}),h.jsx("p",{className:"font-bold mb-4",children:"PLEASE READ THIS SECTION CAREFULLY"}),h.jsx("p",{className:"mb-4",children:"IF YOU ARE EXPERIENCING THOUGHTS OF SUICIDE, SELF-HARM, OR HARMING OTHERS, OR IF YOU ARE EXPERIENCING A MENTAL HEALTH EMERGENCY:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"IMMEDIATELY STOP USING [COMPANY NAME]"}),h.jsx("li",{children:"DIAL 988 (US) FOR THE SUICIDE AND CRISIS LIFELINE"}),h.jsx("li",{children:"CALL YOUR LOCAL EMERGENCY SERVICES (911 IN US)"}),h.jsx("li",{children:"GO TO THE NEAREST EMERGENCY ROOM"}),h.jsx("li",{children:"CONTACT A QUALIFIED MENTAL HEALTH PROFESSIONAL"})]}),h.jsx("p",{className:"mt-4 font-bold",children:"[COMPANY NAME] IS NOT AN EMERGENCY SERVICE AND CANNOT HELP IN CRISIS SITUATIONS."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"1. Introduction"}),h.jsx("p",{children:'Welcome to [Company Name] ([website]), an AI-powered mental health application, incorporated as [Company Name], a Delaware C Corporation. By accessing or using our app, you agree to these Terms of Service ("Terms"). If you disagree with any part of these Terms, please do not use our services.'})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"2. Eligibility and Age Restrictions"}),h.jsx("p",{children:"You must be at least 18 years old to use [Company Name]. If you are between 13 and 18 years old, you may only use [Company Name] with the consent and supervision of a parent or legal guardian. We do not knowingly collect or solicit personal information from individuals under 13."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"3. User Accounts"}),h.jsx("p",{children:"To create an account, you must provide a valid email address and may be required to provide additional personal information. You are responsible for maintaining the confidentiality of your account credentials and for all activities under your account."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"4. Subscriptions and Payment"}),h.jsx("p",{children:"[Company Name] offers three free AI therapy sessions. Continued use requires a subscription. Payments are processed through Stripe, subject to Stripe's Terms of Service and Privacy Policy. Our refund policy allows for pro-rated refunds within the first 14 days of a new subscription."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"5. AI Therapy and Liability Disclaimer"}),h.jsx("p",{children:"[Company Name] provides general mental health advice through AI technology. However:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"[Company Name] is not a licensed therapist or mental health provider."}),h.jsx("li",{children:"The AI is not a substitute for professional medical advice, diagnosis, or treatment."}),h.jsx("li",{children:"[Company Name] does not guarantee the accuracy, completeness, or appropriateness of the AI's advice."}),h.jsx("li",{children:"You acknowledge that [Company Name] is not responsible for any consequences, harm, or losses resulting from using the AI's advice."}),h.jsx("li",{children:"[Company Name] is not suitable for emergency situations or crisis intervention."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"6. Privacy and Data Protection"}),h.jsx("p",{children:"We prioritize the protection of your sensitive information:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"All conversations are encrypted end-to-end."}),h.jsx("li",{children:"We do not share your personal data or conversation logs with third parties, except as required by law."}),h.jsx("li",{children:"Data is stored securely and in compliance with applicable data protection regulations."})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"7. Communication"}),h.jsx("p",{children:"By signing up, you consent to receive emails from [Company Name] regarding service updates, feedback requests, and promotional content. You may opt out of promotional emails by following the instructions in the email."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"8. Data Deletion"}),h.jsx("p",{children:"You may request the deletion of your account and associated data at any time by contacting our support team. We will comply with your request within 30 days, subject to legal retention requirements."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"9. Intellectual Property"}),h.jsx("p",{children:"[Company Name] retains all rights to the app's content, features, and functionality. Users retain ownership of any original content they input during interactions, granting [Company Name] a non-exclusive license to use this content for service improvement."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"10. Prohibited Uses"}),h.jsx("p",{children:"You agree not to:"}),h.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[h.jsx("li",{children:"Use the app for any illegal purpose"}),h.jsx("li",{children:"Attempt to gain unauthorized access to any part of the app"}),h.jsx("li",{children:"Use the app to harass, abuse, or harm others"}),h.jsx("li",{children:"Impersonate any person or entity"}),h.jsx("li",{children:"Interfere with or disrupt the app's functionality"})]})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"11. Termination"}),h.jsx("p",{children:"[Company Name] reserves the right to suspend or terminate your account for violations of these Terms or for any other reason at our discretion."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"12. Modifications to Terms"}),h.jsx("p",{children:"We may modify these Terms at any time. Continued use of the app after changes constitutes acceptance of the new terms. We will notify users of significant changes via email."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"13. Accessibility"}),h.jsx("p",{children:"[Company Name] strives to make its services accessible to all users. If you have specific accessibility needs, please contact our support team."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"14. Third-party Links"}),h.jsx("p",{children:"[Company Name] may provide links to external resources. We are not responsible for the content or practices of these third-party sites."})]}),h.jsxs("section",{children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"15. Limitations of AI"}),h.jsx("p",{children:"While our AI strives to provide helpful advice, it has limitations in understanding complex human emotions and situations. It should not be considered a replacement for human judgment or professional mental health care."})]}),h.jsxs("section",{className:"mt-8",children:[h.jsx("h2",{className:"text-xl font-bold mb-4",children:"16. Contact Information"}),h.jsx("p",{children:"If you have any questions about these Terms, please contact us at:"}),h.jsx("p",{children:"[Company Name]"}),h.jsx("p",{children:"[Address Line 1]"}),h.jsx("p",{children:"[Address Line 2]"}),h.jsx("p",{children:"Legal Representative: [Name]"}),h.jsx("p",{children:"Email: [Email]"})]}),h.jsx("div",{className:"mt-8",children:h.jsx("p",{children:"By using [Company Name], you acknowledge that you have read, understood, and agree to be bound by these Terms of Service."})})]})})}const sT="_container_1cdj9_1",aT="_circle_1cdj9_12",oT="_breathe_1cdj9_1",lT="_message_1cdj9_21",cT="_messageVisible_1cdj9_28",uT="_messageHidden_1cdj9_32",dT="_title_1cdj9_36",hT="_button_1cdj9_42",no={container:sT,circle:aT,breathe:oT,message:lT,messageVisible:cT,messageHidden:uT,title:dT,button:hT},fT=["Breathe in...","Hold...","Breathe out..."],pT=12e3,ry=4e3,mT=3e3;function iy(){const r=un(),[e,n]=I.useState(0),s=I.useRef(null);I.useEffect(()=>{const o=()=>{const d=Date.now();s.current||(s.current=d);const f=(d-s.current)%pT;f<ry?n(0):f<ry+mT?n(1):n(2)},c=setInterval(o,50);return o(),()=>{clearInterval(c)}},[]);const a=()=>{r("/")};return h.jsxs("div",{className:no.container,children:[h.jsx("h1",{className:no.title,children:"Oops! Something went wrong"}),h.jsx("div",{className:no.message,children:fT[e]}),h.jsx("div",{className:no.circle}),h.jsx("button",{className:no.button,onClick:a,children:"Return Home"})]})}function B0({children:r}){const{isAuthenticated:e,loading:n}=Ot();return n?h.jsx("div",{children:"Loading..."}):e?h.jsx(h.Fragment,{children:r}):h.jsx(jy,{to:"/login",replace:!0})}function gT(){const r=un(),{isAuthenticated:e}=Ot();return h.jsxs("div",{className:"text-center mb-16",children:[h.jsx("h1",{className:"text-4xl sm:text-5xl font-bold text-[#333333] mb-4",children:"Find Your Calm, Your Way"}),h.jsx("p",{className:"text-lg text-[#555555] mb-8",children:"Unlimited support. Cancel anytime."}),h.jsx("button",{onClick:()=>r(e?"/product":"/"),className:"inline-flex items-center px-6 py-2 rounded-lg text-[#2C5C9D] border border-[#2C5C9D] hover:bg-[#2C5C9D] hover:text-white transition-colors",children:"Try a demo session"})]})}function sy({title:r,description:e,price:n,features:s,buttonText:a,isPremium:o}){const c=un(),{user:d}=Ot(),f=(d==null?void 0:d.subscription)!=="premium";return h.jsxs("div",{className:` + rounded-2xl p-8 h-full flex flex-col + ${o?"bg-[#EEF4FB] border-2 border-[#2C5C9D]":"bg-white border border-gray-200"} + `,children:[h.jsx("h3",{className:"text-2xl font-bold text-[#333333] mb-2",children:r}),h.jsx("p",{className:"text-[#555555] mb-6",children:e}),h.jsxs("div",{className:"mb-8",children:[h.jsx("span",{className:"text-4xl font-bold text-[#333333]",children:n}),h.jsx("span",{className:"text-[#555555]",children:"/month"})]}),h.jsx("div",{className:"flex-grow",children:h.jsx("ul",{className:"space-y-4 mb-8",children:s.map((v,g)=>h.jsxs("li",{className:"flex items-center gap-3",children:[h.jsx(Fk,{className:"w-5 h-5 text-[#2C5C9D]"}),h.jsx("span",{className:"text-[#555555]",children:v.text})]},g))})}),f&&h.jsx("button",{onClick:()=>c("/checkout"),className:` + w-full py-3 rounded-lg font-semibold transition-colors + ${o?"bg-[#2C5C9D] hover:bg-[#234B82] text-white":"border-2 border-[#2C5C9D] text-[#2C5C9D] hover:bg-[#2C5C9D] hover:text-white"} + `,children:a})]})}function vT(){const r=[{text:"10 sessions/month"},{text:"20 min/session"},{text:"Session Highlights"},{text:"Action Steps based on your sessions"},{text:"Access to your therapy history"},{text:"Early access to new features"}],e=[{text:"Everything in Pro, and:"},{text:"Unlimited sessions"},{text:"No time limit"},{text:"Get personality test"},{text:"Get support from real specialists"}];return h.jsxs("div",{className:"grid md:grid-cols-2 gap-8 mb-16",children:[h.jsx(sy,{title:"Amia Pro",description:"Perfect for small worries or starting fresh.",price:"$20",features:r,buttonText:"Get Pro"}),h.jsx(sy,{title:"Amia Premium",description:"More time, deeper insights, and faster growth.",price:"$50",features:e,buttonText:"Get Premium",isPremium:!0})]})}const Vd=[{id:1,quote:"therapy was $100 a session. now for $20, i can talk as much as i need. best decision ever.",name:"Nico",age:22},{id:2,quote:"she's always there, even when my thoughts hit me at 2 a.m. it feels like having a safety net.",name:"Jake",age:21},{id:3,quote:"for $50, i don't have to worry about time limits. i can finally talk without rushing.",name:"Valeria",age:19},{id:4,quote:"i'm 15, and sometimes i don't want to talk to my parents. this feels like my safe space.",name:"Emily",age:15},{id:5,quote:"with premium, there's no 'time's up.' i talk until i feel better, and it's worth every dollar.",name:"Sebastian",age:28},{id:6,quote:"therapy made me nervous. this? no judgment, no pressure, just me getting things off my chest.",name:"Sophia",age:17},{id:7,quote:"i couldn't afford $120 therapy sessions. now for $20, i can talk whenever i want.",name:"Lucas",age:25},{id:8,quote:"premium feels like having endless time to figure things out. no rush, just progress.",name:"Mateo",age:26},{id:9,quote:"i love walking while talking to her. it's my go-to when life feels overwhelming.",name:"Isabella",age:23},{id:10,quote:"after my breakup, my therapist couldn't see me for two weeks. amia was there immediately.",name:"Tom",age:24},{id:11,quote:"sometimes i just need to say things out loud to feel better. $20 for pro makes that so easy.",name:"Carla",age:20},{id:12,quote:"i'm 32, and i've never had an easier way to talk about my stress. premium changed the game for me.",name:"Daniel",age:32},{id:13,quote:"it's like having therapy in my pocket—whenever, wherever, for a fraction of the cost.",name:"Mia",age:19},{id:14,quote:"i used to bottle everything up. for $50, premium gave me a place to let it all out.",name:"Elena",age:18},{id:15,quote:"no awkward silences, no feeling judged. just someone who listens and gets it.",name:"Santiago",age:23},{id:16,quote:"for $20 a month, i get to talk as much as i want. way cheaper than my $80 therapy sessions.",name:"Sarah",age:27},{id:17,quote:"as a 16-year-old, it's hard to explain things to adults. this is finally a place i feel heard.",name:"Lucía",age:16},{id:18,quote:"premium lets me process things on my time. no pressure, just healing.",name:"Facundo",age:21},{id:19,quote:"my therapist charges $90 for one hour. for $20, i get unlimited support anytime i need it.",name:"Matt",age:25},{id:20,quote:"when my anxiety spikes, she's always there to calm me down. it's like hitting pause on the chaos.",name:"Chloe",age:22},{id:21,quote:"i'm a busy dad, and $50 for premium means i can finally take care of my mind without appointments.",name:"David",age:30},{id:22,quote:"it's so nice to talk without feeling rushed or judged. i take my time, and it's worth it.",name:"Carolina",age:24},{id:23,quote:"at 15, i didn't know how to deal with my feelings. now i can just talk and feel okay.",name:"Sofia",age:15},{id:24,quote:"premium feels like freedom. no time limits, no waiting—just me and someone who listens.",name:"Olivia",age:28},{id:25,quote:"my therapist made me wait weeks between sessions. for $20, i finally have support every day.",name:"Marco",age:19},{id:26,quote:"i vent, she listens, and somehow everything feels less scary. i needed this.",name:"Grace",age:17},{id:27,quote:"it's been a lifesaver during stressful times. premium is the best $50 i spend every month.",name:"Leo",age:29},{id:28,quote:"she makes it easy to untangle my messy thoughts without judgment. for $20? no-brainer.",name:"Hannah",age:21},{id:29,quote:"therapy used to stress me out more because of the cost. now i just open the app and talk.",name:"Elisa",age:27},{id:30,quote:"when life feels too heavy, this helps me breathe again. i'm so glad it's affordable.",name:"Miguel",age:22},{id:31,quote:"as a college student, $20 for unlimited talks is the best thing i could ask for.",name:"Clara",age:18},{id:32,quote:"she's like a reset button when my thoughts get overwhelming. premium makes a huge difference.",name:"Tomás",age:23},{id:33,quote:"i'm 30 and still figuring things out. with premium, i finally feel like i'm making progress.",name:"Jake",age:30},{id:34,quote:"no one else listens to me this way, and $50 is so worth feeling understood.",name:"Nina",age:24},{id:35,quote:"at 17, i feel like no one gets me—but this? it's been my safe space to figure myself out.",name:"Valentina",age:17}];function yT(){const[r,e]=I.useState(0),[n,s]=I.useState(!1);I.useEffect(()=>{const o=setInterval(()=>{e(c=>{const d=c+(n?.25:4),f=Vd.length*300;return d>=f?0:d})},16);return()=>clearInterval(o)},[n]);const a=o=>h.jsxs("div",{className:"flex-shrink-0 bg-white p-4 rounded-xl border-2 border-[#2C5C9D] shadow-lg hover:shadow-xl transition-shadow duration-300 h-[160px] flex flex-col w-[300px]",children:[h.jsx("div",{className:"mb-1",children:h.jsxs("p",{className:"text-[#2C5C9D] font-bold text-center text-lg",children:[o.name,", ",o.age]})}),h.jsx("div",{className:"flex-grow flex items-center justify-center -mt-1",children:h.jsxs("p",{className:"text-gray-700 text-center leading-tight text-base",children:['"',o.quote,'"']})})]},o.id);return h.jsx("div",{className:"w-full bg-white py-8",children:h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsx("h2",{className:"text-3xl font-bold text-center text-[#333333] mb-8",children:"What Our Members Say"}),h.jsx("div",{className:"overflow-hidden",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:h.jsx("div",{className:"relative overflow-hidden",children:h.jsxs("div",{className:"flex gap-3",style:{transform:`translateX(-${r}px)`,width:"fit-content",transition:r===0?"none":"transform 150ms"},children:[Vd.map((o,c)=>h.jsx("div",{className:"transition-opacity duration-150",children:a(o)},`${o.id}-${c}-first`)),Vd.map((o,c)=>h.jsx("div",{className:"transition-opacity duration-150",children:a(o)},`${o.id}-${c}-second`))]})})})]})})}function _T(){return h.jsxs("div",{className:"min-h-screen flex flex-col",children:[h.jsx(Cc,{}),h.jsxs("main",{className:"flex-grow max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[h.jsx(gT,{}),h.jsx(vT,{}),h.jsx(yT,{})]}),h.jsx(jc,{})]})}function wT({isOpen:r,onClose:e,onConfirm:n,email:s}){const[a,o]=I.useState(""),[c,d]=I.useState(""),[f,v]=I.useState(!1);if(!r)return null;const g=async w=>{w.preventDefault(),d(""),v(!0);try{const{error:x}=await Qt.auth.signInWithPassword({email:s,password:a});if(x){d("Incorrect password. Please try again.");return}await n(),e()}catch{d("An error occurred. Please try again.")}finally{v(!1)}};return h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:h.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[h.jsxs("div",{className:"text-center mb-6",children:[h.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Reset Chat History - Be Careful!"}),h.jsx("p",{className:"text-gray-600",children:"If you confirm, your chat history will be reset and Calmi won't remember anything you've chatted about."})]}),h.jsxs("form",{onSubmit:g,className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),h.jsx("input",{type:"password",id:"password",value:a,onChange:w=>o(w.target.value),placeholder:"Enter your password",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),c&&h.jsx("div",{className:"text-red-600 text-sm",children:c}),h.jsxs("div",{className:"flex space-x-3",children:[h.jsx("button",{type:"submit",disabled:f,className:`flex-1 px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors ${f?"opacity-50 cursor-not-allowed":""}`,children:f?"Verifying...":"Reset Chat History"}),h.jsx("button",{type:"button",onClick:e,disabled:f,className:"flex-1 px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors",children:"Cancel"})]})]})]})})}const bT="https://ipglysqeeyiejlxhawmk.supabase.co",xT="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlwZ2x5c3FlZXlpZWpseGhhd21rIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTczNDYyNDk0OSwiZXhwIjoyMDUwMjAwOTQ5fQ.A8U5SAXSwRA9ykLRwWdPTnyQd1g--qeObKVCYqwvI_0",ST=Jy(bT,xT,{auth:{autoRefreshToken:!1,persistSession:!1}});function ET(){return{deleteAccount:async e=>{try{await Qt.from("messages").delete().eq("user_id",e),await Qt.from("conversations").delete().eq("user_id",e),await Qt.from("sessions").delete().eq("user_id",e),await Qt.from("subscriptions").delete().eq("user_id",e),await Qt.from("profiles").delete().eq("id",e);const{error:n}=await ST.auth.admin.deleteUser(e);if(n)throw new Error(`Failed to delete user authentication: ${n.message}`);return{success:!0}}catch(n){throw console.error("Error deleting account:",n),n}}}}function kT({isOpen:r,onClose:e,email:n}){const[s,a]=I.useState(""),[o,c]=I.useState(""),[d,f]=I.useState(!1),{user:v,logout:g}=Ot(),{deleteAccount:w}=ET();if(!r)return null;const x=async k=>{k.preventDefault(),c(""),f(!0);try{const{error:P}=await Qt.auth.signInWithPassword({email:n,password:s});if(P){c("Incorrect password. Please try again.");return}v&&(await w(v.id),await g()),e()}catch{c("An error occurred. Please try again.")}finally{f(!1)}};return h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:h.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[h.jsxs("div",{className:"text-center mb-6",children:[h.jsx("h3",{className:"text-xl font-semibold text-red-600 mb-2",children:"Delete Account - Final Warning!"}),h.jsx("p",{className:"text-gray-600",children:"This action will permanently delete your account and all associated data. There's no going back once you confirm."})]}),h.jsxs("form",{onSubmit:x,className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),h.jsx("input",{type:"password",id:"password",value:s,onChange:k=>a(k.target.value),placeholder:"Enter your password",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-red-500",required:!0})]}),o&&h.jsx("div",{className:"text-red-600 text-sm",children:o}),h.jsxs("div",{className:"flex space-x-3",children:[h.jsx("button",{type:"submit",disabled:d,className:`flex-1 px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors ${d?"opacity-50 cursor-not-allowed":""}`,children:d?"Verifying...":"Delete My Account"}),h.jsx("button",{type:"button",onClick:e,disabled:d,className:"flex-1 px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors",children:"Cancel"})]})]})]})})}function CT(){const r=un(),{user:e,signOut:n}=Ot(),[s,a]=I.useState(!1),[o,c]=I.useState(!1),[d,f]=I.useState(""),v=async()=>{try{const{error:g}=await Qt.from("messages").delete().eq("user_id",e==null?void 0:e.id);if(g)throw g;alert("Chat history has been reset successfully!")}catch(g){console.error("Error resetting chat history:",g),f("Failed to reset chat history. Please try again.")}};return h.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-8",children:[d&&h.jsx("div",{className:"mb-4 p-4 bg-red-50 text-red-600 rounded-lg",children:d}),h.jsxs("div",{className:"mb-12",children:[h.jsx("h2",{className:"text-lg font-medium text-gray-800 mb-4",children:"Account Settings"}),h.jsxs("div",{className:"space-y-2",children:[h.jsx("button",{onClick:()=>r("/account/profile"),className:"w-full text-left px-4 py-3 rounded-lg hover:bg-gray-50",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-medium text-gray-800",children:"Profile"}),h.jsx("p",{className:"text-sm text-gray-600",children:"Update your personal information"})]}),h.jsx(Td,{})]})}),h.jsx("button",{onClick:()=>r("/account/subscription"),className:"w-full text-left px-4 py-3 rounded-lg hover:bg-gray-50",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-medium text-gray-800",children:"Subscription"}),h.jsx("p",{className:"text-sm text-gray-600",children:"Manage your subscription plan"})]}),h.jsx(Td,{})]})}),h.jsx("button",{onClick:()=>r("/account/privacy"),className:"w-full text-left px-4 py-3 rounded-lg hover:bg-gray-50",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-medium text-gray-800",children:"Privacy"}),h.jsx("p",{className:"text-sm text-gray-600",children:"Control your privacy settings"})]}),h.jsx(Td,{})]})}),h.jsx("button",{onClick:()=>r("/pricing"),className:"px-6 py-2 border-2 border-[#2C5C9D] text-[#2C5C9D] hover:bg-[#2C5C9D] hover:text-white rounded-lg transition-all",children:"Get Pro"})]})]}),h.jsxs("div",{className:"border border-gray-200 rounded-lg p-6",children:[h.jsx("h3",{className:"text-lg font-medium text-gray-800 mb-2",children:"Danger Zone"}),h.jsx("p",{className:"text-gray-600 mb-6",children:`Proceed with caution… you're entering the "Oops, I did it" zone!`}),h.jsxs("div",{className:"mb-8",children:[h.jsx("h4",{className:"font-medium text-gray-800 mb-2",children:"Reset Chat History"}),h.jsxs("div",{className:"mb-3",children:[h.jsx("p",{className:"text-gray-600 text-sm font-medium mb-1",children:"Wipe the Slate Clean"}),h.jsx("p",{className:"text-gray-600 text-sm",children:"Feeling like a fresh start? Hit the reset button and all your past chats are gone. Warning: Amia has the memory of a goldfish after this."})]}),h.jsx("button",{onClick:()=>a(!0),className:"px-4 py-2 bg-gray-100 text-gray-700 rounded hover:bg-gray-200 transition-colors",children:"Reset Chat History"})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"font-medium text-gray-800 mb-2",children:"Delete Account"}),h.jsxs("div",{className:"mb-3",children:[h.jsx("p",{className:"text-gray-600 text-sm font-medium mb-1",children:"The Ultimate Breakup"}),h.jsx("p",{className:"text-gray-600 text-sm",children:`This isn't just "see you later" — it's goodbye forever. Your account, your chats, your history — gone. We won't hold a grudge, but Amia might cry a little.`})]}),h.jsx("button",{onClick:()=>c(!0),className:"px-4 py-2 border-2 border-red-600 text-red-600 hover:bg-red-600 hover:text-white rounded-lg transition-all",children:"Delete Account"})]})]}),h.jsx(wT,{isOpen:s,onClose:()=>a(!1),onConfirm:v,email:(e==null?void 0:e.email)||""}),h.jsx(kT,{isOpen:o,onClose:()=>c(!1),email:(e==null?void 0:e.email)||""})]})}function jT(){return h.jsx(B0,{children:h.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:h.jsx(CT,{})})})}const TT=Zx([{element:h.jsx(Xk,{}),errorElement:h.jsx(iy,{}),children:[{path:"/",element:h.jsx(Lj,{})},{path:"/product",element:h.jsx(B0,{children:h.jsx(Gj,{})})},{path:"/chat",element:h.jsx(Jj,{})},{path:"/login",element:h.jsx(Xj,{})},{path:"/register",element:h.jsx(tT,{})},{path:"/pricing",element:h.jsx(_T,{})},{path:"/account",element:h.jsx(jT,{})},{path:"/privacy",element:h.jsx(nT,{})},{path:"/terms",element:h.jsx(iT,{})},{path:"/disclaimer",element:h.jsx(rT,{})},{path:"*",element:h.jsx(iy,{})}]}]);Lb.createRoot(document.getElementById("root")).render(h.jsx(I.StrictMode,{children:h.jsx(CS,{children:h.jsx(FS,{children:h.jsx(lS,{router:TT})})})}));export{bc as g};
commit 61bf5d1ab38717a8613ec8850a9bcbff04229148
Author: root <root@hub.scroll.pub> Date: 2024-12-23 22:16:26 +0000 Subject: Added index-DEo-Ibsq.css diff --git a/index-DEo-Ibsq.css b/index-DEo-Ibsq.css new file mode 100644 index 0000000..a0fa039 --- /dev/null +++ b/index-DEo-Ibsq.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap";._container_1cdj9_1{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;background-color:#f8f9fa;text-align:center;padding:20px}._circle_1cdj9_12{width:150px;height:150px;border-radius:50%;background-color:#5c9eff;margin:40px 0;animation:_breathe_1cdj9_1 12s ease-in-out infinite}._message_1cdj9_21{margin:20px 0;font-size:1.5rem;color:#2d3748;transition:opacity .5s ease-in-out}._messageVisible_1cdj9_28{opacity:1}._messageHidden_1cdj9_32{opacity:0}._title_1cdj9_36{font-size:2.5rem;color:#1a202c;margin-bottom:20px}._button_1cdj9_42{padding:12px 24px;font-size:1.1rem;background-color:#2c5c9d;color:#fff;border:none;border-radius:8px;cursor:pointer;transition:background-color .3s ease;margin-top:30px}._button_1cdj9_42:hover{background-color:#5c9eff}@keyframes _breathe_1cdj9_1{0%{transform:scale(.6);opacity:.3}33.33%{transform:scale(1.3);opacity:.7}33.34%,58.33%{transform:scale(1.3);opacity:.7}to{transform:scale(.6);opacity:.3}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Quicksand,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}html{font-family:Quicksand,system-ui,sans-serif}body{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-right-2{right:-.5rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.bottom-20{bottom:5rem}.bottom-8{bottom:2rem}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.right-4{right:1rem}.right-8{right:2rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.z-50{z-index:50}.order-1{order:1}.order-2{order:2}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-6{margin-left:-1.5rem}.-mt-1{margin-top:-.25rem}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-14{margin-bottom:3.5rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.h-0{height:0px}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[160px\]{height:160px}.h-\[240px\]{height:240px}.h-full{height:100%}.max-h-0{max-height:0px}.max-h-48{max-height:12rem}.min-h-\[320px\]{min-height:320px}.min-h-\[400px\]{min-height:400px}.min-h-\[calc\(100vh-4rem\)\]{min-height:calc(100vh - 4rem)}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[300px\]{width:300px}.w-\[35\%\]{width:35%}.w-\[65\%\]{width:65%}.w-full{width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\[1200px\]{max-width:1200px}.max-w-\[80\%\]{max-width:80%}.max-w-\[90\%\]{max-width:90%}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes breathe{0%,to{transform:scale(1);opacity:.2}50%{transform:scale(1.15);opacity:.4}}.animate-breathe{animation:breathe 4s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-16{gap:4rem}.gap-2{gap:.5rem}.gap-24{gap:6rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-\[\#2C5C9D\]{--tw-border-opacity: 1;border-color:rgb(44 92 157 / var(--tw-border-opacity))}.border-\[\#5C9EFF\]{--tw-border-opacity: 1;border-color:rgb(92 158 255 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-100{--tw-border-opacity: 1;border-color:rgb(254 226 226 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity))}.border-b-transparent{border-bottom-color:transparent}.border-l-\[\#5C9EFF\]{--tw-border-opacity: 1;border-left-color:rgb(92 158 255 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\!bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.bg-\[\#2C5C9D\]{--tw-bg-opacity: 1;background-color:rgb(44 92 157 / var(--tw-bg-opacity))}.bg-\[\#5C9EFF\]{--tw-bg-opacity: 1;background-color:rgb(92 158 255 / var(--tw-bg-opacity))}.bg-\[\#5C9EFF\]\/5{background-color:#5c9eff0d}.bg-\[\#DC2626\]{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-\[\#E0E0E0\]{--tw-bg-opacity: 1;background-color:rgb(224 224 224 / var(--tw-bg-opacity))}.bg-\[\#EEF4FB\]{--tw-bg-opacity: 1;background-color:rgb(238 244 251 / var(--tw-bg-opacity))}.bg-\[\#F0F5FF\]{--tw-bg-opacity: 1;background-color:rgb(240 245 255 / var(--tw-bg-opacity))}.bg-\[\#F5A623\]{--tw-bg-opacity: 1;background-color:rgb(245 166 35 / var(--tw-bg-opacity))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/80{background-color:#fffc}.bg-white\/90{background-color:#ffffffe6}.bg-opacity-50{--tw-bg-opacity: .5}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pl-6{padding-left:1.5rem}.pr-8{padding-right:2rem}.pt-12{padding-top:3rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.not-italic{font-style:normal}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.text-\[\#2C5C9D\]{--tw-text-opacity: 1;color:rgb(44 92 157 / var(--tw-text-opacity))}.text-\[\#333333\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity))}.text-\[\#555555\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity))}.text-\[\#5C9EFF\]{--tw-text-opacity: 1;color:rgb(92 158 255 / var(--tw-text-opacity))}.text-\[\#666666\]{--tw-text-opacity: 1;color:rgb(102 102 102 / var(--tw-text-opacity))}.text-\[\#999999\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.animate-fade-in{animation:fadeIn .3s ease-out}.animate-slide-up{animation:slideUp .3s ease-out}.animate-bounce{animation:bounce 1s ease-in-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-\[\#2C5C9D\]:hover{--tw-border-opacity: 1;border-color:rgb(44 92 157 / var(--tw-border-opacity))}.hover\:bg-\[\#234B80\]:hover{--tw-bg-opacity: 1;background-color:rgb(35 75 128 / var(--tw-bg-opacity))}.hover\:bg-\[\#234B82\]:hover{--tw-bg-opacity: 1;background-color:rgb(35 75 130 / var(--tw-bg-opacity))}.hover\:bg-\[\#2C5C9D\]:hover{--tw-bg-opacity: 1;background-color:rgb(44 92 157 / var(--tw-bg-opacity))}.hover\:bg-\[\#B91C1C\]:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\:bg-\[\#E5EFFF\]:hover{--tw-bg-opacity: 1;background-color:rgb(229 239 255 / var(--tw-bg-opacity))}.hover\:bg-\[\#E69512\]:hover{--tw-bg-opacity: 1;background-color:rgb(230 149 18 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-orange-700:hover{--tw-bg-opacity: 1;background-color:rgb(194 65 12 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:text-\[\#234B82\]:hover{--tw-text-opacity: 1;color:rgb(35 75 130 / var(--tw-text-opacity))}.hover\:text-\[\#2C5C9D\]:hover{--tw-text-opacity: 1;color:rgb(44 92 157 / var(--tw-text-opacity))}.hover\:text-\[\#333333\]:hover{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[\#2C5C9D\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(44 92 157 / var(--tw-ring-opacity))}.focus\:ring-\[\#5C9EFF\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(92 158 255 / var(--tw-ring-opacity))}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-red-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-transparent{background-color:transparent}.group:hover .group-hover\:text-\[\#2C5C9D\]{--tw-text-opacity: 1;color:rgb(44 92 157 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:mb-6{margin-bottom:1.5rem}.sm\:mb-8{margin-bottom:2rem}.sm\:block{display:block}.sm\:max-w-\[80\%\]{max-width:80%}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:py-12{padding-top:3rem;padding-bottom:3rem}.sm\:py-4{padding-top:1rem;padding-bottom:1rem}.sm\:pb-12{padding-bottom:3rem}.sm\:pt-24{padding-top:6rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width: 768px){.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:text-5xl{font-size:3rem;line-height:1}}@media (min-width: 1024px){.lg\:sticky{position:sticky}.lg\:top-24{top:6rem}.lg\:order-1{order:1}.lg\:order-2{order:2}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:mb-0{margin-bottom:0}.lg\:w-\[40\%\]{width:40%}.lg\:w-\[60\%\]{width:60%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:gap-6{gap:1.5rem}.lg\:self-start{align-self:flex-start}.lg\:px-8{padding-left:2rem;padding-right:2rem}}
commit 3b0b17359c7f7779bce5ba0edd6bb4b12b1d32ba
Author: ffff:12.186.22.250 <ffff:12.186.22.250@hub.scroll.pub> Date: 2024-12-23 22:15:01 +0000 Subject: updated index.scroll diff --git a/index.scroll b/index.scroll index 4442ed6..ab5d6f6 100644 --- a/index.scroll +++ b/index.scroll @@ -1,4 +1,2 @@ buildHtml -theme roboto - -Hello World my name is \ No newline at end of file +landing.html \ No newline at end of file
commit 93ae8dc607b1463fe7a9bb9ba86f2c51b641d57f
Author: ffff:12.186.22.250 <ffff:12.186.22.250@hub.scroll.pub> Date: 2024-12-23 22:14:54 +0000 Subject: updated landing.html diff --git a/landing.html b/landing.html index e69de29..ad1f36f 100644 --- a/landing.html +++ b/landing.html @@ -0,0 +1,63 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + + <!-- Primary Meta Tags --> + <title>Amia - AI-Powered Therapy Companion | Talk Anytime, Anywhere</title> + <meta + name="title" + content="Amia - AI-Powered Therapy Companion | Talk Anytime, Anywhere" + /> + <meta + name="description" + content="Experience supportive AI therapy with Amia. Available 24/7, no wait times. Start your therapeutic journey today with personalized emotional support." + /> + + <!-- Open Graph / Facebook --> + <meta property="og:type" content="website" /> + <meta property="og:url" content="https://amia.ai" /> + <meta property="og:title" content="Amia - AI-Powered Therapy Companion" /> + <meta + property="og:description" + content="Experience supportive AI therapy with Amia. Available 24/7, no wait times. Start your therapeutic journey today." + /> + <meta property="og:image" content="https://amia.ai/og-image.jpg" /> + + <!-- Twitter --> + <meta property="twitter:card" content="summary_large_image" /> + <meta property="twitter:url" content="https://amia.ai" /> + <meta + property="twitter:title" + content="Amia - AI-Powered Therapy Companion" + /> + <meta + property="twitter:description" + content="Experience supportive AI therapy with Amia. Available 24/7, no wait times. Start your therapeutic journey today." + /> + <meta property="twitter:image" content="https://amia.ai/og-image.jpg" /> + + <!-- Favicon --> + <link rel="icon" type="image/svg+xml" href="/vite.svg" /> + + <!-- Preconnect to External Resources --> + <link rel="preconnect" href="https://fonts.googleapis.com" /> + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> + <link rel="preconnect" href="https://images.unsplash.com" /> + <script type="module" crossorigin src="/assets/index-DAB2nFwS.js"></script> + <link rel="stylesheet" crossorigin href="/assets/index-DEo-Ibsq.css" /> + </head> + <body> + <div id="root"></div> + <noscript> + <div style="text-align: center; padding: 2rem"> + <h1>JavaScript Required</h1> + <p> + Please enable JavaScript to use Amia. We need JavaScript to provide + you with the best therapeutic experience. + </p> + </div> + </noscript> + </body> +</html>
commit 2c21e58826d909d8992ca2755d7fd804b5d6fc1f
Author: ffff:12.186.22.250 <ffff:12.186.22.250@hub.scroll.pub> Date: 2024-12-23 22:14:52 +0000 Subject: created landing.html diff --git a/landing.html b/landing.html new file mode 100644 index 0000000..e69de29
commit fda54dbff1d85c5169aabaa592b849be690002f2
Author: ffff:12.186.22.250 <ffff:12.186.22.250@hub.scroll.pub> Date: 2024-12-22 18:15:33 +0000 Subject: updated .gitignore diff --git a/.gitignore b/.gitignore index bd1a52d..43b9694 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ *.css *.js *.csv +.* requests.scroll \ No newline at end of file
commit 93e43037b7794c5d3de89eaf6afe3e3d561d8df3
Author: root <root@hub.scroll.pub> Date: 2024-11-10 20:12:15 +0000 Subject: initial blank_template template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd1a52d --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +*.html +*.txt +*.xml +*.css +*.js +*.csv +requests.scroll \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..4442ed6 --- /dev/null +++ b/index.scroll @@ -0,0 +1,4 @@ +buildHtml +theme roboto + +Hello World my name is \ No newline at end of file