PageSourceSearch

https://monolit.sh/assets/index-BE1LTMpj.js

js monolit.sh collected 2026-10-09 00:59:37 UTC 946,633 bytes, 68 lines download raw bytes

vendor: 5,389 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/verify-business-BNa6VUse.js","assets/business.service-Dvpz4I5Z.js","assets/pricing-Czaon-Y-.js","assets/billing-DD1zlPDI.js","assets/Footer-B9-wz7uv.js","assets/signup-consent-EbcMxI92.js","assets/ThemeToggle-C1WAZNVb.js","assets/onboarding-CzPrhe_2.js","assets/RequireAuth-fon_pNVa.js","assets/onboard--EXnO66x.js","assets/onboarding-C-hg9t8J.js","assets/dashboard-NJjJEKaX.js","assets/ScrollDownHint-D9n0bIZL.js","assets/FacebookPageGate-BYCoQKf5.js","assets/social.service-CiAEZMgZ.js","assets/SocialEmbed-DQJrMaLU.js","assets/domain-DqFcFpOJ.js","assets/dashboard-DB0Q8XAf.css","assets/index-CgQVVvfM.js","assets/user-profile-4O40f1ky.js","assets/index-B_nCsN-5.js","assets/index-CigaplTg.js","assets/website-audit-HKz0aX3U.js","assets/social-media-strategy-CzsaZ4AB.js","assets/social-media-roi-calculator-DJHezMBw.js","assets/social-media-image-sizes-lDo85BX9.js","assets/social-media-checklist-C0rlelYW.js","assets/post-ideas-Dj9l4_zg.js","assets/hashtag-generator-C2AA0ywH.js","assets/growth-playbook-Daldu8P8.js","assets/glossary-13PAxO0D.js","assets/engagement-rate-calculator-Bs7NVvAA.js","assets/content-pillars-QLfc1tYs.js","assets/character-counter-Cqx1SsQF.js","assets/bio-generator-DAFf-itX.js","assets/best-time-to-post-D8m0DT6W.js","assets/social-login-check-IB4Nnw8d.js","assets/extension-lpyOIfaT.js","assets/connect-sumqY-Pi.js","assets/_slug-CMgKxzB6.js","assets/markdown-JgFd724V.js","assets/_slug-8FZBDHam.js","assets/callback-F3j8I70V.js","assets/consent-version--cfLsQfJ.js","assets/start-C9nFMMVH.js","assets/domain-mZXhJ7HX.js","assets/callback-CDdnoDXa.js","assets/oauth-error-message-2NCgmPUt.js","assets/callback-CF_-G_Wz.js","assets/callback-Bn5zNa6X.js","assets/callback-BceuTANX.js","assets/callback-v8sMwulp.js","assets/callback-Dak8JioI.js","assets/callback-BpOwNb4p.js"])))=>i.map(i=>d[i]);
2function $A(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jp={exports:{}},Tl={};var Uw;function zA(){if(Uw)return Tl;Uw=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var d in a)d!=="key"&&(o[d]=a[d])}else o=a;return a=o.ref,{$$typeof:t,type:i,key:c,ref:a!==void 0?a:null,props:o}}return Tl.Fragment=e,Tl.jsx=n,Tl.jsxs=n,Tl}var Bw;function UA(){return Bw||(Bw=1,Jp.exports=zA()),Jp.exports}var q=UA(),Zp={exports:{}},Ce={};var qw;function BA(){if(qw)return Ce;qw=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),y=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function x(P,K,ee){this.props=P,this.context=K,this.refs=k,this.updater=ee||w}x.prototype.isReactComponent={},x.prototype.setState=function(P,K){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,K,"setState")},x.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function C(){}C.prototype=x.prototype;function A(P,K,ee){this.props=P,this.context=K,this.refs=k,this.updater=ee||w}var M=A.prototype=new C;M.constructor=A,S(M,x.prototype),M.isPureReactComponent=!0;var D=Array.isArray;function $(){}var L={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function U(P,K,ee){var se=ee.ref;return{$$typeof:t,type:P,key:K,ref:se!==void 0?se:null,props:ee}}function X(P,K){return U(P.type,K,P.props)}function Q(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function te(P){var K={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ee){return K[ee]})}var _e=/\/+/g;function pe(P,K){return typeof P=="object"&&P!==null&&P.key!=null?te(""+P.key):K.toString(36)}function Ne(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then($,$):(P.status="pending",P.then(function(K){P.status==="pending"&&(P.status="fulfilled",P.value=K)},function(K){P.status==="pending"&&(P.status="rejected",P.reason=K)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function H(P,K,ee,se,de){var Te=typeof P;(Te==="undefined"||Te==="boolean")&&(P=null);var Ie=!1;if(P===null)Ie=!0;else switch(Te){case"bigint":case"string":case"number":Ie=!0;break;case"object":switch(P.$$typeof){case t:case e:Ie=!0;break;case g:return Ie=P._init,H(Ie(P._payload),K,ee,se,de)}}if(Ie)return de=de(P),Ie=se===""?"."+pe(P,0):se,D(de)?(ee="",Ie!=null&&(ee=Ie.replace(_e,"$&/")+"/"),H(de,K,ee,"",function(hn){return hn})):de!=null&&(Q(de)&&(de=X(de,ee+(de.key==null||P&&P.key===de.key?"":(""+de.key).replace(_e,"$&/")+"/")+Ie)),K.push(de)),1;Ie=0;var Ye=se===""?".":se+":";if(D(P))for(var Ve=0;Ve<P.length;
vendor: 13,388 bytes, line 2
2Ve++)se=P[Ve],Te=Ye+pe(se,Ve),Ie+=H(se,K,ee,Te,de);else if(Ve=_(P),typeof Ve=="function")for(P=Ve.call(P),Ve=0;!(se=P.next()).done;)se=se.value,Te=Ye+pe(se,Ve++),Ie+=H(se,K,ee,Te,de);else if(Te==="object"){if(typeof P.then=="function")return H(Ne(P),K,ee,se,de);throw K=String(P),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return Ie}function Z(P,K,ee){if(P==null)return P;var se=[],de=0;return H(P,se,"","",function(Te){return K.call(ee,Te,de++)}),se}function ue(P){if(P._status===-1){var K=P._result;K=K(),K.then(function(ee){(P._status===0||P._status===-1)&&(P._status=1,P._result=ee)},function(ee){(P._status===0||P._status===-1)&&(P._status=2,P._result=ee)}),P._status===-1&&(P._status=0,P._result=K)}if(P._status===1)return P._result.default;throw P._result}var Ee=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},Me={map:Z,forEach:function(P,K,ee){Z(P,function(){K.apply(this,arguments)},ee)},count:function(P){var K=0;return Z(P,function(){K++}),K},toArray:function(P){return Z(P,function(K){return K})||[]},only:function(P){if(!Q(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Ce.Activity=v,Ce.Children=Me,Ce.Component=x,Ce.Fragment=n,Ce.Profiler=a,Ce.PureComponent=A,Ce.StrictMode=i,Ce.Suspense=h,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(P){return L.H.useMemoCache(P)}},Ce.cache=function(P){return function(){return P.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(P,K,ee){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var se=S({},P.props),de=P.key;if(K!=null)for(Te in K.key!==void 0&&(de=""+K.key),K)!I.call(K,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&K.ref===void 0||(se[Te]=K[Te]);var Te=arguments.length-2;if(Te===1)se.children=ee;else if(1<Te){for(var Ie=Array(Te),Ye=0;Ye<Te;Ye++)Ie[Ye]=arguments[Ye+2];se.children=Ie}return U(P.type,de,se)},Ce.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},Ce.createElement=function(P,K,ee){var se,de={},Te=null;if(K!=null)for(se in K.key!==void 0&&(Te=""+K.key),K)I.call(K,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(de[se]=K[se]);var Ie=arguments.length-2;if(Ie===1)de.children=ee;else if(1<Ie){for(var Ye=Array(Ie),Ve=0;Ve<Ie;Ve++)Ye[Ve]=arguments[Ve+2];de.children=Ye}if(P&&P.defaultProps)for(se in Ie=P.defaultProps,Ie)de[se]===void 0&&(de[se]=Ie[se]);return U(P,Te,de)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(P){return{$$typeof:d,render:P}},Ce.isValidElement=Q,Ce.lazy=function(P){return{$$typeof:g,_payload:{_status:-1,_result:P},_init:ue}},Ce.memo=function(P,K){return{$$typeof:f,type:P,compare:K===void 0?null:K}},Ce.startTransition=function(P){var K=L.T,ee={};L.T=ee;try{var se=P(),de=L.S;de!==null&&de(ee,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then($,Ee)}catch(Te){Ee(Te)}finally{K!==null&&ee.types!==null&&(K.types=ee.types),L.T=K}},Ce.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Ce.use=function(P){return L.H.use(P)},Ce.useActionState=function(P,K,ee){return L.H.useActionState(P,K,ee)},Ce.useCallback=function(P,K){return L.H.useCallback(P,K)},Ce.useContext=function(P){return L.H.useContext(P)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(P,K){return L.H.useDeferredValue(P,K)},Ce.useEffect=function(P,K){return L.H.useEffect(P,K)},Ce.useEffectEvent=function(P){return L.H.useEffectEvent(P)},Ce.useId=function(){return L.H.useId()},Ce.useImperativeHandle=function(P,K,ee){return L.H.useImperativeHandle(P,K,ee)},Ce.useInsertionEffect=function(P,K){return L.H.useInsertionEffect(P,K)},Ce.useLayoutEffect=function(P,K){return L.H.useLayoutEffect(P,K)},Ce.useMemo=function(P,K){return L.H.useMemo(P,K)},Ce.useOptimistic=function(P,K){return L.H.useOptimistic(P,K)},Ce.useReducer=function(P,K,ee){return L.H.useReducer(P,K,ee)},Ce.useRef=function(P){return L.H.useRef(P)},Ce.useState=function(P){return L.H.useState(P)},Ce.useSyncExternalStore=function(P,K,ee){return L.H.useSyncExternalStore(P,K,ee)},Ce.useTransition=function(){return L.H.useTransition()},Ce.version="19.2.6",Ce}var Fw;function Dc(){return Fw||(Fw=1,Zp.exports=BA()),Zp.exports}var ne=Dc();const pr=$A(ne);var Xp={exports:{}},Rl={},Qp={exports:{}},eg={};var Hw;function qA(){return Hw||(Hw=1,(function(t){function e(H,Z){var ue=H.length;H.push(Z);e:for(;0<ue;){var Ee=ue-1>>>1,Me=H[Ee];if(0<a(Me,Z))H[Ee]=Z,H[ue]=Me,ue=Ee;else break e}}function n(H){return H.length===0?null:H[0]}function i(H){if(H.length===0)return null;var Z=H[0],ue=H.pop();if(ue!==Z){H[0]=ue;e:for(var Ee=0,Me=H.length,P=Me>>>1;Ee<P;){var K=2*(Ee+1)-1,ee=H[K],se=K+1,de=H[se];if(0>a(ee,ue))se<Me&&0>a(de,ee)?(H[Ee]=de,H[se]=ue,Ee=se):(H[Ee]=ee,H[K]=ue,Ee=K);else if(se<Me&&0>a(de,ue))H[Ee]=de,H[se]=ue,Ee=se;else break e}}return Z}function a(H,Z){var ue=H.sortIndex-Z.sortIndex;return ue!==0?ue:H.id-Z.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var h=[],f=[],g=1,v=null,y=3,_=!1,w=!1,S=!1,k=!1,x=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function M(H){for(var Z=n(f);Z!==null;){if(Z.callback===null)i(f);else if(Z.startTime<=H)i(f),Z.sortIndex=Z.expirationTime,e(h,Z);else break;Z=n(f)}}function D(H){if(S=!1,M(H),!w)if(n(h)!==null)w=!0,$||($=!0,te());else{var Z=n(f);Z!==null&&Ne(D,Z.startTime-H)}}var $=!1,L=-1,I=5,U=-1;function X(){return k?!0:!(t.unstable_now()-U<I)}function Q(){if(k=!1,$){var H=t.unstable_now();U=H;var Z=!0;try{e:{w=!1,S&&(S=!1,C(L),L=-1),_=!0;var ue=y;try{t:{for(M(H),v=n(h);v!==null&&!(v.expirationTime>H&&X());){var Ee=v.callback;if(typeof Ee=="function"){v.callback=null,y=v.priorityLevel;var Me=Ee(v.expirationTime<=H);if(H=t.unstable_now(),typeof Me=="function"){v.callback=Me,M(H),Z=!0;break t}v===n(h)&&i(h),M(H)}else i(h);v=n(h)}if(v!==null)Z=!0;else{var P=n(f);P!==null&&Ne(D,P.startTime-H),Z=!1}}break e}finally{v=null,y=ue,_=!1}Z=void 0}}finally{Z?te():$=!1}}}var te;if(typeof A=="function")te=function(){A(Q)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,pe=_e.port2;_e.port1.onmessage=Q,te=function(){pe.postMessage(null)}}else te=function(){x(Q,0)};function Ne(H,Z){L=x(function(){H(t.unstable_now())},Z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(H){switch(y){case 1:case 2:case 3:var Z=3;break;default:Z=y}var ue=y;y=Z;try{return H()}finally{y=ue}},t.unstable_requestPaint=function(){k=!0},t.unstable_runWithPriority=function(H,Z){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ue=y;y=H;try{return Z()}finally{y=ue}},t.unstable_scheduleCallback=function(H,Z,ue){var Ee=t.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Ee+ue:Ee):ue=Ee,H){case 1:var Me=-1;break;case 2:Me=250;break;case 5:Me=1073741823;break;case 4:Me=1e4;break;default:Me=5e3}return Me=ue+Me,H={id:g++,callback:Z,priorityLevel:H,startTime:ue,expirationTime:Me,sortIndex:-1},ue>Ee?(H.sortIndex=ue,e(f,H),n(h)===null&&H===n(f)&&(S?(C(L),L=-1):S=!0,Ne(D,ue-Ee))):(H.sortIndex=Me,e(h,H),w||_||(w=!0,$||($=!0,te()))),H},t.unstable_shouldYield=X,t.unstable_wrapCallback=function(H){var Z=y;return function(){var ue=y;y=Z;try{return H.apply(this,arguments)}finally{y=ue}}}})(eg)),eg}var Vw;function FA(){return Vw||(Vw=1,Qp.exports=qA()),Qp.exports}var tg={exports:{}},nn={};var Gw;function HA(){if(Gw)return nn;Gw=1;var t=Dc();function e(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)f+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(h,f,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:v==null?null:""+v,children:h,containerInfo:f,implementation:g}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,nn.createPortal=function(h,f){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return o(h,f,null,g)},nn.flushSync=function(h){var f=c.T,g=i.p;try{if(c.T=null,i.p=2,h)return h()}finally{c.T=f,i.p=g,i.d.f()}},nn.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(h,f))},nn.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},nn.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var g=f.as,v=d(g,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,_=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;g==="style"?i.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:v,integrity:y,fetchPriority:_}):g==="script"&&i.d.X(h,{crossOrigin:v,integrity:y,fetchPriority:_,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},nn.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var g=d(f.as,f.crossOrigin);i.d.M(h,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(h)},nn.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var g=f.as,v=d(g,f.crossOrigin);i.d.L(h,g,{crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},nn.preloadModule=function(h,f){if(typeof h=="string")if(f){var g=d(f.as,f.crossOrigin);i.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(h)},nn.requestFormReset=function(h){i.d.r(h)},nn.unstable_batchedUpdates=function(h,f){return h(f)},nn.useFormState=function(h,f,g){return c.H.useFormState(h,f,g)},nn.useFormStatus=function(){return c.H.useHostTransitionStatus()},nn.version="19.2.6",nn}var Yw;function JE(){if(Yw)return tg.exports;Yw=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),tg.exports=HA(),tg.exports}var Kw;function VA(){if(Kw)return Rl;Kw=1;var t=FA(),e=Dc(),n=JE();function i(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function o(r){var s=r,l=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(l=s.return),r=s.return;while(r)}return s.tag===3?l:null}function c(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function d(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function h(r){if(o(r)!==r)throw Error(i(188))}function f(r){var s=r.alternate;
vendor: 6,605 bytes, lines 2-9
2if(!s){if(s=o(r),s===null)throw Error(i(188));return s!==r?null:r}for(var l=r,u=s;;){var p=l.return;if(p===null)break;var m=p.alternate;if(m===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===l)return h(p),r;if(m===u)return h(p),s;m=m.sibling}throw Error(i(188))}if(l.return!==u.return)l=p,u=m;else{for(var b=!1,E=p.child;E;){if(E===l){b=!0,l=p,u=m;break}if(E===u){b=!0,u=p,l=m;break}E=E.sibling}if(!b){for(E=m.child;E;){if(E===l){b=!0,l=m,u=p;break}if(E===u){b=!0,u=m,l=p;break}E=E.sibling}if(!b)throw Error(i(189))}}if(l.alternate!==u)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?r:s}function g(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=g(r),s!==null)return s;r=r.sibling}return null}var v=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),A=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),X=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function te(r){return r===null||typeof r!="object"?null:(r=Q&&r[Q]||r["@@iterator"],typeof r=="function"?r:null)}var _e=Symbol.for("react.client.reference");function pe(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===_e?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case S:return"Fragment";case x:return"Profiler";case k:return"StrictMode";case D:return"Suspense";case $:return"SuspenseList";case U:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case A:return r.displayName||"Context";case C:return(r._context.displayName||"Context")+".Consumer";case M:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case L:return s=r.displayName||null,s!==null?s:pe(r.type)||"Memo";case I:s=r._payload,r=r._init;try{return pe(r(s))}catch{}}return null}var Ne=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Ee=[],Me=-1;function P(r){return{current:r}}function K(r){0>Me||(r.current=Ee[Me],Ee[Me]=null,Me--)}function ee(r,s){Me++,Ee[Me]=r.current,r.current=s}var se=P(null),de=P(null),Te=P(null),Ie=P(null);function Ye(r,s){switch(ee(Te,s),ee(de,r),ee(se,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?cw(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=cw(s),r=uw(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}K(se),ee(se,r)}function Ve(){K(se),K(de),K(Te)}function hn(r){r.memoizedState!==null&&ee(Ie,r);var s=se.current,l=uw(s,r.type);s!==l&&(ee(de,r),ee(se,l))}function sr(r){de.current===r&&(K(se),K(de)),Ie.current===r&&(K(Ie),Sl._currentValue=ue)}var Ft,us;function Bn(r){if(Ft===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);Ft=s&&s[1]||"",us=-1<l.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+Ft+r+us}var ds=!1;function sn(r,s){if(!r||ds)return"";ds=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(s){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(G){var F=G}Reflect.construct(r,[],J)}else{try{J.call()}catch(G){F=G}r.call(J.prototype)}}else{try{throw Error()}catch(G){F=G}(J=r())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(G){if(G&&F&&typeof G.stack=="string")return[G.stack,F.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),b=m[0],E=m[1];if(b&&E){var O=b.split(`
5`),B=E.split(`
6`);for(p=u=0;u<O.length&&!O[u].includes("DetermineComponentFrameRoot");)u++;for(;p<B.length&&!B[p].includes("DetermineComponentFrameRoot");)p++;if(u===O.length||p===B.length)for(u=O.length-1,p=B.length-1;1<=u&&0<=p&&O[u]!==B[p];)p--;for(;1<=u&&0<=p;u--,p--)if(O[u]!==B[p]){if(u!==1||p!==1)do if(u--,p--,0>p||O[u]!==B[p]){var Y=`
7`+O[u].replace(" at new "," at ");return r.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",r.displayName)),Y}while(1<=u&&0<=p);break}}}finally{ds=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?Bn(l):""}function na(r,s){switch(r.tag){case 26:case 27:case 5:return Bn(r.type);case 16:return Bn("Lazy");case 13:return r.child!==s&&s!==null?Bn("Suspense Fallback"):Bn("Suspense");case 19:return Bn("SuspenseList");case 0:case 15:return sn(r.type,!1);case 11:return sn(r.type.render,!1);case 1:return sn(r.type,!0);case 31:return Bn("Activity");default:return""}}function qn(r){try{var s="",l=null;do s+=na(r,l),l=r,r=r.return;while(r);return s}catch(u){return`
8Error generating stack: `+u.message+`
9`+u.stack}}var ar=Object.prototype.hasOwnProperty,fn=t.unstable_scheduleCallback,mi=t.unstable_cancelCallback,hs=t.unstable_shouldYield,fs=t.unstable_requestPaint,tn=t.unstable_now,ct=t.unstable_getCurrentPriorityLevel,Ht=t.unstable_ImmediatePriority,vr=t.unstable_UserBlockingPriority,ra=t.unstable_NormalPriority,_R=t.unstable_LowPriority,Fv=t.unstable_IdlePriority,bR=t.log,wR=t.unstable_setDisableYieldValue,No=null,Rn=null;function vi(r){if(typeof bR=="function"&&wR(r),Rn&&typeof Rn.setStrictMode=="function")try{Rn.setStrictMode(No,r)}catch{}}var An=Math.clz32?Math.clz32:kR,SR=Math.log,ER=Math.LN2;function kR(r){return r>>>=0,r===0?32:31-(SR(r)/ER|0)|0}var zc=256,Uc=262144,Bc=4194304;function ps(r){var s=r&42;if(s!==0)return s;switch(r&-r){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;
vendor: 10,540 bytes, line 9
9case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function qc(r,s,l){var u=r.pendingLanes;if(u===0)return 0;var p=0,m=r.suspendedLanes,b=r.pingedLanes;r=r.warmLanes;var E=u&134217727;return E!==0?(u=E&~m,u!==0?p=ps(u):(b&=E,b!==0?p=ps(b):l||(l=E&~r,l!==0&&(p=ps(l))))):(E=u&~m,E!==0?p=ps(E):b!==0?p=ps(b):l||(l=u&~r,l!==0&&(p=ps(l)))),p===0?0:s!==0&&s!==p&&(s&m)===0&&(m=p&-p,l=s&-s,m>=l||m===32&&(l&4194048)!==0)?s:p}function Do(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function xR(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hv(){var r=Bc;return Bc<<=1,(Bc&62914560)===0&&(Bc=4194304),r}function Ih(r){for(var s=[],l=0;31>l;l++)s.push(r);return s}function jo(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function TR(r,s,l,u,p,m){var b=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var E=r.entanglements,O=r.expirationTimes,B=r.hiddenUpdates;for(l=b&~l;0<l;){var Y=31-An(l),J=1<<Y;E[Y]=0,O[Y]=-1;var F=B[Y];if(F!==null)for(B[Y]=null,Y=0;Y<F.length;Y++){var G=F[Y];G!==null&&(G.lane&=-536870913)}l&=~J}u!==0&&Vv(r,u,0),m!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=m&~(b&~s))}function Vv(r,s,l){r.pendingLanes|=s,r.suspendedLanes&=~s;var u=31-An(s);r.entangledLanes|=s,r.entanglements[u]=r.entanglements[u]|1073741824|l&261930}function Gv(r,s){var l=r.entangledLanes|=s;for(r=r.entanglements;l;){var u=31-An(l),p=1<<u;p&s|r[u]&s&&(r[u]|=s),l&=~p}}function Yv(r,s){var l=s&-s;return l=(l&42)!==0?1:$h(l),(l&(r.suspendedLanes|s))!==0?0:l}function $h(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function zh(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Kv(){var r=Z.p;return r!==0?r:(r=window.event,r===void 0?32:Lw(r.type))}function Wv(r,s){var l=Z.p;try{return Z.p=r,s()}finally{Z.p=l}}var yi=Math.random().toString(36).slice(2),Vt="__reactFiber$"+yi,pn="__reactProps$"+yi,ia="__reactContainer$"+yi,Uh="__reactEvents$"+yi,RR="__reactListeners$"+yi,AR="__reactHandles$"+yi,Jv="__reactResources$"+yi,Io="__reactMarker$"+yi;function Bh(r){delete r[Vt],delete r[pn],delete r[Uh],delete r[RR],delete r[AR]}function sa(r){var s=r[Vt];if(s)return s;for(var l=r.parentNode;l;){if(s=l[ia]||l[Vt]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(r=vw(r);r!==null;){if(l=r[Vt])return l;r=vw(r)}return s}r=l,l=r.parentNode}return null}function aa(r){if(r=r[Vt]||r[ia]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function $o(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(i(33))}function oa(r){var s=r[Jv];return s||(s=r[Jv]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function zt(r){r[Io]=!0}var Zv=new Set,Xv={};function gs(r,s){la(r,s),la(r+"Capture",s)}function la(r,s){for(Xv[r]=s,r=0;r<s.length;r++)Zv.add(s[r])}var CR=RegExp("^[: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]*$"),Qv={},ey={};function OR(r){return ar.call(ey,r)?!0:ar.call(Qv,r)?!1:CR.test(r)?ey[r]=!0:(Qv[r]=!0,!1)}function Fc(r,s,l){if(OR(s))if(l===null)r.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var u=s.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+l)}}function Hc(r,s,l){if(l===null)r.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+l)}}function Mr(r,s,l,u){if(u===null)r.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(s,l,""+u)}}function Fn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ty(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function PR(r,s,l){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,m=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return p.call(this)},set:function(b){l=""+b,m.call(this,b)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function qh(r){if(!r._valueTracker){var s=ty(r)?"checked":"value";r._valueTracker=PR(r,s,""+r[s])}}function ny(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var l=s.getValue(),u="";return r&&(u=ty(r)?r.checked?"true":"false":r.value),r=u,r!==l?(s.setValue(r),!0):!1}function Vc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var MR=/[\n"\\]/g;function Hn(r){return r.replace(MR,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Fh(r,s,l,u,p,m,b,E){r.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?r.type=b:r.removeAttribute("type"),s!=null?b==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+Fn(s)):r.value!==""+Fn(s)&&(r.value=""+Fn(s)):b!=="submit"&&b!=="reset"||r.removeAttribute("value"),s!=null?Hh(r,b,Fn(s)):l!=null?Hh(r,b,Fn(l)):u!=null&&r.removeAttribute("value"),p==null&&m!=null&&(r.defaultChecked=!!m),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?r.name=""+Fn(E):r.removeAttribute("name")}function ry(r,s,l,u,p,m,b,E){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(r.type=m),s!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||s!=null)){qh(r);return}l=l!=null?""+Fn(l):"",s=s!=null?""+Fn(s):l,E||s===r.value||(r.value=s),r.defaultValue=s}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=E?r.checked:!!u,r.defaultChecked=!!u,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.name=b),qh(r)}function Hh(r,s,l){s==="number"&&Vc(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function ca(r,s,l,u){if(r=r.options,s){s={};for(var p=0;p<l.length;p++)s["$"+l[p]]=!0;for(l=0;l<r.length;l++)p=s.hasOwnProperty("$"+r[l].value),r[l].selected!==p&&(r[l].selected=p),p&&u&&(r[l].defaultSelected=!0)}else{for(l=""+Fn(l),s=null,p=0;p<r.length;p++){if(r[p].value===l){r[p].selected=!0,u&&(r[p].defaultSelected=!0);return}s!==null||r[p].disabled||(s=r[p])}s!==null&&(s.selected=!0)}}function iy(r,s,l){if(s!=null&&(s=""+Fn(s),s!==r.value&&(r.value=s),l==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=l!=null?""+Fn(l):""}function sy(r,s,l,u){if(s==null){if(u!=null){if(l!=null)throw Error(i(92));if(Ne(u)){if(1<u.length)throw Error(i(93));u=u[0]}l=u}l==null&&(l=""),s=l}l=Fn(s),r.defaultValue=l,u=r.textContent,u===l&&u!==""&&u!==null&&(r.value=u),qh(r)}function ua(r,s){if(s){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=s;return}}r.textContent=s}var LR=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ay(r,s,l){var u=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":u?r.setProperty(s,l):typeof l!="number"||l===0||LR.has(s)?s==="float"?r.cssFloat=l:r[s]=(""+l).trim():r[s]=l+"px"}function oy(r,s,l){if(s!=null&&typeof s!="object")throw Error(i(62));if(r=r.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||s!=null&&s.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var p in s)u=s[p],s.hasOwnProperty(p)&&l[p]!==u&&ay(r,p,u)}else for(var m in s)s.hasOwnProperty(m)&&ay(r,m,s[m])}function Vh(r){if(r.indexOf("-")===-1)return!1;switch(r){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 NR=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),DR=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gc(r){return DR.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Lr(){}var Gh=null;function Yh(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var da=null,ha=null;function ly(r){var s=aa(r);if(s&&(r=s.stateNode)){var l=r[pn]||null;e:switch(r=s.stateNode,s.type){case"input":if(Fh(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Hn(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var u=l[s];if(u!==r&&u.form===r.form){var p=u[pn]||null;if(!p)throw Error(i(90));Fh(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(s=0;s<l.length;s++)u=l[s],u.form===r.form&&ny(u)}break e;case"textarea":iy(r,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&ca(r,!!l.multiple,s,!1)}}}var Kh=!1;function cy(r,s,l){if(Kh)return r(s,l);Kh=!0;try{var u=r(s);return u}finally{if(Kh=!1,(da!==null||ha!==null)&&(Lu(),da&&(s=da,r=ha,ha=da=null,ly(s),r)))for(s=0;s<r.length;s++)ly(r[s])}}function zo(r,s){var l=r.stateNode;if(l===null)return null;var u=l[pn]||null;if(u===null)return null;l=u[s];e:switch(s){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)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(i(231,s,typeof l));return l}var Nr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wh=!1;if(Nr)try{var Uo={};Object.defineProperty(Uo,"passive",{get:function(){Wh=!0}}),window.addEventListener("test",Uo,Uo),window.removeEventListener("test",Uo,Uo)}catch{Wh=!1}var _i=null,Jh=null,Yc=null;function uy(){if(Yc)return Yc;var r,s=Jh,l=s.length,u,p="value"in _i?_i.value:_i.textContent,m=p.length;for(r=0;r<l&&s[r]===p[r];r++);var b=l-r;for(u=1;u<=b&&s[l-u]===p[m-u];u++);return Yc=p.slice(r,1<u?1-u:void 0)}function Kc(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Wc(){return!0}function dy(){return!1}function gn(r){function s(l,u,p,m,b){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var E in r)r.hasOwnProperty(E)&&(l=r[E],this[E]=l?l(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Wc:dy,this.isPropagationStopped=dy,this}return v(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Wc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Wc)},persist:function(){}
vendor: 5,465 bytes, line 9
9,isPersistent:Wc}),s}var ms={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jc=gn(ms),Bo=v({},ms,{view:0,detail:0}),jR=gn(Bo),Zh,Xh,qo,Zc=v({},Bo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ef,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==qo&&(qo&&r.type==="mousemove"?(Zh=r.screenX-qo.screenX,Xh=r.screenY-qo.screenY):Xh=Zh=0,qo=r),Zh)},movementY:function(r){return"movementY"in r?r.movementY:Xh}}),hy=gn(Zc),IR=v({},Zc,{dataTransfer:0}),$R=gn(IR),zR=v({},Bo,{relatedTarget:0}),Qh=gn(zR),UR=v({},ms,{animationName:0,elapsedTime:0,pseudoElement:0}),BR=gn(UR),qR=v({},ms,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),FR=gn(qR),HR=v({},ms,{data:0}),fy=gn(HR),VR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},GR={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"},YR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KR(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=YR[r])?!!s[r]:!1}function ef(){return KR}var WR=v({},Bo,{key:function(r){if(r.key){var s=VR[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Kc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?GR[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ef,charCode:function(r){return r.type==="keypress"?Kc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Kc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),JR=gn(WR),ZR=v({},Zc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),py=gn(ZR),XR=v({},Bo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ef}),QR=gn(XR),e1=v({},ms,{propertyName:0,elapsedTime:0,pseudoElement:0}),t1=gn(e1),n1=v({},Zc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),r1=gn(n1),i1=v({},ms,{newState:0,oldState:0}),s1=gn(i1),a1=[9,13,27,32],tf=Nr&&"CompositionEvent"in window,Fo=null;Nr&&"documentMode"in document&&(Fo=document.documentMode);var o1=Nr&&"TextEvent"in window&&!Fo,gy=Nr&&(!tf||Fo&&8<Fo&&11>=Fo),my=" ",vy=!1;function yy(r,s){switch(r){case"keyup":return a1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _y(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var fa=!1;function l1(r,s){switch(r){case"compositionend":return _y(s);case"keypress":return s.which!==32?null:(vy=!0,my);case"textInput":return r=s.data,r===my&&vy?null:r;default:return null}}function c1(r,s){if(fa)return r==="compositionend"||!tf&&yy(r,s)?(r=uy(),Yc=Jh=_i=null,fa=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return gy&&s.locale!=="ko"?null:s.data;default:return null}}var u1={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 by(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!u1[r.type]:s==="textarea"}function wy(r,s,l,u){da?ha?ha.push(u):ha=[u]:da=u,s=Uu(s,"onChange"),0<s.length&&(l=new Jc("onChange","change",null,l,u),r.push({event:l,listeners:s}))}var Ho=null,Vo=null;function d1(r){rw(r,0)}function Xc(r){var s=$o(r);if(ny(s))return r}function Sy(r,s){if(r==="change")return s}var Ey=!1;if(Nr){var nf;if(Nr){var rf="oninput"in document;if(!rf){var ky=document.createElement("div");ky.setAttribute("oninput","return;"),rf=typeof ky.oninput=="function"}nf=rf}else nf=!1;Ey=nf&&(!document.documentMode||9<document.documentMode)}function xy(){Ho&&(Ho.detachEvent("onpropertychange",Ty),Vo=Ho=null)}function Ty(r){if(r.propertyName==="value"&&Xc(Vo)){var s=[];wy(s,Vo,r,Yh(r)),cy(d1,s)}}function h1(r,s,l){r==="focusin"?(xy(),Ho=s,Vo=l,Ho.attachEvent("onpropertychange",Ty)):r==="focusout"&&xy()}function f1(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Xc(Vo)}function p1(r,s){if(r==="click")return Xc(s)}function g1(r,s){if(r==="input"||r==="change")return Xc(s)}function m1(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var Cn=typeof Object.is=="function"?Object.is:m1;function Go(r,s){if(Cn(r,s))return!0;
vendor: 18,789 bytes, line 9
9if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var l=Object.keys(r),u=Object.keys(s);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var p=l[u];if(!ar.call(s,p)||!Cn(r[p],s[p]))return!1}return!0}function Ry(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Ay(r,s){var l=Ry(r);r=0;for(var u;l;){if(l.nodeType===3){if(u=r+l.textContent.length,r<=s&&u>=s)return{node:l,offset:s-r};r=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ry(l)}}function Cy(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Cy(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Oy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=Vc(r.document);s instanceof r.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)r=s.contentWindow;else break;s=Vc(r.document)}return s}function sf(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var v1=Nr&&"documentMode"in document&&11>=document.documentMode,pa=null,af=null,Yo=null,of=!1;function Py(r,s,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;of||pa==null||pa!==Vc(u)||(u=pa,"selectionStart"in u&&sf(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}),Yo&&Go(Yo,u)||(Yo=u,u=Uu(af,"onSelect"),0<u.length&&(s=new Jc("onSelect","select",null,s,l),r.push({event:s,listeners:u}),s.target=pa)))}function vs(r,s){var l={};return l[r.toLowerCase()]=s.toLowerCase(),l["Webkit"+r]="webkit"+s,l["Moz"+r]="moz"+s,l}var ga={animationend:vs("Animation","AnimationEnd"),animationiteration:vs("Animation","AnimationIteration"),animationstart:vs("Animation","AnimationStart"),transitionrun:vs("Transition","TransitionRun"),transitionstart:vs("Transition","TransitionStart"),transitioncancel:vs("Transition","TransitionCancel"),transitionend:vs("Transition","TransitionEnd")},lf={},My={};Nr&&(My=document.createElement("div").style,"AnimationEvent"in window||(delete ga.animationend.animation,delete ga.animationiteration.animation,delete ga.animationstart.animation),"TransitionEvent"in window||delete ga.transitionend.transition);function ys(r){if(lf[r])return lf[r];if(!ga[r])return r;var s=ga[r],l;for(l in s)if(s.hasOwnProperty(l)&&l in My)return lf[r]=s[l];return r}var Ly=ys("animationend"),Ny=ys("animationiteration"),Dy=ys("animationstart"),y1=ys("transitionrun"),_1=ys("transitionstart"),b1=ys("transitioncancel"),jy=ys("transitionend"),Iy=new Map,cf="abort auxClick beforeToggle 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(" ");cf.push("scrollEnd");function or(r,s){Iy.set(r,s),gs(s,[r])}var Qc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Vn=[],ma=0,uf=0;function eu(){for(var r=ma,s=uf=ma=0;s<r;){var l=Vn[s];Vn[s++]=null;var u=Vn[s];Vn[s++]=null;var p=Vn[s];Vn[s++]=null;var m=Vn[s];if(Vn[s++]=null,u!==null&&p!==null){var b=u.pending;b===null?p.next=p:(p.next=b.next,b.next=p),u.pending=p}m!==0&&$y(l,p,m)}}function tu(r,s,l,u){Vn[ma++]=r,Vn[ma++]=s,Vn[ma++]=l,Vn[ma++]=u,uf|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function df(r,s,l,u){return tu(r,s,l,u),nu(r)}function _s(r,s){return tu(r,null,null,s),nu(r)}function $y(r,s,l){r.lanes|=l;var u=r.alternate;u!==null&&(u.lanes|=l);for(var p=!1,m=r.return;m!==null;)m.childLanes|=l,u=m.alternate,u!==null&&(u.childLanes|=l),m.tag===22&&(r=m.stateNode,r===null||r._visibility&1||(p=!0)),r=m,m=m.return;return r.tag===3?(m=r.stateNode,p&&s!==null&&(p=31-An(l),r=m.hiddenUpdates,u=r[p],u===null?r[p]=[s]:u.push(s),s.lane=l|536870912),m):null}function nu(r){if(50<gl)throw gl=0,bp=null,Error(i(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var va={};function w1(r,s,l,u){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,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 On(r,s,l,u){return new w1(r,s,l,u)}function hf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Dr(r,s){var l=r.alternate;return l===null?(l=On(r.tag,s,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=s,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,s=r.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function zy(r,s){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,s=l.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function ru(r,s,l,u,p,m){var b=0;if(u=r,typeof r=="function")hf(r)&&(b=1);else if(typeof r=="string")b=TA(r,l,se.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case U:return r=On(31,l,s,p),r.elementType=U,r.lanes=m,r;case S:return bs(l.children,p,m,s);case k:b=8,p|=24;break;case x:return r=On(12,l,s,p|2),r.elementType=x,r.lanes=m,r;case D:return r=On(13,l,s,p),r.elementType=D,r.lanes=m,r;case $:return r=On(19,l,s,p),r.elementType=$,r.lanes=m,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case A:b=10;break e;case C:b=9;break e;case M:b=11;break e;case L:b=14;break e;case I:b=16,u=null;break e}b=29,l=Error(i(130,r===null?"null":typeof r,"")),u=null}return s=On(b,l,s,p),s.elementType=r,s.type=u,s.lanes=m,s}function bs(r,s,l,u){return r=On(7,r,u,s),r.lanes=l,r}function ff(r,s,l){return r=On(6,r,null,s),r.lanes=l,r}function Uy(r){var s=On(18,null,null,0);return s.stateNode=r,s}function pf(r,s,l){return s=On(4,r.children!==null?r.children:[],r.key,s),s.lanes=l,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var By=new WeakMap;function Gn(r,s){if(typeof r=="object"&&r!==null){var l=By.get(r);return l!==void 0?l:(s={value:r,source:s,stack:qn(s)},By.set(r,s),s)}return{value:r,source:s,stack:qn(s)}}var ya=[],_a=0,iu=null,Ko=0,Yn=[],Kn=0,bi=null,yr=1,_r="";function jr(r,s){ya[_a++]=Ko,ya[_a++]=iu,iu=r,Ko=s}function qy(r,s,l){Yn[Kn++]=yr,Yn[Kn++]=_r,Yn[Kn++]=bi,bi=r;var u=yr;r=_r;var p=32-An(u)-1;u&=~(1<<p),l+=1;var m=32-An(s)+p;if(30<m){var b=p-p%5;m=(u&(1<<b)-1).toString(32),u>>=b,p-=b,yr=1<<32-An(s)+p|l<<p|u,_r=m+r}else yr=1<<m|l<<p|u,_r=r}function gf(r){r.return!==null&&(jr(r,1),qy(r,1,0))}function mf(r){for(;r===iu;)iu=ya[--_a],ya[_a]=null,Ko=ya[--_a],ya[_a]=null;for(;r===bi;)bi=Yn[--Kn],Yn[Kn]=null,_r=Yn[--Kn],Yn[Kn]=null,yr=Yn[--Kn],Yn[Kn]=null}function Fy(r,s){Yn[Kn++]=yr,Yn[Kn++]=_r,Yn[Kn++]=bi,yr=s.id,_r=s.overflow,bi=r}var Gt=null,dt=null,Ge=!1,wi=null,Wn=!1,vf=Error(i(519));function Si(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wo(Gn(s,r)),vf}function Hy(r){var s=r.stateNode,l=r.type,u=r.memoizedProps;switch(s[Vt]=r,s[pn]=u,l){case"dialog":Ue("cancel",s),Ue("close",s);break;case"iframe":case"object":case"embed":Ue("load",s);break;case"video":case"audio":for(l=0;l<vl.length;l++)Ue(vl[l],s);break;case"source":Ue("error",s);break;case"img":case"image":case"link":Ue("error",s),Ue("load",s);break;case"details":Ue("toggle",s);break;case"input":Ue("invalid",s),ry(s,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ue("invalid",s);break;case"textarea":Ue("invalid",s),sy(s,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||u.suppressHydrationWarning===!0||ow(s.textContent,l)?(u.popover!=null&&(Ue("beforetoggle",s),Ue("toggle",s)),u.onScroll!=null&&Ue("scroll",s),u.onScrollEnd!=null&&Ue("scrollend",s),u.onClick!=null&&(s.onclick=Lr),s=!0):s=!1,s||Si(r,!0)}function Vy(r){for(Gt=r.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Wn=!1;return;case 27:case 3:Wn=!0;return;default:Gt=Gt.return}}function ba(r){if(r!==Gt)return!1;if(!Ge)return Vy(r),Ge=!0,!1;var s=r.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||Dp(r.type,r.memoizedProps)),l=!l),l&&dt&&Si(r),Vy(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));dt=mw(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));dt=mw(r)}else s===27?(s=dt,ji(r.type)?(r=Up,Up=null,dt=r):dt=s):dt=Gt?Zn(r.stateNode.nextSibling):null;return!0}function ws(){dt=Gt=null,Ge=!1}function yf(){var r=wi;return r!==null&&(_n===null?_n=r:_n.push.apply(_n,r),wi=null),r}function Wo(r){wi===null?wi=[r]:wi.push(r)}var _f=P(null),Ss=null,Ir=null;function Ei(r,s,l){ee(_f,s._currentValue),s._currentValue=l}function $r(r){r._currentValue=_f.current,K(_f)}function bf(r,s,l){for(;r!==null;){var u=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,u!==null&&(u.childLanes|=s)):u!==null&&(u.childLanes&s)!==s&&(u.childLanes|=s),r===l)break;r=r.return}}function wf(r,s,l,u){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var m=p.dependencies;if(m!==null){var b=p.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=p;for(var O=0;O<s.length;O++)if(E.context===s[O]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),bf(m.return,l,r),u||(b=null);break e}m=E.next}}else if(p.tag===18){if(b=p.return,b===null)throw Error(i(341));b.lanes|=l,m=b.alternate,m!==null&&(m.lanes|=l),bf(b,l,r),b=null}else b=p.child;if(b!==null)b.return=p;else for(b=p;b!==null;){if(b===r){b=null;break}if(p=b.sibling,p!==null){p.return=b.return,b=p;break}b=b.return}p=b}}function wa(r,s,l,u){r=null;for(var p=s,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var b=p.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var E=p.type;Cn(p.pendingProps.value,b.value)||(r!==null?r.push(E):r=[E])}}else if(p===Ie.current){if(b=p.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(Sl):r=[Sl])}p=p.return}r!==null&&wf(s,r,l,u),s.flags|=262144}function su(r){for(r=r.firstContext;r!==null;){if(!Cn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Es(r){Ss=r,Ir=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Yt(r){return Gy(Ss,r)}function au(r,s){return Ss===null&&Es(r),Gy(r,s)}function Gy(r,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},Ir===null){if(r===null)throw Error(i(308));Ir=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else Ir=Ir.next=s;return l}var S1=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(l,u){r.push(u)}};this.abort=function(){s.aborted=!0,r.forEach(function(l){return l()})}},E1=t.unstable_scheduleCallback,k1=t.unstable_NormalPriority,Rt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sf(){return{controller:new S1,data:new Map,refCount:0}}function Jo(r){r.refCount--,r.refCount===0&&E1(k1,function(){r.controller.abort()})}var Zo=null,Ef=0,Sa=0,Ea=null;function x1(r,s){if(Zo===null){var l=Zo=[];Ef=0,Sa=Tp(),Ea={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Ef++,s.then(Yy,Yy),s}function Yy(){if(--Ef===0&&Zo!==null){Ea!==null&&(Ea.status="fulfilled");var r=Zo;Zo=null,Sa=0,Ea=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function T1(r,s){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return r.then(function(){u.status="fulfilled",u.value=s;for(var p=0;p<l.length;p++)(0,l[p])(s)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var Ky=H.S;H.S=function(r,s){Pb=tn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&x1(r,s),Ky!==null&&Ky(r,s)};var ks=P(null);function kf(){var r=ks.current;return r!==null?r:ot.pooledCache}function ou(r,s){s===null?ee(ks,ks.current):ee(ks,s.pool)}function Wy(){var r=kf();return r===null?null:{parent:Rt._currentValue,pool:r}}var ka=Error(i(460)),xf=Error(i(474)),lu=Error(i(542)),cu={then:function(){}};function Jy(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Zy(r,s,l){switch(l=r[l],l===void 0?r.push(s):l!==s&&(s.then(Lr,Lr),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Qy(r),r;default:if(typeof s.status=="string")s.then(Lr,Lr);else{if(r=ot,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=s,r.status="pending",r.then(function(u){if(s.status==="pending"){var p=s;p.status="fulfilled",p.value=u}},function(u){if(s.status==="pending"){var p=s;p.status="rejected",p.reason=u}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Qy(r),r}throw Ts=s,ka}}function xs(r){try{var s=r._init;return s(r._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ts=l,ka):l}}var Ts=null;function Xy(){if(Ts===null)throw Error(i(459));var r=Ts;return Ts=null,r}function Qy(r){if(r===ka||r===lu)throw Error(i(483))}var xa=null,Xo=0;function uu(r){var s=Xo;return Xo+=1,xa===null&&(xa=[]),Zy(xa,r,s)}function Qo(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function du(r,s){throw s.$$typeof===y?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function e_(r){function s(j,N){if(r){var z=j.deletions;z===null?(j.deletions=[N],j.flags|=16):z.push(N)}}function l(j,N){if(!r)return null;for(;N!==null;)s(j,N),N=N.sibling;return null}function u(j){for(var N=new Map;j!==null;)j.key!==null?N.set(j.key,j):N.set(j.index,j),j=j.sibling;return N}function p(j,N){return j=Dr(j,N),j.index=0,j.sibling=null,j}function m(j,N,z){return j.index=z,r?(z=j.alternate,z!==null?(z=z.index,z<N?(j.flags|=67108866,N):z):(j.flags|=67108866,N)):(j.flags|=1048576,N)}function b(j){return r&&j.alternate===null&&(j.flags|=67108866),j}function E(j,N,z,W){return N===null||N.tag!==6?(N=ff(z,j.mode,W),N.return=j,N):(N=p(N,z),N.return=j,N)}function O(j,N,z,W){var Se=z.type;return Se===S?Y(j,N,z.props.children,W,z.key):N!==null&&(N.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===I&&xs(Se)===N.type)?(N=p(N,z.props),Qo(N,z),N.return=j,N):(N=ru(z.type,z.key,z.props,null,j.mode,W),Qo(N,z),N.return=j,N)}function B(j,N,z,W){return N===null||N.tag!==4||N.stateNode.containerInfo!==z.containerInfo||N.stateNode.implementation!==z.implementation?(N=pf(z,j.mode,W),N.return=j,N):(N=p(N,z.children||[]),N.return=j,N)}function Y(j,N,z,W,Se){return N===null||N.tag!==7?(N=bs(z,j.mode,W,Se),N.return=j,N):(N=p(N,z),N.return=j,N)}function J(j,N,z){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=ff(""+N,j.mode,z),N.return=j,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case _:return z=ru(N.type,N.key,N.props,null,j.mode,z),Qo(z,N),z.return=j,z;case w:return N=pf(N,j.mode,z),N.return=j,N;case I:return N=xs(N),J(j,N,z)}if(Ne(N)||te(N))return N=bs(N,j.mode,z,null),N.return=j,N;if(typeof N.then=="function")return J(j,uu(N),z);if(N.$$typeof===A)return J(j,au(j,N),z);du(j,N)}return null}function F(j,N,z,W){var Se=N!==null?N.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return Se!==null?null:E(j,N,""+z,W);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _:return z.key===Se?O(j,N,z,W):null;case w:return z.key===Se?B(j,N,z,W):null;case I:return z=xs(z),F(j,N,z,W)}if(Ne(z)||te(z))return Se!==null?null:Y(j,N,z,W,null);if(typeof z.then=="function")return F(j,N,uu(z),W);if(z.$$typeof===A)return F(j,N,au(j,z),W);du(j,z)}return null}function G(j,N,z,W,Se){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return j=j.get(z)||null,E(N,j,""+W,Se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case _:return j=j.get(W.key===null?z:W.key)||null,O(N,j,W,Se);case w:return j=j.get(W.key===null?z:W.key)||null,B(N,j,W,Se);case I:return W=xs(W),G(j,N,z,W,Se)}if(Ne(W)||te(W))return j=j.get(z)||null,Y(N,j,W,Se,null);if(typeof W.then=="function")return G(j,N,z,uu(W),Se);if(W.$$typeof===A)return G(j,N,z,au(N,W),Se);du(N,W)}return null}function ge(j,N,z,W){for(var Se=null,Je=null,ye=N,De=N=0,He=null;ye!==null&&De<z.length;De++){ye.index>De?(He=ye,ye=null):He=ye.sibling;var Ze=F(j,ye,z[De],W);if(Ze===null){ye===null&&(ye=He);break}r&&ye&&Ze.alternate===null&&s(j,ye),N=m(Ze,N,De),Je===null?Se=Ze:Je.sibling=Ze,Je=Ze,ye=He}if(De===z.length)return l(j,ye),Ge&&jr(j,De),Se;if(ye===null){for(;De<z.length;De++)ye=J(j,z[De],W),ye!==null&&(N=m(ye,N,De),Je===null?Se=ye:Je.sibling=ye,Je=ye);return Ge&&jr(j,De),Se}for(ye=u(ye);De<z.length;De++)He=G(ye,j,De,z[De],W),He!==null&&(r&&He.alternate!==null&&ye.delete(He.key===null?De:He.key),N=m(He,N,De),Je===null?Se=He:Je.sibling=He,Je=He);return r&&ye.forEach(function(Bi){return s(j,Bi)}),Ge&&jr(j,De),Se}function ke(j,N,z,W){if(z==null)throw Error(i(151));for(var Se=null,Je=null,ye=N,De=N=0,He=null,Ze=z.next();ye!==null&&!Ze.done;
vendor: 3,458 bytes, line 9
9De++,Ze=z.next()){ye.index>De?(He=ye,ye=null):He=ye.sibling;var Bi=F(j,ye,Ze.value,W);if(Bi===null){ye===null&&(ye=He);break}r&&ye&&Bi.alternate===null&&s(j,ye),N=m(Bi,N,De),Je===null?Se=Bi:Je.sibling=Bi,Je=Bi,ye=He}if(Ze.done)return l(j,ye),Ge&&jr(j,De),Se;if(ye===null){for(;!Ze.done;De++,Ze=z.next())Ze=J(j,Ze.value,W),Ze!==null&&(N=m(Ze,N,De),Je===null?Se=Ze:Je.sibling=Ze,Je=Ze);return Ge&&jr(j,De),Se}for(ye=u(ye);!Ze.done;De++,Ze=z.next())Ze=G(ye,j,De,Ze.value,W),Ze!==null&&(r&&Ze.alternate!==null&&ye.delete(Ze.key===null?De:Ze.key),N=m(Ze,N,De),Je===null?Se=Ze:Je.sibling=Ze,Je=Ze);return r&&ye.forEach(function(IA){return s(j,IA)}),Ge&&jr(j,De),Se}function st(j,N,z,W){if(typeof z=="object"&&z!==null&&z.type===S&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case _:e:{for(var Se=z.key;N!==null;){if(N.key===Se){if(Se=z.type,Se===S){if(N.tag===7){l(j,N.sibling),W=p(N,z.props.children),W.return=j,j=W;break e}}else if(N.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===I&&xs(Se)===N.type){l(j,N.sibling),W=p(N,z.props),Qo(W,z),W.return=j,j=W;break e}l(j,N);break}else s(j,N);N=N.sibling}z.type===S?(W=bs(z.props.children,j.mode,W,z.key),W.return=j,j=W):(W=ru(z.type,z.key,z.props,null,j.mode,W),Qo(W,z),W.return=j,j=W)}return b(j);case w:e:{for(Se=z.key;N!==null;){if(N.key===Se)if(N.tag===4&&N.stateNode.containerInfo===z.containerInfo&&N.stateNode.implementation===z.implementation){l(j,N.sibling),W=p(N,z.children||[]),W.return=j,j=W;break e}else{l(j,N);break}else s(j,N);N=N.sibling}W=pf(z,j.mode,W),W.return=j,j=W}return b(j);case I:return z=xs(z),st(j,N,z,W)}if(Ne(z))return ge(j,N,z,W);if(te(z)){if(Se=te(z),typeof Se!="function")throw Error(i(150));return z=Se.call(z),ke(j,N,z,W)}if(typeof z.then=="function")return st(j,N,uu(z),W);if(z.$$typeof===A)return st(j,N,au(j,z),W);du(j,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,N!==null&&N.tag===6?(l(j,N.sibling),W=p(N,z),W.return=j,j=W):(l(j,N),W=ff(z,j.mode,W),W.return=j,j=W),b(j)):l(j,N)}return function(j,N,z,W){try{Xo=0;var Se=st(j,N,z,W);return xa=null,Se}catch(ye){if(ye===ka||ye===lu)throw ye;var Je=On(29,ye,null,j.mode);return Je.lanes=W,Je.return=j,Je}}}var Rs=e_(!0),t_=e_(!1),ki=!1;function Tf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rf(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function xi(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Ti(r,s,l){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(et&2)!==0){var p=u.pending;return p===null?s.next=s:(s.next=p.next,p.next=s),u.pending=s,s=nu(r),$y(r,null,l),s}return tu(r,u,s,l),nu(r)}function el(r,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var u=s.lanes;u&=r.pendingLanes,l|=u,s.lanes=l,Gv(r,l)}}function Af(r,s){var l=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?p=m=b:m=m.next=b,l=l.next}while(l!==null);m===null?p=m=s:m=m.next=s}else p=m=s;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},r.updateQueue=l;return}
vendor: 4,208 bytes, line 9
9r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=s:r.next=s,l.lastBaseUpdate=s}var Cf=!1;function tl(){if(Cf){var r=Ea;if(r!==null)throw r}}function nl(r,s,l,u){Cf=!1;var p=r.updateQueue;ki=!1;var m=p.firstBaseUpdate,b=p.lastBaseUpdate,E=p.shared.pending;if(E!==null){p.shared.pending=null;var O=E,B=O.next;O.next=null,b===null?m=B:b.next=B,b=O;var Y=r.alternate;Y!==null&&(Y=Y.updateQueue,E=Y.lastBaseUpdate,E!==b&&(E===null?Y.firstBaseUpdate=B:E.next=B,Y.lastBaseUpdate=O))}if(m!==null){var J=p.baseState;b=0,Y=B=O=null,E=m;do{var F=E.lane&-536870913,G=F!==E.lane;if(G?(Fe&F)===F:(u&F)===F){F!==0&&F===Sa&&(Cf=!0),Y!==null&&(Y=Y.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ge=r,ke=E;F=s;var st=l;switch(ke.tag){case 1:if(ge=ke.payload,typeof ge=="function"){J=ge.call(st,J,F);break e}J=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=ke.payload,F=typeof ge=="function"?ge.call(st,J,F):ge,F==null)break e;J=v({},J,F);break e;case 2:ki=!0}}F=E.callback,F!==null&&(r.flags|=64,G&&(r.flags|=8192),G=p.callbacks,G===null?p.callbacks=[F]:G.push(F))}else G={lane:F,tag:E.tag,payload:E.payload,callback:E.callback,next:null},Y===null?(B=Y=G,O=J):Y=Y.next=G,b|=F;if(E=E.next,E===null){if(E=p.shared.pending,E===null)break;G=E,E=G.next,G.next=null,p.lastBaseUpdate=G,p.shared.pending=null}}while(!0);Y===null&&(O=J),p.baseState=O,p.firstBaseUpdate=B,p.lastBaseUpdate=Y,m===null&&(p.shared.lanes=0),Pi|=b,r.lanes=b,r.memoizedState=J}}function n_(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function r_(r,s){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)n_(l[r],s)}var Ta=P(null),hu=P(0);function i_(r,s){r=Yr,ee(hu,r),ee(Ta,s),Yr=r|s.baseLanes}function Of(){ee(hu,Yr),ee(Ta,Ta.current)}function Pf(){Yr=hu.current,K(Ta),K(hu)}var Pn=P(null),Jn=null;function Ri(r){var s=r.alternate;ee(kt,kt.current&1),ee(Pn,r),Jn===null&&(s===null||Ta.current!==null||s.memoizedState!==null)&&(Jn=r)}function Mf(r){ee(kt,kt.current),ee(Pn,r),Jn===null&&(Jn=r)}function s_(r){r.tag===22?(ee(kt,kt.current),ee(Pn,r),Jn===null&&(Jn=r)):Ai()}function Ai(){ee(kt,kt.current),ee(Pn,Pn.current)}function Mn(r){K(Pn),Jn===r&&(Jn=null),K(kt)}var kt=P(0);function fu(r){for(var s=r;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||$p(l)||zp(l)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var zr=0,Le=null,rt=null,At=null,pu=!1,Ra=!1,As=!1,gu=0,rl=0,Aa=null,R1=0;function bt(){throw Error(i(321))}function Lf(r,s){if(s===null)return!1;for(var l=0;l<s.length&&l<r.length;l++)if(!Cn(r[l],s[l]))return!1;return!0}function Nf(r,s,l,u,p,m){return zr=m,Le=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,H.H=r===null||r.memoizedState===null?q_:Wf,As=!1,m=l(u,p),As=!1,Ra&&(m=o_(s,l,u,p)),a_(r),m}function a_(r){H.H=al;var s=rt!==null&&rt.next!==null;if(zr=0,At=rt=Le=null,pu=!1,rl=0,Aa=null,s)throw Error(i(300));r===null||Ct||(r=r.dependencies,r!==null&&su(r)&&(Ct=!0))}function o_(r,s,l,u){Le=r;var p=0;do{if(Ra&&(Aa=null),rl=0,Ra=!1,25<=p)throw Error(i(301));if(p+=1,At=rt=null,r.updateQueue!=null){var m=r.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}H.H=F_,m=s(l,u)}while(Ra);return m}function A1(){var r=H.H,s=r.useState()[0];return s=typeof s.then=="function"?il(s):s,r=r.useState()[0],(rt!==null?rt.memoizedState:null)!==r&&(Le.flags|=1024),s}function Df(){var r=gu!==0;return gu=0,r}function jf(r,s,l){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~l}function If(r){if(pu){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}pu=!1}zr=0,At=rt=Le=null,Ra=!1,rl=gu=0,Aa=null}function an(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Le.memoizedState=At=r:At=At.next=r,At}
vendor: 15,491 bytes, line 9
9function xt(){if(rt===null){var r=Le.alternate;r=r!==null?r.memoizedState:null}else r=rt.next;var s=At===null?Le.memoizedState:At.next;if(s!==null)At=s,rt=r;else{if(r===null)throw Le.alternate===null?Error(i(467)):Error(i(310));rt=r,r={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},At===null?Le.memoizedState=At=r:At=At.next=r}return At}function mu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function il(r){var s=rl;return rl+=1,Aa===null&&(Aa=[]),r=Zy(Aa,r,s),s=Le,(At===null?s.memoizedState:At.next)===null&&(s=s.alternate,H.H=s===null||s.memoizedState===null?q_:Wf),r}function vu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return il(r);if(r.$$typeof===A)return Yt(r)}throw Error(i(438,String(r)))}function $f(r){var s=null,l=Le.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var u=Le.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(s={data:u.data.map(function(p){return p.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=mu(),Le.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(r),u=0;u<r;u++)l[u]=X;return s.index++,l}function Ur(r,s){return typeof s=="function"?s(r):s}function yu(r){var s=xt();return zf(s,rt,r)}function zf(r,s,l){var u=r.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=l;var p=r.baseQueue,m=u.pending;if(m!==null){if(p!==null){var b=p.next;p.next=m.next,m.next=b}s.baseQueue=p=m,u.pending=null}if(m=r.baseState,p===null)r.memoizedState=m;else{s=p.next;var E=b=null,O=null,B=s,Y=!1;do{var J=B.lane&-536870913;if(J!==B.lane?(Fe&J)===J:(zr&J)===J){var F=B.revertLane;if(F===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),J===Sa&&(Y=!0);else if((zr&F)===F){B=B.next,F===Sa&&(Y=!0);continue}else J={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},O===null?(E=O=J,b=m):O=O.next=J,Le.lanes|=F,Pi|=F;J=B.action,As&&l(m,J),m=B.hasEagerState?B.eagerState:l(m,J)}else F={lane:J,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},O===null?(E=O=F,b=m):O=O.next=F,Le.lanes|=J,Pi|=J;B=B.next}while(B!==null&&B!==s);if(O===null?b=m:O.next=E,!Cn(m,r.memoizedState)&&(Ct=!0,Y&&(l=Ea,l!==null)))throw l;r.memoizedState=m,r.baseState=b,r.baseQueue=O,u.lastRenderedState=m}return p===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function Uf(r){var s=xt(),l=s.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=r;var u=l.dispatch,p=l.pending,m=s.memoizedState;if(p!==null){l.pending=null;var b=p=p.next;do m=r(m,b.action),b=b.next;while(b!==p);Cn(m,s.memoizedState)||(Ct=!0),s.memoizedState=m,s.baseQueue===null&&(s.baseState=m),l.lastRenderedState=m}return[m,u]}function l_(r,s,l){var u=Le,p=xt(),m=Ge;if(m){if(l===void 0)throw Error(i(407));l=l()}else l=s();var b=!Cn((rt||p).memoizedState,l);if(b&&(p.memoizedState=l,Ct=!0),p=p.queue,Ff(d_.bind(null,u,p,r),[r]),p.getSnapshot!==s||b||At!==null&&At.memoizedState.tag&1){if(u.flags|=2048,Ca(9,{destroy:void 0},u_.bind(null,u,p,l,s),null),ot===null)throw Error(i(349));m||(zr&127)!==0||c_(u,s,l)}return l}function c_(r,s,l){r.flags|=16384,r={getSnapshot:s,value:l},s=Le.updateQueue,s===null?(s=mu(),Le.updateQueue=s,s.stores=[r]):(l=s.stores,l===null?s.stores=[r]:l.push(r))}function u_(r,s,l,u){s.value=l,s.getSnapshot=u,h_(s)&&f_(r)}function d_(r,s,l){return l(function(){h_(s)&&f_(r)})}function h_(r){var s=r.getSnapshot;r=r.value;try{var l=s();return!Cn(r,l)}catch{return!0}}function f_(r){var s=_s(r,2);s!==null&&bn(s,r,2)}function Bf(r){var s=an();if(typeof r=="function"){var l=r;if(r=l(),As){vi(!0);try{l()}finally{vi(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:r},s}function p_(r,s,l,u){return r.baseState=l,zf(r,rt,typeof u=="function"?u:Ur)}function C1(r,s,l,u,p){if(wu(r))throw Error(i(485));if(r=s.action,r!==null){var m={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};H.T!==null?l(!0):m.isTransition=!1,u(m),l=s.pending,l===null?(m.next=s.pending=m,g_(s,m)):(m.next=l.next,s.pending=l.next=m)}}function g_(r,s){var l=s.action,u=s.payload,p=r.state;if(s.isTransition){var m=H.T,b={};H.T=b;try{var E=l(p,u),O=H.S;O!==null&&O(b,E),m_(r,s,E)}catch(B){qf(r,s,B)}finally{m!==null&&b.types!==null&&(m.types=b.types),H.T=m}}else try{m=l(p,u),m_(r,s,m)}catch(B){qf(r,s,B)}}function m_(r,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){v_(r,s,u)},function(u){return qf(r,s,u)}):v_(r,s,l)}function v_(r,s,l){s.status="fulfilled",s.value=l,y_(s),r.state=l,s=r.pending,s!==null&&(l=s.next,l===s?r.pending=null:(l=l.next,s.next=l,g_(r,l)))}function qf(r,s,l){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do s.status="rejected",s.reason=l,y_(s),s=s.next;while(s!==u)}r.action=null}function y_(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function __(r,s){return s}function b_(r,s){if(Ge){var l=ot.formState;if(l!==null){e:{var u=Le;if(Ge){if(dt){t:{for(var p=dt,m=Wn;p.nodeType!==8;){if(!m){p=null;break t}if(p=Zn(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){dt=Zn(p.nextSibling),u=p.data==="F!";break e}}Si(u)}u=!1}u&&(s=l[0])}}return l=an(),l.memoizedState=l.baseState=s,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:__,lastRenderedState:s},l.queue=u,l=z_.bind(null,Le,u),u.dispatch=l,u=Bf(!1),m=Kf.bind(null,Le,!1,u.queue),u=an(),p={state:s,dispatch:null,action:r,pending:null},u.queue=p,l=C1.bind(null,Le,p,m,l),p.dispatch=l,u.memoizedState=r,[s,l,!1]}function w_(r){var s=xt();return S_(s,rt,r)}function S_(r,s,l){if(s=zf(r,s,__)[0],r=yu(Ur)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var u=il(s)}catch(b){throw b===ka?lu:b}else u=s;s=xt();var p=s.queue,m=p.dispatch;return l!==s.memoizedState&&(Le.flags|=2048,Ca(9,{destroy:void 0},O1.bind(null,p,l),null)),[u,m,r]}function O1(r,s){r.action=s}function E_(r){var s=xt(),l=rt;if(l!==null)return S_(s,l,r);xt(),s=s.memoizedState,l=xt();var u=l.queue.dispatch;return l.memoizedState=r,[s,u,!1]}function Ca(r,s,l,u){return r={tag:r,create:l,deps:u,inst:s,next:null},s=Le.updateQueue,s===null&&(s=mu(),Le.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=r.next=r:(u=l.next,l.next=r,r.next=u,s.lastEffect=r),r}function k_(){return xt().memoizedState}function _u(r,s,l,u){var p=an();Le.flags|=r,p.memoizedState=Ca(1|s,{destroy:void 0},l,u===void 0?null:u)}function bu(r,s,l,u){var p=xt();u=u===void 0?null:u;var m=p.memoizedState.inst;rt!==null&&u!==null&&Lf(u,rt.memoizedState.deps)?p.memoizedState=Ca(s,m,l,u):(Le.flags|=r,p.memoizedState=Ca(1|s,m,l,u))}function x_(r,s){_u(8390656,8,r,s)}function Ff(r,s){bu(2048,8,r,s)}function P1(r){Le.flags|=4;var s=Le.updateQueue;if(s===null)s=mu(),Le.updateQueue=s,s.events=[r];else{var l=s.events;l===null?s.events=[r]:l.push(r)}}function T_(r){var s=xt().memoizedState;return P1({ref:s,nextImpl:r}),function(){if((et&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function R_(r,s){return bu(4,2,r,s)}function A_(r,s){return bu(4,4,r,s)}function C_(r,s){if(typeof s=="function"){r=r();var l=s(r);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function O_(r,s,l){l=l!=null?l.concat([r]):null,bu(4,4,C_.bind(null,s,r),l)}function Hf(){}function P_(r,s){var l=xt();s=s===void 0?null:s;var u=l.memoizedState;return s!==null&&Lf(s,u[1])?u[0]:(l.memoizedState=[r,s],r)}function M_(r,s){var l=xt();s=s===void 0?null:s;var u=l.memoizedState;if(s!==null&&Lf(s,u[1]))return u[0];if(u=r(),As){vi(!0);try{r()}finally{vi(!1)}}return l.memoizedState=[u,s],u}function Vf(r,s,l){return l===void 0||(zr&1073741824)!==0&&(Fe&261930)===0?r.memoizedState=s:(r.memoizedState=l,r=Lb(),Le.lanes|=r,Pi|=r,l)}function L_(r,s,l,u){return Cn(l,s)?l:Ta.current!==null?(r=Vf(r,l,u),Cn(r,s)||(Ct=!0),r):(zr&42)===0||(zr&1073741824)!==0&&(Fe&261930)===0?(Ct=!0,r.memoizedState=l):(r=Lb(),Le.lanes|=r,Pi|=r,s)}function N_(r,s,l,u,p){var m=Z.p;Z.p=m!==0&&8>m?m:8;var b=H.T,E={};H.T=E,Kf(r,!1,s,l);try{var O=p(),B=H.S;if(B!==null&&B(E,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var Y=T1(O,u);sl(r,s,Y,Dn(r))}else sl(r,s,u,Dn(r))}catch(J){sl(r,s,{then:function(){},status:"rejected",reason:J},Dn())}finally{Z.p=m,b!==null&&E.types!==null&&(b.types=E.types),H.T=b}}function M1(){}function Gf(r,s,l,u){if(r.tag!==5)throw Error(i(476));var p=D_(r).queue;N_(r,p,s,ue,l===null?M1:function(){return j_(r),l(u)})}function D_(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:ue},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:l},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function j_(r){var s=D_(r);s.next===null&&(s=r.alternate.memoizedState),sl(r,s.next.queue,{},Dn())}function Yf(){return Yt(Sl)}function I_(){return xt().memoizedState}function $_(){return xt().memoizedState}function L1(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var l=Dn();r=xi(l);var u=Ti(s,r,l);u!==null&&(bn(u,s,l),el(u,s,l)),s={cache:Sf()},r.payload=s;return}s=s.return}}function N1(r,s,l){var u=Dn();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},wu(r)?U_(s,l):(l=df(r,s,l,u),l!==null&&(bn(l,r,u),B_(l,s,u)))}function z_(r,s,l){var u=Dn();sl(r,s,l,u)}function sl(r,s,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(wu(r))U_(s,p);else{var m=r.alternate;if(r.lanes===0&&(m===null||m.lanes===0)&&(m=s.lastRenderedReducer,m!==null))try{var b=s.lastRenderedState,E=m(b,l);if(p.hasEagerState=!0,p.eagerState=E,Cn(E,b))return tu(r,s,p,0),ot===null&&eu(),!1}catch{}if(l=df(r,s,p,u),l!==null)return bn(l,r,u),B_(l,s,u),!0}return!1}function Kf(r,s,l,u){if(u={lane:2,revertLane:Tp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},wu(r)){if(s)throw Error(i(479))}else s=df(r,l,u,2),s!==null&&bn(s,r,2)}function wu(r){var s=r.alternate;return r===Le||s!==null&&s===Le}function U_(r,s){Ra=pu=!0;var l=r.pending;l===null?s.next=s:(s.next=l.next,l.next=s),r.pending=s}function B_(r,s,l){if((l&4194048)!==0){var u=s.lanes;u&=r.pendingLanes,l|=u,s.lanes=l,Gv(r,l)}}var al={readContext:Yt,use:vu,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};al.useEffectEvent=bt;var q_={readContext:Yt,use:vu,useCallback:function(r,s){return an().memoizedState=[r,s===void 0?null:s],r},useContext:Yt,useEffect:x_,useImperativeHandle:function(r,s,l){l=l!=null?l.concat([r]):null,_u(4194308,4,C_.bind(null,s,r),l)},useLayoutEffect:function(r,s){return _u(4194308,4,r,s)},useInsertionEffect:function(r,s){_u(4,2,r,s)},useMemo:function(r,s){var l=an();s=s===void 0?null:s;var u=r();if(As){vi(!0);try{r()}finally{vi(!1)}}return l.memoizedState=[u,s],u},useReducer:function(r,s,l){var u=an();if(l!==void 0){var p=l(s);if(As){vi(!0);try{l(s)}finally{vi(!1)}}}else p=s;return u.memoizedState=u.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},u.queue=r,r=r.dispatch=N1.bind(null,Le,r),[u.memoizedState,r]},useRef:function(r){var s=an();return r={current:r},s.memoizedState=r},useState:function(r){r=Bf(r);var s=r.queue,l=z_.bind(null,Le,s);return s.dispatch=l,[r.memoizedState,l]},useDebugValue:Hf,useDeferredValue:function(r,s){var l=an();return Vf(l,r,s)},useTransition:function(){var r=Bf(!1);return r=N_.bind(null,Le,r.queue,!0,!1),an().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,l){var u=Le,p=an();if(Ge){if(l===void 0)throw Error(i(407));l=l()}else{if(l=s(),ot===null)throw Error(i(349));(Fe&127)!==0||c_(u,s,l)}p.memoizedState=l;var m={value:l,getSnapshot:s};return p.queue=m,x_(d_.bind(null,u,m,r),[r]),u.flags|=2048,Ca(9,{destroy:void 0},u_.bind(null,u,m,l,s),null),l},useId:function(){var r=an(),s=ot.identifierPrefix;if(Ge){var l=_r,u=yr;l=(u&~(1<<32-An(u)-1)).toString(32)+l,s="_"+s+"R_"+l,l=gu++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=R1++,s="_"+s+"r_"+l.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:Yf,useFormState:b_,useActionState:b_,useOptimistic:function(r){var s=an();s.memoizedState=s.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=Kf.bind(null,Le,!0,l),l.dispatch=s,[r,s]},useMemoCache:$f,useCacheRefresh:function(){return an().memoizedState=L1.bind(null,Le)},useEffectEvent:function(r){var s=an(),l={impl:r};return s.memoizedState=l,function(){if((et&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},Wf={readContext:Yt,use:vu,useCallback:P_,useContext:Yt,useEffect:Ff,useImperativeHandle:O_,useInsertionEffect:R_,useLayoutEffect:A_,useMemo:M_,useReducer:yu,useRef:k_,useState:function(){return yu(Ur)},useDebugValue:Hf,useDeferredValue:function(r,s){var l=xt();return L_(l,rt.memoizedState,r,s)},useTransition:function(){var r=yu(Ur)[0],s=xt().memoizedState;return[typeof r=="boolean"?r:il(r),s]},useSyncExternalStore:l_,useId:I_,useHostTransitionStatus:Yf,useFormState:w_,useActionState:w_,useOptimistic:function(r,s){var l=xt();return p_(l,rt,r,s)},useMemoCache:$f,useCacheRefresh:$_};Wf.useEffectEvent=T_;var F_={readContext:Yt,use:vu,useCallback:P_,useContext:Yt,useEffect:Ff,useImperativeHandle:O_,useInsertionEffect:R_,useLayoutEffect:A_,useMemo:M_,useReducer:Uf,useRef:k_,useState:function(){return Uf(Ur)},useDebugValue:Hf,useDeferredValue:function(r,s){var l=xt();return rt===null?Vf(l,r,s):L_(l,rt.memoizedState,r,s)},useTransition:function(){var r=Uf(Ur)[0],s=xt().memoizedState;return[typeof r=="boolean"?r:il(r),s]},useSyncExternalStore:l_,useId:I_,useHostTransitionStatus:Yf,useFormState:E_,useActionState:E_,useOptimistic:function(r,s){var l=xt();return rt!==null?p_(l,rt,r,s):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:$f,useCacheRefresh:$_};F_.useEffectEvent=T_;function Jf(r,s,l,u){s=r.memoizedState,l=l(u,s),l=l==null?s:v({},s,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var Zf={enqueueSetState:function(r,s,l){r=r._reactInternals;var u=Dn(),p=xi(u);p.payload=s,l!=null&&(p.callback=l),s=Ti(r,p,u),s!==null&&(bn(s,r,u),el(s,r,u))},enqueueReplaceState:function(r,s,l){r=r._reactInternals;var u=Dn(),p=xi(u);p.tag=1,p.payload=s,l!=null&&(p.callback=l),s=Ti(r,p,u),s!==null&&(bn(s,r,u),el(s,r,u))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var l=Dn(),u=xi(l);u.tag=2,s!=null&&(u.callback=s),s=Ti(r,u,l),s!==null&&(bn(s,r,l),el(s,r,l))}};function H_(r,s,l,u,p,m,b){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,m,b):s.prototype&&s.prototype.isPureReactComponent?!Go(l,u)||!Go(p,m):!0}function V_(r,s,l,u){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,u),t
vendor: 12,321 bytes, line 9
9ypeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,u),s.state!==r&&Zf.enqueueReplaceState(s,s.state,null)}function Cs(r,s){var l=s;if("ref"in s){l={};for(var u in s)u!=="ref"&&(l[u]=s[u])}if(r=r.defaultProps){l===s&&(l=v({},l));for(var p in r)l[p]===void 0&&(l[p]=r[p])}return l}function G_(r){Qc(r)}function Y_(r){console.error(r)}function K_(r){Qc(r)}function Su(r,s){try{var l=r.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(u){setTimeout(function(){throw u})}}function W_(r,s,l){try{var u=r.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Xf(r,s,l){return l=xi(l),l.tag=3,l.payload={element:null},l.callback=function(){Su(r,s)},l}function J_(r){return r=xi(r),r.tag=3,r}function Z_(r,s,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var m=u.value;r.payload=function(){return p(m)},r.callback=function(){W_(s,l,u)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(r.callback=function(){W_(s,l,u),typeof p!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function D1(r,s,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(s=l.alternate,s!==null&&wa(s,l,p,!0),l=Pn.current,l!==null){switch(l.tag){case 31:case 13:return Jn===null?Nu():l.alternate===null&&wt===0&&(wt=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===cu?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([u]):s.add(u),Ep(r,u,p)),!1;case 22:return l.flags|=65536,u===cu?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([u]):l.add(u)),Ep(r,u,p)),!1}throw Error(i(435,l.tag))}return Ep(r,u,p),Nu(),!1}if(Ge)return s=Pn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=p,u!==vf&&(r=Error(i(422),{cause:u}),Wo(Gn(r,l)))):(u!==vf&&(s=Error(i(423),{cause:u}),Wo(Gn(s,l))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,u=Gn(u,l),p=Xf(r.stateNode,u,p),Af(r,p),wt!==4&&(wt=2)),!1;var m=Error(i(520),{cause:u});if(m=Gn(m,l),pl===null?pl=[m]:pl.push(m),wt!==4&&(wt=2),s===null)return!0;u=Gn(u,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,r=p&-p,l.lanes|=r,r=Xf(l.stateNode,u,r),Af(l,r),!1;case 1:if(s=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Mi===null||!Mi.has(m))))return l.flags|=65536,p&=-p,l.lanes|=p,p=J_(p),Z_(p,r,l,u),Af(l,p),!1}l=l.return}while(l!==null);return!1}var Qf=Error(i(461)),Ct=!1;function Kt(r,s,l,u){s.child=r===null?t_(s,null,l,u):Rs(s,r.child,l,u)}function X_(r,s,l,u,p){l=l.render;var m=s.ref;if("ref"in u){var b={};for(var E in u)E!=="ref"&&(b[E]=u[E])}else b=u;return Es(s),u=Nf(r,s,l,b,m,p),E=Df(),r!==null&&!Ct?(jf(r,s,p),Br(r,s,p)):(Ge&&E&&gf(s),s.flags|=1,Kt(r,s,u,p),s.child)}function Q_(r,s,l,u,p){if(r===null){var m=l.type;return typeof m=="function"&&!hf(m)&&m.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=m,eb(r,s,m,u,p)):(r=ru(l.type,null,u,s,s.mode,p),r.ref=s.ref,r.return=s,s.child=r)}if(m=r.child,!op(r,p)){var b=m.memoizedProps;if(l=l.compare,l=l!==null?l:Go,l(b,u)&&r.ref===s.ref)return Br(r,s,p)}return s.flags|=1,r=Dr(m,u),r.ref=s.ref,r.return=s,s.child=r}function eb(r,s,l,u,p){if(r!==null){var m=r.memoizedProps;if(Go(m,u)&&r.ref===s.ref)if(Ct=!1,s.pendingProps=u=m,op(r,p))(r.flags&131072)!==0&&(Ct=!0);else return s.lanes=r.lanes,Br(r,s,p)}return ep(r,s,l,u,p)}function tb(r,s,l,u){var p=u.children,m=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((s.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,r!==null){for(u=s.child=r.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~m}else u=0,s.child=null;return nb(r,s,m,l,u)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&ou(s,m!==null?m.cachePool:null),m!==null?i_(s,m):Of(),s_(s);else return u=s.lanes=536870912,nb(r,s,m!==null?m.baseLanes|l:l,l,u)}else m!==null?(ou(s,m.cachePool),i_(s,m),Ai(),s.memoizedState=null):(r!==null&&ou(s,null),Of(),Ai());return Kt(r,s,p,l),s.child}function ol(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function nb(r,s,l,u,p){var m=kf();return m=m===null?null:{parent:Rt._currentValue,pool:m},s.memoizedState={baseLanes:l,cachePool:m},r!==null&&ou(s,null),Of(),s_(s),r!==null&&wa(r,s,u,!0),s.childLanes=p,null}function Eu(r,s){return s=xu({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function rb(r,s,l){return Rs(s,r.child,null,l),r=Eu(s,s.pendingProps),r.flags|=2,Mn(s),s.memoizedState=null,r}function j1(r,s,l){var u=s.pendingProps,p=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(Ge){if(u.mode==="hidden")return r=Eu(s,u),s.lanes=536870912,ol(null,r);if(Mf(s),(r=dt)?(r=gw(r,Wn),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:bi!==null?{id:yr,overflow:_r}:null,retryLane:536870912,hydrationErrors:null},l=Uy(r),l.return=s,s.child=l,Gt=s,dt=null)):r=null,r===null)throw Si(s);return s.lanes=536870912,null}return Eu(s,u)}var m=r.memoizedState;if(m!==null){var b=m.dehydrated;if(Mf(s),p)if(s.flags&256)s.flags&=-257,s=rb(r,s,l);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(Ct||wa(r,s,l,!1),p=(l&r.childLanes)!==0,Ct||p){if(u=ot,u!==null&&(b=Yv(u,l),b!==0&&b!==m.retryLane))throw m.retryLane=b,_s(r,b),bn(u,r,b),Qf;Nu(),s=rb(r,s,l)}else r=m.treeContext,dt=Zn(b.nextSibling),Gt=s,Ge=!0,wi=null,Wn=!1,r!==null&&Fy(s,r),s=Eu(s,u),s.flags|=4096;return s}return r=Dr(r.child,{mode:u.mode,children:u.children}),r.ref=s.ref,s.child=r,r.return=s,r}function ku(r,s){var l=s.ref;if(l===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(i(284));(r===null||r.ref!==l)&&(s.flags|=4194816)}}function ep(r,s,l,u,p){return Es(s),l=Nf(r,s,l,u,void 0,p),u=Df(),r!==null&&!Ct?(jf(r,s,p),Br(r,s,p)):(Ge&&u&&gf(s),s.flags|=1,Kt(r,s,l,p),s.child)}function ib(r,s,l,u,p,m){return Es(s),s.updateQueue=null,l=o_(s,u,l,p),a_(r),u=Df(),r!==null&&!Ct?(jf(r,s,m),Br(r,s,m)):(Ge&&u&&gf(s),s.flags|=1,Kt(r,s,l,m),s.child)}function sb(r,s,l,u,p){if(Es(s),s.stateNode===null){var m=va,b=l.contextType;typeof b=="object"&&b!==null&&(m=Yt(b)),m=new l(u,m),s.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Zf,s.stateNode=m,m._reactInternals=s,m=s.stateNode,m.props=u,m.state=s.memoizedState,m.refs={},Tf(s),b=l.contextType,m.context=typeof b=="object"&&b!==null?Yt(b):va,m.state=s.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(Jf(s,l,b,u),m.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&Zf.enqueueReplaceState(m,m.state,null),nl(s,u,m,p),tl(),m.state=s.memoizedState),typeof m.componentDidMount=="function"&&(s.flags|=4194308),u=!0}else if(r===null){m=s.stateNode;var E=s.memoizedProps,O=Cs(l,E);m.props=O;var B=m.context,Y=l.contextType;b=va,typeof Y=="object"&&Y!==null&&(b=Yt(Y));var J=l.getDerivedStateFromProps;Y=typeof J=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=s.pendingProps!==E,Y||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||B!==b)&&V_(s,m,u,b),ki=!1;var F=s.memoizedState;m.state=F,nl(s,u,m,p),tl(),B=s.memoizedState,E||F!==B||ki?(typeof J=="function"&&(Jf(s,l,J,u),B=s.memoizedState),(O=ki||H_(s,l,O,u,F,B,b))?(Y||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(s.flags|=4194308)):(typeof m.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=u,s.memoizedState=B),m.props=u,m.state=B,m.context=b,u=O):(typeof m.componentDidMount=="function"&&(s.flags|=4194308),u=!1)}else{m=s.stateNode,Rf(r,s),b=s.memoizedProps,Y=Cs(l,b),m.props=Y,J=s.pendingProps,F=m.context,B=l.contextType,O=va,typeof B=="object"&&B!==null&&(O=Yt(B)),E=l.getDerivedStateFromProps,(B=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==J||F!==O)&&V_(s,m,u,O),ki=!1,F=s.memoizedState,m.state=F,nl(s,u,m,p),tl();var G=s.memoizedState;b!==J||F!==G||ki||r!==null&&r.dependencies!==null&&su(r.dependencies)?(typeof E=="function"&&(Jf(s,l,E,u),G=s.memoizedState),(Y=ki||H_(s,l,Y,u,F,G,O)||r!==null&&r.dependencies!==null&&su(r.dependencies))?(B||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,G,O),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,G,O)),typeof m.componentDidUpdate=="function"&&(s.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===r.memoizedProps&&F===r.memoizedState||(s.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===r.memoizedProps&&F===r.memoizedState||(s.flags|=1024),s.memoizedProps=u,s.memoizedState=G),m.props=u,m.state=G,m.context=O,u=Y):(typeof m.componentDidUpdate!="function"||b===r.memoizedProps&&F===r.memoizedState||(s.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===r.memoizedProps&&F===r.memoizedState||(s.flags|=1024),u=!1)}return m=u,ku(r,s),u=(s.flags&128)!==0,m||u?(m=s.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:m.render(),s.flags|=1,r!==null&&u?(s.child=Rs(s,r.child,null,p),s.child=Rs(s,null,l,p)):Kt(r,s,l,p),s.memoizedState=m.state,r=s.child):r=Br(r,s,p),r}function ab(r,s,l,u){return ws(),s.flags|=256,Kt(r,s,l,u),s.child}var tp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function np(r){return{baseLanes:r,cachePool:Wy()}}function rp(r,s,l){return r=r!==null?r.childLanes&~l:0,s&&(r|=Nn),r}function ob(r,s,l){var u=s.pendingProps,p=!1,m=(s.flags&128)!==0,b;if((b=m)||(b=r!==null&&r.memoizedState===null?!1:(kt.current&2)!==0),b&&(p=!0,s.flags&=-129),b=(s.flags&32)!==0,s.flags&=-33,r===null){if(Ge){if(p?Ri(s):Ai(),(r=dt)?(r=gw(r,Wn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:bi!==null?{id:yr,overflow:_r}:null,retryLane:536870912,hydrationErrors:null},l=Uy(r),l.return=s,s.child=l,Gt=s,dt=null)):r=null,r===null)throw Si(s);return zp(r)?s.lanes=32:s.lanes=536870912,null}var E=u.children;return u=u.fallback,p?(Ai(),p=s.mode,E=xu({mode:"hidden",children:E},p),u=bs(u,p,l,null),E.return=s,u.return=s,E.sibling=u,s.child=E,u=s.child,u.memoizedState=np(l),u.childLanes=rp(r,b,l),s.memoizedState=tp,ol(null,u)):(Ri(s),ip(s,E))}var O=r.memoizedState;if(O!==null&&(E=O.dehydrated,E!==null)){if(m)s.flags&256?(Ri(s),s.flags&=-257,s=sp(r,s,l)):s.memoizedState!==null?(Ai(),s.child=r.child,s.flags|=128,s=null):(Ai(),E=u.fallback,p=s.mode,u=xu({mode:"visible",children:u.children},p),E=bs(E,p,l,null),E.flags|=2,u.return=s,E.return=s,u.sibling=E,s.child=u,Rs(s,r.child,null,l),u=s.child,u.memoizedState=np(l),u.childLanes=rp(r,b,l),s.memoizedState=tp,s=ol(null,u));else if(Ri(s),zp(E)){if(b=E.nextSibling&&E.nextSibling.dataset,b)var B=b.dgst;b=B,u=Error(i(419)),u.stack="",u.digest=b,Wo({value:u,source:null,stack:null}),s=sp(r,s,l)}else if(Ct||wa(r,s,l,!1),b=(l&r.childLanes)!==0,Ct||b){if(b=ot,b!==null&&(u=Yv(b,l),u!==0&&u!==O.retryLane))throw O.retryLane=u,_s(r,u),bn(b,r,u),Qf;$p(E)||Nu(),s=sp(r,s,l)}else $p(E)?(s.flags|=192,s.child=r.child,s=null):(r=O.treeContext,dt=Zn(E.nextSibling),Gt=s,Ge=!0,wi=null,Wn=!1,r!==null&&Fy(s,r),s=ip(s,u.children),s.flags|=4096);return s}
vendor: 3,408 bytes, line 9
9return p?(Ai(),E=u.fallback,p=s.mode,O=r.child,B=O.sibling,u=Dr(O,{mode:"hidden",children:u.children}),u.subtreeFlags=O.subtreeFlags&65011712,B!==null?E=Dr(B,E):(E=bs(E,p,l,null),E.flags|=2),E.return=s,u.return=s,u.sibling=E,s.child=u,ol(null,u),u=s.child,E=r.child.memoizedState,E===null?E=np(l):(p=E.cachePool,p!==null?(O=Rt._currentValue,p=p.parent!==O?{parent:O,pool:O}:p):p=Wy(),E={baseLanes:E.baseLanes|l,cachePool:p}),u.memoizedState=E,u.childLanes=rp(r,b,l),s.memoizedState=tp,ol(r.child,u)):(Ri(s),l=r.child,r=l.sibling,l=Dr(l,{mode:"visible",children:u.children}),l.return=s,l.sibling=null,r!==null&&(b=s.deletions,b===null?(s.deletions=[r],s.flags|=16):b.push(r)),s.child=l,s.memoizedState=null,l)}function ip(r,s){return s=xu({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function xu(r,s){return r=On(22,r,null,s),r.lanes=0,r}function sp(r,s,l){return Rs(s,r.child,null,l),r=ip(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function lb(r,s,l){r.lanes|=s;var u=r.alternate;u!==null&&(u.lanes|=s),bf(r.return,s,l)}function ap(r,s,l,u,p,m){var b=r.memoizedState;b===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:m}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=u,b.tail=l,b.tailMode=p,b.treeForkCount=m)}function cb(r,s,l){var u=s.pendingProps,p=u.revealOrder,m=u.tail;u=u.children;var b=kt.current,E=(b&2)!==0;if(E?(b=b&1|2,s.flags|=128):b&=1,ee(kt,b),Kt(r,s,u,l),u=Ge?Ko:0,!E&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&lb(r,l,s);else if(r.tag===19)lb(r,l,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case"forwards":for(l=s.child,p=null;l!==null;)r=l.alternate,r!==null&&fu(r)===null&&(p=l),l=l.sibling;l=p,l===null?(p=s.child,s.child=null):(p=l.sibling,l.sibling=null),ap(s,!1,p,l,m,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=s.child,s.child=null;p!==null;){if(r=p.alternate,r!==null&&fu(r)===null){s.child=p;break}r=p.sibling,p.sibling=l,l=p,p=r}ap(s,!0,l,null,m,u);break;case"together":ap(s,!1,null,null,void 0,u);break;default:s.memoizedState=null}return s.child}function Br(r,s,l){if(r!==null&&(s.dependencies=r.dependencies),Pi|=s.lanes,(l&s.childLanes)===0)if(r!==null){if(wa(r,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(i(153));if(s.child!==null){for(r=s.child,l=Dr(r,r.pendingProps),s.child=l,l.return=s;r.sibling!==null;)r=r.sibling,l=l.sibling=Dr(r,r.pendingProps),l.return=s;l.sibling=null}return s.child}function op(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&su(r)))}function I1(r,s,l){switch(s.tag){case 3:Ye(s,s.stateNode.containerInfo),Ei(s,Rt,r.memoizedState.cache),ws();break;case 27:case 5:hn(s);break;case 4:Ye(s,s.stateNode.containerInfo);break;case 10:Ei(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Mf(s),null;break;case 13:var u=s.memoizedState;if(u!==null)return u.dehydrated!==null?(Ri(s),s.flags|=128,null):(l&s.child.childLanes)!==0?ob(r,s,l):(Ri(s),r=Br(r,s,l),r!==null?r.sibling:null);Ri(s);break;case 19:var p=(r.flags&128)!==0;if(u=(l&s.childLanes)!==0,u||(wa(r,s,l,!1),u=(l&s.childLanes)!==0),p){
vendor: 4,706 bytes, line 9
9if(u)return cb(r,s,l);s.flags|=128}if(p=s.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),ee(kt,kt.current),u)break;return null;case 22:return s.lanes=0,tb(r,s,l,s.pendingProps);case 24:Ei(s,Rt,r.memoizedState.cache)}return Br(r,s,l)}function ub(r,s,l){if(r!==null)if(r.memoizedProps!==s.pendingProps)Ct=!0;else{if(!op(r,l)&&(s.flags&128)===0)return Ct=!1,I1(r,s,l);Ct=(r.flags&131072)!==0}else Ct=!1,Ge&&(s.flags&1048576)!==0&&qy(s,Ko,s.index);switch(s.lanes=0,s.tag){case 16:e:{var u=s.pendingProps;if(r=xs(s.elementType),s.type=r,typeof r=="function")hf(r)?(u=Cs(r,u),s.tag=1,s=sb(null,s,r,u,l)):(s.tag=0,s=ep(null,s,r,u,l));else{if(r!=null){var p=r.$$typeof;if(p===M){s.tag=11,s=X_(null,s,r,u,l);break e}else if(p===L){s.tag=14,s=Q_(null,s,r,u,l);break e}}throw s=pe(r)||r,Error(i(306,s,""))}}return s;case 0:return ep(r,s,s.type,s.pendingProps,l);case 1:return u=s.type,p=Cs(u,s.pendingProps),sb(r,s,u,p,l);case 3:e:{if(Ye(s,s.stateNode.containerInfo),r===null)throw Error(i(387));u=s.pendingProps;var m=s.memoizedState;p=m.element,Rf(r,s),nl(s,u,null,l);var b=s.memoizedState;if(u=b.cache,Ei(s,Rt,u),u!==m.cache&&wf(s,[Rt],l,!0),tl(),u=b.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:b.cache},s.updateQueue.baseState=m,s.memoizedState=m,s.flags&256){s=ab(r,s,u,l);break e}else if(u!==p){p=Gn(Error(i(424)),s),Wo(p),s=ab(r,s,u,l);break e}else for(r=s.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,dt=Zn(r.firstChild),Gt=s,Ge=!0,wi=null,Wn=!0,l=t_(s,null,u,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ws(),u===p){s=Br(r,s,l);break e}Kt(r,s,u,l)}s=s.child}return s;case 26:return ku(r,s),r===null?(l=ww(s.type,null,s.pendingProps,null))?s.memoizedState=l:Ge||(l=s.type,r=s.pendingProps,u=Bu(Te.current).createElement(l),u[Vt]=s,u[pn]=r,Wt(u,l,r),zt(u),s.stateNode=u):s.memoizedState=ww(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return hn(s),r===null&&Ge&&(u=s.stateNode=yw(s.type,s.pendingProps,Te.current),Gt=s,Wn=!0,p=dt,ji(s.type)?(Up=p,dt=Zn(u.firstChild)):dt=p),Kt(r,s,s.pendingProps.children,l),ku(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&Ge&&((p=u=dt)&&(u=fA(u,s.type,s.pendingProps,Wn),u!==null?(s.stateNode=u,Gt=s,dt=Zn(u.firstChild),Wn=!1,p=!0):p=!1),p||Si(s)),hn(s),p=s.type,m=s.pendingProps,b=r!==null?r.memoizedProps:null,u=m.children,Dp(p,m)?u=null:b!==null&&Dp(p,b)&&(s.flags|=32),s.memoizedState!==null&&(p=Nf(r,s,A1,null,null,l),Sl._currentValue=p),ku(r,s),Kt(r,s,u,l),s.child;case 6:return r===null&&Ge&&((r=l=dt)&&(l=pA(l,s.pendingProps,Wn),l!==null?(s.stateNode=l,Gt=s,dt=null,r=!0):r=!1),r||Si(s)),null;case 13:return ob(r,s,l);case 4:return Ye(s,s.stateNode.containerInfo),u=s.pendingProps,r===null?s.child=Rs(s,null,u,l):Kt(r,s,u,l),s.child;case 11:return X_(r,s,s.type,s.pendingProps,l);case 7:return Kt(r,s,s.pendingProps,l),s.child;case 8:return Kt(r,s,s.pendingProps.children,l),s.child;case 12:return Kt(r,s,s.pendingProps.children,l),s.child;case 10:return u=s.pendingProps,Ei(s,s.type,u.value),Kt(r,s,u.children,l),s.child;case 9:return p=s.type._context,u=s.pendingProps.children,Es(s),p=Yt(p),u=u(p),s.flags|=1,Kt(r,s,u,l),s.child;case 14:return Q_(r,s,s.type,s.pendingProps,l);case 15:return eb(r,s,s.type,s.pendingProps,l);case 19:return cb(r,s,l);case 31:return j1(r,s,l);case 22:return tb(r,s,l,s.pendingProps);case 24:return Es(s),u=Yt(Rt),r===null?(p=kf(),p===null&&(p=ot,m=Sf(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=l),p=m),s.memoizedState={parent:u,cache:p},Tf(s),Ei(s,Rt,p)):((r.lanes&l)!==0&&(Rf(r,s),nl(s,null,null,l),tl()),p=r.memoizedState,m=s.memoizedState,p.parent!==u?(p={parent:u,cache:u},s.memoizedState=p,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=p),Ei(s,Rt,u)):(u=m.cache,Ei(s,Rt,u),u!==p.cache&&wf(s,[Rt],l,!0))),Kt(r,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function qr(r){r.flags|=4}function lp(r,s,l,u,p){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(Ib())r.flags|=8192;else throw Ts=cu,xf}else r.flags&=-16777217}function db(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Tw(s))if(Ib())r.flags|=8192;else throw Ts=cu,xf}function Tu(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?Hv():536870912,r.lanes|=s,La|=s)}function ll(r,s){if(!Ge)switch(r.tailMode){case"hidden":s=r.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;
vendor: 4,624 bytes, line 9
9u===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function ht(r){var s=r.alternate!==null&&r.alternate.child===r.child,l=0,u=0;if(s)for(var p=r.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=u,r.childLanes=l,s}function $1(r,s,l){var u=s.pendingProps;switch(mf(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(s),null;case 1:return ht(s),null;case 3:return l=s.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),$r(Rt),Ve(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(ba(s)?qr(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,yf())),ht(s),null;case 26:var p=s.type,m=s.memoizedState;return r===null?(qr(s),m!==null?(ht(s),db(s,m)):(ht(s),lp(s,p,null,u,l))):m?m!==r.memoizedState?(qr(s),ht(s),db(s,m)):(ht(s),s.flags&=-16777217):(r=r.memoizedProps,r!==u&&qr(s),ht(s),lp(s,p,r,u,l)),null;case 27:if(sr(s),l=Te.current,p=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==u&&qr(s);else{if(!u){if(s.stateNode===null)throw Error(i(166));return ht(s),null}r=se.current,ba(s)?Hy(s):(r=yw(p,u,l),s.stateNode=r,qr(s))}return ht(s),null;case 5:if(sr(s),p=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==u&&qr(s);else{if(!u){if(s.stateNode===null)throw Error(i(166));return ht(s),null}if(m=se.current,ba(s))Hy(s);else{var b=Bu(Te.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?b.createElement("select",{is:u.is}):b.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?b.createElement(p,{is:u.is}):b.createElement(p)}}m[Vt]=s,m[pn]=u;e:for(b=s.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===s)break e;for(;b.sibling===null;){if(b.return===null||b.return===s)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}s.stateNode=m;e:switch(Wt(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&qr(s)}}return ht(s),lp(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,l),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==u&&qr(s);else{if(typeof u!="string"&&s.stateNode===null)throw Error(i(166));if(r=Te.current,ba(s)){if(r=s.stateNode,l=s.memoizedProps,u=null,p=Gt,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}r[Vt]=s,r=!!(r.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||ow(r.nodeValue,l)),r||Si(s,!0)}else r=Bu(r).createTextNode(u),r[Vt]=s,s.stateNode=r}return ht(s),null;case 31:if(l=s.memoizedState,r===null||r.memoizedState!==null){if(u=ba(s),l!==null){if(r===null){if(!u)throw Error(i(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Vt]=s}else ws(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ht(s),r=!1}else l=yf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return s.flags&256?(Mn(s),s):(Mn(s),null);if((s.flags&128)!==0)throw Error(i(558))}return ht(s),null;case 13:if(u=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=ba(s),u!==null&&u.dehydrated!==null){if(r===null){if(!p)throw Error(i(318));if(p=s.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Vt]=s}else ws(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ht(s),p=!1}else p=yf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return s.flags&256?(Mn(s),s):(Mn(s),null)}return Mn(s),(s.flags&128)!==0?(s.lanes=l,s):(l=u!==null,r=r!==null&&r.memoizedState!==null,l&&(u=s.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),l!==r&&l&&(s.child.flags|=8192),Tu(s,s.updateQueue),ht(s),null);
vendor: 22,107 bytes, line 9
9case 4:return Ve(),r===null&&Op(s.stateNode.containerInfo),ht(s),null;case 10:return $r(s.type),ht(s),null;case 19:if(K(kt),u=s.memoizedState,u===null)return ht(s),null;if(p=(s.flags&128)!==0,m=u.rendering,m===null)if(p)ll(u,!1);else{if(wt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(m=fu(r),m!==null){for(s.flags|=128,ll(u,!1),r=m.updateQueue,s.updateQueue=r,Tu(s,r),s.subtreeFlags=0,r=l,l=s.child;l!==null;)zy(l,r),l=l.sibling;return ee(kt,kt.current&1|2),Ge&&jr(s,u.treeForkCount),s.child}r=r.sibling}u.tail!==null&&tn()>Pu&&(s.flags|=128,p=!0,ll(u,!1),s.lanes=4194304)}else{if(!p)if(r=fu(m),r!==null){if(s.flags|=128,p=!0,r=r.updateQueue,s.updateQueue=r,Tu(s,r),ll(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!Ge)return ht(s),null}else 2*tn()-u.renderingStartTime>Pu&&l!==536870912&&(s.flags|=128,p=!0,ll(u,!1),s.lanes=4194304);u.isBackwards?(m.sibling=s.child,s.child=m):(r=u.last,r!==null?r.sibling=m:s.child=m,u.last=m)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=tn(),r.sibling=null,l=kt.current,ee(kt,p?l&1|2:l&1),Ge&&jr(s,u.treeForkCount),r):(ht(s),null);case 22:case 23:return Mn(s),Pf(),u=s.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(s.flags|=8192):u&&(s.flags|=8192),u?(l&536870912)!==0&&(s.flags&128)===0&&(ht(s),s.subtreeFlags&6&&(s.flags|=8192)):ht(s),l=s.updateQueue,l!==null&&Tu(s,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==l&&(s.flags|=2048),r!==null&&K(ks),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),$r(Rt),ht(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function z1(r,s){switch(mf(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return $r(Rt),Ve(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return sr(s),null;case 31:if(s.memoizedState!==null){if(Mn(s),s.alternate===null)throw Error(i(340));ws()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(Mn(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));ws()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return K(kt),null;case 4:return Ve(),null;case 10:return $r(s.type),null;case 22:case 23:return Mn(s),Pf(),r!==null&&K(ks),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return $r(Rt),null;case 25:return null;default:return null}}function hb(r,s){switch(mf(s),s.tag){case 3:$r(Rt),Ve();break;case 26:case 27:case 5:sr(s);break;case 4:Ve();break;case 31:s.memoizedState!==null&&Mn(s);break;case 13:Mn(s);break;case 19:K(kt);break;case 10:$r(s.type);break;case 22:case 23:Mn(s),Pf(),r!==null&&K(ks);break;case 24:$r(Rt)}}function cl(r,s){try{var l=s.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&r)===r){u=void 0;var m=l.create,b=l.inst;u=m(),b.destroy=u}l=l.next}while(l!==p)}}catch(E){nt(s,s.return,E)}}function Ci(r,s,l){try{var u=s.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&r)===r){var b=u.inst,E=b.destroy;if(E!==void 0){b.destroy=void 0,p=s;var O=l,B=E;try{B()}catch(Y){nt(p,O,Y)}}}u=u.next}while(u!==m)}}catch(Y){nt(s,s.return,Y)}}function fb(r){var s=r.updateQueue;if(s!==null){var l=r.stateNode;try{r_(s,l)}catch(u){nt(r,r.return,u)}}}function pb(r,s,l){l.props=Cs(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(u){nt(r,s,u)}}function ul(r,s){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof l=="function"?r.refCleanup=l(u):l.current=u}}catch(p){nt(r,s,p)}}function br(r,s){var l=r.ref,u=r.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){nt(r,s,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){nt(r,s,p)}else l.current=null}function gb(r){var s=r.type,l=r.memoizedProps,u=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(p){nt(r,r.return,p)}}function cp(r,s,l){try{var u=r.stateNode;oA(u,r.type,l,s),u[pn]=s}catch(p){nt(r,r.return,p)}}function mb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&ji(r.type)||r.tag===4}function up(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||mb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&ji(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function dp(r,s,l){var u=r.tag;if(u===5||u===6)r=r.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(r),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Lr));else if(u!==4&&(u===27&&ji(r.type)&&(l=r.stateNode,s=null),r=r.child,r!==null))for(dp(r,s,l),r=r.sibling;r!==null;)dp(r,s,l),r=r.sibling}function Ru(r,s,l){var u=r.tag;if(u===5||u===6)r=r.stateNode,s?l.insertBefore(r,s):l.appendChild(r);else if(u!==4&&(u===27&&ji(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(Ru(r,s,l),r=r.sibling;r!==null;)Ru(r,s,l),r=r.sibling}function vb(r){var s=r.stateNode,l=r.memoizedProps;try{for(var u=r.type,p=s.attributes;p.length;)s.removeAttributeNode(p[0]);Wt(s,u,l),s[Vt]=r,s[pn]=l}catch(m){nt(r,r.return,m)}}var Fr=!1,Ot=!1,hp=!1,yb=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function U1(r,s){if(r=r.containerInfo,Lp=Ku,r=Oy(r),sf(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var b=0,E=-1,O=-1,B=0,Y=0,J=r,F=null;t:for(;;){for(var G;J!==l||p!==0&&J.nodeType!==3||(E=b+p),J!==m||u!==0&&J.nodeType!==3||(O=b+u),J.nodeType===3&&(b+=J.nodeValue.length),(G=J.firstChild)!==null;)F=J,J=G;for(;;){if(J===r)break t;if(F===l&&++B===p&&(E=b),F===m&&++Y===u&&(O=b),(G=J.nextSibling)!==null)break;J=F,F=J.parentNode}J=G}l=E===-1||O===-1?null:{start:E,end:O}}else l=null}l=l||{start:0,end:0}}else l=null;for(Np={focusedElem:r,selectionRange:l},Ku=!1,Ut=s;Ut!==null;)if(s=Ut,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Ut=r;else for(;Ut!==null;){switch(s=Ut,m=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(l=0;l<r.length;l++)p=r[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&m!==null){r=void 0,l=s,p=m.memoizedProps,m=m.memoizedState,u=l.stateNode;try{var ge=Cs(l.type,p);r=u.getSnapshotBeforeUpdate(ge,m),u.__reactInternalSnapshotBeforeUpdate=r}catch(ke){nt(l,l.return,ke)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,l=r.nodeType,l===9)Ip(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Ip(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=s.sibling,r!==null){r.return=s.return,Ut=r;break}Ut=s.return}}function _b(r,s,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:Vr(r,l),u&4&&cl(5,l);break;case 1:if(Vr(r,l),u&4)if(r=l.stateNode,s===null)try{r.componentDidMount()}catch(b){nt(l,l.return,b)}else{var p=Cs(l.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(p,s,r.__reactInternalSnapshotBeforeUpdate)}catch(b){nt(l,l.return,b)}}u&64&&fb(l),u&512&&ul(l,l.return);break;case 3:if(Vr(r,l),u&64&&(r=l.updateQueue,r!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{r_(r,s)}catch(b){nt(l,l.return,b)}}break;case 27:s===null&&u&4&&vb(l);case 26:case 5:Vr(r,l),s===null&&u&4&&gb(l),u&512&&ul(l,l.return);break;case 12:Vr(r,l);break;case 31:Vr(r,l),u&4&&Sb(r,l);break;case 13:Vr(r,l),u&4&&Eb(r,l),u&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=W1.bind(null,l),gA(r,l))));break;case 22:if(u=l.memoizedState!==null||Fr,!u){s=s!==null&&s.memoizedState!==null||Ot,p=Fr;var m=Ot;Fr=u,(Ot=s)&&!m?Gr(r,l,(l.subtreeFlags&8772)!==0):Vr(r,l),Fr=p,Ot=m}break;case 30:break;default:Vr(r,l)}}function bb(r){var s=r.alternate;s!==null&&(r.alternate=null,bb(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&Bh(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var gt=null,mn=!1;function Hr(r,s,l){for(l=l.child;l!==null;)wb(r,s,l),l=l.sibling}function wb(r,s,l){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(No,l)}catch{}switch(l.tag){case 26:Ot||br(l,s),Hr(r,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ot||br(l,s);var u=gt,p=mn;ji(l.type)&&(gt=l.stateNode,mn=!1),Hr(r,s,l),_l(l.stateNode),gt=u,mn=p;break;case 5:Ot||br(l,s);case 6:if(u=gt,p=mn,gt=null,Hr(r,s,l),gt=u,mn=p,gt!==null)if(mn)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(l.stateNode)}catch(m){nt(l,s,m)}else try{gt.removeChild(l.stateNode)}catch(m){nt(l,s,m)}break;case 18:gt!==null&&(mn?(r=gt,fw(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),Ba(r)):fw(gt,l.stateNode));break;case 4:u=gt,p=mn,gt=l.stateNode.containerInfo,mn=!0,Hr(r,s,l),gt=u,mn=p;break;case 0:case 11:case 14:case 15:Ci(2,l,s),Ot||Ci(4,l,s),Hr(r,s,l);break;case 1:Ot||(br(l,s),u=l.stateNode,typeof u.componentWillUnmount=="function"&&pb(l,s,u)),Hr(r,s,l);break;case 21:Hr(r,s,l);break;case 22:Ot=(u=Ot)||l.memoizedState!==null,Hr(r,s,l),Ot=u;break;default:Hr(r,s,l)}}function Sb(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Ba(r)}catch(l){nt(s,s.return,l)}}}function Eb(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Ba(r)}catch(l){nt(s,s.return,l)}}function B1(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new yb),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new yb),s;default:throw Error(i(435,r.tag))}}function Au(r,s){var l=B1(r);s.forEach(function(u){if(!l.has(u)){l.add(u);var p=J1.bind(null,r,u);u.then(p,p)}})}function vn(r,s){var l=s.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],m=r,b=s,E=b;e:for(;E!==null;){switch(E.tag){case 27:if(ji(E.type)){gt=E.stateNode,mn=!1;break e}break;case 5:gt=E.stateNode,mn=!1;break e;case 3:case 4:gt=E.stateNode.containerInfo,mn=!0;break e}E=E.return}if(gt===null)throw Error(i(160));wb(m,b,p),gt=null,mn=!1,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)kb(s,r),s=s.sibling}var lr=null;function kb(r,s){var l=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:vn(s,r),yn(r),u&4&&(Ci(3,r,r.return),cl(3,r),Ci(5,r,r.return));break;case 1:vn(s,r),yn(r),u&512&&(Ot||l===null||br(l,l.return)),u&64&&Fr&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var p=lr;if(vn(s,r),yn(r),u&512&&(Ot||l===null||br(l,l.return)),u&4){var m=l!==null?l.memoizedState:null;if(u=r.memoizedState,l===null)if(u===null)if(r.stateNode===null){e:{u=r.type,l=r.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":m=p.getElementsByTagName("title")[0],(!m||m[Io]||m[Vt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=p.createElement(u),p.head.insertBefore(m,p.querySelector("head > title"))),Wt(m,u,l),m[Vt]=r,zt(m),u=m;break e;case"link":var b=kw("link","href",p).get(u+(l.href||""));if(b){for(var E=0;E<b.length;E++)if(m=b[E],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(E,1);break t}}m=p.createElement(u),Wt(m,u,l),p.head.appendChild(m);break;case"meta":if(b=kw("meta","content",p).get(u+(l.content||""))){for(E=0;E<b.length;E++)if(m=b[E],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(E,1);break t}}m=p.createElement(u),Wt(m,u,l),p.head.appendChild(m);break;default:throw Error(i(468,u))}m[Vt]=r,zt(m),u=m}r.stateNode=u}else xw(p,r.type,r.stateNode);else r.stateNode=Ew(p,u,r.memoizedProps);else m!==u?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,u===null?xw(p,r.type,r.stateNode):Ew(p,u,r.memoizedProps)):u===null&&r.stateNode!==null&&cp(r,r.memoizedProps,l.memoizedProps)}break;case 27:vn(s,r),yn(r),u&512&&(Ot||l===null||br(l,l.return)),l!==null&&u&4&&cp(r,r.memoizedProps,l.memoizedProps);break;case 5:if(vn(s,r),yn(r),u&512&&(Ot||l===null||br(l,l.return)),r.flags&32){p=r.stateNode;try{ua(p,"")}catch(ge){nt(r,r.return,ge)}}u&4&&r.stateNode!=null&&(p=r.memoizedProps,cp(r,p,l!==null?l.memoizedProps:p)),u&1024&&(hp=!0);break;case 6:if(vn(s,r),yn(r),u&4){if(r.stateNode===null)throw Error(i(162));u=r.memoizedProps,l=r.stateNode;try{l.nodeValue=u}catch(ge){nt(r,r.return,ge)}}break;case 3:if(Hu=null,p=lr,lr=qu(s.containerInfo),vn(s,r),lr=p,yn(r),u&4&&l!==null&&l.memoizedState.isDehydrated)try{Ba(s.containerInfo)}catch(ge){nt(r,r.return,ge)}hp&&(hp=!1,xb(r));break;case 4:u=lr,lr=qu(r.stateNode.containerInfo),vn(s,r),yn(r),lr=u;break;case 12:vn(s,r),yn(r);break;case 31:vn(s,r),yn(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Au(r,u)));break;case 13:vn(s,r),yn(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ou=tn()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Au(r,u)));break;case 22:p=r.memoizedState!==null;var O=l!==null&&l.memoizedState!==null,B=Fr,Y=Ot;if(Fr=B||p,Ot=Y||O,vn(s,r),Ot=Y,Fr=B,yn(r),u&8192)e:for(s=r.stateNode,s._visibility=p?s._visibility&-2:s._visibility|1,p&&(l===null||O||Fr||Ot||Os(r)),l=null,s=r;;){if(s.tag===5||s.tag===26){if(l===null){O=l=s;try{if(m=O.stateNode,p)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{E=O.stateNode;var J=O.memoizedProps.style,F=J!=null&&J.hasOwnProperty("display")?J.display:null;E.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(ge){nt(O,O.return,ge)}}}else if(s.tag===6){if(l===null){O=s;try{O.stateNode.nodeValue=p?"":O.memoizedProps}catch(ge){nt(O,O.return,ge)}}}else if(s.tag===18){if(l===null){O=s;try{var G=O.stateNode;p?pw(G,!0):pw(O.stateNode,!1)}catch(ge){nt(O,O.return,ge)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}u&4&&(u=r.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,Au(r,l))));break;case 19:vn(s,r),yn(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Au(r,u)));break;case 30:break;case 21:break;default:vn(s,r),yn(r)}}function yn(r){var s=r.flags;if(s&2){try{for(var l,u=r.return;u!==null;){if(mb(u)){l=u;break}u=u.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var p=l.stateNode,m=up(r);Ru(r,m,p);break;case 5:var b=l.stateNode;l.flags&32&&(ua(b,""),l.flags&=-33);var E=up(r);Ru(r,E,b);break;case 3:case 4:var O=l.stateNode.containerInfo,B=up(r);dp(r,B,O);break;default:throw Error(i(161))}}catch(Y){nt(r,r.return,Y)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function xb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;xb(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function Vr(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)_b(r,s.alternate,s),s=s.sibling}function Os(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:Ci(4,s,s.return),Os(s);break;case 1:br(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&pb(s,s.return,l),Os(s);break;case 27:_l(s.stateNode);case 26:case 5:br(s,s.return),Os(s);break;case 22:s.memoizedState===null&&Os(s);break;case 30:Os(s);break;default:Os(s)}r=r.sibling}}function Gr(r,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var u=s.alternate,p=r,m=s,b=m.flags;switch(m.tag){case 0:case 11:case 15:Gr(p,m,l),cl(4,m);break;case 1:if(Gr(p,m,l),u=m,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(B){nt(u,u.return,B)}if(u=m,p=u.updateQueue,p!==null){var E=u.stateNode;try{var O=p.shared.hiddenCallbacks;if(O!==null)for(p.shared.hiddenCallbacks=null,p=0;p<O.length;p++)n_(O[p],E)}catch(B){nt(u,u.return,B)}}l&&b&64&&fb(m),ul(m,m.return);break;case 27:vb(m);case 26:case 5:Gr(p,m,l),l&&u===null&&b&4&&gb(m),ul(m,m.return);break;case 12:Gr(p,m,l);break;case 31:Gr(p,m,l),l&&b&4&&Sb(p,m);break;case 13:Gr(p,m,l),l&&b&4&&Eb(p,m);break;case 22:m.memoizedState===null&&Gr(p,m,l),ul(m,m.return);break;case 30:break;default:Gr(p,m,l)}s=s.sibling}}function fp(r,s){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&Jo(l))}function pp(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Jo(r))}function cr(r,s,l,u){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Tb(r,s,l,u),s=s.sibling}function Tb(r,s,l,u){var p=s.flags;switch(s.tag){case 0:case 11:case 15:cr(r,s,l,u),p&2048&&cl(9,s);break;case 1:cr(r,s,l,u);break;case 3:cr(r,s,l,u),p&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Jo(r)));break;case 12:if(p&2048){cr(r,s,l,u),r=s.stateNode;try{var m=s.memoizedProps,b=m.id,E=m.onPostCommit;typeof E=="function"&&E(b,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(O){nt(s,s.return,O)}}else cr(r,s,l,u);break;case 31:cr(r,s,l,u);break;case 13:cr(r,s,l,u);break;case 23:break;case 22:m=s.stateNode,b=s.alternate,s.memoizedState!==null?m._visibility&2?cr(r,s,l,u):dl(r,s):m._visibility&2?cr(r,s,l,u):(m._visibility|=2,Oa(r,s,l,u,(s.subtreeFlags&10256)!==0||!1)),p&2048&&fp(b,s);break;case 24:cr(r,s,l,u),p&2048&&pp(s.alternate,s);break;default:cr(r,s,l,u)}}function Oa(r,s,l,u,p){for(p=p&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var m=r,b=s,E=l,O=u,B=b.flags;switch(b.tag){case 0:case 11:case 15:Oa(m,b,E,O,p),cl(8,b);break;case 23:break;case 22:var Y=b.stateNode;b.memoizedState!==null?Y._visibility&2?Oa(m,b,E,O,p):dl(m,b):(Y._visibility|=2,Oa(m,b,E,O,p)),p&&B&2048&&fp(b.alternate,b);break;case 24:Oa(m,b,E,O,p),p&&B&2048&&pp(b.alternate,b);break;default:Oa(m,b,E,O,p)}s=s.sibling}}function dl(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=r,u=s,p=u.flags;switch(u.tag){case 22:dl(l,u),p&2048&&fp(u.alternate,u);break;case 24:dl(l,u),p&2048&&pp(u.alternate,u);break;default:dl(l,u)}s=s.sibling}}var hl=8192;function Pa(r,s,l){if(r.subtreeFlags&hl)for(r=r.child;r!==null;)Rb(r,s,l),r=r.sibling}function Rb(r,s,l){switch(r.tag){case 26:Pa(r,s,l),r.flags&hl&&r.memoizedState!==null&&RA(l,lr,r.memoizedState,r.memoizedProps);break;case 5:Pa(r,s,l);break;case 3:case 4:var u=lr;lr=qu(r.stateNode.containerInfo),Pa(r,s,l),lr=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=hl,hl=16777216,Pa(r,s,l),hl=u):Pa(r,s,l));break;default:Pa(r,s,l)}}function Ab(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function fl(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var u=s[l];Ut=u,Ob(u,r)}Ab(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Cb(r),r=r.sibling}function Cb(r){switch(r.tag){case 0:case 11:case 15:fl(r),r.flags&2048&&Ci(9,r,r.return);break;case 3:fl(r);break;case 12:fl(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,Cu(r)):fl(r);break;default:fl(r)}}function Cu(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var u=s[l];Ut=u,Ob(u,r)}Ab(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:Ci(8,s,s.return),Cu(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,Cu(s));break;default:Cu(s)}r=r.sibling}}function Ob(r,s){for(;Ut!==null;){var l=Ut;switch(l.tag){case 0:case 11:case 15:Ci(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Jo(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,Ut=u;else e:for(l=r;Ut!==null;){u=Ut;var p=u.sibling,m=u.return;if(bb(u),u===l){Ut=null;break e}if(p!==null){p.return=m,Ut=p;break e}Ut=m}}}var q1={getCacheForType:function(r){var s=Yt(Rt),l=s.data.get(r);return l===void 0&&(l=r(),s.data.set(r,l)),l},cacheSignal:function(){return Yt(Rt).controller.signal}},F1=typeof WeakMap=="function"?WeakMap:Map,et=0,ot=null,ze=null,Fe=0,tt=0,Ln=null,Oi=!1,Ma=!1,gp=!1,Yr=0,wt=0,Pi=0,Ps=0,mp=0,Nn=0,La=0,pl=null,_n=null,vp=!1,Ou=0,Pb=0,Pu=1/0,Mu=null,Mi=null,Dt=0,Li=null,Na=null,Kr=0,yp=0,_p=null,Mb=null,gl=0,bp=null;function Dn(){return(et&2)!==0&&Fe!==0?Fe&-Fe:H.T!==null?Tp():Kv()}
vendor: 24,559 bytes, lines 9-10
9function Lb(){if(Nn===0)if((Fe&536870912)===0||Ge){var r=Uc;Uc<<=1,(Uc&3932160)===0&&(Uc=262144),Nn=r}else Nn=536870912;return r=Pn.current,r!==null&&(r.flags|=32),Nn}function bn(r,s,l){(r===ot&&(tt===2||tt===9)||r.cancelPendingCommit!==null)&&(Da(r,0),Ni(r,Fe,Nn,!1)),jo(r,l),((et&2)===0||r!==ot)&&(r===ot&&((et&2)===0&&(Ps|=l),wt===4&&Ni(r,Fe,Nn,!1)),wr(r))}function Nb(r,s,l){if((et&6)!==0)throw Error(i(327));var u=!l&&(s&127)===0&&(s&r.expiredLanes)===0||Do(r,s),p=u?G1(r,s):Sp(r,s,!0),m=u;do{if(p===0){Ma&&!u&&Ni(r,s,0,!1);break}else{if(l=r.current.alternate,m&&!H1(l)){p=Sp(r,s,!1),m=!1;continue}if(p===2){if(m=s,r.errorRecoveryDisabledLanes&m)var b=0;else b=r.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){s=b;e:{var E=r;p=pl;var O=E.current.memoizedState.isDehydrated;if(O&&(Da(E,b).flags|=256),b=Sp(E,b,!1),b!==2){if(gp&&!O){E.errorRecoveryDisabledLanes|=m,Ps|=m,p=4;break e}m=_n,_n=p,m!==null&&(_n===null?_n=m:_n.push.apply(_n,m))}p=b}if(m=!1,p!==2)continue}}if(p===1){Da(r,0),Ni(r,s,0,!0);break}e:{switch(u=r,m=p,m){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:Ni(u,s,Nn,!Oi);break e;case 2:_n=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(p=Ou+300-tn(),10<p)){if(Ni(u,s,Nn,!Oi),qc(u,0,!0)!==0)break e;Kr=s,u.timeoutHandle=dw(Db.bind(null,u,l,_n,Mu,vp,s,Nn,Ps,La,Oi,m,"Throttled",-0,0),p);break e}Db(u,l,_n,Mu,vp,s,Nn,Ps,La,Oi,m,null,-0,0)}}break}while(!0);wr(r)}function Db(r,s,l,u,p,m,b,E,O,B,Y,J,F,G){if(r.timeoutHandle=-1,J=s.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Lr},Rb(s,m,J);var ge=(m&62914560)===m?Ou-tn():(m&4194048)===m?Pb-tn():0;if(ge=AA(J,ge),ge!==null){Kr=m,r.cancelPendingCommit=ge(Fb.bind(null,r,s,m,l,u,p,b,E,O,Y,J,null,F,G)),Ni(r,m,b,!B);return}}Fb(r,s,m,l,u,p,b,E,O)}function H1(r){for(var s=r;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var p=l[u],m=p.getSnapshot;p=p.value;try{if(!Cn(m(),p))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ni(r,s,l,u){s&=~mp,s&=~Ps,r.suspendedLanes|=s,r.pingedLanes&=~s,u&&(r.warmLanes|=s),u=r.expirationTimes;for(var p=s;0<p;){var m=31-An(p),b=1<<m;u[m]=-1,p&=~b}l!==0&&Vv(r,l,s)}function Lu(){return(et&6)===0?(ml(0),!1):!0}function wp(){if(ze!==null){if(tt===0)var r=ze.return;else r=ze,Ir=Ss=null,If(r),xa=null,Xo=0,r=ze;for(;r!==null;)hb(r.alternate,r),r=r.return;ze=null}}function Da(r,s){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,uA(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),Kr=0,wp(),ot=r,ze=l=Dr(r.current,null),Fe=s,tt=0,Ln=null,Oi=!1,Ma=Do(r,s),gp=!1,La=Nn=mp=Ps=Pi=wt=0,_n=pl=null,vp=!1,(s&8)!==0&&(s|=s&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=s;0<u;){var p=31-An(u),m=1<<p;s|=r[p],u&=~m}return Yr=s,eu(),l}function jb(r,s){Le=null,H.H=al,s===ka||s===lu?(s=Xy(),tt=3):s===xf?(s=Xy(),tt=4):tt=s===Qf?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Ln=s,ze===null&&(wt=1,Su(r,Gn(s,r.current)))}function Ib(){var r=Pn.current;return r===null?!0:(Fe&4194048)===Fe?Jn===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?r===Jn:!1}function $b(){var r=H.H;return H.H=al,r===null?al:r}function zb(){var r=H.A;return H.A=q1,r}function Nu(){wt=4,Oi||(Fe&4194048)!==Fe&&Pn.current!==null||(Ma=!0),(Pi&134217727)===0&&(Ps&134217727)===0||ot===null||Ni(ot,Fe,Nn,!1)}function Sp(r,s,l){var u=et;et|=2;var p=$b(),m=zb();(ot!==r||Fe!==s)&&(Mu=null,Da(r,s)),s=!1;var b=wt;e:do try{if(tt!==0&&ze!==null){var E=ze,O=Ln;switch(tt){case 8:wp(),b=6;break e;case 3:case 2:case 9:case 6:Pn.current===null&&(s=!0);var B=tt;if(tt=0,Ln=null,ja(r,E,O,B),l&&Ma){b=0;break e}break;default:B=tt,tt=0,Ln=null,ja(r,E,O,B)}}V1(),b=wt;break}catch(Y){jb(r,Y)}while(!0);return s&&r.shellSuspendCounter++,Ir=Ss=null,et=u,H.H=p,H.A=m,ze===null&&(ot=null,Fe=0,eu()),b}function V1(){for(;ze!==null;)Ub(ze)}function G1(r,s){var l=et;et|=2;var u=$b(),p=zb();ot!==r||Fe!==s?(Mu=null,Pu=tn()+500,Da(r,s)):Ma=Do(r,s);e:do try{if(tt!==0&&ze!==null){s=ze;var m=Ln;t:switch(tt){case 1:tt=0,Ln=null,ja(r,s,m,1);break;case 2:case 9:if(Jy(m)){tt=0,Ln=null,Bb(s);break}s=function(){tt!==2&&tt!==9||ot!==r||(tt=7),wr(r)},m.then(s,s);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:Jy(m)?(tt=0,Ln=null,Bb(s)):(tt=0,Ln=null,ja(r,s,m,7));break;case 5:var b=null;switch(ze.tag){case 26:b=ze.memoizedState;case 5:case 27:var E=ze;if(b?Tw(b):E.stateNode.complete){tt=0,Ln=null;var O=E.sibling;if(O!==null)ze=O;else{var B=E.return;B!==null?(ze=B,Du(B)):ze=null}break t}}tt=0,Ln=null,ja(r,s,m,5);break;case 6:tt=0,Ln=null,ja(r,s,m,6);break;case 8:wp(),wt=6;break e;default:throw Error(i(462))}}Y1();break}catch(Y){jb(r,Y)}while(!0);return Ir=Ss=null,H.H=u,H.A=p,et=l,ze!==null?0:(ot=null,Fe=0,eu(),wt)}function Y1(){for(;ze!==null&&!hs();)Ub(ze)}function Ub(r){var s=ub(r.alternate,r,Yr);r.memoizedProps=r.pendingProps,s===null?Du(r):ze=s}function Bb(r){var s=r,l=s.alternate;switch(s.tag){case 15:case 0:s=ib(l,s,s.pendingProps,s.type,void 0,Fe);break;case 11:s=ib(l,s,s.pendingProps,s.type.render,s.ref,Fe);break;case 5:If(s);default:hb(l,s),s=ze=zy(s,Yr),s=ub(l,s,Yr)}r.memoizedProps=r.pendingProps,s===null?Du(r):ze=s}function ja(r,s,l,u){Ir=Ss=null,If(s),xa=null,Xo=0;var p=s.return;try{if(D1(r,p,s,l,Fe)){wt=1,Su(r,Gn(l,r.current)),ze=null;return}}catch(m){if(p!==null)throw ze=p,m;wt=1,Su(r,Gn(l,r.current)),ze=null;return}s.flags&32768?(Ge||u===1?r=!0:Ma||(Fe&536870912)!==0?r=!1:(Oi=r=!0,(u===2||u===9||u===3||u===6)&&(u=Pn.current,u!==null&&u.tag===13&&(u.flags|=16384))),qb(s,r)):Du(s)}function Du(r){var s=r;do{if((s.flags&32768)!==0){qb(s,Oi);return}r=s.return;var l=$1(s.alternate,s,Yr);if(l!==null){ze=l;return}if(s=s.sibling,s!==null){ze=s;return}ze=s=r}while(s!==null);wt===0&&(wt=5)}function qb(r,s){do{var l=z1(r.alternate,r);if(l!==null){l.flags&=32767,ze=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(r=r.sibling,r!==null)){ze=r;return}ze=r=l}while(r!==null);wt=6,ze=null}function Fb(r,s,l,u,p,m,b,E,O){r.cancelPendingCommit=null;do ju();while(Dt!==0);if((et&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(m=s.lanes|s.childLanes,m|=uf,TR(r,l,m,b,E,O),r===ot&&(ze=ot=null,Fe=0),Na=s,Li=r,Kr=l,yp=m,_p=p,Mb=u,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Z1(ra,function(){return Kb(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,p=Z.p,Z.p=2,b=et,et|=4;try{U1(r,s,l)}finally{et=b,Z.p=p,H.T=u}}Dt=1,Hb(),Vb(),Gb()}}function Hb(){if(Dt===1){Dt=0;var r=Li,s=Na,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var u=Z.p;Z.p=2;var p=et;et|=4;try{kb(s,r);var m=Np,b=Oy(r.containerInfo),E=m.focusedElem,O=m.selectionRange;if(b!==E&&E&&E.ownerDocument&&Cy(E.ownerDocument.documentElement,E)){if(O!==null&&sf(E)){var B=O.start,Y=O.end;if(Y===void 0&&(Y=B),"selectionStart"in E)E.selectionStart=B,E.selectionEnd=Math.min(Y,E.value.length);else{var J=E.ownerDocument||document,F=J&&J.defaultView||window;if(F.getSelection){var G=F.getSelection(),ge=E.textContent.length,ke=Math.min(O.start,ge),st=O.end===void 0?ke:Math.min(O.end,ge);!G.extend&&ke>st&&(b=st,st=ke,ke=b);var j=Ay(E,ke),N=Ay(E,st);if(j&&N&&(G.rangeCount!==1||G.anchorNode!==j.node||G.anchorOffset!==j.offset||G.focusNode!==N.node||G.focusOffset!==N.offset)){var z=J.createRange();z.setStart(j.node,j.offset),G.removeAllRanges(),ke>st?(G.addRange(z),G.extend(N.node,N.offset)):(z.setEnd(N.node,N.offset),G.addRange(z))}}}}for(J=[],G=E;G=G.parentNode;)G.nodeType===1&&J.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<J.length;E++){var W=J[E];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Ku=!!Lp,Np=Lp=null}finally{et=p,Z.p=u,H.T=l}}r.current=s,Dt=2}}function Vb(){if(Dt===2){Dt=0;var r=Li,s=Na,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var u=Z.p;Z.p=2;var p=et;et|=4;try{_b(r,s.alternate,s)}finally{et=p,Z.p=u,H.T=l}}Dt=3}}function Gb(){if(Dt===4||Dt===3){Dt=0,fs();var r=Li,s=Na,l=Kr,u=Mb;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Dt=5:(Dt=0,Na=Li=null,Yb(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(Mi=null),zh(l),s=s.stateNode,Rn&&typeof Rn.onCommitFiberRoot=="function")try{Rn.onCommitFiberRoot(No,s,void 0,(s.current.flags&128)===128)}catch{}if(u!==null){s=H.T,p=Z.p,Z.p=2,H.T=null;try{for(var m=r.onRecoverableError,b=0;b<u.length;b++){var E=u[b];m(E.value,{componentStack:E.stack})}}finally{H.T=s,Z.p=p}}(Kr&3)!==0&&ju(),wr(r),p=r.pendingLanes,(l&261930)!==0&&(p&42)!==0?r===bp?gl++:(gl=0,bp=r):gl=0,ml(0)}}function Yb(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,Jo(s)))}function ju(){return Hb(),Vb(),Gb(),Kb()}function Kb(){if(Dt!==5)return!1;var r=Li,s=yp;yp=0;var l=zh(Kr),u=H.T,p=Z.p;try{Z.p=32>l?32:l,H.T=null,l=_p,_p=null;var m=Li,b=Kr;if(Dt=0,Na=Li=null,Kr=0,(et&6)!==0)throw Error(i(331));var E=et;if(et|=4,Cb(m.current),Tb(m,m.current,b,l),et=E,ml(0,!1),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(No,m)}catch{}return!0}finally{Z.p=p,H.T=u,Yb(r,s)}}function Wb(r,s,l){s=Gn(l,s),s=Xf(r.stateNode,s,2),r=Ti(r,s,2),r!==null&&(jo(r,2),wr(r))}function nt(r,s,l){if(r.tag===3)Wb(r,r,l);else for(;s!==null;){if(s.tag===3){Wb(s,r,l);break}else if(s.tag===1){var u=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Mi===null||!Mi.has(u))){r=Gn(l,r),l=J_(2),u=Ti(s,l,2),u!==null&&(Z_(l,u,s,r),jo(u,2),wr(u));break}}s=s.return}}function Ep(r,s,l){var u=r.pingCache;if(u===null){u=r.pingCache=new F1;var p=new Set;u.set(s,p)}else p=u.get(s),p===void 0&&(p=new Set,u.set(s,p));p.has(l)||(gp=!0,p.add(l),r=K1.bind(null,r,s,l),s.then(r,r))}function K1(r,s,l){var u=r.pingCache;u!==null&&u.delete(s),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,ot===r&&(Fe&l)===l&&(wt===4||wt===3&&(Fe&62914560)===Fe&&300>tn()-Ou?(et&2)===0&&Da(r,0):mp|=l,La===Fe&&(La=0)),wr(r)}function Jb(r,s){s===0&&(s=Hv()),r=_s(r,s),r!==null&&(jo(r,s),wr(r))}function W1(r){var s=r.memoizedState,l=0;s!==null&&(l=s.retryLane),Jb(r,l)}function J1(r,s){var l=0;switch(r.tag){case 31:case 13:var u=r.stateNode,p=r.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(s),Jb(r,l)}function Z1(r,s){return fn(r,s)}var Iu=null,Ia=null,kp=!1,$u=!1,xp=!1,Di=0;function wr(r){r!==Ia&&r.next===null&&(Ia===null?Iu=Ia=r:Ia=Ia.next=r),$u=!0,kp||(kp=!0,Q1())}function ml(r,s){if(!xp&&$u){xp=!0;do for(var l=!1,u=Iu;u!==null;){if(r!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var b=u.suspendedLanes,E=u.pingedLanes;m=(1<<31-An(42|r)+1)-1,m&=p&~(b&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,ew(u,m))}else m=Fe,m=qc(u,u===ot?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Do(u,m)||(l=!0,ew(u,m));u=u.next}while(l);xp=!1}}function X1(){Zb()}function Zb(){$u=kp=!1;var r=0;Di!==0&&cA()&&(r=Di);for(var s=tn(),l=null,u=Iu;u!==null;){var p=u.next,m=Xb(u,s);m===0?(u.next=null,l===null?Iu=p:l.next=p,p===null&&(Ia=l)):(l=u,(r!==0||(m&3)!==0)&&($u=!0)),u=p}Dt!==0&&Dt!==5||ml(r),Di!==0&&(Di=0)}function Xb(r,s){for(var l=r.suspendedLanes,u=r.pingedLanes,p=r.expirationTimes,m=r.pendingLanes&-62914561;0<m;){var b=31-An(m),E=1<<b,O=p[b];O===-1?((E&l)===0||(E&u)!==0)&&(p[b]=xR(E,s)):O<=s&&(r.expiredLanes|=E),m&=~E}if(s=ot,l=Fe,l=qc(r,r===s?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,l===0||r===s&&(tt===2||tt===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&mi(u),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||Do(r,l)){if(s=l&-l,s===r.callbackPriority)return s;switch(u!==null&&mi(u),zh(l)){case 2:case 8:l=vr;break;case 32:l=ra;break;case 268435456:l=Fv;break;default:l=ra}return u=Qb.bind(null,r),l=fn(l,u),r.callbackPriority=s,r.callbackNode=l,s}return u!==null&&u!==null&&mi(u),r.callbackPriority=2,r.callbackNode=null,2}function Qb(r,s){if(Dt!==0&&Dt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(ju()&&r.callbackNode!==l)return null;var u=Fe;return u=qc(r,r===ot?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(Nb(r,u,s),Xb(r,tn()),r.callbackNode!=null&&r.callbackNode===l?Qb.bind(null,r):null)}function ew(r,s){if(ju())return null;Nb(r,s,!0)}function Q1(){dA(function(){(et&6)!==0?fn(Ht,X1):Zb()})}function Tp(){if(Di===0){var r=Sa;r===0&&(r=zc,zc<<=1,(zc&261888)===0&&(zc=256)),Di=r}return Di}function tw(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Gc(""+r)}function nw(r,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,r.id&&l.setAttribute("form",r.id),s.parentNode.insertBefore(l,s),r=new FormData(r),l.parentNode.removeChild(l),r}function eA(r,s,l,u,p){if(s==="submit"&&l&&l.stateNode===p){var m=tw((p[pn]||null).action),b=u.submitter;b&&(s=(s=b[pn]||null)?tw(s.formAction):b.getAttribute("formAction"),s!==null&&(m=s,b=null));var E=new Jc("action","action",null,u,p);r.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Di!==0){var O=b?nw(p,b):new FormData(p);Gf(l,{pending:!0,data:O,method:p.method,action:m},null,O)}}else typeof m=="function"&&(E.preventDefault(),O=b?nw(p,b):new FormData(p),Gf(l,{pending:!0,data:O,method:p.method,action:m},m,O))},currentTarget:p}]})}}for(var Rp=0;Rp<cf.length;Rp++){var Ap=cf[Rp],tA=Ap.toLowerCase(),nA=Ap[0].toUpperCase()+Ap.slice(1);or(tA,"on"+nA)}or(Ly,"onAnimationEnd"),or(Ny,"onAnimationIteration"),or(Dy,"onAnimationStart"),or("dblclick","onDoubleClick"),or("focusin","onFocus"),or("focusout","onBlur"),or(y1,"onTransitionRun"),or(_1,"onTransitionStart"),or(b1,"onTransitionCancel"),or(jy,"onTransitionEnd"),la("onMouseEnter",["mouseout","mouseover"]),la("onMouseLeave",["mouseout","mouseover"]),la("onPointerEnter",["pointerout","pointerover"]),la("onPointerLeave",["pointerout","pointerover"]),gs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),gs("onBeforeInput",["compositionend","keypress","textInput","paste"]),gs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vl="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(" "),rA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vl));function rw(r,s){s=(s&4)!==0;for(var l=0;l<r.length;l++){var u=r[l],p=u.event;u=u.listeners;e:{var m=void 0;if(s)for(var b=u.length-1;0<=b;b--){var E=u[b],O=E.instance,B=E.currentTarget;if(E=E.listener,O!==m&&p.isPropagationStopped())break e;m=E,p.currentTarget=B;try{m(p)}catch(Y){Qc(Y)}p.currentTarget=null,m=O}else for(b=0;b<u.length;b++){if(E=u[b],O=E.instance,B=E.currentTarget,E=E.listener,O!==m&&p.isPropagationStopped())break e;m=E,p.currentTarget=B;try{m(p)}catch(Y){Qc(Y)}p.currentTarget=null,m=O}}}}function Ue(r,s){var l=s[Uh];l===void 0&&(l=s[Uh]=new Set);var u=r+"__bubble";l.has(u)||(iw(s,r,2,!1),l.add(u))}function Cp(r,s,l){var u=0;s&&(u|=4),iw(l,r,u,s)}var zu="_reactListening"+Math.random().toString(36).slice(2);function Op(r){if(!r[zu]){r[zu]=!0,Zv.forEach(function(l){l!=="selectionchange"&&(rA.has(l)||Cp(l,!1,r),Cp(l,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[zu]||(s[zu]=!0,Cp("selectionchange",!1,s))}}function iw(r,s,l,u){switch(Lw(s)){case 2:var p=PA;break;case 8:p=MA;break;default:p=Vp}l=p.bind(null,s,l,r),p=void 0,!Wh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(p=!0),u?p!==void 0?r.addEventListener(s,l,{capture:!0,passive:p}):r.addEventListener(s,l,!0):p!==void 0?r.addEventListener(s,l,{passive:p}):r.addEventListener(s,l,!1)}function Pp(r,s,l,u,p){var m=u;if((s&1)===0&&(s&2)===0&&u!==null)e:for(;;){if(u===null)return;var b=u.tag;if(b===3||b===4){var E=u.stateNode.containerInfo;if(E===p)break;if(b===4)for(b=u.return;b!==null;){var O=b.tag;if((O===3||O===4)&&b.stateNode.containerInfo===p)return;b=b.return}for(;E!==null;){if(b=sa(E),b===null)return;if(O=b.tag,O===5||O===6||O===26||O===27){u=m=b;continue e}E=E.parentNode}}u=u.return}cy(function(){var B=m,Y=Yh(l),J=[];e:{var F=Iy.get(r);if(F!==void 0){var G=Jc,ge=r;switch(r){case"keypress":if(Kc(l)===0)break e;case"keydown":case"keyup":G=JR;break;case"focusin":ge="focus",G=Qh;break;case"focusout":ge="blur",G=Qh;break;case"beforeblur":case"afterblur":G=Qh;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":G=hy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=$R;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=QR;break;case Ly:case Ny:case Dy:G=BR;break;case jy:G=t1;break;case"scroll":case"scrollend":G=jR;break;case"wheel":G=r1;break;case"copy":case"cut":case"paste":G=FR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=py;break;case"toggle":case"beforetoggle":G=s1}var ke=(s&4)!==0,st=!ke&&(r==="scroll"||r==="scrollend"),j=ke?F!==null?F+"Capture":null:F;ke=[];for(var N=B,z;N!==null;){var W=N;if(z=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||z===null||j===null||(W=zo(N,j),W!=null&&ke.push(yl(N,W,z))),st)break;N=N.return}0<ke.length&&(F=new G(F,ge,null,l,Y),J.push({event:F,listeners:ke}))}}if((s&7)===0){e:{if(F=r==="mouseover"||r==="pointerover",G=r==="mouseout"||r==="pointerout",F&&l!==Gh&&(ge=l.relatedTarget||l.fromElement)&&(sa(ge)||ge[ia]))break e;if((G||F)&&(F=Y.window===Y?Y:(F=Y.ownerDocument)?F.defaultView||F.parentWindow:window,G?(ge=l.relatedTarget||l.toElement,G=B,ge=ge?sa(ge):null,ge!==null&&(st=o(ge),ke=ge.tag,ge!==st||ke!==5&&ke!==27&&ke!==6)&&(ge=null)):(G=null,ge=B),G!==ge)){if(ke=hy,W="onMouseLeave",j="onMouseEnter",N="mouse",(r==="pointerout"||r==="pointerover")&&(ke=py,W="onPointerLeave",j="onPointerEnter",N="pointer"),st=G==null?F:$o(G),z=ge==null?F:$o(ge),F=new ke(W,N+"leave",G,l,Y),F.target=st,F.relatedTarget=z,W=null,sa(Y)===B&&(ke=new ke(j,N+"enter",ge,l,Y),ke.target=z,ke.relatedTarget=st,W=ke),st=W,G&&ge)t:{for(ke=iA,j=G,N=ge,z=0,W=j;W;W=ke(W))z++;W=0;for(var Se=N;Se;Se=ke(Se))W++;for(;0<z-W;)j=ke(j),z--;for(;0<W-z;)N=ke(N),W--;for(;z--;){if(j===N||N!==null&&j===N.alternate){ke=j;break t}j=ke(j),N=ke(N)}ke=null}else ke=null;G!==null&&sw(J,F,G,ke,!1),ge!==null&&st!==null&&sw(J,st,ge,ke,!0)}}e:{if(F=B?$o(B):window,G=F.nodeName&&F.nodeName.toLowerCase(),G==="select"||G==="input"&&F.type==="file")var Je=Sy;else if(by(F))if(Ey)Je=g1;else{Je=f1;var ye=h1}else G=F.nodeName,!G||G.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?B&&Vh(B.elementType)&&(Je=Sy):Je=p1;if(Je&&(Je=Je(r,B))){wy(J,Je,l,Y);break e}ye&&ye(r,F,B),r==="focusout"&&B&&F.type==="number"&&B.memoizedProps.value!=null&&Hh(F,"number",F.value)}switch(ye=B?$o(B):window,r){case"focusin":(by(ye)||ye.contentEditable==="true")&&(pa=ye,af=B,Yo=null);break;case"focusout":Yo=af=pa=null;break;case"mousedown":of=!0;break;case"contextmenu":case"mouseup":case"dragend":of=!1,Py(J,l,Y);break;case"selectionchange":if(v1)break;case"keydown":case"keyup":Py(J,l,Y)}var De;if(tf)e:{switch(r){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else fa?yy(r,l)&&(He="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&(gy&&l.locale!=="ko"&&(fa||He!=="onCompositionStart"?He==="onCompositionEnd"&&fa&&(De=uy()):(_i=Y,Jh="value"in _i?_i.value:_i.textContent,fa=!0)),ye=Uu(B,He),0<ye.length&&(He=new fy(He,r,null,l,Y),J.push({event:He,listeners:ye}),De?He.data=De:(De=_y(l),De!==null&&(He.data=De)))),(De=o1?l1(r,l):c1(r,l))&&(He=Uu(B,"onBeforeInput"),0<He.length&&(ye=new fy("onBeforeInput","beforeinput",null,l,Y),J.push({event:ye,listeners:He}),ye.data=De)),eA(J,r,B,l,Y)}rw(J,s)})}function yl(r,s,l){return{instance:r,listener:s,currentTarget:l}}function Uu(r,s){for(var l=s+"Capture",u=[];r!==null;){var p=r,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=zo(r,l),p!=null&&u.unshift(yl(r,p,m)),p=zo(r,s),p!=null&&u.push(yl(r,p,m))),r.tag===3)return u;r=r.return}return[]}function iA(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function sw(r,s,l,u,p){for(var m=s._reactName,b=[];l!==null&&l!==u;){var E=l,O=E.alternate,B=E.stateNode;if(E=E.tag,O!==null&&O===u)break;E!==5&&E!==26&&E!==27||B===null||(O=B,p?(B=zo(l,m),B!=null&&b.unshift(yl(l,B,O))):p||(B=zo(l,m),B!=null&&b.push(yl(l,B,O)))),l=l.return}b.length!==0&&r.push({event:s,listeners:b})}var sA=/\r\n?/g,aA=/\u0000|\uFFFD/g;function aw(r){return(typeof r=="string"?r:""+r).replace(sA,`
10`).replace(aA,"")}function ow(r,s){return s=aw(s),aw(r)===s}function it(r,s,l,u,p,m){switch(l){case"children":typeof u=="string"?s==="body"||s==="textarea"&&u===""||ua(r,u):(typeof u=="number"||typeof u=="bigint")&&s!=="body"&&ua(r,""+u);break;case"className":Hc(r,"class",u);break;case"tabIndex":Hc(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Hc(r,l,u);break;case"style":oy(r,u,m);break;case"data":if(s!=="object"){Hc(r,"data",u);break}case"src":case"href":if(u===""&&(s!=="a"||l!=="href")){r.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(l);break}u=Gc(""+u),r.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(l==="formAction"?(s!=="input"&&it(r,s,"name",p.name,p,null),it(r,s,"formEncType",p.formEncType,p,null),it(r,s,"formMethod",p.formMethod,p,null),it(r,s,"formTarget",p.formTarget,p,null)):(it(r,s,"encType",p.encType,p,null),it(r,s,"method",p.method,p,null),it(r,s,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(l);break}u=Gc(""+u),r.setAttribute(l,u);break;case"onClick":u!=null&&(r.onclick=Lr);break;case"onScroll":u!=null&&Ue("scroll",r);break;case"onScrollEnd":u!=null&&Ue("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(i(60));r.innerHTML=l}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}l=Gc(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,""+u):r.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":u===!0?r.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,u):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(l,u):r.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(l):r.setAttribute(l,u);break;case"popover":Ue("beforetoggle",r),Ue("toggle",r),Fc(r,"popover",u);break;case"xlinkActuate":Mr(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Mr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Mr(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Mr(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Mr(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Mr(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Mr(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Mr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Mr(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Fc(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=NR.get(l)||l,Fc(r,l,u))}}function Mp(r,s,l,u,p,m){switch(l){case"style":oy(r,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(i(60));r.innerHTML=l}}break;case"children":typeof u=="string"?ua(r,u):(typeof u=="number"||typeof u=="bigint")&&ua(r,""+u);break;case"onScroll":u!=null&&Ue("scroll",r);break;case"onScrollEnd":u!=null&&Ue("scrollend",r);break;case"onClick":u!=null&&(r.onclick=Lr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xv.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),s=l.slice(2,p?l.length-7:void 0),m=r[pn]||null,m=m!=null?m[l]:null,typeof m=="function"&&r.removeEventListener(s,m,p),typeof u=="function")){typeof m!="function"&&m!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(s,u,p);break e}l in r?r[l]=u:u===!0?r.setAttribute(l,""):Fc(r,l,u)}}}function Wt(r,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",r),Ue("load",r);var u=!1,p=!1,m;for(m in l)if(l.hasOwnProperty(m)){var b=l[m];if(b!=null)switch(m){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:it(r,s,m,b,l,null)}}p&&it(r,s,"srcSet",l.srcSet,l,null),u&&it(r,s,"src",l.src,l,null);return;case"input":Ue("invalid",r);var E=m=b=p=null,O=null,B=null;for(u in l)if(l.hasOwnProperty(u)){var Y=l[u];if(Y!=null)switch(u){case"name":p=Y;break;case"type":b=Y;break;case"checked":O=Y;break;case"defaultChecked":B=Y;break;case"value":m=Y;break;case"defaultValue":E=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,s));break;default:it(r,s,u,Y,l,null)}}ry(r,m,E,O,B,b,p,!1);return;case"select":Ue("invalid",r),u=b=m=null;for(p in l)if(l.hasOwnProperty(p)&&(E=l[p],E!=null))switch(p){case"value":m=E;break;case"defaultValue":b=E;break;case"multiple":u=E;default:it(r,s,p,E,l,null)}s=m,l=b,r.multiple=!!u,s!=null?ca(r,!!u,s,!1):l!=null&&ca(r,!!u,l,!0);return;case"textarea":Ue("invalid",r),m=p=u=null;for(b in l)if(l.hasOwnProperty(b)&&(E=l[b],E!=null))switch(b){case"value":u=E;break;case"defaultValue":p=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:it(r,s,b,E,l,null)}sy(r,u,p,m);return;case"option":for(O in l)l.hasOwnProperty(O)&&(u=l[O],u!=null)&&(O==="selected"?r.selected=u&&typeof u!="function"&&typeof u!="symbol":it(r,s,O,u,l,null));return;case"dialog":Ue("beforetoggle",r),Ue("toggle",r),Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":Ue("load",r);break;case"video":case"audio":for(u=0;
vendor: 5,405 bytes, line 10
10u<vl.length;u++)Ue(vl[u],r);break;case"image":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"embed":case"source":case"link":Ue("error",r),Ue("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in l)if(l.hasOwnProperty(B)&&(u=l[B],u!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:it(r,s,B,u,l,null)}return;default:if(Vh(s)){for(Y in l)l.hasOwnProperty(Y)&&(u=l[Y],u!==void 0&&Mp(r,s,Y,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&it(r,s,E,u,l,null))}function oA(r,s,l,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,m=null,b=null,E=null,O=null,B=null,Y=null;for(G in l){var J=l[G];if(l.hasOwnProperty(G)&&J!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":O=J;default:u.hasOwnProperty(G)||it(r,s,G,null,u,J)}}for(var F in u){var G=u[F];if(J=l[F],u.hasOwnProperty(F)&&(G!=null||J!=null))switch(F){case"type":m=G;break;case"name":p=G;break;case"checked":B=G;break;case"defaultChecked":Y=G;break;case"value":b=G;break;case"defaultValue":E=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(i(137,s));break;default:G!==J&&it(r,s,F,G,u,J)}}Fh(r,b,E,O,B,Y,m,p);return;case"select":G=b=E=F=null;for(m in l)if(O=l[m],l.hasOwnProperty(m)&&O!=null)switch(m){case"value":break;case"multiple":G=O;default:u.hasOwnProperty(m)||it(r,s,m,null,u,O)}for(p in u)if(m=u[p],O=l[p],u.hasOwnProperty(p)&&(m!=null||O!=null))switch(p){case"value":F=m;break;case"defaultValue":E=m;break;case"multiple":b=m;default:m!==O&&it(r,s,p,m,u,O)}s=E,l=b,u=G,F!=null?ca(r,!!l,F,!1):!!u!=!!l&&(s!=null?ca(r,!!l,s,!0):ca(r,!!l,l?[]:"",!1));return;case"textarea":G=F=null;for(E in l)if(p=l[E],l.hasOwnProperty(E)&&p!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:it(r,s,E,null,u,p)}for(b in u)if(p=u[b],m=l[b],u.hasOwnProperty(b)&&(p!=null||m!=null))switch(b){case"value":F=p;break;case"defaultValue":G=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==m&&it(r,s,b,p,u,m)}iy(r,F,G);return;case"option":for(var ge in l)F=l[ge],l.hasOwnProperty(ge)&&F!=null&&!u.hasOwnProperty(ge)&&(ge==="selected"?r.selected=!1:it(r,s,ge,null,u,F));for(O in u)F=u[O],G=l[O],u.hasOwnProperty(O)&&F!==G&&(F!=null||G!=null)&&(O==="selected"?r.selected=F&&typeof F!="function"&&typeof F!="symbol":it(r,s,O,F,u,G));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in l)F=l[ke],l.hasOwnProperty(ke)&&F!=null&&!u.hasOwnProperty(ke)&&it(r,s,ke,null,u,F);for(B in u)if(F=u[B],G=l[B],u.hasOwnProperty(B)&&F!==G&&(F!=null||G!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,s));break;default:it(r,s,B,F,u,G)}return;default:if(Vh(s)){for(var st in l)F=l[st],l.hasOwnProperty(st)&&F!==void 0&&!u.hasOwnProperty(st)&&Mp(r,s,st,void 0,u,F);for(Y in u)F=u[Y],G=l[Y],!u.hasOwnProperty(Y)||F===G||F===void 0&&G===void 0||Mp(r,s,Y,F,u,G);return}}for(var j in l)F=l[j],l.hasOwnProperty(j)&&F!=null&&!u.hasOwnProperty(j)&&it(r,s,j,null,u,F);for(J in u)F=u[J],G=l[J],!u.hasOwnProperty(J)||F===G||F==null&&G==null||it(r,s,J,F,u,G)}function lw(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lA(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],m=p.transferSize,b=p.initiatorType,E=p.duration;if(m&&E&&lw(b)){for(b=0,E=p.responseEnd,u+=1;u<l.length;u++){var O=l[u],B=O.startTime;if(B>E)break;var Y=O.transferSize,J=O.initiatorType;Y&&lw(J)&&(O=O.responseEnd,b+=Y*(O<E?1:(E-B)/(O-B)))}if(--u,s+=8*(m+b)/(p.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Lp=null,Np=null;function Bu(r){return r.nodeType===9?r:r.ownerDocument}function cw(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function uw(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function Dp(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var jp=null;function cA(){var r=window.event;return r&&r.type==="popstate"?r===jp?!1:(jp=r,!0):(jp=null,!1)}var dw=typeof setTimeout=="function"?setTimeout:void 0,uA=typeof clearTimeout=="function"?clearTimeout:void 0,hw=typeof Promise=="function"?Promise:void 0,dA=typeof queueMicrotask=="function"?queueMicrotask:typeof hw<"u"?function(r){return hw.resolve(null).then(r).catch(hA)}:dw;function hA(r){setTimeout(function(){throw r})}function ji(r){return r==="head"}function fw(r,s){var l=s,u=0;do{var p=l.nextSibling;if(r.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){r.removeChild(p),Ba(s);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;
vendor: 9,307 bytes, line 10
10else if(l==="html")_l(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,_l(l);for(var m=l.firstChild;m;){var b=m.nextSibling,E=m.nodeName;m[Io]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=b}}else l==="body"&&_l(r.ownerDocument.body);l=p}while(l);Ba(s)}function pw(r,s){var l=r;r=0;do{var u=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=u}while(l)}function Ip(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Ip(l),Bh(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function fA(r,s,l,u){for(;r.nodeType===1;){var p=l;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){if(!r[Io])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(m=r.getAttribute("rel"),m==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(m!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(m=r.getAttribute("src"),(m!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===m)return r}else return r;if(r=Zn(r.nextSibling),r===null)break}return null}function pA(r,s,l){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=Zn(r.nextSibling),r===null))return null;return r}function gw(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Zn(r.nextSibling),r===null))return null;return r}function $p(r){return r.data==="$?"||r.data==="$~"}function zp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function gA(r,s){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||l.readyState!=="loading")s();else{var u=function(){s(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function Zn(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var Up=null;function mw(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(s===0)return Zn(r.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}r=r.nextSibling}return null}function vw(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return r;s--}else l!=="/$"&&l!=="/&"||s++}r=r.previousSibling}return null}function yw(r,s,l){switch(s=Bu(l),r){case"html":if(r=s.documentElement,!r)throw Error(i(452));return r;case"head":if(r=s.head,!r)throw Error(i(453));return r;case"body":if(r=s.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function _l(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);Bh(r)}var Xn=new Map,_w=new Set;function qu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Wr=Z.d;Z.d={f:mA,r:vA,D:yA,C:_A,L:bA,m:wA,X:EA,S:SA,M:kA};function mA(){var r=Wr.f(),s=Lu();return r||s}function vA(r){var s=aa(r);s!==null&&s.tag===5&&s.type==="form"?j_(s):Wr.r(r)}var $a=typeof document>"u"?null:document;function bw(r,s,l){var u=$a;if(u&&typeof s=="string"&&s){var p=Hn(s);p='link[rel="'+r+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),_w.has(p)||(_w.add(p),r={rel:r,crossOrigin:l,href:s},u.querySelector(p)===null&&(s=u.createElement("link"),Wt(s,"link",r),zt(s),u.head.appendChild(s)))}}function yA(r){Wr.D(r),bw("dns-prefetch",r,null)}function _A(r,s){Wr.C(r,s),bw("preconnect",r,s)}function bA(r,s,l){Wr.L(r,s,l);var u=$a;if(u&&r&&s){var p='link[rel="preload"][as="'+Hn(s)+'"]';s==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+Hn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+Hn(l.imageSizes)+'"]')):p+='[href="'+Hn(r)+'"]';var m=p;switch(s){case"style":m=za(r);break;case"script":m=Ua(r)}Xn.has(m)||(r=v({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:r,as:s},l),Xn.set(m,r),u.querySelector(p)!==null||s==="style"&&u.querySelector(bl(m))||s==="script"&&u.querySelector(wl(m))||(s=u.createElement("link"),Wt(s,"link",r),zt(s),u.head.appendChild(s)))}}function wA(r,s){Wr.m(r,s);var l=$a;if(l&&r){var u=s&&typeof s.as=="string"?s.as:"script",p='link[rel="modulepreload"][as="'+Hn(u)+'"][href="'+Hn(r)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Ua(r)}if(!Xn.has(m)&&(r=v({rel:"modulepreload",href:r},s),Xn.set(m,r),l.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(wl(m)))return}u=l.createElement("link"),Wt(u,"link",r),zt(u),l.head.appendChild(u)}}}function SA(r,s,l){Wr.S(r,s,l);var u=$a;if(u&&r){var p=oa(u).hoistableStyles,m=za(r);s=s||"default";var b=p.get(m);if(!b){var E={loading:0,preload:null};if(b=u.querySelector(bl(m)))E.loading=5;else{r=v({rel:"stylesheet",href:r,"data-precedence":s},l),(l=Xn.get(m))&&Bp(r,l);var O=b=u.createElement("link");zt(O),Wt(O,"link",r),O._p=new Promise(function(B,Y){O.onload=B,O.onerror=Y}),O.addEventListener("load",function(){E.loading|=1}),O.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Fu(b,s,u)}b={type:"stylesheet",instance:b,count:1,state:E},p.set(m,b)}}}function EA(r,s){Wr.X(r,s);var l=$a;if(l&&r){var u=oa(l).hoistableScripts,p=Ua(r),m=u.get(p);m||(m=l.querySelector(wl(p)),m||(r=v({src:r,async:!0},s),(s=Xn.get(p))&&qp(r,s),m=l.createElement("script"),zt(m),Wt(m,"link",r),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function kA(r,s){Wr.M(r,s);var l=$a;if(l&&r){var u=oa(l).hoistableScripts,p=Ua(r),m=u.get(p);m||(m=l.querySelector(wl(p)),m||(r=v({src:r,async:!0,type:"module"},s),(s=Xn.get(p))&&qp(r,s),m=l.createElement("script"),zt(m),Wt(m,"link",r),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function ww(r,s,l,u){var p=(p=Te.current)?qu(p):null;if(!p)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=za(l.href),l=oa(p).hoistableStyles,u=l.get(s),u||(u={type:"style",instance:null,count:0,state:null},l.set(s,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=za(l.href);var m=oa(p).hoistableStyles,b=m.get(r);if(b||(p=p.ownerDocument||p,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(r,b),(m=p.querySelector(bl(r)))&&!m._p&&(b.instance=m,b.state.loading=5),Xn.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Xn.set(r,l),m||xA(p,r,l,b.state))),s&&u===null)throw Error(i(528,""));return b}if(s&&u!==null)throw Error(i(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Ua(l),l=oa(p).hoistableScripts,u=l.get(s),u||(u={type:"script",instance:null,count:0,state:null},l.set(s,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function za(r){return'href="'+Hn(r)+'"'}function bl(r){return'link[rel="stylesheet"]['+r+"]"}function Sw(r){return v({},r,{"data-precedence":r.precedence,precedence:null})}function xA(r,s,l,u){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?u.loading=1:(s=r.createElement("link"),u.preload=s,s.addEventListener("load",function(){return u.loading|=1}),s.addEventListener("error",function(){return u.loading|=2}),Wt(s,"link",l),zt(s),r.head.appendChild(s))}function Ua(r){return'[src="'+Hn(r)+'"]'}function wl(r){return"script[async]"+r}function Ew(r,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var u=r.querySelector('style[data-href~="'+Hn(l.href)+'"]');if(u)return s.instance=u,zt(u),u;var p=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),zt(u),Wt(u,"style",p),Fu(u,l.precedence,r),s.instance=u;case"stylesheet":p=za(l.href);var m=r.querySelector(bl(p));
vendor: 4,083 bytes, line 10
10if(m)return s.state.loading|=4,s.instance=m,zt(m),m;u=Sw(l),(p=Xn.get(p))&&Bp(u,p),m=(r.ownerDocument||r).createElement("link"),zt(m);var b=m;return b._p=new Promise(function(E,O){b.onload=E,b.onerror=O}),Wt(m,"link",u),s.state.loading|=4,Fu(m,l.precedence,r),s.instance=m;case"script":return m=Ua(l.src),(p=r.querySelector(wl(m)))?(s.instance=p,zt(p),p):(u=l,(p=Xn.get(m))&&(u=v({},l),qp(u,p)),r=r.ownerDocument||r,p=r.createElement("script"),zt(p),Wt(p,"link",u),r.head.appendChild(p),s.instance=p);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(u=s.instance,s.state.loading|=4,Fu(u,l.precedence,r));return s.instance}function Fu(r,s,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,b=0;b<u.length;b++){var E=u[b];if(E.dataset.precedence===s)m=E;else if(m!==p)break}m?m.parentNode.insertBefore(r,m.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(r,s.firstChild))}function Bp(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function qp(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var Hu=null;function kw(r,s,l){if(Hu===null){var u=new Map,p=Hu=new Map;p.set(l,u)}else p=Hu,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(r))return u;for(u.set(r,null),l=l.getElementsByTagName(r),p=0;p<l.length;p++){var m=l[p];if(!(m[Io]||m[Vt]||r==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(s)||"";b=r+b;var E=u.get(b);E?E.push(m):u.set(b,[m])}}return u}function xw(r,s,l){r=r.ownerDocument||r,r.head.insertBefore(l,s==="title"?r.querySelector("head > title"):null)}function TA(r,s,l){if(l===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(r=s.disabled,typeof s.precedence=="string"&&r==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Tw(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function RA(r,s,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=za(u.href),m=s.querySelector(bl(p));if(m){s=m._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=Vu.bind(r),s.then(r,r)),l.state.loading|=4,l.instance=m,zt(m);return}m=s.ownerDocument||s,u=Sw(u),(p=Xn.get(p))&&Bp(u,p),m=m.createElement("link"),zt(m);var b=m;b._p=new Promise(function(E,O){b.onload=E,b.onerror=O}),Wt(m,"link",u),l.instance=m}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=Vu.bind(r),s.addEventListener("load",l),s.addEventListener("error",l))}}var Fp=0;function AA(r,s){return r.stylesheets&&r.count===0&&Yu(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var u=setTimeout(function(){if(r.stylesheets&&Yu(r,r.stylesheets),r.unsuspend){var m=r.unsuspend;r.unsuspend=null,m()}},6e4+s);0<r.imgBytes&&Fp===0&&(Fp=62500*lA());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Yu(r,r.stylesheets),r.unsuspend)){var m=r.unsuspend;r.unsuspend=null,m()}},(r.imgBytes>Fp?50:800)+s);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Gu=null;function Yu(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Gu=new Map,s.forEac
vendor: 7,730 bytes, line 10
10h(CA,r),Gu=null,Vu.call(r))}function CA(r,s){if(!(s.state.loading&4)){var l=Gu.get(r);if(l)var u=l.get(null);else{l=new Map,Gu.set(r,l);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var b=p[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),u=b)}u&&l.set(null,u)}p=s.instance,b=p.getAttribute("data-precedence"),m=l.get(b)||u,m===u&&l.set(null,p),l.set(b,p),this.count++,u=Vu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),m?m.parentNode.insertBefore(p,m.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),s.state.loading|=4}}var Sl={$$typeof:A,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function OA(r,s,l,u,p,m,b,E,O){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ih(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ih(0),this.hiddenUpdates=Ih(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function Rw(r,s,l,u,p,m,b,E,O,B,Y,J){return r=new OA(r,s,l,b,O,B,Y,J,E),s=1,m===!0&&(s|=24),m=On(3,null,null,s),r.current=m,m.stateNode=r,s=Sf(),s.refCount++,r.pooledCache=s,s.refCount++,m.memoizedState={element:u,isDehydrated:l,cache:s},Tf(m),r}function Aw(r){return r?(r=va,r):va}function Cw(r,s,l,u,p,m){p=Aw(p),u.context===null?u.context=p:u.pendingContext=p,u=xi(s),u.payload={element:l},m=m===void 0?null:m,m!==null&&(u.callback=m),l=Ti(r,u,s),l!==null&&(bn(l,r,s),el(l,r,s))}function Ow(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<s?l:s}}function Hp(r,s){Ow(r,s),(r=r.alternate)&&Ow(r,s)}function Pw(r){if(r.tag===13||r.tag===31){var s=_s(r,67108864);s!==null&&bn(s,r,67108864),Hp(r,67108864)}}function Mw(r){if(r.tag===13||r.tag===31){var s=Dn();s=$h(s);var l=_s(r,s);l!==null&&bn(l,r,s),Hp(r,s)}}var Ku=!0;function PA(r,s,l,u){var p=H.T;H.T=null;var m=Z.p;try{Z.p=2,Vp(r,s,l,u)}finally{Z.p=m,H.T=p}}function MA(r,s,l,u){var p=H.T;H.T=null;var m=Z.p;try{Z.p=8,Vp(r,s,l,u)}finally{Z.p=m,H.T=p}}function Vp(r,s,l,u){if(Ku){var p=Gp(u);if(p===null)Pp(r,s,u,Wu,l),Nw(r,u);else if(NA(p,r,s,l,u))u.stopPropagation();else if(Nw(r,u),s&4&&-1<LA.indexOf(r)){for(;p!==null;){var m=aa(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=ps(m.pendingLanes);if(b!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;b;){var O=1<<31-An(b);E.entanglements[1]|=O,b&=~O}wr(m),(et&6)===0&&(Pu=tn()+500,ml(0))}}break;case 31:case 13:E=_s(m,2),E!==null&&bn(E,m,2),Lu(),Hp(m,2)}if(m=Gp(u),m===null&&Pp(r,s,u,Wu,l),m===p)break;p=m}p!==null&&u.stopPropagation()}else Pp(r,s,u,null,l)}}function Gp(r){return r=Yh(r),Yp(r)}var Wu=null;function Yp(r){if(Wu=null,r=sa(r),r!==null){var s=o(r);if(s===null)r=null;else{var l=s.tag;if(l===13){if(r=c(s),r!==null)return r;r=null}else if(l===31){if(r=d(s),r!==null)return r;r=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return Wu=r,null}function Lw(r){switch(r){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ct()){case Ht:return 2;case vr:return 8;case ra:case _R:return 32;case Fv:return 268435456;default:return 32}default:return 32}}var Kp=!1,Ii=null,$i=null,zi=null,El=new Map,kl=new Map,Ui=[],LA="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".split(" ");function Nw(r,s){switch(r){case"focusin":case"focusout":Ii=null;break;case"dragenter":case"dragleave":$i=null;break;case"mouseover":case"mouseout":zi=null;break;case"pointerover":case"pointerout":El.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(s.pointerId)}}function xl(r,s,l,u,p,m){return r===null||r.nativeEvent!==m?(r={blockedOn:s,domEventName:l,eventSystemFlags:u,nativeEvent:m,targetContainers:[p]},s!==null&&(s=aa(s),s!==null&&Pw(s)),r):(r.eventSystemFlags|=u,s=r.targetContainers,p!==null&&s.indexOf(p)===-1&&s.push(p),r)}function NA(r,s,l,u,p){switch(s){case"focusin":return Ii=xl(Ii,r,s,l,u,p),!0;case"dragenter":return $i=xl($i,r,s,l,u,p),!0;case"mouseover":return zi=xl(zi,r,s,l,u,p),!0;case"pointerover":var m=p.pointerId;return El.set(m,xl(El.get(m)||null,r,s,l,u,p)),!0;case"gotpointercapture":return m=p.pointerId,kl.set(m,xl(kl.get(m)||null,r,s,l,u,p)),!0}return!1}function Dw(r){var s=sa(r.target);if(s!==null){var l=o(s);if(l!==null){if(s=l.tag,s===13){if(s=c(l),s!==null){r.blockedOn=s,Wv(r.priority,function(){Mw(l)});return}}else if(s===31){if(s=d(l),s!==null){r.blockedOn=s,Wv(r.priority,function(){Mw(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Ju(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var l=Gp(r.nativeEvent);if(l===null){l=r.nativeEvent;var u=new l.constructor(l.type,l);Gh=u,l.target.dispatchEvent(u),Gh=null}else return s=aa(l),s!==null&&Pw(s),r.blockedOn=l,!1;s.shift()}return!0}function jw(r,s,l){Ju(r)&&l.delete(s)}function DA(){Kp=!1,Ii!==null&&Ju(Ii)&&(Ii=null),$i!==null&&Ju($i)&&($i=null),zi!==null&&Ju(zi)&&(zi=null),El.forEach(jw),kl.forEach(jw)}function Zu(r,s){r.blockedOn===s&&(r.blockedOn=null,Kp||(Kp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,DA)))}var Xu=null;function Iw(r){Xu!==r&&(Xu=r,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Xu===r&&(Xu=null);for(var s=0;s<r.length;s+=3){var l=r[s],u=r[s+1],p=r[s+2];if(typeof u!="function"){if(Yp(u||l)===null)continue;break}var m=aa(l);m!==null&&(r.splice(s,3),s-=3,Gf(m,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function Ba(r){function s(O){return Zu(O,r)}Ii!==null&&Zu(Ii,r),$i!==null&&Zu($i,r),zi!==null&&Zu(zi,r),El.forEach(s),kl.forEach(s);for(var l=0;l<Ui.length;l++){var u=Ui[l];u.blockedOn===r&&(u.blockedOn=null)}for(;0<Ui.length&&(l=Ui[0],l.blockedOn===null);)Dw(l),l.blockedOn===null&&Ui.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(u=0;
10u<l.length;u+=3){var p=l[u],m=l[u+1],b=p[pn]||null;if(typeof m=="function")b||Iw(l);else if(b){var E=null;if(m&&m.hasAttribute("formAction")){if(p=m,b=m[pn]||null)E=b.formAction;else if(Yp(p)!==null)continue}else E=b.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),Iw(l)}}}function $w(){function r(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return p=b})},focusReset:"manual",scroll:"manual"})}function s(){p!==null&&(p(),p=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),p!==null&&(p(),p=null)}}}function Wp(r){this._internalRoot=r}Qu.prototype.render=Wp.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var l=s.current,u=Dn();Cw(l,u,r,s,null,null)},Qu.prototype.unmount=Wp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Cw(r.current,2,null,r,null,null),Lu(),s[ia]=null}};function Qu(r){this._internalRoot=r}Qu.prototype.unstable_scheduleHydration=function(r){if(r){var s=Kv();r={blockedOn:null,target:r,priority:s};for(var l=0;l<Ui.length&&s!==0&&s<Ui[l].priority;l++);Ui.splice(l,0,r),l===0&&Dw(r)}};var zw=e.version;if(zw!=="19.2.6")throw Error(i(527,zw,"19.2.6"));Z.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(s),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var jA={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ed=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ed.isDisabled&&ed.supportsFiber)try{No=ed.inject(jA),Rn=ed}catch{}}return Rl.createRoot=function(r,s){if(!a(r))throw Error(i(299));var l=!1,u="",p=G_,m=Y_,b=K_;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(m=s.onCaughtError),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),s=Rw(r,1,!1,null,null,l,u,null,p,m,b,$w),r[ia]=s.current,Op(r),new Wp(s)},Rl.hydrateRoot=function(r,s,l){if(!a(r))throw Error(i(299));var u=!1,p="",m=G_,b=Y_,E=K_,O=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(O=l.formState)),s=Rw(r,1,!0,s,l??null,u,p,O,m,b,E,$w),s.context=Aw(null),l=s.current,u=Dn(),u=$h(u),p=xi(u),p.callback=null,Ti(l,p,u),l=u,s.current.lanes=l,jo(s,l),wr(s),r[ia]=s.current,Op(r),new Qu(s)},Rl.version="19.2.6",Rl}var Ww;function GA(){if(Ww)return Xp.exports;Ww=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Xp.exports=VA(),Xp.exports}var YA=GA(),KA="__TSS_CONTEXT",Gg=Symbol.for("TSS_SERVER_FUNCTION"),Jw=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),WA="application/x-tss-framed",Jr={JSON:0,CHUNK:1,END:2,ERROR:3},JA=/;\s*v=(\d+)/;function ZA(t){const e=t.match(JA);return e?parseInt(e[1],10):void 0}function XA(t){const e=ZA(t);if(e!==void 0&&e!==1)throw new Error(`Incompatible framed protocol version: server=${e}, client=1. Please ensure client and server are using compatible versions.`)}var hv=()=>window.__TSS_START_OPTIONS__;const ZE=!1;function hc(t){return t[t.length-1]}function QA(t){return typeof t=="function"}function Zi(t,e){return QA(t)?t(e):t}const XE=Object.prototype.hasOwnProperty,Zw=Object.prototype.propertyIsEnumerable;function QE(t){for(const e in t)if(XE.call(t,e))return!0;return!1}const eC=()=>Object.create(null),Ms=(t,e)=>Bs(t,e,eC);function Bs(t,e,n=()=>({}),i=0){if(t===e)return t;if(i>500)return e;const a=e,o=e0(t)&&e0(a);if(!o&&!(So(t)&&So(a)))return a;const c=o?t:Xw(t);if(!c)return a;const d=o?a:Xw(a);if(!d)return a;const h=c.length,f=d.length,g=o?new Array(f):n();let v=0;for(let y=0;y<f;y++){const _=o?y:d[y],w=t[_],S=a[_];if(w===S){g[_]=w,(o?y<h:XE.call(t,_))&&v++;continue}if(w===null||S===null||typeof w!="object"||typeof S!="object"){g[_]=S;continue}const k=Bs(w,S,n,i+1);g[_]=k,k===w&&v++}return h===f&&v===h?t:g}function Xw(t){const e=Object.getOwnPropertyNames(t);for(const a of e)if(!Zw.call(t,a))return!1;const n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;const i=e;for(const a of n){if(!Zw.call(t,a))return!1;i.push(a)}return i}function So(t){if(!Qw(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;
10return!(!Qw(n)||!n.hasOwnProperty("isPrototypeOf"))}function Qw(t){return Object.prototype.toString.call(t)==="[object Object]"}function e0(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function En(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let i=0,a=t.length;i<a;i++)if(!En(t[i],e[i],n))return!1;return!0}if(So(t)&&So(e)){const i=n?.ignoreUndefined??!0;if(n?.partial){for(const c in e)if((!i||e[c]!==void 0)&&!En(t[c],e[c],n))return!1;return!0}let a=0;if(!i)a=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&a++;let o=0;for(const c in e)if((!i||e[c]!==void 0)&&(o++,o>a||!En(t[c],e[c],n)))return!1;return a===o}return!1}function Ws(t){let e,n;const i=new Promise((a,o)=>{e=a,n=o});return i.status="pending",i.resolve=a=>{i.status="resolved",i.value=a,e(a),t?.(a)},i.reject=a=>{i.status="rejected",n(a)},i}function tC(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function fc(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function nC(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function t0(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return nC(e)}const rC=["http:","https:","mailto:","tel:"];function jd(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}const iC={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},sC=/[&><\u2028\u2029]/g;function aC(t){return t.replace(sC,e=>iC[e])}function Al(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let n=0,i="",a;for(;(a=e.exec(t))!==null;)i+=t0(t.slice(n,a.index))+a[0],n=e.lastIndex;i=i+t0(n?t.slice(n):t);let o=!1;return i.startsWith("//")&&(o=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:o}}function oC(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function lC(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function xn(){throw new Error("Invariant failed")}function pc(t){const e=new Map;let n,i;const a=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,i&&(i.next=o,o.prev=i)):(o.next.prev=void 0,n=o.next,o.next=void 0,i&&(o.prev=i,i.next=o)),i=o)};return{get(o){const c=e.get(o);if(c)return a(c),c.value},set(o,c){if(e.size>=t&&n){const h=n;e.delete(h.key),h.next&&(n=h.next,h.next.prev=void 0),h===i&&(i=void 0)}const d=e.get(o);if(d)d.value=c,a(d);else{const h={key:o,value:c,prev:i};i&&(i.next=h),i=h,n||(n=h),e.set(o,h)}},clear(){e.clear(),n=void 0,i=void 0}}}const Xi=4,ek=5;function cC(t){const e=t.indexOf("{");if(e===-1)return null;const n=t.indexOf("}",e);return n===-1||e+1>=t.length?null:[e,n]}function tk(t,e,n=new Uint16Array(6)){const i=t.indexOf("/",e),a=i===-1?t.length:i,o=t.substring(e,a);if(!o||!o.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=a,n[4]=a,n[5]=a,n;if(o==="$"){const d=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=d,n[4]=d,n[5]=d,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=a,n[4]=a,n[5]=a,n;const c=cC(o);if(c){const[d,h]=c,f=o.charCodeAt(d+1);if(f===45){if(d+2<o.length&&o.charCodeAt(d+2)===36){const g=d+3,v=h;if(g<v)return n[0]=3,n[1]=e+d,n[2]=e+g,n[3]=e+v,n[4]=e+h+1,n[5]=a,n}}else if(f===36){const g=d+1,v=d+2;return v===h?(n[0]=2,n[1]=e+d,n[2]=e+g,n[3]=e+v,n[4]=e+h+1,n[5]=t.length,n):(n[0]=1,n[1]=e+d,n[2]=e+v,n[3]=e+h,n[4]=e+h+1,n[5]=a,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=a,n[4]=a,n[5]=a,n}function wh(t,e,n,i,a,o,c){c?.(n);let d=i;{const h=n.fullPath??n.from,f=h.length,g=n.options?.caseSensitive??t,v=n.options?.params?.parse??n.options?.parseParams;for(;d<f;){const _=tk(h,d,e);let w;const S=d,k=_[5];switch(d=k+1,o++,_[0]){case 0:{const x=h.substring(_[2],_[3]);if(g){const C=a.static?.get(x);if(C)w=C;else{a.static??=new Map;const A=qs(n.fullPath??n.from);A.parent=a,A.depth=o,w=A,a.static.set(x,A)}}else{const C=x.toLowerCase(),A=a.staticInsensitive?.get(C);if(A)w=A;else{a.staticInsensitive??=new Map;const M=qs(n.fullPath??n.from);M.parent=a,M.depth=o,w=M,a.staticInsensitive.set(C,M)}}break}case 1:{const x=h.substring(S,_[1]),C=h.substring(_[4],k),A=g&&!!(x||C),M=x?A?x:x.toLowerCase():void 0,D=C?A?C:C.toLowerCase():void 0,$=!v&&a.dynamic?.find(L=>
10!L.parse&&L.caseSensitive===A&&L.prefix===M&&L.suffix===D);if($)w=$;else{const L=rg(1,n.fullPath??n.from,A,M,D);w=L,L.depth=o,L.parent=a,a.dynamic??=[],a.dynamic.push(L)}break}case 3:{const x=h.substring(S,_[1]),C=h.substring(_[4],k),A=g&&!!(x||C),M=x?A?x:x.toLowerCase():void 0,D=C?A?C:C.toLowerCase():void 0,$=!v&&a.optional?.find(L=>!L.parse&&L.caseSensitive===A&&L.prefix===M&&L.suffix===D);if($)w=$;else{const L=rg(3,n.fullPath??n.from,A,M,D);w=L,L.parent=a,L.depth=o,a.optional??=[],a.optional.push(L)}break}case 2:{const x=h.substring(S,_[1]),C=h.substring(_[4],k),A=g&&!!(x||C),M=x?A?x:x.toLowerCase():void 0,D=C?A?C:C.toLowerCase():void 0,$=rg(2,n.fullPath??n.from,A,M,D);w=$,$.parent=a,$.depth=o,a.wildcard??=[],a.wildcard.push($)}}a=w}if(v&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const _=qs(n.fullPath??n.from);_.kind=ek,_.parent=a,o++,_.depth=o,a.pathless??=[],a.pathless.push(_),a=_}const y=(n.path||!n.children)&&!n.isRoot;if(y&&h.endsWith("/")){const _=qs(n.fullPath??n.from);_.kind=Xi,_.parent=a,o++,_.depth=o,a.index=_,a=_}
10a.parse=v??null,a.priority=n.options?.params?.priority??0,y&&!a.route&&(a.route=n,a.fullPath=n.fullPath??n.from)}if(n.children)for(const h of n.children)wh(t,e,h,d,a,o,c)}function ng(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function Vi(t){if(t.pathless)for(const e of t.pathless)Vi(e);if(t.static)for(const e of t.static.values())Vi(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())Vi(e);if(t.dynamic?.length){t.dynamic.sort(ng);for(const e of t.dynamic)Vi(e)}if(t.optional?.length){t.optional.sort(ng);for(const e of t.optional)Vi(e)}if(t.wildcard?.length){t.wildcard.sort(ng);for(const e of t.wildcard)Vi(e)}}function qs(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}function rg(t,e,n,i,a){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:n,prefix:i,suffix:a}}function uC(t,e){const n=qs("/"),i=new Uint16Array(6);for(const a of t)wh(!1,i,a,1,n,0);Vi(n),e.masksTree=n,e.flatCache=pc(1e3)}function dC(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const i=fv(t,e.masksTree);return e.flatCache.set(t,i),i}function hC(t,e,n,i,a){t||="/",i||="/";const o=e?`case\0${t}`:t;let c=a.singleCache.get(o);return c||(c=qs("/"),wh(e,new Uint16Array(6),{from:t},1,c,0),a.singleCache.set(o,c)),fv(i,c,n)}function fC(t,e,n=!1){const i=n?t:`nofuzz\0${t}`,a=e.matchCache.get(i);if(a!==void 0)return a;t||="/";let o;try{o=fv(t,e.segmentTree,n)}catch(c){if(c instanceof URIError)o=null;else throw c}return o&&(o.branch=rk(o.route)),e.matchCache.set(i,o),o}function pC(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function gC(t,e=!1,n){const i=qs(t.fullPath),a=new Uint16Array(6),o={},c={};let d=0;return wh(e,a,t,1,i,0,h=>{if(n?.(h,d),h.id in o&&xn(),o[h.id]=h,d!==0&&h.path){const f=pC(h.fullPath);(!c[f]||h.fullPath.endsWith("/"))&&(c[f]=h)}d++}),Vi(i),{processedTree:{segmentTree:i,singleCache:pc(1e3),matchCache:pc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function fv(t,e,n=!1){const i=t.split("/"),a=vC(t,i,e,n);if(!a)return null;const[o]=nk(t,i,a);return{route:a.node.route,rawParams:o}}function nk(t,e,n){const i=mC(n.node);let a=null;const o=Object.create(null);let c=n.extract?.part??0,d=n.extract?.node??0,h=n.extract?.path??0,f=n.extract?.segment??0;for(;d<i.length;c++,d++,h++,f++){const g=i[d];if(g.kind===Xi)break;if(g.kind===ek){f--,c--,h--;continue}const v=e[c],y=h;if(v&&(h+=v.length),g.kind===1){a??=n.node.fullPath.split("/");const _=a[f],w=g.prefix?.length??0;if(_.charCodeAt(w)===123){const S=g.suffix?.length??0,k=_.substring(w+2,_.length-S-1),x=v.substring(w,v.length-S);o[k]=decodeURIComponent(x)}else{const S=_.substring(1);o[S]=decodeURIComponent(v)}}else if(g.kind===3){if(n.skipped&1<<d){c--,h=y-1;continue}a??=n.node.fullPath.split("/");const _=a[f],w=g.prefix?.length??0,S=g.suffix?.length??0,k=_.substring(w+3,_.length-S-1),x=g.suffix||g.prefix?v.substring(w,v.length-S):v;x&&(o[k]=decodeURIComponent(x))}else if(g.kind===2){const _=g,w=t.substring(y+(_.prefix?.length??0),t.length-(_.suffix?.length??0)),S=decodeURIComponent(w);o["*"]=S,o._splat=S;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:c,node:d,path:h,segment:f}]}function rk(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function mC(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function vC(t,e,n,i){if(t==="/"&&n.index)return{node:n.index,skipped:0};const a=!hc(e),o=a&&t!=="/",c=e.length-(a?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let h=null,f=null;for(;d.length;){const g=d.pop(),{node:v,index:y,skipped:_,depth:w,statics:S,dynamics:k,optionals:x}=g;let{extract:C,rawParams:A}=g;if(v.kind===2&&v.route&&!nd(f,g))continue;if(v.parse){if(!n0(t,e,g))continue;A=g.rawParams,C=g.extract}i&&v.route&&v.kind!==Xi&&nd(h,g)&&(h=g);const M=y===c;if(M&&(v.route&&(!o||v.kind===Xi||v.kind===2)&&nd(f,g)&&(f=g),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const D=M?void 0:e[y];let $;if(M&&v.index){const L={node:v.index,index:y,skipped:_,depth:w+1,statics:S,dynamics:k,optionals:x,extract:C,rawParams:A};let I=!0;if(v.index.parse&&(n0(t,e,L)||(I=!1)),I){if(!k&&!x&&!_&&yC(S,c))return L;nd(f,L)&&(f=L)}}if(v.wildcard)for(let L=v.wildcard.length-1;L>=0;L--){const I=v.wildcard[L],{prefix:U,suffix:X}=I;if(!(U&&(M||!(I.caseSensitive?D:$??=D.toLowerCase()).startsWith(U)))){if(X){if(M
10)continue;const Q=e.slice(y).join("/").slice(-X.length);if((I.caseSensitive?Q:Q.toLowerCase())!==X)continue}d.push({node:I,index:c,skipped:_,depth:w+1,statics:S,dynamics:k,optionals:x,extract:C,rawParams:A})}}if(v.optional){const L=_|1<<w,I=w+1;for(let U=v.optional.length-1;U>=0;U--){const X=v.optional[U];d.push({node:X,index:y,skipped:L,depth:I,statics:S,dynamics:k,optionals:x,extract:C,rawParams:A})}if(!M)for(let U=v.optional.length-1;U>=0;U--){const X=v.optional[U],{prefix:Q,suffix:te}=X;if(Q||te){const _e=X.caseSensitive?D:$??=D.toLowerCase();if(Q&&!_e.startsWith(Q)||te&&!_e.endsWith(te))continue}d.push({node:X,index:y+1,skipped:_,depth:I,statics:S,dynamics:k,optionals:x+td(c,y),extract:C,rawParams:A})}}if(!M&&v.dynamic&&D)for(let L=v.dynamic.length-1;L>=0;L--){const I=v.dynamic[L],{prefix:U,suffix:X}=I;if(U||X){const Q=I.caseSensitive?D:$??=D.toLowerCase();if(U&&!Q.startsWith(U)||X&&!Q.endsWith(X))continue}d.push({node:I,index:y+1,skipped:_,depth:w+1,statics:S,dynamics:k+td(c,y),optionals:x,extract:C,rawParams:A})}if(!M&&v.staticInsensitive){const L=v.staticInsensitive.get($??=D.toLowerCase());L&&d.push({node:L,index:y+1,skipped:_,depth:w+1,statics:S+td(c,y),dynamics:k,optionals:x,extract:C,rawParams:A})}if(!M&&v.static){const L=v.static.get(D);L&&d.push({node:L,index:y+1,skipped:_,depth:w+1,statics:S+td(c,y),dynamics:k,optionals:x,extract:C,rawParams:A})}if(v.pathless){const L=w+1;for(let I=v.pathless.length-1;I>=0;I--){const U=v.pathless[I];d.push({node:U,index:y,skipped:_,depth:L,statics:S,dynamics:k,optionals:x,extract:C,rawParams:A})}}}if(f)return f;if(i&&h){let g=h.index;for(let y=0;y<h.index;y++)g+=e[y].length;const v=g===t.length?"/":t.slice(g);return h.rawParams??=Object.create(null),h.rawParams["**"]=decodeURIComponent(v),h}return null}function td(t,e){return 2**(t-e-1)}function yC(t,e){return t===2**(e-1)-1}function n0(t,e,n){let i,a;try{[i,a]=nk(t,e,n)}catch{return null}if(n.rawParams=i,n.extract=a,!n.node.parse)return!0;try{if(n.node.parse(i)===!1)return null}catch{}return!0}function nd(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===Xi)>(t.node.kind===Xi)||e.node.kind===Xi==(t.node.kind===Xi)&&e.depth>t.depth))):!0}function kd(t){return pv(t.filter(e=>e!==void 0).join("/"))}function pv(t){return t.replace(/\/{2,}/g,"/")}function ik(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function oi(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function sk(t){return oi(ik(t))}function Id(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function _C(t,e,n){return Id(t,n)===Id(e,n)}function bC({base:t,to:e,trailingSlash:n="never",cache:i}){const a=e.startsWith("/"),o=!a&&e===".";let c;if(i){c=a?e:o?t:t+"\0"+e;const f=i.get(c);if(f)return f}let d;if(o)d=t.split("/");else if(a)d=e.split("/");else{for(d=t.split("/");d.length>1&&hc(d)==="";)d.pop();const f=e.split("/");for(let g=0,v=f.length;g<v;g++){const y=f[g];y===""?g?g===v-1&&d.push(y):d=[y]:y===".."?d.pop():y==="."||d.push(y)}}d.length>1&&(hc(d)===""?n==="never"&&d.pop():n==="always"&&d.push(""));const h=pv(d.join("/"))||"/";return c&&i&&i.set(c,h),h}function wC(t){const e=new Map(t.map(a=>[encodeURIComponent(a),a])),n=Array.from(e.keys()).map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(n,"g");return a=>a.replace(i,o=>e.get(o)??o)}function ig(t,e,n){const i=e[t];return typeof i!="string"?i:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(a=>i0(a,n)).join("/"):i0(i,n)}function r0({path:t,params:e,decoder:n,...i}){let a=!1;const o=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:a};if(!t.includes("$"))return{interpolatedPath:t,usedParams:o,isMissingParams:a};const c=t.length;let d=0,h,f="";for(;d<c;){const g=d;h=tk(t,g,h);const v=h[5];if(d=v+1,g===v)continue;const y=h[0];if(y===0){f+="/"+t.substring(g,v);continue}if(y===2){const _=e._splat;o._splat=_,o["*"]=_;const w=t.substring(g,h[1]),S=t.substring(h[4],v);if(!_){a=!0,(w||S)&&(f+="/"+w+S);continue}const k=ig("_splat",e,n);f+="/"+w+k+S;continue}if(y===1){const _=t.substring(h[2],h[3]);!a&&!(_ in e)&&(a=!0),o[_]=e[_];const w=t.substring(g,h[1]),S=t.substring(h[4],v),k=ig(_,e,n)??"undefined";f+="/"+w+k+S;continue}if(y===3){const _=t.substring(h[2],h[3]),w=e[_];
10if(w==null)continue;o[_]=w;const S=t.substring(g,h[1]),k=t.substring(h[4],v),x=ig(_,e,n)??"";f+="/"+S+x+k;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:a}}function i0(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function ak(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function qt(t){return t?.isNotFound===!0}function SC(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const EC="tsr-scroll-restoration-v1_3";function kC(){const t=SC();if(!t)return null;let e={};try{const i=JSON.parse(t.getItem("tsr-scroll-restoration-v1_3")||"{}");So(i)&&(e=i)}catch{}return{get state(){return e},set:i=>{e=Zi(i,e)||e},persist:()=>{try{t.setItem(EC,JSON.stringify(e))}catch{}}}}const s0=kC(),xC=t=>t.state.__TSR_key||t.href;function TC(t){const e=[];let n;for(;n=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,t)+1})`),t=n;return`${e.reverse().join(" > ")}`.toLowerCase()}let rd=!1;const Cl="window",a0="data-scroll-restoration-id";function RC(t,e){if(!s0)return;const n=s0;if((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isScrollRestorationSetup||!n)return;t.isScrollRestorationSetup=!0,rd=!1;const i=t.options.getScrollRestorationKey||xC,a=new Map;window.history.scrollRestoration="manual";const o=d=>{if(!(rd||!t.isScrollRestoring))if(d.target===document||d.target===window)a.set(Cl,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const h=d.target;a.set(h,{scrollX:h.scrollLeft||0,scrollY:h.scrollTop||0})}},c=d=>{if(!t.isScrollRestoring||!d||a.size===0||!n)return;const h=n.state[d]||={};for(const[f,g]of a){let v;if(f===Cl)v=Cl;else if(f.isConnected){const y=f.getAttribute(a0);v=y?`[${a0}="${y}"]`:TC(f)}v&&(h[v]=g)}};document.addEventListener("scroll",o,!0),t.subscribe("onBeforeLoad",d=>{c(d.fromLocation?i(d.fromLocation):void 0),a.clear()}),window.addEventListener("pagehide",()=>{c(i(t.stores.resolvedLocation.get()??t.stores.location.get())),n.persist()}),t.subscribe("onRendered",d=>{const h=i(d.toLocation),f=t.options.scrollRestorationBehavior,g=t.options.scrollToTopSelectors;if(a.clear(),!t.resetNextScroll){t.resetNextScroll=!0;return}if(!(typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))){rd=!0;try{const v=t.isScrollRestoring?n.state[h]:void 0;let y=!1;if(v)for(const _ in v){const w=v[_];if(!So(w))continue;const{scrollX:S,scrollY:k}=w;if(!(!Number.isFinite(S)||!Number.isFinite(k))){if(_===Cl)window.scrollTo({top:k,left:S,behavior:f}),y=!0;else if(_){let x;try{x=document.querySelector(_)}catch{continue}x&&(x.scrollLeft=S,x.scrollTop=k,y=!0)}}}if(!y){const _=t.history.location.hash.slice(1);if(_){const w=window.history.state?.__hashScrollIntoViewOptions??!0;if(w){const S=document.getElementById(_);S&&S.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:f};if(window.scrollTo(w),g)for(const S of g){if(S===Cl)continue;const k=typeof S=="function"?S():document.querySelector(S);k&&k.scrollTo(w)}}}}finally{rd=!1}t.isScrollRestoring&&n.set(v=>(v[h]||={},v))}})}function ok(t,e=String){const n=new URLSearchParams;for(const i in t){const a=t[i];a!==void 0&&n.set(i,e(a))}return n.toString()}function sg(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function AC(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[i,a]of e.entries()){const o=n[i];o==null?n[i]=sg(a):Array.isArray(o)?o.push(sg(a)):n[i]=[o,sg(a)]}return n}const CC=PC(JSON.parse),OC=MC(JSON.stringify,JSON.parse);function PC(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=AC(e);for(const i in n){const a=n[i];if(typeof a=="string")try{n[i]=t(a)}catch{}}return n}}function MC(t,e){const n=typeof e=="function";function i(a){if(typeof a=="object"&&a!==null)try{return t(a)}catch{}else if(n&&typeof a=="string")try{return e(a),t(a)}catch{}return a}return a=>{const o=ok(a,i);return o?`?${o}`:""}}const Vs="__root__";function lk(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function dn(t){return t instanceof Response&&!!t.options}function ck(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return lk(t)}function LC(t){return{input:({url:e})=>{for(const n of t)e=Yg(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=uk(t[n],e);return e}}}function NC(t){const e=sk(t.basepath),n=`/${e}`,i=`${n}/`,a=t.caseSensitive?n:n.toLowerCase(),o=t.caseSensitive?i:i.toLowerCase();return{input:({url:c})=>{const d=t.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===a?c.pathname="/":d.startsWith(o)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=kd(["/",e,c.pathname]),c)}}function Yg(t,e){const n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function uk(t,e){const n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function DC(t,e){const{createMutableStore:n,createReadonlyStore:i,batch:a,init:o}=e,c=new Map,d=new Map,h=new Map,f=n(t.status),g=n(t.loadedAt),v=n(t.isLoading),y=n(t.isTransitioning),_=n(t.location),w=n(t.resolvedLocation),S=n(t.statusCode),k=n(t.redirect),x=n([]),C=n([]),A=n([]),M=i(()=>ag(c,x.get())),D=i(()=>ag(d,C.get())),$=i(()=>ag(h,A.get())),L=i(()=>x.get()[0]),I=i(()=>x.get().some(Z=>c.get(Z)?.get().status==="pending")),U=i(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:f.get()})),X=i(()=>({status:f.get(),loadedAt:g.get(),isLoading:v.get(),isTransitioning:y.get(),matches:M.get(),location:_.get(),resolvedLocation:w.get(),statusCode:S.get(),redirect:k.get()})),Q=pc(64);function te(Z){let ue=Q.get(Z);return ue||(ue=i(()=>{const Ee=x.get();for(const Me of Ee){const P=c.get(Me);
10if(P&&P.routeId===Z)return P.get()}}),Q.set(Z,ue)),ue}const _e={status:f,loadedAt:g,isLoading:v,isTransitioning:y,location:_,resolvedLocation:w,statusCode:S,redirect:k,matchesId:x,pendingIds:C,cachedIds:A,matches:M,pendingMatches:D,cachedMatches:$,firstId:L,hasPending:I,matchRouteDeps:U,matchStores:c,pendingMatchStores:d,cachedMatchStores:h,__store:X,getRouteMatchStore:te,setMatches:pe,setPending:Ne,setCached:H};pe(t.matches),o?.(_e);function pe(Z){og(Z,c,x,n,a)}function Ne(Z){og(Z,d,C,n,a)}function H(Z){og(Z,h,A,n,a)}return _e}function ag(t,e){const n=[];for(const i of e){const a=t.get(i);a&&n.push(a.get())}return n}function og(t,e,n,i,a){const o=t.map(d=>d.id),c=new Set(o);a(()=>{for(const d of e.keys())c.has(d)||e.delete(d);for(const d of t){const h=e.get(d.id);if(!h){const f=i(d);f.routeId=d.routeId,e.set(d.id,f);continue}h.routeId=d.routeId,h.get()!==d&&h.set(d)}lC(n.get(),o)||n.set(o)})}const Kg=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},jC=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),Sh=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Gs=(t,e,n=!0)=>{const i={...t.router.options.context??{}},a=n?e:e-1;for(let o=0;o<=a;o++){const c=t.matches[o];if(!c)continue;const d=t.router.getMatch(c.id);d&&Object.assign(i,d.__routeContext,d.__beforeLoadContext)}return i},o0=(t,e)=>{if(!t.matches.length)return;const n=e.routeId,i=t.matches.findIndex(c=>c.routeId===t.router.routeTree.id),a=i>=0?i:0;let o=n?t.matches.findIndex(c=>c.routeId===n):t.firstBadMatchIndex??t.matches.length-1;o<0&&(o=a);for(let c=o;c>=0;c--){const d=t.matches[c];if(t.router.looseRoutesById[d.routeId].options.notFoundComponent)return c}return n?o:a},Qi=(t,e,n)=>{if(!(!dn(n)&&!qt(n)))throw dn(n)&&n.redirectHandled&&!n.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=n,t.updateMatch(e.id,i=>({...i,status:dn(n)?"redirected":qt(n)?"notFound":i.status==="pending"?"success":i.status,context:Gs(t,e.index),isFetching:!1,error:n})),qt(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),dn(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},dk=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},l0=(t,e,n)=>{const i=Gs(t,n);t.updateMatch(e,a=>({...a,context:i}))},Ol=(t,e,n,i)=>{const{id:a,routeId:o}=t.matches[e],c=t.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=i,t.firstBadMatchIndex??=e,Qi(t,t.router.getMatch(a),n);try{c.options.onError?.(n)}catch(d){n=d,Qi(t,t.router.getMatch(a),n)}t.updateMatch(a,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!dn(n)&&!qt(n)&&(t.serialError??=n)},hk=(t,e,n,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const a=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!Sh(t,e)&&(n.options.loader||n.options.beforeLoad||pk(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{Kg(t)},a);i._nonReactive.pendingTimeout=o}},IC=(t,e,n)=>{const i=t.router.getMatch(e);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;hk(t,e,n,i);const a=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Qi(t,o,o.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(a):a()},$C=(t,e,n,i)=>{const a=t.router.getMatch(e);let o=a._nonReactive.loadPromise;a._nonReactive.loadPromise=Ws(()=>{o?.resolve(),o=void 0});const{paramsError:c,searchError:d}=a;c&&Ol(t,n,c,"PARSE_PARAMS"),d&&Ol(t,n,d,"VALIDATE_SEARCH"),hk(t,e,i,a);const h=new AbortController;let f=!1;const g=()=>{f||(f=!0,t.updateMatch(e,M=>({...M,isFetching:"beforeLoad",fetchCount:M.fetchCount+1,abortController:h})))},v=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,M=>
10({...M,isFetching:!1}))};if(!i.options.beforeLoad){t.router.batch(()=>{g(),v()});return}a._nonReactive.beforeLoadPromise=Ws();const y={...Gs(t,n,!1),...a.__routeContext},{search:_,params:w,cause:S}=a,k=Sh(t,e),x={search:_,abortController:h,params:w,preload:k,context:y,location:t.location,navigate:M=>t.router.navigate({...M,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:k?"preload":S,matches:t.matches,routeId:i.id,...t.router.options.additionalContext},C=M=>{if(M===void 0){t.router.batch(()=>{g(),v()});return}(dn(M)||qt(M))&&(g(),Ol(t,n,M,"BEFORE_LOAD")),t.router.batch(()=>{g(),t.updateMatch(e,D=>({...D,__beforeLoadContext:M})),v()})};let A;try{if(A=i.options.beforeLoad(x),fc(A))return g(),A.catch(M=>{Ol(t,n,M,"BEFORE_LOAD")}).then(C)}catch(M){g(),Ol(t,n,M,"BEFORE_LOAD")}C(A)},zC=(t,e)=>{const{id:n,routeId:i}=t.matches[e],a=t.router.looseRoutesById[i],o=()=>d(),c=()=>$C(t,n,e,a),d=()=>{if(dk(t,n))return;const h=IC(t,n,a);return fc(h)?h.then(c):c()};return o()},UC=(t,e,n)=>{const i=t.router.getMatch(e);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const a={ssr:t.router.options.ssr,matches:t.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([n.options.head?.(a),n.options.scripts?.(a),n.options.headers?.(a)]).then(([o,c,d])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:d,scripts:c,styles:o?.styles}))},fk=(t,e,n,i,a)=>{const o=e[i-1],{params:c,loaderDeps:d,abortController:h,cause:f}=t.router.getMatch(n),g=Gs(t,i),v=Sh(t,n);return{params:c,deps:d,preload:!!v,parentMatchPromise:o,abortController:h,context:g,location:t.location,navigate:y=>t.router.navigate({...y,_fromLocation:t.location}),cause:v?"preload":f,route:a,...t.router.options.additionalContext}},c0=async(t,e,n,i,a)=>{try{const o=t.router.getMatch(n);try{(!(ZE??t.router.isServer)||o.ssr===!0)&&gc(a);const c=a.options.loader,d=typeof c=="function"?c:c?.handler,h=d?.(fk(t,e,n,i,a)),f=!!d&&fc(h);if((f||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&t.updateMatch(n,v=>({...v,isFetching:"loader"})),d){const v=f?await h:h;Qi(t,t.router.getMatch(n),v),v!==void 0&&t.updateMatch(n,y=>({...y,loaderData:v}))}a._lazyPromise&&await a._lazyPromise;const g=o._nonReactive.minPendingPromise;g&&await g,a._componentsPromise&&await a._componentsPromise,t.updateMatch(n,v=>({...v,error:void 0,context:Gs(t,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let d=c;if(d?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}t.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Gs(t,i)}));return}const h=o._nonReactive.minPendingPromise;h&&await h,qt(c)&&await a.options.notFoundComponent?.preload?.(),Qi(t,t.router.getMatch(n),c);try{a.options.onError?.(c)}catch(f){d=f,Qi(t,t.router.getMatch(n),f)}!dn(d)&&!qt(d)&&await gc(a,["errorComponent"]),t.updateMatch(n,f=>({...f,error:d,context:Gs(t,i),status:"error",isFetching:!1}))}}catch(o){const c=t.router.getMatch(n);c&&(c._nonReactive.loaderPromise=void 0),Qi(t,c,o)}},BC=async(t,e,n)=>{async function i(_,w,S,k,x){const C=Date.now()-w.updatedAt,A=_?x.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:x.options.staleTime??t.router.options.defaultStaleTime??0,M=x.options.shouldReload,D=typeof M=="function"?M(fk(t,e,a,n,x)):M,{status:$,invalid:L}=k,I=C>=A&&(!!t.forceStaleReload||k.cause==="enter"||S!==void 0&&S!==k.id);c=$==="success"&&(L||(D??I)),_&&x.options.preload===!1||(c&&!t.sync&&g?(d=!0,(async()=>{try{await c0(t,e,a,n,x);const U=t.router.getMatch(a);U._nonReactive.loaderPromise?.resolve(),U._nonReactive.loadPromise?.resolve(),U._nonReactive.loaderPromise=void 0,U._nonReactive.loadPromise=void 0}catch(U){dn(U)&&await t.router.navigate(U.options)}})()):$!=="success"||c?await c0(t,e,a,n,x):l0(t,a,n))}const{id:a,routeId:o}=t.matches[n];let c=!1,d=!1;const h=t.router.looseRoutesById[o],f=h.options.loader,g=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(dk(t,a)){if(!t.router.getMatch(a))return t.matches[n];l0(t,a,n)}else{const _=t.router.getMatch(a),w=t.router.stores.matchesId.get()[n],S=(w&&t.router.stores.matchStores.get(w)||null)?.routeId===o?w:t.router.stores.matches.get().find(x=>x.routeId===o)?.id,k=Sh(t,a);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!t.sync&&!_.preload&&g)return _;await _._nonReactive.loaderPromise;const x=t.router.getMatch(a),C=x._nonReactive.error||x.error;C&&Qi(t,x,C),x.status==="pending"&&await i(k,_,S,x,h)}else{const x=k&&!t.router.stores.matchStores.has(a),C=t.router.getMatch(a);C._nonReactive.loaderPromise=Ws(),x!==C.preload&&t.updateMatch(a,A=>({...A,preload:x})),await i(k,_,S,C,h)}}const v=t.router.getMatch(a);d||(v._nonReactive.loaderPromise?.resolve(),v._nonReactive.loadPromise?.resolve(),v._nonReactive.loadPromise=void 0),clearTimeout(v._nonReactive.pen
10dingTimeout),v._nonReactive.pendingTimeout=void 0,d||(v._nonReactive.loaderPromise=void 0),v._nonReactive.dehydrated=void 0;const y=d?v.isFetching:!1;return y!==v.isFetching||v.invalid!==!1?(t.updateMatch(a,_=>({..._,isFetching:y,invalid:!1})),t.router.getMatch(a)):v};async function u0(t){const e=t,n=[];jC(e.router)&&Kg(e);let i;for(let y=0;y<e.matches.length;y++){try{const _=zC(e,y);fc(_)&&await _}catch(_){if(dn(_))throw _;if(qt(_))i=_;else if(!e.preload)throw _;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const a=e.firstBadMatchIndex??e.matches.length,o=i&&!e.preload?o0(e,i):void 0,c=i&&e.preload?0:o!==void 0?Math.min(o+1,a):a;let d,h;for(let y=0;y<c;y++)n.push(BC(e,n,y));try{await Promise.all(n)}catch{const y=await Promise.allSettled(n);for(const _ of y){if(_.status!=="rejected")continue;const w=_.reason;if(dn(w))throw w;qt(w)?d??=w:h??=w}if(h!==void 0)throw h}const f=d??(i&&!e.preload?i:void 0);let g=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&i&&e.preload)return e.matches;if(f){const y=o0(e,f);y===void 0&&xn();const _=e.matches[y],w=e.router.looseRoutesById[_.routeId],S=e.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&S&&(w.options.notFoundComponent=S),f.routeId=_.routeId;const k=_.routeId===e.router.routeTree.id;e.updateMatch(_.id,x=>({...x,...k?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),g=y,await gc(w,["notFoundComponent"])}else if(!e.preload){const y=e.matches[0];y.globalNotFound||e.router.getMatch(y.id)?.globalNotFound&&e.updateMatch(y.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const y=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await gc(y,["errorComponent"])}for(let y=0;y<=g;y++){const{id:_,routeId:w}=e.matches[y],S=e.router.looseRoutesById[w];try{const k=UC(e,_,S);if(k){const x=await k;e.updateMatch(_,C=>({...C,...x}))}}catch(k){console.error(`Error executing head for route ${w}:`,k)}}const v=Kg(e);if(fc(v)&&await v,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function d0(t,e){const n=e.map(i=>t.options[i]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function gc(t,e=xd){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(i=>{const{id:a,...o}=i.options;Object.assign(t.options,o),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const n=()=>t._componentsLoaded?void 0:e===xd?(()=>{if(t._componentsPromise===void 0){const i=d0(t,xd);i?t._componentsPromise=i.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():d0(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function pk(t){for(const e of xd)if(t.options[e]?.preload)return!0;return!1}const xd=["component","errorComponent","pendingComponent","notFoundComponent"];var ts="__TSR_index",h0="popstate",f0="beforeunload";function qC(t){let e=t.getLocation();const n=new Set,i=c=>{e=t.getLocation(),n.forEach(d=>d({location:e,action:c}))},a=c=>{t.notifyOnIndexChange??!0?i(c):e=t.getLocation()},o=async({task:c,navigateOpts:d,...h})=>{if(d?.ignoreBlocker??!1){c();return}const f=t.getBlockers?.()??[],g=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&f.length&&g)for(const v of f){const y=$d(h.path,h.state);if(await v.blockerFn({currentLocation:e,nextLocation:y,action:h.type})){t.onBlocked?.();return}}c()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,d,h)=>{const f=e.state[ts];d=p0(f+1,d),o({task:()=>{t.pushState(c,d),i({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:c,state:d})},replace:(c,d,h)=>{const f=e.state[ts];d=p0(f,d),o({task:()=>{t.replaceState(c,d),i({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:c,state:d})},go:(c,d)=>{o({task:()=>{t.go(c),a({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{o({task:()=>{t.back(c?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{o({task:()=>{t.forward(c?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>e.state[ts]!==0,createHref:c=>t.createHref(c),block:c=>{if(!t.setBlockers)return()=>{};const d=t.getBlockers?.()??[];return t.setBlockers([...d,c]),()=>{const h=t.getBlockers?.()??[];t.setBlockers?.(h.filter(f=>f!==c))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:i}}function p0(t,e){e||(e={});const n=gv();return{...e,key:n,__TSR_key:n,[ts]:t}}function FC(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,i=e.history.replaceState;let a=[];const o=()=>a,c=I=>a=I,d=(I=>I),h=(()=>$d(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const I=gv();e.history.replaceState({[ts]:0,key:I,__TSR_key:I},"")}let f=h(),g,v=!1,y=!1,_=!1,w=!1;const S=()=>f;let k,x;const C=()=>{k&&(L._ignoreSubscribers=!0,(k.isPush?e.history.pushState:e.history.replaceState)(k.state,"",k.href),L._ignoreSubscribers=!1,k=void 0,x=void 0,g=void 0)},A=(I,U,X)=>{const Q=d(U);x||(g=f),f=$d(U,X),k={href:Q,state:X,isPush:k?.isPush||I==="push"},x||(x=Promise.resolve().then(()=>C()))},M=I=>
10{f=h(),L.notify({type:I})},D=async()=>{if(y){y=!1;return}const I=h(),U=I.state[ts]-f.state[ts],X=U===1,Q=U===-1,te=!X&&!Q||v;v=!1;const _e=te?"GO":Q?"BACK":"FORWARD",pe=te?{type:"GO",index:U}:{type:Q?"BACK":"FORWARD"};if(_)_=!1;else{const Ne=o();if(typeof document<"u"&&Ne.length){for(const H of Ne)if(await H.blockerFn({currentLocation:f,nextLocation:I,action:_e})){y=!0,e.history.go(1),L.notify(pe);return}}}f=h(),L.notify(pe)},$=I=>{if(w){w=!1;return}let U=!1;const X=o();if(typeof document<"u"&&X.length)for(const Q of X){const te=Q.enableBeforeUnload??!0;if(te===!0){U=!0;break}if(typeof te=="function"&&te()===!0){U=!0;break}}if(U)return I.preventDefault(),I.returnValue=""},L=qC({getLocation:S,getLength:()=>e.history.length,pushState:(I,U)=>A("push",I,U),replaceState:(I,U)=>A("replace",I,U),back:I=>(I&&(_=!0),w=!0,e.history.back()),forward:I=>{I&&(_=!0),w=!0,e.history.forward()},go:I=>{v=!0,e.history.go(I)},createHref:I=>d(I),flush:C,destroy:()=>{e.history.pushState=n,e.history.replaceState=i,e.removeEventListener(f0,$,{capture:!0}),e.removeEventListener(h0,D)},onBlocked:()=>{g&&f!==g&&(f=g)},getBlockers:o,setBlockers:c,notifyOnIndexChange:!1});return e.addEventListener(f0,$,{capture:!0}),e.addEventListener(h0,D),e.history.pushState=function(...I){const U=n.apply(e.history,I);return L._ignoreSubscribers||M("PUSH"),U},e.history.replaceState=function(...I){const U=i.apply(e.history,I);return L._ignoreSubscribers||M("REPLACE"),U},L}function HC(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function $d(t,e){const n=HC(t),i=n.indexOf("#"),a=n.indexOf("?"),o=gv();return{href:n,pathname:n.substring(0,i>0?a>0?Math.min(i,a):i:a>0?a:n.length),hash:i>-1?n.substring(i):"",search:a>-1?n.slice(a,i===-1?void 0:i):"",state:e||{[ts]:0,key:o,__TSR_key:o}}}function gv(){return(Math.random()+1).toString(36).substring(7)}function VC(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function mo(t,e){const n=e,i=t;return{fromLocation:n,toLocation:i,pathChanged:n?.pathname!==i.pathname,hrefChanged:n?.href!==i.href,hashChanged:n?.hash!==i.hash}}var GC=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=n=>
10n(),this.update=n=>{const i=this.options,a=this.basepath??i?.basepath??"/",o=this.basepath===void 0,c=i?.rewrite;if(this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=wC(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=FC()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let g;this.resolvePathCache=pc(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=DC(KC(this.latestLocation),g),RC(this)}let d=!1;const h=this.options.basepath??"/",f=this.options.rewrite;if(o||a!==h||c!==f){this.basepath=h;const g=[],v=sk(h);v&&v!=="/"&&g.push(NC({basepath:h})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:LC(g),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=gC(this.routeTree,this.options.caseSensitive,(i,a)=>{i.init({originalIndex:a})});return this.options.routeMasks&&uC(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,i)=>{const a={eventType:n,fn:i};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const a=({pathname:h,search:f,hash:g,href:v,state:y})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const x=this.options.parseSearch(f),C=this.options.stringifySearch(x);return{href:h+C+g,publicHref:h+C+g,pathname:Al(h).path,external:!1,searchStr:C,search:Ms(i?.search,x),hash:Al(g.slice(1)).path,state:Bs(i?.state,y)}}const _=new URL(v,this.origin),w=Yg(this.rewrite,_),S=this.options.parseSearch(w.search),k=this.options.stringifySearch(S);return w.search=k,{href:w.href.replace(w.origin,""),publicHref:v,pathname:Al(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:k,search:Ms(i?.search,S),hash:Al(w.hash.slice(1)).path,state:Bs(i?.state,y)}},o=a(n),{__tempLocation:c,__tempKey:d}=o.state;if(c&&(!d||d===this.tempLocationKey)){const h=a(c);return h.state.key=o.state.key,h.state.__TSR_key=o.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:o}}return o},this.resolvePathWithBase=(n,i)=>bC({base:n,to:i.includes("//")?pv(i):i,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,a)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},a):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>WC({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const i=this.stores.matchStores.get(n)?.get();i&&(i.status==="pending"||i.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const i=(o={})=>{const c=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(c);o.from;const h=o.unsafeRelative==="path"?c.pathname:o.from??d.fullPath,f=o.to?`${o.to}`:void 0,g=d.search,v=Object.assign(Object.create(null),d.params),y=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(h,"."),_=f?this.resolvePathWithBase(y,f):y,w=o.params===!1||o.params===null?Ob
10ject.create(null):(o.params??!0)===!0?v:Object.assign(v,Zi(o.params,v)),S=this.routesByPath[oi(_)];let k;if(S)k=this.getRouteBranch(S);else if(_.includes("$"))k=[];else{const Q=this.getMatchedRoutes(_);k=Q.matchedRoutes,this.options.notFoundRoute&&(!Q.foundRoute||Q.foundRoute.path!=="/"&&Q.routeParams["**"])&&(k=[...k,this.options.notFoundRoute])}if(k.length&&QE(w))for(const Q of k){const te=Q.options.params?.stringify??Q.options.stringifyParams;if(te)try{Object.assign(w,te(w))}catch{}}const x=n.leaveParams?_:Al(r0({path:_,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let C=g;if(n._includeValidateSearch&&this.options.search?.strict){const Q={};k.forEach(te=>{if(te.options.validateSearch)try{Object.assign(Q,Td(te.options.validateSearch,{...Q,...C}))}catch{}}),C=Q}C=JC({search:C,dest:o,destRoutes:k,_includeValidateSearch:n._includeValidateSearch}),C=Ms(g,C);const A=this.options.stringifySearch(C),M=o.hash===!0?c.hash:o.hash?Zi(o.hash,c.hash):void 0,D=M?`#${M}`:"";let $=o.state===!0?c.state:o.state?Zi(o.state,c.state):{};$=Bs(c.state,$);const L=`${x}${A}${D}`;let I,U,X=!1;if(this.rewrite){const Q=new URL(L,this.origin),te=uk(this.rewrite,Q);I=Q.href.replace(Q.origin,""),te.origin!==this.origin?(U=te.href,X=!0):U=te.pathname+te.search+te.hash}else I=oC(L),U=I;return{publicHref:U,href:I,pathname:x,search:C,searchStr:A,state:$,hash:M??"",external:X,unmaskOnReload:o.unmaskOnReload}},a=(o={},c)=>{const d=i(o);let h=c?i(c):void 0;if(!h){const f=Object.create(null);if(this.options.routeMasks){const g=dC(d.pathname,this.processedTree);if(g){Object.assign(f,g.rawParams);const{from:v,params:y,..._}=g.route,w=y===!1||y===null?Object.create(null):(y??!0)===!0?f:Object.assign(f,Zi(y,f));c={from:n.from,..._,params:w},h=i(c)}}}return h&&(d.maskedLocation=h),d};return n.mask?a(n,{from:n.from,...n.mask}):a(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:i,...a})=>{const o=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(g=>{a.state[g]=this.latestLocation.state[g]});const f=En(a.state,this.latestLocation.state);return h.forEach(g=>{delete a.state[g]}),f},c=oi(this.latestLocation.href)===oi(a.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=Ws(()=>{d?.resolve(),d=void 0}),c&&o())this.load();else{let{maskedLocation:h,hashScrollIntoView:f,...g}=a;h&&(g={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[a.replace?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:i})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:a,viewTransition:o,ignoreBlocker:c,href:d,...h}={})=>{if(d){const v=this.history.location.state.__TSR_index,y=$d(d,{__TSR_index:n?v:v+1}),_=new URL(y.pathname,this.origin);h.to=Yg(this.rewrite,_).pathname,h.search=this.options.parseSearch(y.search),h.hash=y.hash.slice(1)}const f=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const g=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:i,hashScrollIntoView:a,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:i,href:a,publicHref:o,...c})=>{let d=!1;if(a)try{new URL(`${a}`),d=!0}catch{}if(d&&!i&&(i=!0),i){if(n!==void 0||!a){const f=this.buildLocation({to:n,...c});a=a??f.publicHref,o=o??f.publicHref}const h=!d&&o?o:a;if(jd(h,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const g of f)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...c,href:a,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),i=this.stores.cachedMatches.get().filter(a=>!n.some(o=>o.id===a.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(i)})},this.load=async n=>{let i,a,o;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(h=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,g=mo(f,this.stores.resolvedLocation.get());
10this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await u0({router:this,sync:n?.sync,forceStaleReload:c.href===f.href,matches:this.stores.pendingMatches.get(),location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let v=null,y=null,_=null,w=null;this.batch(()=>{const S=this.stores.pendingMatches.get(),k=S.length,x=this.stores.matches.get();v=k?x.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const C=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&C.add(M.routeId);const A=new Set;for(const M of this.stores.matchStores.values())M.routeId&&A.add(M.routeId);y=k?x.filter(M=>!C.has(M.routeId)):null,_=k?S.filter(M=>!A.has(M.routeId)):null,w=k?S.filter(M=>A.has(M.routeId)):x,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),k&&(this.stores.setMatches(S),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...v.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[S,k]of[[y,"onLeave"],[_,"onEnter"],[w,"onStay"]])if(S)for(const x of S)this.looseRoutesById[x.routeId].options[k]?.(x)})})}})}catch(f){dn(f)?(i=f,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):qt(f)&&(a=f);const g=i?i.status:a?404:this.stores.matches.get().some(v=>v.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(i)})}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),h()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(h=>h.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=n=>
10{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,c=this.stores.resolvedLocation.get(),d=typeof i.types=="function"?i.types(mo(o,c)):i.types;if(d===!1){n();return}a={update:n,types:d}}else a=n;document.startViewTransition(a)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{const a=this.stores.pendingMatchStores.get(n);if(a){a.set(i);return}const o=this.stores.matchStores.get(n);if(o){o.set(i);return}const c=this.stores.cachedMatchStores.get(n);if(c){const d=i(c.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(h=>h.filter(f=>f!==n)):c.set(d)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const i=a=>n?.filter?.(a)??!0?{...a,invalid:!0,...n?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(i)),this.stores.setCached(this.stores.cachedMatches.get().map(i)),this.stores.setPending(this.stores.pendingMatches.get().map(i))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const i=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const a=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(a);n.options.href=o,n.headers.set("Location",o)}else if(i)try{const a=new URL(i);if(this.origin&&a.origin===this.origin){const o=a.pathname+a.search+a.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&jd(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n?.filter;i!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(a=>!i(a))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),i=a=>{const o=this.looseRoutesById[a.routeId];if(!o.options.loader)return!0;const c=(a.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:n-a.updatedAt>=c};this.clearCache({filter:i})},this.loadRouteChunk=gc,this.preloadRoute=async n=>{const i=n._builtLocation??this.buildLocation(n);let a=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...o,...this.stores.cachedIds.get()]),d=a.filter(h=>!c.has(h.id));if(d.length){const h=this.stores.cachedMatches.get();this.stores.setCached([...h,...d])}try{return a=await u0({router:this,matches:a,location:i,preload:!0,updateMatch:(h,f)=>{o.has(h)?a=a.map(g=>g.id===h?f(g):g):this.updateMatch(h,f)}}),a}catch(h){if(dn(h))return h.options.reloadDocument?void 0:await this.preloadRoute({...h.options,_fromLocation:i});qt(h)||console.error(h);return}},this.matchRoute=(n,i)=>{const a={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(a);if(i?.pending&&this.stores.status.get()!=="pending")return!1;const c=(i?.pending===void 0?!this.stores.isLoading.get():i.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=hC(o.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,c.pathname,this.processedTree);return!d||n.params&&!En(d.rawParams,n.params,{partial:!0})?!1:i?.includeSearch??!0?En(c.search,o.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??OC,parseSearch:t.parseSearch??CC,protocolAllowlist:t.protocolAllowlist??rC}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}
10isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=rk(t),this.routeBranchCache.set(t,e)),e}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const n=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:a}=n;let{matchedRoutes:o}=n,c=!1;(i?i.path!=="/"&&a["**"]:oi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:c=!0);const d=c?XC(this.options.notFoundMode,o):void 0,h=new Array(o.length),f=new Map;for(const g of this.stores.matchStores.values())g.routeId&&f.set(g.routeId,g.get());for(let g=0;g<o.length;g++){const v=o[g],y=h[g-1];let _,w,S;{const te=y?.search??t.search,_e=y?._strictSearch??void 0;try{const pe=Td(v.options.validateSearch,{...te})??void 0;_={...te,...pe},w={..._e,...pe},S=void 0}catch(pe){let Ne=pe;if(pe instanceof zd||(Ne=new zd(pe.message,{cause:pe})),e?.throwOnError)throw Ne;_=te,w={},S=Ne}}const k=v.options.loaderDeps?.({search:_})??"",x=k?JSON.stringify(k):"",{interpolatedPath:C,usedParams:A}=r0({path:v.fullPath,params:a,decoder:this.pathParamsDecoder,server:this.isServer}),M=v.id+C+x,D=this.getMatch(M),$=f.get(v.id),L=D?._strictParams??A;let I;if(!D)try{g0(v,L)}catch(te){if(qt(te)||dn(te)?I=te:I=new YC(te.message,{cause:te}),e?.throwOnError)throw I}Object.assign(a,L);const U=$?"stay":"enter";let X;if(D)X={...D,cause:U,params:$?.params??a,_strictParams:L,search:Ms($?$.search:D.search,_),_strictSearch:w};else{const te=v.options.loader||v.options.beforeLoad||v.lazyFn||pk(v)?"pending":"success";X={id:M,ssr:v.options.ssr,index:g,routeId:v.id,params:$?.params??a,_strictParams:L,pathname:C,updatedAt:Date.now(),search:$?Ms($.search,_):_,_strictSearch:w,searchError:void 0,status:te,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Ws()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:U,loaderDeps:$?Bs($.loaderDeps,k):k,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:v.options.staticData||{},fullPath:v.fullPath}}e?.preload||(X.globalNotFound=d===v.id),X.searchError=S;const Q=this.getParentContext(y);X.context={...Q,...X.__routeContext,...X.__beforeLoadContext},h[g]=X}for(let g=0;g<h.length;g++){const v=h[g],y=this.looseRoutesById[v.routeId],_=this.getMatch(v.id),w=f.get(v.routeId);if(v.params=w?Ms(w.params,a):a,!_){const S=h[g-1],k=this.getParentContext(S);if(y.options.context){const x={deps:v.loaderDeps,params:v.params,context:k??{},location:t,navigate:C=>this.navigate({...C,_fromLocation:t}),buildLocation:this.buildLocation,cause:v.cause,abortController:v.abortController,preload:!!v.preload,matches:h,routeId:y.id};v.__routeContext=y.options.context(x)??void 0}v.context={...k,...v.__routeContext,...v.__beforeLoadContext}}}return h}matchRoutesLightweight(t){const{matchedRoutes:e,routeParams:n}=this.getMatchedRoutes(t.pathname),i=hc(e),a={...t.search};for(const f of e)try{Object.assign(a,Td(f.options.validateSearch,a))}catch{}const o=hc(this.stores.matchesId.get()),c=o&&this.stores.matchStores.get(o)?.get(),d=c&&c.routeId===i.id&&c.pathname===t.pathname;let h;if(d)h=c.params;else{const f=Object.assign(Object.create(null),n);for(const g of e)try{g0(g,f)}catch{}h=f}return{matchedRoutes:e,fullPath:i.fullPath,search:a,params:h}}},zd=class extends Error{},YC=class extends Error{};function KC(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Td(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new zd("Async validation not supported");if(n.issues)throw new zd(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function WC({pathname:t,routesById:e,processedTree:n}){const i=Object.create(null),a=oi(t);let o;const c=fC(a,n,!0);return c&&(o=c.route,Object.assign(i,c.rawParams)),{matchedRoutes:c?.branch||[e.__root__],routeParam
10s:i,foundRoute:o}}function JC({search:t,dest:e,destRoutes:n,_includeValidateSearch:i}){return ZC(n)(t,e,i??!1)}function ZC(t){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const a of t){if("search"in a.options)a.options.search?.middlewares&&e.middlewares.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){const o=({search:c,next:d})=>{let h=c;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(h=a.options.preSearchFilters.reduce((g,v)=>v(g),c));const f=d(h);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((g,v)=>v(g),f):f};e.middlewares.push(o)}if(a.options.validateSearch){const o=({search:c,next:d})=>{const h=d(c);if(!e._includeValidateSearch)return h;try{return{...h,...Td(a.options.validateSearch,h)??void 0}}catch{return h}};e.middlewares.push(o)}}const n=({search:a})=>{const o=e.dest;return o.search?o.search===!0?a:Zi(o.search,a):{}};e.middlewares.push(n);const i=(a,o,c)=>{if(a>=c.length)return o;const d=c[a];return d({search:o,next:f=>i(a+1,f,c)})};return function(o,c,d){return e.dest=c,e._includeValidateSearch=d,i(0,o,e.middlewares)}}function XC(t,e){if(t!=="root")for(let n=e.length-1;n>=0;n--){const i=e[n];if(i.children)return i.id}return Vs}function g0(t,e){const n=t.options.params?.parse??t.options.parseParams;if(n){const i=n(e);if(i===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(e,i)}}const xr=Symbol.for("TSR_DEFERRED_PROMISE");function QC(t,e){const n=t;return n[xr]||(n[xr]={status:"pending"},n.then(i=>{n[xr].status="success",n[xr].data=i}).catch(i=>{n[xr].status="error",n[xr].error={data:VC(i),__isServerError:!0}})),n}const eO="Error preloading route! ☝️";function m0(t,e){if(t)return typeof t=="string"?t:t[e]}function tO(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function nO(t){if(t.tag!=="link")return;const e=t.attrs?.rel,n=t.attrs?.href;if(typeof n=="string"&&(typeof e=="string"?e.split(/\s+/):[]).includes("stylesheet"))return n}function rO(t,e){const n=nO(e);return!!n&&t?.inlineCss?.styles[n]!==void 0}var gk=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const n=this.options,i=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=Vs:this.parentRoute||xn();let a=i?Vs:n?.path;a&&a!=="/"&&(a=ik(a));const o=n?.id||a;let c=i?Vs:kd([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);a==="__root__"&&(a="/"),c!=="__root__"&&(c=kd(["/",c]));const d=c==="__root__"?"/":kd([this.parentRoute.fullPath,a]);this._path=a,this._id=c,this._fullPath=d,this._to=oi(d)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>lk({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},iO=class extends gk{constructor(t){super(t)}};function sO(t){if(typeof document<"u"&&document.querySelector){const e=t.stores.location.get(),n=e.state.__hashScrollIntoViewOptions??!0;if(n&&e.hash!==""){const i=document.getElementById(e.hash);i&&i.scrollIntoView(n)}}}var aO=(t=>(t[t.AggregateError=1]="AggregateError",t[t.ArrowFunction=2]="ArrowFunction",t[t.ErrorPrototypeStack=4]="ErrorPrototypeStack",t[t.ObjectAssign=8]="ObjectAssign",t[t.BigIntTypedArray=16]="BigIntTypedArray",t[t.RegExp=32]="RegExp",t))(aO||{}),ci=Symbol.asyncIterator,mk=Symbol.hasInstance,vo=Symbol.isConcatSpreadable,ui=Symbol.iterator,vk=Symbol.match,yk=Symbol.matchAll,_k=Symbol.replace,bk=Symbol.search,wk=Symbol.species,Sk=Symbol.split,Ek=Symbol.toPrimitive,yo=Symbol.toStringTag,kk=Symbol.unscopables,xk={[ci]:0,[mk]:1,[vo]:2,[ui]:3,[vk]:4,[yk]:5,[_k]:6,[bk]:7,[wk]:8,[Sk]:9,[Ek]:10,[yo]:11,[kk]:12},oO={0:ci,1:mk,2:vo,3:ui,4:vk,5:yk,6:_k,7:bk,8:wk,9:Sk,10:Ek,11:yo,12:kk},R=void 0,lO={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},cO={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},uO={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Qe(t,e,n,i,a,o,c,d,h,f,g,v){return{t,i:e,s:n,c:i,m:a,p:o,e:c,a:d,f:h,b:f,o:g,l:v}}function as(t){return Qe(2,R,t,R,R,R,R,R,R,R,R,R)}var Tk=as(2),Rk=as(3),dO=as(1),hO=as(0),fO=as(4),pO=as(5),gO=as(6),mO=as(7);function vO(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case`
11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return R}}function os(t){let e="",n=0,i;for(let a=0,o=t.length;a<o;a++)i=vO(t[a]),i&&(e+=t.slice(n,a)+i,n=a+1);return n===0?e=t:e+=t.slice(n),e}function yO(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function ls(t){return t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,yO)}var id="__SEROVAL_REFS__",Ak=new Map,co=new Map;function Ck(t){return Ak.has(t)}function _O(t){return co.has(t)}function bO(t){if(Ck(t))return Ak.get(t);throw new ZO(t)}function wO(t){if(_O(t))return co.get(t);throw new XO(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,id,{value:co,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,id,{value:co,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,id,{value:co,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,id,{value:co,configurable:!0,writable:!1,enumerable:!1});function mv(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function SO(t){let e=cO[mv(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function Ok(t,e){let n=SO(t),i=Object.getOwnPropertyNames(t);for(let a=0,o=i.length,c;a<o;a++)c=i[a],c!=="name"&&c!=="message"&&(c==="stack"?e&4&&(n=n||{},n[c]=t[c]):(n=n||{},n[c]=t[c]));return n}function Pk(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function EO(t){switch(t){case Number.POSITIVE_INFINITY:return pO;case Number.NEGATIVE_INFINITY:return gO}return t!==t?mO:Object.is(t,-0)?fO:Qe(0,R,t,R,R,R,R,R,R,R,R,R)}function Mk(t){return Qe(1,R,os(t),R,R,R,R,R,R,R,R,R)}function kO(t){return Qe(3,R,""+t,R,R,R,R,R,R,R,R,R)}function xO(t){return Qe(4,t,R,R,R,R,R,R,R,R,R,R)}function TO(t,e){let n=e.valueOf();return Qe(5,t,n!==n?"":e.toISOString(),R,R,R,R,R,R,R,R,R)}function RO(t,e){return Qe(6,t,R,os(e.source),e.flags,R,R,R,R,R,R,R)}function AO(t,e){return Qe(17,t,xk[e],R,R,R,R,R,R,R,R,R)}function CO(t,e){return Qe(18,t,os(bO(e)),R,R,R,R,R,R,R,R,R)}function OO(t,e,n){return Qe(25,t,n,os(e),R,R,R,R,R,R,R,R)}function PO(t,e,n){return Qe(9,t,R,R,R,R,R,n,R,R,Pk(e),R)}function MO(t,e){return Qe(21,t,R,R,R,R,R,R,e,R,R,R)}function LO(t,e,n){return Qe(15,t,R,e.constructor.name,R,R,R,R,n,e.byteOffset,R,e.length)}function NO(t,e,n){return Qe(16,t,R,e.constructor.name,R,R,R,R,n,e.byteOffset,R,e.byteLength)}function DO(t,e,n){return Qe(20,t,R,R,R,R,R,R,n,e.byteOffset,R,e.byteLength)}function jO(t,e,n){return Qe(13,t,mv(e),R,os(e.message),n,R,R,R,R,R,R)}function IO(t,e,n){return Qe(14,t,mv(e),R,os(e.message),n,R,R,R,R,R,R)}function $O(t,e){return Qe(7,t,R,R,R,R,R,e,R,R,R,R)}function zO(t,e){return Qe(28,R,R,R,R,R,R,[t,e],R,R,R,R)}function UO(t,e){return Qe(30,R,R,R,R,R,R,[t,e],R,R,R,R)}function BO(t,e,n){return Qe(31,t,R,R,R,R,R,n,e,R,R,R)}function qO(t,e){return Qe(32,t,R,R,R,R,R,R,e,R,R,R)}function FO(t,e){return Qe(33,t,R,R,R,R,R,R,e,R,R,R)}function HO(t,e){return Qe(34,t,R,R,R,R,R,R,e,R,R,R)}function VO(t,e,n,i){return Qe(35,t,n,R,R,R,R,e,R,R,R,i)}
12var GO={parsing:1,serialization:2,deserialization:3};function YO(t){return`Seroval Error (step: ${GO[t]})`}var KO=(t,e)=>YO(t),Lk=class extends Error{constructor(e,n){super(KO(e)),this.cause=n}},v0=class extends Lk{constructor(e){super("parsing",e)}},WO=class extends Lk{constructor(e){super("deserialization",e)}};function hi(t){return`Seroval Error (specific: ${t})`}var Eh=class extends Error{constructor(e){super(hi(1)),this.value=e}},Nk=class extends Error{constructor(e){super(hi(2))}},JO=class extends Error{constructor(e){super(hi(3))}},jc=class extends Error{constructor(e){super(hi(4))}},ZO=class extends Error{constructor(e){super(hi(5)),this.value=e}},XO=class extends Error{constructor(e){super(hi(6))}},QO=class extends Error{constructor(e){super(hi(7))}},fi=class extends Error{constructor(e){super(hi(8))}},eP=class extends Error{constructor(e){super(hi(9))}},tP=class{constructor(e,n){this.value=e,this.replacement=n}},kh=()=>{let t={p:0,s:0,f:0};return t.p=new Promise((e,n)=>{t.s=e,t.f=n}),t},nP=(t,e)=>{t.s(e),t.p.s=1,t.p.v=e},rP=(t,e)=>{t.f(e),t.p.s=2,t.p.v=e};kh.toString();nP.toString();rP.toString();var iP=()=>{let t=[],e=[],n=!0,i=!1,a=0,o=(h,f,g)=>{for(g=0;g<a;g++)e[g]&&e[g][f](h)},c=(h,f,g,v)=>{for(f=0,g=t.length;f<g;f++)v=t[f],!n&&f===g-1?h[i?"return":"throw"](v):h.next(v)},d=(h,f)=>(n&&(f=a++,e[f]=h),c(h),()=>{n&&(e[f]=e[a],e[a--]=void 0)});return{__SEROVAL_STREAM__:!0,on:h=>d(h),next:h=>{n&&(t.push(h),o(h,"next"))},throw:h=>{n&&(t.push(h),o(h,"throw"),n=!1,i=!1,e.length=0)},return:h=>{n&&(t.push(h),o(h,"return"),n=!1,i=!0,e.length=0)}}},sP=t=>e=>()=>{let n=0,i={[t]:()=>i,next:()=>{if(n>e.d)return{done:!0,value:void 0};let a=n++,o=e.v[a];if(a===e.t)throw o;return{done:a===e.d,value:o}}};return i},aP=(t,e)=>n=>()=>{let i=0,a=-1,o=!1,c=[],d=[],h=(g=0,v=d.length)=>{for(;g<v;g++)d[g].s({done:!0,value:void 0})};n.on({next:g=>{let v=d.shift();v&&v.s({done:!1,value:g}),c.push(g)},throw:g=>{let v=d.shift();v&&v.f(g),h(),a=c.length,o=!0,c.push(g)},return:g=>{let v=d.shift();v&&v.s({done:!0,value:g}),h(),a=c.length,c.push(g)}});let f={[t]:()=>f,next:()=>{if(a===-1){let y=i++;if(y>=c.length){let _=e();return d.push(_),_.p}return{done:!1,value:c[y]}}if(i>a)return{done:!0,value:void 0};let g=i++,v=c[g];if(g!==a)return{done:!1,value:v};if(o)throw v;return{done:!0,value:v}}};return f},Dk=t=>{let e=atob(t),n=e.length,i=new Uint8Array(n);for(let a=0;a<n;a++)i[a]=e.charCodeAt(a);return i.buffer};Dk.toString();function oP(t){return"__SEROVAL_SEQUENCE__"in t}function jk(t,e,n){return{__SEROVAL_SEQUENCE__:!0,v:t,t:e,d:n}}function lP(t){let e=[],n=-1,i=-1,a=t[ui]();for(;;)try{let o=a.next();if(e.push(o.value),o.done){i=e.length-1;break}}catch(o){n=e.length,e.push(o)}return jk(e,n,i)}var cP=sP(ui);function uP(t){return cP(t)}var dP={},hP={},fP={0:{},1:{},2:{},3:{},4:{},5:{}};function pP(t){return"__SEROVAL_STREAM__"in t}function ea(){return iP()}function gP(t){let e=ea(),n=t[ci]();async function i(){try{let a=await n.next();a.done?e.return(a.value):(e.next(a.value),await i())}catch(a){e.throw(a)}}return i().catch(()=>{}),e}var mP=aP(ci,kh);function vP(t){return mP(t)}async function yP(t){try{return[1,await t]}catch(e){return[0,e]}}function _P(t,e){return{plugins:e.plugins,mode:t,marked:new Set,features:63^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3}}function Rd(t,e){t.marked.add(e)}function bP(t,e){let n=t.refs.size;return t.refs.set(e,n),n}function xh(t,e){let n=t.refs.get(e);return n!=null?(Rd(t,n),{type:1,value:xO(n)}):{type:0,value:bP(t,e)}}function vv(t,e){let n=xh(t,e);return n.type===1?n:Ck(e)?{type:2,value:CO(n.value,e)}:n}function Fs(t,e){let n=vv(t,e);if(n.type!==0)return n.value;if(e in xk)return AO(n.value,e);throw new Eh(e)}function Th(t,e){let n=xh(t,fP[e]);return n.type===1?n.value:Qe(26,n.value,e,R,R,R,R,R,R,R,R,R)}function wP(t){let e=xh(t,dP);return e.type===1?e.value:Qe(27,e.value,R,R,R,R,R,R,Fs(t,ui),R,R,R)}function SP(t){let e=xh(t,hP);return e.type===1?e.value:Qe(29,e.value,R,R,R,R,R,[Th(t,1),Fs(t,ci)],R,R,R,R)}function EP(t,e,n,i){return Qe(n?11:10,t,R,R,R,i,R,R,R,R,Pk(e),R)}function kP(t,e,n,i){return Qe(8,e,R,R,R,R,{k:n,v:i},R,Th(t,0),R,R,R)}function xP(t,e,n){let i=new Uint8Array(n),a="";for(let o=0,c=i.length;o<c;o++)a+=String.fromCharCode(i[o]);return Qe(19,e,os(btoa(a)),R,R,R,R,R,Th(t,5),R,R,R)}function TP(t,e){return{base:_P(t,e),child:void 0}}var RP=class{constructor(e,n){this._p=e,this.depth=n}parse(e){return It(this._p,this.depth,e)}};async function AP(t,e,n){let i=[];for(let a=0,o=n.length;a<o;a++)a in n?i[a]=await It(t,e,n[a]):i[a]=0;return i}async function CP(t,e,n,i){return PO(n,i,await AP(t,e,i))}async function yv(t,e,n){let i=Object.entries(n),a=[],o=[];for(let c=0,d=i.length;c<d;c++)a.push(os(i[c][0])),o.push(await It(t,e,i[c][1]));return ui in n&&(a.push(Fs(t.base,ui)),o.push(zO(wP(t.base),await It(t,e,lP(n))))),ci in n&&(a.push(Fs(t.base,ci)),o.push(UO(SP(t.base),await It(t,e,gP(n))))),yo in n&&(a.push(Fs(t.base,yo)),o.push(Mk(n[yo]))),vo in n&&(a.push(Fs(t.base,vo)),o.push(n[vo]?Tk:Rk)),{k:a,v:o}}async function lg(t,e,n,i,a){return EP(n,i,a,await yv(t,e,i))}async function OP(t,e,n,i){return MO(n,await It(t,e,i.valueOf()))}async function PP(t,e,n,i){return LO(n,i,await It(t,e,i.buffer))}async function MP(t,e,n,i){return NO(n,i,await It(t,e,i.buffer))}async function LP(t,e,n,i){return DO(n,i,await It(t,e,i.buffer))}async function y0(t,e,n,i){let a=Ok(i,t.base.features);return jO(n,i,a?await yv(t,e,a):R)}async function NP(t,e,n,i){let a=Ok(i,t.base.features);return IO(n,i,a?await yv(t,e,a):R)}async function DP(t,e,n,i){let a=[],o=[];
12for(let[c,d]of i.entries())a.push(await It(t,e,c)),o.push(await It(t,e,d));return kP(t.base,n,a,o)}async function jP(t,e,n,i){let a=[];for(let o of i.keys())a.push(await It(t,e,o));return $O(n,a)}async function Ik(t,e,n,i){let a=t.base.plugins;if(a)for(let o=0,c=a.length;o<c;o++){let d=a[o];if(d.parse.async&&d.test(i))return OO(n,d.tag,await d.parse.async(i,new RP(t,e),{id:n}))}return R}async function IP(t,e,n,i){let[a,o]=await yP(i);return Qe(12,n,a,R,R,R,R,R,await It(t,e,o),R,R,R)}function $P(t,e,n,i,a){let o=[],c=n.on({next:d=>{Rd(this.base,e),It(this,t,d).then(h=>{o.push(qO(e,h))},h=>{a(h),c()})},throw:d=>{Rd(this.base,e),It(this,t,d).then(h=>{o.push(FO(e,h)),i(o),c()},h=>{a(h),c()})},return:d=>{Rd(this.base,e),It(this,t,d).then(h=>{o.push(HO(e,h)),i(o),c()},h=>{a(h),c()})}})}async function zP(t,e,n,i){return BO(n,Th(t.base,4),await new Promise($P.bind(t,e,n,i)))}async function UP(t,e,n,i){let a=[];for(let o=0,c=i.v.length;o<c;o++)a[o]=await It(t,e,i.v[o]);return VO(n,a,i.t,i.d)}async function BP(t,e,n,i){if(Array.isArray(i))return CP(t,e,n,i);if(pP(i))return zP(t,e,n,i);if(oP(i))return UP(t,e,n,i);let a=i.constructor;if(a===tP)return It(t,e,i.replacement);let o=await Ik(t,e,n,i);if(o)return o;switch(a){case Object:return lg(t,e,n,i,!1);case R:return lg(t,e,n,i,!0);case Date:return TO(n,i);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return y0(t,e,n,i);case Number:case Boolean:case String:case BigInt:return OP(t,e,n,i);case ArrayBuffer:return xP(t.base,n,i);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return PP(t,e,n,i);case DataView:return LP(t,e,n,i);case Map:return DP(t,e,n,i);case Set:return jP(t,e,n,i)}if(a===Promise||i instanceof Promise)return IP(t,e,n,i);let c=t.base.features;if(c&32&&a===RegExp)return RO(n,i);if(c&16)switch(a){case BigInt64Array:case BigUint64Array:return MP(t,e,n,i)}if(c&1&&typeof AggregateError<"u"&&(a===AggregateError||i instanceof AggregateError))return NP(t,e,n,i);if(i instanceof Error)return y0(t,e,n,i);if(ui in i||ci in i)return lg(t,e,n,i,!!a);throw new Eh(i)}async function qP(t,e,n){let i=vv(t.base,n);if(i.type!==0)return i.value;let a=await Ik(t,e,i.value,n);if(a)return a;throw new Eh(n)}async function It(t,e,n){switch(typeof n){case"boolean":return n?Tk:Rk;case"undefined":return dO;case"string":return Mk(n);case"number":return EO(n);case"bigint":return kO(n);case"object":{if(n){let i=vv(t.base,n);return i.type===0?await BP(t,e+1,i.value,n):i.value}return hO}case"symbol":return Fs(t.base,n);case"function":return qP(t,e,n);default:throw new Eh(n)}}async function FP(t,e){try{return await It(t,0,e)}catch(n){throw n instanceof v0?n:new v0(n)}}var HP=(t=>(t[t.Vanilla=1]="Vanilla",t[t.Cross=2]="Cross",t))(HP||{});function $k(t,e){for(let n=0,i=e.length;n<i;n++){let a=e[n];t.has(a)||(t.add(a),a.extends&&$k(t,a.extends))}}function zk(t){if(t){let e=new Set;return $k(e,t),[...e]}}function VP(t){switch(t){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new QO(t)}}var GP=1e6,YP=1e4,KP=2e4;function Uk(t,e){switch(e){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}var WP=1e3;function JP(t,e){var n;let i=e.refs||new Map;return"types"in i||Object.assign(i,{types:new Map}),{mode:t,plugins:e.plugins,refs:i,features:(n=e.features)!=null?n:63^(e.disabledFeatures||0),depthLimit:e.depthLimit||WP}}function ZP(t){return{mode:2,base:JP(2,t),child:R}}var XP=class{constructor(e,n){this._p=e,this.depth=n}deserialize(e){return lt(this._p,this.depth,e)}};function Bk(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new fi({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function QP(t,e,n){return Bk(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,n),n}function eM(t,e,n){return Bk(t.base,e),t.base.refs.set(e,n),n}function $t(t,e,n){return t.mode===1?QP(t,e,n):eM(t,e,n)}function Wg(t,e,n){if(Object.hasOwn(e,n))return e[n];throw new fi(t)}function tM(t,e){return $t(t,e.i,wO(ls(e.s)))}function nM(t,e,n){let i=n.a,a=i.length,o=$t(t,n.i,new Array(a));for(let c=0,d;c<a;c++)d=i[c],d&&(o[c]=lt(t,e,d));return Uk(o,n.o),o}function rM(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function iM(t){switch(t){case ci:case vo:case yo:case ui:return!0;default:return!1}}function _0(t,e,n){rM(e)?t[e]=n:Object.defineProperty(t,e,{value:n,configurable:!0,enumerable:!0,writable:!0})}function sM(t,e,n,i,a){if(typeof i=="string")_0(n,ls(i),lt(t,e,a));else{let o=lt(t,e,i);switch(typeof o){case"string":_0(n,o,lt(t,e,a));break;case"symbol":iM(o)&&(n[o]=lt(t,e,a));break;default:throw new fi(i)}}}function qk(t,e,n){t.base.refs.types.set(e,n)}function Ic(t,e,n,i){if(t.base.refs.types.get(n)!==i)throw new fi(e)}function Fk(t,e,n,i){let a=n.k;if(a.length>0)for(let o=0,c=n.v,d=a.length;o<d;o++)sM(t,e,i,a[o],c[o]);return i}function aM(t,e,n){let i=$t(t,n.i,n.t===10?{}:Object.create(null));return Fk(t,e,n.p,i),Uk(i,n.o),i}function oM(t,e){return $t(t,e.i,new Date(e.s))}function lM(t,e){if(t.base.features&32){let n=ls(e.c);if(n.length>KP)throw new fi(e);return $t(t,e.i,new RegExp(n,e.m))}throw new Nk(e)}function cM(t,e,n){let i=$t(t,n.i,new Set);for(let a=0,o=n.a,c=o.length;a<c;a++)i.add(lt(t,e,o[a]));return i}function uM(t,e,n){let i=$t(t,n.i,new Map);for(let a=0,o=n.e.k,c=n.e.v,d=o.length;a<d;a++)i.set(lt(t,e,o[a]),lt(t,e,c[a]));return i}function dM(t,e){if(e.s.length>GP)throw new fi(e);return $t(t,e.i,Dk(ls(e.s)))}function hM(t,e,n){var i;let a=VP(n.c),o=lt(t,e,n.f),c=(i=n.b)!=null?i:0;if(c<0||c>o.byteLength)throw new fi(n);return $t(t,n.i,new a(o,c,n.l))}function fM(t,e,n){var i;let a=lt(t,e,n.f),o=(i=n.b)!=null?i:0;if(o<0||o>a.byteLength)throw new fi(n);return $t(t,n.i,new DataView(a,o,n.l))}function Hk(t,e,n,i){if(n.p){let a=Fk(t,e,n.p,{});Object.defineProperties(i,Object.getOwnPropertyDescriptors(a))}return i}function pM(t,e,n){let i=$t(t,n.i,new AggregateError([],ls(n.m)));return Hk(t,e,n,i)}function gM(t,e,n){let i=Wg(n,uO,n.s),a=$t(t,n.i,new i(ls(n.m)));return Hk(t,e,n,a)}function mM(t,e,n){let i=kh(),a=$t(t,n.i,i.p),o=lt(t,e,n.f);return n.s?i.s(o):i.f(o),a}function vM(t,e,n){return $t(t,n.i,Object(lt(t,e,n.f)))}function yM(t,e,n){let i=t.base.plugins;if(i){let a=ls(n.c);for(let o=0,c=i.length;o<c;o++){let d=i[o];if(d.tag===a)return $t(t,n.i,d.deserialize(n.s,new XP(t,e),{id:n.i}))}}throw new JO(n.c)}function _M(t,e){let n=$t(t,e.i,$t(t,e.s,kh()).p);return qk(t,e.s,22),n}function bM(t,e,n){let i=t.base.refs.get(n.i);if(i)return Ic(t,n,n.i,22),i.s(lt(t,e,n.a[1])),R;throw new jc("Promise")}function wM(t,e,n){let i=t.base.refs.get(n.i);if(i)return Ic(t,n,n.i,22),i.f(lt(t,e,n.a[1])),R;throw new jc("Promise")}function SM(t,e,n){lt(t,e,n.a[0]);let i=lt(t,e,n.a[1]);return uP(i)}function EM(t,e,n){lt(t,e,n.a[0]);let i=lt(t,e,n.a[1]);return vP(i)}function kM(t,e,n){let i=$t(t,n.i,ea());qk(t,n.i,31);let a=n.a,o=a.length;if(o)for(let c=0;c<o;c++)lt(t,e,a[c]);return i}function xM(t,e,n){let i=t.base.refs.get(n.i);if(i)return Ic(t,n,n.i,31),i.next(lt(t,e,n.f)),R;throw new jc("Stream")}function TM(t,e,n){let i=t.base.refs.get(n.i);if(i)return Ic(t,n,n.i,31),i.throw(lt(t,e,n.f)),R;throw new jc("Stream")}function RM(t,e,n){let i=t.base.refs.get(n.i);if(i)return Ic(t,n,n.i,31),i.return(lt(t,e,n.f)),R;throw new jc("Stream")}function AM(t,e,n){return lt(t,e,n.f),R}function CM(t,e,n){return lt(t,e,n.a[1]),R}function OM(t,e,n){let i=$t(t,n.i,jk([],n.s,n.l));for(let a=0,o=n.a.length;a<o;a++)i.v[a]=lt(t,e,n.a[a]);return i}function lt(t,e,n){if(e>t.base.depthLimit)throw new eP(t.base.depthLimit);switch(e+=1,n.t){case 2:return Wg(n,lO,n.s);case 0:return Number(n.s);case 1:return ls(String(n.s));case 3:if(String(n.s).length>YP)throw new fi(n);return BigInt(n.s);case 4:return t.base.refs.get(n.i);case 18:return tM(t,n);case 9:return nM(t,e,n);case 10:case 11:return aM(t,e,n);case 5:return oM(t,n);case 6:return lM(t,n);case 7:return cM(t,e,n);case 8:return uM(t,e,n);case 19:return dM(t,n);case 16:case 15:return hM(t,e,n);case 20:return fM(t,e,n);case 14:return pM(t,e,n);case 13:return gM(t,e,n);case 12:return mM(t,e,n);case 17:return Wg(n,oO,n.s);case 21:return vM(t,e,n);case 25:return yM(t,e,n);case 22:return _M(t,n);case 23:return bM(t,e,n);case 24:return wM(t,e,n);case 28:return SM(t,e,n);case 30:return EM(t,e,n);case 31:return kM(t,e,n);case 32:return xM(t,e,n);case 33:return TM(t,e,n);case 34:return RM(t,e,n);case 27:return AM(t,e,n);case 29:return CM(t,e,n);case 35:return OM(t,e,n);default:throw new Nk(n)}}function PM(t,e){try{return lt(t,0,e)}catch(n){throw new WO(n)}}var MM=()=>T;MM.toString();function b0(t,e){let n=zk(e.plugins),i=ZP({plugins:n,refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit});return PM(i,t)}async function LM(t,e={}){let n=zk(e.plugins),i=TP(1,{plugins:n,disabledFeatures:e.disabledFeatures});return{t:await FP(i,t),f:i.base.features,m:Array.from(i.base.marked)}}function NM(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,n,i){return{v:n.parse(t.toSerializable(e))}},async async(e,n,i){return{v:await n.parse(t.toSerializable(e))}},stream(e,n,i){return{v:n.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,n,i){return t.fromSerializable(n.deserialize(e.v))}}}var DM=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}};const Ud=globalThis.Buffer,Vk=!!Ud&&typeof Ud.from=="function";function Gk(t){if(t.length===0)return"";if(Vk)return Ud.from(t).toString("base64");const e=32768,n=[];for(let i=0;i<t.length;i+=e){const a=t.subarray(i,i+e);n.push(String.fromCharCode.apply(null,a))}return btoa(n.join(""))}function Yk(t){if(t.length===0)return new Uint8Array(0);if(Vk){const i=Ud.from(t,"base64");return new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}const e=atob(t),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n}const Pl=Object.create(null),Ml=Object.create(null),jM=t=>new ReadableStream({start(e){t.on({next(n){try{e.enqueue(Yk(n))}catch{}},throw(n){e.error(n)},return(){try{e.close()}catch{}}})}}),IM=new TextEncoder,$M=t=>new ReadableStream({start(e){t.on({next(n){try{typeof n=="string"?e.enqueue(IM.encode(n)):e.enqueue(Yk(n.$b64))}catch{}},throw(n){e.error(n)},return(){try{e.close()}catch{}}})}}),zM="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
12i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",UM="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function w0(t){const e=ea(),n=t.getReader();return(async()=>{try{for(;;){const{done:i,value:a}=await n.read();if(i){e.return(void 0);break}e.next(Gk(a))}}catch(i){e.throw(i)}finally{n.releaseLock()}})(),e}function S0(t){const e=ea(),n=t.getReader(),i=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:a,value:o}=await n.read();if(a){try{const c=i.decode();c.length>0&&e.next(c)}catch{}e.return(void 0);break}try{const c=i.decode(o,{stream:!0});c.length>0&&e.next(c)}catch{e.next({$b64:Gk(o)})}}}catch(a){e.throw(a)}finally{n.releaseLock()}})(),e}const BM={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(t){return t===Pl},parse:{sync(t,e,n){return{}},async async(t,e,n){return{}},stream(t,e,n){return{}}},serialize(t,e,n){return zM},deserialize(t,e,n){return Pl}},{tag:"tss/RawStreamFactoryText",test(t){return t===Ml},parse:{sync(t,e,n){return{}},async async(t,e,n){return{}},stream(t,e,n){return{}}},serialize(t,e,n){return UM},deserialize(t,e,n){return Ml}}],test(t){return t instanceof DM},parse:{sync(t,e,n){const i=t.hint==="text"?Ml:Pl;return{hint:e.parse(t.hint),factory:e.parse(i),stream:e.parse(ea())}},async async(t,e,n){const i=t.hint==="text"?Ml:Pl,a=t.hint==="text"?S0(t.stream):w0(t.stream);return{hint:await e.parse(t.hint),factory:await e.parse(i),stream:await e.parse(a)}},stream(t,e,n){const i=t.hint==="text"?Ml:Pl,a=t.hint==="text"?S0(t.stream):w0(t.stream);return{hint:e.parse(t.hint),factory:e.parse(i),stream:e.parse(a)}}},serialize(t,e,n){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e,n){const i=e.deserialize(t.stream);return e.deserialize(t.hint)==="text"?$M(i):jM(i)}};function qM(t){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(e,n,i){return t(typeof n?.deserialize=="function"?n.deserialize(e.streamId):e.streamId)}}}const FM={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,e){return{message:e.parse(t.message)}},async async(t,e){return{message:await e.parse(t.message)}},stream(t,e){return{message:e.parse(t.message)}}},serialize(t,e){return"new Error("+e.serialize(t.message)+")"},deserialize(t,e){return new Error(e.deserialize(t.message))}};var Yi={},Kk=t=>new ReadableStream({start:e=>{t.on({next:n=>{try{e.enqueue(n)}catch{}},throw:n=>{e.error(n)},return:()=>{try{e.close()}catch{}}})}}),HM={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===Yi},parse:{sync(){return Yi},async async(){return await Promise.resolve(Yi)},stream(){return Yi}},serialize(){return Kk.toString()},deserialize(){return Yi}};function E0(t){let e=ea(),n=t.getReader();async function i(){try{let a=await n.read();a.done?e.return(a.value):(e.next(a.value),await i())}catch(a){e.throw(a)}}return i().catch(()=>{}),e}var VM={tag:"seroval/plugins/web/ReadableStream",extends:[HM],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(Yi),stream:e.parse(ea())}},async async(t,e){return{factory:await e.parse(Yi),stream:await e.parse(E0(t))}},stream(t,e){return{factory:e.parse(Yi),stream:e.parse(E0(t))}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){let n=e.deserialize(t.stream);return Kk(n)}},GM=VM;const YM=[FM,BM,GM];function KM(){return[...hv()?.serializationAdapters?.map(NM)??[],...YM]}var k0=new TextDecoder,WM=new Uint8Array(0),x0=16*1024*1024,T0=32*1024*1024,R0=1024,A0=1e5;function JM(t){const e=new Map,n=new Map,i=new Set;let a=!1,o=null,c=0,d;const h=new ReadableStream({start(v){d=v},cancel(){a=!0;try{o?.cancel()}catch{}e.forEach(v=>{try{v.error(new Error("Framed response cancelled"))}catch{}}),e.clear(),n.clear(),i.clear()}});function f(v){const y=n.get(v);if(y)return y;if(i.has(v))return new ReadableStream({start(w){w.close()}});if(n.size>
12=R0)throw new Error(`Too many raw streams in framed response (max ${R0})`);const _=new ReadableStream({start(w){e.set(v,w)},cancel(){i.add(v),e.delete(v),n.delete(v)}});return n.set(v,_),_}function g(v){return f(v),e.get(v)}return(async()=>{const v=t.getReader();o=v;const y=[];let _=0;function w(){if(_<9)return null;const k=y[0];if(k.length>=9)return{type:k[0],streamId:(k[1]<<24|k[2]<<16|k[3]<<8|k[4])>>>0,length:(k[5]<<24|k[6]<<16|k[7]<<8|k[8])>>>0};const x=new Uint8Array(9);let C=0,A=9;for(let M=0;M<y.length&&A>0;M++){const D=y[M],$=Math.min(D.length,A);x.set(D.subarray(0,$),C),C+=$,A-=$}return{type:x[0],streamId:(x[1]<<24|x[2]<<16|x[3]<<8|x[4])>>>0,length:(x[5]<<24|x[6]<<16|x[7]<<8|x[8])>>>0}}function S(k){if(k===0)return WM;const x=new Uint8Array(k);let C=0,A=k;for(;A>0&&y.length>0;){const M=y[0];if(!M)break;const D=Math.min(M.length,A);x.set(M.subarray(0,D),C),C+=D,A-=D,D===M.length?y.shift():y[0]=M.subarray(D)}return _-=k,x}try{for(;;){const{done:k,value:x}=await v.read();if(a||k)break;if(x){if(_+x.length>T0)throw new Error(`Framed response buffer exceeded ${T0} bytes`);for(y.push(x),_+=x.length;;){const C=w();if(!C)break;const{type:A,streamId:M,length:D}=C;if(A!==Jr.JSON&&A!==Jr.CHUNK&&A!==Jr.END&&A!==Jr.ERROR)throw new Error(`Unknown frame type: ${A}`);if(A===Jr.JSON){if(M!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(M===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(D>x0)throw new Error(`Frame payload too large: ${D} bytes (max ${x0})`);const $=9+D;if(_<$)break;if(++c>A0)throw new Error(`Too many frames in framed response (max ${A0})`);S(9);const L=S(D);switch(A){case Jr.JSON:try{d.enqueue(k0.decode(L))}catch{}break;case Jr.CHUNK:{const I=g(M);I&&I.enqueue(L);break}case Jr.END:{const I=g(M);if(i.add(M),I){try{I.close()}catch{}e.delete(M)}break}case Jr.ERROR:{const I=g(M);if(i.add(M),I){const U=k0.decode(L);I.error(new Error(U)),e.delete(M)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}e.forEach(k=>{try{k.close()}catch{}}),e.clear()}catch(k){try{d.error(k)}catch{}e.forEach(x=>{try{x.error(k)}catch{}}),e.clear()}finally{try{v.releaseLock()}catch{}o=null}})(),{getOrCreateStream:f,jsonChunks:h}}var mc=null;async function Jg(t){t.length>0&&await Promise.allSettled(t)}var ZM=Object.prototype.hasOwnProperty;function Wk(t){for(const e in t)if(ZM.call(t,e))return!0;return!1}async function XM(t,e,n){mc||(mc=KM());const i=e[0],a=i.fetch??n,o=i.data instanceof FormData?"formData":"payload",c=i.headers?new Headers(i.headers):new Headers;if(c.set("x-tsr-serverFn","true"),o==="payload"&&c.set("accept",`${WA}, application/x-ndjson, application/json`),i.method==="GET"){if(o==="formData")throw new Error("FormData is not supported with GET requests");const h=await Jk(i);if(h!==void 0){const f=ok({payload:h});t.includes("?")?t+=`&${f}`:t+=`?${f}`}}let d;if(i.method==="POST"){const h=await QM(i);h?.contentType&&c.set("content-type",h.contentType),d=h?.body}return await eL(async()=>a(t,{method:i.method,headers:c,signal:i.signal,body:d}))}async function Jk(t){let e=!1;const n={};if(t.data!==void 0&&(e=!0,n.data=t.data),t.context&&Wk(t.context)&&(e=!0,n.context=t.context),e)return Zk(n)}async function Zk(t){return JSON.stringify(await Promise.resolve(LM(t,{plugins:mc})))}async function QM(t){if(t.data instanceof FormData){let n;return t.context&&Wk(t.context)&&(n=await Zk(t.context)),n!==void 0&&t.data.set(KA,n),{body:t.data}}const e=await Jk(t);if(e)return{body:e,contentType:"application/json"}}async function eL(t){let e;try{e=await t()}catch(i){if(i instanceof Response)e=i;else throw console.log(i),i}if(e.headers.get("x-tss-raw")==="true")return e;const n=e.headers.get("content-type");if(n||xn(),e.headers.get("x-tss-serialized")){let i;if(n.includes("application/x-tss-framed")){if(XA(n),!e.body)throw new Error("No response body for framed response");const{getOrCreateStream:a,jsonChunks:o}=JM(e.body),c=[qM(a),...mc||[]],d=new Map;i=await tL({jsonStream:o,onMessage:h=>b0(h,{refs:d,plugins:c}),onError(h,f){console.error(h,f)}})}else if(n.includes("application/json")){const a=await e.json(),o=[];i=b0(a,{plugins:mc}),await Jg(o)}if(i||xn(),i instanceof Error)throw i;return i}if(n.includes("application/json")){const i=await e.json(),a=ck(i);if(a)throw a;if(qt(i))throw i;return i}if(!e.ok)throw new Error(await e.text());return e}async function tL({jsonStream:t,onMessage:e,onError:n}){const i=t.getReader(),{value:a,done:o}=await i.read();if(o||!a)throw new Error("Stream ended before first object");const c=JSON.parse(a);let d=!1;const h=(async()=>{try{for(;;){const{value:v,done:y}=await i.read();if(y)break;if(v)try{const _=[];try{e(JSON.parse(v))}finally{}await Jg(_)}catch(_){n?.(`Invalid JSON: ${v}`,_)}}}catch(v){d||n?.("Stream processing error:",v)}})();let f;const g=[];try{f=e(c)}catch(v){throw d=!0,i.cancel().catch(()=>{}),v}return await Jg(g),Promise.resolve(f).catch(()=>{d=!0,i.cancel().catch(()=>{})}),h.finally(()=>{try{i.releaseLock()}catch{}}),f}function Mo(t){const e="/_serverFn/"+t;return Object.assign((...a)=>{const o=hv()?.serverFns?.fetch;return XM(e,a,o??fetch)},{url:e,serverFnMeta:{id:t},[Gg]:!0})}var nL={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(Gg in t)?!1:!!t[Gg],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>Mo(t)};function Xk(t){if(Array.isArray(t))return t.flatMap(g=>Xk(g));if(typeof t!="string")return[];const e=[];let n=0,i,a,o,c,d;const h=()=>{for(;n<t.length&&/\s/.test(t.charAt(n));)n+=1;return n<t.length},f=()=>(a=t.charAt(n),a!=="="&&a!==";"&&a!==",");for(;n<t.length;){for(i=n,d=!1;h();)if(a=t.charAt(n),a===","){for(o=n,n+=1,h(),c=n;n<t.length&&f();)n+=1;n<t.length&&t.charAt(n)==="="?(d=!0,n=c,e.push(t.slice(i,o)),i=n):n=o+1}else n+=1;(!d||n>=t.length)&&e.push(t.slice(i))}return e}function rL(t){return t instanceof Headers?t:Array.isArray(t)?new Headers(t):typeof t=="object"?new Headers(t):null}function iL(...t){return t.reduce((e,n)=>{const i=rL(n);if(!i)return e;
12for(const[a,o]of i.entries())a==="set-cookie"?Xk(o).forEach(c=>e.append("set-cookie",c)):e.set(a,o);return e},new Headers)}function C0(t){return t.replaceAll("\0","/").replaceAll("�","/")}function sL(t,e){t.id=e.i,t.__beforeLoadContext=e.b,t.loaderData=e.l,t.status=e.s,t.ssr=e.ssr,t.updatedAt=e.u,t.error=e.e,e.g!==void 0&&(t.globalNotFound=e.g)}async function aL(t){window.$_TSR||xn();const e=t.options.serializationAdapters;if(e?.length){const k=new Map;e.forEach(x=>{k.set(x.key,x.fromSerializable)}),window.$_TSR.t=k,window.$_TSR.buffer.forEach(x=>x())}window.$_TSR.initialized=!0,window.$_TSR.router||xn();const n=window.$_TSR.router;n.matches.forEach(k=>{k.i=C0(k.i)}),n.lastMatchId&&(n.lastMatchId=C0(n.lastMatchId));const{manifest:i,dehydratedData:a,lastMatchId:o}=n;t.ssr={manifest:i};const c=document.querySelector('meta[property="csp-nonce"]')?.content;t.options.ssr={nonce:c},await t.options.hydrate?.(a);const d=t.matchRoutes(t.stores.location.get()),h=Promise.all(d.map(k=>t.loadRouteChunk(t.looseRoutesById[k.routeId])));function f(k){const x=t.looseRoutesById[k.routeId].options.pendingMinMs??t.options.defaultPendingMinMs;if(x){const C=Ws();k._nonReactive.minPendingPromise=C,k._forcePending=!0,setTimeout(()=>{C.resolve(),t.updateMatch(k.id,A=>(A._nonReactive.minPendingPromise=void 0,{...A,_forcePending:void 0}))},x)}}function g(k){const x=t.looseRoutesById[k.routeId];x&&(x.options.ssr=k.ssr)}let v;d.forEach(k=>{const x=n.matches.find(C=>C.i===k.id);if(!x){k._nonReactive.dehydrated=!1,k.ssr=!1,g(k);return}sL(k,x),g(k),k._nonReactive.dehydrated=k.ssr!==!1,(k.ssr==="data-only"||k.ssr===!1)&&v===void 0&&(v=k.index,f(k))}),t.stores.setMatches(d);const y=t.stores.matches.get(),_=t.stores.location.get();await Promise.all(y.map(async k=>{try{const x=t.looseRoutesById[k.routeId],C=y[k.index-1]?.context??t.options.context;if(x.options.context){const $={deps:k.loaderDeps,params:k.params,context:C??{},location:_,navigate:L=>t.navigate({...L,_fromLocation:_}),buildLocation:t.buildLocation,cause:k.cause,abortController:k.abortController,preload:!1,matches:d,routeId:x.id};k.__routeContext=x.options.context($)??void 0}k.context={...C,...k.__routeContext,...k.__beforeLoadContext};const A={ssr:t.options.ssr,matches:y,match:k,params:k.params,loaderData:k.loaderData},M=await x.options.head?.(A),D=await x.options.scripts?.(A);k.meta=M?.meta,k.links=M?.links,k.headScripts=M?.scripts,k.styles=M?.styles,k.scripts=D}catch(x){if(qt(x))k.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${k.routeId}`,x);else throw k.error=x,console.error(`Error during hydration for route ${k.routeId}:`,x),x}}));const w=d[d.length-1].id!==o;if(!d.some(k=>k.ssr===!1)&&!w)return d.forEach(k=>{k._nonReactive.dehydrated=void 0}),t.stores.resolvedLocation.set(t.stores.location.get()),h;const S=Promise.resolve().then(()=>t.load()).catch(k=>{console.error("Error during router hydration:",k)});if(w){const k=d[1];k||xn(),f(k),k._displayPending=!0,k._nonReactive.displayPendingPromise=S,S.then(()=>{t.batch(()=>{t.stores.status.get()==="pending"&&(t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())),t.updateMatch(k.id,x=>({...x,_displayPending:void 0,displayPendingPromise:void 0}))})})}return h}var Bd=ne.use,uo=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function cg(t){const e=ne.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function oL(t,e,n={},i={}){ne.useEffect(()=>{if(!t.current||i.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([o])=>{e(o)},n);return a.observe(t.current),()=>{a.disconnect()}},[e,n,i.disabled,t])}function lL(t){const e=ne.useRef(null);return ne.useImperativeHandle(t,()=>e.current,[]),e}function cL({promise:t}){if(Bd)return Bd(t);const e=QC(t);if(e[xr].status==="pending")throw e;if(e[xr].status==="error")throw e[xr].error;return e[xr].data}function uL(t){const e=q.jsx(dL,{...t});return t.fallback?q.jsx(ne.Suspense,{fallback:t.fallback,children:e}):e}function dL(t){const e=cL(t);return t.children(e)}function _v(t){const e=t.errorComponent??bv;return q.jsx(hL,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:i})=>n?ne.createElement(e,{error:n,reset:i}):t.children})}var hL=class extends ne.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function bv({error:t}){const[e,n]=ne.useState(!1);return q.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[q.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),q.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:e?"Hide Error":"Show Error"})]}),q.jsx("div",{style:{height:".25rem"}}),e?q.jsx("div",{children:q.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?q.jsx("code",{children:t.message}):null})}):null]})}function fL({children:t,fallback:e=null}){return wv()?q.jsx(pr.Fragment,{children:t}):q.jsx(pr.Fragment,{children:e})}function wv(){return pr.useSyncExternalStore(pL,()=>!0,()=>!1)}function pL(){return()=>{}}var Qk=ne.createContext(null);function en(t){return ne.useContext(Qk)}var Rh=ne.createContext(void 0),gL=ne.createContext(void 0),mt=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(mt||{});function mL({update:t,notify:e,unwatched:n}){return{link:i,unlink:a,propagate:o,checkDirty:c,shallowPropagate:d};function i(f,g,v){const y=g.depsTail;if(y!==void 0&&y.dep===f)return;const _=y!==void 0?y.nextDep:g.deps;if(_!==void 0&&_.dep===f){_.version=v,g.depsTail=_;return}const w=f.subsTail;if(w!==void 0&&w.version===v&&w.sub===g)return;const S=g.depsTail=f.subsTail={version:v,dep:f,sub:g,prevDep:y,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=S),y!==void 0?y.nextDep=S:g.deps=S,w!==void 0?w.nextSub=S:f.subs=S}
12function a(f,g=f.sub){const v=f.dep,y=f.prevDep,_=f.nextDep,w=f.nextSub,S=f.prevSub;return _!==void 0?_.prevDep=y:g.depsTail=y,y!==void 0?y.nextDep=_:g.deps=_,w!==void 0?w.prevSub=S:v.subsTail=S,S!==void 0?S.nextSub=w:(v.subs=w)===void 0&&n(v),_}function o(f){let g=f.nextSub,v;e:do{const y=f.sub;let _=y.flags;if(_&60?_&12?_&4?!(_&48)&&h(f,y)?(y.flags=_|40,_&=1):_=0:y.flags=_&-9|32:_=0:y.flags=_|32,_&2&&e(y),_&1){const w=y.subs;if(w!==void 0){const S=(f=w).nextSub;S!==void 0&&(v={value:g,prev:v},g=S);continue}}if((f=g)!==void 0){g=f.nextSub;continue}for(;v!==void 0;)if(f=v.value,v=v.prev,f!==void 0){g=f.nextSub;continue e}break}while(!0)}function c(f,g){let v,y=0,_=!1;e:do{const w=f.dep,S=w.flags;if(g.flags&16)_=!0;else if((S&17)===17){if(t(w)){const k=w.subs;k.nextSub!==void 0&&d(k),_=!0}}else if((S&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(v={value:f,prev:v}),f=w.deps,g=w,++y;continue}if(!_){const k=f.nextDep;if(k!==void 0){f=k;continue}}for(;y--;){const k=g.subs,x=k.nextSub!==void 0;if(x?(f=v.value,v=v.prev):f=k,_){if(t(g)){x&&d(k),g=f.sub;continue}_=!1}else g.flags&=-33;g=f.sub;const C=f.nextDep;if(C!==void 0){f=C;continue e}}return _}while(!0)}function d(f){do{const g=f.sub,v=g.flags;(v&48)===32&&(g.flags=v|16,(v&6)===2&&e(g))}while((f=f.nextSub)!==void 0)}function h(f,g){let v=g.depsTail;for(;v!==void 0;){if(v===f)return!0;v=v.prevDep}return!1}}function vL(t,e,n){const i=typeof t=="object",a=i?t:void 0;return{next:(i?t.next:t)?.bind(a),error:(i?t.error:e)?.bind(a),complete:(i?t.complete:n)?.bind(a)}}const Zg=[];let Ad=0;const{link:O0,unlink:yL,propagate:_L,checkDirty:ex,shallowPropagate:P0}=mL({update(t){return t._update()},notify(t){Zg[Xg++]=t,t.flags&=~mt.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=mt.Mutable|mt.Dirty,qd(t))}});let sd=0,Xg=0,Er,Qg=0;function tx(t){try{++Qg,t()}finally{--Qg||nx()}}function qd(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=yL(n,t)}function nx(){if(!(Qg>0)){for(;sd<Xg;){const t=Zg[sd];Zg[sd++]=void 0,t.notify()}sd=0,Xg=0}}function M0(t,e){const n=typeof t=="function",i=t,a={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?mt.None:mt.Mutable,get(){return Er!==void 0&&O0(a,Er,Ad),a._snapshot},subscribe(o){const c=vL(o),d={current:!1},h=bL(()=>{a.get(),d.current?c.next?.(a._snapshot):d.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(o){const c=Er,d=e?.compare??Object.is;if(n)Er=a,++Ad,a.depsTail=void 0;else if(o===void 0)return!1;n&&(a.flags=mt.Mutable|mt.RecursedCheck);
12try{const h=a._snapshot,f=typeof o=="function"?o(h):o===void 0&&n?i(h):o;return h===void 0||!d(h,f)?(a._snapshot=f,!0):!1}finally{Er=c,n&&(a.flags&=~mt.RecursedCheck),qd(a)}}};return n?(a.flags=mt.Mutable|mt.Dirty,a.get=function(){const o=a.flags;if(o&mt.Dirty||o&mt.Pending&&ex(a.deps,a)){if(a._update()){const c=a.subs;c!==void 0&&P0(c)}}else o&mt.Pending&&(a.flags=o&~mt.Pending);return Er!==void 0&&O0(a,Er,Ad),a._snapshot}):a.set=function(o){if(a._update(o)){const c=a.subs;c!==void 0&&(_L(c),P0(c),nx())}},a}function bL(t){const e=()=>{const i=Er;Er=n,++Ad,n.depsTail=void 0,n.flags=mt.Watching|mt.RecursedCheck;try{return t()}finally{Er=i,n.flags&=~mt.RecursedCheck,qd(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:mt.Watching|mt.RecursedCheck,notify(){const i=this.flags;i&mt.Dirty||i&mt.Pending&&ex(this.deps,this)?e():this.flags=mt.Watching},stop(){this.flags=mt.None,this.depsTail=void 0,qd(this)}};return e(),n}var ug={exports:{}},dg={},hg={exports:{}},fg={};var L0;function wL(){if(L0)return fg;L0=1;var t=Dc();function e(v,y){return v===y&&(v!==0||1/v===1/y)||v!==v&&y!==y}var n=typeof Object.is=="function"?Object.is:e,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function d(v,y){var _=y(),w=i({inst:{value:_,getSnapshot:y}}),S=w[0].inst,k=w[1];return o(function(){S.value=_,S.getSnapshot=y,h(S)&&k({inst:S})},[v,_,y]),a(function(){return h(S)&&k({inst:S}),v(function(){h(S)&&k({inst:S})})},[v]),c(_),_}function h(v){var y=v.getSnapshot;v=v.value;try{var _=y();return!n(v,_)}catch{return!0}}function f(v,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:d;return fg.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,fg}var N0;function SL(){return N0||(N0=1,hg.exports=wL()),hg.exports}var D0;function EL(){if(D0)return dg;D0=1;var t=Dc(),e=SL();function n(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var i=typeof Object.is=="function"?Object.is:n,a=e.useSyncExternalStore,o=t.useRef,c=t.useEffect,d=t.useMemo,h=t.useDebugValue;return dg.useSyncExternalStoreWithSelector=function(f,g,v,y,_){var w=o(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=d(function(){function x($){if(!C){if(C=!0,A=$,$=y($),_!==void 0&&S.hasValue){var L=S.value;if(_(L,$))return M=L}return M=$}if(L=M,i(A,$))return L;var I=y($);return _!==void 0&&_(L,I)?(A=$,L):(A=$,M=I)}var C=!1,A,M,D=v===void 0?null:v;return[function(){return x(g())},D===null?void 0:function(){return x(D())}]},[g,v,y,_]);var k=a(f,w[0],w[1]);return c(function(){S.hasValue=!0,S.value=k},[k]),h(k),k},dg}var j0;function kL(){return j0||(j0=1,ug.exports=EL()),ug.exports}var xL=kL();function TL(t,e){return t===e}function Nt(t,e,n=TL){const i=ne.useCallback(c=>{if(!t)return()=>{};const{unsubscribe:d}=t.subscribe(c);return d},[t]),a=ne.useCallback(()=>t?.get(),[t]);return xL.useSyncExternalStoreWithSelector(i,a,a,e,n)}var RL={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ta(t){const e=en(),n=ne.useContext(t.from?gL:Rh),i=t.from??n,a=i?t.from?e.stores.getRouteMatchStore(i):e.stores.matchStores.get(i):void 0,o=ne.useRef(void 0);return Nt(a??RL,c=>{if((t.shouldThrow??!0)&&!c&&xn(),c===void 0)return;const d=t.select?t.select(c):c;if(t.structuralSharing??e.options.defaultStructuralSharing){const h=Bs(o.current,d);return o.current=h,h}return d})}function rx(t){return ta({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function ix(t){const{select:e,...n}=t;return ta({...n,select:i=>e?e(i.loaderDeps):i.loaderDeps})}function sx(t){return ta({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function ax(t){return ta({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function Sv(t){const e=en();return ne.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function e4(t){const e=en(),n=Sv(),i=ne.useRef(null);return uo(()=>{i.current!==t&&(n(t),i.current=t)},[e,t,n]),null}function ox(t){return ta({...t,select:e=>t.select?t.select(e.context):e.context})}var AL=JE();function CL(t,e){const n=en(),i=lL(e),{activeProps:a,inactiveProps:o,activeOptions:c,to:d,preload:h,preloadDelay:f,preloadIntentProximity:g,hashScrollIntoView:v,replace:y,startTransition:_,resetScroll:w,viewTransition:S,children:k,target:x,disabled:C,style:A,className:M,onClick:D,onBlur:$,onFocus:L,onMouseEnter:I,onMouseLeave:U,onTouchStart:X,ignoreBlocker:Q,params:te,search:_e,hash:pe,state:Ne,mask:H,reloadDocument:Z,unsafeRelative:ue,from:Ee,_fromLocation:Me,...P}=t,K=wv(),ee=ne.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),se=Nt(n.stores.location,ct=>ct,(ct,Ht)=>ct.href===Ht.href),de=ne.useMemo(()=>{const ct={_fromLocation:se,...ee};return n.buildLocation(ct)},[n,se,ee]),Te=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,Ie=de.maskedLocation?de.maskedLocation.external:de.external,Ye=ne.useMemo(()=>DL(Te,Ie,n.history,C),[C,Ie,Te,n.history]),Ve=ne.useMemo(()=>
12{if(Ye?.external)return jd(Ye.href,n.protocolAllowlist)?void 0:Ye.href;if(!jL(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),jd(d,n.protocolAllowlist)?void 0:d}catch{}},[d,Ye,n.protocolAllowlist]),hn=ne.useMemo(()=>{if(Ve)return!1;if(c?.exact){if(!_C(se.pathname,de.pathname,n.basepath))return!1}else{const ct=Id(se.pathname,n.basepath),Ht=Id(de.pathname,n.basepath);if(!(ct.startsWith(Ht)&&(ct.length===Ht.length||ct[Ht.length]==="/")))return!1}return(c?.includeSearch??!0)&&!En(se.search,de.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?K&&se.hash===de.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,se,Ve,K,de.hash,de.pathname,de.search,n.basepath]),sr=hn?Zi(a,{})??OL:pg,Ft=hn?pg:Zi(o,{})??pg,us=[M,sr.className,Ft.className].filter(Boolean).join(" "),Bn=(A||sr.style||Ft.style)&&{...A,...sr.style,...Ft.style},[ds,sn]=ne.useState(!1),na=ne.useRef(!1),qn=t.reloadDocument||Ve?!1:h??n.options.defaultPreload,ar=f??n.options.defaultPreloadDelay??0,fn=ne.useCallback(()=>{n.preloadRoute({...ee,_builtLocation:de}).catch(ct=>{console.warn(ct),console.warn(eO)})},[n,ee,de]);oL(i,ne.useCallback(ct=>{ct?.isIntersecting&&fn()},[fn]),NL,{disabled:!!C||qn!=="viewport"}),ne.useEffect(()=>{na.current||!C&&qn==="render"&&(fn(),na.current=!0)},[C,fn,qn]);const mi=ct=>{const Ht=ct.currentTarget.getAttribute("target"),vr=x!==void 0?x:Ht;if(!C&&!IL(ct)&&!ct.defaultPrevented&&(!vr||vr==="_self")&&ct.button===0){ct.preventDefault(),AL.flushSync(()=>{sn(!0)});const ra=n.subscribe("onResolved",()=>{ra(),sn(!1)});n.navigate({...ee,replace:y,resetScroll:w,hashScrollIntoView:v,startTransition:_,viewTransition:S,ignoreBlocker:Q})}};if(Ve)return{...P,ref:i,href:Ve,...k&&{children:k},...x&&{target:x},...C&&{disabled:C},...A&&{style:A},...M&&{className:M},...D&&{onClick:D},...$&&{onBlur:$},...L&&{onFocus:L},...I&&{onMouseEnter:I},...U&&{onMouseLeave:U},...X&&{onTouchStart:X}};const hs=ct=>{if(C||qn!=="intent")return;if(!ar){fn();return}const Ht=ct.currentTarget;if(Ll.has(Ht))return;const vr=setTimeout(()=>{Ll.delete(Ht),fn()},ar);Ll.set(Ht,vr)},fs=ct=>{C||qn!=="intent"||fn()},tn=ct=>{if(C||!qn||!ar)return;const Ht=ct.currentTarget,vr=Ll.get(Ht);vr&&(clearTimeout(vr),Ll.delete(Ht))};return{...P,...sr,...Ft,href:Ye?.href,ref:i,onClick:qa([D,mi]),onBlur:qa([$,tn]),onFocus:qa([L,hs]),onMouseEnter:qa([I,hs]),onMouseLeave:qa([U,tn]),onTouchStart:qa([X,fs]),disabled:!!C,target:x,...Bn&&{style:Bn},...us&&{className:us},...C&&PL,...hn&&ML,...K&&ds&&LL}}var pg={},OL={className:"active"},PL={role:"link","aria-disabled":!0},ML={"data-status":"active","aria-current":"page"},LL={"data-transitioning":"transitioning"},Ll=new WeakMap,NL={rootMargin:"100px"},qa=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function DL(t,e,n,i){if(!i)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function jL(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var lx=ne.forwardRef((t,e)=>{const{_asChild:n,...i}=t,{type:a,...o}=CL(i,e),c=typeof i.children=="function"?i.children({isActive:o["data-status"]==="active"}):i.children;if(!n){const{disabled:d,...h}=o;return ne.createElement("a",h,c)}return ne.createElement(n,o,c)});function IL(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var $L=class extends gk{constructor(e){super(e),this.useMatch=n=>ta({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ox({...n,from:this.id}),this.useSearch=n=>ax({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>sx({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>ix({...n,from:this.id}),this.useLoaderData=n=>rx({...n,from:this.id}),this.useNavigate=()=>Sv({from:this.fullPath}),this.Link=pr.forwardRef((n,i)=>q.jsx(lx,{ref:i,from:this.fullPath,...n}))}};function zL(t){return new $L(t)}var UL=class extends iO{constructor(t){super(t),this.useMatch=e=>ta({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>ox({...e,from:this.id}),this.useSearch=e=>ax({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>sx({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ix({...e,from:this.id}),this.useLoaderData=e=>rx({...e,from:this.id}),this.useNavigate=()=>Sv({from:this.fullPath}
12),this.Link=pr.forwardRef((e,n)=>q.jsx(lx,{ref:n,from:this.fullPath,...e}))}};function BL(t){return new UL(t)}function Re(t){return new qL(t,{silent:!0}).createRoute}var qL=class{constructor(t,e){this.path=t,this.createRoute=n=>{const i=zL(n);return i.isRoot=!1,i},this.silent=e?.silent}};function Ae(t,e){let n,i,a,o;const c=()=>(n||(n=t().then(h=>{n=void 0,i=h[e]}).catch(h=>{if(a=h,tC(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),o=!0)}})),n),d=function(f){if(o)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!i)if(Bd)Bd(c());else throw c();return ne.createElement(i,f)};return d.preload=c,d}function FL(t){const e=en(),n=`not-found-${Nt(e.stores.location,i=>i.pathname)}-${Nt(e.stores.status,i=>i)}`;return q.jsx(_v,{getResetKey:()=>n,onCatch:(i,a)=>{if(qt(i))t.onCatch?.(i,a);else throw i},errorComponent:({error:i})=>{if(qt(i))return t.fallback?.(i);throw i},children:t.children})}function HL(){return q.jsx("p",{children:"Not Found"})}function Qa(t){return q.jsx(q.Fragment,{children:t.children})}function cx(t,e,n){return e.options.notFoundComponent?q.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?q.jsx(t.options.defaultNotFoundComponent,{...n}):q.jsx(HL,{})}function VL(t){return null}function GL(){return VL(en()),null}var ux=ne.memo(function({matchId:e}){const n=en(),i=n.stores.matchStores.get(e);i||xn();const a=Nt(n.stores.loadedAt,c=>c),o=Nt(i,c=>c);return q.jsx(YL,{router:n,matchId:e,resetKey:a,matchState:ne.useMemo(()=>{const c=o.routeId,d=n.routesById[c].parentRoute?.id;return{routeId:c,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:d}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function YL({router:t,matchId:e,resetKey:n,matchState:i}){const a=t.routesById[i.routeId],o=a.options.pendingComponent??t.options.defaultPendingComponent,c=o?q.jsx(o,{}):null,d=a.options.errorComponent??t.options.defaultErrorComponent,h=a.options.onCatch??t.options.defaultOnCatch,f=a.isRoot?a.options.notFoundComponent??t.options.notFoundRoute?.options.component:a.options.notFoundComponent,g=i.ssr===!1||i.ssr==="data-only",v=(!a.isRoot||a.options.wrapInSuspense||g)&&(a.options.wrapInSuspense??o??(a.options.errorComponent?.preload||g))?ne.Suspense:Qa,y=d?_v:Qa,_=f?FL:Qa;return q.jsxs(a.isRoot?a.options.shellComponent??Qa:Qa,{children:[q.jsx(Rh.Provider,{value:e,children:q.jsx(v,{fallback:c,children:q.jsx(y,{getResetKey:()=>n,errorComponent:d||bv,onCatch:(w,S)=>{if(qt(w))throw w.routeId??=i.routeId,w;h?.(w,S)},children:q.jsx(_,{fallback:w=>{if(w.routeId??=i.routeId,!f||w.routeId&&w.routeId!==i.routeId||!w.routeId&&
12!a.isRoot)throw w;return ne.createElement(f,w)},children:g||i._displayPending?q.jsx(fL,{fallback:c,children:q.jsx(I0,{matchId:e})}):q.jsx(I0,{matchId:e})})})})}),i.parentRouteId===Vs?q.jsxs(q.Fragment,{children:[q.jsx(KL,{resetKey:n}),t.options.scrollRestoration&&ZE?q.jsx(GL,{}):null]}):null]})}function KL({resetKey:t}){const e=en(),n=ne.useRef(void 0);return uo(()=>{const i=e.latestLocation.href;(n.current===void 0||n.current!==i)&&(e.emit({type:"onRendered",...mo(e.stores.location.get(),e.stores.resolvedLocation.get())}),n.current=i)},[e.latestLocation.state.__TSR_key,t,e]),null}var I0=ne.memo(function({matchId:e}){const n=en(),i=(g,v)=>n.getMatch(g.id)?._nonReactive[v]??g._nonReactive[v],a=n.stores.matchStores.get(e);a||xn();const o=Nt(a,g=>g),c=o.routeId,d=n.routesById[c],h=ne.useMemo(()=>{const g=(n.routesById[c].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:c,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return g?JSON.stringify(g):void 0},[c,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=ne.useMemo(()=>{const g=d.options.component??n.options.defaultComponent;return g?q.jsx(g,{},h):q.jsx(WL,{})},[h,d.options.component,n.options.defaultComponent]);if(o._displayPending)throw i(o,"displayPendingPromise");if(o._forcePending)throw i(o,"minPendingPromise");if(o.status==="pending"){const g=d.options.pendingMinMs??n.options.defaultPendingMinMs;if(g){const v=n.getMatch(o.id);if(v&&!v._nonReactive.minPendingPromise){const y=Ws();v._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),v._nonReactive.minPendingPromise=void 0},g)}}throw i(o,"loadPromise")}if(o.status==="notFound")return qt(o.error)||xn(),cx(n,d,o.error);if(o.status==="redirected")throw dn(o.error)||xn(),i(o,"loadPromise");if(o.status==="error")throw o.error;return f}),WL=ne.memo(function(){const e=en(),n=ne.useContext(Rh);let i,a=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[i,a]=Nt(f,g=>[g?.routeId,g?.globalNotFound??!1]),o=Nt(e.stores.matchesId,g=>g[g.findIndex(v=>v===n)+1])}const c=i?e.routesById[i]:void 0,d=e.options.defaultPendingComponent?q.jsx(e.options.defaultPendingComponent,{}):null;if(a)return c||xn(),cx(e,c,void 0);if(!o)return null;const h=q.jsx(ux,{matchId:o});return i===Vs?q.jsx(ne.Suspense,{fallback:d,children:h}):h});function JL(){const t=en(),e=ne.useRef({router:t,mounted:!1}),[n,i]=ne.useState(!1),a=Nt(t.stores.isLoading,v=>v),o=Nt(t.stores.hasPending,v=>v),c=cg(a),d=a||n||o,h=cg(d),f=a||o,g=cg(f);return t.startTransition=v=>{i(!0),ne.startTransition(()=>{v(),i(!1)})},ne.useEffect(()=>{const v=t.history.subscribe(t.load),y=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return oi(t.latestLocation.publicHref)!==oi(y.publicHref)&&t.commitLocation({...y,replace:!0}),()=>{v()}},[t,t.history]),uo(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(y){console.error(y)}})()},[t]),uo(()=>{c&&!a&&t.emit({type:"onLoad",...mo(t.stores.location.get(),t.stores.resolvedLocation.get())})},[c,t,a]),uo(()=>{g&&!f&&t.emit({type:"onBeforeRouteMount",...mo(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,g,t]),uo(()=>{if(h&&!d){const v=mo(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...v}),tx(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())}),v.hrefChanged&&sO(t)}},[d,h,t]),null}function ZL(){const t=en(),e=t.routesById[Vs].options.pendingComponent??t.options.defaultPendingComponent,n=e?q.jsx(e,{}):null,i=q.jsxs(typeof document<"u"&&t.ssr?Qa:ne.Suspense,{fallback:n,children:[q.jsx(JL,{}),q.jsx(XL,{})]});return t.options.InnerWrap?q.jsx(t.options.InnerWrap,{children:i}):i}function XL(){const t=en(),e=Nt(t.stores.firstId,a=>a),n=Nt(t.stores.loadedAt,a=>a),i=e?q.jsx(ux,{matchId:e}):null;return q.jsx(Rh.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?i:q.jsx(_v,{getResetKey:()=>n,errorComponent:bv,onCatch:void 0,children:i})})}var QL=t=>({createMutableStore:M0,createReadonlyStore:M0,batch:tx}),eN=t=>new tN(t),tN=class extends GC{constructor(t){super(t,QL)}};function nN({router:t,children:e,...n}
12){QE(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const i=q.jsx(Qk.Provider,{value:t,children:e});return t.options.Wrap?q.jsx(t.options.Wrap,{children:i}):i}function rN({router:t,...e}){return q.jsx(nN,{router:t,...e,children:q.jsx(ZL,{})})}function dx(t){const{attrs:e,children:n,nonce:i}=t;switch(t.tag){case"title":return q.jsx("title",{...e,suppressHydrationWarning:!0,children:n});case"meta":return q.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return q.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:i,suppressHydrationWarning:!0});case"style":return t.inlineCss,q.jsx("style",{...e,dangerouslySetInnerHTML:{__html:n},nonce:i});case"script":return q.jsx(iN,{attrs:e,children:n});default:return null}}function iN({attrs:t,children:e}){en();const n=wv(),i=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(ne.useEffect(()=>{if(!i){if(t?.src){const a=(()=>{try{const c=document.baseURI||window.location.href;return new URL(t.src,c).href}catch{return t.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===a))return;const o=document.createElement("script");for(const[c,d]of Object.entries(t))c!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&o.setAttribute(c,typeof d=="boolean"?"":String(d));return document.head.appendChild(o),()=>{o.parentNode&&o.parentNode.removeChild(o)}}if(typeof e=="string"){const a=typeof t?.type=="string"?t.type:"text/javascript",o=typeof t?.nonce=="string"?t.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(d=>{if(!(d instanceof HTMLScriptElement))return!1;const h=d.getAttribute("type")??"text/javascript",f=d.getAttribute("nonce")??void 0;return d.textContent===e&&h===a&&f===o}))return;const c=document.createElement("script");if(c.textContent=e,t)for(const[d,h]of Object.entries(t))d!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&c.setAttribute(d,typeof h=="boolean"?"":String(h));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[t,e,i]),i&&typeof e=="string")return q.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}});if(!n){if(t?.src)return q.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return q.jsx("script",{...t,dangerouslySetInnerHTML:{__html:e},suppressHydrationWarning:!0})}return null}var sN=t=>{const e=en(),n=e.options.ssr?.nonce,i=Nt(e.stores.matches,f=>f.map(g=>g.meta).filter(Boolean),En),a=ne.useMemo(()=>{const f=[],g={};let v;for(let y=i.length-1;y>=0;y--){const _=i[y];for(let w=_.length-1;w>=0;w--){const S=_[w];if(S)if(S.title)v||(v={tag:"title",children:S.title});else if("script:ld+json"in S)try{const k=JSON.stringify(S["script:ld+json"]);f.push({tag:"script",attrs:{type:"application/ld+json"},children:aC(k)})}catch{}else{const k=S.name??S.property;if(k){if(g[k])continue;g[k]=!0}f.push({tag:"meta",attrs:{...S,nonce:n}})}}}return v&&f.push(v),n&&f.push({tag:"meta",attrs:{property:"csp-nonce",content:n}}),f.reverse(),f},[i,n]),o=Nt(e.stores.matches,f=>{const g=f.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:n}})),v=e.ssr?.manifest,y=f.map(_=>v?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?rO(v,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:m0(t,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:n}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:n},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...g,...y]},En),c=Nt(e.stores.matches,f=>{const g=[];return f.map(v=>e.looseRoutesById[v.routeId]).forEach(v=>e.ssr?.manifest?.routes[v.id]?.preloads?.filter(Boolean).forEach(y=>{const _=tO(y);g.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:m0(t,"modulepreload")??_.crossOrigin,nonce:n}})})),g},En),d=Nt(e.stores.matches,f=>f.map(g=>g.styles).flat(1).filter(Boolean).map(({children:g,...v})=>({tag:"style",attrs:{...v,nonce:n},children:g})),En),h=Nt(e.stores.matches,f=>f.map(g=>
12g.headScripts).flat(1).filter(Boolean).map(({children:g,...v})=>({tag:"script",attrs:{...v,nonce:n},children:g})),En);return aN([...a,...c,...o,...d,...h],f=>JSON.stringify(f))};function aN(t,e){const n=new Set;return t.filter(i=>{const a=e(i);return n.has(a)?!1:(n.add(a),!0)})}function oN(t){const e=sN(t.assetCrossOrigin),n=en().options.ssr?.nonce;return q.jsx(q.Fragment,{children:e.map(i=>ne.createElement(dx,{...i,key:`tsr-meta-${JSON.stringify(i)}`,nonce:n}))})}var lN=()=>{const t=en(),e=t.options.ssr?.nonce,n=o=>{const c=[],d=t.ssr?.manifest;return d?(o.map(h=>t.looseRoutesById[h.routeId]).forEach(h=>d.routes[h.id]?.assets?.filter(f=>f.tag==="script").forEach(f=>{c.push({tag:"script",attrs:{...f.attrs,nonce:e},children:f.children})})),c):[]},i=o=>o.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:e},children:c})),a=Nt(t.stores.matches,n,En);return cN(t,Nt(t.stores.matches,i,En),a)};function cN(t,e,n){let i;t.serverSsr&&(i=t.serverSsr.takeBufferedScripts());const a=[...e,...n];return i&&a.unshift(i),q.jsx(q.Fragment,{children:a.map((o,c)=>ne.createElement(dx,{...o,key:`tsr-scripts-${o.tag}-${c}`}))})}function $0(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"}function em(t,e){const n=Object.create(null);if(t)for(const i of Object.keys(t))$0(i)&&(n[i]=t[i]);if(e&&typeof e=="object")for(const i of Object.keys(e))$0(i)&&(n[i]=e[i]);return n}function hx(t){return Object.create(null)}var fx=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},ns=(t,e)=>{const n=e||t||{};return typeof n.method>"u"&&(n.method="GET"),Object.assign(o=>ns(void 0,{...n,...o}),{options:n,middleware:o=>{const c=[...n.middleware||[]];o.map(h=>{Jw in h?h.options.middleware&&c.push(...h.options.middleware):c.push(h)});const d=ns(void 0,{...n,middleware:c});return d[Jw]=!0,d},inputValidator:o=>ns(void 0,{...n,inputValidator:o}),handler:(...o)=>{const[c,d]=o,h={...n,extractedFn:c,serverFn:d},f=[...h.middleware||[],hN(h)];return c.method=n.method,Object.assign(async g=>{const v=await z0(f,"client",{...c,...h,data:g?.data,headers:g?.headers,signal:g?.signal,fetch:g?.fetch,context:hx()}),y=ck(v.error);if(y)throw y;if(v.error)throw v.error;return v.result},{...c,method:n.method,__executeServer:async g=>{const v=fx(),y=v.contextAfterGlobalMiddlewares;return await z0(f,"server",{...c,...g,serverFnMeta:c.serverFnMeta,context:em(g.context,y),request:v.request}).then(_=>({result:_.result,error:_.error,context:_.sendContext}))}})}})};async function z0(t,e,n){let i=uN([...hv()?.functionMiddleware||[],...t]);if(e==="server"){const o=fx();o?.executedRequestMiddlewares&&(i=i.filter(c=>!o.executedRequestMiddlewares.has(c)))}const a=async o=>{const c=i.shift();if(!c)return o;try{"inputValidator"in c.options&&c.options.inputValidator&&e==="server"&&(o.data=await dN(c.options.inputValidator,o.data));let d;if(e==="client"?"client"in c.options&&(d=c.options.client):"server"in c.options&&(d=c.options.server),d){const f=await d({...o,next:async(g={})=>{const v=await a({...o,...g,context:em(o.context,g.context),sendContext:em(o.sendContext,g.sendContext),headers:iL(o.headers,g.headers),_callSiteFetch:o._callSiteFetch,fetch:o._callSiteFetch??g.fetch??o.fetch,result:g.result!==void 0?g.result:g instanceof Response?g:o.result,error:g.error??o.error});if(v.error)throw v.error;return v}});if(dn(f))return{...o,error:f};if(f instanceof Response)return{...o,result:f};if(!f)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return f}return a(o)}catch(d){return{...o,error:d}}};return a({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||hx(),_callSiteFetch:n.fetch})}function uN(t,e=100){const n=new Set,i=[],a=(o,c)=>{if(c>e)throw new Error(`Middleware nesting depth exceeded maximum of ${e}. Check for circular references.`);o.forEach(d=>{d.options.middleware&&a(d.options.middleware,c+1),n.has(d)||(n.add(d),i.push(d))})};return a(t,0),i}async function dN(t,e){if(t==null)return{};if("~standard"in t){const n=await t["~standard"].validate(e);if(n.issues)throw new Error(JSON.stringify(n.issues,void 0,2));return n.value}if("parse"in t)return t.parse(e);if(typeof t=="function")return t(e);throw new Error("Invalid validator type!")}function hN(t){return{"~types":void 0,options:{inputValidator:t.inputValidator,client:async({next:e,sendContext:n,fetch:i,...a})=>{const o={...a,context:n,fetch:i};return e(await t.extractedFn?.(o))},server:async({next:e,...n})=>{const i=await t.serverFn?.(n);return e({...n,result:i})}}}}var Hl=(t,e)=>{const n={type:"request",...e||t};return{options:n,middleware:i=>Hl({},Object.assign(n,{middleware:i})),inputValidator:i=>Hl({},Object.assign(n,{inputValidator:i})),client:i=>Hl({},Object.assign(n,{client:i})),server:i=>Hl({},Object.assign(n,{server:i}))}};function px(t,e){for(let n=0,i=e.length;n<i;n++){const a=e[n];t.has(a)||(t.add(a),a.extends&&px(t,a.extends))}}var fN=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const n=new Set;px(n,e.serializationAdapters),e.serializationAdapters=Array.from(n)}return e},createMiddleware:Hl});const U0=fN(()=>({requestMiddleware:[]})),pN="modulepreload",gN=function(t){return"/"+t},B0={}
12,fe=function(e,n,i){let a=Promise.resolve();if(n&&n.length>0){let h=function(f){return Promise.all(f.map(g=>Promise.resolve(g).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");a=h(n.map(f=>{if(f=gN(f),f in B0)return;B0[f]=!0;const g=f.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${v}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":pN,g||(y.as="script"),y.crossOrigin="",y.href=f,d&&y.setAttribute("nonce",d),document.head.appendChild(y),g)return new Promise((_,w)=>{y.addEventListener("load",_),y.addEventListener("error",()=>w(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)})};var Xe;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function n(a){throw new Error}t.assertNever=n,t.arrayToEnum=a=>{const o={};for(const c of a)o[c]=c;return o},t.getValidEnumValues=a=>{const o=t.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),c={};for(const d of o)c[d]=a[d];return t.objectValues(c)},t.objectValues=a=>t.objectKeys(a).map(function(o){return a[o]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const o=[];for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&o.push(c);return o},t.find=(a,o)=>{for(const c of a)if(o(c))return c},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function i(a,o=" | "){return a.map(c=>typeof c=="string"?`'${c}'`:c).join(o)}t.joinValues=i,t.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(Xe||(Xe={}));var q0;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(q0||(q0={}));const ve=Xe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gi=t=>{switch(typeof t){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(t)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(t)?ve.array:t===null?ve.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ve.promise:typeof Map<"u"&&t instanceof Map?ve.map:typeof Set<"u"&&t instanceof Set?ve.set:typeof Date<"u"&&t instanceof Date?ve.date:ve.object;default:return ve.unknown}}
vendor: 39,218 bytes, line 12
12,ie=Xe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class di extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(o){return o.message},i={_errors:[]},a=o=>{for(const c of o.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)i._errors.push(n(c));else{let d=i,h=0;for(;h<c.path.length;){const f=c.path[h];h===c.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(n(c))):d[f]=d[f]||{_errors:[]},d=d[f],h++}}};return a(this),i}static assert(e){if(!(e instanceof di))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Xe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const a of this.issues)if(a.path.length>0){const o=a.path[0];n[o]=n[o]||[],n[o].push(e(a))}else i.push(e(a));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}di.create=t=>new di(t);const tm=(t,e)=>{let n;switch(t.code){case ie.invalid_type:t.received===ve.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Xe.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${Xe.joinValues(t.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Xe.joinValues(t.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${Xe.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Xe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ie.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ie.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=e.defaultError,Xe.assertNever(t)}return{message:n}};let mN=tm;function vN(){return mN}const yN=t=>{const{data:e,path:n,errorMaps:i,issueData:a}=t,o=[...n,...a.path||[]],c={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let d="";const h=i.filter(f=>!!f).slice().reverse();for(const f of h)d=f(c,{data:e,defaultError:d}).message;return{...a,path:o,message:d}};function he(t,e){const n=vN(),i=yN({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===tm?void 0:tm].filter(a=>!!a)});t.common.issues.push(i)}class Un{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const a of n){if(a.status==="aborted")return Oe;a.status==="dirty"&&e.dirty(),i.push(a.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const a of n){const o=await a.key,c=await a.value;i.push({key:o,value:c})}return Un.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const a of n){const{key:o,value:c}=a;if(o.status==="aborted"||c.status==="aborted")return Oe;o.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(i[o.value]=c.value)}return{status:e.value,value:i}}}const Oe=Object.freeze({status:"aborted"}),Vl=t=>({status:"dirty",value:t}),ir=t=>({status:"valid",value:t}),F0=t=>t.status==="aborted",H0=t=>t.status==="dirty",Eo=t=>t.status==="valid",Fd=t=>typeof Promise<"u"&&t instanceof Promise;var be;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(be||(be={}));class is{constructor(e,n,i,a){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const V0=(t,e)=>{if(Eo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new di(t.common.issues);return this._error=n,this._error}}};function $e(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:a}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(c,d)=>{const{message:h}=t;return c.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??i??d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:h??n??d.defaultError}},description:a}}class We{get description(){return this._def.description}_getType(e){return Gi(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Gi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Un,ctx:{common:e.parent.common,data:e.data,parsedType:Gi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Fd(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){const i={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gi(e)},a=this._parseSync({data:e,path:i.path,parent:i});return V0(i,a)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gi(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return Eo(i)?{value:i.value}:{issues:n.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>Eo(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gi(e)},a=this._parse({data:e,path:i.path,parent:i}),o=await(Fd(a)?a:Promise.resolve(a));return V0(i,o)}refine(e,n){const i=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,o)=>{const c=e(a),d=()=>o.addIssue({code:ie.custom,...i(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(h=>h?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((i,a)=>e(i)?!0:(a.addIssue(typeof n=="function"?n(i,a):n),!1))}_refinement(e){return new xo({schema:this,typeName:Pe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return rs.create(this,this._def)}nullable(){return To.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pr.create(this)}promise(){return Yd.create(this,this._def)}or(e){return Vd.create([this,e],this._def)}and(e){return Gd.create(this,e,this._def)}transform(e){return new xo({...$e(this._def),schema:this,typeName:Pe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new rm({...$e(this._def),innerType:this,defaultValue:n,typeName:Pe.ZodDefault})}brand(){return new BN({typeName:Pe.ZodBranded,type:this,...$e(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new im({...$e(this._def),innerType:this,catchValue:n,typeName:Pe.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Ev.create(this,e)}readonly(){return sm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _N=/^c[^\s-]{8,}$/i,bN=/^[0-9a-z]+$/,wN=/^[0-9A-HJKMNP-TV-Z]{26}$/i,SN=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,EN=/^[a-z0-9_-]{21}$/i,kN=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,xN=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,TN=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,RN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let gg;const AN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ON=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,PN=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,MN=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,LN=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",NN=new RegExp(`^${gx}$`);function mx(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function DN(t){return new RegExp(`^${mx(t)}$`)}function jN(t){let e=`${gx}T${mx(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function IN(t,e){return!!((e==="v4"||!e)&&AN.test(t)||(e==="v6"||!e)&&ON.test(t))}function $N(t,e){if(!kN.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(i));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function zN(t,e){return!!((e==="v4"||!e)&&CN.test(t)||(e==="v6"||!e)&&PN.test(t))}class es extends We{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ve.string){const o=this._getOrReturnCtx(e);return he(o,{code:ie.invalid_type,expected:ve.string,received:o.parsedType}),Oe}const i=new Un;let a;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(a=this._getOrReturnCtx(e,a),he(a,{code:ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")e.data.length>o.value&&(a=this._getOrReturnCtx(e,a),he(a,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){const c=e.data.length>o.value,d=e.data.length<o.value;(c||d)&&(a=this._getOrReturnCtx(e,a),c?he(a,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):d&&he(a,{code:ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")TN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"email",code:ie.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")gg||(gg=new RegExp(RN,"u")),gg.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"emoji",code:ie.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")SN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"uuid",code:ie.invalid_string,message:o.message}),i.dirty());else if(o.kind==="nanoid")EN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"nanoid",code:ie.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")_N.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"cuid",code:ie.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")bN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"cuid2",code:ie.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")wN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"ulid",code:ie.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),he(a,{validation:"url",code:ie.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"regex",code:ie.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(e,a),he(a,{code:ie.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(a=this._getOrReturnCtx(e,a),he(a,{code:ie.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(a=this._getOrReturnCtx(e,a),he(a,{code:ie.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?jN(o).test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{code:ie.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="date"?NN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{code:ie.invalid_string,validation:"date",message:o.message}),i.dirty()):o.kind==="time"?DN(o).test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{code:ie.invalid_string,validation:"time",message:o.message}),i.dirty()):o.kind==="duration"?xN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"duration",code:ie.invalid_string,message:o.message}),i.dirty()):o.kind==="ip"?IN(e.data,o.version)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"ip",code:ie.invalid_string,message:o.message}),i.dirty()):o.kind==="jwt"?$N(e.data,o.alg)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"jwt",code:ie.invalid_string,message:o.message}),i.dirty()):o.kind==="cidr"?zN(e.data,o.version)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"cidr",code:ie.invalid_string,message:o.message}),i.dirty()):o.kind==="base64"?MN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"base64",code:ie.invalid_string,message:o.message}),i.dirty()):o.kind==="base64url"?LN.test(e.data)||(a=this._getOrReturnCtx(e,a),he(a,{validation:"base64url",code:ie.invalid_string,message:o.message}),i.dirty()):Xe.assertNever(o);return{status:i.value,value:e.data}}_regex(e,n,i){return this.refinement(a=>e.test(a),{validation:n,code:ie.invalid_string,...be.errToObj(i)})}_addCheck(e){return new es({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...be.errToObj(e)})}url(e){return this._addCheck({kind:"url",...be.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...be.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...be.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...be.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...be.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...be.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...be.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...be.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...be.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...be.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...be.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...be.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...be.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...be.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...be.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...be.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...be.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...be.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...be.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...be.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...be.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...be.errToObj(n)})}nonempty(e){return this.min(1,be.errToObj(e))}trim(){return new es({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new es({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new es({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}es.create=t=>new es({checks:[],typeName:Pe.ZodString,coerce:t?.coerce??!1,...$e(t)});function UN(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,a=n>i?n:i,o=Number.parseInt(t.toFixed(a).replace(".","")),c=Number.parseInt(e.toFixed(a).replace(".",""));return o%c/10**a}class vc extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ve.number){const o=this._getOrReturnCtx(e);return he(o,{code:ie.invalid_type,expected:ve.number,received:o.parsedType}),Oe}let i;const a=new Un;for(const o of this._def.checks)o.kind==="int"?Xe.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),he(i,{code:ie.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),he(i,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?UN(e.data,o.value)!==0&&(i=this._getOrReturnCtx(e,i),he(i,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{code:ie.not_finite,message:o.message}),a.dirty()):Xe.assertNever(o);return{status:a.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,be.toString(n))}gt(e,n){return this.setLimit("min",e,!1,be.toString(n))}lte(e,n){return this.setLimit("max",e,!0,be.toString(n))}lt(e,n){return this.setLimit("max",e,!1,be.toString(n))}setLimit(e,n,i,a){return new vc({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:be.toString(a)}]})}_addCheck(e){return new vc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:be.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:be.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:be.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:be.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:be.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:be.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:be.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:be.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:be.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Xe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}}vc.create=t=>new vc({checks:[],typeName:Pe.ZodNumber,coerce:t?.coerce||!1,...$e(t)});class yc extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ve.bigint)return this._getInvalidInput(e);let i;const a=new Un;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),he(i,{code:ie.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),he(i,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),he(i,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):Xe.assertNever(o);return{status:a.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return he(n,{code:ie.invalid_type,expected:ve.bigint,received:n.parsedType}),Oe}gte(e,n){return this.setLimit("min",e,!0,be.toString(n))}gt(e,n){return this.setLimit("min",e,!1,be.toString(n))}lte(e,n){return this.setLimit("max",e,!0,be.toString(n))}lt(e,n){return this.setLimit("max",e,!1,be.toString(n))}setLimit(e,n,i,a){return new yc({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:be.toString(a)}]})}_addCheck(e){return new yc({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:be.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:be.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:be.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:be.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:be.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}yc.create=t=>new yc({checks:[],typeName:Pe.ZodBigInt,coerce:t?.coerce??!1,...$e(t)});class G0 extends We{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ve.boolean){const i=this._getOrReturnCtx(e);return he(i,{code:ie.invalid_type,expected:ve.boolean,received:i.parsedType}),Oe}return ir(e.data)}}G0.create=t=>new G0({typeName:Pe.ZodBoolean,coerce:t?.coerce||!1,...$e(t)});class Hd extends We{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ve.date){const o=this._getOrReturnCtx(e);return he(o,{code:ie.invalid_type,expected:ve.date,received:o.parsedType}),Oe}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return he(o,{code:ie.invalid_date}),Oe}const i=new Un;let a;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(a=this._getOrReturnCtx(e,a),he(a,{code:ie.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(a=this._getOrReturnCtx(e,a),he(a,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):Xe.assertNever(o);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Hd({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:be.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:be.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Hd.create=t=>new Hd({checks:[],coerce:t?.coerce||!1,typeName:Pe.ZodDate,...$e(t)});class Y0 extends We{_parse(e){if(this._getType(e)!==ve.symbol){const i=this._getOrReturnCtx(e);return he(i,{code:ie.invalid_type,expected:ve.symbol,received:i.parsedType}),Oe}return ir(e.data)}}Y0.create=t=>new Y0({typeName:Pe.ZodSymbol,...$e(t)});class K0 extends We{_parse(e){if(this._getType(e)!==ve.undefined){const i=this._getOrReturnCtx(e);return he(i,{code:ie.invalid_type,expected:ve.undefined,received:i.parsedType}),Oe}return ir(e.data)}}K0.create=t=>new K0({typeName:Pe.ZodUndefined,...$e(t)});class W0 extends We{_parse(e){if(this._getType(e)!==ve.null){const i=this._getOrReturnCtx(e);return he(i,{code:ie.invalid_type,expected:ve.null,received:i.parsedType}),Oe}return ir(e.data)}}W0.create=t=>new W0({typeName:Pe.ZodNull,...$e(t)});class J0 extends We{constructor(){super(...arguments),this._any=!0}_parse(e){return ir(e.data)}}J0.create=t=>new J0({typeName:Pe.ZodAny,...$e(t)});class Z0 extends We{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ir(e.data)}}Z0.create=t=>new Z0({typeName:Pe.ZodUnknown,...$e(t)});class ss extends We{_parse(e){const n=this._getOrReturnCtx(e);return he(n,{code:ie.invalid_type,expected:ve.never,received:n.parsedType}),Oe}}ss.create=t=>new ss({typeName:Pe.ZodNever,...$e(t)});class X0 extends We{_parse(e){if(this._getType(e)!==ve.undefined){const i=this._getOrReturnCtx(e);return he(i,{code:ie.invalid_type,expected:ve.void,received:i.parsedType}),Oe}return ir(e.data)}}X0.create=t=>new X0({typeName:Pe.ZodVoid,...$e(t)});class Pr extends We{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),a=this._def;if(n.parsedType!==ve.array)return he(n,{code:ie.invalid_type,expected:ve.array,received:n.parsedType}),Oe;if(a.exactLength!==null){const c=n.data.length>a.exactLength.value,d=n.data.length<a.exactLength.value;(c||d)&&(he(n,{code:c?ie.too_big:ie.too_small,minimum:d?a.exactLength.value:void 0,maximum:c?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),i.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(he(n,{code:ie.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),i.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(he(n,{code:ie.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>a.type._parseAsync(new is(n,c,n.path,d)))).then(c=>Un.mergeArray(i,c));const o=[...n.data].map((c,d)=>a.type._parseSync(new is(n,c,n.path,d)));return Un.mergeArray(i,o)}get element(){return this._def.type}min(e,n){return new Pr({...this._def,minLength:{value:e,message:be.toString(n)}})}max(e,n){return new Pr({...this._def,maxLength:{value:e,message:be.toString(n)}})}length(e,n){return new Pr({...this._def,exactLength:{value:e,message:be.toString(n)}})}nonempty(e){return this.min(1,e)}}Pr.create=(t,e)=>new Pr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Pe.ZodArray,...$e(e)});function eo(t){if(t instanceof Mt){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=rs.create(eo(i))}return new Mt({...t._def,shape:()=>e})}else return t instanceof Pr?new Pr({...t._def,type:eo(t.element)}):t instanceof rs?rs.create(eo(t.unwrap())):t instanceof To?To.create(eo(t.unwrap())):t instanceof Js?Js.create(t.items.map(e=>eo(e))):t}class Mt extends We{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Xe.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==ve.object){const f=this._getOrReturnCtx(e);return he(f,{code:ie.invalid_type,expected:ve.object,received:f.parsedType}),Oe}const{status:i,ctx:a}=this._processInputParams(e),{shape:o,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof ss&&this._def.unknownKeys==="strip"))for(const f in a.data)c.includes(f)||d.push(f);const h=[];for(const f of c){const g=o[f],v=a.data[f];h.push({key:{status:"valid",value:f},value:g._parse(new is(a,v,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof ss){const f=this._def.unknownKeys;if(f==="passthrough")for(const g of d)h.push({key:{status:"valid",value:g},value:{status:"valid",value:a.data[g]}});else if(f==="strict")d.length>0&&(he(a,{code:ie.unrecognized_keys,keys:d}),i.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const g of d){const v=a.data[g];h.push({key:{status:"valid",value:g},value:f._parse(new is(a,v,a.path,g)),alwaysSet:g in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const g of h){const v=await g.key,y=await g.value;f.push({key:v,value:y,alwaysSet:g.alwaysSet})}return f}).then(f=>Un.mergeObjectSync(i,f)):Un.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(e){return be.errToObj,new Mt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{const a=this._def.errorMap?.(n,i).message??i.defaultError;return n.code==="unrecognized_keys"?{message:be.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new Mt({...this._def,unknownKeys:"strip"})}passthrough(){return new Mt({...this._def,unknownKeys:"passthrough"})}extend(e){return new Mt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Mt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Pe.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Mt({...this._def,catchall:e})}pick(e){const n={};for(const i of Xe.objectKeys(e))e[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new Mt({...this._def,shape:()=>n})}omit(e){const n={};for(const i of Xe.objectKeys(this.shape))e[i]||(n[i]=this.shape[i]);return new Mt({...this._def,shape:()=>n})}deepPartial(){return eo(this)}partial(e){const n={};for(const i of Xe.objectKeys(this.shape)){const a=this.shape[i];e&&!e[i]?n[i]=a:n[i]=a.optional()}return new Mt({...this._def,shape:()=>n})}required(e){const n={};for(const i of Xe.objectKeys(this.shape))if(e&&!e[i])n[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof rs;)o=o._def.innerType;n[i]=o}return new Mt({...this._def,shape:()=>n})}keyof(){return vx(Xe.objectKeys(this.shape))}}Mt.create=(t,e)=>new Mt({shape:()=>t,unknownKeys:"strip",catchall:ss.create(),typeName:Pe.ZodObject,...$e(e)});Mt.strictCreate=(t,e)=>new Mt({shape:()=>t,unknownKeys:"strict",catchall:ss.create(),typeName:Pe.ZodObject,...$e(e)});Mt.lazycreate=(t,e)=>new Mt({shape:t,unknownKeys:"strip",catchall:ss.create(),typeName:Pe.ZodObject,...$e(e)});class Vd extends We{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function a(o){for(const d of o)if(d.result.status==="valid")return d.result;for(const d of o)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=o.map(d=>new di(d.ctx.common.issues));return he(n,{code:ie.invalid_union,unionErrors:c}),Oe}if(n.common.async)return Promise.all(i.map(async o=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(a);{let o;const c=[];for(const h of i){const f={...n,common:{...n.common,issues:[]},parent:null},g=h._parseSync({data:n.data,path:n.path,parent:f});if(g.status==="valid")return g;g.status==="dirty"&&!o&&(o={result:g,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const d=c.map(h=>new di(h));return he(n,{code:ie.invalid_union,unionErrors:d}),Oe}}get options(){return this._def.options}}Vd.create=(t,e)=>new Vd({options:t,typeName:Pe.ZodUnion,...$e(e)});function nm(t,e){const n=Gi(t),i=Gi(e);if(t===e)return{valid:!0,data:t};if(n===ve.object&&i===ve.object){const a=Xe.objectKeys(e),o=Xe.objectKeys(t).filter(d=>a.indexOf(d)!==-1),c={...t,...e};for(const d of o){const h=nm(t[d],e[d]);if(!h.valid)return{valid:!1};c[d]=h.data}return{valid:!0,data:c}}else if(n===ve.array&&i===ve.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let o=0;o<t.length;
vendor: 4,447 bytes, line 12
12o++){const c=t[o],d=e[o],h=nm(c,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return n===ve.date&&i===ve.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Gd extends We{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),a=(o,c)=>{if(F0(o)||F0(c))return Oe;const d=nm(o.value,c.value);return d.valid?((H0(o)||H0(c))&&n.dirty(),{status:n.value,value:d.data}):(he(i,{code:ie.invalid_intersection_types}),Oe)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,c])=>a(o,c)):a(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Gd.create=(t,e,n)=>new Gd({left:t,right:e,typeName:Pe.ZodIntersection,...$e(n)});class Js extends We{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ve.array)return he(i,{code:ie.invalid_type,expected:ve.array,received:i.parsedType}),Oe;if(i.data.length<this._def.items.length)return he(i,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Oe;!this._def.rest&&i.data.length>this._def.items.length&&(he(i,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...i.data].map((c,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new is(i,c,i.path,d)):null}).filter(c=>!!c);return i.common.async?Promise.all(o).then(c=>Un.mergeArray(n,c)):Un.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Js({...this._def,rest:e})}}Js.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Js({items:t,typeName:Pe.ZodTuple,rest:null,...$e(e)})};class Q0 extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ve.map)return he(i,{code:ie.invalid_type,expected:ve.map,received:i.parsedType}),Oe;const a=this._def.keyType,o=this._def.valueType,c=[...i.data.entries()].map(([d,h],f)=>({key:a._parse(new is(i,d,i.path,[f,"key"])),value:o._parse(new is(i,h,i.path,[f,"value"]))}));if(i.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of c){const f=await h.key,g=await h.value;if(f.status==="aborted"||g.status==="aborted")return Oe;(f.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(f.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const h of c){const f=h.key,g=h.value;if(f.status==="aborted"||g.status==="aborted")return Oe;(f.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(f.value,g.value)}return{status:n.value,value:d}}}}Q0.create=(t,e,n)=>new Q0({valueType:e,keyType:t,typeName:Pe.ZodMap,...$e(n)});class _c extends We{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ve.set)return he(i,{code:ie.invalid_type,expected:ve.set,received:i.parsedType}),Oe;const a=this._def;a.minSize!==null&&i.data.size<a.minSize.value&&(he(i,{code:ie.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&i.data.size>a.maxSize.value&&(he(i,{code:ie.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const o=this._def.valueType;function c(h){const f=new Set;for(const g of h){if(g.status==="aborted")return Oe;g.status==="dirty"&&n.dirty(),f.add(g.value)}return{status:n.value,value:f}}const d=[...i.data.values()].map((h,f)=>o._parse(new is(i,h,i.path,f)));return i.common.async?Promise.all(d).then(h=>c(h)):c(d)}min(e,n){return new _c({...this._def,minSize:{value:e,message:be.toString(n)}})}max(e,n){return new _c({...this._def,maxSize:{value:e,message:be.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}_c.create=(t,e)=>new _c({valueType:t,minSize:null,maxSize:null,typeName:Pe.ZodSet,...$e(e)});class eS extends We{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}eS.create=(t,e)=>new eS({getter:t,typeName:Pe.ZodLazy,...$e(e)});class tS extends We{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return he(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Oe}
vendor: 5,385 bytes, line 12
12return{status:"valid",value:e.data}}get value(){return this._def.value}}tS.create=(t,e)=>new tS({value:t,typeName:Pe.ZodLiteral,...$e(e)});function vx(t,e){return new ko({values:t,typeName:Pe.ZodEnum,...$e(e)})}class ko extends We{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return he(n,{expected:Xe.joinValues(i),received:n.parsedType,code:ie.invalid_type}),Oe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return he(n,{received:n.data,code:ie.invalid_enum_value,options:i}),Oe}return ir(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ko.create(e,{...this._def,...n})}exclude(e,n=this._def){return ko.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}}ko.create=vx;class nS extends We{_parse(e){const n=Xe.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==ve.string&&i.parsedType!==ve.number){const a=Xe.objectValues(n);return he(i,{expected:Xe.joinValues(a),received:i.parsedType,code:ie.invalid_type}),Oe}if(this._cache||(this._cache=new Set(Xe.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=Xe.objectValues(n);return he(i,{received:i.data,code:ie.invalid_enum_value,options:a}),Oe}return ir(e.data)}get enum(){return this._def.values}}nS.create=(t,e)=>new nS({values:t,typeName:Pe.ZodNativeEnum,...$e(e)});class Yd extends We{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.promise&&n.common.async===!1)return he(n,{code:ie.invalid_type,expected:ve.promise,received:n.parsedType}),Oe;const i=n.parsedType===ve.promise?n.data:Promise.resolve(n.data);return ir(i.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Yd.create=(t,e)=>new Yd({type:t,typeName:Pe.ZodPromise,...$e(e)});class xo extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),a=this._def.effect||null,o={addIssue:c=>{he(i,c),c.fatal?n.abort():n.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){const c=a.transform(i.data,o);if(i.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return Oe;const h=await this._def.schema._parseAsync({data:d,path:i.path,parent:i});return h.status==="aborted"?Oe:h.status==="dirty"||n.value==="dirty"?Vl(h.value):h});{if(n.value==="aborted")return Oe;const d=this._def.schema._parseSync({data:c,path:i.path,parent:i});return d.status==="aborted"?Oe:d.status==="dirty"||n.value==="dirty"?Vl(d.value):d}}if(a.type==="refinement"){const c=d=>{const h=a.refinement(d,o);if(i.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(i.common.async===!1){const d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return d.status==="aborted"?Oe:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(d=>d.status==="aborted"?Oe:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(a.type==="transform")if(i.common.async===!1){const c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Eo(c))return Oe;const d=a.transform(c.value,o);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(c=>Eo(c)?Promise.resolve(a.transform(c.value,o)).then(d=>({status:n.value,value:d})):Oe);Xe.assertNever(a)}}xo.create=(t,e,n)=>new xo({schema:t,typeName:Pe.ZodEffects,effect:e,...$e(n)});xo.createWithPreprocess=(t,e,n)=>new xo({schema:e,effect:{type:"preprocess",transform:t},typeName:Pe.ZodEffects,...$e(n)});class rs extends We{_parse(e){return this._getType(e)===ve.undefined?ir(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rs.create=(t,e)=>new rs({innerType:t,typeName:Pe.ZodOptional,...$e(e)});class To extends We{_parse(e){return this._getType(e)===ve.null?ir(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}To.create=(t,e)=>new To({innerType:t,typeName:Pe.ZodNullable,...$e(e)});class rm extends We{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===ve.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}rm.create=(t,e)=>new rm({innerType:t,typeName:Pe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...$e(e)});class im extends We{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Fd(a)?a.then(o=>
12({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new di(i.common.issues)},input:i.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new di(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}im.create=(t,e)=>new im({innerType:t,typeName:Pe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...$e(e)});class rS extends We{_parse(e){if(this._getType(e)!==ve.nan){const i=this._getOrReturnCtx(e);return he(i,{code:ie.invalid_type,expected:ve.nan,received:i.parsedType}),Oe}return{status:"valid",value:e.data}}}rS.create=t=>new rS({typeName:Pe.ZodNaN,...$e(t)});class BN extends We{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ev extends We{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?Oe:o.status==="dirty"?(n.dirty(),Vl(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{const a=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Oe:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:i.path,parent:i})}}static create(e,n){return new Ev({in:e,out:n,typeName:Pe.ZodPipeline})}}class sm extends We{_parse(e){const n=this._def.innerType._parse(e),i=a=>(Eo(a)&&(a.value=Object.freeze(a.value)),a);return Fd(n)?n.then(a=>i(a)):i(n)}unwrap(){return this._def.innerType}}sm.create=(t,e)=>new sm({innerType:t,typeName:Pe.ZodReadonly,...$e(e)});var Pe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Pe||(Pe={}));const yx=es.create;ss.create;Pr.create;const _x=Mt.create;Vd.create;Gd.create;Js.create;ko.create;Yd.create;rs.create;To.create;var V=typeof window<"u"?window:void 0,jt=typeof globalThis<"u"?globalThis:V;typeof self>"u"&&(jt.self=jt),typeof File>"u"&&(jt.File=function(){});var $n=jt?.navigator,oe=jt?.document,Xt=jt?.location,am=jt?.fetch,om=jt!=null&&jt.XMLHttpRequest&&"withCredentials"in new jt.XMLHttpRequest?jt.XMLHttpRequest:void 0,iS=jt?.AbortController,qN=jt?.CompressionStream,Sn=$n?.userAgent,we=V??{},sS="1.373.5",cn={DEBUG:!1,LIB_VERSION:sS,LIB_NAME:"web",JS_SDK_VERSION:sS};function aS(t,e,n,i,a,o,c){try{var d=t[o](c),h=d.value}catch(f){return void n(f)}d.done?e(h):Promise.resolve(h).then(i,a)}function jn(t){return function(){var e=this,n=arguments;return new Promise((function(i,a){var o=t.apply(e,n);function c(h){aS(o,i,a,c,d,"next",h)}function d(h){aS(o,i,a,c,d,"throw",h)}c(void 0)}))}}function re(){return re=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},re.apply(null,arguments)}function bx(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}var Nl,oS=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),FN=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],wx="NativeGzipValidationError",lm=t=>t.length>=2&&t[0]===31&&t[1]===139,lS=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",ad=t=>
12{var e=new Error("Native gzip produced invalid output: "+t);throw e.name=wx,e},HN=(function(){var t=jn((function*(e,n){18>e.size&&ad("too-short");var i=new Uint8Array(yield e.slice(0,10).arrayBuffer());lm(i)&&i[2]===8||ad("invalid-header");var a=new DataView(yield e.slice(e.size-8).arrayBuffer());a.getUint32(0,!0)!==(c=>{for(var d=(()=>{if(Nl)return Nl;Nl=[];for(var g=0;256>g;g++){for(var v=g,y=0;8>y;y++)v=1&v?3988292384^v>>>1:v>>>1;Nl[g]=v>>>0}return Nl})(),h=4294967295,f=0;c.length>f;f++)h=d[255&(h^c[f])]^h>>>8;return(4294967295^h)>>>0})(n)&&ad("invalid-crc");var o=n.length>>>0;a.getUint32(4,!0)!==o&&ad("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function cm(){return cm=jn((function*(t,e,n){e===void 0&&(e=!0);try{var i=new TextEncoder().encode(t),a=new CompressionStream("gzip"),o=a.writable.getWriter(),c=o.write(i).then((()=>o.close())).catch((function(){var f=jn((function*(g){try{yield o.abort(g)}catch{}throw g}));return function(g){return f.apply(this,arguments)}})()),d=new Response(a.readable).blob(),[h]=yield Promise.all([d,c]);return yield HN(h,i),h}catch(f){if(n!=null&&n.rethrow)throw f;return e&&console.error("Failed to gzip compress data",f),null}})),cm.apply(this,arguments)}var VN=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],cS=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return VN.concat(e).some((i=>{var a=i.toLowerCase();return n.indexOf(a)!==-1}))};function Be(t,e){return t.indexOf(e)!==-1}var Ah=function(t){return t.trim()},um=function(t){return t.replace(/^\$/,"")},Sx=Object.prototype,Ex=Sx.hasOwnProperty,Ch=Sx.toString,Ke=Array.isArray||function(t){return Ch.call(t)==="[object Array]"},ii=t=>typeof t=="function",Tt=t=>t===Object(t)&&!Ke(t),ho=t=>{if(Tt(t)){for(var e in t)if(Ex.call(t,e))return!1;return!0}return!1},ce=t=>t===void 0,_t=t=>Ch.call(t)=="[object String]",Cd=t=>_t(t)&&t.trim().length===0,pi=t=>t===null,qe=t=>ce(t)||pi(t),rr=t=>Ch.call(t)=="[object Number]"&&t==t,to=t=>rr(t)&&t>0,Cr=t=>Ch.call(t)==="[object Boolean]",GN=t=>t instanceof FormData,YN=t=>Be(FN,t);function kx(t){return t===null||typeof t!="object"}function Kd(t,e){return{}.toString.call(t)==="[object "+e+"]"}function kv(t){return typeof Event<"u"&&(function(e,n){try{return e instanceof n}catch{return!1}})(t,Event)}var KN=[!0,"true",1,"1","yes"],mg=t=>Be(KN,t),WN=[!1,"false",0,"0","no"];function Or(t,e,n,i,a){return e>n&&(i.warn("min cannot be greater than max."),e=n),rr(t)?t>n?(i.warn(" cannot be  greater than max: "+n+". Using max value instead."),n):e>t?(i.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(i.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+a),Or(a||n,e,n,i))}class JN{constructor(e){this.$t={},this.zt=e.zt,this.Zt=Or(e.bucketSize,0,100,e.Gt),this.Qt=Or(e.refillRate,0,this.Zt,e.Gt),this.Jt=Or(e.refillInterval,0,864e5,e.Gt)}Kt(e,n){var i=Math.floor((n-e.lastAccess)/this.Jt);i>0&&(e.tokens=Math.min(e.tokens+i*this.Qt,this.Zt),e.lastAccess=e.lastAccess+i*this.Jt)}consumeRateLimit(e){var n,i=Date.now(),a=String(e),o=this.$t[a];return o?this.Kt(o,i):this.$t[a]=o={tokens:this.Zt,lastAccess:i},o.tokens===0||(o.tokens--,o.tokens===0&&((n=this.zt)==null||n.call(this,e)),o.tokens===0)}
12stop(){this.$t={}}}var od,uS,vg,zn="Mobile",Wd="iOS",li="Android",Ro="Tablet",xx=li+" "+Ro,Tx="iPad",Rx="Apple",Ax=Rx+" Watch",rc="Safari",Ao="BlackBerry",Cx="Samsung",Ox=Cx+"Browser",Px=Cx+" Internet",Ys="Chrome",ZN=Ys+" OS",Mx=Ys+" "+Wd,xv="Internet Explorer",Lx=xv+" "+zn,Tv="Opera",XN=Tv+" Mini",Rv="Edge",Nx="Microsoft "+Rv,_o="Firefox",Dx=_o+" "+Wd,bc="Nintendo",wc="PlayStation",bo="Xbox",jx=li+" "+zn,Ix=zn+" "+rc,Gl="Windows",dm=Gl+" Phone",dS="Nokia",hm="Ouya",$x="Generic",QN=$x+" "+zn.toLowerCase(),zx=$x+" "+Ro.toLowerCase(),fm="Konqueror",ln="(\\d+(\\.\\d+)?)",yg=new RegExp("Version/"+ln),eD=new RegExp(bo,"i"),tD=new RegExp(wc+" \\w+","i"),nD=new RegExp(bc+" \\w+","i"),Av=new RegExp(Ao+"|PlayBook|BB10","i"),rD={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},Ux=function(t,e){return e=e||"",Be(t," OPR/")&&Be(t,"Mini")?XN:Be(t," OPR/")?Tv:Av.test(t)?Ao:Be(t,"IE"+zn)||Be(t,"WPDesktop")?Lx:Be(t,Ox)?Px:Be(t,Rv)||Be(t,"Edg/")?Nx:Be(t,"FBIOS")?"Facebook "+zn:Be(t,"UCWEB")||Be(t,"UCBrowser")?"UC Browser":Be(t,"CriOS")?Mx:Be(t,"CrMo")||Be(t,Ys)?Ys:Be(t,li)&&Be(t,rc)?jx:Be(t,"FxiOS")?Dx:Be(t.toLowerCase(),fm.toLowerCase())?fm:((n,i)=>i&&Be(i,Rx)||(function(a){return Be(a,rc)&&!Be(a,Ys)&&!Be(a,li)})(n))(t,e)?Be(t,zn)?Ix:rc:Be(t,_o)?_o:Be(t,"MSIE")||Be(t,"Trident/")?xv:Be(t,"Gecko")?_o:""},iD={[Lx]:[new RegExp("rv:"+ln)],[Nx]:[new RegExp(Rv+"?\\/"+ln)],[Ys]:[new RegExp("("+Ys+"|CrMo)\\/"+ln)],[Mx]:[new RegExp("CriOS\\/"+ln)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+ln)],[rc]:[yg],[Ix]:[yg],[Tv]:[new RegExp("(Opera|OPR)\\/"+ln)],[_o]:[new RegExp(_o+"\\/"+ln)],[Dx]:[new RegExp("FxiOS\\/"+ln)],[fm]:[new RegExp("Konqueror[:/]?"+ln,"i")],[Ao]:[new RegExp(Ao+" "+ln),yg],[jx]:[new RegExp("android\\s"+ln,"i")],[Px]:[new RegExp(Ox+"\\/"+ln)],[xv]:[new RegExp("(rv:|MSIE )"+ln)],Mozilla:[new RegExp("rv:"+ln)]},sD=function(t,e){var n=Ux(t,e),i=iD[n];if(ce(i))return null;for(var a=0;i.length>a;a++){var o=t.match(i[a]);if(o)return parseFloat(o[o.length-2])}return null},hS=[[new RegExp(bo+"; "+bo+" (.*?)[);]","i"),t=>[bo,t&&t[1]||""]],[new RegExp(bc,"i"),[bc,""]],[new RegExp(wc,"i"),[wc,""]],[Av,[Ao,""]],[new RegExp(Gl,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[dm,""];if(new RegExp(zn).test(e)&&!/IEMobile\b/.test(e))return[Gl+" "+zn,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var i=rD[n[1]]||"";return/arm/i.test(e)&&(i="RT"),[Gl,i]}return[Gl,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[Wd,[t[3],t[4],t[5]||"0"].join(".")]:[Wd,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=ce(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+li+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+li+")","i"),t=>t&&t[2]?[li,[t[2],t[3],t[4]||"0"].join(".")]:[li,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];return t&&t[1]&&(e[1]=[t[1],t[2],t[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ZN,""]],[/Linux|debian/i,["Linux",""]]],fS=function(t){return nD.test(t)?bc:tD.test(t)?wc:eD.test(t)?bo:new RegExp(hm,"i").test(t)?hm
12:new RegExp("("+dm+"|WPDesktop)","i").test(t)?dm:/iPad/.test(t)?Tx:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?Ax:Av.test(t)?Ao:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(dS,"i").test(t)?dS:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?new RegExp(zn).test(t)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?li:xx:new RegExp("(pda|"+zn+")","i").test(t)?QN:new RegExp(Ro,"i").test(t)&&!new RegExp(Ro+" pc","i").test(t)?zx:""},aD=t=>t instanceof Error,Bx={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},oD=Bx.info;function qx(t){if(Cr(t))return{boolValue:t};if(typeof t=="number")return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if(typeof t=="string")return{stringValue:t};if(Ke(t))return{arrayValue:{values:t.map((e=>qx(e)))}};try{return{stringValue:JSON.stringify(t)}}catch{return{stringValue:String(t)}}}function pS(t){var e=[];for(var n in t){var i=t[n];pi(i)||ce(i)||e.push({key:n,value:qx(i)})}return e}function lD(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return vg&&n.length===uS||(uS=n.length,vg=n.reduce(((i,a)=>{od||(od={});var o=od[a];if(o)i[o[0]]=o[1];else for(var c=t(a),d=c.length-1;d>=0;d--){var h=c[d],f=h?.filename,g=e[a];if(f&&g){i[f]=g,od[a]=[f,g];break}}return i}),{})),vg}}class cD{constructor(e,n,i){i===void 0&&(i=[]),this.coercers=e,this.stackParser=n,this.modifiers=i}buildFromUnknown(e,n){n===void 0&&(n={});var i=n&&n.mechanism||{handled:!0,type:"generic"},a=this.buildCoercingContext(i,n,0).apply(e),o=this.buildParsingContext(n),c=this.parseStacktrace(a,o);return{$exception_list:this.convertToExceptionList(c,i),$exception_level:"error"}}modifyFrames(e){var n=this;return jn((function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&Ke(i.stacktrace.frames)&&(i.stacktrace.frames=yield n.applyModifiers(i.stacktrace.frames));return e}))()}coerceFallback(e){var n;return{type:"Error",value:"Unknown error",stack:(n=e.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var i,a;return e.cause!=null&&(i=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(a=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)),re({},e,{cause:i,stack:a})}applyChunkIds(e,n){return e.map((i=>(i.filename&&n&&(i.chunk_id=n[i.filename]),i)))}applyCoercers(e,n){for(var i of this.coercers)if(i.match(e))return i.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return jn((function*(){var i=e;for(var a of n.modifiers)i=yield a(i);return i}))()}convertToExceptionList(e,n){var i,a,o,c={type:e.type,value:e.value,mechanism:{type:(i=n.type)!==null&&i!==void 0?i:"generic",handled:(a=n.handled)===null||a===void 0||a,synthetic:(o=e.synthetic)!==null&&o!==void 0&&o}};e.stack&&(c.stacktrace={type:"raw",frames:e.stack});var d=[c];return e.cause!=null&&d.push(...this.convertToExceptionList(e.cause,re({},n,{handled:!0}))),d}buildParsingContext(e){var n;return{chunkIdMap:lD(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(e,n,i){i===void 0&&(i=0);var a=(o,c)=>{if(4>=c){var d=this.buildCoercingContext(e,n,c);return this.applyCoercers(o,d)}};return re({},n,{syntheticException:i==0?n.syntheticException:void 0,mechanism:e,apply:o=>a(o,i),next:o=>a(o,i+1)})}}var Co="?";function pm(t,e,n,i,a){var o={platform:t,filename:e,function:n==="<anonymous>"?Co:n,in_app:!0};return ce(i)||(o.lineno=i),ce(a)||(o.colno=a),o}var Fx=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return n||i?[t.indexOf("@")!==-1?t.split("@")[0]:Co,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]}
12,uD=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,dD=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hD=/\((\S*)(?::(\d+))(?::(\d+))\)/,fD=(t,e)=>{var n=uD.exec(t);if(n){var[,i,a,o]=n;return pm(e,i,Co,+a,+o)}var c=dD.exec(t);if(c){if(c[2]&&c[2].indexOf("eval")===0){var d=hD.exec(c[2]);d&&(c[2]=d[1],c[3]=d[2],c[4]=d[3])}var[h,f]=Fx(c[1]||Co,c[2]);return pm(e,f,h,c[3]?+c[3]:void 0,c[4]?+c[4]:void 0)}},pD=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,gD=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,mD=(t,e)=>{var n=pD.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var i=gD.exec(n[3]);i&&(n[1]=n[1]||"eval",n[3]=i[1],n[4]=i[2],n[5]="")}var a=n[3],o=n[1]||Co;return[o,a]=Fx(o,a),pm(e,a,o,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},gS=/\(error: (.*)\)/;class vD{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var i=_t(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var n=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?n+": "+e.message:n}isDOMException(e){return Kd(e,"DOMException")}isDOMError(e){return Kd(e,"DOMError")}}class yD{match(e){return(n=>n instanceof Error)(e)}coerce(e,n){return{type:this.getType(e),value:this.getMessage(e,n),stack:this.getStack(e),cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var i=e.message;return String(i.error&&typeof i.error.message=="string"?i.error.message:i)}getStack(e){return e.stacktrace||e.stack||void 0}}class _D{constructor(){}match(e){return Kd(e,"ErrorEvent")&&e.error!=null}coerce(e,n){var i;return n.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:(i=n.syntheticException)==null?void 0:i.stack,synthetic:!0}}}var bD=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class wD{match(e){return typeof e=="string"}coerce(e,n){var i,[a,o]=this.getInfos(e);return{type:a??"Error",value:o??e,stack:(i=n.syntheticException)==null?void 0:i.stack,synthetic:!0}}getInfos(e){var n="Error",i=e,a=e.match(bD);return a&&(n=a[1],i=a[2]),[n,i]}}var SD=["fatal","error","warning","log","info","debug"];function Hx(t,e){e===void 0&&(e=40);var n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var i=n.length;i>0;i--){var a=n.slice(0,i).join(", ");if(e>=a.length)return i===n.length?a:a.length>e?a.slice(0,e)+"...":a}return""}class ED{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var i,a=this.getErrorPropertyFromObject(e);return a?n.apply(a):{type:this.getType(e),value:this.getValue(e),stack:(i=n.syntheticException)==null?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return kv(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var n="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(n+=" with message: '"+e.message+"'"),n}if("message"in e&&typeof e.message=="string")return e.message;var i=this.getObjectClassName(e);return(i&&i!=="Object"?"'"+i+"'":"Object")+" captured as exception with keys: "+Hx(e)}isSeverityLevel(e){return _t(e)&&!Cd(e)&&SD.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var i=e[n];if(aD(i))return i}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class kD{match(e){return kv(e)}coerce(e,n){var i,a=e.constructor.name;return{type:a,value:a+" captured as exception with keys: "+Hx(e),stack:(i=n.syntheticException)==null?void 0:i.stack,synthetic:!0}}}class xD{match(e){return kx(e)}coerce(e,n){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(i=n.syntheticException)==null?void 0:i.stack,synthetic:!0}}}class TD{match(e){return Kd(e,"PromiseRejectionEvent")||this.isCu
12stomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!kv(e))return!1;try{var n=e.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(e,n){var i,a=this.getUnhandledRejectionReason(e);return kx(a)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(a),stack:(i=n.syntheticException)==null?void 0:i.stack,synthetic:!0}:n.apply(a)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var Jd="$message",Zd="$timestamp",RD=new Set([Jd,Zd]),_g={enabled:!0,max_bytes:32768};function Xd(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:_g.enabled,max_bytes:CD(t.max_bytes,_g.max_bytes)}:re({},_g)}class AD{constructor(e){this.Yt=[],this.Xt=0,this.qt=Xd(e)}setConfig(e){this.qt=Xd(e),this.er()}add(e){var n=(function(a){var o=(function(g){var v=new WeakSet;try{return JSON.stringify(g,((y,_)=>{if(typeof _=="bigint")return _.toString();if(typeof _!="function"&&typeof _!="symbol"){if(_ instanceof Date)return _.toISOString();if(_ instanceof Error)return{name:_.name,message:_.message,stack:_.stack};if(_&&typeof _=="object"){if(v.has(_))return"[Circular]";v.add(_)}return _}}))}catch{return}})(a);if(o)try{var c=JSON.parse(o);if(!Tt(c))return;var d=c,h=d[Jd],f=d[Zd];return!_t(h)||h.trim().length===0||!_t(f)&&!rr(f)?void 0:{step:d,json:o}}catch{return}})(e);if(n){var i=(function(a){if(typeof TextEncoder<"u")return new TextEncoder().encode(a).length;for(var o=encodeURIComponent(a),c=0,d=0;o.length>d;d++)o[d]==="%"?(c+=1,d+=2):c+=1;return c})(n.json);i>this.qt.max_bytes||(this.Yt.push({step:n.step,bytes:i}),this.Xt+=i,this.er())}}getAttachable(){return this.Yt.map((e=>e.step))}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var e=this.Yt.shift();e&&(this.Xt-=e.bytes)}}}function CD(t,e){if(!rr(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var Vx=function(t,e){var{debugEnabled:n}=e===void 0?{}:e,i={k(a){if(V&&(cn.DEBUG||we.POSTHOG_DEBUG||n)&&!ce(V.console)&&V.console){for(var o=("__rrweb_original__"in V.console[a])?V.console[a].__rrweb_original__:V.console[a],c=arguments.length,d=new Array(c>1?c-1:0),h=1;c>h;h++)d[h-1]=arguments[h];o(t,...d)}},debug(){for(var a=arguments.length,o=new Array(a),c=0;a>c;c++)o[c]=arguments[c];i.k("debug",...o)},info(){for(var a=arguments.length,o=new Array(a),c=0;a>c;c++)o[c]=arguments[c];i.k("log",...o)},warn(){for(var a=arguments.length,o=new Array(a),c=0;a>c;c++)o[c]=arguments[c];i.k("warn",...o)},error(){for(var a=arguments.length,o=new Array(a),c=0;a>c;c++)o[c]=arguments[c];i.k("error",...o)},critical(){for(var a=arguments.length,o=new Array(a),c=0;a>c;c++)o[c]=arguments[c];console.error(t,...o)},uninitializedWarning(a){i.error("You must initialize PostHog before calling "+a)},createLogger:(a,o)=>Vx(t+" "+a,o)};return i},ae=Vx("[PostHog.js]"),vt=ae.createLogger,OD=vt("[ExternalScriptsLoader]"),bg=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return OD.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var i=oe?.querySelectorAll("script");if(i){for(var a,o=function(){if(i[c].src===e){var h=i[c];return h.__posthog_loading_callback_fired?{v:n()}:(h.addEventListener("load",(f=>{h.__posthog_loading_callback_fired=!0,n(void 0,f)})),h.onerror=f=>n(f),{v:void 0})}},c=0;i.length>c;c++)if(a=o())return a.v}var d=()=>{if(!oe)return n("document not found");var h=oe.createElement("script");if(h.type="text/javascript",h.crossOrigin="anonymous",h.src=e,h.onload=v=>{h.__posthog_loading_callback_fired=!0,n(void 0,v)},h.onerror=v=>n(v),t.config.prepare_external_dependency_script&&(h=t.config.prepare_external_dependency_script(h)),!h)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")oe.head.appendChild(h);else{var f,g=oe.querySelectorAll("body > script");g.length>0?(f=g[0].parentNode)==null||f.insertBefore(h,g[0]):oe.body.appendChild(h)}};oe!=null&&oe.body?d():oe?.addEventListener("DOMContentLoaded",d)};we.__PosthogExtensions__=we.__PosthogExtensions__||{},we.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{if(e!=="remote-config"){var i;if(t.config.__preview_external_dependency_versioned_paths)i=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js");else{var a="/static/"+e+".js?v="+t.version;if(e==="toolbar"){var o=3e5;a=a+"&t="+Math.floor(Date.now()/o)*o}i=t.requestRouter.endpointFor("assets",a)}bg(t,i,n)}else{var c=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");bg(t,c,n)}},we.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var i=t.requestRouter.endpointFor("api",e);bg(t,i,n)};var Gx="$people_distinct_id",Qd="$device_id",Yl="__alias",Kl="__timers",gm="$autocapture_disabled_server_side",mm="$heatmaps_enabled_server_side",vm="$exception_capture_enabled_server_side",ym="$error_tracking_suppression_rules",_m="$error_tracking_capture_extension_exceptions",bm="$web_vitals_enabled_server_side",Cv="$dead_clicks_enabled_server_side",wm="$product_tours_enabled_server_side",Sm="$web_vitals_allowed_metrics",Wl="$session_recording_remote_config",Yx="$replay_override_sampling",Kx="$replay_override_linked_flag",Wx="$replay_override_url_trigger",Jx="$replay_override_event_trigger",eh="$sesid",Ov="$session_is_sampled",fo="$enabled_feature_flags",Od="$active_feature_flags",Jl="$early_access_features",Em="$feature_flag_details",km="$feature_flag_payloads",xm="$feature_flag_request_id",t
12i="$override_feature_flags",no="$override_feature_flag_payloads",Zl="$stored_person_properties",$s="$stored_group_properties",Tm="$surveys",Rm="$surveys_activated",Pd="ph_product_tours",ic="$flag_call_reported",Am="$flag_call_reported_session_id",Cm="$feature_flag_errors",th="$feature_flag_evaluated_at",ur="$user_state",Om="$client_session_props",Pm="$capture_rate_limit",Mm="$initial_campaign_params",Lm="$initial_referrer_info",nh="$initial_person_info",rh="$epp",Zx="__POSTHOG_TOOLBAR__",ld="$posthog_cookieless",Xx="$sdk_debug_extensions_init_method",Qx="$sdk_debug_extensions_init_time_ms",eT="$sdk_debug_recording_script_not_loaded",Pv="PostHog loadExternalDependency extension not found.",zs="on_reject",si="always",Fa="anonymous",Ha="identified",Nm="identified_only",ih="visibilitychange",sh="beforeunload",ro="$pageview",wg="$pageleave",Sg="$identify",mS="$groupidentify";function cd(t,e){Ke(t)&&t.forEach(e)}function ft(t,e){if(!qe(t))if(Ke(t))t.forEach(e);else if(GN(t))t.forEach(((i,a)=>e(i,a)));else for(var n in t)Ex.call(t,n)&&e(t[n],n)}var Et=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;e>i;i++)n[i-1]=arguments[i];for(var a of n)for(var o in a)a[o]!==void 0&&(t[o]=a[o]);return t};function Md(t){for(var e=Object.keys(t),n=e.length,i=new Array(n);n--;)i[n]=[e[n],t[e[n]]];return i}var vS=function(t){try{return t()}catch{return}},PD=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),i=0;e>i;i++)n[i]=arguments[i];return t.apply(this,n)}catch(a){ae.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ae.critical(a)}}},Mv=function(t){var e={};return ft(t,(function(n,i){(_t(n)&&n.length>0||rr(n))&&(e[i]=n)})),e},MD=["herokuapp.com","vercel.app","netlify.app"];function LD(t){var e=t?.hostname;if(!_t(e))return!1;var n=e.split(".").slice(-2).join(".");for(var i of MD)if(n===i)return!1;return!0}function Lt(t,e,n,i){var{capture:a=!1,passive:o=!0}=i??{};t?.addEventListener(e,n,{capture:a,passive:o})}function tT(t){return t.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return rr(t)&&isFinite(t)&&Math.floor(t)===t});class ah{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,i,a){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(i)||!Number.isInteger(a)||0>e||0>n||0>i||0>a||e>0xffffffffffff||n>4095||i>1073741823||a>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=e/Math.pow(2,40),o[1]=e/Math.pow(2,32),o[2]=e/Math.pow(2,24),o[3]=e/Math.pow(2,16),o[4]=e/Math.pow(2,8),o[5]=e,o[6]=112|n>>>8,o[7]=n,o[8]=128|i>>>24,o[9]=i>>>16,o[10]=i>>>8,o[11]=i,o[12]=a>>>24,o[13]=a>>>16,o[14]=a>>>8,o[15]=a,new ah(o)}toString(){for(var e="",n=0;this.bytes.length>n;n++)e=e+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new ah(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;16>n;n++){var i=this.bytes[n]-e.bytes[n];if(i!==0)return Math.sign(i)}return 0}}class ND{constructor(){this.S=0,this.C=0,this.I=new DD}generate(){var e=this.generateOrAbort();if(ce(e)){this.S=0;var n=this.generateOrAbort();if(ce(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.T();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return ah.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var yS,nT=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;t.length>e;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};V&&!ce(V.crypto)&&crypto.getRandomValues&&(nT=t=>crypto.getRandomValues(t));class DD{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(nT(this.M),this.O=0),this.M[this.O++]}}var Ki=()=>jD().toString(),jD=()=>(yS||(yS=new ND)).generate(),Dl="",ID=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Ar={R:()=>!!oe,D(t){ae.error("cookieStore error: "+t)},A(t){if(oe){try{for(var e=t+"=",n=oe.cookie.split(";").filter((o=>o.length)),i=0;n.length>i;i++){for(var a=n[i];a.charAt(0)==" ";)a=a.substring(1,a.length);if(a.indexOf(e)===0)return decodeURIComponent(a.substring(e.length,a.length))}}catch{}return null}},F(t){var e;try{e=JSON.parse(Ar.A(t))||{}}catch{}return e},N(t,e,n,i,a){if(oe)try{var o="",c="",d=(function(g,v){if(v){var y=(function(w,S){if(S===void 0&&(S=oe),Dl)return Dl;if(!S||["localhost","127.0.0.1"].includes(w))return"";for(var k=w.split("."),x=Math.min(k.length,8),C="dmn_chk_"+Ki();!Dl&&x--;){var A=k.slice(x).join("."),M=C+"=1;domain=."+A+";path=/";S.cookie=M+";max-age=3",S.cookie.includes(C)&&(S.cookie=M+";max-age=0",Dl=A)}return Dl})(g);
12if(!y){var _=(w=>{var S=w.match(ID);return S?S[0]:""})(g);_!==y&&ae.info("Warning: cookie subdomain discovery mismatch",_,y),y=_}return y?"; domain=."+y:""}return""})(oe.location.hostname,i);if(n){var h=new Date;h.setTime(h.getTime()+864e5*n),o="; expires="+h.toUTCString()}a&&(c="; secure");var f=t+"="+encodeURIComponent(JSON.stringify(e))+o+"; SameSite=Lax; path=/"+d+c;return f.length>3686.4&&ae.warn("cookieStore warning: large cookie, len="+f.length),oe.cookie=f,f}catch{return}},q(t,e){if(oe!=null&&oe.cookie)try{Ar.N(t,"",-1,e)}catch{return}}},Eg=null,yt={R(){if(!pi(Eg))return Eg;var t=!0;if(ce(V))t=!1;else try{var e="__mplssupport__";yt.N(e,"xyz"),yt.A(e)!=='"xyz"'&&(t=!1),yt.q(e)}catch{t=!1}return t||ae.error("localStorage unsupported; falling back to cookie store"),Eg=t,t},D(t){ae.error("localStorage error: "+t)},A(t){try{return V?.localStorage.getItem(t)}catch(e){yt.D(e)}return null},F(t){try{return JSON.parse(yt.A(t))||{}}catch{}return null},N(t,e){try{V?.localStorage.setItem(t,JSON.stringify(e))}catch(n){yt.D(n)}},q(t){try{V?.localStorage.removeItem(t)}catch(e){yt.D(e)}}},$D=[Qd,"distinct_id",eh,Ov,rh,nh,ur],ud={},zD={R:()=>!0,D(t){ae.error("memoryStorage error: "+t)},A:t=>ud[t]||null,F:t=>ud[t]||null,N(t,e){ud[t]=e},q(t){delete ud[t]}},Ls=null,Qt={R(){if(!pi(Ls))return Ls;if(Ls=!0,ce(V))Ls=!1;else try{var t="__support__";Qt.N(t,"xyz"),Qt.A(t)!=='"xyz"'&&(Ls=!1),Qt.q(t)}catch{Ls=!1}return Ls},D(t){ae.error("sessionStorage error: ",t)},A(t){try{return V?.sessionStorage.getItem(t)}catch(e){Qt.D(e)}return null},F(t){try{return JSON.parse(Qt.A(t))||null}catch{}return null},N(t,e){try{V?.sessionStorage.setItem(t,JSON.stringify(e))}catch(n){Qt.D(n)}},q(t){try{V?.sessionStorage.removeItem(t)}catch(e){Qt.D(e)}}};class UD{constructor(e){this._instance=e}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===si||this.isRejected()||this.consent===-1&&this.qt.cookieless_mode===zs}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.qt.opt_out_capturing_by_default}optInOut(e){this.nr.N(this.sr,e?1:0,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:i}=this._instance.config;return i||(n?n+e:"__ph_opt_in_out_"+e)}get ir(){var e=this.nr.A(this.sr);return mg(e)?1:Be(WN,e)?0:-1}get nr(){var e=this.qt.opt_out_capturing_persistence_type,n=e==="localStorage"?yt:Ar;if(!this.ar||this.ar!==n){this.ar=n;var i=e==="localStorage"?Ar:yt;i.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(mg(i.A(this.sr))),i.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[$n?.doNotTrack,$n?.msDoNotTrack,we.doNotTrack].some((e=>mg(e)))}}var dd=vt("[Dead Clicks]"),BD=()=>!0,qD=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(Cv)),i=t.instance.config.capture_dead_clicks;return Cr(i)?i:!!Tt(i)||n};class _S{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(e,n,i){this.instance=e,this.isEnabled=n,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[Cv]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr((()=>{this.hr()})):this.stop()}lr(e){var n,i;(n=we.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&e(),(i=we.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",(a=>{a?dd.error("failed to load script",a):e()}))}hr(){var e;if(oe){if(!this.ur&&(e=we.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=Tt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.ur=we.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.ur.start(oe),dd.info("starting...")}}else dd.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,dd.info("stopping..."))}}var kg=vt("[SegmentIntegration]"),rT="posthog-js";function iT(t,e){var{organization:n,projectId:i,prefix:a,severityAllowList:o=["error"],sendExceptionsToPostHog:c=!0}=e===void 0?{}:e;return d=>{var h,f,g,v,y;if(o!=="*"&&!o.includes(d.level)||!t.__loaded)return d;d.tags||(d.tags={});var _=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/pers
12on/"+t.get_distinct_id());d.tags["PostHog Person URL"]=_,t.sessionRecordingStarted()&&(d.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var w,S=((h=d.exception)==null?void 0:h.values)||[],k=S.map((C=>re({},C,{stacktrace:C.stacktrace?re({},C.stacktrace,{type:"raw",frames:(C.stacktrace.frames||[]).map((A=>re({},A,{platform:"web:javascript"})))}):void 0}))),x={$exception_message:((f=S[0])==null?void 0:f.value)||d.message,$exception_type:(g=S[0])==null?void 0:g.type,$exception_level:d.level,$exception_list:k,$sentry_event_id:d.event_id,$sentry_exception:d.exception,$sentry_exception_message:((v=S[0])==null?void 0:v.value)||d.message,$sentry_exception_type:(y=S[0])==null?void 0:y.type,$sentry_tags:d.tags};return n&&i&&(x.$sentry_url=(a||"https://sentry.io/organizations/")+n+"/issues/?project="+i+"&query="+d.event_id),c&&((w=t.exceptions)==null||w.sendExceptionEvent(x)),d}}class FD{constructor(e,n,i,a,o,c){this.name=rT,this.setupOnce=function(d){d(iT(e,{organization:n,projectId:i,prefix:a,severityAllowList:o,sendExceptionsToPostHog:c==null||c}))}}}class bS{constructor(e){this.cr=(n,i,a)=>{a&&(a.noSessionId||a.activityTimeout||a.sessionPastMaximumLength)&&(ae.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:a}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.vr()}vr(){var e;this.pr=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.cr)}destroy(){var e;(e=this.pr)==null||e.call(this),this.pr=void 0}doPageView(e,n){var i,a=this.gr(e,n);return this.dr={pathname:(i=V?.location.pathname)!==null&&i!==void 0?i:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),a}doPageLeave(e){var n;return this.gr(e,(n=this.dr)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.dr)==null?void 0:e.pageViewId}}gr(e,n){var i=this.dr;if(!i)return{$pageview_id:n};var a={$pageview_id:n,$prev_pageview_id:i.pageViewId},o=this._instance.scrollManager.getContext();if(o&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:c,lastScrollY:d,maxScrollY:h,maxContentHeight:f,lastContentY:g,maxContentY:v}=o;if(!(ce(c)||ce(d)||ce(h)||ce(f)||ce(g)||ce(v))){c=Math.ceil(c),d=Math.ceil(d),h=Math.ceil(h),f=Math.ceil(f),g=Math.ceil(g),v=Math.ceil(v);var y=c>1?Or(d/c,0,1,ae):1,_=c>1?Or(h/c,0,1,ae):1,w=f>1?Or(g/f,0,1,ae):1,S=f>1?Or(v/f,0,1,ae):1;a=Et(a,{$prev_pageview_last_scroll:d,$prev_pageview_last_scroll_percentage:y,$prev_pageview_max_scroll:h,$prev_pageview_max_scroll_percentage:_,$prev_pageview_last_content:g,$prev_pageview_last_content_percentage:w,$prev_pageview_max_content:v,$prev_pageview_max_content_percentage:S})}}return i.pathname&&(a.$prev_pageview_pathname=i.pathname),i.timestamp&&(a.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),a}}var HD={[Gx]:{exposure:"hidden"},[Yl]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[Kl]:{exposure:"hidden"},[gm]:{exposure:"event"},[mm]:{exposure:"hidden"},[vm]:{exposure:"event"},[ym]:{exposure:"hidden"},[_m]:{exposure:"event"},[bm]:{exposure:"event"},[Cv]:{exposure:"event"},[wm]:{exposure:"hidden"},[Sm]:{exposure:"event"},[Wl]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[eh]:{exposure:"hidden"},[Ov]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[fo]:{exposure:"derived",shouldSkipFromEventProperties:(t,e)=>e(),transformToEventProperties(t){if(!Tt(t))return{};for(var e={},n=Object.keys(t),i=0;n.length>i;i++)e["$feature/"+n[i]]=t[n[i]];return e}},[Od]:{exposure:"event"},[Jl]:{exposure:"hidden"},[Em]:{exposure:"hidden"},[km]:{exposure:"event"},[xm]:{exposure:"event"},[ti]:{exposure:"event"},[no]:{exposure:"hidden"},[Zl]:{exposure:"hidden"},[$s]:{exposure:"hidden"},[Tm]:{exposure:"hidden"},[Rm]:{exposure:"event"},[Pd]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"}
12,$conversations_user_traits:{exposure:"event"},[ic]:{exposure:"hidden"},[Am]:{exposure:"hidden"},[Cm]:{exposure:"hidden"},[th]:{exposure:"hidden"},[ur]:{exposure:"hidden"},[Om]:{exposure:"hidden"},[Pm]:{exposure:"hidden"},[Mm]:{exposure:"hidden"},[Lm]:{exposure:"hidden"},[nh]:{exposure:"hidden"},[rh]:{exposure:"hidden"},[Yx]:{exposure:"event"},[Kx]:{exposure:"event"},[Wx]:{exposure:"event"},[Jx]:{exposure:"event"},[Xx]:{exposure:"event"},[Qx]:{exposure:"event"},[eT]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},VD=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],oh=t=>{var e=oe?.createElement("a");return ce(e)?null:(e.href=t,e)},Sc=function(t,e){for(var n,i=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),a=0;i.length>a;a++){var o=i[a].split("=");if(o[0]===e){n=o;break}}if(!Ke(n)||2>n.length)return"";var c=n[1];try{c=decodeURIComponent(c)}catch{ae.error("Skipping decoding for malformed query param: "+c)}return c.replace(/\+/g," ")},Ec=function(t,e,n){if(!t||!e||!e.length)return t;for(var i=t.split("#"),a=i[1],o=(i[0]||"").split("?"),c=o[1],d=o[0],h=(c||"").split("&"),f=[],g=0;h.length>g;g++){var v=h[g].split("=");Ke(v)&&(e.includes(v[0])?f.push(v[0]+"="+n):f.push(h[g]))}var y=d;return c!=null&&(y+="?"+f.join("&")),a!=null&&(y+="#"+a),y},lh=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},hd="https?://(.*)",Oo=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],GD=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Oo],kc="<masked>",YD=["li_fat_id"];function sT(t,e,n){if(!oe)return{};var i,a=e?[...Oo,...n||[]]:[],o=aT(Ec(oe.URL,a,kc),t),c=(i={},ft(YD,(function(d){var h=Ar.A(d);i[d]=h||null})),i);return Et(c,o)}function aT(t,e){var n=GD.concat(e||[]),i={};return ft(n,(function(a){var o=Sc(t,a);i[a]=o||null})),i}function oT(t){var e=(function(o){return o?o.search(hd+"google.([^/?]*)")===0?"google":o.search(hd+"bing.com")===0?"bing":o.search(hd+"yahoo.com")===0?"yahoo":o.search(hd+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",i={};if(!pi(e)){i.$search_engine=e;var a=oe?Sc(oe.referrer,n):"";a.length&&(i.ph_keyword=a)}return i}function wS(){return navigator.language||navigator.userLanguage}var ch="$direct";function lT(){return oe?.referrer||ch}function cT(t,e){var n=t?[...Oo,...e||[]]:[],i=Xt?.href.substring(0,1e3);return{r:lT().substring(0,1e3),u:i?Ec(i,n,kc):void 0}}function uT(t){var e,{r:n,u:i}=t,a={$referrer:n,$referring_domain:n==null?void 0:n==ch?ch:(e=oh(n))==null?void 0:e.host};if(i){a.$current_url=i;var o=oh(i);a.$host=o?.host,a.$pathname=o?.pathname;var c=aT(i);Et(a,c)}if(n){var d=oT(n);Et(a,d)}return a}function dT(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function KD(){try{return new Date().getTimezoneOffset()}catch{return}}var WD=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class xg{constructor(e,n){this.qt=e,this.props={},this.mr=!1,this.yr=(i=>{var a="";return i.token&&(a=i.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),i.persistence_name?"ph_"+i.persistence_name:"ph_"+a+"_posthog"})(e),this.nr=this.br(e),this.load(),e.debug&&ae.info("Persistence loaded",e.persistence,re({},this.props)),this.update_config(e,e,n),this.save()}isDisabled(){return!!this._r}br(e){WD.indexOf(e.persistence.toLowerCase())===-1&&(ae.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n=(function(a){a===void 0&&(a=[]);var o=[...$D,...a];return re({},yt,{F(c){try{var d={};try{d=Ar.F(c)||{}}catch{}var h=Et(d,JSON.parse(yt.A(c)||"{}"));return yt.N(c,h),h}catch{}return null},N(c,d,h,f,g,v){try{yt.N(c,d,void 0,void 0,v);var y={};o.forEach((_=>{d[_]&&(y[_]=d[_])})),Object.keys(y).length&&Ar.N(c,y,h,f,g,v)}catch(_){yt.D(_)}},q(c,d){try{V?.localStorage.removeItem(c),Ar.q(c,d)}catch(h){yt.D(h)}}})})(e.cookie_persisted_properties||[]),i=e.persistence.toLowerCase();return i==="localstorage"&&yt.R()?yt:i==="localstorage+cookie"&&n.R()?n:i==="sessionstorage"&&Qt.R()?Qt:i==="memory"?zD:i==="cookie"?Ar:n.R()?n:Ar}wr(e){var n=e??this.qt.feature_flag_cache_ttl_ms;
12if(!n||0>=n)return!1;var i=this.props[th];return!i||typeof i!="number"||Date.now()-i>n}properties(){var e={};return ft(this.props,((n,i)=>{var a=(o=>{var c=HD[o];if(c)return c;for(var[d,h]of VD)if(o.indexOf(d)===0)return h})(i);if(a?.exposure==="derived"){if(a.shouldSkipFromEventProperties!=null&&a.shouldSkipFromEventProperties(n,i===fo?()=>this.wr():()=>!1))return;a.transformToEventProperties&&Et(e,a.transformToEventProperties(n))}else a&&a.exposure!=="event"||(e[i]=n)})),e}load(){if(!this._r){var e=this.nr.F(this.yr);e&&(this.props=Et({},e))}}save(){this._r||this.nr.N(this.yr,this.props,this.Sr,this.kr,this.Cr,this.qt.debug)}remove(){this.nr.q(this.yr,!1),this.nr.q(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(e,n,i){if(Tt(e)){ce(n)&&(n="None"),this.Sr=ce(i)?this.Ir:i;var a=!1;if(ft(e,((o,c)=>{this.props.hasOwnProperty(c)&&this.props[c]!==n||(this.Tr(c,o),a=!0)})),a)return this.save(),!0}return!1}register(e,n){if(Tt(e)){this.Sr=ce(n)?this.Ir:n;var i=!1;if(ft(e,((a,o)=>{e.hasOwnProperty(o)&&this.props[o]!==a&&(this.Tr(o,a),i=!0)})),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Er(e),this.save())}update_campaign_params(){if(!this.mr){var e=sT(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);ho(Mv(e))||this.register(e),this.mr=!0}}update_search_keyword(){var e;this.register((e=oe?.referrer)?oT(e):{})}update_referrer_info(){var e;this.register_once({$referrer:lT(),$referring_domain:oe!=null&&oe.referrer&&((e=oh(oe.referrer))==null?void 0:e.host)||ch},void 0)}set_initial_person_info(){this.props[Mm]||this.props[Lm]||this.register_once({[nh]:cT(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};ft([Lm,Mm],(c=>{var d=this.props[c];d&&ft(d,(function(h,f){e["$initial_"+um(f)]=h}))}));var n,i,a=this.props[nh];if(a){var o=(n=uT(a),i={},ft(n,(function(c,d){i["$initial_"+um(d)]=c})),i);Et(e,o)}return e}safe_merge(e){return ft(this.props,(function(n,i){i in e||(e[i]=n)})),e}update_config(e,n,i){if(this.Ir=this.Sr=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==n.persistence||!((c,d)=>{if(c.length!==d.length)return!1;var h=[...c].sort(),f=[...d].sort();return h.every(((g,v)=>g===f[v]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[])){var a=this.br(e),o=this.props;this.clear(),this.nr=a,this.props=o,this.save()}}set_disabled(e){this._r=e,this._r?this.remove():this.save()}set_cross_subdomain(e){e!==this.kr&&(this.kr=e,this.remove(),this.save())}set_secure(e){e!==this.Cr&&(this.Cr=e,this.remove(),this.save())}set_event_timer(e,n){var i=this.props[Kl]||{};i[e]=n,this.Tr(Kl,i),this.save()}remove_event_timer(e){var n=this.props[Kl]||{},i=n[e];return ce(i)||(delete n[e],this.Tr(Kl,n),this.save()),i}get_property(e){return this.props[e]}set_property(e,n){this.Tr(e,n),this.save()}Tr(e,n){this.props[e]=n}Er(e){delete this.props[e]}}var jl={Activation:"events",Cancellation:"cancelEvents"},Tg={Popover:"popover",API:"api",Widget:"widget"},Xl={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Rg={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Dm={Popover:"popover",Inline:"inline"},JD={SHOWN:"product tour shown"},SS={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},ES=vt("[RateLimiter]");class ZD{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var i=n.text;if(i&&i.length)try{(JSON.parse(i).quota_limited||[]).forEach((a=>{ES.info((a||"events")+" is quota limited."),this.serverLimits[a]=new Date().getTime()+6e4}))}catch(a){return void ES.warn('could not rate limit - continuing. Error: "'+a?.message+'"',{text:i})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var n,i,a;e===void 0&&(e=!1);var{captureEventsBurstLimit:o,captureEventsPerSecond:c}=this,d=new Date().getTime(),h=(n=(i=this.instance.persistence)==null?void 0:i.get_property(Pm))!==null&&n!==void 0?n:{tokens:o,last:d};h.tokens+=(d-h.last)/1e3*c,h.last=d,h.tokens>o&&(h.tokens=o);var f=1>
12h.tokens;return f||e||(h.tokens=Math.max(0,h.tokens-1)),!f||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+c+" events per second and "+o+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=f,(a=this.instance.persistence)==null||a.set_property(Pm,h),{isRateLimited:f,remainingTokens:h.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Il=vt("[RemoteConfig]");class hT{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=we._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}Mr(e){var n,i;(n=we.__PosthogExtensions__)!=null&&n.loadExternalDependency?(i=we.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}Pr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){e(n.json)}})}load(){try{if(this.remoteConfig)return Il.info("Using preloaded remote config",this.remoteConfig),this.Rr(this.remoteConfig),void this.Or();if(this._instance.Lr())return void Il.warn("Remote config is disabled. Falling back to local config.");this.Mr((e=>{if(!e)return Il.info("No config found after loading remote JS config. Falling back to JSON."),void this.Pr((n=>{this.Rr(n),this.Or()}));this.Rr(e),this.Or()}))}catch(e){Il.error("Error loading remote config",e)}}stop(){this.Fr&&(clearInterval(this.Fr),this.Fr=void 0)}refresh(){!this._instance.Lr()&&oe&&oe.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}Or(){var e;if(!this.Fr){var n=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;n!==0&&(this.Fr=setInterval((()=>{this.refresh()}),n))}}Rr(e){var n;e||Il.error("Failed to fetch remote config from PostHog."),this._instance.Rr(e??{}),e?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var Tr={GZipJS:"gzip-js",Base64:"base64"},nr=Uint8Array,kn=Uint16Array,Po=Uint32Array,Lv=new nr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Nv=new nr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),kS=new nr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),fT=function(t,e){for(var n=new kn(31),i=0;31>i;++i)n[i]=e+=1<<t[i-1];var a=new Po(n[30]);for(i=1;30>i;++i)for(var o=n[i];n[i+1]>o;++o)a[o]=o-n[i]<<5|i;return[n,a]},pT=fT(Lv,2),jm=pT[1];pT[0][28]=258,jm[258]=28;for(var xS=fT(Nv,0)[1],gT=new kn(32768),pt=0;32768>pt;++pt){var Va=(43690&pt)>>>1|(21845&pt)<<1;gT[pt]=((65280&(Va=(61680&(Va=(52428&Va)>>>2|(13107&Va)<<2))>>>4|(3855&Va)<<4))>>>8|(255&Va)<<8)>>>1}var sc=function(t,e,n){for(var i=t.length,a=0,o=new kn(e);i>a;++a)++o[t[a]-1];var c,d=new kn(e);for(a=0;e>a;++a)d[a]=d[a-1]+o[a-1]<<1;for(c=new kn(i),a=0;i>a;++a)c[a]=gT[d[t[a]-1]++]>>>15-t[a];return c},Zs=new nr(288);for(pt=0;144>pt;++pt)Zs[pt]=8;for(pt=144;256>pt;++pt)Zs[pt]=9;for(pt=256;280>pt;++pt)Zs[pt]=7;for(pt=280;288>pt;++pt)Zs[pt]=8;var uh=new nr(32);for(pt=0;32>pt;++pt)uh[pt]=5;var XD=sc(Zs,9),QD=sc(uh,5),mT=function(t){return(t/8>>0)+(7&t&&1)},vT=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var i=new(t instanceof kn?kn:t instanceof Po?Po:nr)(n-e);return i.set(t.subarray(e,n)),i},Zr=function(t,e,n){var i=e/8>>0;t[i]|=n<<=7&e,t[i+1]|=n>>>8},$l=function(t,e,n){var i=e/8>>0;t[i]|=n<<=7&e,t[i+1]|=n>>>8,t[i+2]|=n>>>16},Ag=function(t,e){for(var n=[],i=0;t.length>i;++i)t[i]&&n.push({s:i,f:t[i]});var a=n.length,o=n.slice();if(!a)return[new nr(0),0];if(a==1){var c=new nr(n[0].s+1);return c[n[0].s]=1,[c,1]}n.sort((function(D,$){return D.f-$.f})),n.push({s:-1,f:25001});var d=n[0],h=n[1],f=0,g=1,v=2;for(n[0]={s:-1,f:d.f+h.f,l:d,r:h};g!=a-1;)d=n[n[v].f>n[f].f?f++:v++],h=n[f!=g&&n[v].f>n[f].f?f++:v++],n[g++]={s:-1,f:d.f+h.f,l:d,r:h};var y=o[0].s;for(i=1;a>i;++i)o[i].s>y&&(y=o[i].s);var _=new kn(y+1),w=Im(n[g-1],_,0);if(w>e){i=0;var S=0,k=w-e,x=1<<k;for(o.sort((function(D,$){return _[$.s]-_[D.s]||D.f-$.f}));a>i;++i){var C=o[i].s;if(e>=_[C])break;S+=x-(1<<w-_[C]),_[C]=e}for(S>>>=k;S>0;){var A=o[i].s;e>_[A]?S-=1<<e-_[A]++-1:++i}for(;i>=0&&S;--i){var M=o[i].s;_[M]==e&&(--_[M],++S)}w=e}return[new nr(_),w]},Im=function(t,e,n){return t.s==-1?Math.max(Im(t.l,e,n+1),Im(t.r,e,n+1)):e[t.s]=n},TS=function(t){for(var e=t.length;e&&!t[--e];);
12for(var n=new kn(++e),i=0,a=t[0],o=1,c=function(h){n[i++]=h},d=1;e>=d;++d)if(t[d]==a&&d!=e)++o;else{if(!a&&o>2){for(;o>138;o-=138)c(32754);o>2&&(c(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(c(a),--o;o>6;o-=6)c(8304);o>2&&(c(o-3<<5|8208),o=0)}for(;o--;)c(a);o=1,a=t[d]}return[n.subarray(0,i),e]},zl=function(t,e){for(var n=0,i=0;e.length>i;++i)n+=t[i]*e[i];return n},$m=function(t,e,n){var i=n.length,a=mT(e+2);t[a]=255&i,t[a+1]=i>>>8,t[a+2]=255^t[a],t[a+3]=255^t[a+1];for(var o=0;i>o;++o)t[a+o+4]=n[o];return 8*(a+4+i)},RS=function(t,e,n,i,a,o,c,d,h,f,g){Zr(e,g++,n),++a[256];for(var v=Ag(a,15),y=v[0],_=v[1],w=Ag(o,15),S=w[0],k=w[1],x=TS(y),C=x[0],A=x[1],M=TS(S),D=M[0],$=M[1],L=new kn(19),I=0;C.length>I;++I)L[31&C[I]]++;for(I=0;D.length>I;++I)L[31&D[I]]++;for(var U=Ag(L,7),X=U[0],Q=U[1],te=19;te>4&&!X[kS[te-1]];--te);var _e,pe,Ne,H,Z=f+5<<3,ue=zl(a,Zs)+zl(o,uh)+c,Ee=zl(a,y)+zl(o,S)+c+14+3*te+zl(L,X)+(2*L[16]+3*L[17]+7*L[18]);if(ue>=Z&&Ee>=Z)return $m(e,g,t.subarray(h,h+f));if(Zr(e,g,1+(ue>Ee)),g+=2,ue>Ee){_e=sc(y,_),pe=y,Ne=sc(S,k),H=S;var Me=sc(X,Q);for(Zr(e,g,A-257),Zr(e,g+5,$-1),Zr(e,g+10,te-4),g+=14,I=0;te>I;++I)Zr(e,g+3*I,X[kS[I]]);g+=3*te;for(var P=[C,D],K=0;2>K;++K){var ee=P[K];for(I=0;ee.length>I;++I)Zr(e,g,Me[se=31&ee[I]]),g+=X[se],se>15&&(Zr(e,g,ee[I]>>>5&127),g+=ee[I]>>>12)}}else _e=XD,pe=Zs,Ne=QD,H=uh;for(I=0;d>I;++I)if(i[I]>255){var se;$l(e,g,_e[257+(se=i[I]>>>18&31)]),g+=pe[se+257],se>7&&(Zr(e,g,i[I]>>>23&31),g+=Lv[se]);var de=31&i[I];$l(e,g,Ne[de]),g+=H[de],de>3&&($l(e,g,i[I]>>>5&8191),g+=Nv[de])}else $l(e,g,_e[i[I]]),g+=pe[i[I]];return $l(e,g,_e[256]),g+pe[256]},e2=new Po([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),t2=(function(){for(var t=new Po(256),e=0;256>e;++e){for(var n=e,i=9;--i;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),Cg=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function n2(t,e){e===void 0&&(e={});var n=(function(){var v=4294967295;return{p(y){for(var _=v,w=0;y.length>w;++w)_=t2[255&_^y[w]]^_>>>8;v=_},d(){return 4294967295^v}}})(),i=t.length;n.p(t);var a,o,c,d,h,f=(d=10+((a=e).filename&&a.filename.length+1||0),h=8,(function(v,y,_,w,S,k){var x=v.length,C=new nr(w+x+5*(1+Math.floor(x/7e3))+S),A=C.subarray(w,C.length-S),M=0;if(!y||8>x)for(var D=0;x>=D;D+=65535){var $=D+65535;x>$?M=$m(A,M,v.subarray(D,$)):(A[D]=!0,M=$m(A,M,v.subarray(D,x)))}else{for(var L=e2[y-1],I=L>>>13,U=8191&L,X=(1<<_)-1,Q=new kn(32768),te=new kn(X+1),_e=Math.ceil(_/3),pe=2*_e,Ne=function(fs){return(v[fs]^v[fs+1]<<_e^v[fs+2]<<pe)&X},H=new Po(25e3),Z=new kn(288),ue=new kn(32),Ee=0,Me=0,P=(D=0,0),K=0,ee=0;x>D;++D){var se=Ne(D),de=32767&D,Te=te[se];if(Q[de]=Te,te[se]=de,D>=K){var Ie=x-D;if((Ee>7e3||P>24576)&&Ie>423){M=RS(v,A,0,H,Z,ue,Me,P,ee,D-ee,M),P=Ee=Me=0,ee=D;for(var Ye=0;286>Ye;++Ye)Z[Ye]=0;for(Ye=0;30>Ye;++Ye)ue[Ye]=0}var Ve=2,hn=0,sr=U,Ft=de-Te&32767;if(Ie>2&&se==Ne(D-Ft))for(var us=Math.min(I,Ie)-1,Bn=Math.min(32767,D),ds=Math.min(258,Ie);Bn>=Ft&&--sr&&de!=Te;){if(v[D+Ve]==v[D+Ve-Ft]){for(var sn=0;ds>sn&&v[D+sn]==v[D+sn-Ft];++sn);if(sn>Ve){if(Ve=sn,hn=Ft,sn>us)break;var na=Math.min(Ft,sn-2),qn=0;for(Ye=0;na>Ye;++Ye){var ar=D-Ft+Ye+32768&32767,fn=ar-Q[ar]+32768&32767;fn>qn&&(qn=fn,Te=ar)}}}Ft+=(de=Te)-(Te=Q[de])+32768&32767}if(hn){H[P++]=268435456|jm[Ve]<<18|xS[hn];var mi=31&jm[Ve],hs=31&xS[hn];Me+=Lv[mi]+Nv[hs],++Z[257+mi],++ue[hs],K=D+Ve,++Ee}else H[P++]=v[D],++Z[v[D]]}}M=RS(v,A,!0,H,Z,ue,Me,P,ee,D-ee,M)}return vT(C,0,w+mT(M)+S)})(o=t,(c=e).level==null?6:c.level,c.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(o.length)))):12+c.mem,d,h)),g=f.length;return(function(v,y){var _=y.filename;if(v[0]=31,v[1]=139,v[2]=8,v[8]=2>y.level?4:y.level==9?2:0,v[9]=3,y.mtime!=0&&Cg(v,4,Math.floor(new Date(y.mtime||Date.now())/1e3)),_){v[3]=8;for(var w=0;_.length>=w;++w)v[w+10]=_.charCodeAt(w)}})(f,e),Cg(f,g-8,n.d()),Cg(f,g-4,i),f}var r2=!!om||!!am,yT="text/plain",Ld=!1,i2=(t,e)=>{var[n,i]=t.split("#"),[a,o]=n.split("?");if(!o)return t;var c=o.split("&").filter((d=>d.split("=")[0]!==e)).join("&");return a+(c?"?"+c:"")+(i?"#"+i:"")},Oh=function(t,e,n){var i;n===void 0&&(n=!0);var[a,o]=t.split("?"),c=re({},e),d=(i=o?.split("&").map((f=>{var g,[v,y]=f.split("="),_=n&&(g=c[v])!==null&&g!==void 0?g:y;return delete c[v],v+"="+_})))!==null&&i!==void 0?i:[],h=(function(f,g){var v,y;g===void 0&&(g="&");var _=[];return ft(f,(function(w,S){ce(w)||ce(S)||S==="undefined"||(v=encodeURIComponent((k=>k instanceof File)(w)?w.name:w.toString()),y=encodeURIComponent(S),_[_.length]=y+"="+v)})),_.join(g)})(c);return h&&d.push(h),a+"?"+d.join("&")},po=(t,e)=>JSON.stringify(t,((n,i)=>typeof i=="bigint"?i.toString():i),e),AS=t=>{if(t.tr)return t.tr;var{data:e,compression:n}=t;if(e){if(n===Tr.GZipJS){var i=n2((function(d,h){var f=d.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(d);for(var g=new nr(d.length+(d.length>>>1)),v=0,y=function(k){g[v++]=k},_=0;f>_;++_){if(v+5>g.length){var w=new nr(v+8+(f-_<<1));w.set(g),g=w}
12var S=d.charCodeAt(_);128>S?y(S):2048>S?(y(192|S>>>6),y(128|63&S)):S>55295&&57344>S?(y(240|(S=65536+(1047552&S)|1023&d.charCodeAt(++_))>>>18),y(128|S>>>12&63),y(128|S>>>6&63),y(128|63&S)):(y(224|S>>>12),y(128|S>>>6&63),y(128|63&S))}return vT(g,0,v)})(po(e)),{mtime:0});return{contentType:yT,body:i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength),estimatedSize:i.byteLength}}if(n===Tr.Base64){var a=(function(d){return d&&btoa(encodeURIComponent(d).replace(/%([0-9A-F]{2})/g,((h,f)=>String.fromCharCode(parseInt(f,16)))))})(po(e)),o=(d=>"data="+encodeURIComponent(typeof d=="string"?d:po(d)))(a);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var c=po(e);return{contentType:"application/json",body:c,estimatedSize:new Blob([c]).size}}},Og=t=>{var e,n,i,a=AS(t);return!a||(n=t.compression,i=Sc(t.url,"compression"),n!==oS.GZipJS&&i!==oS.GZipJS&&i!=="gzip")||((e=a.body)instanceof ArrayBuffer?lm(new Uint8Array(e)):ArrayBuffer.isView(e)&&lm(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))?{url:t.url,encodedBody:a}:(Ld=!0,{url:i2(t.url,"compression"),encodedBody:AS(re({},t,{compression:void 0,tr:void 0}))})},s2=(function(){var t=jn((function*(e){var n=po(e.data),i=yield(function(o,c,d){return cm.apply(this,arguments)})(n,cn.DEBUG,{rethrow:!0});if(!i)return e;var a=yield i.arrayBuffer();return re({},e,{tr:{contentType:yT,body:a,estimatedSize:a.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),CS=(t,e)=>Oh(t,{_:new Date().getTime().toString(),ver:cn.JS_SDK_VERSION,compression:e}),Nd=[];am&&Nd.push({transport:"fetch",method(t){var e,{url:n,encodedBody:i}=Og(t),{contentType:a,body:o,estimatedSize:c}=i??{},d=new Headers;ft(t.headers,(function(g,v){d.append(v,g)})),a&&d.append("Content-Type",a);var h=null;if(iS){var f=new iS;h={signal:f.signal,timeout:setTimeout((()=>f.abort()),t.timeout)}}am(n,re({method:t?.method||"GET",headers:d,keepalive:t.method==="POST"&&52428.8>(c||0),body:o,signal:(e=h)==null?void 0:e.signal},t.fetchOptions)).then((g=>g.text().then((v=>{var y={statusCode:g.status,text:v};if(g.status===200)try{y.json=JSON.parse(v)}catch(_){ae.error(_)}t.callback==null||t.callback(y)})))).catch((g=>{ae.error(g),t.callback==null||t.callback({statusCode:0,error:g})})).finally((()=>h?clearTimeout(h.timeout):null))}}),om&&Nd.push({transport:"XHR",method(t){var e=new om,{url:n,encodedBody:i}=Og(t);e.open(t.method||"GET",n,!0);var{contentType:a,body:o}=i??{};ft(t.headers,(function(c,d){e.setRequestHeader(d,c)})),a&&e.setRequestHeader("Content-Type",a),t.timeout&&(e.timeout=t.timeout),t.disableXHRCredentials||(e.withCredentials=!0),e.onreadystatechange=()=>{if(e.readyState===4){var c={statusCode:e.status,text:e.responseText};if(e.status===200)try{c.json=JSON.parse(e.responseText)}catch{}t.callback==null||t.callback(c)}},e.send(o)}}),$n!=null&&$n.sendBeacon&&Nd.push({transport:"sendBeacon",method(t){try{var{url:e,encodedBody:n}=Og(t),i=Oh(e,{beacon:"1"}),{contentType:a,body:o}=n??{};if(!o)return;var c=o instanceof Blob?o:new Blob([o],{type:a});$n.sendBeacon(i,c)}catch{}}});var zm=3e3;class a2{constructor(e,n){this.Ar=!0,this.Nr=[],this.$r=Or(n?.flush_interval_ms||zm,250,5e3,ae.createLogger("flush interval"),zm),this.Dr=e}enqueue(e){this.Nr.push(e),this.qr||this.jr()}unload(){this.Hr();var e=this.Nr.length>0?this.Ur():{},n=Object.values(e);[...n.filter((i=>i.url.indexOf("/e")===0)),...n.filter((i=>i.url.indexOf("/e")!==0))].map((i=>{this.Dr(re({},i,{transport:"sendBeacon"}))}))}enable(){this.Ar=!1,this.jr()}jr(){var e=this;this.Ar||(this.qr=setTimeout((()=>{if(this.Hr(),this.Nr.length>0){var n=this.Ur(),i=function(){var o=n[a],c=new Date().getTime();o.data&&Ke(o.data)&&ft(o.data,(d=>{d.offset=Math.abs(d.timestamp-c),delete d.timestamp}
12)),e.Dr(o)};for(var a in n)i()}}),this.$r))}Hr(){clearTimeout(this.qr),this.qr=void 0}Ur(){var e={};return ft(this.Nr,(n=>{var i,a=n,o=(a?a.batchKey:null)||a.url;ce(e[o])&&(e[o]=re({},a,{data:[]})),(i=e[o].data)==null||i.push(a.data)})),this.Nr=[],e}}var o2=["retriesPerformedSoFar"];class l2{constructor(e){this.Br=!1,this.zr=3e3,this.Nr=[],this._instance=e,this.Nr=[],this.Vr=!0,!ce(V)&&"onLine"in V.navigator&&(this.Vr=V.navigator.onLine,this.Wr=()=>{this.Vr=!0,this.Zr()},this.Gr=()=>{this.Vr=!1},Lt(V,"online",this.Wr),Lt(V,"offline",this.Gr))}get length(){return this.Nr.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,i=bx(e,o2);to(n)&&(i.url=Oh(i.url,{retry_count:n})),this._instance._send_request(re({},i,{callback:a=>{a.statusCode===200||a.statusCode>=400&&500>a.statusCode||(n??0)>=10?i.callback==null||i.callback(a):this.Qr(re({retriesPerformedSoFar:n},i))}}))}Qr(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var i=(function(c){var d=3e3*Math.pow(2,c),h=d/2,f=Math.min(18e5,d),g=Math.random()-.5;return Math.ceil(f+g*(f-h))})(n),a=Date.now()+i;this.Nr.push({retryAt:a,requestOptions:e});var o="Enqueued failed request for retry in "+i;navigator.onLine||(o+=" (Browser is offline)"),ae.warn(o),this.Br||(this.Br=!0,this.Jr())}Jr(){if(this.Kr&&clearTimeout(this.Kr),this.Nr.length===0)return this.Br=!1,void(this.Kr=void 0);this.Kr=setTimeout((()=>{this.Vr&&this.Nr.length>0&&this.Zr(),this.Jr()}),this.zr)}Zr(){var e=Date.now(),n=[],i=this.Nr.filter((o=>e>o.retryAt||(n.push(o),!1)));if(this.Nr=n,i.length>0)for(var{requestOptions:a}of i)this.retriableRequest(a)}unload(){for(var{requestOptions:e}of(this.Kr&&(clearTimeout(this.Kr),this.Kr=void 0),this.Br=!1,ce(V)||(this.Wr&&(V.removeEventListener("online",this.Wr),this.Wr=void 0),this.Gr&&(V.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Nr))try{this._instance._send_request(re({},e,{transport:"sendBeacon"}))}catch(n){ae.error(n)}this.Nr=[]}}class c2{constructor(e){this.Yr=()=>{var n,i,a,o;this.Xr||(this.Xr={});var c=this.scrollElement(),d=this.scrollY(),h=c?Math.max(0,c.scrollHeight-c.clientHeight):0,f=d+(c?.clientHeight||0),g=c?.scrollHeight||0;this.Xr.lastScrollY=Math.ceil(d),this.Xr.maxScrollY=Math.max(d,(n=this.Xr.maxScrollY)!==null&&n!==void 0?n:0),this.Xr.maxScrollHeight=Math.max(h,(i=this.Xr.maxScrollHeight)!==null&&i!==void 0?i:0),this.Xr.lastContentY=f,this.Xr.maxContentY=Math.max(f,(a=this.Xr.maxContentY)!==null&&a!==void 0?a:0),this.Xr.maxContentHeight=Math.max(g,(o=this.Xr.maxContentHeight)!==null&&o!==void 0?o:0)},this._instance=e}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Xr}resetContext(){var e=this.Xr;return setTimeout(this.Yr,0),e}startMeasuringScrollPosition(){Lt(V,"scroll",this.Yr,{capture:!0}),Lt(V,"scrollend",this.Yr,{capture:!0}),Lt(V,"resize",this.Yr)}scrollElement(){if(!this.ei)return V?.document.documentElement;var e=Ke(this.ei)?this.ei:[this.ei];for(var n of e){var i=V?.document.querySelector(n);if(i)return i}}scrollY(){if(this.ei){var e=this.scrollElement();return e&&e.scrollTop||0}return V&&(V.scrollY||V.pageYOffset||V.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var e=this.scrollElement();return e&&e.scrollLeft||0}return V&&(V.scrollX||V.pageXOffset||V.document.documentElement.scrollLeft)||0}}var u2=t=>cT(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties);class OS{constructor(e,n,i,a){this.ti=o=>{var c=this.ri();if(!c||c.sessionId!==o){var d={sessionId:o,props:this.ii(this._instance)};this.ni.register({[Om]:d})}},this._instance=e,this.si=n,this.ni=i,this.ii=a||u2,this.si.onSessionId(this.ti)}ri(){return this.ni.props[Om]}getSetOnceProps(){var e,n=(e=this.ri())==null?void 0:e.props;return n?"r"in n?uT(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return ft(Mv(this.getSetOnceProps()),((n,i)=>{i==="$current_url"&&(i="url"),e["$session_entry_"+um(i)]=n})),e}}class Dv{constructor(){this.oi={}}on(e,n){return this.oi[e]||(this.oi[e]=[]),this.oi[e].push(n),()=>{this.oi[e]=this.oi[e].filter((i=>i!==n))}}emit(e,n){for(var i of this.oi[e]||[])i(n);for(var a of this.oi["*"]||[])a(e,n)}}var Pg=vt("[SessionId]");class PS{on(e,n){return this.ai.on(e,n)}constructor(e,n,i){var a;if(this.ui=[],this.li=void 0,this.ai=new Dv,this.hi=(f,g)=>!(!to(f)||!to(g))&&Math.abs(f-g)>
12this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===si)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=e.config,this.ni=e.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=n||Ki,this.fi=i||Ki;var o=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*Or(this.qt.session_idle_timeout_seconds||1800,60,36e3,Pg.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+o+"_window_id",this.mi="ph_"+o+"_primary_window_exists",this.yi()){var c=Qt.F(this.gi),d=Qt.F(this.mi);c&&!d?this.ci=c:Qt.q(this.gi),Qt.N(this.mi,!0)}if((a=this.qt.bootstrap)!=null&&a.sessionID)try{var h=(f=>{var g=this.qt.bootstrap.sessionID.replace(/-/g,"");if(g.length!==32)throw new Error("Not a valid UUID");if(g[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(g.substring(0,12),16)})();this.bi(this.qt.bootstrap.sessionID,new Date().getTime(),h)}catch(f){Pg.error("Invalid sessionID in bootstrap",f)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return ce(this.ui)&&(this.ui=[]),this.ui.push(e),this.di&&e(this.di,this.ci),()=>{this.ui=this.ui.filter((n=>n!==e))}}yi(){return this.qt.persistence!=="memory"&&!this.ni._r&&Qt.R()}xi(e){e!==this.ci&&(this.ci=e,this.yi()&&Qt.N(this.gi,e))}Si(){return this.ci?this.ci:this.yi()?Qt.F(this.gi):null}bi(e,n,i){e===this.di&&n===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=n,this.di=e,this.ni.register({[eh]:[n,e,i]}))}ki(){var e=this.ni.props[eh];return Ke(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.Ci),this.Ci=void 0,this.li&&V&&(V.removeEventListener(sh,this.li,{capture:!1}),this.li=void 0),this.ui=[]}wi(){this.li=()=>{this.yi()&&Qt.q(this.mi)},Lt(V,sh,this.li,{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.qt.cookieless_mode===si)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=n||new Date().getTime(),[a,o,c]=this.ki(),d=this.Si(),h=to(c)&&Math.abs(i-c)>864e5,f=!1,g=!o,v=!g&&!e&&this.hi(i,a);g||v||h?(o=this.vi(),d=this.fi(),Pg.info("new session ID generated",{sessionId:o,windowId:d,changeReason:{noSessionId:g,activityTimeout:v,sessionPastMaximumLength:h}}),c=i,f=!0):d||(d=this.fi(),f=!0);var y=to(a)&&e&&!h?a:i,_=to(c)?c:new Date().getTime();return this.xi(d),this.bi(o,y,_),e||this.pi(),f&&this.ui.forEach((w=>w(o,d,f?{noSessionId:g,activityTimeout:v,sessionPastMaximumLength:h}:void 0))),{sessionId:o,windowId:d,sessionStartTimestamp:_,changeReason:f?{noSessionId:g,activityTimeout:v,sessionPastMaximumLength:h}:void 0,lastActivityTimestamp:a}}pi(){clearTimeout(this.Ci),this.Ci=setTimeout((()=>{var[e]=this.ki();if(this.hi(new Date().getTime(),e)){var n=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)}}var _T=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&cS(n,e))return!0;try{var i=t?.userAgentData;if(i!=null&&i.brands&&i.brands.some((a=>cS(a?.brand,e))))return!0}catch{}return!!t.webdriver},dh=function(t,e){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function MS(t,e,n){return po({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var bT={exact:(t,e)=>e.some((n=>t.some((i=>n===i)))),is_not:(t,e)=>e.every((n=>t.every((i=>n!==i)))),regex:(t,e)=>e.some((n=>t.some((i=>dh(n,i))))),not_regex:(t,e)=>e.every((n=>t.every((i=>!dh(n,i))))),icontains:(t,e)=>e.map(fd).some((n=>t.map(fd).some((i=>n.includes(i))))),not_icontains:(t,e)=>e.map(fd).every((n=>t.map(fd).every((i=>!n.includes(i))))),gt:(t,e)=>e.some((n=>{var i=parseFloat(n);return!isNaN(i)&&t.some((a=>i>parseFloat(a)))})),lt:(t,e)=>e.some((n=>{var i=parseFloat(n);return!isNaN(i)&&t.some((a=>i<parseFloat(a)))}))},fd=t=>t.toLowerCase();function wT(t,e){return!t||Object.entries(t).every((n=>{var[i,a]=n,o=e?.[i];if(ce(o)||pi(o))return!1;var c=[String(o)],d=bT[a.operator];return!!d&&d(a.values,c)}))}var Um="custom",LS="i.posthog.com",d2=/^\/static\//;class h2{constructor(e){this.Ii={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+LS,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}
12get region(){return this.Ii[this.apiHost]||(this.Ii[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Um),this.Ii[this.apiHost]}Ti(e){var n=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof n=="string"&&d2.test(e))return n.trim().replace(/\/$/,"")||void 0}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(e==="flags")return this.flagsApiHost+n;if(e==="assets"){var i=this.Ti(n);if(i)return""+i+n}if(this.region===Um)return this.apiHost+n;var a=LS+n;switch(e){case"assets":return"https://"+this.region+"-assets."+a;case"api":return"https://"+this.region+"."+a}}}var at=vt("[Surveys]"),Bm="seenSurvey_",f2=[Tg.Popover,Tg.Widget,Tg.API],p2={ignoreConditions:!1,ignoreDelay:!1,displayType:Dm.Popover},g2=vt("[PostHog ExternalIntegrations]"),m2={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class v2{constructor(e){this._instance=e}lr(e,n){var i;(i=we.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,e,(a=>{if(a)return g2.error("failed to load script",a);n()}))}startIfEnabledOrStop(){var e=this,n=function(c){var d,h,f;!a||(d=we.__PosthogExtensions__)!=null&&(d=d.integrations)!=null&&d[c]||e.lr(m2[c],(()=>{var g;(g=we.__PosthogExtensions__)==null||(g=g.integrations)==null||(g=g[c])==null||g.start(e._instance)})),!a&&(h=we.__PosthogExtensions__)!=null&&(h=h.integrations)!=null&&h[c]&&((f=we.__PosthogExtensions__)==null||(f=f.integrations)==null||(f=f[c])==null||f.stop())};for(var[i,a]of Object.entries((o=this._instance.config.integrations)!==null&&o!==void 0?o:{})){var o;n(i)}}}var Ga,ac={},Mg=0,qm=()=>{},NS='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Ul="Surveys module not available",DS="sanitize_properties is deprecated. Use before_send instead",ST="Invalid value for property_denylist config: ",io="posthog",ET=!r2&&Sn?.indexOf("MSIE")===-1&&Sn?.indexOf("Mozilla")===-1,jS=t=>{var e;return re({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:LD(oe?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:qm,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:t??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:Xt&&_t(Xt?.search)&&Xt.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(V==null||(e=V.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(n){ae.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Nm,before_send:void 0,request_queue_config:{flush_interval_ms:zm},error_tracking:{},_onCapture:qm,__preview_eager_load_replay:!1},(n=>({rageclick:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(t))},y2=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],IS=t=>{var e={};for(var[n,i]of y2)ce(t[n])||(e[i]=t[n]);var a=Et({},e,t);return Ke(t.property_blacklist)&&(ce(t.property_denylist)?a.property_denylist=t.property_blacklist:Ke(t.property_denylist)?a.property_denylist=[...t.property_blacklist,...t.property_denylist]:ae.error(ST+t.property_denylist)),a};class _2{constructor(){this.__forceAllowLocalhost=!1}get Ei(){return this.__forceAllowLocalhost}set Ei(e){ae.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class tr{Mi(e,n){if(e){var i=this.Pi.indexOf(e);i!==-1&&this.Pi.splice(i,1)}return this.Pi.push(n),n.initialize==null||n.initialize(),n}Ri(){return this.config.cookieless_mode===si||this.config.cookieless_mode===zs&&this.consent.isRejected()}get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;
12this.webPerformance=new _2,this.Oi=!1,this.version=cn.LIB_VERSION,this.Li=new Dv,this.Pi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=jS(),this.SentryIntegration=FD,this.sentryIntegration=i=>(function(a,o){var c=iT(a,o);return{name:rT,processEvent:d=>c(d)}})(this,i),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Fi=!1,this.Ai=null,this.Ni=null,this.$i=null,this.scrollManager=new c2(this),this.pageViewManager=new bS(this),this.rateLimiter=new ZD(this),this.requestRouter=new h2(this),this.consent=new UD(this),this.externalIntegrations=new v2(this);var n=(e=tr.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(i,a,o)=>{var c=_t(i)?{[i]:a}:i;this.setPersonProperties(c),o?.({})},set_once:(i,a,o)=>{var c=_t(i)?{[i]:a}:i;this.setPersonProperties(void 0,c),o?.({})}},this.on("eventCaptured",(i=>ae.info('send "'+i?.event+'"',i)))}init(e,n,i){if(i&&i!==io){var a,o=(a=ac[i])!==null&&a!==void 0?a:new tr;return o._init(e,n,i),ac[i]=o,ac[io][i]=o,o}return this._init(e,n,i)}_init(e,n,i){var a,o;if(n===void 0&&(n={}),ce(e)||Cd(e))return ae.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.Di(n.debug),this.qi=n,this.ji=[],n.person_profiles?this.Ni=n.person_profiles:n.process_person&&(this.Ni=n.process_person),this.set_config(Et({},jS(n.defaults),IS(n),{name:i,token:e})),this.config.on_xhr_error&&ae.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:Tr.GZipJS;var c=this.Hi();this.persistence=new xg(this.config,c),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new xg(re({},this.config,{persistence:"sessionStorage"}),c);var d=re({},this.persistence.props),h=re({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Ui=new a2((k=>this.Bi(k)),this.config.request_queue_config),this.zi=new l2(this),this.__request_queue=[];var f=this.Ri();if(f||(this.sessionManager=new PS(this),this.sessionPropsManager=new OS(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(ae.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Vi(f)}),0)):(ae.info("Initializing extensions synchronously"),this.Vi(f)),cn.DEBUG=cn.DEBUG||this.config.debug,cn.DEBUG&&ae.info("Starting in debug mode",{this:this,config:n,thisC:re({},this.config),p:d,s:h}),!this.config.identity_distinct_id||(a=n.bootstrap)!=null&&a.distinctID||(n.bootstrap=re({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((o=n.bootstrap)==null?void 0:o.distinctID)!==void 0){var g=n.bootstrap.distinctID,v=this.get_distinct_id(),y=this.persistence.get_property(ur);if(n.bootstrap.isIdentifiedID&&v!=null&&v!==g&&y===Fa)this.identify(g);else if(n.bootstrap.isIdentifiedID&&v!=null&&v!==g&&y===Ha)ae.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var _=this.config.get_device_id(Ki()),w=n.bootstrap.isIdentifiedID?_:g;this.persistence.set_property(ur,n.bootstrap.isIdentifiedID?Ha:Fa),this.register({distinct_id:g,$device_id:w})}}if(f)this.register_once({distinct_id:ld,$device_id:null},"");else if(!this.get_distinct_id()){var S=this.config.get_device_id(Ki());this.register_once({distinct_id:S,$device_id:S},""),this.persistence.set_property(ur,Fa)}return Lt(V,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(k,x){var C=k.config.segment;if(!C)return x();(function(A,M){var D=A.config.segment;if(!D)return M();var $=I=>{var U=()=>I.anonymousId()||Ki();A.config.get_device_id=U,I.id()&&(A.register({distinct_id:I.id(),$device_id:U()}),A.persistence.set_property(ur,Ha)),M()},L=D.user();"then"in L&&ii(L.then)?L.then($):$(L)})(k,(()=>{C.register((A=>{Promise&&Promise.resolve||kg.warn("This browser does not have Promise support, and can not use the segment integration");var M=(D,$)=>{if(!$)return D;D.event.userId||D.event.anonymousId===A.get_distinct_id()||(kg.info("No userId set, resetting PostHog"),A.reset()),D.event.userId&&D.event.userId!==A.get_distinct_id()&&(kg.info("UserId set, identifying with PostHog"),A.identify(D.event.userId)
12);var L=A.calculateEventProperties($,D.event.properties);return D.event.properties=Object.assign({},L,D.event.properties),D};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:D=>M(D,D.event.event),page:D=>M(D,ro),identify:D=>M(D,Sg),screen:D=>M(D,"$screen")}})(k)).then((()=>{x()}))}))})(this,(()=>this.Wi())):this.Wi(),ii(this.config._onCapture)&&this.config._onCapture!==qm&&(ae.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(k=>this.config._onCapture(k.event,k)))),this.config.ip&&ae.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Vi(e){var n,i,a,o,c,d,h,f=performance.now(),g=re({},tr.__defaultExtensionClasses,this.config.__extensionClasses),v=[];g.featureFlags&&this.Pi.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new g.featureFlags(this)),g.exceptions&&this.Pi.push(this.exceptions=(i=this.exceptions)!==null&&i!==void 0?i:new g.exceptions(this)),g.historyAutocapture&&this.Pi.push(this.historyAutocapture=new g.historyAutocapture(this)),g.tracingHeaders&&this.Pi.push(new g.tracingHeaders(this)),g.siteApps&&this.Pi.push(this.siteApps=new g.siteApps(this)),g.sessionRecording&&!e&&this.Pi.push(this.sessionRecording=new g.sessionRecording(this)),this.config.disable_scroll_properties||v.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),g.autocapture&&this.Pi.push(this.autocapture=new g.autocapture(this)),g.surveys&&this.Pi.push(this.surveys=(a=this.surveys)!==null&&a!==void 0?a:new g.surveys(this)),g.logs&&this.Pi.push(this.logs=(o=this.logs)!==null&&o!==void 0?o:new g.logs(this)),g.conversations&&this.Pi.push(this.conversations=(c=this.conversations)!==null&&c!==void 0?c:new g.conversations(this)),g.productTours&&this.Pi.push(this.productTours=new g.productTours(this)),g.heatmaps&&this.Pi.push(this.heatmaps=new g.heatmaps(this)),g.webVitalsAutocapture&&this.Pi.push(this.webVitalsAutocapture=new g.webVitalsAutocapture(this)),g.exceptionObserver&&this.Pi.push(this.exceptionObserver=new g.exceptionObserver(this)),g.deadClicksAutocapture&&this.Pi.push(this.deadClicksAutocapture=new g.deadClicksAutocapture(this,qD)),g.toolbar&&this.Pi.push(this.toolbar=(d=this.toolbar)!==null&&d!==void 0?d:new g.toolbar(this)),g.experiments&&this.Pi.push(this.experiments=(h=this.experiments)!==null&&h!==void 0?h:new g.experiments(this)),this.Pi.forEach((y=>{y.initialize&&v.push((()=>{y.initialize==null||y.initialize()}))})),v.push((()=>{if(this.Zi){var y=this.Zi;this.Zi=void 0,this.Rr(y)}})),this.Gi(v,f)}Gi(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout((()=>{this.Gi(e,n)}),0);var i=e.shift();if(i)try{i()}catch(o){ae.error("Error initializing extension:",o)}}var a=Math.round(performance.now()-n);this.register_for_session({[Xx]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[Qx]:a}),this.config.__preview_deferred_init_extensions&&ae.info("PostHog extensions initialized ("+a+"ms)")}Rr(e){var n;if(!oe||!oe.body)return ae.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Rr(e)}),500);this.config.__preview_deferred_init_extensions&&(this.Zi=e),this.Qi=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Be(e.supportedCompression,Tr.GZipJS)?Tr.GZipJS:Be(e.supportedCompression,Tr.Base64)?Tr.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Ni?this.Ni:Nm}),this.Pi.forEach((i=>i.onRemoteConfig==null?void 0:i.onRemoteConfig(e)))}Wi(){try{this.config.loaded(this)}catch(i){ae.critical("`loaded` function failed",i)}if(this.Ji(),this.config.internal_or_test_user_hostname&&Xt!=null&&Xt.hostname){var e=Xt.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?e===n:n.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ri())&&this.Ki()}),1),this.Yi=new hT(this),this.Yi.load()}Ji(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Ui)==null||e.enable())}_dom_loaded(){this.is_capturing()&&cd(this.__request_queue,(e=>this.Bi(e))),this.__request_queue=[],this.Ji()}_handle_unload(){var e,n,i,a;(e=this.surveys)==null||e.handlePageUnload(),this.config.request_batching?(this.Xi()&&this.capture(wg),(n=this.logs)==null||n.flushLogs("sendBeacon"),(i=this.Ui)==null||i.unload(),(a=this.zi)==null||a.unload()):this.Xi()&&this.capture(wg,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(ET?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Oh(e.url,{ip:this.config.ip?1:0}),e.headers=re({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,
12(n=>{var i,a,o,c=re({},n);c.timeout=c.timeout||6e4,c.url=CS(c.url,c.compression);var d=(i=c.transport)!==null&&i!==void 0?i:"fetch",h=Nd.filter((g=>!c.disableTransport||!g.transport||!c.disableTransport.includes(g.transport))),f=(a=(o=(function(g,v){for(var y=0;g.length>y;y++)if(g[y].transport===d)return g[y]})(h))==null?void 0:o.method)!==null&&a!==void 0?a:h[0].method;if(!f)throw new Error("No available transport method");d!=="sendBeacon"&&c.data&&c.compression===Tr.GZipJS&&qN&&!Ld?s2(c).then((g=>{f(g)})).catch((g=>{if(lS(g))return Ld=!0,void f(re({},c,{compression:void 0,url:CS(n.url,void 0)}));(v=>{if(!v||typeof v!="object")return!1;var y="name"in v?String(v.name):"";return lS(v)||y===wx})(g)&&(Ld=!0),f(c)})):f(c)})(re({},e,{callback:n=>{var i,a;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(i=(a=this.config).on_request_error)==null||i.call(a,n),e.callback==null||e.callback(n)}}))))}Bi(e){this.zi?this.zi.retriableRequest(e):this._send_request(e)}_execute_array(e){Mg++;try{var n,i=[],a=[],o=[];cd(e,(d=>{if(d)if(Ke(n=d[0]))o.push(d);else if(ii(d))try{d.call(this)}catch(h){ae.error("Error executing queued PostHog call",d,h)}else Ke(d)&&n==="alias"?i.push(d):Ke(d)&&n.indexOf("capture")!==-1&&ii(this[n])?o.push(d):a.push(d)}));var c=function(d,h){cd(d,(function(f){try{if(Ke(f[0])){var g=h;ft(f,(function(v){g=g[v[0]].apply(g,v.slice(1))}))}else h[f[0]].apply(h,f.slice(1))}catch(v){ae.error("Error executing queued PostHog call",f,v)}}))};c(i,this),c(a,this),c(o,this)}finally{Mg--}}push(e){if(Mg>0&&Ke(e)&&_t(e[0])){var n=tr.prototype[e[0]];ii(n)&&n.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,n,i){var a,o,c,d,h;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ui){if(this.is_capturing())if(!ce(e)&&_t(e)){var f=!this.config.opt_out_useragent_filter&&this._is_bot();if(!f||this.config.__preview_capture_bot_pageviews){var g=i!=null&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(g==null||!g.isRateLimited){n!=null&&n.$current_url&&!_t(n?.$current_url)&&(ae.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),e!=="$exception"||i!=null&&i.en||ae.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var v=new Date,y=i?.timestamp||v,_=i?.uuid||Ki(),w={uuid:_,event:e,properties:this.calculateEventProperties(e,n||{},y,_)};e===ro&&this.config.__preview_capture_bot_pageviews&&f&&(w.event="$bot_pageview",w.properties.$browser_type="bot"),g&&(w.properties.$lib_rate_limit_remaining_tokens=g.remainingTokens),i?.$set&&(w.$set=i?.$set);var S,k,x,C=this.tn(i?.$set_once,e!==mS,e===Sg);if(C&&(w.$set_once=C),i!=null&&i._noTruncate||(o=this.config.properties_string_max_length,c=w,d=U=>_t(U)?U.slice(0,o):U,h=new Set,w=(function U(X,Q){return X!==Object(X)?d?d(X):X:h.has(X)?void 0:(h.add(X),Ke(X)?(te=[],cd(X,(_e=>{te.push(U(_e))}))):(te={},ft(X,((_e,pe)=>{h.has(_e)||(te[pe]=U(_e))}))),te);var te})(c)),w.timestamp=y,ce(i?.timestamp)||(w.properties.$event_time_override_provided=!0,w.properties.$event_time_override_system_time=v),e===Xl.DISMISSED||e===Xl.SENT){var A=n?.[Rg.SURVEY_ID],M=n?.[Rg.SURVEY_ITERATION];(U=>{try{var X=(Q=>((te,_e)=>{var pe=""+Bm+_e.id;return _e.current_iteration&&_e.current_iteration>0&&(pe=""+Bm+_e.id+"_"+_e.current_iteration),pe})(0,Q))(U);if(localStorage.getItem(X))return;localStorage.setItem(X,"true")}catch(Q){at.error("Failed to persist survey seen state",Q)}})({id:A,current_iteration:M}),w.$set=re({},w.$set,{[(S={id:A,current_iteration:M},k=e===Xl.SENT?"responded":"dismissed",x="$survey_"+k+"/"+S.id,S.current_iteration&&S.current_iteration>0&&(x="$survey_"+k+"/"+S.id+"/"+S.current_iteration),x)]:!0})}else e===Xl.SHOWN&&(w.$set=re({},w.$set,{[Rg.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===JD.SHOWN){var D=n?.[SS.TOUR_TYPE];D&&(w.$set=re({},w.$set,{[SS.TOUR_LAST_SEEN_DATE+"/"+D]:new Date().toISOString()}))}var $=re({},w.properties.$set,w.$set);if(ho($)||this.setPersonPropertiesForFlags($),!qe(this.config.before_send)){var L=this.rn(w);if(!L)return;w=L}this.Li.emit("eventCaptured",w);var I={method:"POST",url:(a=i?._url)!==null&&a!==void 0?a:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:w,compression:"best-available",batchKey:i?._batchKey};return!this.config.request_batching||i&&(i==null||!i._batchKey)||i!=null&&i.send_instantly?this.Bi(I):this.Ui.enqueue(I),w}ae.critical("This capture call is ignored due to client rate limiting.")}}else ae.error("No event name provided to posthog.capture")}else ae.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,i,a,o){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return n;var c=o?void 0:this.persistence.remove_event_timer(e),d=re({},n);if(d.token=this.config.token,d.$config_defaults=this.config.defaults,this.Ri()&&(d.$cookieless_mode=!0),e==="$snapshot"){var h=re({},this.persistence.properties(),this.sessionPersistence.properties());return d.distinct_id=h.distinct_id,(!_t(d.distinct_id)&&!rr(d.distinct_id)||Cd(d.distinct_id))&&ae.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),d}var f,g=(function(x,C){var A,M,D,$;if(!Sn)return{};var L,I,U,X,Q,te,_e,pe,Ne=x?[...Oo,...C||[]]:[],[H,Z]=(function(ue){for(var Ee=0;hS.length>Ee;Ee++){var[Me,P]=hS[Ee],K=Me.exec(ue),ee=K&&(ii(P)?P(K,ue):P);if(ee)return ee}return["",""]})(Sn);return Et(Mv({$os:H,$os_version:Z,$browser:Ux(Sn,navigator.vendor),$device:fS(Sn),$device_type:(I=Sn,U={userAgentDataPlatform:(A=navigator)==null||(A=A.userAgentData)==null?void 0:A.platform,maxTouchPoints:(M=navigator)==null?void 0:M.maxTouchPoints,screenWidth:V==null||(D=V.screen)==null?void 0:D.width,screenHeight:V==null||($=V.screen)==null?void 0:$.height,devicePixelRatio:V?.devicePixelRatio},pe=fS(I),pe===Tx||pe===xx||pe==="Kobo"||pe==="Kindle Fire"||pe===zx?Ro:pe===bc||pe===bo||pe===wc||pe===hm?"Console":pe===Ax?"Wearable":pe?zn:U?.userAgentDataPlatform==="Android"&&((X=U?.maxTouchPoints)!==null&&X!==void 0?X:0)>0?600>Math.min((Q=U?.screenWidth)!==null&&Q!==void 0?Q:0,(te=U?.screenHeight)!==null&&te!==void 0?te:0)/((_e=U?.devicePixelRatio)!==null&&_e!==void 0?_e:1)?zn:Ro:"Desktop"),$timezone:dT(),$timezone_offset:KD()}),{$current_url:Ec(Xt?.href,Ne,kc),$host:Xt?.host,$pathname:Xt?.pathname,$raw_user_agent:Sn.length>1e3?Sn.substring(0,997)+"...":Sn,$browser_version:sD(Sn,navigator.vendor),$browser_language:wS(),$browser_language_prefix:(L=wS(),typeof L=="string"?L.split("-")[0]:void 0),$screen_height:V?.screen.height,$screen_width:V?.screen.width,$viewport_height:V?.innerHe
12ight,$viewport_width:V?.innerWidth,$lib:cn.LIB_NAME,$lib_version:cn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:v,windowId:y}=this.sessionManager.checkAndGetSessionAndWindowId(o,i.getTime());d.$session_id=v,d.$window_id=y}this.sessionPropsManager&&Et(d,this.sessionPropsManager.getSessionProps());try{var _;this.sessionRecording&&Et(d,this.sessionRecording.sdkDebugProperties),d.$sdk_debug_retry_queue_size=(_=this.zi)==null?void 0:_.length}catch(x){d.$sdk_debug_error_capturing_properties=String(x)}if(this.requestRouter.region===Um&&(d.$lib_custom_api_host=this.config.api_host),f=e!==ro||o?e!==wg||o?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,a),d=Et(d,f),e===ro&&oe&&(d.title=oe.title),!ce(c)){var w=i.getTime()-c;d.$duration=parseFloat((w/1e3).toFixed(3))}Sn&&this.config.opt_out_useragent_filter&&(d.$browser_type=this._is_bot()?"bot":"browser"),(d=Et({},g,this.persistence.properties(),this.sessionPersistence.properties(),d)).$is_identified=this._isIdentified(),Ke(this.config.property_denylist)?ft(this.config.property_denylist,(function(x){delete d[x]})):ae.error(ST+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var S=this.config.sanitize_properties;S&&(ae.error(DS),d=S(d,e));var k=this.nn();return d.$process_person_profile=k,k&&!o&&this.sn("_calculate_event_properties"),d}tn(e,n,i){var a;if(n===void 0&&(n=!0),i===void 0&&(i=!1),!this.persistence||!this.nn()||this.Oi&&!i)return e;var o=this.persistence.get_initial_props(),c=(a=this.sessionPropsManager)==null?void 0:a.getSetOnceProps(),d=Et({},o,c||{},e||{}),h=this.config.sanitize_properties;return h&&(ae.error(DS),d=h(d,"$set_once")),n&&(this.Oi=!0),ho(d)?void 0:d}register(e,n){var i;(i=this.persistence)==null||i.register(e,n)}register_once(e,n,i){var a;(a=this.persistence)==null||a.register_once(e,n,i)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}an(e,n){this.register({[e]:n})}getFeatureFlag(e,n){var i;return(i=this.featureFlags)==null?void 0:i.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var i;return(i=this.featureFlags)==null?void 0:i.getFeatureFlagResult(e,n)}isFeatureEnabled(e,n){var i;return(i=this.featureFlags)==null?void 0:i.isFeatureEnabled(e,n)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,i){var a;(a=this.featureFlags)==null||a.updateFlags(e,n,i)}updateEarlyAccessFeatureEnrollment(e,n,i){var a;(a=this.featureFlags)==null||a.updateEarlyAccessFeatureEnrollment(e,n,i)}getEarlyAccessFeatures(e,n,i){var a;return n===void 0&&(n=!1),(a=this.featureFlags)==null?void 0:a.getEarlyAccessFeatures(e,n,i)}on(e,n){return this.Li.on(e,n)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:Ul}),()=>{})}onSessionId(e){var n,i;return(n=(i=this.sessionManager)==null?void 0:i.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(e,n):e([],{isLoaded:!1,error:Ul})}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:Ul})}renderSurvey(e,n){var i;(i=this.surveys)==null||i.renderSurvey(e,n)}displaySurvey(e,n){var i;n===void 0&&(n=p2),(i=this.surveys)==null||i.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)==null||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,i;return(n=(i=this.surveys)==null?void 0:i.canRenderSurvey(e))!==null&&n!==void 0?n:{visible:!1,disabledReason:Ul}}canRenderSurveyAsync(e,n){var i,a;return n===void 0&&(n=!1),(i=(a=this.surveys)==null?void 0:a.canRenderSurveyAsync(e,n))!==null&&i!==void 0?i:Promise.resolve({visible:!1,disabledReason:Ul})}un(e){return!e||Cd(e)?(ae.critical("Unique user id has not been set in posthog.identify"),!1):e===ld?(ae.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(ae.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
12ot a hardcoded string.'),!1)}identify(e,n,i){if(!this.__loaded||!this.persistence)return ae.uninitializedWarning("posthog.identify");if(rr(e)&&(e=e.toString(),ae.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.un(e)&&this.sn("posthog.identify")){var a=this.get_distinct_id();this.register({$user_id:e}),this.get_property(Qd)||this.register_once({$had_persisted_distinct_id:!0,$device_id:a},""),e!==a&&e!==this.get_property(Yl)&&(this.unregister(Yl),this.register({distinct_id:e}));var o,c=(this.persistence.get_property(ur)||Fa)===Fa;e!==a&&c?(this.persistence.set_property(ur,Ha),this.setPersonPropertiesForFlags({$set:n||{},$set_once:i||{}},!1),this.capture(Sg,{distinct_id:e,$anon_distinct_id:a},{$set:n||{},$set_once:i||{}}),this.$i=MS(e,n,i),(o=this.featureFlags)==null||o.setAnonymousDistinctId(a)):(n||i)&&this.setPersonProperties(n,i),e!==a&&(this.reloadFeatureFlags(),this.unregister(ic))}}setPersonProperties(e,n){if((e||n)&&this.sn("posthog.setPersonProperties")){var i=MS(this.get_distinct_id(),e,n);this.$i!==i?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.$i=i):ae.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,n,i){if(e&&n){var a=this.getGroups(),o=a[e]!==n;if(o&&this.resetGroupPropertiesForFlags(e),this.register({$groups:re({},a,{[e]:n})}),o||i){var c={$group_type:e,$group_key:n};i&&(c.$group_set=i),this.capture(mS,c)}i&&this.setGroupPropertiesForFlags({[e]:i}),o&&!i&&this.reloadFeatureFlags()}else ae.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){var i;n===void 0&&(n=!0),(i=this.featureFlags)==null||i.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(){var e;(e=this.featureFlags)==null||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,n){var i;n===void 0&&(n=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((i=this.featureFlags)==null||i.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(e)}reset(e){var n,i,a,o,c,d,h,f;if(ae.info("reset"),!this.__loaded)return ae.uninitializedWarning("posthog.reset");var g=this.get_property(Qd);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(i=this.sessionPersistence)==null||i.clear(),(a=this.surveys)==null||a.reset(),(o=this.Yi)==null||o.stop(),(c=this.featureFlags)==null||c.reset(),(d=this.conversations)==null||d.reset(),(h=this.persistence)==null||h.set_property(ur,Fa),(f=this.sessionManager)==null||f.resetSessionId(),this.$i=null,this.config.cookieless_mode===si)this.register_once({distinct_id:ld,$device_id:null},"");else{var v=this.config.get_device_id(Ki());this.register_once({distinct_id:v,$device_id:e?v:g},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,n){var i;this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(i=this.conversations)==null||i.ln()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),a=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&i){var o,c=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!i)return a;a+="?t="+Math.max(Math.floor((new Date().getTime()-i)/1e3)-c,0)}return a}alias(e,n){return e===this.get_property(Gx)?(ae.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(ce(n)&&(n=this.get_distinct_id()),e!==n?(this.an(Yl,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(ae.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=re({},this.config);if(Tt(e)){var i,a,o,c,d,h,f,g,v,y;Et(this.config,IS(e));var _=this.Hi();(i=this.persistence)==null||i.update_config(this.config,n,_),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new xg(re({},this.config,{persistence:"sessionStorage"}),_);var w=this.Di(this.config.debug);Cr(w)&&(this.config.debug=w),Cr(this.config.debug)&&(this.config.debug?(cn.DEBUG=!0,yt.R()&&yt.N("ph_debug",!0),ae.info("set_config",{config:e,oldConfig:n,newConfig:re({},this.config)})):(cn.DEBUG=!1,yt.R()&&yt.q("ph_debug"))),(a=this.exceptionObserver)==null||a.onConfigChange(),(o=this.exceptions)==null||o.onConfigChange(),(c=this.sessionRecording)==null||c.startIfEnabledOrStop(),(d=this.autocapture)==null||d.startIfEnabled(),(h=this.heatmaps)==null||h.startIfEnabled(),(f=this.exceptionObserver)==null||f.startIfEnabledOrStop(),(g=this.deadClicksAutocapture)==null||g.startIfEnabledOrStop(),(v=this.surveys)==null||v.loadIfEnabled(),this.cn(),(y=this.externalIntegrations)==null||y.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){cn.LIB_NAME=e,cn.LIB_VERSION=n}startSessionRecording(e){var n,i,a,o,c,d=e===!0,h={sampling:d||!(e==null||!e.sampling),linked_flag:d||!(e==null||!e.linked_flag),url_trigger:d||!(e==null||!e.url_trigger),event_trigger:d||!(e==null||!e.event_trigger)};Object.values(h).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),h.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),h.linked_flag&&((a=this.sessionRecording)==null||a.overrideLinkedFlag()),h.url_trigger&&((o=this.sessionRecording)==null||o.overrideTrigger("url")),h.event_trigger&&((c=this.sessionRecording)==null||c.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){if(this.exceptions){var i=new Error("PostHog syntheticException"),a=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(re({},a,n))}}addExceptionStep(e,n){var i;(i=this.exceptions)==null||i.addExceptionStep(e,n)}captureLog(e){var n;(n=this.logs)==null||n.captureLog(e)}get logger(){var e,n;return(e=(n=this.logs)==null?void 0:n.logger)!==null&&e!==void 0?e:tr.dn}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,i;return(n=(i=this.toolbar)==null?void 0:i.loadToolbar(e))!==null&&n!==void 0&&n}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:io;return n!==io&&(n=io+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(ur))===Ha||((n=this.sessionPersistence)==null?void 0:n.get_property(ur))===Ha}nn(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===Nm&&!this._isIdentified()&&ho(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[Yl])&&((n=this.persistence)==null||(n=n.props)==null||!n[rh]))}Xi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(e){return this.config.person_profiles==="never"?(ae.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(rh,!0),!0)}Hi(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==zs)}cn(){var e,n,i,a,o=this.Hi();return((e=this.persistence)==null?void 0:e._r)!==o&&((i=this.persistence)==null||i.set_disabled(o)),((n=this.sessionPersistence)==null?void 0:n._r)!==o&&((a=this.sessionPersistence)==null||a.set_disabled(o)),o}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==si){if(this.Ri()){var i,a,o,c,d;this.reset(!0),(i=this.sessionManager)==null||i.destroy(),(a=this.pageViewM
12anager)==null||a.destroy(),this.sessionManager=new PS(this),this.pageViewManager=new bS(this),this.persistence&&(this.sessionPropsManager=new OS(this,this.sessionManager,this.persistence));var h,f=(o=(c=this.config.__extensionClasses)==null?void 0:c.sessionRecording)!==null&&o!==void 0?o:(d=tr.__defaultExtensionClasses)==null?void 0:d.sessionRecording;f&&(this.sessionRecording=this.Mi(this.sessionRecording,new f(this)),this.Qi&&((h=this.sessionRecording)==null||h.onRemoteConfig==null||h.onRemoteConfig(this.Qi)))}var g,v;this.consent.optInOut(!0),this.cn(),this.Ji(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==zs&&((g=this.surveys)==null||g.loadIfEnabled()),(ce(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((v=e?.captureEventName)!==null&&v!==void 0?v:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ki()}else ae.warn(NS)}opt_out_capturing(){var e,n,i;this.config.cookieless_mode!==si?(this.config.cookieless_mode===zs&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===zs&&(this.register({distinct_id:ld,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(i=this.pageViewManager)==null||i.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.Ki())):ae.warn(NS)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?"granted":e===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===si||(this.config.cookieless_mode===zs?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return $n?_T($n,this.config.custom_blocked_useragents):void 0}Ki(){oe&&(oe.visibilityState==="visible"?this.Fi||(this.Fi=!0,this.capture(ro,{title:oe.title},{send_instantly:!0}),this.Ai&&(oe.removeEventListener(ih,this.Ai),this.Ai=null)):this.Ai||(this.Ai=this.Ki.bind(this),Lt(oe,ih,this.Ai)))}debug(e){e===!1?(V?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(V?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Lr(){var e,n,i,a,o,c,d=this.qi||{};return"advanced_disable_flags"in d?!!d.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(ae.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(i="advanced_disable_decide",a=ae,o=(n="advanced_disable_flags")in(e=d)&&!qe(e[n]),c=i in e&&!qe(e[i]),o?e[n]:!!c&&(a&&a.warn("Config field '"+i+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[i]))}rn(e){if(qe(this.config.before_send))return e;var n=Ke(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var a of n){if(i=a(i),qe(i)){var o="Event '"+e.event+"' was rejected in beforeSend function";return YN(e.event)?ae.warn(o+". This can cause unexpected behavior."):ae.info(o),null}i.properties&&!ho(i.properties)||ae.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return(e=this.pageViewManager.dr)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(i)})}Di(e){var n=Cr(e)&&!e,i=yt.R()&&yt.A("ph_debug")==="true";return!n&&(!!i||e)}}tr.__defaultExtensionClasses={},tr.dn={trace:Ga=()=>{},debug:Ga,info:Ga,warn:Ga,error:Ga,fatal:Ga},(function(t,e){for(var n=0;e.length>n;n++)t.prototype[e[n]]=PD(t.prototype[e[n]])})(tr,["identify"]);var b2=1,w2=3,S2=11;function $S(t){return t instanceof Element&&(t.id===Zx||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function Xs(t){return!!t&&t.nodeType===b2}function mr(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function kT(t){return!!t&&t.nodeType===w2}function xT(t){return!!t&&t.nodeType===S2&&Xs(t.host)}function jv(t){return t?Ah(t).split(/\s+/):[]}function zS(t){var e=V?.location.href;return!!(e&&t&&t.some((n=>e.match(n))))}function hh(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return jv(e)}function TT(t){return qe(t)?null:Ah(t).split(/(\s+)/).filter((e=>oc(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function xc(t){var e="";return Hm(t)&&!AT(t)&&t.childNodes&&t.childNodes.length&&ft(t.childNodes,(function(n){var i;kT(n)&&n.textContent&&(e+=(i=TT(n.textContent))!==null&&i!==void 0?i:"")})),Ah(e)}function US(t){return ce(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var Iv=["a","button","form","input","select","textarea","label"];function BS(t,e){if(ce(e))return!0;
12var n,i=function(o){if(e.some((c=>o.matches(c))))return{v:!0}};for(var a of t)if(n=i(a))return n.v;return!1}function RT(t){var e=t.parentNode;return!(!e||!Xs(e))&&e}var E2=["next","previous","prev",">","<"],qS=[".ph-no-rageclick",".ph-no-capture"],Fm=t=>!t||mr(t,"html")||!Xs(t),FS=(t,e)=>{if(!V||Fm(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,i=[t],a=t;a.parentNode&&!mr(a,"body");)if(xT(a.parentNode))i.push(a.parentNode.host),a=a.parentNode.host;else{var o=RT(a);if(!o)break;if(e||Iv.indexOf(o.tagName.toLowerCase())>-1)n=!0;else{var c=V.getComputedStyle(o);c&&c.getPropertyValue("cursor")==="pointer"&&(n=!0)}i.push(o),a=o}return{parentIsUsefulElement:n,targetElementList:i}};function Hm(t){for(var e=t;e.parentNode&&!mr(e,"body");e=e.parentNode){var n=hh(e);if(Be(n,"ph-sensitive")||Be(n,"ph-no-capture"))return!1}if(Be(hh(t),"ph-include"))return!0;var i=t.type||"";if(_t(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var a=t.name||t.id||"";return!_t(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function AT(t){return!!(mr(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||mr(t,"select")||mr(t,"textarea")||t.getAttribute("contenteditable")==="true")}var CT="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",k2=new RegExp("^(?:"+CT+")$"),x2=new RegExp(CT),OT="\\d{3}-?\\d{2}-?\\d{4}",T2=new RegExp("^("+OT+")$"),R2=new RegExp("("+OT+")");function oc(t,e){return e===void 0&&(e=!0),!(qe(t)||_t(t)&&(t=Ah(t),(e?k2:x2).test((t||"").replace(/[- ]/g,""))||(e?T2:R2).test(t)))}function HS(t){var e=xc(t);return oc(e=(e+" "+PT(t)).trim())?e:""}function PT(t){var e="";return t&&t.childNodes&&t.childNodes.length&&ft(t.childNodes,(function(n){var i;if(n&&((i=n.tagName)==null?void 0:i.toLowerCase())==="span")try{var a=xc(n);e=(e+" "+a).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+PT(n)).trim())}catch(o){ae.error("[AutoCapture]",o)}})),e}function VS(t){return t.replace(/"|\\"/g,'\\"')}function A2(t){var e=t.attr__class;return e?Ke(e)?e:jv(e):void 0}class GS{constructor(e){this.disabled=e===!1;var n=Tt(e)?e:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(e,n,i){if(this.disabled)return!1;var a=this.clicks[this.clicks.length-1];if(a&&Math.abs(e-a.x)+Math.abs(n-a.y)<this.thresholdPx&&this.timeoutMs>i-a.timestamp){if(this.clicks.push({x:e,y:n,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:n,timestamp:i}];return!1}}var Lg="$copy_autocapture",Ng=vt("[AutoCapture]");function Dg(t,e){return e.length>t?e.slice(0,t)+"...":e}function C2(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!Xs(e));return e}function O2(t,e){var n,i,{e:a,maskAllElementAttributes:o,maskAllText:c,elementAttributeIgnoreList:d,elementsC
12hainAsString:h}=e;if(!Xs(t))return{props:{}};for(var f=[t],g=t;g.parentNode&&!mr(g,"body");)if(xT(g.parentNode))f.push(g.parentNode.host),g=g.parentNode.host;else{if(!Xs(g.parentNode))break;f.push(g.parentNode),g=g.parentNode}var v,y,_=[],w={},S=!1,k=!1;if(ft(f,(D=>{var $=Hm(D);if(mr(D,"a")){var L=D.getAttribute("href");S=$&&!!L&&oc(L)&&L}Be(hh(D),"ph-no-capture")&&(k=!0),_.push((function(U,X,Q,te){var _e=U.tagName.toLowerCase(),pe={tag_name:_e};Iv.indexOf(_e)>-1&&!Q&&(pe.$el_text=_e.toLowerCase()==="a"||_e.toLowerCase()==="button"?Dg(1024,HS(U)):Dg(1024,xc(U)));var Ne=hh(U);Ne.length>0&&(pe.classes=Ne.filter((function(Ee){return Ee!==""}))),ft(U.attributes,(function(Ee){var Me;if((!AT(U)||["name","id","class","aria-label"].indexOf(Ee.name)!==-1)&&(te==null||!te.includes(Ee.name))&&!X&&oc(Ee.value)&&(!_t(Me=Ee.name)||Me.substring(0,10)!=="_ngcontent"&&Me.substring(0,7)!=="_nghost")){var P=Ee.value;Ee.name==="class"&&(P=jv(P).join(" ")),pe["attr__"+Ee.name]=Dg(1024,P)}}));for(var H=1,Z=1,ue=U;ue=C2(ue);)H++,ue.tagName===U.tagName&&Z++;return pe.nth_child=H,pe.nth_of_type=Z,pe})(D,o,c,d));var I=(function(U){if(!Hm(U))return{};var X={};return ft(U.attributes,(function(Q){if(Q.name&&Q.name.indexOf("data-ph-capture-attribute")===0){var te=Q.name.replace("data-ph-capture-attribute-",""),_e=Q.value;te&&_e&&oc(_e)&&(X[te]=_e)}})),X})(D);Et(w,I)})),k)return{props:{},explicitNoCapture:k};if(c||(_[0].$el_text=mr(t,"a")||mr(t,"button")?HS(t):xc(t)),S){var x,C;_[0].attr__href=S;var A=(x=oh(S))==null?void 0:x.host,M=V==null||(C=V.location)==null?void 0:C.host;A&&M&&A!==M&&(v=S)}return{props:Et({$event_type:a.type,$ce_version:1},h?{}:{$elements:_},{$elements_chain:(y=_,(function(D){return D.map(($=>{var L,I,U="";if($.tag_name&&(U+=$.tag_name),$.attr_class)for(var X of($.attr_class.sort(),$.attr_class))U+="."+X.replace(/"/g,"");var Q=re({},$.text?{text:$.text}:{},{"nth-child":(L=$.nth_child)!==null&&L!==void 0?L:0,"nth-of-type":(I=$.nth_of_type)!==null&&I!==void 0?I:0},$.href?{href:$.href}:{},$.attr_id?{attr_id:$.attr_id}:{},$.attributes),te={};return Md(Q).sort(((_e,pe)=>{var[Ne]=_e,[H]=pe;return Ne.localeCompare(H)})).forEach((_e=>{var[pe,Ne]=_e;return te[VS(pe.toString())]=VS(Ne.toString())})),(U+=":")+Md(te).map((_e=>{var[pe,Ne]=_e;return pe+'="'+Ne+'"'})).join("")})).join(";")})((function(D){return D.map(($=>{var L,I,U={text:(L=$.$el_text)==null?void 0:L.slice(0,400),tag_name:$.tag_name,href:(I=$.attr__href)==null?void 0:I.slice(0,2048),attr_class:A2($),attr_id:$.attr__id,nth_child:$.nth_child,nth_of_type:$.nth_of_type,attributes:{}};return Md($).filter((X=>{var[Q]=X;return Q.indexOf("attr__")===0})).forEach((X=>{var[Q,te]=X;return U.attributes[Q]=te})),U}))})(y)))},(n=_[0])!=null&&n.$el_text?{$el_text:(i=_[0])==null?void 0:i.$el_text}:{},v&&a.type==="click"?{$external_click_url:v}:{},w)}}var Bl=vt("[ExceptionAutocapture]");function YS(t,e,n){try{if(!(e in t))return()=>{};var i=t[e],a=n(i);return ii(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=a,()=>{t[e]=i}}catch{return()=>{}}}var P2=vt("[TracingHeaders]"),qi=vt("[Web Vitals]"),KS=9e5,WS="disabled",JS="lazy_loading",ql="awaiting_config",pd="missing_config";vt("[SessionRecording]"),vt("[SessionRecording]");var Vm="[SessionRecording]",Xr=vt(Vm),M2=vt("[Heatmaps]");function ZS(t){return Tt(t)&&"clientX"in t&&"clientY"in t&&rr(t.clientX)&&rr(t.clientY)}var XS=vt("[Product Tours]"),L2=["$set_once","$set"],Fi=vt("[SiteApps]"),QS="Error while initializing PostHog app with config id ";function Ya(t,e,n){if(qe(t))return!1;switch(n){case"exact":return t===e;case"contains":var i=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(i,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}class N2{constructor(e){this.vn=new Dv,this.fn=(n,i)=>this.pn(n,i)&&this.gn(n,i)&&this.mn(n,i)&&this.yn(n,i),this.pn=(n,i)=>i==null||!i.event||n?.event===i?.event,this._instance=e,this.bn=new Set,this._n=new Set}init(){var e,n;ce((e=this._instance)==null?void 0:e._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((i,a)=>{this.on(i,a)}))}register(e){var n,i;if(!ce((n=this._instance)==null?void 0:n._addCaptureHook)&&(e.forEach((c=>{var d,h;(d=this._n)==null||d.add(c),(h=c.steps)==null||h.forEach((f=>{var g;(g=this.bn)==null||g.add(f?.event||"")}))})),(i=this._instance)!=null&&i.autocapture)){var a,o=new Set;e.forEach((c=>{var d;(d=c.steps)==null||d.forEach((h=>{h!=null&&h.selector&&o.add(h?.selector)}))}
12)),(a=this._instance)==null||a.autocapture.setElementSelectors(o)}}on(e,n){var i;n!=null&&e.length!=0&&(this.bn.has(e)||this.bn.has(n?.event))&&this._n&&((i=this._n)==null?void 0:i.size)>0&&this._n.forEach((a=>{this.wn(n,a)&&this.vn.emit("actionCaptured",a.name)}))}xn(e){this.onAction("actionCaptured",(n=>e(n)))}wn(e,n){if(n?.steps==null)return!1;for(var i of n.steps)if(this.fn(e,i))return!0;return!1}onAction(e,n){return this.vn.on(e,n)}gn(e,n){if(n!=null&&n.url){var i,a=e==null||(i=e.properties)==null?void 0:i.$current_url;if(!a||typeof a!="string"||!Ya(a,n.url,n.url_matching||"contains"))return!1}return!0}mn(e,n){return!!this.Sn(e,n)&&!!this.kn(e,n)&&!!this.Cn(e,n)}Sn(e,n){var i;if(n==null||!n.href)return!0;var a=this.In(e);if(a.length>0)return a.some((d=>Ya(d.href,n.href,n.href_matching||"exact")));var o,c=(e==null||(i=e.properties)==null?void 0:i.$elements_chain)||"";return!!c&&Ya((o=c.match(/(?::|")href="(.*?)"/))?o[1]:"",n.href,n.href_matching||"exact")}kn(e,n){var i;if(n==null||!n.text)return!0;var a=this.In(e);if(a.length>0)return a.some((f=>Ya(f.text,n.text,n.text_matching||"exact")||Ya(f.$el_text,n.text,n.text_matching||"exact")));var o,c,d,h=(e==null||(i=e.properties)==null?void 0:i.$elements_chain)||"";return!!h&&(o=(function(f){for(var g,v=[],y=/(?::|")text="(.*?)"/g;!qe(g=y.exec(f));)v.includes(g[1])||v.push(g[1]);return v})(h),c=n.text,d=n.text_matching||"exact",o.some((f=>Ya(f,c,d))))}Cn(e,n){var i,a;if(n==null||!n.selector)return!0;var o=e==null||(i=e.properties)==null?void 0:i.$element_selectors;if(o!=null&&o.includes(n.selector))return!0;var c=(e==null||(a=e.properties)==null?void 0:a.$elements_chain)||"";if(n.selector_regex&&c)try{return new RegExp(n.selector_regex).test(c)}catch{return!1}return!1}In(e){var n;return(e==null||(n=e.properties)==null?void 0:n.$elements)==null?[]:e?.properties.$elements}yn(e,n){return n==null||!n.properties||n.properties.length===0||wT(n.properties.reduce(((i,a)=>{var o=Ke(a.value)?a.value.map(String):a.value!=null?[String(a.value)]:[];return i[a.key]={values:o,operator:a.operator||"exact"},i}),{}),e?.properties)}}class D2{constructor(e){this._instance=e,this.Tn=new Map,this.En=new Map,this.Mn=new Map}Pn(e,n){return!!e&&wT(e.propertyFilters,n?.properties)}Rn(e,n){var i=new Map;return e.forEach((a=>{var o;(o=a.conditions)==null||(o=o[n])==null||(o=o.values)==null||o.forEach((c=>{if(c!=null&&c.name){var d=i.get(c.name)||[];d.push(a.id),i.set(c.name,d)}}))})),i}On(e,n,i){var a=(i===jl.Activation?this.Tn:this.En).get(e),o=[];return this.Ln((c=>{o=c.filter((d=>a?.includes(d.id)))}
12)),o.filter((c=>{var d,h=(d=c.conditions)==null||(d=d[i])==null||(d=d.values)==null?void 0:d.find((f=>f.name===e));return this.Pn(h,n)}))}register(e){var n;ce((n=this._instance)==null?void 0:n._addCaptureHook)||(this.Fn(e),this.An(e))}An(e){var n=e.filter((i=>{var a,o;return((a=i.conditions)==null?void 0:a.actions)&&((o=i.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0}));n.length!==0&&(this.Nn==null&&(this.Nn=new N2(this._instance),this.Nn.init(),this.Nn.xn((i=>{this.onAction(i)}))),n.forEach((i=>{var a,o,c,d,h;i.conditions&&(a=i.conditions)!=null&&a.actions&&(o=i.conditions)!=null&&(o=o.actions)!=null&&o.values&&((c=i.conditions)==null||(c=c.actions)==null||(c=c.values)==null?void 0:c.length)>0&&((d=this.Nn)==null||d.register(i.conditions.actions.values),(h=i.conditions)==null||(h=h.actions)==null||(h=h.values)==null||h.forEach((f=>{if(f&&f.name){var g=this.Mn.get(f.name);g&&g.push(i.id),this.Mn.set(f.name,g||[i.id])}})))})))}Fn(e){var n,i=e.filter((o=>{var c,d;return((c=o.conditions)==null?void 0:c.events)&&((d=o.conditions)==null||(d=d.events)==null||(d=d.values)==null?void 0:d.length)>0})),a=e.filter((o=>{var c,d;return((c=o.conditions)==null?void 0:c.cancelEvents)&&((d=o.conditions)==null||(d=d.cancelEvents)==null||(d=d.values)==null?void 0:d.length)>0}));i.length===0&&a.length===0||((n=this._instance)==null||n._addCaptureHook(((o,c)=>{this.onEvent(o,c)})),this.Tn=this.Rn(e,jl.Activation),this.En=this.Rn(e,jl.Cancellation))}onEvent(e,n){var i,a=this.le(),o=this.$n(),c=this.Dn(),d=((i=this._instance)==null||(i=i.persistence)==null?void 0:i.props[o])||[];if(c===e&&n&&d.length>0){var h,f;a.info("event matched, removing item from activated items",{event:e,eventPayload:n,existingActivatedItems:d});var g=(n==null||(h=n.properties)==null?void 0:h.$survey_id)||(n==null||(f=n.properties)==null?void 0:f.$product_tour_id);if(g){var v=d.indexOf(g);0>v||(d.splice(v,1),this.qn(d))}}else{if(this.En.has(e)){var y=this.On(e,n,jl.Cancellation);y.length>0&&(a.info("cancel event matched, cancelling items",{event:e,itemsToCancel:y.map((w=>w.id))}),y.forEach((w=>{var S=d.indexOf(w.id);0>S||d.splice(S,1),this.jn(w.id)})),this.qn(d))}if(this.Tn.has(e)){a.info("event name matched",{event:e,eventPayload:n,items:this.Tn.get(e)});var _=this.On(e,n,jl.Activation);this.qn(d.concat(_.map((w=>w.id))||[]))}}}onAction(e){var n,i=this.$n(),a=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[i])||[];this.Mn.has(e)&&this.qn(a.concat(this.Mn.get(e)||[]))}qn(e){var n=this.le(),i=[...new Set(e)].filter((a=>!this.Hn(a)));n.info("updating activated items",{activatedItems:i}),this.Un(i)}getActivatedIds(){var e,n=this.$n();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}getEventToItemsMap(){return this.Tn}Bn(){return this.Nn}}class j2 extends D2{constructor(e){super(e)}$n(){return Rm}Dn(){return Xl.SHOWN}Ln(e){var n;(n=this._instance)==null||n.getSurveys(e)}jn(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}le(){return at}Un(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[Rm]:e})}Hn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var jg="SDK is not enabled or survey functionality is not yet loaded",eE="Disabled. Not loading surveys.",I2=V!=null&&V.location?lh(V.location.hash,"__posthog")||lh(location.hash,"state"):null,tE="_postHogToolbarParams",nE=vt("[Toolbar]"),on=vt("[FeatureFlags]"),Ns=vt("[FeatureFlags]",{debugEnabled:!0}),Ig=`" failed. Feature flags didn't load in time.`,rE=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},iE=t=>{var e={};for(var[n,i]of Md(t||{}))i&&(e[n]=i);return e},Qr=vt("[Error tracking]"),sE="Refusing to render web experiment since the viewer is a likely bot",$2={icontains:(t,e)=>!!V&&e.href.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>!!V&&e.href.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>!!V&&dh(e.href,t),not_regex:(t,e)=>!!V&&!dh(e.href,t),exact:(t,e)=>e.href===t,is_not:(t,e)=>e.href!==t};class rn{get qt(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(i){i===void 0&&(i=!1),n.getWebExperiments((a=>{rn.zn("retrieved web experiments from the server"),n.Vn=new Map,a.forEach((o=>
12{if(o.feature_flag_key){var c;n.Vn&&(rn.zn("setting flag key ",o.feature_flag_key," to web experiment ",o),(c=n.Vn)==null||c.set(o.feature_flag_key,o));var d=n._instance.getFeatureFlag(o.feature_flag_key);_t(d)&&o.variants[d]&&n.Wn(o.name,d,o.variants[d].transforms)}else if(o.variants)for(var h in o.variants){var f=o.variants[h];rn.Zn(f)&&n.Wn(o.name,h,f.transforms)}}))}),i)},this._instance=e,this._instance.onFeatureFlags((i=>{this.onFeatureFlags(i)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())rn.zn(sE);else if(!this.qt.disable_web_experiments){if(qe(this.Vn))return this.Vn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();rn.zn("applying feature flags",e),e.forEach((n=>{var i;if(this.Vn&&(i=this.Vn)!=null&&i.has(n)){var a,o=this._instance.getFeatureFlag(n),c=(a=this.Vn)==null?void 0:a.get(n);o&&c!=null&&c.variants[o]&&this.Wn(c.name,o,c.variants[o].transforms)}}))}}previewWebExperiment(){var e=rn.getWindowLocation();if(e!=null&&e.search){var n=Sc(e?.search,"__experiment_id"),i=Sc(e?.search,"__experiment_variant");n&&i&&(rn.zn("previewing web experiments "+n+" && "+i),this.getWebExperiments((a=>{this.Gn(parseInt(n),i,a)}),!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,i){if(this.qt.disable_web_experiments&&!i)return e([]);var a=this._instance.get_property("$web_experiments");if(a&&!n)return e(a);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:o=>e(o.statusCode===200&&o.json&&o.json.experiments||[])})}Gn(e,n,i){var a=i.filter((o=>o.id===e));a&&a.length>0&&(rn.zn("Previewing web experiment ["+a[0].name+"] with variant ["+n+"]"),this.Wn(a[0].name,n,a[0].variants[n].transforms))}static Zn(e){return!qe(e.conditions)&&rn.Qn(e)&&rn.Jn(e)}static Qn(e){var n;if(qe(e.conditions)||qe((n=e.conditions)==null?void 0:n.url))return!0;var i,a,o,c=rn.getWindowLocation();return!!c&&((i=e.conditions)==null||!i.url||$2[(a=(o=e.conditions)==null?void 0:o.urlMatchType)!==null&&a!==void 0?a:"icontains"](e.conditions.url,c))}
12static getWindowLocation(){return V?.location}static Jn(e){var n;if(qe(e.conditions)||qe((n=e.conditions)==null?void 0:n.utm))return!0;var i=sT();if(i.utm_source){var a,o,c,d,h,f,g,v,y=(a=e.conditions)==null||(a=a.utm)==null||!a.utm_campaign||((o=e.conditions)==null||(o=o.utm)==null?void 0:o.utm_campaign)==i.utm_campaign,_=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_source||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_source)==i.utm_source,w=(h=e.conditions)==null||(h=h.utm)==null||!h.utm_medium||((f=e.conditions)==null||(f=f.utm)==null?void 0:f.utm_medium)==i.utm_medium,S=(g=e.conditions)==null||(g=g.utm)==null||!g.utm_term||((v=e.conditions)==null||(v=v.utm)==null?void 0:v.utm_term)==i.utm_term;return y&&w&&S&&_}return!1}static zn(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;n>a;a++)i[a-1]=arguments[a];ae.info("[WebExperiments] "+e,i)}Wn(e,n,i){this._is_bot()?rn.zn(sE):n!=="control"?i.forEach((a=>{if(a.selector){var o;rn.zn("applying transform of variant "+n+" for experiment "+e+" ",a);var c=(o=document)==null?void 0:o.querySelectorAll(a.selector);c?.forEach((d=>{var h=d;a.html&&(h.innerHTML=a.html),a.css&&h.setAttribute("style",a.css)}))}})):rn.zn("Control variants leave the page unmodified.")}_is_bot(){return $n&&this._instance?_T($n,this.qt.custom_blocked_useragents):void 0}}var Qn=vt("[Conversations]"),Ds="Conversations not available yet.",Ph={featureFlags:class{constructor(t){this.Kn=!1,this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=t,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get ni(){return this._instance.persistence}os(t){return this._instance.get_property(t)}us(){var t,e;return(t=(e=this.ni)==null?void 0:e.wr(this.qt.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}ls(){return!!this.us()&&(this.ss||this.Xn||(this.ss=!0,on.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var t,e=(t=this.qt.evaluation_contexts)!==null&&t!==void 0?t:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.ns||(on.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),e!=null&&e.length?e.filter((n=>{var i=n&&typeof n=="string"&&n.trim().length>0;return i||on.error("Invalid evaluation context found:",n,"Expected non-empty string"),i})):[]}cs(){return this.hs().length>0}initialize(){var t,e,{config:n}=this._instance,i=(t=(e=n.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(i).length){var a,o,c=(a=(o=n.bootstrap)==null?void 0:o.featureFlagPayloads)!==null&&a!==void 0?a:{},d=Object.keys(i).filter((f=>!!i[f])).reduce(((f,g)=>(f[g]=i[g]||!1,f)),{}),h=Object.keys(c).filter((f=>d[f])).reduce(((f,g)=>(c[g]&&(f[g]=c[g]),f)),{});this.receivedFeatureFlags({featureFlags:d,featureFlagPayloads:h})}}updateFlags(t,e,n){var i=n!=null&&n.merge?this.getFlagVariants():{},a=n!=null&&n.merge?this.getFlagPayloads():{},o=re({},i,t),c=re({},a,e),d={};for(var[h,f]of Object.entries(o)){var g=typeof f=="string";d[h]={key:h,enabled:!!g||!!f,variant:g?f:void 0,reason:void 0,metadata:ce(c?.[h])?void 0:{id:0,version:void 0,description:void 0,payload:c[h]}}}this.receivedFeatureFlags({flags:d})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this.os(Em),e=this.os(ti),n=this.os(no);if(!n&&!e)return t||{};var i=Et({},t||{}),a=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var o of a){var c,d,h=i[o],f=e?.[o],g=ce(f)?(c=h?.enabled)!==null&&c!==void 0&&c:!!f,v=ce(f)?h.variant:typeof f=="string"?f:void 0,y=n?.[o],_=re({},h,{enabled:g,variant:g?v??h?.variant:void 0});g!==h?.enabled&&(_.original_enabled=h?.enabled),v!==h?.variant&&(_.original_variant=h?.variant),y&&(_.metadata=re({},h?.metadata,{payload:y,original_payload:h==null||(d=h.metadata)==null?void 0:d.payload})),i[o]=_}return this.Kn||(on.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:i}
12),this.Kn=!0),i}getFlagVariants(){var t=this.os(fo),e=this.os(ti);if(!e)return t||{};for(var n=Et({},t),i=Object.keys(e),a=0;i.length>a;a++)n[i[a]]=e[i[a]];return this.Kn||(on.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.Kn=!0),n}getFlagPayloads(){var t=this.os(km),e=this.os(no);if(!e)return t||{};for(var n=Et({},t||{}),i=Object.keys(e),a=0;i.length>a;a++)n[i[a]]=e[i[a]];return this.Kn||(on.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.Kn=!0),n}reloadFeatureFlags(){this.es||this.qt.advanced_disable_feature_flags||this.ds||(this._instance.Li.emit("featureFlagsReloading",!0),this.ds=setTimeout((()=>{this.vs()}),5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Yn||this.Xn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.es=t}vs(t){var e;if(this.fs(),!this._instance.Lr())if(this.Xn)this.ts=!0;else{var n=this.qt.token,i=this.os(Qd),a={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:re({},((e=this.ni)==null?void 0:e.get_initial_props())||{},this.os(Zl)||{}),group_properties:this.os($s),timezone:dT()};pi(i)||ce(i)||(a.$device_id=i),(t!=null&&t.disableFlags||this.qt.advanced_disable_feature_flags)&&(a.disable_flags=!0),this.cs()&&(a.evaluation_contexts=this.hs());var o=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Xn=!0,this._instance._send_request({method:"POST",url:o,data:a,compression:this.qt.disable_compression?void 0:Tr.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback:c=>{var d,h,f,g=!0;if(c.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),g=!1),this.Xn=!1,!a.disable_flags||this.ts){this.rs=!g;var v=[];c.error?c.error instanceof Error?v.push(c.error.name==="AbortError"?"timeout":"connection_error"):v.push("unknown_error"):c.statusCode!==200&&v.push("api_error_"+c.statusCode),(d=c.json)!=null&&d.errorsWhileComputingFlags&&v.push("errors_while_computing_flags");var y,_=!((h=c.json)==null||(h=h.quotaLimited)==null||!h.includes("feature_flags"));_&&v.push("quota_limited"),(f=this.ni)==null||f.register({[Cm]:v}),_?on.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(a.disable_flags||this.receivedFeatureFlags((y=c.json)!==null&&y!==void 0?y:{},g,{partialResponse:!!this.qt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(t,e){var n;if(e===void 0&&(e={}),!e.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var i=this.getFeatureFlagResult(t,e);return(n=i?.variant)!==null&&n!==void 0?n:i?.enabled}}else on.warn('getFeatureFlag for key "'+t+Ig)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e?.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFlagVariants(),i=t in n,a=n[t],o=this.getFlagPayloads()[t],c=String(a),d=this.os(xm)||void 0,h=this.os(th)||void 0,f=this.os(ic)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var g,v=this._instance.get_session_id(),y=this.os(Am);v&&v!==y&&(f={},(g=this.ni)==null||g.register({[ic]:f,[Am]:v}))}if((e.send_event||!("send_event"in e))&&(!(t in f)||!f[t].includes(c))){var _,w,S,k,x,C,A,M,D,$;Ke(f[t])?f[t].push(c):f[t]=[c],(_=this.ni)==null||_.register({[ic]:f});var L=this.getFeatureFlagDetails(t),I=[...(w=this.os(Cm))!==null&&w!==void 0?w:[]];ce(a)&&I.push("flag_missing");var U={$feature_flag:t,$feature_flag_response:a,$feature_flag_payload:o||null,$feature_flag_request_id:d,$feature_flag_evaluated_at:h,$feature_flag_bootstrapped_response:((S=this.qt.bootstrap)==null||(S=S.featureFlags)==null?void 0:S[t])||null,$feature_flag_bootstrapped_payload:((k=this.qt.bootstrap)==null||(k=k.featureFlagPayloads)==null?void 0:k[t])||null,$used_bootstrap_value:!this.rs};ce(L==null||(x=L.metadata)==null?void 0:x.version)||(U.$feature_flag_version=L.metadata.version);var X,Q=(C=L==null||(A=L.reason)==null?void 0:A.description)!==null&&C!==void 0?C:L==null||(M=L.reason)==null?void 0:M.code;Q&&(U.$feature_flag_reason=Q),L!=null&&(D=L.metadata)!=null&&D.id&&(U.$feature_flag_id=L.metadata.id),ce(L?.original_variant)&&
12ce(L?.original_enabled)||(U.$feature_flag_original_response=ce(L.original_variant)?L.original_enabled:L.original_variant),L!=null&&($=L.metadata)!=null&&$.original_payload&&(U.$feature_flag_original_payload=L==null||(X=L.metadata)==null?void 0:X.original_payload),I.length&&(U.$feature_flag_error=I.join(",")),this._instance.capture("$feature_flag_called",U)}if(i){var te=o;if(!ce(o))try{te=JSON.parse(o)}catch{}return{key:t,enabled:!!a,variant:typeof a=="string"?a:void 0,payload:te}}}}else on.warn('getFeatureFlagResult for key "'+t+Ig)}getRemoteConfigPayload(t,e){var n=this.qt.token,i={distinct_id:this._instance.get_distinct_id(),token:n};this.cs()&&(i.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:i,compression:this.qt.disable_compression?void 0:Tr.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback(a){var o,c=(o=a.json)==null?void 0:o.featureFlagPayloads;e(c?.[t]||void 0)}})}isFeatureEnabled(t,e){if(e===void 0&&(e={}),!e.fresh||this.rs){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(t,e);return ce(n)?void 0:!!n}on.warn('isFeatureEnabled for key "'+t+Ig)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){if(this.ni){this.Yn=!0;var i=this.getFlagVariants(),a=this.getFlagPayloads(),o=this.getFlagsWithDetails();(function(c,d,h,f,g,v){h===void 0&&(h={}),f===void 0&&(f={}),g===void 0&&(g={});var y=(I=>{var U=I.flags;return U?(I.featureFlags=Object.fromEntries(Object.keys(U).map((X=>{var Q;return[X,(Q=U[X].variant)!==null&&Q!==void 0?Q:U[X].enabled]}))),I.featureFlagPayloads=Object.fromEntries(Object.keys(U).filter((X=>U[X].enabled)).filter((X=>{var Q;return(Q=U[X].metadata)==null?void 0:Q.payload})).map((X=>{var Q;return[X,(Q=U[X].metadata)==null?void 0:Q.payload]})))):on.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),I})(c),_=y.flags,w=y.featureFlags,S=y.featureFlagPayloads;if(w){var k=c.requestId,x=c.evaluatedAt;if(Ke(w)){on.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var C={};if(w)for(var A=0;w.length>A;A++)C[w[A]]=!0;d&&d.register({[Od]:w,[fo]:C})}else{var M=w,D=S,$=_;if(v!=null&&v.partialResponse)M=re({},h,M),D=re({},f,D),$=re({},g,$);else if(c.errorsWhileComputingFlags)if(_){var L=new Set(Object.keys(_).filter((I=>{var U;return!((U=_[I])!=null&&U.failed)})));M=re({},h,Object.fromEntries(Object.entries(M).filter((I=>{var[U]=I;return L.has(U)})))),D=re({},f,Object.fromEntries(Object.entries(D||{}).filter((I=>{var[U]=I;return L.has(U)})))),$=re({},g,Object.fromEntries(Object.entries($||{}).filter((I=>{var[U]=I;return L.has(U)}))))}else M=re({},h,M),D=re({},f,D),$=re({},g,$);d&&d.register(re({[Od]:Object.keys(iE(M)),[fo]:M||{},[km]:D||{},[Em]:$||{}},k?{[xm]:k}:{},x?{[th]:x}:{}))}}})(t,this.ni,i,a,o,n),e||(this.ss=!1),this.ps(e)}}override(t,e){e===void 0&&(e=!1),on.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this.ni)return on.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this.ni.unregister(ti),this.ni.unregister(no),this.ps(),Ns.info("All overrides cleared");if(Ke(t)){var e=rE(t);return this.ni.register({[ti]:e}),this.ps(),Ns.info("Flag overrides set",{flags:t})}if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,i=t;if(this.Kn=!!((n=i.suppressWarning)!==null&&n!==void 0&&n),"flags"in i){if(i.flags===!1)this.ni.unregister(ti),Ns.info("Flag overrides cleared");else if(i.flags){if(Ke(i.flags)){var a=rE(i.flags);this.ni.register({[ti]:a})}else this.ni.register({[ti]:i.flags});Ns.info("Flag overrides set",{flags:i.flags})}}return"payloads"in i&&(i.payloads===!1?(this.ni.unregister(no),Ns.info("Payload overrides cleared")):i.payloads&&(this.ni.register({[no]:i.payloads}),Ns.info("Payload overrides set",{payloads:i.payloads}))),void this.ps()}if(t&&typeof t=="object")return this.ni.register({[ti]:t}),this.ps(),Ns.info("Flag overrides set",{flags:t});on.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Yn){var{flags:e,flagVariants:n}=this.gs();t(e,n)}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var i,a=(this.os(Jl)||[]).find((h=>h.flagKey===t)),o={["$feature_enrollment/"+t]:e},c={$feature_flag:t,$feature_enrollment:e,$set:o};a&&(c.$early_access_feature_name=a.name),n&&(c.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",c),this.setPersonPropertiesForFlags(o,!1);var d=re({},this.getFlagVariants(),{[t]:e});(i=this.ni)==null||i.register({[Od]:Object.keys(iE(d)),[fo]:d}),this.ps()}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var i=this.os(Jl),a=n?"&"+n.map((o=>"stage="+o)).join("&"):"";if(i&&!e)return t(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+a),method:"GET",callback:o=>{var c,d;if(o.json){var h=o.json.earlyAccessFeatures;return(c=this.ni)==null||c.unregister(Jl),(d=this.ni)==null||d.register({[Jl]:h}),t(h)}}})}gs(){var t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter((n=>e[n])),flagVariants:Object.keys(e).filter((n=>e[n])).reduce(((n,i)=>(n[i]=e[i],n)),{})}}ps(t){var{flags:e,flagVariants:n}=this.gs();
12this.featureFlagEventHandlers.forEach((i=>i(e,n,{errorsLoading:t})))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.os(Zl)||{},i=t?.$set||(t!=null&&t.$set_once?{}:t),a=t?.$set_once,o={};if(a)for(var c in a)({}).hasOwnProperty.call(a,c)&&(c in n||(o[c]=a[c]));this._instance.register({[Zl]:re({},n,o,i)}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(Zl)}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.os($s)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((i=>{n[i]=re({},n[i],t[i]),delete t[i]})),this._instance.register({[$s]:re({},n,t)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.os($s)||{};this._instance.register({[$s]:re({},e,{[t]:{}})})}else this._instance.unregister($s)}reset(){this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Kn=!1}}},z2={sessionRecording:class{get qt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var t;return!((t=this.ys)==null||!t.isStarted)}get status(){var t,e;return this.bs===ql||this.bs===pd?this.bs:(t=(e=this.ys)==null?void 0:e.status)!==null&&t!==void 0?t:this.bs}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=WS,this._s=void 0,this._instance=t,!this._instance.sessionManager)throw Xr.error("started without valid sessionManager"),new Error(Vm+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===si)throw new Error(Vm+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var t,e=!((t=this._instance.get_property(Wl))==null||!t.enabled),n=!this.qt.disable_session_recording,i=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return V&&e&&n&&!i}startIfEnabledOrStop(t){var e;if(!this.ws||(e=this.ys)==null||!e.isStarted){var n=!ce(Object.assign)&&!ce(Array.from);this.ws&&n?(this.xs(t),Xr.info("starting")):(this.bs=WS,this.stopRecording())}}xs(t){var e,n,i;this.ws&&(this.bs!==ql&&this.bs!==pd&&(this.bs=JS),we!=null&&(e=we.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=we.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Ss(t):(i=we.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,this.ks,(a=>{if(a)return Xr.error("could not load recorder",a);this.Ss(t)})))}stopRecording(){var t,e;(t=this._s)==null||t.call(this),this._s=void 0,(e=this.ys)==null||e.stop()}Cs(){var t,e;(t=this._s)==null||t.call(this),this._s=void 0,(e=this.ys)==null||e.discard()}Is(){var t;(t=this.ni)==null||t.unregister(Ov)}Ts(t,e){if(qe(t))return null;var n,i=rr(t)?t:parseFloat(t);return typeof(n=i)!="number"||!Number.isFinite(n)||0>n||n>1?(Xr.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null):i}Es(t){if(this.ni){var e,n,i=this.ni,a=()=>{var o,c=t.sessionRecording===!1?void 0:t.sessionRecording,d=this.Ts((o=this.qt.session_recording)==null?void 0:o.sampleRate,"session_recording.sampleRate"),h=this.Ts(c?.sampleRate,"remote config sampleRate"),f=d??h;qe(f)&&this.Is();var g=c?.minimumDurationMilliseconds;i.register({[Wl]:re({cache_timestamp:Date.now(),enabled:!!c},c,{networkPayloadCapture:re({capturePerformance:t.capturePerformance},c?.networkPayloadCapture),canvasRecording:{enabled:c?.recordCanvas,fps:c?.canvasFps,quality:c?.canvasQuality},sampleRate:f,minimumDurationMilliseconds:ce(g)?null:g,endpoint:c?.endpoint,triggerMatchType:c?.triggerMatchType,masking:c?.masking,urlTriggers:c?.urlTriggers,version:c?.version,triggerGroups:c?.triggerGroups})})};a(),(e=this._s)==null||e.call(this),this._s=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(a)}}onRemoteConfig(t){return"sessionRecording"in t?t.sessionRecording===!1?(this.Es(t),void this.Cs()):(this.Es(t),void this.startIfEnabledOrStop()):(this.bs===ql&&(this.bs=pd,Xr.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(t,e){var n;e===void 0&&(e="log"),(n=this.ys)!=null&&n.log?this.ys.log(t,e):Xr.warn("log called before recorder was ready")}get ks(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(Wl);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}Ms(){var t,e,n=this._instance.get_property(Wl);if(!n)return!1;try{e=typeof n=="object"?n:JSON.parse(n)}catch(a){return Xr.warn("persisted remote config for session recording is invali
12d and will be ignored",a),!1}var i=(t=e.cache_timestamp)!==null&&t!==void 0?t:Date.now();return 36e5>=Date.now()-i}Ss(t){var e,n;if((e=we.__PosthogExtensions__)==null||!e.initSessionRecording)return Xr.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[eT]:!0});if(this.ys||(this.ys=(n=we.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ms())return this.bs===pd||this.bs===ql?void 0:(this.bs=ql,Xr.info("persisted remote config is stale, requesting fresh config before starting"),void new hT(this._instance).load());this.bs=JS,this.ys.start(t)}onRRwebEmit(t){var e;(e=this.ys)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.ys||(e=this.ni)==null||e.register({[Kx]:!0}),(t=this.ys)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.ys||(e=this.ni)==null||e.register({[Yx]:!0}),(t=this.ys)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.ys||(n=this.ni)==null||n.register({[t==="url"?Wx:Jx]:!0}),(e=this.ys)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.ys)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.ys)==null||!n.tryAddCustomEvent(t,e))}}},U2={autocapture:class{constructor(t){this.Ps=!1,this.Rs=null,this.Os=!1,this.instance=t,this.rageclicks=new GS(t.config.rageclick),this.Ls=null}initialize(){this.startIfEnabled()}get qt(){var t,e,n=Tt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(t=n.url_allowlist)==null?void 0:t.map((i=>new RegExp(i))),n.url_ignorelist=(e=n.url_ignorelist)==null?void 0:e.map((i=>new RegExp(i))),n}Fs(){if(this.isBrowserSupported()){if(V&&oe){var t=n=>{n=n||V?.event;try{this.As(n)}catch(i){Ng.error("Failed to capture event",i)}};if(Lt(oe,"submit",t,{capture:!0}),Lt(oe,"change",t,{capture:!0}),Lt(oe,"click",t,{capture:!0}),this.qt.capture_copied_text){var e=n=>{n=n||V?.event;try{this.As(n,Lg)}catch(i){Ng.error("Failed to capture copy/cut event",i)}};Lt(oe,"copy",e,{capture:!0}),Lt(oe,"cut",e,{capture:!0})}}}else Ng.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ps&&(this.Fs(),this.Ps=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.Os=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[gm]:!!t.autocapture_opt_out}),this.Rs=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.Ls=t}getElementSelectors(t){var e,n=[];return(e=this.Ls)==null||e.forEach((i=>{var a=oe?.querySelectorAll(i);a?.forEach((o=>{t===o&&n.push(i)}))})),n}get isEnabled(){var t,e,n=(t=this.instance.persistence)==null?void 0:t.props[gm];if(pi(this.Rs)&&!Cr(n)&&!this.instance.Lr())return!1;var i=(e=this.Rs)!==null&&e!==void 0?e:!!n;return!!this.instance.config.autocapture&&!i}As(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var n,i=US(t);kT(i)&&(i=i.parentNode||null),e==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&(function(v,y){if(!V||Fm(v))return!1;var _,w,S;if(Cr(y)?(_=!!y&&qS,w=void 0):(_=(S=y?.css_selector_ignorelist)!==null&&S!==void 0?S:qS,w=y?.content_ignorelist),_===!1)return!1;var{targetElementList:k}=FS(v,!1);return!(function(x,C){if(x===!1||ce(x))return!1;var A;if(x===!0)A=E2;else{if(!Ke(x))return!1;if(x.length>10)return ae.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;A=x.map((M=>M.toLowerCase()))}return C.some((M=>{var{safeText:D,ariaLabel:$}=M;return A.some((L=>D.includes(L)||$.includes(L)))}))})(w,k.map((x=>{var C;return{safeText:xc(x).toLowerCase(),ariaLabel:((C=x.getAttribute("aria-label"))==null?void 0:C.toLowerCase().trim())||""}})))&&!BS(k,_)})(i,this.instance.config.rageclick)&&this.As(t,"$rageclick");var a=e===Lg;if(i&&(function(v,y,_,w,S){var k,x,C,A;if(_===void 0&&(_=void 0),!V||Fm(v)||(k=_)!=null&&k.url_allowlist&&!zS(_.url_allowlist)||(x=_)!=null&&x.url_ignorelist&&zS(_.url_ignorelist))return!1;if((C=_)!=null&&C.dom_event_allowlist){var M=_.dom_event_allowlist;if(M&&!M.some((U=>y.type===U)))return!1}var{parentIsUsefulElement:D,targetElementList:$}=FS(v,w);if(!(function(U,X){var Q=X?.element_allowlist;if(ce(Q))return!0;var te,_e=function(Ne){if(Q.some((H=>Ne.tagName.toLowerCase()===H)))return{v:!0}};for(var pe of U)if(te=_e(pe))return te.v;return!1})($,_)||!BS($,(A=_)==null?void 0:A.css_selector_allowlist))return!1;var L=V.getComputedStyle(v);
12if(L&&L.getPropertyValue("cursor")==="pointer"&&y.type==="click")return!0;var I=v.tagName.toLowerCase();switch(I){case"html":return!1;case"form":return(S||["submit"]).indexOf(y.type)>=0;case"input":case"select":case"textarea":return(S||["change","click"]).indexOf(y.type)>=0;default:return D?(S||["click"]).indexOf(y.type)>=0:(S||["click"]).indexOf(y.type)>=0&&(Iv.indexOf(I)>-1||v.getAttribute("contenteditable")==="true")}})(i,t,this.qt,a,a?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:c}=O2(i,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.Os});if(c)return!1;var d=this.getElementSelectors(i);if(d&&d.length>0&&(o.$element_selectors=d),e===Lg){var h,f=TT(V==null||(h=V.getSelection())==null?void 0:h.toString()),g=t.type||"clipboard";if(!f)return!1;o.$selected_content=f,o.$copy_type=g}return this.instance.capture(e,o),!0}}}isBrowserSupported(){return ii(oe?.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.Ns=(V==null||(e=V.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(ae.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.$s&&this.$s(),this.$s=void 0,ae.info("History API monitoring stopped")}monitorHistoryChanges(){var t,e;if(V&&V.history){var n=this;(t=V.history.pushState)!=null&&t.__posthog_wrapped__||YS(V.history,"pushState",(i=>function(a,o,c){i.call(this,a,o,c),n.Ds("pushState")})),(e=V.history.replaceState)!=null&&e.__posthog_wrapped__||YS(V.history,"replaceState",(i=>function(a,o,c){i.call(this,a,o,c),n.Ds("replaceState")})),this.qs()}}Ds(t){try{var e,n=V==null||(e=V.location)==null?void 0:e.pathname;if(!n)return;n!==this.Ns&&this.isEnabled&&this._instance.capture(ro,{navigation_type:t}),this.Ns=n}catch(i){ae.error("Error capturing "+t+" pageview",i)}}qs(){if(!this.$s){var t=()=>{this.Ds("popstate")};Lt(V,"popstate",t),this.$s=()=>{V&&V.removeEventListener("popstate",t)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(t){var e;this.js=!1,this.Ps=!1,this.Hs=null,this.instance=t,this.js=!((e=this.instance.persistence)==null||!e.props[mm]),this.rageclicks=new GS(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return Tt(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(t=this.qt.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return qe(this.qt.capture_heatmaps)?qe(this.qt.enable_heatmaps)?this.js:this.qt.enable_heatmaps:this.qt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Ps)return;M2.info("starting..."),this.Us(),this.At()}else{var t;clearInterval((t=this.Hs)!==null&&t!==void 0?t:void 0),this.Bs(),this.getAndClearBuffer()}}onRemoteConfig(t){if("heatmaps"in t){var e=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[mm]:e}),this.js=e,this.startIfEnabled()}}getAndClearBuffer(){var t=this.M;return this.M=void 0,t}zs(t){this.Mt(t.originalEvent,"deadclick")}At(){this.Hs&&clearInterval(this.Hs),this.Hs=oe?.visibilityState==="visible"?setInterval(this.Zr.bind(this),this.flushIntervalMilliseconds):null}Us(){V&&oe&&(this.Vs=this.Zr.bind(this),Lt(V,sh,this.Vs),this.Ws=t=>this.Mt(t||V?.event),Lt(oe,"click",this.Ws,{capture:!0}),this.Zs=t=>this.Gs(t||V?.event),Lt(oe,"mousemove",this.Zs,{capture:!0}),this.Qs=new _S(this.instance,BD,this.zs.bind(this)),this.Qs.startIfEnabledOrStop(),this.Js=this.At.bind(this),Lt(oe,ih,this.Js),this.Ps=!0)}Bs(){var t;V&&oe&&(this.Vs&&V.removeEventListener(sh,this.Vs),this.Ws&&oe.removeEventListener("click",this.Ws,{capture:!0}),this.Zs&&oe.removeEventListener("mousemove",this.Zs,{capture:!0}),this.Js&&oe.removeEventListener(ih,this.Js),clearTimeout(this.Ks),(t=this.Qs)==null||t.stop(),this.Ps=!1)}Ys(t,e){var n=this.instance.scrollManager.scrollY(),i=this.instance.scrollManager.scrollX(),a=this.instance.scrollManager.scrollElement(),o=(function(c,d,h){for(var f=c;f&&Xs(f)&&!mr(f,"body");){if(f===h)return!1;if(Be(d,V?.getComputedStyle(f).position))return!0;f=RT(f)}return!1})(US(t),["fixed","sticky"],a);return{x:t.clientX+(o?0:i),y:t.clientY+(o?0:n),target_fixed:o,type:e}}Mt(t,e){var n;if(e===void 0&&(e="click"),!$S(t.target)&&ZS(t)){var i=this.Ys(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this.Xs(re({},i,{type:"rageclick"})),this.Xs(i)}}Gs(t){!$S(t.target)&&ZS(t)&&(clearTimeout(this.Ks),this.Ks=setTimeout((()=>{this.Xs(this.Ys(t,"mousemove"))}),500))}Xs(t){if(V){var e=V.location.href,n=this.qt.custom_personal_data_properties,i=this.qt.mask_personal_data_properties?[...Oo,...n||[]]:[],a=Ec(e,i,kc);this.M=this.M||{},this.M[a]||(this.M[a]=[]),this.M[a].push(t)}}Zr(){this.M&&!ho(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:_S,webVitalsAutocapture:class{constructor(t){var e;this.js=!1,this.Ps=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),this.M.metrics.length!==0&&(this._instance.capture("$web_vitals",this.M.metrics.reduce(((n,i)=>re({},n,{["$web_vitals_"+i.name+"_event"]:re({},i),["$web_vitals_"+i.name+"_value"]:i.value})),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=n=>{var i,a=(i=this._instance.sessionManager)==null?void 0:i.checkAndGetSessionAndWindowId(!0);if(ce(a))qi.error("Could not read session ID. Dropping metrics!");else{this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var o=this.io();ce(o)||(qe(n?.name)||qe(n?.value)?qi.error("Invalid metric received",n):!this.no||this.no>n.value?(this.M.url!==o&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),ce(this.M.url)&&(this.M.url=o),this.M.firstMetricTimestamp=ce(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.M.metrics.push(re({},n,{$current_url:o,$session_id:a.sessionId,$window_id:a.windowId,timestamp:Date.now()})),this.M.metrics.length===this.allowedMetrics.length&&this.eo()):qi.error("Ignoring metric with value >= "+this.no,n))}},this.so=()=>
12{if(!this.Ps){var n,i,a,o,c=we.__PosthogExtensions__;ce(c)||ce(c.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:i,onFCP:a,onINP:o}=c.postHogWebVitalsCallbacks),n&&i&&a&&o?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&i(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&a(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&o(this.ht.bind(this)),this.Ps=!0):qi.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.js=!((e=this._instance.persistence)==null||!e.props[bm]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=Tt(this.oo)?(t=this.oo)==null?void 0:t.web_vitals_allowed_metrics:void 0;return qe(n)?((e=this._instance.persistence)==null?void 0:e.props[Sm])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(Tt(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=Tt(this.oo)?this.oo.web_vitals_attribution:void 0;return t!=null&&t}get no(){var t=Tt(this.oo)&&rr(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:KS;return t>0&&6e4>=t?KS:t}get isEnabled(){var t=Xt?.protocol;if(t!=="http:"&&t!=="https:")return qi.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=Tt(this.oo)?this.oo.web_vitals:Cr(this.oo)?this.oo:void 0;return Cr(e)?e:this.js}startIfEnabled(){this.isEnabled&&!this.Ps&&(qi.info("enabled, starting..."),this.lr(this.so))}onRemoteConfig(t){if("capturePerformance"in t){var e=Tt(t.capturePerformance)&&!!t.capturePerformance.web_vitals,n=Tt(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[bm]:e}),this._instance.persistence.register({[Sm]:n})),this.js=e,this.startIfEnabled()}}lr(t){var e,n;(e=we.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?t():(n=we.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(i=>{i?qi.error("failed to load script",i):t()}))}io(){var t=V?V.location.href:void 0;if(t){var e=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...Oo,...e||[]]:[];return Ec(t,n,kc)}qi.error("Could not determine current URL")}}},B2={exceptionObserver:class{constructor(t){var e,n,i;this.so=()=>{var a;if(V&&this.isEnabled&&(a=we.__PosthogExtensions__)!=null&&a.errorWrappingFunctions){var o=we.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,c=we.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,d=we.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.qt.capture_unhandled_errors&&(this.ao=o(this.captureException.bind(this))),!this.uo&&this.qt.capture_unhandled_rejections&&(this.uo=c(this.captureException.bind(this))),!this.lo&&this.qt.capture_console_errors&&(this.lo=d(this.captureException.bind(this)))}catch(h){Bl.error("failed to start",h),this.ho()}}},this._instance=t,this.co=!((e=this._instance.persistence)==null||!e.props[vm]),this.do=new JN({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(i=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&i!==void 0?i:10,refillInterval:1e4,Gt:Bl}),this.qt=this.vo(),this.startIfEnabledOrStop()}vo(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Tt(t)?e=re({},e,t):(ce(t)?this.co:t)&&(e=re({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Bl.info("enabled"),this.ho(),this.lr(this.so)):this.ho()}lr(t){var e,n;(e=we.__PosthogExtensions__)!=null&&e.errorWrappingFunctions&&t(),(n=we.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(i=>{if(i)return Bl.error("failed to load script",i);t()}))}ho(){var t,e,n;(t=this.ao)==null||t.call(this),this.ao=void 0,(e=this.uo)==null||e.call(this),this.uo=void 0,(n=this.lo)==null||n.call(this),this.lo=void 0}onRemoteConfig(t){"autocaptureExceptions"in t&&(this.co=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[vm]:this.co}),this.qt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.vo()}captureException(t){var e,n,i,a=(e=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&e!==void 0?e:"Exception";this.do.consumeRateLimit(a)?Bl.info("Skipping exception capture because of client rate limiting.",{exception:a}):(i=this._instance.exceptions)==null||i.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,n;this.fo=[],this.po=new cD([new vD,new TD,new _D,new yD,new kD,new ED,new wD,new xD],(function(i){for(var a=arguments.length,o=new Array(a>1?a-1:0),c=1;a>c;c++)o[c-1]=arguments[c];return function(d,h){h===void 0&&(h=0);for(var f=[],g=d.split(`
13`),v=h;g.length>v;v++){var y=g[v];if(1024>=y.length){var _=gS.test(y)?y.replace(gS,"$1"):y;if(!_.match(/\S*Error: /)){for(var w of o){var S=w(_,i);if(S){f.push(S);break}}if(f.length>=50)break}}}return(function(k){if(!k.length)return[];var x=Array.from(k);return x.reverse(),x.slice(0,50).map((C=>{return re({},C,{filename:C.filename||(A=x,A[A.length-1]||{}).filename,function:C.function||Co});var A}))})(f)}})("web:javascript",fD,mD)),this._instance=t,this.fo=(e=(n=this._instance.persistence)==null?void 0:n.get_property(ym))!==null&&e!==void 0?e:[],this.mo=Xd(this.yo()),this.bo=new AD(this.mo)}onConfigChange(){this.mo=Xd(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(t){var e,n,i;if("errorTracking"in t){var a=(e=(n=t.errorTracking)==null?void 0:n.suppressionRules)!==null&&e!==void 0?e:[],o=(i=t.errorTracking)==null?void 0:i.captureExtensionExceptions;this.fo=a,this._instance.persistence&&this._instance.persistence.register({[ym]:this.fo,[_m]:o})}}get _o(){var t,e=!!this._instance.get_property(_m),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.po.buildFromUnknown(t,{syntheticException:e?.syntheticException,mechanism:{handled:e?.handled}})}addExceptionStep(t,e){if(this.mo.enabled)try{if(!_t(t)||t.trim().length===0)return void Qr.warn("Ignoring exception step because message must be a non-empty string");var n=this.wo(e),{sanitizedProperties:i,droppedKeys:a}
13=(function(o){if(!o)return{sanitizedProperties:{},droppedKeys:[]};var c=[];return{sanitizedProperties:Object.keys(o).reduce(((d,h)=>RD.has(h)?(c.push(h),d):(d[h]=o[h],d)),{}),droppedKeys:c}})(n);a.length>0&&Qr.warn("Ignoring reserved exception step fields",{droppedKeys:a}),this.bo.add(re({[Jd]:t,[Zd]:new Date().toISOString()},i))}catch(o){Qr.error("Failed to add exception step. Ignoring breadcrumb.",o)}}sendExceptionEvent(t){try{var e=t.$exception_list;if(this.xo(e)){if(this.So(e))return this.ko("Exception dropped: matched a suppression rule"),void Qr.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.Co(e))return this.ko("Exception dropped: thrown by a browser extension"),void Qr.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Io(e))return this.ko("Exception dropped: thrown by the PostHog SDK"),void Qr.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.mo.enabled&&qe(t.$exception_steps)?this.To(t):t;try{var i=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return i&&this.bo.clear(),i}catch(a){return Qr.error("Failed to capture exception event. Dropping this exception.",a),void this.bo.clear()}}catch(a){return void Qr.error("Failed to process exception event. Ignoring this exception.",a)}}To(t){try{var e=this.bo.getAttachable();return e.length===0?t:re({},t,{$exception_steps:e})}catch(n){return Qr.error("Failed to read buffered exception steps. Capturing exception without steps.",n),t}}ko(t){this.mo.enabled&&this.bo.add({[Jd]:t,[Zd]:new Date().toISOString()})}wo(t){return Tt(t)?re({},t):{}}yo(){var t,e;return(t=(e=this._instance.config.error_tracking)==null?void 0:e.exception_steps)!==null&&t!==void 0?t:{}}So(t){if(t.length===0)return!1;var e=t.reduce(((n,i)=>{var{type:a,value:o}=i;return _t(a)&&a.length>0&&n.$exception_types.push(a),_t(o)&&o.length>0&&n.$exception_values.push(o),n}),{$exception_types:[],$exception_values:[]});return this.fo.some((n=>{var i=n.values.map((a=>{var o,c=bT[a.operator],d=Ke(a.value)?a.value:[a.value],h=(o=e[a.key])!==null&&o!==void 0?o:[];return d.length>0&&c(d,h)}));return n.type==="OR"?i.some(Boolean):i.every(Boolean)}))}Co(t){return t.flatMap((e=>{var n,i;return(n=(i=e.stacktrace)==null?void 0:i.frames)!==null&&n!==void 0?n:[]})).some((e=>e.filename&&e.filename.startsWith("chrome-extension://")))}Io(t){if(t.length>0){var e,n,i,a,o=(e=(n=t[0].stacktrace)==null?void 0:n.frames)!==null&&e!==void 0?e:[],c=o[o.length-1];return(i=c==null||(a=c.filename)==null?void 0:a.includes("posthog.com/static"))!==null&&i!==void 0&&i}return!1}xo(t){return!qe(t)&&Ke(t)}}},q2=re({productTours:class{get ni(){return this._instance.persistence}constructor(t){this.Eo=null,this.Mo=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){"productTours"in t&&(this.ni&&this.ni.register({[wm]:!!t.productTours}),this.loadIfEnabled())}loadIfEnabled(){var t,e;this.Eo||(t=this._instance).config.disable_product_tours||(e=t.persistence)==null||!e.get_property(wm)||this.lr((()=>this.Po()))}lr(t){var e,n;(e=we.__PosthogExtensions__)!=null&&e.generateProductTours?t():(n=we.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(i=>{i?XS.error("Could not load product tours script",i):t()}))}Po(){var t;!this.Eo&&(t=we.__PosthogExtensions__)!=null&&t.generateProductTours&&(this.Eo=we.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e){if(e===void 0&&(e=!1),!Ke(this.Mo)||e){var n=this.ni;if(n){var i=n.props[Pd];if(Ke(i)&&!e)return this.Mo=i,void t(i,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:a=>{var o=a.statusCode;if(o!==200||!a.json){var c="Product Tours API could not be loaded, status: "+o;return XS.error(c),void t([],{isLoaded:!1,error:c})}var d=Ke(a.json.product_tours)?a.json.product_tours:[];this.Mo=d,n&&n.register({[Pd]:d}),t(d,{isLoaded:!0})}})}else t(this.Mo,{isLoaded:!0})}getActiveProductTours(t){qe(this.Eo)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.Eo.getActiveProductTours(t)}showProductTour(t){var e;(e=this.Eo)==null||e.showTourById(t)}previewTour(t){this.Eo?this.Eo.previewTour(t):this.lr((()=>{var e;this.Po(),(e=this.Eo)==null||e.previewTour(t)}))}dismissProductTour(){var t;(t=this.Eo)==null||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.Eo)==null||t.nextStep()}previousStep(){var t;(t=this.Eo)==null||t.previousStep()}clearCache(){var t;this.Mo=null,(t=this.ni)==null||t.unregister(Pd)}resetTour(t){var e;(e=this.Eo)==null||e.resetTour(t)}resetAllTours(){var t;(t=this.Eo)==null||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.Eo)==null||e.cancelPendingTour(t)}}},Ph),F2={siteApps:class{constructor(t){this._instance=t,this.Ro=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Oo(t,e){if(e){var n=this.globalsForEvent(e);this.Ro.push(n),this.Ro.length>1e3&&(this.Ro=this.Ro.slice(10))}}get siteAppLoaders(){var t;return(t=we._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}initialize(){if(this.isEnabled){var t=this._instance._addCaptureHook(this.Oo.bind(this));this.Lo=()=>{t(),this.Ro=[],this.Lo=void 0}}}globalsForEvent(t){var e,n,i,a,o,c,d;
13if(!t)throw new Error("Event payload is required");var h={},f=this._instance.get_property("$groups")||[],g=this._instance.get_property("$stored_group_properties")||{};for(var[v,y]of Object.entries(g))h[v]={id:f[v],type:v,properties:y};var{$set_once:_,$set:w}=t;return{event:re({},bx(t,L2),{properties:re({},t.properties,w?{$set:re({},(e=(n=t.properties)==null?void 0:n.$set)!==null&&e!==void 0?e:{},w)}:{},_?{$set_once:re({},(i=(a=t.properties)==null?void 0:a.$set_once)!==null&&i!==void 0?i:{},_)}:{}),elements_chain:(o=(c=t.properties)==null?void 0:c.$elements_chain)!==null&&o!==void 0?o:"",distinct_id:(d=t.properties)==null?void 0:d.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:h}}setupSiteApp(t){var e=this.apps[t.id],n=()=>{var c;!e.errored&&this.Ro.length&&(Fi.info("Processing "+this.Ro.length+" events for site app with id "+t.id),this.Ro.forEach((d=>e.processEvent==null?void 0:e.processEvent(d))),e.processedBuffer=!0),Object.values(this.apps).every((d=>d.processedBuffer||d.errored))&&((c=this.Lo)==null||c.call(this))},i=!1,a=c=>{e.errored=!c,e.loaded=!0,Fi.info("Site app with id "+t.id+" "+(c?"loaded":"errored")),i&&n()};try{var{processEvent:o}=t.init({posthog:this._instance,callback(c){a(c)}});o&&(e.processEvent=o),i=!0}catch(c){Fi.error(QS+t.id,c),a(!1)}if(i&&e.loaded)try{n()}catch(c){Fi.error("Error while processing buffered events PostHog app with config id "+t.id,c),e.errored=!0}}Fo(){var t=this.siteAppLoaders||[];for(var e of t)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of t)this.setupSiteApp(n)}Ao(t){if(Object.keys(this.apps).length!==0){var e=this.globalsForEvent(t);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(e)}catch(i){Fi.error("Error while processing event "+t.event+" for site app "+n.id,i)}}}onRemoteConfig(t){var e,n,i,a=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.Fo(),void this._instance.on("eventCaptured",(h=>this.Ao(h)))):void Fi.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Lo)==null||n.call(this),(i=t.siteApps)!=null&&i.length)if(this.isEnabled){var o=function(h){var f;we["__$$ph_site_app_"+h]=a._instance,(f=we.__PosthogExtensions__)==null||f.loadSiteApp==null||f.loadSiteApp(a._instance,d,(g=>{if(g)return Fi.error(QS+h,g)}))};for(var{id:c,url:d}of t.siteApps)o(c)}else Fi.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},H2={tracingHeaders:class{constructor(t){this.No=void 0,this.$o=void 0,this.so=()=>{var e,n,i=this.Do()||[];ce(this.No)&&((e=we.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null||e._patchXHR(i,this._instance.get_distinct_id(),this._instance.sessionManager)),ce(this.$o)&&((n=we.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(i,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=t}initialize(){this.startIfEnabledOrStop()}lr(t){var e,n;(e=we.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns&&t(),(n=we.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(i=>{if(i)return P2.error("failed to load script",i);t()}))}Do(){var t;return(t=this._instance.config.addTracingHeaders)!==null&&t!==void 0?t:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var t,e;this.Do()?this.lr(this.so):((t=this.No)==null||t.call(this),(e=this.$o)==null||e.call(this),this.No=void 0,this.$o=void 0)}}},V2=re({surveys:class{get qt(){return this._instance.config}constructor(t){this.qo=void 0,this._surveyManager=null,this.jo=!1,this.Ho=[],this.Uo=null,this._instance=t,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this.qt.disable_surveys){var e=t.surveys;if(qe(e))return at.warn("Flags not loaded yet. Not loading surveys.");var n=Ke(e);this.qo=n?e.length>0:e,at.info("flags response received, isSurveysEnabled: "+this.qo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var t=[],e=0;e<localStorage.length;e++){var n=localStorage.key(e);(n!=null&&n.startsWith(Bm)||n!=null&&n.startsWith("inProgressSurvey_"))&&t.push(n)}t.forEach((i=>localStorage.removeItem(i)))}loadIfEnabled(){if(!this._surveyManager)if(this.jo)at.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)at.info(eE);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())at.info("Not loading surveys in cookieless mode without consent.");else{var t=we?.__PosthogExtensions__;if(t){if(!ce(this.qo)||this.qt.advanced_enable_surveys){var e=this.qo||this.qt.advanced_enable_surveys;this.jo=!0;try{var n=t.generateSurveys;if(n)return void this.Bo(n,e);var i=t.loadExternalDependency;if(!i)return void this.zo(Pv);i(this._instance,"surveys",(a=>{a||!t.generateSurveys?this.zo("Could not load surveys script",a):this.Bo(t.generateSurveys,e)}))}catch(a){throw this.zo("Error initializing surveys",a),a}finally{this.jo=!1}}}else at.error("PostHog Extensions not found.")}}Bo(t,e){this._surveyManager=t(this._instance,e),this._surveyEventReceiver=new j2(this._instance),at.info("Surveys loaded successfully"),this.Vo({isLoaded:!0})}zo(t,e){at.error(t,e),this.Vo({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.Ho.push(t),this._surveyManager&&this.Vo({isLoaded:!0}),()=>{this.Ho=this.Ho.filter((e=>e!==t))}}getSurveys(t,e){if(e===void 0&&(e=!1),this.qt.disable_surveys)return at.info(eE),t([]);var n,i=this._instance.get_property(Tm);if(i&&!e)return t(i,{isLoaded:!0});typeof Promise<"u"&&this.Uo?this.Uo.then((a=>{var{surveys:o,context:c}=a;return t(o,c)})):(typeof Promise<"u"&&(this.Uo=new Promise((a=>{n=a}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:a=>{var o;this.Uo=null;var c=a.statusCode;if(c!==200||!a.json){var d="Surveys API could not be loaded, status: "+c;at.error(d);var h={isLoaded:!1,error:d};return t([],h),void(n==null||n({surveys:[],context:h}))}var f,g=a.json.surveys||[],v=g.filter((_=>(function(w){return!(!w.start_date||w.end_date)})(_)&&((function(w){var S;return!((S=w.conditions)==null||(S=S.events)==null||(S=S.values)==null||!S.length)})(_)||(function(w){var S;return!((S=w.conditions)==null||(S=S.actions)==null||(S=S.values)==null||!S.length)})(_))));v.length>0&&((f=this._surveyEventReceiver)==null||f.register(v)),(o=this._instance.persistence)==null||o.register({[Tm]:g});var y={isLoaded:!0};t(g,y),n?.({surveys:g,context:y})}}))}
13Vo(t){for(var e of this.Ho)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(n){at.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,e){if(e===void 0&&(e=!1),!qe(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);at.warn("init was not called")}Wo(t){var e=null;return this.getSurveys((n=>{var i;e=(i=n.find((a=>a.id===t)))!==null&&i!==void 0?i:null})),e}Zo(t){if(qe(this._surveyManager))return{eligible:!1,reason:jg};var e=typeof t=="string"?this.Wo(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(qe(this._surveyManager))return at.warn("init was not called"),{visible:!1,disabledReason:jg};var e=this.Zo(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return qe(this._surveyManager)?(at.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:jg})):new Promise((n=>{this.getSurveys((i=>{var a,o=(a=i.find((d=>d.id===t)))!==null&&a!==void 0?a:null;if(o){var c=this.Zo(o);n({visible:c.eligible,disabledReason:c.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(t,e,n){var i;if(qe(this._surveyManager))at.warn("init was not called");else{var a=typeof t=="string"?this.Wo(t):t;if(a!=null&&a.id)if(f2.includes(a.type)){var o=oe?.querySelector(e);if(o)return(i=a.appearance)!=null&&i.surveyPopupDelaySeconds?(at.info("Rendering survey "+a.id+" with delay of "+a.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var c,d;at.info("Rendering survey "+a.id+" with delay of "+((c=a.appearance)==null?void 0:c.surveyPopupDelaySeconds)+" seconds"),(d=this._surveyManager)==null||d.renderSurvey(a,o,n),at.info("Survey "+a.id+" rendered")}),1e3*a.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(a,o,n);at.warn("Survey element not found")}else at.warn("Surveys of type "+a.type+" cannot be rendered in the app");else at.warn("Survey not found")}}displaySurvey(t,e){var n;if(qe(this._surveyManager))at.warn("init was not called");else{var i=this.Wo(t);if(i){var a=i;if((n=i.appearance)!=null&&n.surveyPopupDelaySeconds&&e.ignoreDelay&&(a=re({},i,{appearance:re({},i.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==Dm.Popover&&e.initialResponses&&at.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var o=this.canRenderSurvey(i);if(!o.visible)return void at.warn("Survey is not eligible to be displayed: ",o.disabledReason)}e.displayType!==Dm.Inline?this._surveyManager.handlePopoverSurvey(a,e):this.renderSurvey(a,e.selector,e.properties)}else at.warn("Survey not found")}}cancelPendingSurvey(t){qe(this._surveyManager)?at.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload()}}},Ph),G2={toolbar:class{constructor(t){this.instance=t}Go(t){we.ph_toolbar_state=t}Qo(){var t;return(t=we.ph_toolbar_state)!==null&&t!==void 0?t:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(t,e,n){if(t===void 0&&(t=void 0),e===void 0&&(e=void 0),n===void 0&&(n=void 0),tT(this.instance.config)||!V||!oe)return!1;t=t??V.location,n=n??V.history;try{if(!e){try{V.localStorage.setItem("test","test"),V.localStorage.removeItem("test")}catch{return!1}e=V?.localStorage}var i,a=I2||lh(t.hash,"__posthog")||lh(t.hash,"state"),o=a?vS((()=>JSON.parse(atob(decodeURIComponent(a)))))||vS((()=>JSON.parse(decodeURIComponent(a)))):null;return o&&o.action==="ph_authorize"?((i=o).source="url",i&&Object.keys(i).length>0&&(o.desiredHash?t.hash=o.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):((i=JSON.parse(e.getItem(tE)||"{}")).source="localstorage",delete i.userIntent),!(!i.token||this.instance.config.token!==i.token||(this.loadToolbar(i),0))}catch{return!1}}Jo(t){var e=we.ph_load_toolbar||we.ph_load_editor;!qe(e)&&ii(e)?e(t,this.instance):nE.warn("No toolbar load function found")}loadToolbar(t){var e=!(oe==null||!oe.getElementById(Zx));if(!V||e)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,i=re({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(V.localStorage.setItem(tE,JSON.stringify(re({},i,{source:void 0}))),this.Qo()===2)this.Jo(i);else if(this.Qo()===0){var a;this.Go(1),(a=we.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this.instance,"toolbar",(o=>{if(o)return nE.error("[Toolbar] Failed to load",o),void this.Go(0);this.Go(2),this.Jo(i)})),Lt(V,"turbolinks:load",(()=>{this.Go(0),this.loadToolbar(i)}))}return!0}Ko(t){return this.loadToolbar(t)}maybeLoadEditor(t,e,n){return t===void 0&&(t=void 0),e===void 0&&(e=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(t,e,n)}}},Y2=re({experiments:rn},Ph),K2={conversations:class{constructor(t){this.Yo=void 0,this._conversationsManager=null,this.Xo=!1,this.ea=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_conversations){var e=t.conversations;qe(e)||(Cr(e)?this.Yo=e:(this.Yo=e.enabled,this.ea=e),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.Yo=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Xo||this._instance.config.disable_conversations||tT(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=we?.__PosthogExtensions__;if(t&&!ce(this.Yo)&&this.Yo)if(this.ea&&this.ea.token){this.Xo=!0;try{var e=t.initConversations;if(e)return this.ta(e),void(this.Xo=!1);var n=t.loadExternalDependency;if(!n)return void this.ra(Pv);n(this._instance,"conversations",(i=>{i||!t.initConversations?this.ra("Could not load conversations script",i):this.ta(t.initConversations),this.Xo=!1}))}catch(i){this.ra("Error initializing conversations",i),this.Xo=!1}}else Qn.error("Conversations enabled but missing token in remote config.")}}ta(t){if(this.ea)try{this._conversationsManager=t(this.ea,this._instance),Qn.info("Conversations loaded successfully")}catch(e){this.ra("Error completing conversations initialization",e)}else Qn.error("Cannot complete initialization: remote config is null")}ra(t,e){Qn.error(t,e),this._conversationsManager=null,this.Xo=!1}show(){this._conversationsManager?this._conversationsManager.show():Qn.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Yo===!0&&!pi(this._conversationsManager)}isVisible(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&t!==void 0&&t}sendMessage(t,e,n){var i=this;return jn((function*(){return i._conversationsManager?i._conversationsManager.sendMessage(t,e,n):(Qn.warn(Ds),null)}))()}getMessages(t,e){var n=this;return jn((function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(Qn.warn(Ds),null)}))()}markAsRead(t){var e=this;return jn((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(Qn.warn(Ds),null)}))()}getTickets(t){var e=this;return jn((function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(Qn.warn(Ds),null)}))()}requestRestoreLink(t){var e=this;return jn((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(Qn.warn(Ds),null)}))()}restoreFromToken(t){var e=this;return jn((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(Qn.warn(Ds),null)}))()}restoreFromUrlToken(){var t=this;return jn((function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(Qn.warn(Ds),null)}))()}getCurrentTicketId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getCurrentTicketId())!==null&&t!==void 0?t:null}getWidgetSessionId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getWidgetSessionId())!==null&&t!==void 0?t:null}ln(){var t;(t=this._conversationsManager)==null||t.setIdentity()}hn(){var t;(t=this._conversationsManager)==null||t.clearIdentity()}}},W2={logs:class{constructor(t){var e;this.ia=!1,this.na=!1,this.Gt=vt("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.ua=!1,this._instance=t,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(t){var e,n=(e=t.logs)==null?void 0:e.captureConsoleLogs;!qe(n)&&n&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.oa=0,this.aa=0,this.ua=!1}loadIfEnabled(){if(this.ia&&!this.na){var t=we?.__PosthogExtensions__;if(t){var e=t.loadExternalDependency;e?e(this._instance,"logs",(n=>{var i;n||(i=t.logs)==null||!i.initializeLogs?this.Gt.error("Could not load logs script",n):(t.logs.initializeLogs(this._instance),this.na=!0)})):this.Gt.error(Pv)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(t){var e,n,i,a,o,c;if(this._instance.is_capturing())if(t&&t.body){var d=(e=(n=this._instance.config.logs)==null?void 0:n.flushIntervalMs)!==null&&e!==void 0?e:3e3,h=(i=(a=this._instance.config.logs)==null?void 0:a.maxLogsPerInterval)!==null&&i!==void 0?i:1e3,f=Date.now();if(d>f-this.aa||(this.aa=f,this.oa=0,this.ua=!1),h>this.oa){this.oa++;var g=(function(v,y){var _=v.level||"info",{text:w,number:S}=Bx[_]||oD,k=String(Date.now())+"000000",x={};y.distinctId&&(x.posthogDistinctId=y.distinctId),y.sessionId&&(x.sessionId=y.sessionId),y.currentUrl&&(x["url.full"]=y.currentUrl),y.screenName&&(x["screen.name"]=y.screenName),y.appState&&(x["app.state"]=y.appState),y.activeFeatureFlags&&y.activeFeatureFlags.length>0&&(x.feature_flags=y.activeFeatureFlags);var C=re({},x,v.attributes||{}),A={timeUnixNano:k,observedTimeUnixNano:k,severityNumber:S,severityText:w,body:{stringValue:v.body},attributes:pS(C)};return v.trace_id&&(A.traceId=v.trace_id),v.span_id&&(A.spanId=v.span_id),ce(v.trace_flags)||(A.flags=v.trace_flags),A})(t,this.la());this.sa.push({record:g}),((o=(c=this._instance.config.logs)==null?void 0:c.maxBufferSize)!==null&&o!==void 0?o:100)>this.sa.length?this.ha():this.flushLogs()}else this.ua||(this.Gt.warn("captureLog dropping logs: exceeded "+h+" logs per "+d+"ms"),this.ua=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={trace:(t,e)=>this.captureLog({body:t,level:"trace",attributes:e}),debug:(t,e)=>this.captureLog({body:t,level:"debug",attributes:e}),info:(t,e)=>this.captureLog({body:t,level:"info",attributes:e}),warn:(t,e)=>this.captureLog({body:t,level:"warn",attributes:e}),error:(t,e)=>this.captureLog({body:t,level:"error",attributes:e}),fatal:(t,e)=>this.captureLog({body:t,level:"fatal",attributes:e})}),this.ca}flushLogs(t){if(this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.sa.length!==0){var e=this.sa;this.sa=[];var n=this._instance.config.logs,i=re({"service.name":n?.serviceName||"unknown_service"},n?.environment&&{"deployment.environment":n.environment},n?.serviceVersion&&{"service.version":n.serviceVersion},n?.resourceAttributes),a=(function(c,d,h,f){return{resourceLogs:[{resource:{attributes:pS(d)},scopeLogs:[{scope:{name:h,version:f},logRecords:c}]}]}})(e.map((c=>c.record)),i,cn.LIB_NAME,cn.LIB_VERSION),o=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Bi({method:"POST",url:o,data:a,compression:"best-available",batchKey:"logs",transport:t})}}ha(){var t,e;this.qr||(this.qr=setTimeout((()=>{this.qr=void 0,this.flushLogs()}),(t=(e=this._instance.config.logs)==null?void 0:e.flushIntervalMs)!==null&&t!==void 0?t:3e3))}la(){var t,e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);e.sessionId=n}if(we!=null&&(t=we.location)!=null&&t.href&&(e.currentUrl=we.location.href),this._instance.featureFlags){var i=this._instance.featureFlags.getFlags();i&&i.length>0&&(e.activeFeatureFlags=i)}return e}}},J2=re({},Ph,z2,U2,B2,q2,F2,V2,H2,G2,Y2,K2,W2);tr.__defaultExtensionClasses=re({},J2);var aE,Qs=(aE=ac[io]=new tr,(function(){function t(){t.done||(t.done=!0,ET=!1,ft(ac,(function(e){e._dom_loaded()})))}oe!=null&&oe.addEventListener?oe.readyState==="complete"?t():Lt(oe,"DOMContentLoaded",t,{capture:!1}):V&&ae.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),aE),MT;function Z2(t){MT=t}function Gm(){return MT}var LT=ne.createContext({get client(){return Gm()},bootstrap:void 0});function NT(t,e,n){if(n===void 0&&(n=new WeakMap),t===e)return!0;
13if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(n.has(t)&&n.get(t)===e)return!0;n.set(t,e);var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var o=0,c=i;o<c.length;o++){var d=c[o];if(!a.includes(d)||!NT(t[d],e[d],n))return!1}return!0}function X2(t){var e,n,i=t.children,a=t.client,o=t.apiKey,c=t.options,d=ne.useRef(null),h=ne.useMemo(function(){if(a)return o&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),c&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),a;var f=Gm();return o||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),f},[a,o,JSON.stringify(c)]);return ne.useEffect(function(){if(!a){var f=Gm(),g=d.current;g?(o!==g.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),c&&!NT(c,g.options)&&f.set_config(c),d.current={apiKey:o,options:c??{}}):(f.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),f.init(o,c),d.current={apiKey:o,options:c??{}})}},[a,o,JSON.stringify(c)]),pr.createElement(LT.Provider,{value:{client:h,bootstrap:(e=c?.bootstrap)!==null&&e!==void 0?e:(n=a?.config)===null||n===void 0?void 0:n.bootstrap}},i)}var $g=function(t){return typeof t=="function"},Ym=function(t,e){return Ym=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},Ym(t,e)};function Q2(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ym(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ej={componentStack:null,exceptionEvent:null,error:null},tj={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(t){Q2(e,t);function e(n){var i=t.call(this,n)||this;return i.state=ej,i}return e.prototype.componentDidCatch=function(n,i){var a=this.props.additionalProperties,o;$g(a)?o=a(n):typeof a=="object"&&(o=a);var c=this.context.client,d=c.captureException(n,o),h=i.componentStack;this.setState({error:n,componentStack:h??null,exceptionEvent:d})},e.prototype.render=function(){var n=this.props,i=n.children,a=n.fallback,o=this.state;if(o.componentStack==null)return $g(i)?i():i;var c=$g(a)?pr.createElement(a,{error:o.error,componentStack:o.componentStack,exceptionEvent:o.exceptionEvent}):a;return pr.isValidElement(c)?c:(console.warn(tj.INVALID_FALLBACK),pr.createElement(pr.Fragment,null))},e.contextType=LT,e})(pr.Component);Z2(Qs);function Mh(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]]);return n}function nj(t,e,n,i){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{f(i.next(g))}catch(v){c(v)}}function h(g){try{f(i.throw(g))}catch(v){c(v)}}function f(g){g.done?o(g.value):a(g.value).then(d,h)}f((i=i.apply(t,e||[])).next())})}const rj=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class $v extends Error{constructor(e,n="FunctionsError",i){super(e),this.name=n,this.context=i}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class ij extends $v{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class oE extends $v{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class lE extends $v{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Km;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Km||(Km={}));class sj{constructor(e,{headers:n={},customFetch:i,region:a=Km.Any}={}){this.url=e,this.headers=n,this.region=a,this.fetch=rj(i)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return nj(this,arguments,void 0,function*(n,i={}){var a;let o,c;try{const{headers:d,method:h,body:f,signal:g,timeout:v}=i;let y={},{region:_}=i;_||(_=this.region);const w=new URL(`${this.url}/${n}`);_&&_!=="any"&&(y["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let S;f&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&f instanceof Blob||f instanceof ArrayBuffer?(y["Content-Type"]="application/octet-stream",S=f):typeof f=="string"?(y["Content-Type"]="text/plain",S=f):typeof FormData<"u"&&f instanceof FormData?S=f:(y["Content-Type"]="application/json",S=JSON.stringify(f)):f&&typeof f!="string"&&!(typeof Blob<"u"&&f instanceof Blob)&&!(f instanceof ArrayBuffer)&&!(typeof FormData<"u"&&f instanceof FormData)?S=JSON.stringify(f):S=f;let k=g;v&&(c=new AbortController,o=setTimeout(()=>c.abort(),v),g?(k=c.signal,g.addEventListener("abort",()=>c.abort())):k=c.signal);const x=yield this.fetch(w.toString(),{method:h||"POST",headers:Object.assign(Object.assign(Object.assign({},y),this.headers),d),body:S,signal:k}).catch(D=>{throw new ij(D)}),C=x.headers.get("x-relay-error");
13if(C&&C==="true")throw new oE(x);if(!x.ok)throw new lE(x);let A=((a=x.headers.get("Content-Type"))!==null&&a!==void 0?a:"text/plain").split(";")[0].trim(),M;return A==="application/json"?M=yield x.json():A==="application/octet-stream"||A==="application/pdf"?M=yield x.blob():A==="text/event-stream"?M=x:A==="multipart/form-data"?M=yield x.formData():M=yield x.text(),{data:M,error:null,response:x}}catch(d){return{data:null,error:d,response:d instanceof lE||d instanceof oE?d.context:void 0}}finally{o&&clearTimeout(o)}})}}const DT=3,cE=t=>Math.min(1e3*2**t,3e4),aj=[520,503],jT=["GET","HEAD","OPTIONS"];var oj=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function uE(t,e){return new Promise(n=>{if(e?.aborted){n();return}const i=setTimeout(()=>{e?.removeEventListener("abort",a),n()},t);function a(){clearTimeout(i),n()}e?.addEventListener("abort",a)})}function lj(t,e,n,i){return!(!i||n>=DT||!jT.includes(t)||!aj.includes(e))}var cj=class{constructor(t){var e,n,i,a,o;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(i=t.shouldStripNulls)!==null&&i!==void 0?i:!1,this.urlLengthLimit=(a=t.urlLengthLimit)!==null&&a!==void 0?a:8e3,this.retryEnabled=(o=t.retry)!==null&&o!==void 0?o:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const i=this.fetch;let o=(async()=>{let c=0;for(;;){const f=new Headers(n.headers);c>0&&f.set("X-Retry-Count",String(c));let g;try{g=await i(n.url.toString(),{method:n.method,headers:f,body:JSON.stringify(n.body,(v,y)=>typeof y=="bigint"?y.toString():y),signal:n.signal})}catch(v){if(v?.name==="AbortError"||v?.code==="ABORT_ERR"||!jT.includes(n.method))throw v;if(n.retryEnabled&&c<DT){const y=cE(c);c++,await uE(y,n.signal);continue}throw v}if(lj(n.method,g.status,c,n.retryEnabled)){var d,h;const v=(d=(h=g.headers)===null||h===void 0?void 0:h.get("Retry-After"))!==null&&d!==void 0?d:null,y=v!==null?Math.max(0,parseInt(v,10)||0)*1e3:cE(c);await g.text(),c++,await uE(y,n.signal);continue}return await n.processResponse(g)}})();return this.shouldThrowOnError||(o=o.catch(c=>{var d;let h="",f="",g="";const v=c?.cause;if(v){var y,_,w,S;const C=(y=v?.message)!==null&&y!==void 0?y:"",A=(_=v?.code)!==null&&_!==void 0?_:"";h=`${(w=c?.name)!==null&&w!==void 0?w:"FetchError"}: ${c?.message}`,h+=`
14
15Caused by: ${(S=v?.name)!==null&&S!==void 0?S:"Error"}: ${C}`,A&&(h+=` (${A})`),v?.stack&&(h+=`
16${v.stack}`)}else{var k;h=(k=c?.stack)!==null&&k!==void 0?k:""}const x=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(g="",f="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(f+=`. Note: Your request URL is ${x} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(v?.name==="HeadersOverflowError"||v?.code==="UND_ERR_HEADERS_OVERFLOW")&&(g="",f="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(f+=`. Your request URL is ${x} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=c?.name)!==null&&d!==void 0?d:"FetchError"}: ${c?.message}`,details:h,hint:f,code:g},data:null,count:null,status:0,statusText:""}}
16)),o.then(t,e)}async processResponse(t){var e=this;let n=null,i=null,a=null,o=t.status,c=t.statusText;if(t.ok){var d,h;if(e.method!=="HEAD"){var f;const y=await t.text();y===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((f=e.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?i=y:i=JSON.parse(y))}const g=(d=e.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),v=(h=t.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");g&&v&&v.length>1&&(a=parseInt(v[1])),e.isMaybeSingle&&Array.isArray(i)&&(i.length>1?(n={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,a=null,o=406,c="Not Acceptable"):i.length===1?i=i[0]:i=null)}else{const g=await t.text();try{n=JSON.parse(g),Array.isArray(n)&&t.status===404&&(i=[],n=null,o=200,c="OK")}catch{t.status===404&&g===""?(o=204,c="No Content"):n={message:g}}if(n&&e.shouldThrowOnError)throw new oj(n)}return{success:n===null,error:n,data:i,count:a,status:o,statusText:c}}returns(){return this}overrideTypes(){return this}},uj=class extends cj{select(t){let e=!1;const n=(t??"*").split("").map(i=>/\s/.test(i)&&!e?"":(i==='"'&&(e=!e),i)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:i,referencedTable:a=i}={}){const o=a?`${a}.order`:"order",c=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${c?`${c},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:i=n}={}){const a=typeof i>"u"?"offset":`${i}.offset`,o=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(a,`${t}`),this.url.searchParams.set(o,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:i=!1,wal:a=!1,format:o="text"}={}){var c;const d=[t?"analyze":null,e?"verbose":null,n?"settings":null,i?"buffers":null,a?"wal":null].filter(Boolean).join("|"),h=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${h}"; options=${d};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const dE=new RegExp("[,()]");var so=class extends uj{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(i=>typeof i=="string"&&dE.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(i=>typeof i=="string"&&dE.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:i}={}){let a="";i==="plain"?a="pl":i==="phrase"?a="ph":i==="websearch"&&(a="w");const o=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${a}fts${o}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>
16n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const i=n?`${n}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},dj=class{constructor(t,{headers:e={},schema:n,fetch:i,urlLengthLimit:a=8e3,retry:o}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=i,this.urlLengthLimit=a,this.retry=o}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:i}=e??{},a=n?"HEAD":"GET";let o=!1;const c=(t??"*").split("").map(f=>/\s/.test(f)&&!o?"":(f==='"'&&(o=!o),f)).join(""),{url:d,headers:h}=this.cloneRequestState();return d.searchParams.set("select",c),i&&h.append("Prefer",`count=${i}`),new so({method:a,url:d,headers:h,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var i;const a="POST",{url:o,headers:c}=this.cloneRequestState();if(e&&c.append("Prefer",`count=${e}`),n||c.append("Prefer","missing=default"),Array.isArray(t)){const d=t.reduce((h,f)=>h.concat(Object.keys(f)),[]);if(d.length>0){const h=[...new Set(d)].map(f=>`"${f}"`);o.searchParams.set("columns",h.join(","))}}return new so({method:a,url:o,headers:c,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:i,defaultToNull:a=!0}={}){var o;const c="POST",{url:d,headers:h}=this.cloneRequestState();if(h.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&d.searchParams.set("on_conflict",e),i&&h.append("Prefer",`count=${i}`),a||h.append("Prefer","missing=default"),Array.isArray(t)){const f=t.reduce((g,v)=>g.concat(Object.keys(v)),[]);if(f.length>0){const g=[...new Set(f)].map(v=>`"${v}"`);d.searchParams.set("columns",g.join(","))}}return new so({method:c,url:d,headers:h,schema:this.schema,body:t,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const i="PATCH",{url:a,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new so({method:i,url:a,headers:o,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:i,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new so({method:n,url:i,headers:a,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Tc(t){"@babel/helpers - typeof";return Tc=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},Tc(t)}function hj(t,e){if(Tc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Tc(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fj(t){var e=hj(t,"string");return Tc(e)=="symbol"?e:e+""}function pj(t,e,n){return(e=fj(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hE(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function gd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hE(Object(n),!0).forEach(function(i){pj(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hE(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}var gj=class IT{constructor(e,{headers:n={},schema:i,fetch:a,timeout:o,urlLengthLimit:c=8e3,retry:d}={}){this.url=e,this.headers=new Headers(n),this.schemaName=i,this.urlLengthLimit=c;const h=a??globalThis.fetch;o!==void 0&&o>0?this.fetch=(f,g)=>{const v=new AbortController,y=setTimeout(()=>v.abort(),o),_=g?.signal;if(_){if(_.aborted)return clearTimeout(y),h(f,g);const w=()=>{clearTimeout(y),v.abort()};return _.addEventListener("abort",w,{once:!0}),h(f,gd(gd({},g),{},{signal:v.signal})).finally(()=>{clearTimeout(y),_.removeEventListener("abort",w)})}return h(f,gd(gd({},g),{},{signal:v.signal})).finally(()=>clearTimeout(y))}:this.fetch=h,this.retry=d}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new dj(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new IT(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:i=!1,get:a=!1,count:o}={}){var c;let d;const h=new URL(`${this.url}/rpc/${e}`);let f;const g=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(g)),v=i&&Object.values(n).some(g);v?(d="POST",f=n):i||a?(d=i?"HEAD":"GET",Object.entries(n).filter(([_,w])=>w!==void 0).map(([_,w])=>[_,Array.isArray(w)?`{${w.join(",")}}`:`${w}
16`]).forEach(([_,w])=>{h.searchParams.append(_,w)})):(d="POST",f=n);const y=new Headers(this.headers);return v?y.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&y.set("Prefer",`count=${o}`),new so({method:d,url:h,headers:y,schema:this.schemaName,body:f,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class mj{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const i=typeof global<"u"?global:void 0;if(i&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const a=globalThis.process;if(a){const o=a.versions;if(o&&o.node){const c=o.node,d=parseInt(c.replace(/^v/,"").split(".")[0]);return d>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${d} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${d} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
17import ws from "ws"
18new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=`
19
20Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const vj="2.105.4",yj=`realtime-js/${vj}`,_j="1.0.0",$T="2.0.0",bj=$T,wj=1e4,Sj=100,Wi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},zT={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Wm={connecting:"connecting",closing:"closing",closed:"closed"};class Ej{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let i=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,i;const a=(i=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,a)}_encodeJsonUserBroadcastPush(e){var n,i;const a=(i=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&i!==void 0?i:{},c=new TextEncoder().encode(JSON.stringify(a)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(e,n,i){var a,o;const c=e.topic,d=(a=e.ref)!==null&&a!==void 0?a:"",h=(o=e.join_ref)!==null&&o!==void 0?o:"",f=e.payload.event,g=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},v=Object.keys(g).length===0?"":JSON.stringify(g);if(h.length>255)throw new Error(`joinRef length ${h.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`userEvent length ${f.length} exceeds maximum of 255`);if(v.length>255)throw new Error(`metadata length ${v.length} exceeds maximum of 255`);const y=this.USER_BROADCAST_PUSH_META_LENGTH+h.length+d.length+c.length+f.length+v.length,_=new ArrayBuffer(this.HEADER_LENGTH+y);let w=new DataView(_),S=0;w.setUint8(S++,this.KINDS.userBroadcastPush),w.setUint8(S++,h.length),w.setUint8(S++,d.length),w.setUint8(S++,c.length),w.setUint8(S++,f.length),w.setUint8(S++,v.length),w.setUint8(S++,n),Array.from(h,x=>w.setUint8(S++,x.charCodeAt(0))),Array.from(d,x=>w.setUint8(S++,x.charCodeAt(0))),Array.from(c,x=>w.setUint8(S++,x.charCodeAt(0))),Array.from(f,x=>w.setUint8(S++,x.charCodeAt(0))),Array.from(v,x=>w.setUint8(S++,x.charCodeAt(0)));var k=new Uint8Array(_.byteLength+i.byteLength);return k.set(new Uint8Array(_),0),k.set(new Uint8Array(i),_.byteLength),k.buffer}decode(e,n){if(this._isArrayBuffer(e)){let i=this._binaryDecode(e);return n(i)}if(typeof e=="string"){const i=JSON.parse(e),[a,o,c,d,h]=i;
20return n({join_ref:a,ref:o,topic:c,event:d,payload:h})}return n({})}_binaryDecode(e){const n=new DataView(e),i=n.getUint8(0),a=new TextDecoder;if(i===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,n,a)}_decodeUserBroadcast(e,n,i){const a=n.getUint8(1),o=n.getUint8(2),c=n.getUint8(3),d=n.getUint8(4);let h=this.HEADER_LENGTH+4;const f=i.decode(e.slice(h,h+a));h=h+a;const g=i.decode(e.slice(h,h+o));h=h+o;const v=i.decode(e.slice(h,h+c));h=h+c;const y=e.slice(h,e.byteLength),_=d===this.JSON_ENCODING?JSON.parse(i.decode(y)):y,w={type:this.BROADCAST_EVENT,event:g,payload:_};return c>0&&(w.meta=JSON.parse(v)),{join_ref:null,ref:null,topic:f,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e?.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([i])=>n.includes(i)))}}var ut;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(ut||(ut={}));const fE=(t,e,n={})=>{var i;const a=(i=n.skipTypes)!==null&&i!==void 0?i:[];return e?Object.keys(e).reduce((o,c)=>(o[c]=kj(c,t,e,a),o),{}):{}},kj=(t,e,n,i)=>{const a=e.find(d=>d.name===t),o=a?.type,c=n[t];return o&&!i.includes(o)?UT(o,c):Jm(c)},UT=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return Aj(e,n)}switch(t){case ut.bool:return xj(e);case ut.float4:case ut.float8:case ut.int2:case ut.int4:case ut.int8:case ut.numeric:case ut.oid:return Tj(e);case ut.json:case ut.jsonb:return Rj(e);case ut.timestamp:return Cj(e);case ut.abstime:case ut.date:case ut.daterange:case ut.int4range:case ut.int8range:case ut.money:case ut.reltime:case ut.text:case ut.time:case ut.timestamptz:case ut.timetz:case ut.tsrange:case ut.tstzrange:return Jm(e);default:return Jm(e)}},Jm=t=>t,xj=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},Tj=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},Rj=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},Aj=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,i=t[n];if(t[0]==="{"&&i==="}"){let o;const c=t.slice(1,n);try{o=JSON.parse("["+c+"]")}catch{o=c?c.split(","):[]}return o.map(d=>UT(e,d))}return t},Cj=t=>typeof t=="string"?t.replace(" ","T"):t,BT=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var lc=t=>typeof t=="function"?t:function(){return t},Oj=typeof self<"u"?self:null,ao=typeof window<"u"?window:null,kr=Oj||ao||globalThis,Pj="2.0.0",Mj=1e4,Lj=1e3,Rr={connecting:0,open:1,closing:2,closed:3},wn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ni={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Zm={longpoll:"longpoll",websocket:"websocket"},Nj={complete:4},Xm="base64url.bearer.phx.",md=class{constructor(t,e,n,i){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 8,135 bytes, line 20
20matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(i=>i.status===t).forEach(i=>i.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},qT=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Dj=class{constructor(t,e,n){this.state=wn.closed,this.topic=t,this.params=lc(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new md(this,ni.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new qT(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=wn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this.joinPush.receive("error",i=>{this.state=wn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=wn.closed,this.socket.remove(this)}),this.onError(i=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.isJoining()&&this.joinPush.reset(),this.state=wn.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new md(this,ni.leave,lc({}),this.timeout).send(),this.state=wn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ni.reply,(i,a)=>{this.trigger(this.replyEventName(a),i)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=wn.closed,this.bindings=[]}onClose(t){this.on(ni.close,t)}onError(t){return this.on(ni.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new md(this,t,function(){return e},n);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=wn.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ni.close,"leave")},n=new md(this,ni.leave,lc({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,i){return this.topic!==t?!1:i&&i!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:i}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=wn.joining,this.joinPush.resend(t))}trigger(t,e,n,i){let a=this.onMessage(t,e,n,i);if(e&&!a)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(c=>c.event===t&&this.filterBindings(c,e,n));for(let c=0;c<o.length;c++)o[c].callback(a,n,i||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===wn.closed}isErrored(){return this.state===wn.errored}isJoined(){return this.state===wn.joined}isJoining(){return this.state===wn.joining}isLeaving(){return this.state===wn.leaving}},fh=class{static request(t,e,n,i,a,o,c){if(kr.XDomainRequest){let d=new kr.XDomainRequest;return this.xdomainRequest(d,t,e,i,a,o,c)}else if(kr.XMLHttpRequest){let d=new kr.XMLHttpRequest;return this.xhrRequest(d,t,e,n,i,a,o,c)}else{if(kr.fetch&&kr.AbortController)return this.fetchRequest(t,e,n,i,a,o,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,i,a,o,c){let d={method:t,headers:n,body:i},h=null;return a&&(h=new AbortController,setTimeout(()=>h.abort(),a),d.signal=h.signal),kr.fetch(e,d).then(f=>f.text()).then(f=>this.parseJSON(f)).then(f=>c&&c(f)).catch(f=>{f.name==="AbortError"&&o?o():c&&c(null)}),h}static xdomainRequest(t,e,n,i,a,o,c){return t.timeout=a,t.open(e,n),t.onload=()=>{let d=this.parseJSON(t.responseText);c&&c(d)},o&&(t.ontimeout=o),t.onprogress=()=>{},t.send(i),t}static xhrRequest(t,e,n,i,a,o,c,d){t.open(e,n,!0),t.timeout=o;for(let[h,f]of Object.entries(i))t.setRequestHeader(h,f);return t.onerror=()=>d&&d(null),t.onreadystatechange=()=>{if(t.readyState===Nj.complete&&d){let h=this.parseJSON(t.responseText);d(h)}},c&&(t.ontimeout=c),t.send(a),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=e?`${e}[${i}]`:i,o=t[i];typeof o=="object"?n.push(this.serialize(o,a)):n.push(encodeURIComponent(a)+"="+encodeURIComponent(o))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},jj=t=>{let e="",n=new Uint8Array(t),i=n.byteLength;for(let a=0;a<i;a++)e+=String.fromCharCode(n[a]);return btoa(e)},Ka=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Xm)&&(this.authToken=atob(e[1].slice(Xm.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Rr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Zm.websocket),"$1/"+Zm.longpoll)}endpointURL(){return fh.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=Rr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Rr.open||this.readyState===Rr.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:i,messages:a}=e;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=i}else n=0;switch(n){case 200:a.forEach(o=>{setTimeout(()=>this.onmessage({data:o}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Rr.open,this.onopen({}),this.poll();break;
20case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(t){typeof t!="string"&&(t=jj(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
21`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,n){for(let a of this.reqs)a.abort();this.readyState=Rr.closed;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(t,e,n,i,a){let o,c=()=>{this.reqs.delete(o),i()};o=fh.request(t,this.endpointURL(),e,n,this.timeout,c,d=>{this.reqs.delete(o),this.isActive()&&a(d)}),this.reqs.add(o)}},Ij=class Ql{constructor(e,n={}){let i=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(i.state,a=>{let{onJoin:o,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ql.syncState(this.state,a,o,c),this.pendingDiffs.forEach(h=>{this.state=Ql.syncDiff(this.state,h,o,c)}),this.pendingDiffs=[],d()}),this.channel.on(i.diff,a=>{let{onJoin:o,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=Ql.syncDiff(this.state,a,o,c),d())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Ql.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,i,a){let o=this.clone(e),c={},d={};return this.map(o,(h,f)=>{n[h]||(d[h]=f)}),this.map(n,(h,f)=>{let g=o[h];if(g){let v=f.metas.map(S=>S.phx_ref),y=g.metas.map(S=>S.phx_ref),_=f.metas.filter(S=>y.indexOf(S.phx_ref)<0),w=g.metas.filter(S=>v.indexOf(S.phx_ref)<0);_.length>0&&(c[h]=f,c[h].metas=_),w.length>0&&(d[h]=this.clone(g),d[h].metas=w)}else c[h]=f}),this.syncDiff(o,{joins:c,leaves:d},i,a)}static syncDiff(e,n,i,a){let{joins:o,leaves:c}=this.clone(n);return i||(i=function(){}),a||(a=function(){}),this.map(o,(d,h)=>{let f=e[d];if(e[d]=this.clone(h),f){let g=e[d].metas.map(y=>y.phx_ref),v=f.metas.filter(y=>g.indexOf(y.phx_ref)<0);e[d].metas.unshift(...v)}i(d,f,h)}),this.map(c,(d,h)=>{let f=e[d];if(!f)return;let g=h.metas.map(v=>v.phx_ref);f.metas=f.metas.filter(v=>g.indexOf(v.phx_ref)<0),a(d,f,h),f.metas.length===0&&delete e[d]}),e}static list(e,n){return n||(n=function(i,a){return a}),this.map(e,(i,a)=>n(i,a))}static map(e,n){return Object.getOwnPropertyNames(e).map(i=>n(i,e[i]))}static clone(e){return JSON.parse(JSON.stringify(e))}},vd={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,i,a,o,c]=JSON.parse(t);return e({join_ref:n,ref:i,topic:a,event:o,payload:c})}},binaryEncode(t){let{join_ref:e,ref:n,event:i,topic:a,payload:o}=t,c=this.META_LENGTH+e.length+n.length+a.length+i.length,d=new ArrayBuffer(this.HEADER_LENGTH+c),h=new DataView(d),f=0;h.setUint8(f++,this.KINDS.push),h.setUint8(f++,e.length),h.setUint8(f++,n.length),h.setUint8(f++,a.length),h.setUint8(f++,i.length),Array.from(e,v=>h.setUint8(f++,v.charCodeAt(0))),Array.from(n,v=>h.setUint8(f++,v.charCodeAt(0))),Array.from(a,v=>h.setUint8(f++,v.charCodeAt(0))),Array.from(i,v=>h.setUint8(f++,v.charCodeAt(0)));var g=new Uint8Array(d.byteLength+o.byteLength);return g.set(new Uint8Array(d),0),g.set(new Uint8Array(o),d.byteLength),g.buffer},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,i);case this.KINDS.reply:return this.decodeReply(t,e,i);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,i)}},decodePush(t,e,n){let i=e.getUint8(1),a=e.getUint8(2),o=e.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,d=n.decode(t.slice(c,c+i));c=c+i;let h=n.decode(t.slice(c,c+a));c=c+a;
21let f=n.decode(t.slice(c,c+o));c=c+o;let g=t.slice(c,t.byteLength);return{join_ref:d,ref:null,topic:h,event:f,payload:g}},decodeReply(t,e,n){let i=e.getUint8(1),a=e.getUint8(2),o=e.getUint8(3),c=e.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,h=n.decode(t.slice(d,d+i));d=d+i;let f=n.decode(t.slice(d,d+a));d=d+a;let g=n.decode(t.slice(d,d+o));d=d+o;let v=n.decode(t.slice(d,d+c));d=d+c;let y=t.slice(d,t.byteLength),_={status:v,response:y};return{join_ref:h,ref:f,topic:g,event:ni.reply,payload:_}},decodeBroadcast(t,e,n){let i=e.getUint8(1),a=e.getUint8(2),o=this.HEADER_LENGTH+2,c=n.decode(t.slice(o,o+i));o=o+i;let d=n.decode(t.slice(o,o+a));o=o+a;let h=t.slice(o,t.byteLength);return{join_ref:null,ref:null,topic:c,event:d,payload:h}}},$j=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||Mj,this.transport=e.transport||kr.WebSocket||Ka,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=kr&&kr.sessionStorage}catch{}this.sessionStore=e.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=vd.encode.bind(vd),this.defaultDecoder=vd.decode.bind(vd),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ka?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;ao&&ao.addEventListener&&(ao.addEventListener("pagehide",a=>{this.conn&&(this.disconnect(),i=this.connectClock)}),ao.addEventListener("pageshow",a=>{i===this.connectClock&&(i=null,this.connect())}),ao.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=a=>e.rejoinAfterMs?e.rejoinAfterMs(a):[1e3,2e3,5e3][a-1]||1e4,this.reconnectAfterMs=a=>e.reconnectAfterMs?e.reconnectAfterMs(a):[10,50,100,150,200,250,500,1e3,2e3][a-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(a,o,c)=>{console.log(`${a}: ${o}`,c)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=lc(e.params||{}),this.endPoint=`${t}/${Zm.websocket}`,this.vsn=e.vsn||Pj,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new qT(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Ka}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=fh.appendParams(fh.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=lc(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ka?this.connectWithF
vendor: 4,353 bytes, line 21
21allback(Ka,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let i=this.onMessage(a=>{a.ref===e&&(this.off([i]),t(Date.now()-n))});return!0}transportName(t){return t===Ka?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Xm}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,i=!0,a,o,c=this.transportName(t),d=h=>{this.log("transport",`falling back to ${c}...`,h),this.off([a,o]),i=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return d("memorized");this.fallbackTimer=setTimeout(d,e),o=this.onError(h=>{this.log("transport","error",h),i&&!n&&(clearTimeout(this.fallbackTimer),d(h))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!i){let h=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${h}`,"true"),this.log("transport",`established ${h} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,e),this.ping(h=>{this.log("transport","connected to primary after",h),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Lj,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const i=this.conn;this.waitForBufferDone(i,()=>{e?i.close(e,n||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===Rr.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError(t)}
21triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(ni.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Rr.connecting:return"connecting";case Rr.open:return"open";case Rr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new Dj(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:i,ref:a,join_ref:o}=t;this.log("push",`${e} ${n} (${o}, ${a})`,i)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:i,payload:a,ref:o,join_ref:c}=e;if(o&&o===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(a.status==="ok"?"ok":"error",d)}catch(h){this.log("error","error in heartbeat callback",h)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${a.status||""} ${n} ${i} ${o&&"("+o+")"||""}`.trim(),a);for(let d=0;d<this.channels.length;d++){const h=this.channels[d];h.isMember(n,i,a,c)&&h.trigger(i,a,o,c)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,i])=>{try{i(...e)}catch(a){this.log("error",`error in ${t} callback`,a)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class cc{constructor(e,n){const i=Uj(n);this.presence=new Ij(e.getChannel(),i),this.presence.onJoin((a,o,c)=>{const d=cc.onJoinPayload(a,o,c);e.getChannel().trigger("presence",d)}),this.presence.onLeave((a,o,c)=>{const d=cc.onLeavePayload(a,o,c);e.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return cc.transformState(this.presence.state)}static transformState(e){return e=zj(e),Object.getOwnPropertyNames(e).reduce((n,i)=>{const a=e[i];return n[i]=Dd(a),n},{})}static onJoinPayload(e,n,i){const a=pE(n),o=Dd(i);return{event:"join",key:e,currentPresences:a,newPresences:o}}static onLeavePayload(e,n,i){const a=pE(n),o=Dd(i);return{event:"leave",key:e,currentPresences:a,leftPresences:o}}}function Dd(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function zj(t){return JSON.parse(JSON.stringify(t))}function Uj(t){return t?.events&&{events:t.events}}function pE(t){return t?.metas?Dd(t):[]}var gE;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(gE||(gE={}));class Bj{get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new cc(this.channel.channelAdapter,n)}}function qj(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
21if(typeof e.code=="number"){const n=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${n}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class Fj{constructor(e,n,i){const a=Hj(i);this.channel=e.getSocket().channel(n,a),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,i){let a;try{a=this.channel.push(e,n,i)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>Sj){const o=this.channel.pushBuffer.shift();o.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${o.event}`,o.payload())}return a}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===Wi.joined}isJoined(){return this.state===Wi.joined}isJoining(){return this.state===Wi.joining}isClosed(){return this.state===Wi.closed}isLeaving(){return this.state===Wi.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function Hj(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var mE;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(mE||(mE={}));var go;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(go||(go={}));var ri;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(ri||(ri={}));class uc{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,n={config:{}},i){var a,o;if(this.topic=e,this.params=n,this.socket=i,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new Fj(this.socket.socketAdapter,e,this.params),this.presence=new Bj(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=BT(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((o=(a=this.params.config)===null||a===void 0?void 0:a.broadcast)===null||o===void 0)&&o.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,n=this.timeout){var i,a,o;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:d,private:h}}=this.params,f=(a=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(_=>_.filter))!==null&&a!==void 0?a:[],g=!!this.bindings[go.PRESENCE]&&this.bindings[go.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,v={},y={broadcast:c,presence:Object.assign(Object.assign({},d),{enabled:g}),postgres_changes:f,private:h};this.socket.accessTokenValue&&(v.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(ri.CHANNEL_ERROR,qj(_))}),this._onClose(()=>e?.(ri.CLOSED)),this.updateJoinPayload(Object.assign({config:y},v)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:_})=>
21{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(ri.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=Wi.errored;const w=Object.values(_).join(", ")||"error";e?.(ri.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{e?.(ri.TIMED_OUT)})}return this}_updatePostgresBindings(e,n){var i;const a=this.bindings.postgres_changes,o=(i=a?.length)!==null&&i!==void 0?i:0,c=[];for(let d=0;d<o;d++){const h=a[d],{filter:{event:f,schema:g,table:v,filter:y}}=h,_=e&&e[d];if(_&&_.event===f&&uc.isFilterValueEqual(_.schema,g)&&uc.isFilterValueEqual(_.table,v)&&uc.isFilterValueEqual(_.filter,y))c.push(Object.assign(Object.assign({},h),{id:_.id}));else{this.unsubscribe(),this.state=Wi.errored,n?.(ri.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Wi.errored&&n&&n(ri.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,i){const a=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),o=e===go.PRESENCE||e===go.POSTGRES_CHANGES;if(a&&o)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,i)}async httpSend(e,n,i={}){var a;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:n,private:this.private}]})},d=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(a=i.timeout)!==null&&a!==void 0?a:this.timeout);if(d.status===202)return{success:!0};let h=d.statusText;try{const f=await d.json();h=f.error||f.message||h}catch{}return Promise.reject(new Error(h))}async send(e,n={}){var i,a;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
21in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:c}=e,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:c,private:this.private}]})};try{const f=await this._fetchWithTimeout(this.broadcastEndpointURL,h,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);return await((a=f.body)===null||a===void 0?void 0:a.cancel()),f.ok?"ok":"error"}catch(f){return f instanceof Error&&f.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var c,d,h;const f=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((h=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||h===void 0)&&h.ack)&&o("ok"),f.receive("ok",()=>o("ok")),f.receive("error",()=>o("error")),f.receive("timeout",()=>o("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,i){const a=new AbortController,o=setTimeout(()=>a.abort(),i),c=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:a.signal}));return clearTimeout(o),c}_on(e,n,i){const a=e.toLocaleLowerCase(),o=this.channelAdapter.on(e,i),c={type:a,filter:n,callback:i,ref:o};return this.bindings[a]?this.bindings[a].push(c):this.bindings[a]=[c],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,i)=>{var a,o,c,d,h,f,g;const v=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(v,i))return!1;const y=(a=this.bindings[v])===null||a===void 0?void 0:a.find(_=>_.ref===e.ref);if(!y)return!0;if(["broadcast","presence","postgres_changes"].includes(v))if("id"in y){const _=y.id,w=(o=y.filter)===null||o===void 0?void 0:o.event;return _&&((c=n.ids)===null||c===void 0?void 0:c.includes(_))&&(w==="*"||w?.toLocaleLowerCase()===((d=n.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(f=(h=y?.filter)===null||h===void 0?void 0:h.event)===null||f===void 0?void 0:f.toLocaleLowerCase();return _==="*"||_===((g=n?.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return y.type.toLocaleLowerCase()===v})}_notThisChannelEvent(e,n){const{close:i,error:a,leave:o,join:c}=zT;return n&&[i,a,o,c].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,i)=>{if(typeof n=="object"&&"ids"in n){const a=n.data,{schema:o,table:c,commit_timestamp:d,type:h,errors:f}=a;return Object.assign(Object.assign({},{schema:o,table:c,commit_timestamp:d,eventType:h,new:{},old:{},errors:f}),this._getPayloadRecords(a))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const i of e.bindings[n])this._on(i.type,i.filter,i.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=fE(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=fE(e.columns,e.old_record)),n}}class Vj{constructor(e,n){this.socket=new $j(e,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,n,i,a=1e4){return new Promise(o=>{setTimeout(()=>
21o("timeout"),a),this.socket.disconnect(()=>{e(),o("ok")},n,i)})}push(e){this.socket.push(e)}log(e,n,i){this.socket.log(e,n,i)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Wm.connecting}isDisconnecting(){return this.socket.connectionState()==Wm.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const vE={HEARTBEAT_INTERVAL:25e3},Gj=[1e3,2e3,5e3,1e4],Yj=1e4;function Kj(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var n;return(n=Array.from(t.keys())[e])!==null&&n!==void 0?n:null},removeItem(e){t.delete(e)},setItem(e,n){t.set(e,String(n))}}}function Wj(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return Kj()}const Jj=`
22  addEventListener("message", (e) => {
23    if (e.data.event === "start") {
24      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
25    }
26  });`;class Zj{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,n){var i;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new Ej,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=o=>o?(...c)=>o(...c):(...c)=>fetch(...c),!(!((i=n?.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const a=this._initializeOptions(n);this.socketAdapter=new Vj(e,a),this.httpEndpoint=BT(e),this.fetch=this._resolveFetch(n?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const n=e.message;throw n.includes("Node.js")?new Error(`${n}
27
28To use Realtime in Node.js, you need to provide a WebSocket implementation:
29
30Option 1: Use Node.js 22+ which has native WebSocket support
31Option 2: Install and provide the "ws" package:
32
33  npm install ws
34
35  import ws from "ws"
36  const client = new RealtimeClient(url, {
37    ...options,
38    transport: ws
39  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),n}async removeAllChannels(){const e=this.channels.map(async i=>{const a=await i.unsubscribe();return i.teardown(),a}),n=await Promise.all(e);return await this.disconnect(),n}log(e,n,i){this.socketAdapter.log(e,n,i)}connectionState(){return this.socketAdapter.connectionState()||Wm.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const i=`realtime:${e}`,a=this.getChannels().find(o=>o.topic===i);if(a)return a;{const o=new uc(`realtime:${e}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(o),o}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
39this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let n,i=!1;if(e)n=e,i=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(a){this.log("error","Error fetching access token from callback",a),n=this.accessTokenValue}else n=this.accessTokenValue;i?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(a=>{const o={access_token:n,version:yj};n&&a.updateJoinPayload(o),a.joinedOnce&&a.channelAdapter.isJoined()&&a.channelAdapter.push(zT.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,i)=>{n=="sent"&&this._setAuthSafely(),e&&e(n,i)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let n;if(e)n=e;else{const i=new Blob([Jj],{type:"application/javascript"});n=URL.createObjectURL(i)}return n}_initializeOptions(e){var n,i,a,o,c,d,h,f,g,v,y,_;this.worker=(n=e?.worker)!==null&&n!==void 0?n:!1,this.accessToken=(i=e?.accessToken)!==null&&i!==void 0?i:null;const w={};w.timeout=(a=e?.timeout)!==null&&a!==void 0?a:wj,w.heartbeatIntervalMs=(o=e?.heartbeatIntervalMs)!==null&&o!==void 0?o:vE.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=e?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=e?.heartbeatIntervalMs)!==null&&d!==void 0?d:vE.HEARTBEAT_INTERVAL),w.transport=(h=e?.transport)!==null&&h!==void 0?h:mj.getWebSocketConstructor(),w.params=e?.params,w.logger=e?.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),w.sessionStorage=(f=e?.sessionStorage)!==null&&f!==void 0?f:Wj(),w.reconnectAfterMs=(g=e?.reconnectAfterMs)!==null&&g!==void 0?g:(C=>Gj[C-1]||Yj);let S,k;const x=(v=e?.vsn)!==null&&v!==void 0?v:bj;switch(x){case _j:S=(C,A)=>A(JSON.stringify(C)),k=(C,A)=>A(JSON.parse(C));break;case $T:S=this.serializer.encode.bind(this.serializer),k=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=x,w.encode=(y=e?.encode)!==null&&y!==void 0?y:S,w.decode=(_=e?.decode)!==null&&_!==void 0?_:k,w.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
39var Rc=class extends Error{constructor(t,e){super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Xj(t,e,n){const i=new URL(e,t);if(n)for(const[a,o]of Object.entries(n))o!==void 0&&i.searchParams.set(a,o);return i.toString()}async function Qj(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function eI(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:i,query:a,body:o,headers:c}){const d=Xj(t.baseUrl,i,a),h=await Qj(t.auth),f=await e(d,{method:n,headers:{...o?{"Content-Type":"application/json"}:{},...h,...c},body:o?JSON.stringify(o):void 0}),g=await f.text(),v=(f.headers.get("content-type")||"").includes("application/json"),y=v&&g?JSON.parse(g):g;if(!f.ok){const _=v?y:void 0,w=_?.error;throw new Rc(w?.message??`Request failed with status ${f.status}`,{status:f.status,icebergType:w?.type,icebergCode:w?.code,details:_})}return{status:f.status,headers:f.headers,data:y}}}}function yd(t){return t.join("�")}var tI=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:yd(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${yd(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${yd(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${yd(t.namespace)}`}),!0}catch(e){if(e instanceof Rc&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof Rc&&n.status===409)return;throw n}}};function Wa(t){return t.join("�")}var nI=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wa(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Wa(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Wa(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Wa(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wa(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Wa(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof Rc&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof Rc&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},rI=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=eI({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new tI(this.client,e),this.tableOps=new nI(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
39async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Ac(t){"@babel/helpers - typeof";return Ac=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},Ac(t)}function iI(t,e){if(Ac(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ac(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sI(t){var e=iI(t,"string");return Ac(e)=="symbol"?e:e+""}function aI(t,e,n){return(e=sI(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yE(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function xe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yE(Object(n),!0).forEach(function(i){aI(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yE(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}var Lh=class extends Error{constructor(t,e="storage",n,i){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Nh(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Qm=class extends Lh{constructor(t,e,n,i="storage"){super(t,i,e,n),this.name=i==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n}toJSON(){return xe({},super.toJSON())}},FT=class extends Lh{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function ph(t,e,n){const i=xe({},t),a=e.toLowerCase();for(const o of Object.keys(i))o.toLowerCase()===a&&delete i[o];return i[a]=n,i}function oI(t){const e={};for(const[n,i]of Object.entries(t))e[n.toLowerCase()]=i;return e}const lI=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),cI=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},ev=t=>{if(Array.isArray(t))return t.map(n=>ev(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,i])=>{const a=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));e[a]=ev(i)}),e},uI=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),_E=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const n=e.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(t)},dI=async(t,e,n,i)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const a=t;let o=parseInt(String(a.status),10);Number.isFinite(o)||(o=500),a.json().then(c=>{const d=c?.statusCode||c?.code||o+"";e(new Qm(_E(c),o,d,i))}).catch(()=>{const c=o+"";e(new Qm(a.statusText||`HTTP ${o} error`,o,c,i))})}else e(new FT(_E(t),t,i))},hI=(t,e,n,i)=>{const a={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!i)return xe(xe({},a),n);if(cI(i)){var o;const c=e?.headers||{};let d;for(const[h,f]of Object.entries(c))h.toLowerCase()==="content-type"&&(d=f);a.headers=ph(c,"Content-Type",(o=d)!==null&&o!==void 0?o:"application/json"),a.body=JSON.stringify(i)}else a.body=i;return e?.duplex&&(a.duplex=e.duplex),xe(xe({},a),n)};async function Fl(t,e,n,i,a,o,c){return new Promise((d,h)=>{t(n,hI(e,i,a,o)).then(f=>{if(!f.ok)throw f;if(i?.noResolveJson)return f;if(c==="vectors"){const g=f.headers.get("content-type");if(f.headers.get("content-length")==="0"||f.status===204)return{};if(!g||!g.includes("application/json"))return{}}return f.json()}).then(f=>d(f)).catch(f=>dI(f,h,i,c))})}function HT(t="storage"){return{get:async(e,n,i,a)=>Fl(e,"GET",n,i,a,void 0,t),post:async(e,n,i,a,o)=>Fl(e,"POST",n,a,o,i,t),put:async(e,n,i,a,o)=>Fl(e,"PUT",n,a,o,i,t),head:async(e,n,i,a)=>Fl(e,"HEAD",n,xe(xe({},i),{},{noResolveJson:!0}),a,void 0,t),remove:async(e,n,i,a,o)=>Fl(e,"DELETE",n,a,o,i,t)}}const fI=HT("storage"),{get:Cc,post:hr,put:tv,head:pI,remove:zv}=fI,In=HT("vectors");var Lo=class{constructor(t,e={},n,i="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=oI(e),this.fetch=lI(n),this.namespace=i}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=ph(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(Nh(n))return{data:null,error:n};throw n}}},gI=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Nh(e))return{data:null,error:e};throw e}}};let VT;VT=Symbol.toStringTag;var mI=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[VT]="BlobDownloadBuilder",this.promise=null}asStream(){return new gI(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Nh(e))return{data:null,error:e};throw e}}};const vI={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},bE={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var yI=class extends Lo{constructor(t,e={},n,i){super(t,e,i,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,i){var a=this;return a.handleOperation(async()=>{let o;const c=xe(xe({},bE),i);let d=xe(xe({},a.headers),t==="POST"&&{"x-upsert":String(c.upsert)});const h=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",c.cacheControl),h&&o.append("metadata",a.encodeMetadata(h)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.has("cacheControl")||o.append("cacheControl",c.cacheControl),h&&!o.has("metadata")&&o.append("metadata",a.encodeMetadata(h))):(o=n,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,h&&(d["x-metadata"]=a.toBase64(a.encodeMetadata(h))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!c.duplex&&(c.duplex="half")),i?.headers)for(const[y,_]of Object.entries(i.headers))d=ph(d,y,_);const f=a._removeEmptyFolders(e),g=a._getFinalPath(f),v=await(t=="PUT"?tv:hr)(a.fetch,`${a.url}/object/${g}`,o,xe({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:f,id:v.Id,fullPath:v.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,i){var a=this;const o=a._removeEmptyFolders(t),c=a._getFinalPath(o),d=new URL(a.url+`/object/upload/sign/${c}`);return d.searchParams.set("token",e),a.handleOperation(async()=>{let h;const f=xe(xe({},bE),i);let g=xe(xe({},a.headers),{"x-upsert":String(f.upsert)});const v=f.metadata;if(typeof Blob<"u"&&n instanceof Blob?(h=new FormData,h.append("cacheControl",f.cacheControl),v&&h.append("metadata",a.encodeMetadata(v)),h.append("",n)):typeof FormData<"u"&&n instanceof FormData?(h=n,h.has("cacheControl")||h.append("cacheControl",f.cacheControl),v&&!h.has("metadata")&&h.append("metadata",a.encodeMetadata(v))):(h=n,g["cache-control"]=`max-age=${f.cac
39heControl}`,g["content-type"]=f.contentType,v&&(g["x-metadata"]=a.toBase64(a.encodeMetadata(v))),(typeof ReadableStream<"u"&&h instanceof ReadableStream||h&&typeof h=="object"&&"pipe"in h&&typeof h.pipe=="function")&&!f.duplex&&(f.duplex="half")),i?.headers)for(const[y,_]of Object.entries(i.headers))g=ph(g,y,_);return{path:o,fullPath:(await tv(a.fetch,d.toString(),h,xe({headers:g},f?.duplex?{duplex:f.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(t);const a=xe({},n.headers);e?.upsert&&(a["x-upsert"]="true");const o=await hr(n.fetch,`${n.url}/object/upload/sign/${i}`,{},{headers:a}),c=new URL(n.url+o.url),d=c.searchParams.get("token");if(!d)throw new Lh("No token returned by API");return{signedUrl:c.toString(),path:t,token:d}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var i=this;return i.handleOperation(async()=>await hr(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n?.destinationBucket},{headers:i.headers}))}async copy(t,e,n){var i=this;return i.handleOperation(async()=>({path:(await hr(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n?.destinationBucket},{headers:i.headers})).Key}))}async createSignedUrl(t,e,n){var i=this;return i.handleOperation(async()=>{let a=i._getFinalPath(t);const o=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let c=await hr(i.fetch,`${i.url}/object/sign/${a}`,xe({expiresIn:e},o?{transform:n.transform}:{}),{headers:i.headers});const d=new URLSearchParams;n?.download&&d.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&d.set("cacheNonce",String(n.cacheNonce));const h=d.toString();return{signedUrl:encodeURI(`${i.url}${c.signedURL}${h?`&${h}`:""}`)}})}async createSignedUrls(t,e,n){var i=this;return i.handleOperation(async()=>{const a=await hr(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:e,paths:t},{headers:i.headers}),o=new URLSearchParams;n?.download&&o.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&o.set("cacheNonce",String(n.cacheNonce));const c=o.toString();return a.map(d=>xe(xe({},d),{},{signedUrl:d.signedURL?encodeURI(`${i.url}${d.signedURL}${c?`&${c}`:""}`):null}))})}download(t,e,n){const i=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",a=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(a,e.transform),e?.cacheNonce!=null&&a.set("cacheNonce",String(e.cacheNonce));const o=a.toString(),c=this._getFinalPath(t),d=()=>Cc(this.fetch,`${this.url}/${i}/${c}${o?`?${o}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new mI(d,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>ev(await Cc(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await pI(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(a){if(e.shouldThrowOnError)throw a;if(Nh(a)){var i;const o=a instanceof Qm?a.status:a instanceof FT?(i=a.originalError)===null||i===void 0?void 0:i.status:void 0;if(o!==void 0&&[400,404].includes(o))return{data:!1,error:a}}throw a}}getPublicUrl(t,e){const n=this._getFinalPath(t),i=new URLSearchParams;e?.download&&i.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(i,e.transform),e?.cacheNonce!=null&&i.set("cacheNonce",String(e.cacheNonce));const a=i.toString(),o=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}`)+(a?`?${a}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await zv(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,n){var i=this;return i.handleOperation(async()=>{const a=xe(xe(xe({},vI),e),{},{prefix:t||""});return await hr(i.fetch,`${i.url}/object/list/${i.bucketId}`,a,{headers:i.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const i=xe({},t);return await hr(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,i,{headers:n.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
39ity",e.quality.toString()),t}};const _I="2.105.4",$c={"X-Client-Info":`storage-js/${_I}`};var bI=class extends Lo{constructor(t,e={},n,i){const a=new URL(t);i?.useNewHostname&&/supabase\.(co|in|red)$/.test(a.hostname)&&!a.hostname.includes("storage.supabase.")&&(a.hostname=a.hostname.replace("supabase.","storage.supabase."));const o=a.href.replace(/\/$/,""),c=xe(xe({},$c),e);super(o,c,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await Cc(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Cc(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await hr(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await tv(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await hr(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await zv(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},wI=class extends Lo{constructor(t,e={},n){const i=t.replace(/\/$/,""),a=xe(xe({},$c),e);super(i,a,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await hr(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;t?.limit!==void 0&&n.set("limit",t.limit.toString()),t?.offset!==void 0&&n.set("offset",t.offset.toString()),t?.sortColumn&&n.set("sortColumn",t.sortColumn),t?.sortOrder&&n.set("sortOrder",t.sortOrder),t?.search&&n.set("search",t.search);const i=n.toString(),a=i?`${e.url}/bucket?${i}`:`${e.url}/bucket`;return await Cc(e.fetch,a,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await zv(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!uI(t))throw new Lh("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new rI({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(n,{get(a,o){const c=a[o];return typeof c!="function"?c:async(...d)=>{try{return{data:await c.apply(a,d),error:null}}catch(h){if(i)throw h;return{data:null,error:h}}}}})}},SI=class extends Lo{constructor(t,e={},n){const i=t.replace(/\/$/,""),a=xe(xe({},$c),{},{"Content-Type":"application/json"},e);super(i,a,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await In.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await In.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},EI=class extends Lo{constructor(t,e={},n){const i=t.replace(/\/$/,""),a=xe(xe({},$c),{},{"Content-Type":"application/json"},e);super(i,a,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
39if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},kI=class extends Lo{constructor(t,e={},n){const i=t.replace(/\/$/,""),a=xe(xe({},$c),{},{"Content-Type":"application/json"},e);super(i,a,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await In.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},xI=class extends kI{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new TI(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},TI=class extends SI{constructor(t,e,n,i){super(t,e,i),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,xe(xe({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,xe(xe({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new RI(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},RI=class extends EI{constructor(t,e,n,i,a){super(t,e,a),this.vectorBucketName=n,this.indexName=i}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,xe(xe({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,xe(xe({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,xe(xe({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,xe(xe({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,xe(xe({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},AI=class extends bI{constructor(t,e={},n,i){super(t,e,n,i)}from(t){return new yI(this.url,this.headers,t,this.fetch)}get vectors(){return new xI(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new wI(this.url+"/iceberg",this.headers,this.fetch)}};const GT="2.105.4",oo=30*1e3,nv=3,zg=nv*oo,CI="http://localhost:9999",OI="supabase.auth.token",PI={"X-Client-Info":`gotrue-js/${GT}`},rv="X-Supabase-Api-Version",YT={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},MI=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,LI=600*1e3;class Oc extends Error{constructor(e,n,i){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function le(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class NI extends Oc{constructor(e,n,i){super(e,n,i),this.name="AuthApiError",this.status=n,this.code=i}
39}function DI(t){return le(t)&&t.name==="AuthApiError"}class gr extends Oc{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class gi extends Oc{constructor(e,n,i,a){super(e,i,a),this.name=n,this.status=i}}class Bt extends gi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function _d(t){return le(t)&&t.name==="AuthSessionMissingError"}class Ja extends gi{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class bd extends gi{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class wd extends gi{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function jI(t){return le(t)&&t.name==="AuthImplicitGrantRedirectError"}class wE extends gi{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class II extends gi{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class iv extends gi{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Ug(t){return le(t)&&t.name==="AuthRetryableFetchError"}class SE extends gi{constructor(e,n,i){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class sv extends gi{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const gh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),EE=` 	
40\r=`.split(""),$I=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<EE.length;e+=1)t[EE[e].charCodeAt(0)]=-2;for(let e=0;e<gh.length;e+=1)t[gh[e].charCodeAt(0)]=e;return t})();function kE(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const i=e.queue>>e.queuedBits-6&63;n(gh[i]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const i=e.queue>>e.queuedBits-6&63;n(gh[i]),e.queuedBits-=6}}function KT(t,e,n){const i=$I[t];if(i>-1)for(e.queue=e.queue<<6|i,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function xE(t){const e=[],n=c=>{e.push(String.fromCodePoint(c))},i={utf8seq:0,codepoint:0},a={queue:0,queuedBits:0},o=c=>{BI(c,i,n)};for(let c=0;c<t.length;c+=1)KT(t.charCodeAt(c),a,o);return e.join("")}function zI(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function UI(t,e){for(let n=0;n<t.length;n+=1){let i=t.charCodeAt(n);if(i>55295&&i<=56319){const a=(i-55296)*1024&65535;i=(t.charCodeAt(n+1)-56320&65535|a)+65536,n+=1}zI(i,e)}}function BI(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let i=1;i<6;i+=1)if((t>>7-i&1)===0){e.utf8seq=i;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function wo(t){const e=[],n={queue:0,queuedBits:0},i=a=>{e.push(a)};for(let a=0;a<t.length;a+=1)KT(t.charCodeAt(a),n,i);return new Uint8Array(e)}function qI(t){const e=[];return UI(t,n=>e.push(n)),new Uint8Array(e)}function Hs(t){const e=[],n={queue:0,queuedBits:0},i=a=>{e.push(a)};return t.forEach(a=>kE(a,n,i)),kE(null,n,i),e.join("")}function FI(t){return Math.round(Date.now()/1e3)+t}function HI(){return Symbol("auth-callback")}const Zt=()=>typeof window<"u"&&typeof document<"u",js={tested:!1,writable:!1},WT=()=>{if(!Zt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(js.tested)return js.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),js.tested=!0,js.writable=!0}catch{js.tested=!0,js.writable=!1}return js.writable};function VI(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
40h((a,o)=>{e[o]=a})}catch{}return n.searchParams.forEach((i,a)=>{e[a]=i}),e}const JT=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),GI=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",lo=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},Is=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Jt=async(t,e)=>{await t.removeItem(e)};class Dh{constructor(){this.promise=new Dh.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}Dh.promiseConstructor=Promise;function Sd(t){const e=t.split(".");if(e.length!==3)throw new sv("Invalid JWT structure");for(let i=0;i<e.length;i++)if(!MI.test(e[i]))throw new sv("JWT not in base64url format");return{header:JSON.parse(xE(e[0])),payload:JSON.parse(xE(e[1])),signature:wo(e[2]),raw:{header:e[0],payload:e[1]}}}async function YI(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function KI(t,e){return new Promise((i,a)=>{(async()=>{for(let o=0;o<1/0;o++)try{const c=await t(o);if(!e(o,null,c)){i(c);return}}catch(c){if(!e(o,c)){a(c);return}}})()})}function WI(t){return("0"+t.toString(16)).substr(-2)}function JI(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=n.length;let a="";for(let o=0;o<56;o++)a+=n.charAt(Math.floor(Math.random()*i));return a}return crypto.getRandomValues(e),Array.from(e,WI).join("")}async function ZI(t){const n=new TextEncoder().encode(t),i=await crypto.subtle.digest("SHA-256",n),a=new Uint8Array(i);return Array.from(a).map(o=>String.fromCharCode(o)).join("")}async function XI(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const n=await ZI(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Za(t,e,n=!1){const i=JI();let a=i;n&&(a+="/recovery"),await lo(t,`${e}-code-verifier`,a);const o=await XI(i);return[o,i===o?"plain":"s256"]}const QI=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function e$(t){const e=t.headers.get(rv);if(!e||!e.match(QI))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function t$(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function n$(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const r$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ei(t){if(!r$.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function dr(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Bg(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function i$(t,e){return new Proxy(t,{get:(n,i,a)=>
40{if(i==="__isInsecureUserWarningProxy")return!0;if(typeof i=="symbol"){const o=i.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,i,a)}return!e.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(n,i,a)}})}function TE(t){return JSON.parse(JSON.stringify(t))}const Us=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},s$=[502,503,504,520,521,522,523,524,530];async function RE(t){var e;if(!GI(t))throw new iv(Us(t),0);if(s$.includes(t.status))throw new iv(Us(t),t.status);let n;try{n=await t.json()}catch(o){throw new gr(Us(o),o)}let i;const a=e$(t);if(a&&a.getTime()>=YT["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?i=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(i=n.error_code),i){if(i==="weak_password")throw new SE(Us(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(i==="session_not_found")throw new Bt}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 SE(Us(n),t.status,n.weak_password.reasons);throw new NI(Us(n),t.status||500,i)}const a$=(t,e,n,i)=>{const a={method:t,headers:e?.headers||{}};return t==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),a.body=JSON.stringify(i),Object.assign(Object.assign({},a),n))};async function me(t,e,n,i){var a;const o=Object.assign({},i?.headers);o[rv]||(o[rv]=YT["2024-01-01"].name),i?.jwt&&(o.Authorization=`Bearer ${i.jwt}`);const c=(a=i?.query)!==null&&a!==void 0?a:{};i?.redirectTo&&(c.redirect_to=i.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",h=await o$(t,e,n+d,{headers:o,noResolveJson:i?.noResolveJson},{},i?.body);return i?.xform?i?.xform(h):{data:Object.assign({},h),error:null}}async function o$(t,e,n,i,a,o){const c=a$(e,i,a,o);let d;try{d=await t(n,Object.assign({},c))}catch(h){throw console.error(h),new iv(Us(h),0)}if(d.ok||await RE(d),i?.noResolveJson)return d;try{return await d.json()}catch(h){await RE(h)}}function er(t){var e;let n=null;u$(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=FI(t.expires_in)));const i=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:i},error:null}}function AE(t){const e=er(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,i)=>n&&typeof i=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Ji(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function l$(t){return{data:t,error:null}}function c$(t){const{action_link:e,email_otp:n,hashed_token:i,redirect_to:a,verification_type:o}=t,c=Mh(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:e,email_otp:n,hashed_token:i,redirect_to:a,verification_type:o},h=Object.assign({},c);return{data:{properties:d,user:h},error:null}}function CE(t){return t}function u$(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const qg=["global","local","others"];class d${constructor({url:e="",headers:n={},fetch:i,experimental:a}){this.url=e,this.headers=n,this.fetch=JT(i),this.experimental=a??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,n=qg[0]){if(qg.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qg.join(", ")}`);try{return await me(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(i){if(le(i))return{data:null,error:i};throw i}}async inviteUserByEmail(e,n={}){try{return await me(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Ji})}catch(i){if(le(i))return{data:{user:null},error:i};throw i}}async generateLink(e){try{const{options:n}=e,i=Mh(e,["options"]),a=Object.assign(Object.assign({},i),n);return"newEmail"in i&&(a.new_email=i?.newEmail,delete a.newEmail),await me(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:a,headers:this.headers,xform:c$,redirectTo:n?.redirectTo})}catch(n){if(le(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await me(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Ji})}catch(n){if(le(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,i,a,o,c,d,h;try{const f={nextPage:null,lastPage:0,total:0},g=await me(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(n=e?.page)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:"",per_page:(o=(a=e?.perPage)===null||a===void 0?void 0:a.toString())!==null&&o!==void 0?o:""},xform:CE});if(g.error)throw g.error;const v=await g.json(),y=(c=g.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(h=(d=g.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&h!==void 0?h:[];return _.length>0&&(_.forEach(w=>{const S=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),k=JSON.parse(w.split(";")[1].split("=")[1]);f[`${k}Page`]=S}),f.total=parseInt(y)),{data:Object.assign(Object.assign({},v),f),error:null}}catch(f){if(le(f))return{data:{users:[]},error:f};throw f}}async getUserById(e){ei(e);try{return await me(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ji})}catch(n){if(le(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){ei(e);try{return await me(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Ji})}catch(i){if(le(i))return{data:{user:null},error:i};throw i}}async deleteUser(e,n=!1){ei(e);
40try{return await me(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Ji})}catch(i){if(le(i))return{data:{user:null},error:i};throw i}}async _listFactors(e){ei(e.userId);try{const{data:n,error:i}=await me(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:n,error:i}}catch(n){if(le(n))return{data:null,error:n};throw n}}async _deleteFactor(e){ei(e.userId),ei(e.id);try{return{data:await me(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(le(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,i,a,o,c,d,h;try{const f={nextPage:null,lastPage:0,total:0},g=await me(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(n=e?.page)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:"",per_page:(o=(a=e?.perPage)===null||a===void 0?void 0:a.toString())!==null&&o!==void 0?o:""},xform:CE});if(g.error)throw g.error;const v=await g.json(),y=(c=g.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(h=(d=g.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&h!==void 0?h:[];return _.length>0&&(_.forEach(w=>{const S=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),k=JSON.parse(w.split(";")[1].split("=")[1]);f[`${k}Page`]=S}),f.total=parseInt(y)),{data:Object.assign(Object.assign({},v),f),error:null}}catch(f){if(le(f))return{data:{clients:[]},error:f};throw f}}async _createOAuthClient(e){try{return await me(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await me(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await me(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(le(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(e){try{return await me(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(le(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await me(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e?.type&&(n.type=e.type),await me(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:i=>{var a;return{data:{providers:(a=i?.providers)!==null&&a!==void 0?a:[]},error:null}}})}catch(n){if(le(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await me(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await me(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await me(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(le(i))return{data:null,error:i};throw i}}async _deleteCustomProvider(e){try{return await me(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(le(n))return{data:null,error:n};throw n}}async _adminListPasskeys(e){dr(this.experimental),ei(e.userId);try{return await me(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(e){dr(this.experimental),ei(e.userId),ei(e.passkeyId);
40try{return await me(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(le(n))return{data:null,error:n};throw n}}}function OE(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}const Sr={debug:!!(globalThis&&WT()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class ZT extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class PE extends ZT{}async function h$(t,e,n){Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const i=new globalThis.AbortController;let a;e>0&&(a=setTimeout(()=>{i.abort(),Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},async o=>{if(o){clearTimeout(a),Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,o.name);try{return await n()}finally{Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,o.name)}}else{if(e===0)throw Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new PE(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Sr.debug)try{const c=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(c,null,"  "))}catch(c){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",c)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(a),await n()}})}catch(o){if(e>0&&clearTimeout(a),o!==null&&typeof o=="object"&&"name"in o&&o.name==="AbortError"&&e>0){if(i.signal.aborted)return Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async c=>{if(c){Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,c.name);try{return await n()}finally{Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,c.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Sr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new PE(`Lock "${t}" was released because another request stole it`)}throw o}}function f$(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function XT(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function p$(t){return parseInt(t,16)}function g$(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,i=>i.toString(16).padStart(2,"0")).join("")}function m$(t){var e;const{chainId:n,domain:i,expirationTime:a,issuedAt:o=new Date,nonce:c,notBefore:d,requestId:h,resources:f,scheme:g,uri:v,version:y}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!v)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(y!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${y}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
41`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=XT(t.address),w=g?`${g}://${i}`:i,S=t.statement?`${t.statement}
42`:"",k=`${w} wants you to sign in with your Ethereum account:
43${_}
44
45${S}`;let x=`URI: ${v}
46Version: ${y}
47Chain ID: ${n}${c?`
48Nonce: ${c}`:""}
49Issued At: ${o.toISOString()}`;if(a&&(x+=`
50Expiration Time: ${a.toISOString()}`),d&&(x+=`
51Not Before: ${d.toISOString()}`),h&&(x+=`
52Request ID: ${h}`),f){let C=`
53Resources:`;for(const A of f){if(!A||typeof A!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${A}`);C+=`
54- ${A}`}x+=C}return`${k}
55${x}`}
55class Pt extends Error{constructor({message:e,code:n,cause:i,name:a}){var o;super(e,{cause:i}),this.__isWebAuthnError=!0,this.name=(o=a??(i instanceof Error?i.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class mh extends Pt{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function v$({error:t,options:e}){var n,i,a;const{publicKey:o}=e;if(!o)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Pt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=o.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Pt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((i=o.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Pt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((a=o.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new Pt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Pt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Pt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return o.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new Pt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Pt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const c=window.location.hostname;if(QT(c)){if(o.rp.id!==c)return new Pt({message:`The RP ID "${o.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Pt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Pt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Pt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Pt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function y$({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Pt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Pt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const i=window.location.hostname;if(QT(i)){if(n.rpId!==i)return new Pt({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Pt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Pt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Pt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class _${createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const av=new _$;function ME(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:i}=t,a=Mh(t,["challenge","user","excludeCredentials"]),o=wo(e).buffer,c=Object.assign(Object.assign({},n),{id:wo(n.id).buffer}),d=Object.assign(Object.assign({},a),{challenge:o,user:c});if(i&&i.length>0){d.excludeCredentials=new Array(i.length);for(let h=0;h<i.length;h++){const f=i[h];d.excludeCredentials[h]=Object.assign(Object.assign({},f),{id:wo(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return d}function LE(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,i=Mh(t,["challenge","allowCredentials"]),a=wo(e).buffer,o=Object.assign(Object.assign({},i),{challenge:a});if(n&&n.length>0){o.allowCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const d=n[c];o.allowCredentials[c]=Object.assign(Object.assign({},d),{id:wo(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return o}function NE(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:Hs(new Uint8Array(t.response.attestationObject)),clientDataJSON:Hs(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function DE(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,i=t.getClientExtensionResults(),a=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Hs(new Uint8Array(a.authenticatorData)),clientDataJSON:Hs(new Uint8Array(a.clientDataJSON)),signature:Hs(new Uint8Array(a.signature)),userHandle:a.userHandle?Hs(new Uint8Array(a.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function QT(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function vh(){var t,e;return!!(Zt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function eR(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new mh("Browser returned unexpected credential type",e)}:{data:null,error:new mh("Empty credential response",e)}}catch(e){return{data:null,error:v$({error:e,options:t})}}}async function tR(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new mh("Browser returned unexpected credential type",e)}:{data:null,error:new mh("Empty credential response",e)}}catch(e){return{data:null,error:y$({error:e,options:t})}}}
55const b$={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},w$={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function yh(...t){const e=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),n=a=>a instanceof ArrayBuffer||ArrayBuffer.isView(a),i={};for(const a of t)if(a)for(const o in a){const c=a[o];if(c!==void 0)if(Array.isArray(c))i[o]=c;else if(n(c))i[o]=c;else if(e(c)){const d=i[o];e(d)?i[o]=yh(d,c):i[o]=yh(c)}else i[o]=c}return i}function S$(t,e){return yh(b$,t,e||{})}function E$(t,e){return yh(w$,t,e||{})}class k${constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:i,signal:a},o){var c;try{const{data:d,error:h}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!d)return{data:null,error:h};const f=a??av.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:g}=d.webauthn.credential_options.publicKey;if(!g.name){const v=i;if(v)g.name=`${g.id}:${v}`;else{const _=(await this.client.getUser()).data.user,w=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";g.name=`${g.id}:${w}`}}g.displayName||(g.displayName=g.name)}switch(d.webauthn.type){case"create":{const g=S$(d.webauthn.credential_options.publicKey,o?.create),{data:v,error:y}=await eR({publicKey:g,signal:f});return v?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:v}},error:null}:{data:null,error:y}}case"request":{const g=E$(d.webauthn.credential_options.publicKey,o?.request),{data:v,error:y}=await tR(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:g,signal:f}));return v?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:v}},error:null}:{data:null,error:y}}}}catch(d){return le(d)?{data:null,error:d}:{data:null,error:new gr("Unexpected error in challenge",d)}}}async _verify({challengeId:e,factorId:n,webauthn:i}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:i})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:a}={}},o){if(!n)return{data:null,error:new Oc("rpId is required for WebAuthn authentication")};try{if(!vh())return{data:null,error:new gr("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:i},signal:a},{request:o});if(!c)return{data:null,error:d};const{webauthn:h}=c;return this._verify({factorId:e,challengeId:c.challengeId,webauthn:{type:h.type,rpId:n,rpOrigins:i,credential_response:h.credential_response}})}catch(c){return le(c)?{data:null,error:c}:{data:null,error:new gr("Unexpected error in authenticate",c)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:a}={}},o){if(!n)return{data:null,error:new Oc("rpId is required for WebAuthn registration")};try{if(!vh())return{data:null,error:new gr("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this._enroll({friendlyName:e});if(!c)return await this.client.mfa.listFactors().then(g=>{var v;return(v=g.data)===null||v===void 0?void 0:v.all.find(y=>y.factor_type==="webauthn"&&y.friendly_name===e&&y.status!=="unverified")}).then(g=>g?this.client.mfa.unenroll({factorId:g?.id}):void 0),{data:null,error:d};const{data:h,error:f}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:n,rpOrigins:i},signal:a},{create:o});return h?this._verify({factorId:c.id,challengeId:h.challengeId,webauthn:{rpId:n,rpOrigins:i,type:h.webauthn.type,credential_response:h.webauthn.credential_response}}):{data:null,error:f}}catch(c){return le(c)?{data:null,error:c}:{data:null,error:new gr("Unexpected error in register",c)}}}}f$();const x$={url:CI,storageKey:OI,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:PI,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function jE(t,e,n){return await n()}const Xa={};class Pc{get jwks(){var e,n;return(n=(e=Xa[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){Xa[this.storageKey]=Object.assign(Object.assign({}
55,Xa[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=Xa[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Xa[this.storageKey]=Object.assign(Object.assign({},Xa[this.storageKey]),{cachedAt:e})}constructor(e){var n,i,a,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},x$),e);if(this.storageKey=c.storageKey,this.instanceID=(n=Pc.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Pc.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&Zt()){const d=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(d),this.logDebugMessages&&console.trace(d)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(i=c.experimental)!==null&&i!==void 0?i:{},this.admin=new d$({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=JT(c.fetch),this.lock=c.lock||jE,this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock?this.lock=c.lock:this.persistSession&&Zt()&&(!((a=globalThis?.navigator)===null||a===void 0)&&a.locks)?this.lock=h$:this.lock=jE,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new k$(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(c.storage?this.storage=c.storage:WT()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=OE(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=OE(this.memoryStorage)),Zt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(d){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",d)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async d=>{this._debug("received broadcast notification from other tab or client",d);try{await this._notifyAllSubscribers(d.data.event,d.data.session,!1)}catch(h){this._debug("#broadcastChannel","error",h)}})}c.skipAutoInitialize||this.initialize().catch(d=>{this._debug("#initialize()","error",d)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${GT}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let n={},i="none";if(Zt()&&(n=VI(window.location.href),this._isImplicitGrantCallback(n)?i="implicit":await this._isPKCECallback(n)&&(i="pkce")),Zt()&&this.detectSessionInUrl&&i!=="none"){const{data:a,error:o}=await this._getSessionFromURL(n,i);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),jI(o)){const h=(e=o.details)===null||e===void 0?void 0:e.code;if(h==="identity_already_exists"||h==="identity_not_found"||h==="single_identity_not_deletable")return{error:o}}return{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 le(n)?this._returnResult({error:n}):this._returnResult({error:new gr("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,i,a;try{const o=await me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(n=e?.options)===null||n===void 0?void 0:n.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(a=e?.options)===null||a===void 0?void 0:a.captchaToken}},xform:er}),{data:c,error:d}=o;if(d||!c)return this._returnResult({data:{user:null,session:null},error:d});const h=c.session,f=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:f,session:h},error:null})}catch(o){if(le(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(e){var n,i,a;try{let o;if("email"in e){const{email:g,password:v,options:y}=e;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await Za(this.storage,this.storageKey)),o=await me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:y?.emailRedirectTo,body:{email:g,password:v,data:(n=y?.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:y?.captchaToken},code_challenge:_,code_challenge_method:w},xform:er})}else if("phone"in e){const{phone:g,password:v,options:y}=e;o=await me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:g,password:v,data:(i=y?.data)!==null&&i!==void 0?i:{},channel:(a=y?.channel)!==null&&a!==void 0?a:"sms",gotrue_meta_security:{captcha_token:y?.captchaToken}},xform:er})}else throw new bd("You must provide either an email or phone number and a password");const{data:c,error:d}=o;if(d||!c)return await Jt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const h=c.session,f=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:f,session:h},error:null})}catch(o){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),le(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(e){try{let n;if("email"in e){const{email:o,password:c,options:d}=e;n=await me(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:AE})}else if("phone"in e){const{phone:o,password:c,options:d}=e;n=await me(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:AE})}else throw new bd("You must provide either an email or phone number and a password");const{data:i,error:a}=n;
55if(a)return this._returnResult({data:{user:null,session:null},error:a});if(!i||!i.session||!i.user){const o=new Ja;return this._returnResult({data:{user:null,session:null},error:o})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:a})}catch(n){if(le(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,i,a,o;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(i=e.options)===null||i===void 0?void 0:i.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(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,i,a,o,c,d,h,f,g,v,y;let _,w;if("message"in e)_=e.message,w=e.signature;else{const{chain:S,wallet:k,statement:x,options:C}=e;let A;if(Zt())if(typeof k=="object")A=k;else{const U=window;if("ethereum"in U&&typeof U.ethereum=="object"&&"request"in U.ethereum&&typeof U.ethereum.request=="function")A=U.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof k!="object"||!C?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");A=k}const M=new URL((n=C?.url)!==null&&n!==void 0?n:window.location.href),D=await A.request({method:"eth_requestAccounts"}).then(U=>U).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!D||D.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const $=XT(D[0]);let L=(i=C?.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!L){const U=await A.request({method:"eth_chainId"});L=p$(U)}const I={domain:M.host,address:$,statement:x,uri:M.href,version:"1",chainId:L,nonce:(a=C?.signInWithEthereum)===null||a===void 0?void 0:a.nonce,issuedAt:(c=(o=C?.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=C?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(h=C?.signInWithEthereum)===null||h===void 0?void 0:h.notBefore,requestId:(f=C?.signInWithEthereum)===null||f===void 0?void 0:f.requestId,resources:(g=C?.signInWithEthereum)===null||g===void 0?void 0:g.resources};_=m$(I),w=await A.request({method:"personal_sign",params:[g$(_),$]})}try{const{data:S,error:k}=await me(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((v=e.options)===null||v===void 0)&&v.captchaToken?{gotrue_meta_security:{captcha_token:(y=e.options)===null||y===void 0?void 0:y.captchaToken}}:null),xform:er});if(k)throw k;if(!S||!S.session||!S.user){const x=new Ja;return this._returnResult({data:{user:null,session:null},error:x})}return S.session&&(await this._saveSession(S.session),await this._notifyAllSubscribers("SIGNED_IN",S.session)),this._returnResult({data:Object.assign({},S),error:k})}catch(S){if(le(S))return this._returnResult({data:{user:null,session:null},error:S});throw S}}async signInWithSolana(e){var n,i,a,o,c,d,h,f,g,v,y,_;let w,S;if("message"in e)w=e.message,S=e.signature;else{const{chain:k,wallet:x,statement:C,options:A}=e;let M;if(Zt())if(typeof x=="object")M=x;else{const $=window;if("solana"in $&&typeof $.solana=="object"&&("signIn"in $.solana&&typeof $.solana.signIn=="function"||"signMessage"in $.solana&&typeof $.solana.signMessage=="function"))M=$.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!A?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");M=x}const D=new URL((n=A?.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in M&&M.signIn){const $=await M.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},A?.signInWithSolana),{version:"1",domain:D.host,uri:D.href}),C?{statement:C}:null));let L;if(Array.isArray($)&&$[0]&&typeof $[0]=="object")L=$[0];else if($&&typeof $=="object"&&"signedMessage"in $&&"signature"in $)L=$;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in L&&"signature"in L&&(typeof L.signedMessage=="string"||L.signedMessage instanceof Uint8Array)&&L.signature instanceof Uint8Array)w=typeof L.signedMessage=="string"?L.signedMessage:new TextDecoder().decode(L.signedMessage),S=L.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in M)||typeof M.signMessage!="function"||!("publicKey"in M)||typeof M!="object"||!M.publicKey||!("toBase58"in M.publicKey)||typeof M.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${D.host} wants you to sign in with your Solana account:`,M.publicKey.toBase58(),...C?["",C,""]:[""],"Version: 1",`URI: ${D.href}`,`Issued At: ${(a=(i=A?.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&a!==void 0?a:new Date().toISOString()}`,...!((o=A?.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${A.signInWithSolana.notBefore}
55`]:[],...!((c=A?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${A.signInWithSolana.expirationTime}`]:[],...!((d=A?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${A.signInWithSolana.chainId}`]:[],...!((h=A?.signInWithSolana)===null||h===void 0)&&h.nonce?[`Nonce: ${A.signInWithSolana.nonce}`]:[],...!((f=A?.signInWithSolana)===null||f===void 0)&&f.requestId?[`Request ID: ${A.signInWithSolana.requestId}`]:[],...!((v=(g=A?.signInWithSolana)===null||g===void 0?void 0:g.resources)===null||v===void 0)&&v.length?["Resources",...A.signInWithSolana.resources.map(L=>`- ${L}`)]:[]].join(`
56`);const $=await M.signMessage(new TextEncoder().encode(w),"utf8");if(!$||!($ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");S=$}}try{const{data:k,error:x}=await me(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Hs(S)},!((y=e.options)===null||y===void 0)&&y.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:er});if(x)throw x;if(!k||!k.session||!k.user){const C=new Ja;return this._returnResult({data:{user:null,session:null},error:C})}return k.session&&(await this._saveSession(k.session),await this._notifyAllSubscribers("SIGNED_IN",k.session)),this._returnResult({data:Object.assign({},k),error:x})}catch(k){if(le(k))return this._returnResult({data:{user:null,session:null},error:k});throw k}}async _exchangeCodeForSession(e){const n=await Is(this.storage,`${this.storageKey}-code-verifier`),[i,a]=(n??"").split("/");try{if(!i&&this.flowType==="pkce")throw new II;const{data:o,error:c}=await me(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:i},xform:er});if(await Jt(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!o||!o.session||!o.user){const d=new Ja;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(a==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:a??null}),error:c})}catch(o){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),le(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(e){try{const{options:n,provider:i,token:a,access_token:o,nonce:c}=e,d=await me(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:a,access_token:o,nonce:c,gotrue_meta_security:{captcha_token:n?.captchaToken}},xform:er}),{data:h,error:f}=d;if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!h||!h.session||!h.user){const g=new Ja;return this._returnResult({data:{user:null,session:null},error:g})}return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",h.session)),this._returnResult({data:h,error:f})}catch(n){if(le(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,i,a,o,c;try{if("email"in e){const{email:d,options:h}=e;let f=null,g=null;this.flowType==="pkce"&&([f,g]=await Za(this.storage,this.storageKey));const{error:v}=await me(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(n=h?.data)!==null&&n!==void 0?n:{},create_user:(i=h?.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},code_challenge:f,code_challenge_method:g},redirectTo:h?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:v})}if("phone"in e){const{phone:d,options:h}=e,{data:f,error:g}=await me(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(a=h?.data)!==null&&a!==void 0?a:{},create_user:(o=h?.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},channel:(c=h?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:f?.message_id},error:g})}throw new bd("You must provide either an email or phone number.")}catch(d){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),le(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(e){var n,i;try{let a,o;"options"in e&&(a=(n=e.options)===null||n===void 0?void 0:n.redirectTo,o=(i=e.options)===null||i===void 0?void 0:i.captchaToken);const{data:c,error:d}=await me(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:o}}),redirectTo:a,xform:er});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const h=c.session,f=c.user;return h?.access_token&&(await this._saveSession(h),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",h)),this._returnResult({data:{user:f,session:h},error:null})}catch(a){if(le(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithSSO(e){var n,i,a,o,c;try{let d=null,h=null;this.flowType==="pkce"&&([d,h]=await Za(this.storage,this.storageKey));const f=await me(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:(i=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&i!==void 0?i:void 0}),!((a=e?.options)===null||a===void 0)&&a.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:h}),headers:this.headers,xform:l$});return!((o=f.data)===null||o===void 0)&&o.url&&Zt()&&!(!((c=e.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(f.data.url),this._returnResult(f)}catch(d){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),le(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:i}=e;if(i)throw i;if(!n)throw new Bt;const{error:a}=await me(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:a})})}catch(e){if(le(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:i,type:a,options:o}=e,{error:c}=await me(this.fetch,"POST",n,{headers:this.headers,body:{email:i,type:a,gotrue_meta_security:{captcha_token:o?.captchaToken}},redirectTo:o?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in e){const{phone:i,type:a,options:o}=e,{data:c,error:d}=await me(this.fetch,"POST",n,{headers:this.headers,body:{phone:i,type:a,gotrue_meta_security:{captcha_token:o?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:d})}throw new bd("You must provide either an email or phone number and a type")}catch(n){if(le(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),a=(async()=>(await i,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 i=n();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await i}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 Is(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
56id"),await this._removeSession())),!e)return{data:{session:null},error:null};const i=e.expires_at?e.expires_at*1e3-Date.now()<zg:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",e.expires_at),!i){if(this.userStorage){const c=await Is(this.userStorage,this.storageKey+"-user");c?.user?e.user=c.user:e.user=Bg()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};e.user=i$(e.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:a,error:o}=await this._callRefreshToken(e.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:a},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await me(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ji}):await this._useSession(async n=>{var i,a,o;const{data:c,error:d}=n;if(d)throw d;return!(!((i=c.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Bt}:await me(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:Ji})})}catch(n){if(le(n))return _d(n)&&(await this._removeSession(),await Jt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async i=>{const{data:a,error:o}=i;if(o)throw o;if(!a.session)throw new Bt;const c=a.session;let d=null,h=null;this.flowType==="pkce"&&e.email!=null&&([d,h]=await Za(this.storage,this.storageKey));const{data:f,error:g}=await me(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:d,code_challenge_method:h}),jwt:c.access_token,xform:Ji});if(g)throw g;return c.user=f.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(i){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),le(i))return this._returnResult({data:{user:null},error:i});throw i}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Bt;const n=Date.now()/1e3;let i=n,a=!0,o=null;const{payload:c}=Sd(e.access_token);if(c.exp&&(i=c.exp,a=i<=n),a){const{data:d,error:h}=await this._callRefreshToken(e.refresh_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!d)return{data:{user:null,session:null},error:null};o=d}else{const{data:d,error:h}=await this._getUser(e.access_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});o={access_token:e.access_token,refresh_token:e.refresh_token,user:d.user,token_type:"bearer",expires_in:i-n,expires_at:i},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(n){if(le(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var i;if(!e){const{data:c,error:d}=n;if(d)throw d;e=(i=c.session)!==null&&i!==void 0?i:void 0}if(!e?.refresh_token)throw new Bt;const{data:a,error:o}=await this._callRefreshToken(e.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):a?this._returnResult({data:{user:a.user,session:a},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(le(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){var i;
56try{if(!Zt())throw new wd("No browser detected.");if(e.error||e.error_description||e.error_code)throw new wd(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 wE("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new wd("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 wE("No code detected.");const{data:A,error:M}=await this._exchangeCodeForSession(e.code);if(M)throw M;const D=new URL(window.location.href);return D.searchParams.delete("code"),window.history.replaceState(window.history.state,"",D.toString()),{data:{session:A.session,redirectType:(i=A.redirectType)!==null&&i!==void 0?i:null},error:null}}const{provider_token:a,provider_refresh_token:o,access_token:c,refresh_token:d,expires_in:h,expires_at:f,token_type:g}=e;if(!c||!h||!d||!g)throw new wd("No session defined in URL");const v=Math.round(Date.now()/1e3),y=parseInt(h);let _=v+y;f&&(_=parseInt(f));const w=_-v;w*1e3<=oo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${y}s`);const S=_-y;v-S>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",S,_,v):v-S<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",S,_,v);const{data:k,error:x}=await this._getUser(c);if(x)throw x;const C={provider_token:a,provider_refresh_token:o,access_token:c,expires_in:y,expires_at:_,refresh_token:d,token_type:g,user:k.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:C,redirectType:e.type},error:null})}catch(a){if(le(a))return this._returnResult({data:{session:null,redirectType:null},error:a});throw a}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await Is(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var i;const{data:a,error:o}=n;if(o&&!_d(o))return this._returnResult({error:o});const c=(i=a.session)===null||i===void 0?void 0:i.access_token;if(c){const{error:d}=await this.admin.signOut(c,e);if(d&&!(DI(d)&&(d.status===404||d.status===401||d.status===403)||_d(d)))return this._returnResult({error:d})}return e!=="others"&&(await this._removeSession(),await Jt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const n=HI(),i={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,i),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:i}}}async _emitInitialSession(e){return await this._useSession(async n=>{var i,a;try{const{data:{session:o},error:c}=n;if(c)throw c;await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.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),_d(o)?console.warn(o):console.error(o)}})}async resetPasswordForEmail(e,n={}){let i=null,a=null;this.flowType==="pkce"&&([i,a]=await Za(this.storage,this.storageKey,!0));try{return await me(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:i,code_challenge_method:a,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),le(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var e;try{const{data:n,error:i}=await this.getUser();if(i)throw i;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;try{const{data:i,error:a}=await this._useSession(async o=>{var c,d,h,f,g;const{data:v,error:y}=o;if(y)throw y;const _=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:(h=e.options)===null||h===void 0?void 0:h.queryParams,skipBrowserRedirect:!0});return await me(this.fetch,"GET",_,{headers:this.headers,jwt:(g=(f=v.session)===null||f===void 0?void 0:f.access_token)!==null&&g!==void 0?g:void 0})});if(a)throw a;return Zt()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(i?.url),this._returnResult({data:{provider:e.provider,url:i?.url},error:null})}catch(i){if(le(i))return this._returnResult({data:{provider:e.provider,url:null},error:i});throw i}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var i;try{const{error:a,data:{session:o}}=n;if(a)throw a;const{options:c,provider:d,token:h,access_token:f,nonce:g}=e,v=await me(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=o?.access_token)!==null&&i!==void 0?i:void 0,body:{provider:d,id_token:h,access_token:f,nonce:g,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:er}),{data:y,error:_}=v;return _?this._returnResult({data:{user:null,session:null},error:_}):!y||!y.session||!y.user?this._returnResult({data:{user:null,session:null},error:new Ja}):(y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("USER_UPDATED",y.session)),this._returnResult({data:y,error:_}))}catch(a){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),le(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var i,a;const{data:o,error:c}=n;if(c)throw c;
56return await me(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(a=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const i=Date.now();return await KI(async a=>(a>0&&await YI(200*Math.pow(2,a-1)),this._debug(n,"refreshing attempt",a),await me(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:er})),(a,o)=>{const c=200*Math.pow(2,a);return o&&Ug(o)&&Date.now()+c-i<oo})}catch(i){if(this._debug(n,"error",i),le(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}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 i=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",i),Zt()&&!n.skipBrowserRedirect&&window.location.assign(i),{data:{provider:e,url:i},error:null}}async _recoverAndRefresh(){var e,n;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const a=await Is(this.storage,this.storageKey);if(a&&this.userStorage){let c=await Is(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:a.user},await lo(this.userStorage,this.storageKey+"-user",c)),a.user=(e=c?.user)!==null&&e!==void 0?e:Bg()}else if(a&&!a.user&&!a.user){const c=await Is(this.storage,this.storageKey+"-user");c&&c?.user?(a.user=c.user,await Jt(this.storage,this.storageKey+"-user"),await lo(this.storage,this.storageKey,a)):a.user=Bg()}if(this._debug(i,"session from storage",a),!this._isValidSession(a)){this._debug(i,"session is not valid"),a!==null&&await this._removeSession();return}const o=((n=a.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<zg;if(this._debug(i,`session has${o?"":" not"} expired with margin of ${zg}s`),o){if(this.autoRefreshToken&&a.refresh_token){const{error:c}=await this._callRefreshToken(a.refresh_token);c&&(console.error(c),Ug(c)||(this._debug(i,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession()))}}else if(a.user&&a.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(a.access_token);!d&&c?.user?(a.user=c.user,await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(i,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){this._debug(i,"error",a),console.error(a);return}finally{this._debug(i,"end")}}async _callRefreshToken(e){var n,i;if(!e)throw new Bt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const a=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(a,"begin");try{this.refreshingDeferred=new Dh;const{data:o,error:c}=await this._refreshAccessToken(e);if(c)throw c;if(!o.session)throw new Bt;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const d={data:o.session,error:null};return this.refreshingDeferred.resolve(d),d}catch(o){if(this._debug(a,"error",o),le(o)){const c={data:null,error:o};return Ug(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(c),c}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(o),o}finally{this.refreshingDeferred=null,this._debug(a,"end")}}async _notifyAllSubscribers(e,n,i=!0){const a=`#_notifyAllSubscribers(${e})`;this._debug(a,"begin",n,`broadcast = ${i}`);try{this.broadcastChannel&&i&&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(h){o.push(h)}});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 Jt(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},e),i=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&n.user&&await lo(this.userStorage,this.storageKey+"-user",{user:n.user});const a=Object.assign({},n);delete a.user;const o=TE(a);await lo(this.storage,this.storageKey,o)}else{const a=TE(n);await lo(this.storage,this.storageKey,a)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Jt(this.storage,this.storageKey),await Jt(this.storage,this.storageKey+"-code-verifier"),await Jt(this.storage,this.storageKey+"-user"),this.userStorage&&await Jt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Zt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}
56catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),oo);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async n=>{const{data:{session:i}}=n;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((i.expires_at*1e3-e)/oo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${oo}ms, refresh threshold is ${nv} ticks`),a<=nv&&await this._callRefreshToken(i.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof ZT)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Zt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.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(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,i){const a=[`provider=${encodeURIComponent(n)}`];if(i?.redirectTo&&a.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i?.scopes&&a.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[o,c]=await Za(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(c)}`});a.push(d.toString())}if(i?.queryParams){const o=new URLSearchParams(i.queryParams);a.push(o.toString())}return i?.skipBrowserRedirect&&a.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${e}?${a.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var i;const{data:a,error:o}=n;return o?this._returnResult({data:null,error:o}):await me(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(i=a?.session)===null||i===void 0?void 0:i.access_token})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var i,a;const{data:o,error:c}=n;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:h,error:f}=await me(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(i=o?.session)===null||i===void 0?void 0:i.access_token});return f?this._returnResult({data:null,error:f}):(e.factorType==="totp"&&h.type==="totp"&&(!((a=h?.totp)===null||a===void 0)&&a.qr_code)&&(h.totp.qr_code=`data:image/svg+xml;utf-8,${h.totp.qr_code}`),this._returnResult({data:h,error:null}))})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var i;const{data:a,error:o}=n;
56if(o)return this._returnResult({data:null,error:o});const c=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?NE(e.webauthn.credential_response):DE(e.webauthn.credential_response)})}:{code:e.code}),{data:d,error:h}=await me(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:c,headers:this.headers,jwt:(i=a?.session)===null||i===void 0?void 0:i.access_token});return h?this._returnResult({data:null,error:h}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+d.expires_in},d)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",d),this._returnResult({data:d,error:h}))})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var i;const{data:a,error:o}=n;if(o)return this._returnResult({data:null,error:o});const c=await me(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(i=a?.session)===null||i===void 0?void 0:i.access_token});if(c.error)return c;const{data:d}=c;if(d.type!=="webauthn")return{data:d,error:null};switch(d.webauthn.type){case"create":return{data:Object.assign(Object.assign({},d),{webauthn:Object.assign(Object.assign({},d.webauthn),{credential_options:Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:ME(d.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},d),{webauthn:Object.assign(Object.assign({},d.webauthn),{credential_options:Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:LE(d.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(e){const{data:n,error:i}=await this._challenge({factorId:e.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:i}=await this.getUser();if(i)return{data:null,error:i};const a={all:[],phone:[],totp:[],webauthn:[]};for(const o of(e=n?.factors)!==null&&e!==void 0?e:[])a.all.push(o),o.status==="verified"&&a[o.factor_type].push(o);return{data:a,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,i,a,o;if(e)try{const{payload:_}=Sd(e);let w=null;_.aal&&(w=_.aal);let S=w;const{data:{user:k},error:x}=await this.getUser(e);if(x)return this._returnResult({data:null,error:x});((i=(n=k?.factors)===null||n===void 0?void 0:n.filter(M=>M.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(S="aal2");const A=_.amr||[];return{data:{currentLevel:w,nextLevel:S,currentAuthenticationMethods:A},error:null}}catch(_){if(le(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:d}
56=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:h}=Sd(c.access_token);let f=null;h.aal&&(f=h.aal);let g=f;((o=(a=c.user.factors)===null||a===void 0?void 0:a.filter(_=>_.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(g="aal2");const y=h.amr||[];return{data:{currentLevel:f,nextLevel:g,currentAuthenticationMethods:y},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;return a?this._returnResult({data:null,error:a}):i?await me(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:i.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Bt})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async i=>{const{data:{session:a},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Bt});const c=await me(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&Zt()&&!n?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(i){if(le(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(e,n){try{return await this._useSession(async i=>{const{data:{session:a},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Bt});const c=await me(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&Zt()&&!n?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(i){if(le(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:i}=e;return i?this._returnResult({data:null,error:i}):n?await me(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Bt})})}catch(e){if(le(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;return a?this._returnResult({data:null,error:a}):i?(await me(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Bt})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let i=n.keys.find(d=>d.kid===e);if(i)return i;const a=Date.now();if(i=this.jwks.keys.find(d=>d.kid===e),i&&this.jwks_cached_at+LI>a)return i;const{data:o,error:c}=await me(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=a,i=o.keys.find(d=>d.kid===e),!i)?null:i}async getClaims(e,n={}){try{let i=e;if(!i){const{data:_,error:w}
56=await this.getSession();if(w||!_.session)return this._returnResult({data:null,error:w});i=_.session.access_token}const{header:a,payload:o,signature:c,raw:{header:d,payload:h}}=Sd(i);n?.allowExpired||t$(o.exp);const f=!a.alg||a.alg.startsWith("HS")||!a.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(a.kid,n?.keys?{keys:n.keys}:n?.jwks);if(!f){const{error:_}=await this.getUser(i);if(_)throw _;return{data:{claims:o,header:a,signature:c},error:null}}const g=n$(a.alg),v=await crypto.subtle.importKey("jwk",f,g,!0,["verify"]);if(!await crypto.subtle.verify(g,v,c,qI(`${d}.${h}`)))throw new sv("Invalid JWT signature");return{data:{claims:o,header:a,signature:c},error:null}}catch(i){if(le(i))return this._returnResult({data:null,error:i});throw i}}async signInWithPasskey(e){var n,i,a;dr(this.experimental);try{if(!vh())return this._returnResult({data:null,error:new gr("Browser does not support WebAuthn",null)});const{data:o,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(n=e?.options)===null||n===void 0?void 0:n.captchaToken}});if(c||!o)return this._returnResult({data:null,error:c});const d=LE(o.options),h=(a=(i=e?.options)===null||i===void 0?void 0:i.signal)!==null&&a!==void 0?a:av.createNewAbortSignal(),{data:f,error:g}=await tR({publicKey:d,signal:h});if(g||!f)return this._returnResult({data:null,error:g??new gr("WebAuthn ceremony failed",null)});const v=DE(f);return this._verifyPasskeyAuthentication({challengeId:o.challenge_id,credential:v})}catch(o){if(le(o))return this._returnResult({data:null,error:o});throw o}}async registerPasskey(e){var n,i;dr(this.experimental);try{if(!vh())return this._returnResult({data:null,error:new gr("Browser does not support WebAuthn",null)});const{data:a,error:o}=await this._startPasskeyRegistration();if(o||!a)return this._returnResult({data:null,error:o});const c=ME(a.options),d=(i=(n=e?.options)===null||n===void 0?void 0:n.signal)!==null&&i!==void 0?i:av.createNewAbortSignal(),{data:h,error:f}=await eR({publicKey:c,signal:d});if(f||!h)return this._returnResult({data:null,error:f??new gr("WebAuthn ceremony failed",null)});const g=NE(h);return this._verifyPasskeyRegistration({challengeId:a.challenge_id,credential:g})}catch(a){if(le(a))return this._returnResult({data:null,error:a});throw a}}async _startPasskeyRegistration(){dr(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:i}=e;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Bt});const{data:a,error:o}=await me(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})})}catch(e){if(le(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){dr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Bt});const{data:o,error:c}=await me(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:i.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(e){var n;dr(this.experimental);try{const{data:i,error:a}=await me(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=e?.options)===null||n===void 0?void 0:n.captchaToken}}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})}catch(i){if(le(i))return this._returnResult({data:null,error:i});throw i}}async _verifyPasskeyAuthentication(e){dr(this.experimental);try{const{data:n,error:i}=await me(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:er});return i?this._returnResult({data:null,error:i}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){dr(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:i}=e;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Bt});const{data:a,error:o}=await me(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:c=>({data:c,error:null})});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})})}catch(e){if(le(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){dr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;
56if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Bt});const{data:o,error:c}=await me(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:i.access_token,body:{friendly_name:e.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(e){dr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Bt});const{error:o}=await me(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:i.access_token,noResolveJson:!0});return o?this._returnResult({data:null,error:o}):this._returnResult({data:null,error:null})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}}Pc.nextInstanceID={};const T$=Pc,R$="2.105.4";let ec="";typeof Deno<"u"?ec="deno":typeof document<"u"?ec="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ec="react-native":ec="node";const A$={"X-Client-Info":`supabase-js-${ec}/${R$}`},C$={headers:A$},O$={schema:"public"},P$={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},M$={};function Mc(t){"@babel/helpers - typeof";return Mc=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},Mc(t)}function L$(t,e){if(Mc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Mc(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function N$(t){var e=L$(t,"string");return Mc(e)=="symbol"?e:e+""}function D$(t,e,n){return(e=N$(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function IE(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function St(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?IE(Object(n),!0).forEach(function(i){D$(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):IE(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}const j$=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),I$=()=>Headers,$$=(t,e,n)=>{const i=j$(n),a=I$();return async(o,c)=>{var d;const h=(d=await e())!==null&&d!==void 0?d:t;let f=new a(c?.headers);return f.has("apikey")||f.set("apikey",t),f.has("Authorization")||f.set("Authorization",`Bearer ${h}`),i(o,St(St({},c),{},{headers:f}))}};function z$(t){return t.endsWith("/")?t:t+"/"}function U$(t,e){var n,i;const{db:a,auth:o,realtime:c,global:d}=t,{db:h,auth:f,realtime:g,global:v}=e,y={db:St(St({},h),a),auth:St(St({},f),o),realtime:St(St({},g),c),storage:{},global:St(St(St({},v),d),{},{headers:St(St({},(n=v?.headers)!==null&&n!==void 0?n:{}),(i=d?.headers)!==null&&i!==void 0?i:{})}),accessToken:async()=>""};return t.accessToken?y.accessToken=t.accessToken:delete y.accessToken,y}function B$(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(z$(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var q$=class extends T${constructor(t){super(t)}},F$=class{constructor(t,e,n){var i,a;this.supabaseUrl=t,this.supabaseKey=e;const o=B$(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const c=`sb-${o.hostname.split(".")[0]}-auth-token`,d={db:O$,realtime:M$,auth:St(St({},P$),{},{storageKey:c}),global:C$},h=U$(n??{},d);if(this.storageKey=(i=h.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=h.global.headers)!==null&&a!==void 0?a:{},h.accessToken)this.accessToken=h.accessToken,this.auth=new Proxy({},{get:(g,v)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(v)} is not possible`)}});else{var f;this.auth=this._initSupabaseAuthClient((f=h.auth)!==null&&f!==void 0?f:{},this.headers,h.global.fetch)}this.fetch=$$(e,this._getAccessToken.bind(this),h.global.fetch),this.realtime=this._initRealtimeClient(St({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},h.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(g=>this.realtime.setAuth(g)).catch(g=>console.warn("Failed to set initial Realtime auth token:",g)),this.rest=new gj(new URL("rest/v1",o).href,{headers:this.headers,schema:h.db.schema,fetch:this.fetch,timeout:h.db.timeout,urlLengthLimit:h.db.urlLengthLimit}),this.storage=new AI(this.storageUrl.href,this.headers,this.fetch,n?.storage),h.accessToken||this._listenForAuthEvents()}get functions(){return new sj(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:i}=await t.auth.getSession();return(e=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:i,userStorage:a,storageKey:o,flowType:c,lock:d,debug:h,throwOnError:f,experimental:g,lockAcquireTimeout:v,skipAutoInitialize:y},_,w){const S={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new q$({url:this.authUrl.href,headers:St(St({},S),_),storageKey:o,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:i,userStorage:a,flowType:c,lock:d,debug:h,throwOnError:f,experimental:g,fetch:w,lockAcquireTimeout:v,skipAutoInitialize:y,hasCustomAuthorizationHeader:Object.keys(this.headers).some(k=>k.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new Zj(this.realtimeUrl.href,St(St({},t),{},{params:St(St({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Uv=(t,e,n)=>new F$(t,e,n);function H$(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}H$()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
56ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");var dc={};const Hi=Uv("https://uhcdtnbfvidtgpcnypka.supabase.co","sb_publishable_gIi3_TMIKQLLotFA661tlg_tmbW80DS"),nR=()=>{const t=dc.SUPABASE_URL||"",e=dc.SUPABASE_PRIVATE_KEY||dc.SUPABASE_SERVICE_ROLE_KEY||"";if(!t||!e)throw console.error("Missing Supabase environment variables:",{hasUrl:!!t,hasKey:!!e}),new Error("Server configuration error: missing Supabase credentials");return Uv(t,e,{auth:{autoRefreshToken:!1,persistSession:!1}})},V$=()=>{try{return nR()}catch(t){return console.error("Failed to create Supabase client:",t),null}},G$=t=>{const e=dc.SUPABASE_URL||"",n=dc.SUPABASE_ANON_KEY||"";if(!e||!n)throw new Error("Server configuration error: missing Supabase credentials");return Uv(e,n,{auth:{autoRefreshToken:!1,persistSession:!1},global:{headers:{Authorization:`Bearer ${t}`}}})},Y$=ns({method:"GET"}).handler(Mo("f1c2ff070152bd23ecee825766d5587b992ed2eca83d0318a38d2915577e0d5e")),n4=Object.freeze(Object.defineProperty({__proto__:null,createServerClientWithToken:G$,createServerSupabaseClient:nR,createServerSupabaseClientSafe:V$,getAuthUser:Y$,supabaseClient:Hi},Symbol.toStringTag,{value:"Module"})),rR=ne.createContext(void 0);function K$({children:t}){const[e,n]=ne.useState(null),[i,a]=ne.useState(null),[o,c]=ne.useState(!0);ne.useEffect(()=>{Hi.auth.getSession().then(({data:{session:_}})=>{a(_),n(_?.user??null),c(!1)});const{data:{subscription:y}}=Hi.auth.onAuthStateChange((_,w)=>{a(w),n(w?.user??null),c(!1)});return()=>y.unsubscribe()},[]);const d=async y=>{const{error:_}=await Hi.auth.signInWithOtp({email:y,options:{shouldCreateUser:!0}});return{error:_}},h=async(y,_)=>{const{error:w}=await Hi.auth.signInWithPassword({email:y,password:_});return{error:w}},f=async(y,_)=>{const{error:w}=await Hi.auth.verifyOtp({email:y,token:_,type:"email"});return{error:w}},g=async y=>{const{error:_}=await Hi.auth.signInWithOAuth({provider:y,options:{redirectTo:`${window.location.origin}/auth/callback`}});return{error:_}},v=async()=>{await Hi.auth.signOut()};return q.jsx(rR.Provider,{value:{user:e,session:i,isLoading:o,isAuthenticated:!!e,signInWithOtp:d,signInWithPassword:h,verifyOtp:f,signInWithOAuth:g,signOut:v},children:t})}function iR(){const t=ne.useContext(rR);if(t===void 0)throw new Error("useSupabaseAuth must be used within a SupabaseProvider");return t}function r4({children:t}){const{isAuthenticated:e,isLoading:n}=iR();return n?null:e?q.jsx(q.Fragment,{children:t}):null}function i4({children:t}){const{isAuthenticated:e,isLoading:n}=iR();return n||e?null:q.jsx(q.Fragment,{children:t})}const Ks={"common.save":"Save","common.cancel":"Cancel","common.continue":"Continue","common.back":"Back","common.backToHome":"Back to home","common.loading":"Loading...","common.connect":"Connect","common.connecting":"Connecting...","common.connected":"Connected","common.disconnect":"Disconnect","common.skip":"Skip","common.approve":"Approve","common.edit":"Edit","common.delete":"Delete","common.publish":"Publish","common.preview":"Preview","common.close":"Close","common.settingUp":"Setting up...","header.features":"Features","header.pricing":"Pricing","header.howItWorks":"How It Works","header.logIn":"Log in","header.getStarted":"Get Started","header.goToDashboard":"Go to Dashboard","header.continueSetup":"Continue Setup","landing.hero.title":"Social media on autopilot","landing.hero.subtitle":"Monolit drafts every post. You approve. It publishes on schedule.","landing.hero.cta":"Start free. No card needed.","landing.hero.tagline":"Set up in five minutes. Stop thinking about posting.","landing.badge":"Autonomous marketing intelligence","landing.headline1":"Autonomous","landing.headline2":"social intelligence","landing.headline3":"","landing.headline4":"","landing.subtitle":"Get into subconscious of your customer","landing.startFree":"Start free","landing.seeHow":"See how it works","landing.startNew":"Start New Project","landing.setupTime":"Setup time","landing.freeTier":"Free tier available","landing.agentGenerated":"Written by Monolit","landing.proof.badge":"Real results, pre-launch","landing.proof.title":"Monolit started without us.","landing.proof.desc":"Let our results speak for themselves","landing.proof.bottom":"No staging. No mock data. Monolit wrote and published every post here before launch day.","landing.howItWorks.title":"How it works","landing.howItWorks.subtitle":"Set up once. Ap
56prove daily. Reach everywhere.","landing.howItWorks.step1.title":"Tell Monolit about your business","landing.howItWorks.step1.desc":"Industry, customers, goals. Monolit builds a daily content plan with a platform-specific strategy.","landing.howItWorks.step2.title":"Monolit studies your audience","landing.howItWorks.step2.desc":"Every day you get ready-to-post drafts formatted per platform. Each one explains why it'll resonate.","landing.howItWorks.step3.title":"You approve, Monolit publishes","landing.howItWorks.step3.desc":"Review the queue, tweak anything, hit approve. Scheduling and posting across every platform is handled.","landing.howItWorks.step1.detail1":"Industry and audience","landing.howItWorks.step1.detail2":"Growth goals","landing.howItWorks.step1.detail3":"Brand voice and tone","landing.howItWorks.step2.detail1":"SaaS retention playbook","landing.howItWorks.step2.detail2":"Onboarding hot take","landing.howItWorks.step2.detail3":"Data-driven retention","landing.howItWorks.step2.speed":"Ready in 30 seconds","landing.howItWorks.step3.detail1":"Posted on X","landing.howItWorks.step3.detail2":"Posted on LinkedIn","landing.howItWorks.step3.detail3":"Posted on Instagram","landing.howItWorks.step3.result":"Week's covered. Consistently.","landing.pain.title":"Sound familiar?","landing.pain.subtitle":"Every founder knows the feeling.","landing.pain1.title":"No time for social media","landing.pain1.desc":"You know you should be posting consistently, but real work always wins. Marketing ends up on whoever has bandwidth.","landing.pain2.title":"Tried it. Didn't stick.","landing.pain2.desc":"You posted manually for a while, hired a VA, tried a scheduler. Nothing held because the bottleneck is making the content, not posting it.","landing.pain3.title":"Can't justify a marketing hire","landing.pain3.desc":"A junior marketer runs over $2,000 a month. You want the output without the overhead.","landing.builders.title":"Built for everyone","landing.builders1.title":"Freelancers and creators","landing.builders1.desc":"No marketing team? No problem. Five minutes to set up. Consistent posts forever.","landing.builders2.title":"Small businesses and teams","landing.builders2.desc":"Stop handing marketing to whoever has bandwidth. Hand it to Monolit.","landing.builders3.title":"Agencies and brands","landing.builders3.desc":"Managing multiple clients or channels? Monolit writes in each brand's voice.","landing.cta.title":"Marketing, run by intelligence.","landing.cta.subtitle":"Five minutes to set up. Then focus on what actually matters.","landing.cta.button":"Start free. No card needed.","auth.signIn":"Sign in","auth.signUp":"Sign up","auth.signOut":"Sign out","auth.continueWithGoogle":"Continue with Google","auth.continueWithApple":"Continue with Apple","auth.orContinueWith":"Or continue with","auth.emailPlaceholder":"[email protected]","auth.sessionExpired":"Session expired. Please refresh the page.","auth.popupBlocked":"Popup was blocked. Please allow popups for this site.","onboarding.step.path":"Start","onboarding.step.accounts":"Accounts","onboarding.step.details":"About","onboarding.step.challenges":"Focus","onboarding.step.industry":"Industry","onboarding.step.name":"Name","onboarding.step.goal":"Goal","onboarding.step.voice":"Voice","onboarding.step.platforms":"Platforms","onboarding.step.website":"Website","onboarding.path.title":"Let's get your Monolit agent set up","onboarding.path.subtitle":`A few quick answers and Monolit will start drafting posts in your voice.
57Takes about two minutes.`,"onboarding.path.existing":"I run a business","onboarding.path.existingDesc":"Monolit studies what you sell, who you sell to, and writes posts that fit.","onboarding.path.idea":"I'm building something new","onboarding.path.ideaDesc":`Tell Monolit what you're building.
58It handles the social side from day one.`,"onboarding.accounts.title":"Do you already have social accounts?","onboarding.accounts.subtitle":`Connect them now and Monolit can publish directly.
59You can also add or remove platforms later from your dashboard.`,"onboarding.accounts.yes":"Yes, I have accounts","onboarding.accounts.yesDesc":"Pick which ones to wire up next. Monolit posts through them once connected.","onboarding.accounts.no":"Not yet","onboarding.accounts.noDesc":"No problem. You can plug them in later from the dashboard.","onboarding.challenges.title":"What should Monolit focus on?","onboarding.challenges.subtitle":`Pick the marketing pain points you actually feel.
60Monolit uses these to bias what it writes and when.`,"onboarding.details.title":"What does your business do?","onboarding.details.subtitle":`One or two sentences is enough.
61Monolit references this every time it drafts a post, so be specific about what you sell.`,"onboarding.details.whatBuilding":"What you do","onboarding.details.whatBuildingPlaceholder":"e.g. We're a specialty coffee roaster in East Austin sourcing single-origin beans direct from farmers.","onboarding.details.whoFor":"Who it's for","onboarding.details.whoForPlaceholder":"e.g. Cafe owners and serious home brewers within driving distance of Austin.","onboarding.industry.title":"Pick your industries","onboarding.industry.subtitle":`Choose up to three.
62Monolit pulls trends, vocabulary, and post angles from each one.`,"onboarding.industry.selected":"{count}/3 selected","onboarding.name.title":"What's your business called?","onboarding.name.subtitle":`We'll use this on your dashboard and in posts.
63You can change it anytime in Settings.`,"onboarding.name.placeholder":"e.g. Happy Paws Pet Shop, Green Valley Farm","onboarding.name.suggested":"We pulled this from your accounts. Edit if it's not right.","onboarding.website.title":"Do you have a website?","onboarding.website.subtitle":`Drop the URL and Monolit will read it alongside your accounts to figure out your brand, audience, and goals.
64No site yet? Skip and fill in the next steps yourself.`,"onboarding.website.placeholder":"https://yourbusiness.com","onboarding.website.continue":"Analyze and continue","onboarding.website.skip":"I'll fill in the next steps manually","onboarding.website.analyzing":"Monolit is reading your site and accounts...","onboarding.industry.suggested":"Monolit picked this from your brand signals. Adjust if needed.","onboarding.challenges.suggested":"Monolit pre-picked these from your site and accounts. Add or remove any.","onboarding.goal.suggested":"Monolit picked this from your brand signals. Swap it if you'd rather focus elsewhere.","onboarding.details.suggested":"Monolit drafted these from your site and accounts. Edit anything that's not quite right.","onboarding.goal.title":"What's your main goal right now?","onboarding.goal.subtitle":`Monolit weights every post it writes around this goal.
65You can shift it later as your priorities change.`,"onboarding.goal.awareness":"Awareness","onboarding.goal.awarenessDesc":"Get discovered and show up where your customers already are.","onboarding.goal.trust":"Trust and Reputation","onboarding.goal.trustDesc":"Build the credibility that turns first-time visitors into repeat buyers.","onboarding.goal.s
65ales":"Sales","onboarding.goal.salesDesc":"Turn attention into revenue. Direct-response writing, clear CTAs.","onboarding.voice.title":"How should your posts sound?","onboarding.voice.subtitle":`Pick the tone your audience expects to hear.
66Then choose how often Monolit should publish.`,"onboarding.voice.preview":"Sample","onboarding.voice.howOften":"Posting frequency","onboarding.voice.professional":"Professional","onboarding.voice.professionalPreview":"We take pride in delivering quality service to every customer. Here's what's new this month.","onboarding.voice.friendly":"Friendly & warm","onboarding.voice.friendlyPreview":"Hey there! We've got some exciting news to share. Come check out what we've been up to!","onboarding.voice.casual":"Down to earth","onboarding.voice.casualPreview":"Just wrapped up a busy week. Here's a behind-the-scenes look at what we do and why we love it.","onboarding.voice.bold":"Bold & confident","onboarding.voice.boldPreview":"Most businesses get this wrong. Here's what actually works, and we have the results to prove it.","onboarding.voice.helpful":"Helpful & informative","onboarding.voice.helpfulPreview":"Quick tip: here are 3 things you can do today to get better results. We use these ourselves!","onboarding.schedule.light":"Warm up","onboarding.schedule.lightDesc":"3x per week","onboarding.schedule.regular":"Growth mode","onboarding.schedule.regularDesc":"5x per week","onboarding.schedule.active":"Full send","onboarding.schedule.activeDesc":"Daily","onboarding.platforms.title":"Connect your accounts","onboarding.platforms.subtitle":`Pick the platforms you want Monolit to publish to.
67It drafts, schedules, and posts on your behalf once connected.`,"onboarding.platforms.accountsConnected":"{count} account(s) connected. Add more from your dashboard anytime.","onboarding.platforms.comingSoon":"{platform} coming in Q2 2026","onboarding.platforms.launch":"Launch my agent","onboarding.platforms.skipForNow":"Skip for now, I'll connect later","onboarding.backToHome":"Back to home","onboarding.back":"Back","onboarding.continue":"Continue","onboarding.settingUp":"Setting up...","onboarding.connected":"Connected","onboarding.disconnect":"Disconnect","onboarding.connecting":"Connecting...","onboarding.connect":"Connect","onboarding.creatingPosts":"Creating your posts...","dashboard.tab.overview":"Overview","dashboard.tab.content":"Content","dashboard.tab.brand":"Brand Intelligence","dashboard.tab.settings":"Settings","dashboard.overview.title":"Analytics","dashboard.overview.subtitle":"Stats & performance","dashboard.settings.title":"Settings","dashboard.settings.subtitle":"Profile and business settings","dashboard.brand.title":"Brand Intelligence","dashboard.brand.subtitle":"How Monolit reads your brand","dashboard.sidebar.features":"Features","dashboard.sidebar.profile":"Settings","dashboard.sidebar.manageAccount":"Manage your account","dashboard.tab.content.desc":"Review and approve","dashboard.tab.brand.desc":"Brand context Monolit uses","dashboard.welcome":"Welcome{name}","dashboard.welcomeBack":"Welcome back{name}","dashboard.autopilotReady":"Your agent is ready. Let's get moving.","dashboard.gettingStarted":"Getting started","dashboard.stepsToAutopilot":"Three steps to autopilot","dashboard.stepsSubtitle":"Monolit is ready to draft. Finish these three steps and it starts publishing.","dashboard.step1":"Connect a social account","dashboard.step1Desc":"Link X, LinkedIn, or any other platform so Monolit can publish for you.","dashboard.step2":"Review your first posts","dashboard.step2Desc":"Head to the Posts tab. Drafts are waiting for review.","dashboard.step3":"Approve and publish","dashboard.step3Desc":"One tap to approve. Monolit handles scheduling, posting, and timing.","dashboard.connectAccounts":"Connect accounts","dashboard.connectToSeeData":"Connect accounts to see data","content.readyForReview":"Ready for review","content.approveAll":"Approve all ({count})","content.approved":"Approved","content.generateContent":"Generate posts","content.generating":"Drafting...","content.noContent":"No posts yet","content.noContentDesc":"Generate your first batch of drafts to fill the queue.","content.industryTip":"Industry tip:","content.weekOf":"Week {num} of {total}","content.approvedCount":"approved","content.schedulePost":"Schedule post","content.publishNow":"Publish now","content.rewrite":"Rewrite","settings.profile":"Profile","settings.business":"Business","settings.connectedAccounts":"Connected Accounts","settings.manageConnections":"Manage your social media connections","settings.manageProfile":"Manage your profile and business settings","settings.language":"Language","settings.uiLanguage":"Interface language","settings.contentLanguage":"Content language","settings.contentLanguageDesc":"Language Monolit writes posts in","settings.savedSuccess":"Settings saved successfully!","settings.dataPrivacy":"Data & Privacy","pricing.title":"Simple, transparent pricing","pricing.subtitle":"Start free. Upgrade when you're ready.","pricing.headline1":"Enterprise-grade output","pricing.headline2":"Budget-friendly price","pricing.heroSubtitle":"Connect your accounts. Approve what Monolit drafts, or let it ship without you. Start free, upgrade later.","pricing.free":"Free","pricing.free.forever":"forever","pricing.free.desc":"Get started with generated posts and free scheduling. No card required.","pricing.free.f1":"10 generated posts per month","pricing.free.f2":"All platforms supported","pricing.free.f3":"Free scheduling","pricing.free.f4":"Text and image generation","pricing.free.f5":"Basic analytics","pricing.free.f6":'"From Monolit.sh" signature on posts',"pricing.pro":"Pro","pricing.pro.desc":"Full autopilot. Monolit writes, times, and publishes every post.","pricing.pro.f1":"Unlimited posts generation","pricing.pro.f2"
67:"Auto-publishes","pricing.pro.f3":"Smart timing","pricing.pro.f4":"Autopilot","pricing.pro.f5":"Deep analytics","pricing.pro.f6":"Branding voice synchronize","pricing.pro.f7":"Growth strategy","pricing.pro.f8":"No Monolit signature on posts","pricing.pro.cta":"Start with Pro","pricing.pro.loading":"Redirecting...","pricing.platinum":"Platinum","pricing.platinum.desc":"Everything in Pro, plus advanced features and team seats.","pricing.platinum.f1":"Everything in Pro","pricing.platinum.f2":"Website generation (coming soon)","pricing.platinum.f3":"Domain buying (coming soon)","pricing.platinum.f4":"Video generation (coming soon)","pricing.platinum.f5":"Advanced analytics. Audience engagement and best-time-to-post (coming soon).","pricing.platinum.f6":"Unlimited team members","pricing.platinum.f7":"API access (coming soon)","pricing.platinum.f8":"Dedicated account manager","pricing.platinum.cta":"Start with Platinum","pricing.platinum.loading":"Redirecting...","pricing.perMonth":"/month","pricing.perMonthAnnual":"/mo billed annually","pricing.monthly":"Monthly","pricing.annual":"Annual","pricing.annualSave":"Save {percent}%","pricing.startFree":"Start free","pricing.upgrade":"Upgrade","pricing.currentPlan":"Current plan","pricing.mostPopular":"Most popular","analytics.title":"Analytics","analytics.subtitle":"Performance across all your connected platforms","analytics.followers":"Followers","analytics.totalReach":"Total Reach","analytics.engagement":"Engagement","analytics.posts":"Posts","analytics.followerGrowth":"Follower Growth","analytics.acrossPlatforms":"Across {count} platform(s)","analytics.noFollowerData":"No follower data yet","analytics.noFollowerDataDesc":"Data appears after the sync pipeline runs","analytics.platformComparison":"Platform Comparison","analytics.totalEngByPlatform":"Total engagement by platform","analytics.noEngData":"No engagement data yet","analytics.noEngDataDesc":"Publish posts to see platform comparison","analytics.tiktokComingSoon":"Detailed analytics coming soon","analytics.postPerformance":"Post Performance","analytics.rankingSubtitle":"Your published posts ranked by engagement","analytics.post":"Post","analytics.platform":"Platform","analytics.when":"When","analytics.noPublished":"No published posts yet","analytics.noPublishedDesc":"Approve drafts from the Content tab to see performance","analytics.bestTimes":"Best Posting Times","analytics.bestTimesDesc":"Based on your post engagement patterns (UTC)","analytics.less":"Less","analytics.more":"More","analytics.notEnoughData":"Not enough data yet","analytics.notEnoughDataDesc":"Publish posts at different times to see patterns emerge","analytics.engMix":"Engagement Mix","analytics.engMixDesc":"How your audience interacts","analytics.likes":"Likes","analytics.comments":"Comments","analytics.shares":"Shares","analytics.totalEngagement":"Total engagement","analytics.interactions":"interactions","analytics.vsPrev":"vs prev","analytics.avgEngRate":"Avg engagement rate","analytics.connectedAccounts":"connected","analytics.updating":"updating…","calendar.title":"Content Calendar","calendar.subtitle":"Schedule and manage your posts","calendar.today":"Today","calendar.newPost":"New Post","calendar.noPosts":"No posts scheduled","calendar.noPostsDesc":"Drag a draft here or create a new post.","calendar.weekOf":"Week of {month1} {date1} to {month2} {date2}, {year}","calendar.postsThisWeek":"{count} post(s) this week","calendar.dragHint":"Drag posts between days to reschedule","calendar.noTime":"No time","calendar.optimalSlot":"Optimal Slot","calendar.bestForPlatform":"Best for {platform}","calendar.addPostHere":"Add a post here","calendar.score":"Score: {score}","calendar.publishedOn":"Published {date} {time}","calendar.viewLivePost":"View live post","calendar.scheduledOn":"Scheduled {date} {time}","calendar.agentInsight":"Agent Insight","calendar.insightNone":"Nothing on the schedule this week. Head to Content and generate a batch.","calendar.insightLow":"{count} post(s) this week. Five or more per week typically drives 3x more engagement.","calendar.insightGood":"Strong week. {count} posts scheduled and Monolit is keeping the cadence steady.","calendar.legendDraft":"Draft","calendar.legendScheduled":"Scheduled","calendar.legendApproved":"Approved","calendar.legendPublished":"Published","footer.product":"Product","footer.legal":"Legal","footer.privacy":"Privacy Policy","footer.terms":"Terms of Service","footer.allRightsReserved":"All rights reserved.","footer.tagline":"Autonomous marketing intelligence for founders.","footer.solutions":"Solutions","footer.contentQueue":"Content Queue","footer.audienceFinder":"Audience Finder","footer.analytics":"Analytics","footer.autopilotSetup":"Autopilot Setup","footer.company":"Company","footer.about":"About","footer.contact":"Contact","auth.welcomeBack":"Welcome back","auth.createAccount":"Create account","auth.orContinueWithEmail":"or continue with email","auth.emailLabel":"Email address","auth.pleaseWait":"Please wait...","auth.sendCode":"Continue with email","auth.checkYourEmail":"Check your email","auth.otpSentTo":"We sent a 6-digit code to","auth.verificationCode":"Verification code","auth.verify":"Verify","auth.verifying":"Verifying...","auth.resendCode":"Didn't get the code? Resend","upgrade.featureLocked":"Unlock this feature","upgrade.upgradeToAccess":"Upgrade to {tier} to access {feature}","upgrade.upgradeToPro":"Upgrade to Pro","upgrade.upgradeToPlatinum":"Upgrade to Platinum","upgrade.postLimitReached":"You've used all 10 posts this month","upgrade.postLimitNear":"You've used {used} of 10 posts this month","upgrade.unlimitedPosts":"Upgrade to Pro for unlimited posts","upgrade.resetsOn":"Resets on {date}","common.upgrade":"Upgrade","brand.connectFirst":"Connect your accounts first","brand.connectDesc":"Monolit reads how you already communicate online to learn your voice, topics, and style. Connect at least one social account to get started.","brand.connectAccounts":"Connect Accounts","brand.understandBrand":"Let's pin down your brand","brand.analyzeDesc":"Monolit will read your connected accounts and learn how you communicate. About 30 seconds.","brand.analyzing":"Analyzing...","brand.runFirstAnalysis":"Run First Analysis","brand.posts":"Posts","brand.configured":"Configured","brand.saveChanges":"Save Changes","brand.saving":"Saving...","brand.summary":"Brand Summary","brand.factsWarning":"Only the facts you list here get referenced. Monolit never invents numbers.","brand.loadError":"Failed to load brand profile. Please try again.","brand.saveError":"Failed to save changes. Please try again.","brand.refreshError":"Failed to refresh analysis. Please try again.","common.add":"Add","growth.settingUpAutopilot":"Setting up your agent","growth.setupTitle":"Let's set up your social presence","growth.setupDesc":"For {name}
67. Confirm each section and Monolit starts drafting.","growth.yourBusiness":"your business","growth.yourGoal":"Your Goal","growth.soundsRightNext":"Sounds right, next","growth.yourVoice":"Your Voice","growth.loveItNext":"Love it, next","growth.postingSchedule":"Posting Schedule","growth.whichChannels":"Which channels should Monolit cover?","growth.looksGoodLastStep":"Looks good, last step","growth.almostDone":"Almost done","growth.connectDesc":"Link your social accounts so Monolit can post directly. Telegram is where you approve drafts on the go.","growth.goToDashboard":"Done, go to dashboard","growth.doThisLater":"I'll do this later","overview.connectForBreakdown":"Connect accounts to see the breakdown","overview.autopilotActivity":"Here's what Monolit has been up to.","overview.autopilotActive":"Autopilot active","overview.generatingPosts":"Drafting your next batch of posts...","overview.weeklyReach":"Weekly Reach","overview.reachDesc":"People who saw your posts","overview.noReachData":"No reach data yet","overview.publishToTrack":"Publish posts to start tracking","overview.platformBreakdown":"Platform Breakdown","overview.audienceSource":"Where your audience comes from","overview.noPlatformData":"No platform data yet","overview.dataAfterPublishing":"Data appears after publishing","overview.connectedAccounts":"Connected Accounts","overview.accountsActive":"{count} active","overview.followers":"{count} followers","overview.accountActive":"Active","overview.topPosts":"Top Performing Posts","overview.bestContent":"Your best content this week","overview.noPublishedPosts":"No published posts yet","overview.approveDraftsToSee":"Approve drafts from the Posts tab to see performance","schedule.whenToPublish":"When to publish?","schedule.pickDate":"Pick a date","schedule.pickDateDesc":"Choose exactly when to publish","schedule.letAgentDecide":"Let Monolit decide","schedule.agentDesc":"Monolit picks the slot with the highest expected reach.","schedule.agentAnalyzing":"Monolit is analyzing...","schedule.findingBestTime":"Finding the slot with the highest expected reach.","schedule.whyThisTime":"Why this time?","schedule.agentPicked":"Monolit picked","schedule.confirmSchedule":"C
67onfirm and schedule","schedule.time":"Time","schedule.timezone":"Timezone","nav.dashboard":"Dashboard","nav.settings":"Settings","cookie.title":"We value your privacy","cookie.description":"We use cookies and similar technologies to improve your experience, analyze traffic, and personalize content. You can choose which cookies to accept.","cookie.learnMore":"Privacy Policy","cookie.acceptAll":"Accept all","cookie.rejectAll":"Reject all","cookie.customize":"Customize","cookie.savePreferences":"Save preferences","cookie.essential":"Essential","cookie.alwaysOn":"always on","cookie.analytics":"Analytics","cookie.analyticsDesc":"Help us understand how visitors interact with our site","cookie.marketing":"Marketing","cookie.marketingDesc":"Used to deliver relevant ads and track campaigns","cookie.gpcHonored":"Your Global Privacy Control preference has been honored.","cookie.gpcDetected":"We detected your browser’s Global Privacy Control signal — marketing is pre-set to off. Confirm your preferences below.","cookie.optOutConfirmed":"Your opt-out preference has been saved. We will not sell or share your data.","cookie.alreadyOptedOut":"You have already opted out of data sharing.","footer.cookiePreferences":"Cookie Preferences","footer.doNotSell":"Do Not Sell or Share My Personal Information","home.welcome":"Welcome back","home.welcomeName":"Welcome back, {name}","home.welcomeSubtitle":"Tap a tile to drill in.","home.search":"Search features","home.account":"Account","home.theme.dark":"Dark mode — click for auto","home.theme.light":"Light mode — click for dark","home.theme.auto":"Auto (system) — click for light","home.tour.short":"Show me around","home.tour.firstAria":"Show me around — quick guided tour","home.tour.again":"Show me around again","home.tour.desc":"A 1-minute guided tour of every button.","home.tour.againDesc":"Re-run the guided tour anytime.","home.suggest.title":"Suggest a feature","home.suggest.subtitle":"Tell us what you wish Monolit did","home.suggest.desc":"You want something we don't have? Tell us.","home.suggest.aria":"Suggest a feature — tell us what you wish Monolit did","home.badge.pro":"Pro","home.badge.soon":"Soon","home.feat.content":"Content","home.feat.video":"Video","home.feat.persona":"Persona","home.feat.assets":"Assets","home.feat.calendar":"Calendar","home.feat.analytics":"Analytics","home.feat.listening":"Listening","home.feat.brand":"Brand Intelligence","home.feat.growth":"Growth Plan","home.feat.strategy":"Strategy","home.feat.intelligence":"Intelligence","home.feat.create":"Create","home.feat.getfound":"Get Found","home.feat.leads":"Leads","home.feat.seo":"SEO & AI Search","home.feat.crm":"Leads & CRM","home.feat.outreach":"Outreach","home.feat.website":"Website","home.feat.domains":"Domains","home.status.toReview":"{count} to review","home.status.connected":"{count} connected","home.status.next":"Next {time}","support.title":"Help & Feedback","support.subtitle":"We read every message","support.sidebar.title":"Report a bug or send feedback","support.sidebar.subtitle":"Report issues or suggest ideas","support.type.bug":"Bug report","support.type.feedback":"Feedback","support.type.question":"Question","support.placeholder.bug":"Describe what happened and what you expected...","support.placeholder.feedback":"Share your idea — what's missing, what could be better, what you wish we had...","support.placeholder.question":"What do you need help with?","support.replayNote":"Your session recording is attached automatically so we can see exactly what happened.","support.send":"Send","support.sending":"Sending...","support.sent.title":"Thanks for reaching out!","support.sent.desc":"We'll look into it and get back to you.","support.error":"Failed to send. Please try again.","content.write.writingFor":"Writing for","content.write.notConnected":"Not connected","content.write.notConnectedNote":"You haven't connected {platform} yet — connect it right here.","content.write.notNow":"Not now","content.write.charOverSingular":"{count} character over {platform}'s {max} limit","content.write.charOverPlural":"{count} characters over {platform}'s {max} limit","content.write.shortenWithAi":"Shorten with AI","content.write.rewriteWithAi":"Rewrite with AI","content.write.postContent":"Post content","content.write.bodyPlaceholder":"What do you want to share?","content.write.publishTo":"Publish to","content.write.addImageQ":"Add an image?","content.write.addImageLabel":"Add an image","content.write.styleMonolit":"Monolit design","content.write.styleAsset":"My asset","content.write.styleStock":"Stock","content.write.imageDirectionPlaceholder":"Optional: image direction, e.g. bright and minimal","content.write.monolitOpensStudioHint":"Monolit opens the design studio right after you save — you'll see it generate.","content.write.chooseFromLibrary":"Choose a photo from your library","content.write.libraryHint":"Your uploads and images Monolit made for you.","content.write.searchStock":"Search stock photos","content.write.stockHint":"Real-world photography — perfect for stories, ads, and announcements.","content.write.previewLabel":"Preview · {platform}","content.write.previewYourBrand":"Your Brand","content.write.previewPlaceholder":"(your post will appear here)","content.write.cancel":"Cancel","content.write.saving":"Saving…","content.write.saveAsDraft":"Save as draft","content.write.selectedAttached":"Selected · attached when you save","content.write.change":"Change","content.write.removePhoto":"Remove photo","content.write.chooseAPhoto":"Choose a photo","content.write.pickFromLibrary":"Pick a photo from your library","content.write.findStockPhoto":"Find a stock photo","content.write.letMonolitDesign":"Let Monolit design","content.write.defaultManualTitle":"Manual post","content.write.errSignInRewrite":"Sign in to use AI rewrite.","content.write.errRewriteFailed":"Rewrite failed.","content.write.errAddMoreWords":"Add a few more words.","content.write.errPickPlatform":"Pick at least one platform to publish to.","content.write.errPickPhoto":"Pick a photo, or switch to another image option.","content.write.errPickStock":"Search and pick a stock photo, or switch to another option.","content.write.errSaveDraft":"Failed to save draft","content.generate.heading":"Generate fresh drafts","content.generate.subheading":"Pick how you want to start. Both paths produce a batch of drafts across your connected platforms.","content.generate.pathIdeaTitle":"I have an idea","content.generate.pathIdeaBody":"Describe what you want to post about","content.generate.pathRecommendTitle":"Monolit recommendation","content.generate.pathRecommendBody":"See 6 topic ideas tailored to your business.","content.generate.draftBatchLabel":"a draft batch","content.generate.draftBatchNoun":"draft batches","content.generate.yourIdea":"Your idea","content.generate.suggestedTopics":"Suggested topics","content.generate.contextMessage":"so we can tailor topics to you","content.generate.thinking":"Thinking about your business…","content.generate.thinkingQueued":"Thinking about your business · #{position} in queue","content.generate.handTunedHint":"Hand-tuned by Monolit · usually 15 to 45 seconds.","content.generate.tryAgain":"Try again","content.generate.pickIntro":"Pick the one that fits this week. We'll write the drafts and create the design.","content.generate.describeTopicsPlaceholder":"Describe what topics you want…","content.generate.describeTopicsAria":"Describe what topics you want","content.generate.suggestFromDescAria":"Suggest topics from this description","content.generate.tryHints":'Try "topics about our launch this week" or "more carousel-friendly ideas".',"content.generate.showDifferent":"↻ Show me different ideas","content.generate.errSignInSuggest":"Sign in to suggest topics.","content.generate.errSuggestFailed":"Failed to suggest topics.","content.generate.errTopicGenFailed":"Topic generation failed.","content.generate.errSignInGen":"Sign in to generate drafts.","content.generate.errGenFailed":"Generation failed. Try again.","content.generate.errStillPreparing":"Drafts are still being prepared. They will appear in the review queue shortly.","content.generate.errGenTimeout":"Generation timed out. Try again in a moment.","content.generate.connectAccountTitle":"Connect an account first","content.generate.connectAccountSubtitle":"Monolit posts directly to your platforms. Connect one and we’ll generate your drafts right away.","content.generate.phaseBriefing":"Briefing the agent…","content.generate.phaseDrafting":"Drafting copy across platforms…","content.generate.phaseComposing":"Composing graphics…","content.generate.phaseWrappingUp":"Wrapping up…","content.generate.topicLabel":"Topic:","content.generate.usuallyTakes":"This usually takes 20 to 40 seconds. We will open the new draft as soon as it is ready.","content.generate.newDraft":"New draft","content.generate.chooseAPhoto":"Choose a photo","content.generate.pickOneOfYourPhotos":"Pick one of your photos","content.generate.findStockPhoto":"Find a stock photo","content.generate.yourTopic":"Your topic","content.generate.topicPlaceholder":"e.g. 'We just launched our new lavender gel collection — twelve hand-mixed shades, bookings open Friday.'","content.generate.oneSentenceHint":"One sentence is enough. We'll spread it across your platforms.","content.generate.topicCount":"{len} / 500","content.generate.addImageQ":"Add an image?","content.generate.addImageLabel":"Add an image","content.generate.styleMonolit":"Monolit design","content.generate.styleAsset":"My asset","content.generate.styleStock":"Stock","content.generate.imageDirectionPlaceholder":"Optional: image direction, e.g. bright and minimal","content.generate.assetAutoLabel":"Let Monolit pick","content.generate.assetPickLabel":"Choose a photo","content.generate.assetAutoHint":"We'll use your uploaded photos (not images we generated).","content.generate.stockAutoLabel":"Auto-match per post","content.generate.stockPickLabel":"Pick one","content.generate.stockAutoHint":"We'll match a stock photo to each post.","content.generate.choosePhoto":"Choose a photo","content.generate.searchStock":"Search stock photos","content.generate.selectedPhoto":"Selected photo · used on every post","content.generate.change":"Change","content.generate.removePhoto":"Remove photo","content.generate.pickHint":"Pick an image, or select another option.","content.generate.generateAboutThis":"Generate drafts about this","content.image.exampleBrighter":"Make it brighter and cleaner","content.image.exampleWarm":"Warm, cozy lighting","content.image.exampleBold":"Bold and colorful","content.image.exampleMinimal":"Minimal with a white background","content.image.errUploadFailed":"Upload failed","content.image.errSignInAgain":"Please sign in again.","content.image.errCouldNotStart":"Could not start the image.","content.image.errCouldNotSave":"Could not save the image.","content.image.errImageCreationFailed":"The image could not be created. Try rewording your request.","content.image.creatingTitle":"Creating your image","content.image.creatingQueued":"You're #{position} in line · usually 1 to 3 min","content.image.creatingDefault":"Hand-tuned by Monolit · usually 1 to 3 min","content.image.cancel":"Cancel","content.image.generatedAlt":"Generated","content.image.likeItHint":"Like it? Use it on your post, or tweak and try again.","content.image.tryAgain":"Try again","content.image.saving":"Saving…","content.image.useThisImage":"Use this image","content.image.createImage":"Create image","content.image.imageLabel":"Image","content.image.sourceMonolit":"Monolit design","content.image.sourceAssets":"My assets","content.image.sourceStock":"Stock image","content.image.describeLabel":"Describe what you want","content.image.describePlaceholder":"For example: a clean, bright photo of my coffee with a soft headline that says 'Now open'.","content.image.y
67ourLibrary":"Your library","content.image.upload":"Upload","content.image.uploading":"Uploading","content.image.loadingLibrary":"Loading your library…","content.image.noUploads":"No uploads yet. Tap Upload to add your first image.","content.image.pickStockLabel":"Pick a stock photo","content.image.noStockSuggestions":"No stock suggestions for this post yet.","content.image.headlineLabel":"Add a headline or message (optional)","content.image.headlinePlaceholder":"For example: Now open. Or: Summer sale, 20% off.","content.image.includeOnImage":"Include on the image (optional)","content.image.brandLabel":"Brand","content.image.brandPlaceholder":"Your brand","content.image.dateLabel":"Date","content.image.datePlaceholder":"May 22, 2026","content.image.locationLabel":"Location","content.image.locationPlaceholder":"City, Country","content.suggestions.platformAll":"All","content.suggestions.errSignIn":"Sign in to fetch suggestions.","content.suggestions.errSuggestFailed":"Failed to suggest topics.","content.suggestions.errTopicGenFailed":"Topic generation failed.","content.suggestions.carouselQualityTitle":"Carousel quality","content.suggestions.contextMessage":"so we can tailor topics to you","content.suggestions.connectedAria":"Connected","content.suggestions.connectedTitle":"Connected","content.suggestions.searchPlaceholder":"Describe what you want to post about…","content.suggestions.searchAria":"Describe the kind of topics you want","content.suggestions.refreshAria":"Refresh suggestions","content.suggestions.steeringPrefix":"Steering toward","content.suggestions.steeringSuffix":" · clear the box for unsteered ideas.","content.suggestions.unsteeredHint":"Topics use your niche, product, and customer insights. Type to steer.","content.suggestions.refreshDifferentAria":"Show different ideas","content.suggestions.refreshShort":"↻ Refresh","content.suggestions.recentIdeas":"Recent ideas","content.suggestions.unsteeredIdeas":"Unsteered ideas","content.suggestions.ideasCount":"{count} ideas","content.suggestions.removeBatchAria":"Remove this batch","content.suggestions.tryAgain":"Try again","content.suggestions.noTopics":"No topics came back this round. Try a different prompt.","content.suggestions.topicsFetchLabel":"a topics fetch","content.suggestions.topicsFetchNoun":"topic batches","content.suggestions.analyzingQueued":"Analyzing your business niche · #{position} in queue","content.suggestions.analyzingDefault":"Analyzing your industry · drafting 6 ideas…","content.suggestions.carouselPickQuality":"Carousel · pick quality","content.suggestions.carouselRenderingTitle":"Carousel · rendering","content.suggestions.qualityCheap":"Cheap","content.suggestions.qualityCheapSubtitle":"Plain backgrounds · Satori","content.suggestions.qualityCheapCost":"{units} units · ~30–60s","content.suggestions.qualityHq":"High quality","content.suggestions.qualityHqSubtitle":"Photo backgrounds · Playwright","content.suggestions.qualityHqCost":"{units} units · ~90–180s","content.suggestions.draftCopyFirstHint":"We'll draft the copy first, then start rendering your slides automatically — no second tap.","content.suggestions.generateCarousel":"Generate carousel","content.media.heading":"Pick an image","content.graphic.subtitle":"Get a branded graphic — designed around your colors and message.","content.graphic.letMonolitDesign.title":"Let Monolit design","content.graphic.letMonolitPick.title":"Let Monolit pick","content.graphic.letMonolitPick.description":"Describe it and the agent designs a branded image","content.graphic.searchTemplates.title":"Search templates","content.graphic.searchTemplates.description":"Browse ready-made layouts","content.graphic.badge.soon":"Soon","content.compose.step1":"Step 1","content.compose.question":"How do you want to make this post?","content.compose.manual.title":"Manual writing","content.compose.manual.subtitle":"Write your own content. Monolit can help you make it better.","content.compose.suggestions.title":"Monolit suggestions","content.compose.suggestions.subtitle":"Fine-tuned topics for your business","content.compose.recommended":"Recommended","content.compose.footer":"Either way every draft lands in your queue — edit, schedule, or skip before it goes live.","content.hub.heading":"Content","content.hub.thisWeek":"This week","content.hub.noDrafts":"No drafts yet","content.hub.toReviewCount":"{count} to review","content.hub.loading":"Loading…","content.hub.emptyHint":"Generate AI drafts to fill your queue.","content.hub.approvedTotal":"{approved} approved · {total} total","content.hub.generateFirstDrafts":"Generate first drafts","content.hub.drafts.title":"Drafts to review","content.hub.drafts.description":"Approve, edit, or reject AI suggestions.","content.hub.approved.title":"Approved & ready","content.hub.approved.description":"Posts queued to publish. Schedule or send.","content.hub.write.title":"Write a post","content.hub.write.description":"Write your own, or have Monolit design one for you.","content.hub.published.title":"Published","content.hub.published.description":"Posts that are live — tap one to open it.","content.published.count":"{count} published","content.published.emptyTitle":"Nothing published yet","content.published.emptyBody":"Approve and publish a draft — it shows up here with a link to the live post.","content.hub.tour.snapshot.title":"This week, at a glance","content.hub.tour.snapshot.description":"Live count of drafts the agent has waiting for your review.<br/>Empty? Generate a batch with one tap.","content.hub.tour.drafts.title":"Drafts to review","content.hub.tour.drafts.description":"Posts the agent wrote.<br/>Tap a row to approve, edit, or skip.","content.hub.tour.approved.title":"Approved & ready","content.hub.tour.approved.description":"Posts 
67you have okayed.<br/>Schedule them or publish now.","content.hub.tour.write.title":"Write a post","content.hub.tour.write.description":"Write your own, or pick from suggestions tuned to your business.","content.changeImage.internet.title":"Find a photo","content.changeImage.internet.cardTitle":"Internet image","content.changeImage.internet.cardDescription":"Search real stock photos","content.changeImage.letMonolitDesign.title":"Let Monolit design","content.changeImage.graphic.title":"Graphic design","content.changeImage.graphic.cardTitle":"Graphic design","content.changeImage.graphic.cardDescription":"Let Monolit design a branded image","content.changeImage.carousel.title":"Make a carousel","content.changeImage.carousel.cardTitle":"Make a carousel","content.changeImage.carousel.cardDescription":"A swipeable hook + key points + closing CTA","content.changeImage.carouselEdit.title":"Edit carousel","content.changeImage.carouselEdit.cardTitle":"Edit this carousel","content.changeImage.carouselEdit.cardDescription":"Pick slides to refine or change the whole concept","content.changeImage.own.title":"My Asset","content.changeImage.own.cardTitle":"My Asset","content.changeImage.own.cardDescription":"Your uploads and images Monolit made for you","content.changeImage.own.heading":"Your uploads and images Monolit made for you","content.changeImage.intent.placeholder":"Tell Monolit what image you want…","content.changeImage.intent.go":"Go","content.changeImage.intent.hint":'Try "a warm coffee shop photo", "make a launch announcement graphic", or "use my logo".',"content.changeImage.orPickPath":"or pick a path","content.internet.searchFailed":"Search failed","content.internet.searchPlaceholder":"Search photos, e.g. coffee, gym, sunset…","content.internet.search":"Search","content.internet.suggested":"Suggested for this post","content.internet.noResults":'No photos for "{query}". Try another word.',"content.internet.empty.title":"Search the web for a photo","content.internet.empty.subtitle":"Type what you're after and pick from real, free-to-use photos.","content.internet.cancel":"Cancel","content.internet.useThisImage":"Use this image","content.carousel.studio.error.signIn":"Sign in to generate a carousel.","content.carousel.studio.error.failedStart":"Failed to start the carousel.","content.carousel.studio.error.renderFailed":"Carousel render failed.","content.carousel.studio.error.attach":"Couldn't attach the carousel.","content.carousel.studio.slidesCount":"{count} slides · swipe to preview.","content.carousel.studio.slideAlt":"Slide {index}","content.carousel.studio.tryAgain":"Try again","content.carousel.studio.attaching":"Attaching…","content.carousel.studio.useSlides":"Use these slides","content.carousel.studio.phase.pending.title":"Planning slides…","content.carousel.studio.phase.pending.subtitle":"The agent is breaking your post into a hook, key points, and a CTA.","content.carousel.studio.phase.rendering.title":"Rendering slides…","content.carousel.studio.phase.rendering.subtitle":"Painting each slide with your brand. This usually takes 30–60s.","content.carousel.studio.title":"Make a carousel","content.carousel.studio.subtitle":"A swipeable hook + 3–5 key points + closing CTA — generated from this post.","content.carousel.studio.quality":"Quality","content.carousel.studio.qualityCheap.title":"Cheap","content.carousel.studio.qualityCheap.sub":"Plain backgrounds","content.carousel.studio.qualityHq.title":"High quality","content.carousel.studio.qualityHq.sub":"Photo backgrounds","content.carousel.studio.cost.label":"a carousel","content.carousel.studio.cost.unitNoun":"carousels","content.carousel.studio.generate":"Generate carousel","content.carousel.edit.error.editFailed":"Edit failed.","content.carousel.edit.error.noMode":'Pick a slide and describe a change, or fill the "Change the whole carousel" box.',"content.carousel.edit.error.signIn":"Sign in to edit a carousel.","content.carousel.edit.error.failedStartWide":"Failed to start carousel-wide edit.","content.carousel.edit.error.failedStartEdit":"Failed to start carousel edit.","content.carousel.edit.error.failedStartGeneric":"Failed to start the edit.","content.carousel.edit.phase.pending":"Planning your changes…","content.carousel.edit.phase.rendering":"Re-painting the slides…","content.carousel.edit.phase.wideHint":"A full carousel re-roll takes a minute.","content.carousel.edit.phase.slidesHint":"Per-slide edits land in about 20-40 seconds.","content.carousel.edit.title":"Edit carousel","content.carousel.edit.subtitle":"Pick slides that you want to change. You can also change the whole carousel.","content.carousel.edit.slidesLabel":"Slides ({count})","content.carousel.edit.tapToPick":"Tap to pick · multi-select","content.carousel.edit.selectedCount":"{count} selected","content.carousel.edit.selectAria":"Select slide {index}","content.carousel.edit.deselectAria":"Deselect slide {index}","content.carousel.edit.slideAlt":"Slide {index}","content.carousel.edit.describeHeading":"Describe what to change for each selected slide","content.carousel.edit.slideLabel":"Slide {index}","content.carousel.edit.currentlyLabel":"Currently: {value}","content.carousel.edit.removeAria":"Remove slide {index}","content.carousel.edit.removeTitle":"Remove from edit","content.carousel.edit.slidePlaceholder":'e.g. "shorter headline", "different angle", "more concrete number"',"content.carousel.edit.or":"or","content.carousel.edit.wide.title":"Change the whole carousel","content.carousel.edit.wide.placeholder":'e.g. "warmer palette across all slides", "more editorial feel", "punchier 
67copy throughout"',"content.carousel.edit.wide.hint":`Filling this box re-rolls every slide 
68per-slide edits above won't apply if you fill this.`,"content.carousel.edit.cost.wide":"a full re-roll","content.carousel.edit.cost.slides.one":"{count} slide edit","content.carousel.edit.cost.slides.many":"{count} slide edits","content.carousel.edit.cost.generic":"an edit","content.carousel.edit.cost.unitNoun":"carousel edits","content.carousel.edit.apply":"Apply changes","content.template.picker.loadFailed":"Failed to load templates","content.template.picker.familyFallback":"A curated set of layouts.","content.template.picker.searchInFamily":"Search in {name}","content.template.picker.searchAll":"Search all layouts","content.template.picker.searchAria":"Search templates","content.template.picker.pickStyle":"Pick a style · {count} options","content.template.picker.browseAria":"Browse {name} ({count} layouts)","content.template.picker.layoutsCount":"{count} layouts","content.template.picker.stylesBack":"Styles","content.template.picker.resultsOne":'{count} result for "{query}"',"content.template.picker.resultsMany":'{count} results for "{query}"',"content.template.picker.noLayouts":"No layouts match.","content.template.picker.backToStyles":"Back to styles","content.template.picker.chooseAria":"Choose {name}","content.template.picker.current":"Current","content.template.picker.cancel":"Cancel","content.template.picker.step.choose":"Choose","content.template.picker.step.customise":"Customise","content.template.preview.previewFailed":"Preview failed","content.template.preview.previewAlt":"Design preview","content.template.preview.rendering":"Rendering preview…","content.template.preview.rerendering":"Re-rendering…","content.template.preview.tryAnotherLayout":"Try another layout","content.template.preview.switchAria":"Switch to {name}","content.template.preview.field.businessName":"Business name","content.template.preview.field.headline":"Headline","content.template.preview.field.subhead":"Subhead","content.template.preview.field.cta":"CTA","content.template.preview.field.tagline":"Tagline","content.template.preview.placeholder.businessName":"Acme Co","content.template.preview.placeholder.headline":"BIG NEW THING","content.template.preview.placeholder.subhead":"A short supporting line","content.template.preview.placeholder.cta":"Buy now","content.template.preview.placeholder.tagline":"NEW LAUNCH","content.template.preview.pickAnother":"← Pick another","content.template.preview.applying":"Applying…","content.template.preview.useDesign":"Use this design","content.template.preview.photo.heading":"Photo","content.template.preview.photo.current":"Current","content.template.preview.photo.stock":"Stock","content.template.preview.photo.myAssets":"My assets","content.template.preview.photo.currentHint":"Using the photo currently attached to this draft.","content.template.preview.photo.stockPlaceholder":"e.g. modern workspace, sunset, food","content.template.preview.photo.stockAria":"Stock photo search query","content.template.preview.photo.stockHint":"Pexels searches a free, commercially-licensed library.","content.template.preview.photo.noAssets":"No uploaded assets yet. Add some in Assets to use them here.","content.draft.list.draftFallbackTitle":"Draft","content.draft.list.emptyTitle":"All caught up","content.draft.list.emptyBody":"Nothing waiting for review. Generate fresh drafts from the previous screen.","content.draft.list.waitingOne":"{count} draft waiting · tap to review","content.draft.list.waitingMany":"{count} drafts waiting · tap to review","content.draft.list.untitledDraft":"Untitled draft","content.draft.detail.changeImageTitle":"Change image","content.draft.detail.editCopyTitle":"Edit copy","content.draft.detail.chooseDesignTitle":"Choose a design","content.draft.detail.customiseDesignTitle":"Customise design","content.draft.detail.headlineFallback":"New post","content.draft.detail.brandFallback":"Your Brand","content.draft.detail.queuePosition":"Designing · you're #{pos} in queue","content.draft.detail.designing":"Designing your post…","content.draft.detail.renderingPreview":"Rendering preview…","content.draft.detail.handTuned":"Hand-tuned by Monolit · usually 1 to 3 min","content.draft.detail.designFailed":"Couldn’t auto-design an image","content.draft.detail.designFailedHint":"Your post is ready — add your own image, or publish text-only.","content.draft.detail.designFailedAction":"Add your own image","content.draft.detail.changeImage":"Change image","content.draft.detail.editCopy":"Edit copy","content.draft.detail.skip":"Skip","content.draft.detail.approve":"Approve","content.draft.detail.working":"Working…","content.draft.detail.errors.approve":"Failed to approve","content.draft.detail.errors.skip":"Failed to skip","content.draft.detail.errors.signInCommit":"Sign in to commit a design.","content.draft.detail.errors.saveDesign":"Failed to save design.","content.draft.detail.errors.applyDesign":"Failed to apply design.","content.approved.emptyTitle":"No approved posts yet","content.approved.emptyBody":"Approve drafts from the review queue and they'll show up here ready to schedule or publish.","content.approved.untitled":"Untitled","content.approved.scheduling":"Scheduling…","content.approved.scheduleNextSlot":"Schedule next slot","content.approved.errors.schedule":"Failed to schedule","content.approved.uploadNow":"Upload now","content.approved.manage":"Schedule or publish","content.publishChoice.title":"Schedule or publish","content.publishChoice.approvedBadge":"Approved","content.publishChoice.prompt":"What should happen with this post?","content.publishChoice.currentlyScheduled":"Scheduled for {when}","content.publishChoice.uploadNow":"Upload now","content.publishChoice.uploadNowHint":"Publish to your connected accounts right away.","content.publishChoice.publishing":"Publishing…","content.publishChoice.schedule":"Schedule for later","content.publishChoice.reschedule":"Re-schedule","content.publishChoice.scheduleHint":"Pick a date and time — the agent posts it for you.","content.publishChoice.pickWhen":"When should it go out?","content.publishChoice.nextSlot":"Next best slot · {when}","content.publishChoice.confirmSchedule":"Schedule it","content.publishChoice.back":"Back","content.publishChoice.done":"Done","content.publishChoice.publishedTitle":"Posted! 🚀","content.publishChoice.publishedBody":"Your post is live on {platforms}.","content.publishChoice.scheduledTitle":"Scheduled","content.publishChoice.scheduledBody":"The agent will post this on {when}.","content.publishChoice.errors.schedule":"Failed to schedule","content.publishChoice.errors.publish":"Failed to publish","content.publishChoice.errors.pickTime":"Pick a date and time first.","content.publishChoice.errors.pastTime":"That time is in the past — pick a future slot.","content.publishChoice.errors.signIn":"Sign in to publish.","content.publishChoice.errors.noAccounts":"No connected account for these platforms. Connect one first, then publish.","content.copy.writingFor":"Writing for","content.copy.charsOver":"+{over} over","content.copy.charsOfMax":"{len}/{max}","content.copy.notConnected":"Not connected","content.copy.notConnectedNote":"You haven't connected {platform} yet — connect it right here.","content.copy.notNow":"Not now","content.copy.overByOne":"{count} character over {platform}'s {max} limit","content.copy.overByMany":"{count} characters over {platform}'s {max} limit","content.copy.shortenWithAi":"Shorten with AI","content.copy.rewriteWithAi":"Rewrite with AI","content.copy.rewriteTooltip":"Use AI to rewrite the body for clarity and flow","content.copy.shortenTooltip":"Use AI to shorten to fit {platform} ({max} chars)","content.copy.title":"Title","content.copy.headlinePlaceholder":"Headline","content.copy.body":"Body","content.copy.bodyPlaceholder":"What do you want to share?","content.copy.previewHeading":"Preview · {platform}","content.copy.brandFallback":"Your Brand","content.copy.previewEmpty":"(your post will appear here)","content.copy.cancel":"Cancel","content.copy.saving":"Saving…","content.copy.saveChanges":"Save changes","content.copy.errors.signInRewrite":"Sign in to use AI rewrite.","content.copy.errors.rewriteFailed":"Rewrite failed.","content.copy.errors.save":"Failed to save","persona.hub.eyebrow":"Persona","persona.hub.personas":"Personas","persona.hub.noPersonas":"No personas yet","persona.hub.count.one":"{count} persona","persona.hub.count.many":"{count} personas","persona.hub.loading":"Loading…","persona.hub.emptyHint":"Create one to anchor your image and video output.","persona.hub.progress":"{ready} ready · {pending} in progress","persona.hub.cost.label":"a new persona","persona.hub.cost.unitNoun":"full personas","persona.hub.createFirst":"Create your first persona","persona.hub.myPersonas":"My personas","persona.hub.createPersona":"Create persona","persona.hub.card.myPersonas.title":"My personas","persona.hub.card.myPersonas.desc":"Browse, rename, or remove existing personas.","persona.hub.card.create.title":"Create new persona","persona.hub.card.create.desc":"Generate fresh portraits matching your brand.","persona.hub.error.load":"Failed to load personas","persona.hub.error.network":"Network error loading personas","persona.hub.tour.snapshot.title":"Your personas","persona.hub.tour.snapshot.desc":"A persona is a consistent character — same face, outfit, vibe — that the agent uses across posts and videos so your brand looks unmistakable.","persona.hub.tour.list.t
68itle":"My personas","persona.hub.tour.list.desc":"Browse, rename, or remove the personas you have created.<br/>Tap any to see all their portraits.","persona.hub.tour.create.title":"Create a new persona","persona.hub.tour.create.desc":"Pick a name, gender, and country. Monolit drafts three portrait options — pick the one you like.","persona.list.status.draft":"Draft","persona.list.status.generating":"Generating","persona.list.status.ready":"Ready","persona.list.status.failed":"Failed","persona.list.empty.title":"No personas yet","persona.list.empty.desc":"Head back and create your first persona. Monolit will generate three candidate portraits for you to pick from.","video.wizard.format.vertical":"Vertical","video.wizard.format.square":"Square","video.wizard.format.landscape":"Landscape","video.wizard.structure.simple.label":"Single scene","video.wizard.structure.multi.label":"Multi-scene cut","video.wizard.structure.simple.description":"One continuous shot or visual. Lower production cost, faster to render.","video.wizard.structure.multi.description":"Multiple cuts with transitions. Higher production value, longer render.","video.wizard.strategy.product_showcase.title":"Product showcase","video.wizard.strategy.product_showcase.description":"Hero shots of your product with clean lighting and smooth motion.","video.wizard.strategy.social_ad.title":"Social ad","video.wizard.strategy.social_ad.description":"Fast-paced punchy edit built to stop the scroll on Reels and TikTok.","video.wizard.strategy.cinematic_reveal.title":"Cinematic reveal","video.wizard.strategy.cinematic_reveal.description":"Atmospheric build-up with cinematic lighting, score, and a hero reveal.","video.wizard.strategy.tutorial.title":"Tutorial","video.wizard.strategy.tutorial.description":"Step-by-step walkthrough with captions and a calm, instructive pace.","video.wizard.applied-edit-rationale":"Applied edit","video.wizard.render-failed":"Render failed","video.wizard.media-default-name":"image","video.wizard.brief-reference-name":"Brief reference","video.wizard.step-rail.plan":"Plan","video.wizard.step-rail.concept":"Concept","video.wizard.step-rail.library":"Library","video.wizard.step-rail.render":"Render","video.wizard.step-rail.ready":"Ready","video.wizard.step-rail.back-aria":"Go back to step {index}: {label}","video.wizard.step-rail.current-aria":"Step {index}: {label} (current)","video.wizard.step-rail.step-aria":"Step {index}: {label}","video.wizard.analyzing.heading":"Analyzing your brief…","video.wizard.analyzing.sub":"Reading your description and reference image, then matching them to the strongest plan.","video.wizard.edit.drill-title":"Edit video","video.wizard.edit.compose.eyebrow":"Edit · describe the change","video.wizard.edit.compose.heading":"What should the agent change about this video?","video.wizard.edit.compose.placeholder":"e.g. Make it punchier. Shorter cuts, brighter colors, square format for Instagram.","video.wizard.edit.compose.help":"The agent reads this alongside the current spec and decides which settings to change. You'll review the plan before any new render runs.","video.wizard.edit.compose.analyze-cta":"Analyze with agent","video.wizard.edit.analyzing.heading":"Agent is reading your edit…","video.wizard.edit.analyzing.sub":"Comparing your change request against the current spec and picking what to flip.","video.wizard.edit.error.eyebrow":"Couldn't read the request","video.wizard.edit.error.no-plan":"The agent didn't return a usable plan.","video.wizard.edit.error.retry-cta":"Edit your request","video.wizard.edit.error.signin":"Sign in to use the editing agent.","video.wizard.edit.error.generic":"Could not analyze the request","video.wizard.edit.review.eyebrow":"Agent's plan","video.wizard.edit.review.row.strategy":"Strategy","video.wizard.edit.review.row.structure":"Structure","video.wizard.edit.review.row.length":"Length","video.wizard.edit.review.row.format":"Format","video.wizard.edit.review.seconds":"{seconds}s","video.wizard.edit.review.scene-direction":"New scene direction","video.wizard.edit.review.apply":"Apply & re-render","video.wizard.edit.review.tweak":"Tweak my request","video.wizard.step.concept.step-label":"Step 2","video.wizard.step.concept.heading":"Pick one of the two AI-generated directions.","video.wizard.step.concept.back":"Back","video.wizard.step.concept.render-cta":"Render Final Video","video.wizard.step.concept.render-meta":"~30s render · uses 1 credit","video.wizard.step.concept.option.pristine_studio.title":"Pristine Studio","video.wizard.step.concept.option.pristine_studio.subtitle":"Clean & Minimal","video.wizard.step.concept.option.pristine_studio.description":"Soft seamless backdrop, slow rotation, crisp catchlight.","video.wizard.step.concept.option.midnight_minimal.title":"Midnight Minimal","video.wizard.step.concept.option.midnight_minimal.subtitle":"Sleek & Understated","video.wizard.step.concept.option.midnight_minimal.description":"Low-key lighting, single accent rim, ambient drone.","video.wizard.step.concept.option.urban_glow.title":"The Urban Glow","video.wizard.step.concept.option.urban_glow.subtitle":"Cyberpunk Aesthetics","video.wizard.step.concept.option.urban_glow.description":"Neon signage, rain-slick streets, fast cuts.","video.wizard.step.concept.option.sunlit_pop.title":"Sunlit Pop","video.wizard.step.concept.option.sunlit_pop.subtitle":"Bright & Confident","video.wizard.step.concept.option.sunlit_pop.description":"High-key, vibrant graphics, snappy transitions.","video.wizard.step.concept.option.nebula_drift.title":"Nebula Drift","video.wizard.step.concept.option.nebula_drift.subtitle":"Atmospheric Reveal","video.wizard.step.concept.option.nebula_drift.description":"Slow push-in, fog particles, low strings score.","video.wizard.step.concept.option.glass_horizon.title":"Glass Horizon","video.wizard.step.concept.option.glass_horizon.subtitle":"Sleek Reflection","video.wizard.step.concept.option.glass_horizon.description":"Mirror floor, beam of light, quiet build.","video.wizard.step.concept.option.stepwise.title":"Stepwise","video.wizard.step.concept.option.stepwise.subtitle":"Clean & Instructive","video.wizard.step.concept.option.stepwise.description":"Numbered captions, top-down framing, calm pace.","video.wizard.step.concept.option.pop_up_guide.title":"Pop-Up Guide","video.wizard.step.concept.option.pop_up_guide.subtitle":"Friendly & Casual","video.wizard.step.concept.option.pop_up_guide.description":"Hand-drawn callouts, warm tone, light music bed.","video.wizard.step.strategy.step-label":"Step 1","video.wizard.step.strategy.heading":"Pick a goal — the agent matches pacing, voiceover, and shot list to it.","video.wizard.step.strategy.anchor-label":"Anchor character","video.wizard.step.strategy.persona-none":"None","video.wizard.step.strategy.persona-empty":"No personas yet. Create one in the Persona tab to keep a consistent character across shots.","video.wizard.step.strategy.format-label":"Format","video.wizard.step.strategy.length-label":"Length","video.wizard.step.strategy.generate-cta":"Generate Strategy","video.wizard.step.strategy.tour.goal.title":"Pick a goal","video.wizard.step.strategy.tour.goal.description":"The agent matches pacing, voiceover, and shot list to whichever goal you pick.","video.wizard.step.strategy.tour.persona.title":"Anchor character (optional)","video.wizard.step.strategy.tour.persona.description":"Use a saved persona so the same face/style appears in every video — huge for brand consistency.","video.wizard.step.strategy.tour.format.title":"Format","video.wizard.step.strategy.tour.format.description":"Pick the aspect ratio. Vertical for Reels/TikTok/Shorts, Square for IG feed, Landscape for YouTube.","video.wizard.step.strategy.tour.length.title":"Length","video.wizard.step.strategy.tour.length.description":"Shorter = cheaper + tighter. 15s is the sweet spot for most placements.","video.wizard.step.strategy.tour.generate.title":"Generate strategy","video.wizard.step.strategy.tour.generate.description":"Hands the picks off to the agent, who turns them into a render plan.","video.wizard.step.scripts.placement.all":"All","video.wizard.step.scripts.placement.tiktok":"TikTok","video.wizard.step.scripts.placement.instagram":"IG Reels","video.wizard.step.scripts.placement.youtube":"Shorts","video.wizard.step.scripts.placement.facebook":"FB Reels","video.wizard.step.scripts.search-placeholder":"Describe the kind of video you want…","video.wizard.step.scripts.search-aria":"Describe the kind of video you want","video.wizard.step.scripts.refresh-aria":"Refresh suggestions","video.wizard.step.scripts.refresh-different-aria":"Show different ideas","video.wizard.step.scripts.refresh":"↻ Refresh","video.wizard.step.scripts.steering-prefix":"Steering toward","video.wizard.step.scripts.tap-hint":"Tap an idea to make it. You can tweak it on the next step.","video.wizard.step.scripts.recent-ideas":"Recent ideas","video.wizard.step.scripts.unsteered":"Unsteered ideas","video.wizard.step.scripts.batch-count":"{count} ideas","video.wizard.step.scripts.remove-batch-aria":"Remove this batch","video.wizard.step.scripts.queued-position":"Sketching ideas · #{position} in queue","video.wizard.step.scripts.sketching":"Sketching video ideas…","video.wizard.step.scripts.sketching-sub"
68:"Hand-tuned by Monolit · usually 15 to 45 seconds.","video.wizard.step.scripts.try-again":"Try again","video.wizard.step.scripts.context-message":"so we can tailor video ideas to you","video.wizard.step.scripts.error.signin":"Sign in to get video ideas.","video.wizard.step.scripts.error.failed":"Failed to sketch video ideas.","video.wizard.step.scripts.error.generation-failed":"Idea generation failed.","video.wizard.step.brief.step-label":"Step 1 · AI plan","video.wizard.step.brief.heading":"Tell Monolit what you want. Both fields are optional.","video.wizard.step.brief.back":"Back","video.wizard.step.brief.add-reference":"Add reference image","video.wizard.step.brief.picker-heading":"Add a reference image","video.wizard.step.brief.reference-label":"Reference image · optional","video.wizard.step.brief.reference-alt":"Reference","video.wizard.step.brief.remove-reference":"Remove reference image","video.wizard.step.brief.replace":"Replace","video.wizard.step.brief.description-label":"Description · optional","video.wizard.step.brief.description-placeholder":"e.g. Launch our chocolate bar with a bold confident tone, around 30s, vertical for IG.","video.wizard.step.brief.generate":"Generate plan","video.wizard.step.brief.switch-manual"
68:"Or pick everything manually","video.wizard.step.review.step-label":"Step 1 · AI plan","video.wizard.step.review.heading":"Here's what the agent recommends. Accept to continue or rerun.","video.wizard.step.review.row.length":"Length","video.wizard.step.review.row.format":"Format","video.wizard.step.review.row.structure":"Structure","video.wizard.step.review.row.media":"Media","video.wizard.step.review.seconds":"{duration} seconds","video.wizard.step.review.media.from-brief":"Reference image from your brief","video.wizard.step.review.media.from-brief-sub":"Used as the seed visual. No extra upload needed.","video.wizard.step.review.media.auto":"Auto-pulled from brand assets","video.wizard.step.review.media.auto-sub":"Monolit will use product shots from your asset library.","video.wizard.step.review.why":"Why:","video.wizard.step.review.cost-label":"this video","video.wizard.step.review.cost-noun":"videos at this length","video.wizard.step.review.accept":"Accept & continue","video.wizard.step.review.rerun":"Rerun","video.wizard.step.review.override":"Override manually","video.wizard.step.review.quality.label":"Quality","video.wizard.step.review.quality.cheap.title":"Cheap","video.wizard.step.review.quality.cheap.sub":"Fast & affordable","video.wizard.step.review.quality.realism.title":"Realism","video.wizard.step.review.quality.realism.sub":"Premium, cinematic","video.wizard.step.review.quality.realism.locked":"Pro only","video.wizard.step.review.quality.agent-will-use":"Agent will use {label}.","video.wizard.step.review.quality.upgrade-hint":"Upgrade to Pro to unlock Realism (cinematic models).","video.wizard.step.render.queued.queueing":"Queueing render…","video.wizard.step.render.queued.reserving":"Reserving GPU…","video.wizard.step.render.queued.almost":"Almost there…","video.wizard.step.render.rendering.composing":"AI is composing your video…","video.wizard.step.render.rendering.stitching":"Stitching shots…","video.wizard.step.render.rendering.grading":"Color-grading frames…","video.wizard.step.render.rendering.audio":"Rendering audio bed…","video.wizard.step.render.completed":"Video ready","video.wizard.step.render.failed":"Something went wrong","video.wizard.step.render.cancel":"Cancel","video.wizard.step.library.step-label":"Step 3","video.wizard.step.library.heading":"Bring shots that feed the render.","video.wizard.step.library.back":"Back","video.wizard.step.library.back-to-library":"Back to library","video.wizard.step.library.add-to-library":"Add image to library","video.wizard.step.library.picker-heading":"Add an image","video.wizard.step.library.add-image":"Add image","video.wizard.step.library.selected-heading":"Selected for render","video.wizard.step.library.empty":'No images yet. Tap "Add image" to upload or pick from your library.',"video.wizard.step.library.empty-signin":"Sign in to upload product shots or pick from your asset library.","video.wizard.step.library.select-aria":"Select {name}","video.wizard.step.library.deselect-aria":"Deselect {name}","video.wizard.step.library.remove-aria":"Remove {name}","video.wizard.step.library.cost-label":"this video","video.wizard.step.library.cost-noun":"videos at this length","video.wizard.step.library.continue":"Continue","video.wizard.step.mode.step-label":"Step 1","video.wizard.step.mode.heading":"How do you want to make this video?","video.wizard.step.mode.manual.title":"I have an idea","video.wizard.step.mode.manual.subtitle":"Describe your concept and set the strategy, format, and length yourself.","video.wizard.step.mode.ai.title":"Let Monolit design it","video.wizard.step.mode.ai.subtitle":"Drop a reference, describe your goal, and Monolit picks everything for you.","video.wizard.step.mode.recommended":"Recommended","video.wizard.step.mode.override-note":"Either way you can override individual settings before rendering.","video.wizard.step.ready.heading":"Video ready","video.wizard.step.ready.subheading":"Your AI-generated video is ready. Download, share, or keep editing.","video.wizard.step.ready.download":"Download","video.wizard.step.ready.share":"Share","video.wizard.step.ready.copied":"Copied","video.wizard.step.ready.edit":"Edit","video.wizard.step.ready.create-another":"Create New Video","video.wizard.step.ready.share-default-title":"My video","video.wizard.step.ready.player-default-title":"Video"},sR=[{code:"en",name:"English",englishName:"English",flag:"🇺🇸"},{code:"es",name:"Español",englishName:"Spanish",flag:"🇪🇸"},{code:"pt",name:"Português",englishName:"Portuguese",flag:"🇧🇷"},{code:"fr",name:"Français",englishName:"French",flag:"🇫🇷"},{code:"de",name:"Deutsch",englishName:"German",flag:"🇩🇪"},{code:"ja",name:"日本語",englishName:"Japanese",flag:"🇯🇵"},{code:"ko",name:"한국어",englishName:"Korean",flag:"🇰🇷"},{code:"zh",name:"中文",englishName:"Chinese",flag:"🇨🇳"},{code:"ar",name:"العربية",englishName:"Arabic",flag:"🇸🇦"},{code:"hi",name:"हिन्दी",englishName:"Hindi",flag:"🇮🇳"},{code:"id",name:"Bahasa Indonesia",englishName:"Indonesian",flag:"🇮🇩"},{code:"th",name:"ไทย",englishName:"Thai",flag:"🇹🇭"},{code:"vi",name:"Tiếng Việt",englishName:"Vietnamese",flag:"🇻🇳"},{code:"tr",name:"Türkçe",englishName:"Turkish",flag:"🇹🇷"},{code:"ru",name:"Русский",englishName:"Russian",flag:"🇷🇺"},{code:"it",name:"Italiano",englishName:"Italian",flag:"🇮🇹"},{code:"nl",name:"Nederlands",englishName:"Dutch",flag:"🇳🇱"},{code:"pl",name:"Polski",englishName:"Polish",flag:"🇵🇱"},{code:"sv",name:"Svenska",englishName:"Swedish",flag:"🇸🇪"}],ai="en";function s4(t){return sR.find(e=>e.code===t)}function tc(t){return sR.some(e=>e.code===t)}const Fg={en:Ks},W$={es:()=>fe(()=>import("./es-CmVJqEG6.js"),[]),pt:()=>fe(()=>import("./pt-ME52yrwk.js"),[]),fr:()=>fe(()=>import("./fr-99cuG-xb.js"),[]),zh:()=>fe(()=>import("./zh-DTJT7DaL.js"),[]),vi:()=>fe(()=>import("./vi-CZKf5rJr.js"),[]),de:()=>fe(()=>import("./de-XMF6GLhA.js"),[]),ja:()=>fe(()=>import("./ja-BGGTezer.js"),[]),ko:()=>fe(()=>import("./ko-DDtkdg1c.js"),[]),ar:()=>fe(()=>import("./ar-wzQeipfP.js"),[]),hi:()=>fe(()=>
68import("./hi-H0G87hYC.js"),[]),id:()=>fe(()=>import("./id-CTOkx1zl.js"),[]),th:()=>fe(()=>import("./th-CIf0IeUZ.js"),[]),tr:()=>fe(()=>import("./tr-DTYOjGSb.js"),[]),ru:()=>fe(()=>import("./ru-eiRPRwWN.js"),[]),it:()=>fe(()=>import("./it-DDQkbu8N.js"),[]),nl:()=>fe(()=>import("./nl-AQoR7IPg.js"),[]),pl:()=>fe(()=>import("./pl-B6ruy9rL.js"),[]),sv:()=>fe(()=>import("./sv--9mnX9Hb.js"),[])};async function Hg(t){if(Fg[t])return Fg[t];if(t==="en")return Ks;const e=W$[t];if(!e)return console.warn(`[i18n] No translation file for "${t}", falling back to English`),Ks;try{const n=await e();return Fg[t]=n.default,n.default}catch{return console.warn(`[i18n] Failed to load "${t}", falling back to English`),Ks}}function J$(t,e,n){let i=t[e]||Ks[e]||e;if(n)for(const[a,o]of Object.entries(n))i=i.replace(`{${a}}`,o);return i}const aR=ne.createContext({locale:ai,setLocale:()=>{},t:t=>Ks[t]||t,isLoading:!1,country:""});function Z$(){return ne.useContext(aR)}const oR="monolit_lang";function X$(){return typeof window>"u"?null:localStorage.getItem(oR)}function $E(t){typeof window>"u"||localStorage.setItem(oR,t)}function Q$(){if(typeof navigator>"u")return ai;const t=navigator.language?.split("-")[0]||ai;return tc(t)?t:ai}const zE=ns({method:"GET"}).handler(Mo("9be3c2ae15f28f16f667bcbeed4f72029a45e5cfdc1141faccca3fa1b9278393"));function ez({children:t}){const[e,n]=ne.useState(ai),[i,a]=ne.useState(Ks),[o,c]=ne.useState(!0),[d,h]=ne.useState("");ne.useEffect(()=>{(async()=>{const y=X$();if(y&&tc(y)){if(y!==ai){const x=await Hg(y);a(x)}n(y),document.documentElement.lang=y;try{const x=await zE();x.country&&h(x.country)}catch{}c(!1);return}let _=null;try{const x=await zE();x.locale&&tc(x.locale)&&(_=x.locale),x.country&&h(x.country)}catch{}const w=Q$(),S=_||w||ai,k=tc(S)?S:ai;if(k!==ai){const x=await Hg(k);a(x)}n(k),$E(k),document.documentElement.lang=k,c(!1)})()},[]);const f=ne.useCallback(async v=>{if(!tc(v))return;c(!0);const y=await Hg(v);a(y),n(v),$E(v),document.documentElement.lang=v,c(!1)},[]),g=ne.useCallback((v,y)=>J$(i,v,y),[i]);return q.jsx(aR.Provider,{value:{locale:e,setLocale:f,t:g,isLoading:o,country:d},children:t})}var jh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},tz=class extends jh{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},lR=new tz,nz={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},rz=class{#e=nz;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},ov=new rz;function iz(t){setTimeout(t,0)}var sz=typeof window>"u"||"Deno"in globalThis;function fr(){}function az(t,e){return typeof t=="function"?t(e):t}function oz(t){return typeof t=="number"&&t>=0&&t!==1/0}function lz(t,e){return Math.max(t+(e||0)-Date.now(),0)}function lv(t,e){return typeof t=="function"?t(e):t}function cz(t,e){return typeof t=="function"?t(e):t}function UE(t,e){const{type:n="all",exact:i,fetchStatus:a,predicate:o,queryKey:c,stale:d}=t;if(c){if(i){if(e.queryHash!==Bv(c,e.options))return!1}else if(!Nc(e.queryKey,c))return!1}if(n!=="all"){const h=e.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||a&&a!==e.state.fetchStatus||o&&!o(e))}function BE(t,e){const{exact:n,status:i,predicate:a,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Lc(e.options.mutationKey)!==Lc(o))return!1}else if(!Nc(e.options.mutationKey,o))return!1}return!(i&&e.state.status!==i||a&&!a(e))}function Bv(t,e){return(e?.queryKeyHashFn||Lc)(t)}function Lc(t){return JSON.stringify(t,(e,n)=>cv(n)?Object.keys(n).sort().reduce((i,a)=>(i[a]=n[a],i),{}):n)}function Nc(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Nc(t[n],e[n])):!1}var uz=Object.prototype.hasOwnProperty;function cR(t,e,n=0){if(t===e)return t;if(n>500)return e;const i=qE(t)&&qE(e);if(!i&&!(cv(t)&&cv(e)))return e;const o=(i?t:Object.keys(t)).length,c=i?e:Object.keys(e),d=c.length,h=i?new Array(d):{};let f=0;for(let g=0;g<d;g++){const v=i?g:c[g],y=t[v],_=e[v];if(y===_){h[v]=y,(i?g<o:uz.call(t,v))&&f++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){h[v]=_;continue}const w=cR(y,_,n+1);h[v]=w,w===y&&f++}return o===d&&f===o?t:h}function a4(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function qE(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function cv(t){if(!FE(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!FE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function FE(t){return Object.prototype.toString.call(t)==="[object Object]"}function dz(t){return new Promise(e=>{ov.setTimeout(e,t)})}function hz(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?cR(t,e):e}function fz(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function pz(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}var qv=Symbol();function uR(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===qv?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function o4(t,e){return typeof t=="function"?t(...e):!!t}function gz(t,e,n){let i=!1,a;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(a??=e(),i||(i=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),t}var dR=(()=>{let t=()=>sz;return{isServer(){return t()},setIsServer(e){t=e}}})();function mz(){let t,e;const n=new Promise((a,o)=>{t=a,e=o});n.status="pending",n.catch(()=>{});function i(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{i({status:"fulfilled",value:a}),t(a)},n.reject=a=>{i({status:"rejected",reason:a}),e(a)},n}var vz=iz;function yz(){let t=[],e=0,n=d=>{d()},i=d=>{d()},a=vz;const o=d=>{e?t.push(d):a(()=>{n(d)})},c=()=>{const d=t;t=[],d.length&&a(()=>{i(()=>{d.forEach(h=>{n(h)})})})};return{batch:d=>{let h;e++;try{h=d()}finally{e--,e||c()}return h},batchCalls:d=>(...h)=>{o(()=>{d(...h)})},schedule:o,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{a=d}}}var un=yz(),_z=class extends jh{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n
vendor: 1,114 bytes, line 68
68)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},_h=new _z;function bz(t){return Math.min(1e3*2**t,3e4)}function hR(t){return(t??"online")==="online"?_h.isOnline():!0}var uv=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function fR(t){let e=!1,n=0,i;const a=mz(),o=()=>a.status!=="pending",c=S=>{if(!o()){const k=new uv(S);y(k),t.onCancel?.(k)}},d=()=>{e=!0},h=()=>{e=!1},f=()=>lR.isFocused()&&(t.networkMode==="always"||_h.isOnline())&&t.canRun(),g=()=>hR(t.networkMode)&&t.canRun(),v=S=>{o()||(i?.(),a.resolve(S))},y=S=>{o()||(i?.(),a.reject(S))},_=()=>new Promise(S=>{i=k=>{(o()||f())&&S(k)},t.onPause?.()}).then(()=>{i=void 0,o()||t.onContinue?.()}),w=()=>{if(o())return;let S;const k=n===0?t.initialPromise:void 0;try{S=k??t.fn()}catch(x){S=Promise.reject(x)}Promise.resolve(S).then(v).catch(x=>
68{if(o())return;const C=t.retry??(dR.isServer()?0:3),A=t.retryDelay??bz,M=typeof A=="function"?A(n,x):A,D=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,x);if(e||!D){y(x);return}n++,t.onFail?.(n,x),dz(M).then(()=>f()?void 0:_()).then(()=>{e?y(x):w()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(i?.(),a),cancelRetry:d,continueRetry:h,canStart:g,start:()=>(g()?w():_().then(w),a)}}var pR=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),oz(this.gcTime)&&(this.#e=ov.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(dR.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ov.clearTimeout(this.#e),this.#e=void 0)}};function wz(t){return{onFetch:(e,n)=>{const i=e.options,a=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],c=e.state.data?.pageParams||[];let d={pages:[],pageParams:[]},h=0;const f=async()=>{let g=!1;const v=w=>{gz(w,()=>e.signal,()=>g=!0)},y=uR(e.options,e.fetchOptions),_=async(w,S,k)=>{if(g)return Promise.reject(e.signal.reason);if(S==null&&w.pages.length)return Promise.resolve(w);const C=(()=>{const $={client:e.client,queryKey:e.queryKey,pageParam:S,direction:k?"backward":"forward",meta:e.options.meta};return v($),$})(),A=await y(C),{maxPages:M}=e.options,D=k?pz:fz;return{pages:D(w.pages,A,M),pageParams:D(w.pageParams,S,M)}};if(a&&o.length){const w=a==="backward",S=w?Sz:HE,k={pages:o,pageParams:c},x=S(i,k);d=await _(k,x,w)}else{const w=t??o.length;do{const S=h===0?c[0]??i.initialPageParam:HE(i,d);if(h>0&&S==null)break;d=await _(d,S),h++}while(h<w)}return d};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=f}}}function HE(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function Sz(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var Ez=class extends pR{#e;#t;#n;#i;#s;#r;#l;#a;constructor(t){super(),this.#a=!1,this.#l=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#i=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=GE(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#l,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=GE(this.options);e.data!==void 0&&(this.setState(VE(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#i.remove(this)}setData(t,e){const n=hz(this.state.data,t,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#o({type:"setState",state:t})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(fr).catch(fr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>cz(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qv||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>lv(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!lz(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#a||this.#c()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#i.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)}
vendor: 12,142 bytes, line 68
68)},a=()=>{const h=uR(this.options,e),g=(()=>{const v={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(v),v})();return this.#a=!1,this.options.persister?this.options.persister(h,g,this):h(g)},c=(()=>{const h={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:a};return i(h),h})();(this.#e==="infinite"?wz(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=fR({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:h=>{h instanceof uv&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(h,f)=>{this.#o({type:"failed",failureCount:h,error:f})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#i.config.onSuccess?.(h,this),this.#i.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof uv){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#o({type:"error",error:h}),this.#i.config.onError?.(h,this),this.#i.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#o(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...kz(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...VE(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?i:void 0,i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),un.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#i.notify({query:this,type:"updated",action:t})})}};function kz(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hR(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function VE(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function GE(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var xz=class extends pR{#e;#t;#n;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Tz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=fR({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,c)=>{this.#s({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#s({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",a=!this.#i.canStart();try{if(i)e();else{this.#s({type:"pending",variables:t,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const c=await this.options.onMutate?.(t,n);c!==this.state.context&&this.#s({type:"pending",context:c,variables:t,isPaused:a})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,t,this.state.context,this,n),await this.options.onSuccess?.(o,t,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,t,this.state.context,n),this.#s({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,t,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(o,t,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#s({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#s(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),un.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Tz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Rz=class extends jh{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const i=new xz({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(i),i}add(t){this.#e.add(t);const e=Ed(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Ed(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Ed(t);if(typeof e=="string"){const i=this.#t.get(e)?.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=Ed(t);return typeof e=="string"?this.#t.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){un.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>BE(e,n))}findAll(t={}){return this.getAll().filter(e=>BE(t,e))}notify(t){un.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return un.batch(()=>Promise.all(t.map(e=>e.continue().catch(fr))))}};function Ed(t){return t.options.scope?.id}var Az=class extends jh{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const i=e.queryKey,a=e.queryHash??Bv(i,e);let o=this.get(a);return o||(o=new Ez({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){un.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>UE(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>UE(t,n)):e}notify(t){un.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){un.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){un.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Cz=class{#e;#t;#n;#i;#s;#r;#l;#a;constructor(t={}){this.#e=t.queryCache||new Az,this.#t=t.mutationCache||new Rz,this.#n=t.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#l=lR.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=_h.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),i=n.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(lv(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const i=n.data;return[e,i]})}setQueryData(t,e,n){const i=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(i.queryHash)?.state.data,c=az(e,o);if(c!==void 0)return this.#e.build(this,i).setData(c,{...n,manual:!0})}setQueriesData(t,e,n){return un.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;un.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return un.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},i=un.batch(()=>this.#e.findAll(t).map(a=>a.cancel(n)));return Promise.all(i).then(fr).catch(fr)}invalidateQueries(t,e={}){return un.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},i=un.batch(()=>this.#e.findAll(t).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(fr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(i).then(fr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(lv(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(fr).catch(fr)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(fr).catch(fr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return _h.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#i.set(Lc(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],n={};return e.forEach(i=>
68{Nc(t,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(t,e){this.#s.set(Lc(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#s.values()],n={};return e.forEach(i=>{Nc(t,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Bv(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===qv&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},gR=ne.createContext(void 0),l4=t=>{const e=ne.useContext(gR);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Oz=({client:t,children:e})=>(ne.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),q.jsx(gR.Provider,{value:t,children:e}));function Pz({children:t}){const[e]=ne.useState(()=>new Cz({defaultOptions:{queries:{staleTime:3e4,gcTime:3e5,refetchOnWindowFocus:!1,refetchOnReconnect:"always",retry:1},mutations:{retry:0}}}));return q.jsx(Oz,{client:e,children:t})}const mR="monolit_cookie_consent";function bh(){if(typeof window>"u")return null;try{const t=localStorage.getItem(mR);return t?JSON.parse(t):null}catch{return null}}function nc(t){const e={...t,timestamp:new Date().toISOString()};localStorage.setItem(mR,JSON.stringify(e)),Mz(e)}function Mz(t){if(typeof window>"u")return;const e=window;e.dataLayer=e.dataLayer||[],e.dataLayer.push({event:"consent_update",analytics_storage:t.analytics?"granted":"denied",ad_storage:t.marketing?"granted":"denied",ad_user_data:t.marketing?"granted":"denied",ad_personalization:t.marketing?"granted":"denied"}),window.dispatchEvent(new CustomEvent("consent-updated",{detail:t}))}function Lz(){return typeof navigator>"u"?!1:navigator.globalPrivacyControl===!0}function Nz(){const t=bh();nc({analytics:t?.analytics??!0,marketing:!1,gpcHonored:!0})}const vR=new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB","CH","BR","TR","KR"]),Dz=new Set(["US","CA","JP","AU","NZ","SG"]);function jz(t){return!t||vR.has(t)?"opt-in":Dz.has(t)?"opt-out":"auto"}function YE(t){return vR.has(t)?t==="BR"?"lgpd":(t==="GB"||["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","CH"].includes(t),"gdpr"):t==="US"?"us":"other"}function Iz(){const{t,country:e}=Z$(),[n,i]=ne.useState(!1),[a,o]=ne.useState(!1),[c,d]=ne.useState(!1),[h,f]=ne.useState(!1),[g,v]=ne.useState(null),[y,_]=ne.useState(!1);ne.useEffect(()=>{if(bh()||!e)return;const x=Lz();_(x),x&&f(!1);const C=jz(e);C==="opt-in"?i(!0):(nc({analytics:!0,marketing:!x,gpcHonored:x}),x&&C==="opt-out"&&(v(t("cookie.gpcHonored")),setTimeout(()=>v(null),5e3)))},[e]);const w=()=>{nc({analytics:!0,marketing:!y,gpcHonored:y}),i(!1),y&&(v(t("cookie.gpcHonored")),setTimeout(()=>v(null),5e3))},S=()=>{nc({analytics:!1,marketing:!1,gpcHonored:y}),i(!1),YE(e)==="us"&&(v(t("cookie.optOutConfirmed")),setTimeout(()=>v(null),5e3))},k=()=>{nc({analytics:c,marketing:h,gpcHonored:y}),i(!1),h||YE(e)==="us"&&(v(t("cookie.optOutConfirmed")),setTimeout(()=>v(null),5e3))};return ne.useEffect(()=>{const x=()=>{const C=bh();if(C&&!C.marketing){v(t("cookie.alreadyOptedOut")),setTimeout(()=>v(null),5e3);return}Nz(),v(t("cookie.optOutConfirmed")),setTimeout(()=>v(null),5e3)};return window.addEventListener("do-not-sell",x),()=>window.removeEventListener("do-not-sell",x)},[t]),q.jsxs(q.Fragment,{children:[g&&q.jsxs("div",{className:"fixed bottom-4 left-1/2 -translate-x-1/2 z-[10000] px-5 py-3 rounded-xl shadow-xl text-sm font-medium flex items-center gap-2",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},role:"status","aria-live":"polite",children:[q.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:q.jsx("path",{d:"M20 6 9 17l-5-5"})}),g]}),n&&q.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-[9999] p-4 sm:p-6",role:"dialog","aria-label":t("cookie.title"),children:q.jsxs("div",{className:"max-w-lg mx-auto 
68sm:mx-4 rounded-2xl p-5 sm:p-6 shadow-2xl",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",backdropFilter:"blur(20px)"},children:[q.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[q.jsx("div",{className:"shrink-0 w-8 h-8 rounded-lg flex items-center justify-center text-lg",style:{background:"rgba(234,88,12,0.1)"},children:"🍪"}),q.jsxs("div",{className:"min-w-0",children:[q.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)] mb-1",children:t("cookie.title")}),q.jsxs("p",{className:"text-xs leading-relaxed text-[var(--text-muted)]",children:[t("cookie.description")," ",q.jsx("a",{href:"/legal/privacy",className:"underline hover:text-[var(--text-primary)] transition-colors",children:t("cookie.learnMore")})]}),y&&q.jsxs("p",{className:"text-[11px] leading-relaxed mt-2 px-2 py-1 rounded-md inline-flex items-start gap-1.5",style:{background:"rgba(34,197,94,0.08)",border:"1px solid rgba(34,197,94,0.2)",color:"#22c55e"},children:[q.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0,marginTop:2},children:[q.jsx("path",{d:"M9 12 11 14 15 10"}),q.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),q.jsx("span",{children:t("cookie.gpcDetected")})]})]})]}),a&&q.jsxs("div",{className:"mb-4 space-y-3 pl-11",children:[q.jsxs("label",{className:"flex items-center gap-3 cursor-not-allowed",children:[q.jsx("input",{type:"checkbox",checked:!0,disabled:!0,className:"accent-[var(--accent)]"}),q.jsxs("div",{children:[q.jsx("span",{className:"text-xs font-medium text-[var(--text-primary)]",children:t("cookie.essential")}),q.jsxs("span",{className:"text-xs text-[var(--text-muted)] ml-1",children:["(",t("cookie.alwaysOn"),")"]})]})]}),q.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[q.jsx("input",{type:"checkbox",checked:c,onChange:x=>d(x.target.checked),className:"accent-[var(--accent)]"}),q.jsxs("div",{children:[q.jsx("span",{className:"text-xs font-medium text-[var(--text-primary)]",children:t("cookie.analytics")}),q.jsx("p",{className:"text-[10px] text-[var(--text-muted)]",children:t("cookie.analyticsDesc")})]})]}),q.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[q.jsx("input",{type:"checkbox",checked:h,onChange:x=>f(x.target.checked),className:"accent-[var(--accent)]"}),q.jsxs("div",{children:[q.jsx("span",{className:"text-xs font-medium text-[var(--text-primary)]",children:t("cookie.marketing")}),q.jsx("p",{className:"text-[10px] text-[var(--text-muted)]",children:t("cookie.marketingDesc")})]})]})]}),q.jsx("div",{className:"flex items-center gap-2 pl-11",children:a?q.jsxs(q.Fragment,{children:[q.jsx("button",{onClick:k,className:"btn btn-primary text-xs px-4 py-2",children:t("cookie.savePreferences")}),q.jsx("button",{onClick:()=>o(!1),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors px-3 py-2",children:t("common.back")})]}):q.jsxs(q.Fragment,{children:[q.jsx("button",{onClick:w,className:"btn btn-primary text-xs px-4 py-2",children:t("cookie.acceptAll")}),q.jsx("button",{onClick:S,className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors px-3 py-2",children:t("cookie.rejectAll")}),q.jsx("button",{onClick:()=>o(!0),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors px-3 py-2 ml-auto",children:t("cookie.customize")})]})})]})})]})}const $z=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],dv="monolit_utm";function zz(){if(typeof window>"u"||sessionStorage.getItem(dv))return;const t=new URL(window.location.href),e={};let n=!1;for(const i of $z){const a=t.searchParams.get(i);a&&(e[i]=a,n=!0)}if(e.referrer=document.referrer||"(direct)",e.landing_page=window.location.pathname,sessionStorage.setItem(dv,JSON.stringify(e)),n)try{Qs.register(e)}catch{}}function yR(){if(typeof window>"u")return{};try{return JSON.parse(sessionStorage.getItem(dv)||"{}")}catch{return{}}}function Tn(t,e){if(typeof window<"u"){const i={...yR(),...e},a=window;a.dataLayer=a.dataLayer||[],a.dataLayer.push({event:t,...i,timestamp:new Date().toISOString()});try{Qs.capture(t,i)}catch{}}}function c4(t,e){if(typeof window<"u"){const n=yR();try{Qs.identify(t,{...n,...e})}catch{}}}function u4(t){Tn("conversion_signup",{conversion_type:"signup",method:t,currency:"USD",value:0})}function d4(t,e){Tn("conversion_checkout_start",{conversion_type:"checkout_start",plan:t,currency:"USD",value:e||0})}function h4(t,e){Tn("conversion_purchase",{conversion_type:"purchase",plan:t,currency:"USD",value:e})}function f4(){Tn("conversion_onboarding_complete",{conversion_type:"onboarding_complete"})}const p4=()=>Tn("landing_page_view"),g4=t=>Tn("cta_click",{label:t}),m4=t=>Tn("signup_start",{method:t}),v4=t=>Tn("signup_complete",{method:t}),y4=t=>Tn("login_start",{method:t}),_4=()=>Tn("login_complete"),b4=(t,e,n)=>
68Tn("onboarding_step",{step:t,step_number:e,...n}),w4=t=>Tn("onboarding_complete",{total_steps:t}),S4=t=>Tn("dashboard_view",{tab:t}),E4=()=>Tn("pricing_page_view"),Uz="/assets/styles-DKtt7u2s.css",Bz=null,qz=_x({signup:yx().optional()}),Fz="(function(){try{var stored=window.localStorage.getItem('theme');var mode=(stored==='light'||stored==='dark'||stored==='auto')?stored:'light';var prefersDark=window.matchMedia('(prefers-color-scheme: dark)').matches;var resolved=mode==='auto'?(prefersDark?'dark':'light'):mode;var root=document.documentElement;root.classList.remove('light','dark');root.classList.add(resolved);if(mode==='auto'){root.removeAttribute('data-theme')}else{root.setAttribute('data-theme',mode)}root.style.colorScheme=resolved;}catch(e){}})();",Hz="window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag('consent','default',{'analytics_storage':'denied','ad_storage':'denied','ad_user_data':'denied','ad_personalization':'denied','wait_for_update':500});",Vz="GTM-P8S7BFW7",Gz=JSON.stringify([{"@context":"https://schema.org","@type":"Organization","@id":"https://monolit.sh/#organization",name:"Monolit",url:"https://monolit.sh",logo:{"@type":"ImageObject",url:"https://monolit.sh/logo512.png"},foundingDate:"2026",description:"Monolit is an AI-powered social media platform for founders. AI creates your social media posts, you approve, and Monolit publishes automatically across all platforms.",sameAs:["https://x.com/monolit_sh","https://linkedin.com/company/monolit"],contactPoint:{"@type":"ContactPoint",contactType:"customer support",url:"https://monolit.sh"}},{"@context":"https://schema.org","@type":"SoftwareApplication",name:"Monolit",url:"https://monolit.sh",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"AI creates your social media posts. You approve. We publish. Set up in 5 minutes, never think about posting again.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}},{"@context":"https://schema.org","@type":"WebSite","@id":"https://monolit.sh/#website",name:"Monolit",url:"https://monolit.sh",publisher:{"@id":"https://monolit.sh/#organization"},potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:"https://monolit.sh/blog?q={search_term_string}"},"query-input":"required name=search_term_string"}}]),Yz=["en","es","pt","fr","de","zh","ja","ko","ar","hi","id","th","tr","ru","it","nl","pl","sv","vi"];function Kz({error:t}){return q.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[var(--bg-primary)]",children:q.jsxs("div",{className:"text-center max-w-md px-6",children:[q.jsx("h1",{className:"text-4xl font-bold text-[var(--text-primary)] mb-4",children:"Something went wrong"}),q.jsx("p",{className:"text-[var(--text-secondary)] mb-6",children:"We hit an unexpected error. Please try refreshing the page."}),!1,q.jsxs("div",{className:"flex gap-3 justify-center",children:[q.jsx("button",{onClick:()=>window.location.reload(),className:"btn btn-primary",children:"Refresh Page"}),q.jsx("a",{href:"/",className:"btn btn-secondary",children:"Go Home"})]})]})})}function Wz(){return q.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[var(--bg-primary)]",children:q.jsxs("div",{className:"text-center",children:[q.jsx("h1",{className:"text-4xl font-bold text-[var(--text-primary)] mb-4",children:"404"}),q.jsx("p",{className:"text-[var(--text-secondary)] mb-6",children:"Page not found"}),q.jsx("a",{href:"/",className:"btn btn-primary",children:"Go Home"})]})})}const je=BL({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Monolit - Social media on autopilot for founders"},{name:"description",content:"AI creates your social media posts. You approve. We publish. Set up in 5 minutes, never think about posting again."},{property:"og:title",content:"Monolit - Social media on autopilot for founders"},{property:"og:description",content:"AI creates your social media posts. You approve. We publish. Set up in 5 minutes."},{property:"og:type",content:"website"},{property:"og:url",content:"https://monolit.sh"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Monolit - Social media on autopilot for founders"},{name:"twitter:description",content:"AI creates your social media posts. You approve. We publish. Set up in 5 minutes."},{property:"og:image",content:"https://monolit.sh/ogimage.png"}
68,{property:"og:image:width",content:"1200"},{property:"og:image:height",content:"630"},{property:"og:image:alt",content:"Monolit — AI-powered social media autopilot for founders"},{property:"og:site_name",content:"Monolit"},{name:"twitter:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:site",content:"@monolit_sh"}],links:[{rel:"stylesheet",href:Uz},{rel:"icon",type:"image/svg+xml",href:"/favicon.svg"},{rel:"icon",href:"/favicon.svg"},{rel:"apple-touch-icon",href:"/logo192.png"},...Yz.map(t=>({rel:"alternate",hrefLang:t,href:`https://monolit.sh/?hl=${t}`})),{rel:"alternate",hrefLang:"x-default",href:"https://monolit.sh"}]}),errorComponent:Kz,notFoundComponent:Wz,shellComponent:Zz,validateSearch:qz});function KE(){if(document.querySelector('script[src*="googletagmanager"]'))return;const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtm.js?id=${Vz}`,document.head.appendChild(t);const e=window;e.dataLayer=e.dataLayer||[],e.dataLayer.push({"gtm.start":new Date().getTime(),event:"gtm.js"})}function WE(){const t="phc_GuL7vab71UOmkfg8CmcQSU2pQirb9LO09xHvKGu7ufI",e="https://us.i.posthog.com";Qs.__loaded||Qs.init(t,{api_host:e,person_profiles:"identified_only",capture_pageview:!0,capture_pageleave:!0,autocapture:!0,disable_session_recording:!1,session_recording:{maskAllInputs:!1,maskInputOptions:{password:!0}}})}function Jz({children:t}){const[e,n]=ne.useState(!1);return ne.useEffect(()=>{bh()?.analytics&&(KE(),WE());const a=o=>{o.detail?.analytics&&(KE(),WE())};return window.addEventListener("consent-updated",a),zz(),n(!0),()=>window.removeEventListener("consent-updated",a)},[]),e?q.jsx(X2,{client:Qs,children:t}):q.jsx(q.Fragment,{children:t})}function Zz({children:t}){return q.jsxs("html",{lang:"en",suppressHydrationWarning:!0,id:"monolit-root",children:[q.jsxs("head",{children:[q.jsx("script",{dangerouslySetInnerHTML:{__html:Fz}}),q.jsx("script",{dangerouslySetInnerHTML:{__html:Hz}}),q.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:Gz}}),q.jsx("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),q.jsx("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),q.jsx("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap"}),q.jsx("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap"}),q.jsx("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&display=swap"}),q.jsx("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200&display=swap"}),q.jsx("link",{rel:"manifest",href:"/manifest.json"}),q.jsx(oN,{})]}),q.jsxs("body",{className:"font-sans antialiased [overflow-wrap:anywhere]",children:[q.jsx("a",{href:"#main-content",className:"skip-to-content",children:"Skip to main content"}),q.jsx(Jz,{children:q.jsx(K$,{children:q.jsx(Pz,{children:q.jsxs(ez,{children:[t,q.jsx(Iz,{}),Bz]})})})}),q.jsx(lN,{})]})]})}const Xz=()=>fe(()=>import("./verify-business-BNa6VUse.js"),__vite__mapDeps([0,1])),Qz=_x({businessId:yx().optional()}),eU=Re("/verify-business")({component:Ae(Xz,"component"),validateSearch:Qz}),tU=()=>fe(()=>import("./unsubscribe-JBApS3Df.js"),[]),nU=Re("/unsubscribe")({component:Ae(tU,"component"),validateSearch:t=>({token:typeof t.token=="string"?t.token:""}),head:()=>({meta:[{title:"Unsubscribe — Monolit"},{name:"robots",content:"noindex, nofollow"}]})}),rU=()=>fe(()=>import("./pricing-Czaon-Y-.js"),__vite__mapDeps([2,1,3,4,5,6])),iU=Re("/pricing")({component:Ae(rU,"component"),head:()=>({meta:[{title:"Pricing - Monolit | Social Media Autopilot for Founders"},{name:"description",content:"Simple pricing. Free to start, $49.99/mo for full autopilot. Your AI agent handles social media so you can focus on building."},{property:"og:title",content:"Pricing - Monolit"},{property:"og:description",content:"Simple pricing. Free to start, upgrade when you grow."},{property:"og:url",content:"https://monolit.sh/pricing"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Pricing - Monolit"},{name:"twitter:description",content:"Simple pricing. Free to start, upgrade when you grow."},{name:"twitter:image",content:"https://monolit.sh/ogimage.png"}],links:[{rel:"canonical",href:"https://monolit.sh/pricing"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Product",name:"Monolit",description:"AI-powered social media autopilot for founders. AI creates posts, you approve, we publish.",brand:{"@id":"https://monolit.sh/#organization"},url:"https://monolit.sh/pricing",image:"https://monolit.sh/ogimage.png",offers:[{"@type":"Offer",name:"Free",price:"0",priceCurrency:"USD",description:"10 AI posts/month, free scheduling, all platforms",url:"https://monolit.sh/pricing"},{"@type":"Offer",name:"Pro (Monthly)",price:"49.99",priceCurrency:"USD",description:"Unlimited AI posts, auto-publish, full delegation, smart timing, brand intelligence, analytics",url:"https://monolit.sh/pricing"},{"@type":"Offer",name:"Pro (Annual)",price:"19.99",priceCurrency:"USD",description:"All Pro features billed annually at $239.88/year",url:"https://monolit.sh/pricing"}]})}]})}),sU=()=>fe(()=>import("./onboarding-CzPrhe_2.js"),__vite__mapDeps([7,8])),aU=Re("/onboarding")({component:Ae(sU,"component")}),oU=()=>fe(()=>import("./onboard--EXnO66x.js"),__vite__mapDeps([9,10,1])),lU=Re("/onboard")({component:Ae(oU,"component")}),cU=()=>fe(()=>import("./dashboard-NJjJEKaX.js").then(t=>t.d),__vite__mapDeps([11,3,12,6,13,14,15,16,1,17])),uU=Re("/dashboard")({component:Ae(cU,"component"),validateSearch:t=>({connected:t.connected,error:t.error,profileId:t.profileId,accountId:t.accountId,username:t.username,connect_token:t.connect_token,billing:t.billing,settings:t.settings})}),dU=()=>fe(()=>import("./index-CgQVVvfM.js"),__vite__mapDeps([18,4,1,5,6,19,10,15])),hU=Re("/")({component:Ae(
68dU,"component"),head:()=>({meta:[{title:"Monolit: Autonomous Marketing Intelligence for Founders"},{name:"description",content:"Monolit is an autonomous marketing intelligence for founders. It analyzes your business, your audience, and every platform, then creates, schedules, and publishes content that performs. You approve, it runs the rest."},{property:"og:title",content:"Monolit: Autonomous Marketing Intelligence for Founders"},{property:"og:description",content:"Monolit is an autonomous marketing intelligence for founders. It creates, schedules, and publishes content that performs. You approve, it runs the rest."},{property:"og:url",content:"https://monolit.sh"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Monolit: Autonomous Marketing Intelligence for Founders"},{name:"twitter:description",content:"Monolit is an autonomous marketing intelligence for founders. It creates, schedules, and publishes content that performs. You approve, it runs the rest."},{name:"twitter:image",content:"https://monolit.sh/ogimage.png"}],links:[{rel:"canonical",href:"https://monolit.sh"}]})}),fU=ns({method:"GET"}).handler(Mo("8995b2dad26cca922f7e3cb3dec2f131c2269ae4ee8f71d9212eacc5ed6b09db")),pU=ns({method:"GET"}).handler(Mo("e0c2ce979d75f48e6aac09b6e12e7dba40692b413757ba6bf1fd91c727168513")),gU=ns({method:"GET"}).handler(Mo("6625275b4f3ed6c3f97fc5f753338206e49cc6afc177433a9358bba4280db30c")),mU=()=>fe(()=>import("./index-B_nCsN-5.js"),__vite__mapDeps([20,4,1,5,6])),vU=Re("/compare/")({component:Ae(mU,"component"),loader:()=>fU(),head:({loaderData:t})=>{const e=t||[],n=e.length>0?JSON.stringify({"@context":"https://schema.org","@type":"ItemList",name:"Monolit Comparisons",url:"https://monolit.sh/compare",numberOfItems:e.length,itemListElement:e.slice(0,20).map((i,a)=>({"@type":"ListItem",position:a+1,url:`https://monolit.sh/compare/${i.slug}`,name:i.title}))}):null;return{meta:[{title:"Compare Monolit — See How We Stack Up Against Other Tools"},{name:"description",content:"Honest, detailed comparisons between Monolit and other social media tools. See features, pricing, and why founders are switching to AI-native automation."},{property:"og:title",content:"Compare Monolit — AI Social Media Platform vs Competitors"},{property:"og:description",content:"Honest, detailed comparisons between Monolit and other social media tools."},{property:"og:url",content:"https://monolit.sh/compare"},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Compare Monolit — AI Social Media Platform vs Competitors"},{name:"twitter:description",content:"Honest, detailed comparisons between Monolit and other social media tools."},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:image",content:"https://monolit.sh/ogimage.png"}],links:[{rel:"canonical",href:"https://monolit.sh/compare"}],...n?{scripts:[{type:"application/ld+json",children:n}]}:{}}}}),yU=()=>fe(()=>import("./index-CigaplTg.js"),__vite__mapDeps([21,4,1,5,6])),_U=Re("/blog/")({component:Ae(yU,"component"),validateSearch:t=>({page:Number(t.page)||0}),loaderDeps:({search:t})=>({page:t.page}),loader:async({deps:t})=>{const{fetchBlogPosts:e}=await fe(async()=>{const{fetchBlogPosts:n}=await import("./blog-ClR_Lhlw.js");return{fetchBlogPosts:n}},[]);return e({data:{page:t.page}})},head:({loaderData:t})=>{const{posts:e,total:n}=t||{posts:[],total:0},i=e.length>0?JSON.stringify({"@context":"https://schema.org","@type":"ItemList",name:"Monolit Blog",url:"https://monolit.sh/blog",numberOfItems:n,itemListElement:e.slice(0,20).map((a,o)=>({"@type":"ListItem",position:o+1,url:`https://monolit.sh/blog/${a.slug}`,name:a.title}))}):null;return{meta:[{title:"Blog — Monolit | Social Media Automation Insights"},{name:"description",content:"Practical guides on social media automation, AI content creation, and growth strategies for founders and startups."},{property:"og:title",content:"Blog — Monolit"},{property:"og:description",content:"Practical guides on social media automation, AI content creation, and growth strategies for founders."},{property:"og:url",content:"https://monolit.sh/blog"},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Blog — Monolit"},{name:"twitter:description",content:"Practical guides on social media automation, AI content creation, and growth strategies for founders."},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:image",content:"https://monolit.sh/ogimage.png"}],links:[{rel:"canonical",href:"https://monolit.sh/blog"}],...i?{scripts:[{type:"application/ld+json",children:i}]}:{}}}}),bU=()=>fe(()=>import("./website-audit-HKz0aX3U.js"),__vite__mapDeps([22,4,1,5,6])),wU=Re("/tools/website-audit")({component:Ae(bU,"component"),head:()=>({meta:[{title:"Free Website Audit — Check Your Social Media & SEO Score | Monolit"},{name:"description",content:"Free instant website audit. Check your social media presence, SEO setup, and content strategy. Get a score out of 100 with actionable fixes."},{property:"og:title",content:"Free Website Audit — Monolit"},{property:"og:description",content:"Check your social media presence and SEO setup. Get a score out of 100 with actionable fixes."},{property:"og:url",content:"https://monolit.sh/tools/website-audit"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Free Website Audit — Monolit"},{name:"twitter:description",content:"Check your social media presence and SEO setup. Get a score out of 100."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/website-audit"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Website Audit Tool",url:"https://monolit.sh/tools/website-audit",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free website audit tool that checks social media presence, SEO setup, and content strategy. Scores your site out of 100.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),SU=()=>fe(()=>import("./social-media-strategy-CzsaZ4AB.js"),__vite__mapDeps([23,4,1,5,6])),EU=Re("/tools/social-media-strategy")({component:Ae(SU,"component"),head:()=>({meta:[{title:"Free Social Media Strategy Generator for Startups | Monolit"},{name:"description",content:"Get a personalized social media strategy in 60 seconds. Tailored content pillars, posting schedule, and platform recommendations for your business."},{property:"og:title",content:"Free Social Media Strategy Generator for Startups | Monolit"},{property:"og:description",content:"Get a personalized social media strategy in 60 seconds. Tailored content pillars, posting schedule, and platform recommendations for your business."},{property:"og:url",content:"https://monolit.sh/tools/social-media-strategy"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Free Social Media Strategy Generator for Startups | Monolit"},{name:"twitter:description",content:"Get a personalized social media strategy in 60 seconds. Tailored content pillars and posting schedule."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/social-media-strategy"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"HowTo",name:"How to Create a S
68ocial Media Strategy for Your Startup",url:"https://monolit.sh/tools/social-media-strategy",description:"Free social media strategy generator that creates personalized content pillars, posting schedules, and platform recommendations for startups and small businesses.",step:[{"@type":"HowToStep",name:"Select your industry",text:"Choose your business industry to get tailored recommendations."},{"@type":"HowToStep",name:"Define your audience",text:"Describe your target audience and their primary social platforms."},{"@type":"HowToStep",name:"Set your goals",text:"Choose between brand awareness, lead generation, or community building."},{"@type":"HowToStep",name:"Get your strategy",text:"Receive a personalized content strategy with pillars, posting schedule, and platform priorities."}],publisher:{"@id":"https://monolit.sh/#organization"}})}]})}),kU=()=>fe(()=>import("./social-media-roi-calculator-DJHezMBw.js"),__vite__mapDeps([24,4,1,5,6])),xU=Re("/tools/social-media-roi-calculator")({component:Ae(kU,"component"),head:()=>({meta:[{title:"Social Media ROI Calculator — Is It Worth Your Time? | Monolit"},{name:"description",content:"Calculate the real cost of managing social media manually. See how much time and money you could save with automation."},{property:"og:title",content:"Social Media ROI Calculator — Is It Worth Your Time? | Monolit"},{property:"og:description",content:"Calculate the real cost of managing social media manually. See how much time and money you could save with automation."},{property:"og:url",content:"https://monolit.sh/tools/social-media-roi-calculator"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Social Media ROI Calculator — Monolit"},{name:"twitter:description",content:"Calculate the real cost of managing social media manually. See how much time and money you could save with automation."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/social-media-roi-calculator"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Social Media ROI Calculator",url:"https://monolit.sh/tools/social-media-roi-calculator",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free calculator to estimate the real cost of managing social media manually and see how much time and money you could save with automation.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),TU=()=>fe(()=>import("./social-media-image-sizes-lDo85BX9.js"),__vite__mapDeps([25,4,1,5,6])),RU=Re("/tools/social-media-image-sizes")({component:Ae(TU,"component"),head:()=>({meta:[{title:"Social Media Image Sizes 2026 — Complete Cheat Sheet | Monolit"},{name:"description",content:"Every social media image size for 2026 in one place. Profile photos, cover images, feed posts, stories, reels, and thumbnails for LinkedIn, X, Instagram, Facebook, TikTok, Threads, and YouTube."},{property:"og:title",content:"Social Media Image Sizes 2026 — Complete Cheat Sheet"},{property:"og:description",content:"Every social media image dimension for 2026. Profile photos, covers, feed posts, stories, reels, and thumbnails for all major platforms."},{property:"og:url",content:"https://monolit.sh/tools/social-media-image-sizes"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Social Media Image Sizes 2026 — Complete Cheat Sheet"},{name:"twitter:description",content:"Every social media image dimension for 2026. Profile photos, covers, feed posts, stories, reels, and thumbnails."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/social-media-image-sizes"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Social Media Image Sizes Cheat Sheet",url:"https://monolit.sh/tools/social-media-image-sizes",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Complete reference of every social media image size for 2026. Covers LinkedIn, X/Twitter, Instagram, Facebook, TikTok, Threads, and YouTube.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),AU=()=>fe(()=>import("./social-media-checklist-C0rlelYW.js"),__vite__mapDeps([26,4,1,5,6])),CU=Re("/tools/social-media-checklist")({component:Ae(AU,"component"),head:()=>({meta:[{title:"Social Media Checklist 2026 — Daily, Weekly & Monthly Tasks | Monolit"},{name:"description",content:"Interactive social media maintenance checklist. Track your daily, weekly, and monthly tasks. Stay consistent and grow your presence."},{property:"og:title",content:"Social Media Checklist 2026 — Daily, Weekly & Monthly Tasks | Monolit"},{property:"og:description",content:"Interactive social media maintenance checklist. Track your daily, weekly, and monthly tasks. Stay consistent and grow your presence."},{property:"og:url",content:"https://monolit.sh/tools/social-media-checklist"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Social Media Checklist 2026 — Daily, Weekly & Monthly Tasks | Monolit"},{name:"twitter:description",content:"Interactive social media maintenance checklist. Track your daily, weekly, and monthly tasks. Stay consistent and grow your presence."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/social-media-checklist"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Social Media Checklist",url:"https://monolit.sh/tools/social-media-checklist",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Interactive weekly and monthly social media maintenance checklist with 25 tasks across 5 categories. Track progress with persistent checkboxes.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),OU=()=>fe(()=>import("./post-ideas-Dj9l4_zg.js"),__vite__mapDeps([27,4,1,5,6])),PU=Re("/tools/post-ideas")({component:Ae(OU,"component"),head:()=>({meta:[{title:"Free Social Media Post Idea Generator — Never Run Out of Content | Monolit"},{name:"description",content:"Get 10 fresh social media post ideas instantly. Tailored to your industry and platform. No AI, no signup, just ideas."},{property:"og:title",content:"Free Social Media Post Idea Generator — Monolit"},{property:"og:description",content:"Get 10 fresh social media post ideas instantly. Tailored to your industry and platform. No AI, no signup, just ideas."},{property:"og:url",content:"https://monolit.sh/tools/post-ideas"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Free Post Idea Generator — Monolit"},{name:"twitter:description",content:"Get 10 fresh social media post ideas for your industry. No AI, no signup."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/post-ideas"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Social Media Post Idea Generator",url:"https://monolit.sh/tools/post-ideas",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free social media post idea generator. Get 10 fresh content ideas tailored to your industry, platform, and content type. No AI, no signup required.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),MU=()=>fe(()=>
68import("./hashtag-generator-C2AA0ywH.js"),__vite__mapDeps([28,4,1,5,6])),LU=Re("/tools/hashtag-generator")({component:Ae(MU,"component"),head:()=>({meta:[{title:"Free Hashtag Generator for Social Media — Find Trending Hashtags | Monolit"},{name:"description",content:"Find the best hashtags for your industry and platform. Get trending, niche, and growth hashtags for Instagram, LinkedIn, X/Twitter, and TikTok. Free tool by Monolit."},{property:"og:title",content:"Free Hashtag Generator for Social Media — Monolit"},{property:"og:description",content:"Find trending, niche, and growth hashtags for your industry. Optimized for Instagram, LinkedIn, X, and TikTok."},{property:"og:url",content:"https://monolit.sh/tools/hashtag-generator"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Free Hashtag Generator — Monolit"},{name:"twitter:description",content:"Find the best hashtags for your industry and platform. Trending, niche, and growth sets."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/hashtag-generator"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Hashtag Generator",url:"https://monolit.sh/tools/hashtag-generator",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free hashtag generator for social media. Get trending, niche, and growth hashtags for your industry, optimized per platform.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),NU=()=>fe(()=>import("./growth-playbook-Daldu8P8.js"),__vite__mapDeps([29,4,1,5,6])),DU=Re("/tools/growth-playbook")({component:Ae(NU,"component"),head:()=>({meta:[{title:"How to Get Your First 1000 Followers — Free Growth Playbook | Monolit"},{name:"description",content:"Step-by-step interactive playbook to grow from 0 to 1000 followers on LinkedIn, X, Instagram, TikTok, and Threads. Track your progress."},{property:"og:title",content:"How to Get Your First 1000 Followers — Free Growth Playbook | Monolit"},{property:"og:description",content:"Step-by-step interactive playbook to grow from 0 to 1000 followers on LinkedIn, X, Instagram, TikTok, and Threads. Track your progress."},{property:"og:url",content:"https://monolit.sh/tools/growth-playbook"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"How to Get Your First 1000 Followers — Free Growth Playbook | Monolit"},{name:"twitter:description",content:"Step-by-step interactive playbook to grow from 0 to 1000 followers on LinkedIn, X, Instagram, TikTok, and Threads."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/growth-playbook"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"HowTo",name:"How to Get Your First 1000 Followers on Social Media",url:"https://monolit.sh/tools/growth-playbook",description:"Interactive step-by-step playbook to grow from 0 to 1000 followers on LinkedIn, X, Instagram, TikTok, and Threads.",totalTime:"P30D",step:[{"@type":"HowToStep",name:"Optimize your profile",text:"Set up a professional profile with a clear bio, profile photo, and link to your product."},{"@type":"HowToStep",name:"Define your content pillars",text:"Choose 3-4 topics that align with your expertise and audience interests."},{"@type":"HowToStep",name:"Start posting consistently",text:"Publish 3-5 posts per week using a mix of educational, personal, and promotional content."},{"@type":"HowToStep",name:"Engage with your community",text:"Comment on posts in your niche, reply to every comment, and join relevant conversations."},{"@type":"HowToStep",name:"Analyze and iterate",text:"Review your analytics weekly and double down on content formats that perform best."}],publisher:{"@id":"https://monolit.sh/#organization"}})}]})}),jU=()=>fe(()=>import("./glossary-13PAxO0D.js"),__vite__mapDeps([30,4,1,5,6])),IU=Re("/tools/glossary")({component:Ae(jU,"component"),head:()=>({meta:[{title:"Social Media Glossary 2026 — 100+ Terms Defined | Monolit"},{name:"description",content:"Complete glossary of social media marketing terms. Clear definitions for founders and marketers. From Algorithm to Viral."},{property:"og:title",content:"Social Media Glossary 2026 — 100+ Terms Defined | Monolit"},{property:"og:description",content:"Complete glossary of social media marketing terms. Clear definitions for founders and marketers. From Algorithm to Viral."},{property:"og:url",content:"https://monolit.sh/tools/glossary"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Social Media Glossary 2026 — 100+ Terms Defined | Monolit"},{name:"twitter:description",content:"Complete glossary of social media marketing terms. Clear definitions for founders and marketers."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/glossary"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"DefinedTermSet",name:"Social Media Glossary 2026",url:"https://monolit.sh/tools/glossary",description:"Searchable A-Z glossary of 100+ social media and digital marketing terms with clear, founder-fr
68iendly definitions.",publisher:{"@id":"https://monolit.sh/#organization"},inLanguage:"en"})}]})}),$U=()=>fe(()=>import("./engagement-rate-calculator-Bs7NVvAA.js"),__vite__mapDeps([31,4,1,5,6])),zU=Re("/tools/engagement-rate-calculator")({component:Ae($U,"component"),head:()=>({meta:[{title:"Free Engagement Rate Calculator — Check Your Social Media Performance | Monolit"},{name:"description",content:"Calculate your social media engagement rate instantly. Compare against benchmarks for your follower count. Free, no signup."},{property:"og:title",content:"Free Engagement Rate Calculator — Monolit"},{property:"og:description",content:"Calculate your social media engagement rate instantly. Compare against benchmarks for your follower count."},{property:"og:url",content:"https://monolit.sh/tools/engagement-rate-calculator"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Free Engagement Rate Calculator — Monolit"},{name:"twitter:description",content:"Calculate your social media engagement rate instantly. Compare against benchmarks for your follower count."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/engagement-rate-calculator"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Engagement Rate Calculator",url:"https://monolit.sh/tools/engagement-rate-calculator",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free engagement rate calculator for social media. Enter your follower count and average interactions to see your engagement rate and how it compares to benchmarks.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),UU=()=>fe(()=>import("./content-pillars-QLfc1tYs.js"),__vite__mapDeps([32,4,1,5,6])),BU=Re("/tools/content-pillars")({component:Ae(UU,"component"),head:()=>({meta:[{title:"Free Content Pillar Planner — Build Your Content Strategy | Monolit"},{name:"description",content:"Generate 4 content pillars tailored to your business in seconds. Get example posts and a weekly schedule."},{property:"og:title",content:"Free Content Pillar Planner — Monolit"},{property:"og:description",content:"Generate 4 content pillars tailored to your business in seconds. Get example posts and a weekly schedule."},{property:"og:url",content:"https://monolit.sh/tools/content-pillars"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Free Content Pillar Planner — Monolit"},{name:"twitter:description",content:"Generate 4 content pillars tailored to your business in seconds. Get example posts and a weekly schedule."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/content-pillars"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Content Pillar Planner",url:"https://monolit.sh/tools/content-pillars",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free content pillar planner that generates 4 content pillars tailored to your business with example posts and a weekly schedule.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),qU=()=>fe(()=>import("./character-counter-Cqx1SsQF.js"),__vite__mapDeps([33,4,1,5,6])),FU=Re("/tools/character-counter")({component:Ae(qU,"component"),head:()=>({meta:[{title:"Free Social Media Character Counter — Check Post Length | Monolit"},{name:"description",content:"Check character limits for X/Twitter, LinkedIn, Instagram, Threads, TikTok, and Facebook. Free real-time character counter with platform-specific limits and warnings."},{property:"og:title",content:"Free Social Media Character Counter — Monolit"},{property:"og:description",content:"Check your post length against character limits for every social media platform. Free, instant, no sign-up."},{property:"og:url",content:"https://monolit.sh/tools/character-counter"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Free Social Media Character Counter — Monolit"},{name:"twitter:description",content:"Check your post length against character limits for every social media platform."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/character-counter"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Social Media Character Counter",url:"https://monolit.sh/tools/character-counter",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free character counter that checks your text against character limits for X/Twitter, LinkedIn, Instagram, Threads, TikTok, and Facebook.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),HU=()=>fe(()=>import("./bio-generator-DAFf-itX.js"),__vite__mapDeps([34,4,1,5,6])),VU=Re("/tools/bio-generator")({component:Ae(HU,"component"),head:()=>({meta:[{title:"Free Social Media Bio Generator — Create Your Perfect Bio | Monolit"},{name:"description",content:"Generate professional social media bios for LinkedIn, Twitter, Instagram, and more. 5 bio variations in seconds — free, no signup required."},{property:"og:title",content:"Free Social Media Bio Generator — Monolit"},{property:"og:description",content:"Generate professional social media bios for LinkedIn, Twitter, Instagram, and more. 5 variations in seconds."},{property:"og:url",content:"https://monolit.sh/tools/bio-generator"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Free Social Media Bio Generator — Monolit"},{name:"twitter:description",content:"Generate professional social media bios for LinkedIn, Twitter, Instagram, and more."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/bio-generator"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Social Media Bio Generator",url:"https://monolit.sh/tools/bio-generator",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free social media bio generator. Create professional bios for LinkedIn, Twitter, Instagram, and more with 5 variations in seconds.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),GU=()=>fe(()=>import("./best-time-to-post-D8m0DT6W.js"),__vite__mapDeps([35,4,1,5,6])),YU=Re("/tools/best-time-to-post")({component:Ae(GU,"component"),head:()=>({meta:[{title:"Best Time to Post on Social Media in 2026 — Free Calculator | Monolit"},{name:"description",content:"Find the optimal posting times for LinkedIn, X/Twitter, Instagram, Threads, TikTok, and Facebook. Visual heatmap based on published research data."},{property:"og:title",content:"Best Time to Post on Social Media in 2026 — Monolit"},{property:"og:description",content:"Free tool to find optimal posting times for every major social platform. Visual weekly heatmap with golden hours."},{property:"og:url",content:"https://monolit.sh/tools/best-time-to-post"},{property:"og:type",content:"website"},{property:"og:image",content:"https://monolit.sh/ogimage.png"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Best Time to Post on Social Media in 2026 — Monolit"},{name:"twitter:description",content:"Find the optimal posting times for every major social platform. Free visual heatmap calculator."}],links:[{rel:"canonical",href:"https://monolit.sh/tools/best-time-to-post"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Best Time to Post Calculator",url:"https://monolit.sh/tools/best-time-to-post",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Free c
68alculator to find the best times to post on LinkedIn, X/Twitter, Instagram, Threads, TikTok, and Facebook based on published engagement research.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},creator:{"@id":"https://monolit.sh/#organization"}})}]})}),KU=()=>fe(()=>import("./connect-callback-P2lQKwRx.js"),[]),WU=Re("/social/connect-callback")({component:Ae(KU,"component"),validateSearch:t=>({businessId:t.businessId||""})}),JU=()=>fe(()=>import("./terms-D_h5L_xM.js"),[]),ZU=Re("/legal/terms")({component:Ae(JU,"component")}),XU=()=>fe(()=>import("./privacy-DQUTBdBN.js"),[]),QU=Re("/legal/privacy")({component:Ae(XU,"component")}),e3=()=>fe(()=>import("./api-test-TusWaaSi.js"),[]),t3=Re("/legal/api-test")({component:Ae(e3,"component")}),n3=()=>fe(()=>import("./social-login-check-IB4Nnw8d.js"),__vite__mapDeps([36,1,37])),r3=Re("/extension/social-login-check")({component:Ae(n3,"component"),validateSearch:t=>({platforms:t.platforms,auto:t.auto})}),i3=()=>fe(()=>import("./connect-sumqY-Pi.js"),__vite__mapDeps([38,1,37])),s3=Re("/extension/connect")({component:Ae(i3,"component"),validateSearch:t=>({ext_id:t.ext_id})}),a3=()=>fe(()=>import("./_slug-CMgKxzB6.js"),__vite__mapDeps([39,4,1,5,6,40])),o3=Re("/compare/$slug")({component:Ae(a3,"component"),loader:async({params:t})=>{const e=await pU({data:t.slug});if(!e)throw ak();const n=await gU({data:{slug:e.slug,competitor:e.competitor}});return{page:e,related:n}},head:({loaderData:t})=>{const e=t?.page;if(!e)return{};const n=JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:e.title,description:e.meta_description||e.excerpt||"",datePublished:e.published_at,dateModified:e.updated_at,author:{"@type":"Organization",name:e.author||"Monolit",url:"https://monolit.sh"},publisher:{"@type":"Organization",name:"Monolit",url:"https://monolit.sh",logo:{"@type":"ImageObject",url:"https://monolit.sh/logo512.png"}},mainEntityOfPage:`https://monolit.sh/compare/${e.slug}`,image:e.featured_image_url||"https://monolit.sh/ogimage.png"}),i=[],a=e.content.match(/## Frequently Asked Questions[\s\S]*$/i);if(a){const h=a[0].matchAll(/###\s*(.+?)\n+([\s\S]*?)(?=\n###|\n##|$)/g);for(const f of h){const g=f[1].trim().replace(/\*\*/g,""),v=f[2].trim().replace(/\n+/g," ").substring(0,300);g&&v&&i.push({q:g,a:v})}}const o=JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://monolit.sh"},{"@type":"ListItem",position:2,name:"Compare",item:"https://monolit.sh/compare"},{"@type":"ListItem",position:3,name:e.title,item:`https://monolit.sh/compare/${e.slug}`}]}),c=i.length>0?JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(({q:d,a:h})=>({"@type":"Question",name:d,acceptedAnswer:{"@type":"Answer",text:h}}))}):null;return{meta:[{title:`${e.title} — Monolit`},{name:"description",content:e.meta_description||e.excerpt||""},{property:"og:title",content:e.title},{property:"og:description",content:e.meta_description||e.excerpt||""},{property:"og:url",content:`https://monolit.sh/compare/${e.slug}`},{property:"og:type",content:"article"},{property:"og:image",content:e.featured_image_url||"https://monolit.sh/ogimage.png"},{property:"article:published_time",content:e.published_at},{property:"article:author",content:e.author||"Monolit"},...e.tags.map(d=>({property:"article:tag",content:d})),{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:e.title},{name:"twitter:description",content:e.meta_description||e.excerpt||""},{name:"twitter:image",content:e.featured_image_url||"https://monolit.sh/ogimage.png"}],links:[{rel:"canonical",href:`https://monolit.sh/compare/${e.slug}`}],scripts:[{type:"application/ld+json",children:n},{type:"application/ld+json",children:o},...c?[{type:"application/ld+json",children:c}]:[]]}}}),l3=()=>fe(()=>import("./_slug-8FZBDHam.js"),__vite__mapDeps([41,4,1,5,6,40])),c3=Re("/blog/$slug")({component:Ae(l3,"component"),loader:async({params:t})=>{const{fetchBlogPostBySlug:e,fetchRelatedPosts:n}=await fe(async()=>{const{fetchBlogPostBySlug:o,fetchRelatedPosts:c}=await import("./blog-ClR_Lhlw.js");return{fetchBlogPostBySlug:o,fetchRelatedPosts:c}},[]),i=await e({data:t.slug});if(!i)throw ak();const a=i.tags.length>0?await n({data:{slug:i.slug,tags:i.tags}}):[];return{post:i,related:a}},head:({loaderData:t})=>{const e=t?.post;if(!e)return{};const n=JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:e.title,de
68scription:e.meta_description||e.excerpt||"",datePublished:e.published_at,dateModified:e.updated_at,author:{"@type":"Organization",name:e.author||"Monolit",url:"https://monolit.sh"},publisher:{"@type":"Organization",name:"Monolit",url:"https://monolit.sh",logo:{"@type":"ImageObject",url:"https://monolit.sh/logo512.png"}},mainEntityOfPage:`https://monolit.sh/blog/${e.slug}`,image:e.featured_image_url||"https://monolit.sh/ogimage.png"}),i=[],a=e.content.match(/## Frequently Asked Questions[\s\S]*$/i);if(a){const h=a[0].matchAll(/###\s*(.+?)\n+([\s\S]*?)(?=\n###|\n##|$)/g);for(const f of h){const g=f[1].trim().replace(/\*\*/g,""),v=f[2].trim().replace(/\n+/g," ").substring(0,300);g&&v&&i.push({q:g,a:v})}}const o=JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://monolit.sh"},{"@type":"ListItem",position:2,name:"Blog",item:"https://monolit.sh/blog"},{"@type":"ListItem",position:3,name:e.title,item:`https://monolit.sh/blog/${e.slug}`}]}),c=i.length>0?JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(({q:d,a:h})=>({"@type":"Question",name:d,acceptedAnswer:{"@type":"Answer",text:h}}))}):null;return{meta:[{title:`${e.title} — Monolit Blog`},{name:"description",content:e.meta_description||e.excerpt||""},{property:"og:title",content:e.title},{property:"og:description",content:e.meta_description||e.excerpt||""},{property:"og:url",content:`https://monolit.sh/blog/${e.slug}`},{property:"og:type",content:"article"},{property:"og:image",content:e.featured_image_url||"https://monolit.sh/ogimage.png"},{property:"article:published_time",content:e.published_at},{property:"article:author",content:e.author||"Monolit"},...e.tags.map(d=>({property:"article:tag",content:d})),{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:e.title},{name:"twitter:description",content:e.meta_description||e.excerpt||""},{name:"twitter:image",content:e.featured_image_url||"https://monolit.sh/ogimage.png"}],links:[{rel:"canonical",href:`https://monolit.sh/blog/${e.slug}`}],scripts:[{type:"application/ld+json",children:n},{type:"application/ld+json",children:o},...c?[{type:"application/ld+json",children:c}]:[]]}}}),u3=()=>fe(()=>import("./callback-F3j8I70V.js"),__vite__mapDeps([42,5,43])),d3=Re("/auth/callback")({component:Ae(u3,"component")}),h3=()=>fe(()=>import("./start-C9nFMMVH.js"),__vite__mapDeps([44,8,12,1,10,6,14,13])),f3=Re("/onboarding/start")({component:Ae(h3,"component")}),p3=()=>fe(()=>import("./social-DLeC1zbt.js"),[]),g3=Re("/onboarding/social")({component:Ae(p3,"component")}),m3=()=>fe(()=>import("./setup-Dize-SHP.js"),[]),v3=Re("/onboarding/setup")({component:Ae(m3,"component")}),y3=()=>fe(()=>import("./questions-Dize-SHP.js"),[]),_3=Re("/onboarding/questions")({component:Ae(y3,"component")}),b3=()=>fe(()=>import("./project-entry-Dize-SHP.js"),[]),w3=Re("/onboarding/project-entry")({component:Ae(b3,"component")}),S3=()=>fe(()=>import("./industry-Dize-SHP.js"),[]),E3=Re("/onboarding/industry")({component:Ae(S3,"component")}),k3=()=>fe(()=>import("./domain-mZXhJ7HX.js"),__vite__mapDeps([45,8,6,16])),x3=Re("/onboarding/domain")({component:Ae(k3,"component")}),T3=()=>fe(()=>import("./callback-CDdnoDXa.js"),__vite__mapDeps([46,14,47])),R3=Re("/oauth/x/callback")({component:Ae(T3,"component"),validateSearch:t=>({code:t.code||"",state:t.state||"",error:t.error||""})}),A3=()=>fe(()=>import("./callback-CF_-G_Wz.js"),__vite__mapDeps([48,14,47])),C3=Re("/oauth/tiktok/callback")({component:Ae(A3,"component"),validateSearch:t=>({code:t.code||"",state:t.state||"",error:t.error||"",error_description:t.error_description||""})}),O3=()=>fe(()=>import("./callback-Bn5zNa6X.js"),__vite__mapDeps([49,14,47])),P3=Re("/oauth/threads/callback")({component:Ae(O3,"component"),validateSearch:t=>({code:t.code||"",state:t.state||"",error:t.error||""})}),M3=()=>fe(()=>import("./callback-BceuTANX.js"),__vite__mapDeps([50,14,47])),L3=Re("/oauth/postforme/callback")({component:Ae(M3,"component"),validateSearch:t=>({error:t.error||""})}),N3=()=>fe(()=>import("./callback-v8sMwulp.js"),__vite__mapDeps([51,14,47])),D3=
68Re("/oauth/linkedin/callback")({component:Ae(N3,"component"),validateSearch:t=>({code:t.code||"",state:t.state||"",error:t.error||"",error_description:t.error_description||""})}),j3=()=>fe(()=>import("./callback-Dak8JioI.js"),__vite__mapDeps([52,14,47])),I3=Re("/oauth/instagram/callback")({component:Ae(j3,"component"),validateSearch:t=>({code:t.code||"",state:t.state||"",error:t.error||""})}),$3=()=>fe(()=>import("./callback-BpOwNb4p.js"),__vite__mapDeps([53,14,13,47])),z3=Re("/oauth/facebook/callback")({component:Ae($3,"component"),validateSearch:t=>({code:t.code||"",state:t.state||"",error:t.error||""})}),U3=eU.update({id:"/verify-business",path:"/verify-business",getParentRoute:()=>je}),B3=nU.update({id:"/unsubscribe",path:"/unsubscribe",getParentRoute:()=>je}),q3=iU.update({id:"/pricing",path:"/pricing",getParentRoute:()=>je}),cs=aU.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>je}),F3=lU.update({id:"/onboard",path:"/onboard",getParentRoute:()=>je}),H3=uU.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>je}),V3=hU.update({id:"/",path:"/",getParentRoute:()=>je}),G3=vU.update({id:"/compare/",path:"/compare/",getParentRoute:()=>je}),Y3=_U.update({id:"/blog/",path:"/blog/",getParentRoute:()=>je}),K3=wU.update({id:"/tools/website-audit",path:"/tools/website-audit",getParentRoute:()=>je}),W3=EU.update({id:"/tools/social-media-strategy",path:"/tools/social-media-strategy",getParentRoute:()=>je}),J3=xU.update({id:"/tools/social-media-roi-calculator",path:"/tools/social-media-roi-calculator",getParentRoute:()=>je}),Z3=RU.update({id:"/tools/social-media-image-sizes",path:"/tools/social-media-image-sizes",getParentRoute:()=>je}),X3=CU.update({id:"/tools/social-media-checklist",path:"/tools/social-media-checklist",getParentRoute:()=>je}),Q3=PU.update({id:"/tools/post-ideas",path:"/tools/post-ideas",getParentRoute:()=>je}),eB=LU.update({id:"/tools/hashtag-generator",path:"/tools/hashtag-generator",getParentRoute:()=>je}),tB=DU.update({id:"/tools/growth-playbook",path:"/tools/growth-playbook",getParentRoute:()=>je}),nB=IU.update({id:"/tools/glossary",path:"/tools/glossary",getParentRoute:()=>je}),rB=zU.update({id:"/tools/engagement-rate-calculator",path:"/tools/engagement-rate-calculator",getParentRoute:()=>je}),iB=BU.update({id:"/tools/content-pillars",path:"/tools/content-pillars",getParentRoute:()=>je}),sB=FU.update({id:"/tools/character-counter",path:"/tools/character-counter",getParentRoute:()=>je}),aB=VU.update({id:"/tools/bio-generator",path:"/tools/bio-generator",getParentRoute:()=>je}),oB=YU.update({id:"/tools/best-time-to-post",path:"/tools/best-time-to-post",getParentRoute:()=>je}),lB=WU.update({id:"/social/connect-callback",path:"/social/connect-callback",getParentRoute:()=>je}),cB=ZU.update({id:"/legal/terms",path:"/legal/terms",getParentRoute:()=>je}),uB=QU.update({id:"/legal/privacy",path:"/legal/privacy",getParentRoute:()=>je}),dB=t3.update({id:"/legal/api-test",path:"/legal/api-test",getParentRoute:()=>je}),hB=r3.update({id:"/extension/social-login-check",path:"/extension/social-login-check",getParentRoute:()=>je}),fB=s3.update({id:"/extension/connect",path:"/extension/connect",getParentRoute:()=>je}),pB=o3.update({id:"/compare/$slug",path:"/compare/$slug",getParentRoute:()=>je}),gB=c3.update({id:"/blog/$slug",path:"/blog/$slug",getParentRoute:()=>je}),mB=d3.update({id:"/auth/callback",path:"/auth/callback",getParentRoute:()=>je}),vB=f3.update({id:"/start",path:"/start",getParentRoute:()=>cs}),yB=g3.update({id:"/social",path:"/social",getParentRoute:()=>cs}),_B=v3.update({id:"/setup",path:"/setup",getParentRoute:()=>cs}),bB=_3.update({id:"/questions",path:"/questions",getParentRoute:()=>cs}),wB=w3.update({id:"/project-entry",path:"/project-entry",getParentRoute:()=>cs}),SB=E3.update({id:"/industry",path:"/industry",getParentRoute:()=>cs}),EB=x3.update({id:"/domain",path:"/domain",getParentRoute:()=>cs}),kB=R3.update({id:"/oauth/x/callback",path:"/oauth/x/callback",getParentRoute:()=>je}),xB=C3.update({id:"/oauth/tiktok/callback",path:"/oauth/tiktok/callback",getParentRoute:()=>je}),TB=P3.update({id:"/oauth/threads/callback",path:"/oauth/threads/callback",getParentRoute:()=>je}),RB=L3.update({id:"/oauth/postforme/callback",path:"/oauth/postforme/callback",getParentRoute:()=>je}),AB=D3.update({id:"/oauth/linkedin/callback",path:"/oauth/linkedin/callback",getParentRoute:()=>je}),CB=I3.update({id:"/oauth/instagram/callback",path:"/oauth/instagram/callback",getParentRoute:()=>je}),OB=z3.update({id:"/oauth/facebook/callback",path:"/oauth/facebook/callback",getParentRoute:()=>je}),PB={OnboardingDomainRoute:EB,OnboardingIndustryRoute:SB,OnboardingProjectEntryRoute:wB,OnboardingQuestionsRoute:bB,OnboardingSetupRoute:_B,OnboardingSocialRoute:yB,OnboardingStartRoute:vB},MB=cs._addFileChildren(PB),LB={IndexRoute:V3,DashboardRoute:H3,OnboardRoute:F3,OnboardingRoute:MB,PricingRoute:q3,UnsubscribeRoute:B3,VerifyBusinessRoute:U3,AuthCallbackRoute:mB,BlogSlugRoute:gB,CompareSlugRoute:pB,ExtensionConnectRoute:fB,ExtensionSocialLoginCheckRoute:hB,LegalApiTestRoute:dB,LegalPrivacyRoute:uB,LegalTermsRoute:cB,SocialConnectCallbackRoute:lB,ToolsBestTimeToPostRoute:oB,ToolsBioGeneratorRoute:aB,ToolsCharacterCounterRoute:sB,ToolsContentPillarsRoute:iB,ToolsEngagementRateCalculatorRoute:rB,ToolsGlossaryRoute:nB,ToolsGrowthPlaybookRoute:tB,ToolsHashtagGeneratorRoute:eB,ToolsPostIdeasRoute:Q3,ToolsSocialMediaChecklistRoute:X3,ToolsSocialMediaImageSizesRoute:Z3,ToolsSocialMediaRoiCalculatorRoute:J3,ToolsSocialMediaStrategyRoute:W3,ToolsWebsiteAuditRoute:K3,BlogIndexRoute:Y3,CompareIndexRoute:G3,OauthFacebookCallbackRoute:OB,OauthInstagramCallbackRoute:CB,OauthLinkedinCallbackRoute:AB,OauthPostformeCallbackRoute:RB,OauthThreadsCallbackRoute:TB,OauthTiktokCallbackRoute:xB,OauthXCallbackRoute:kB},NB=je._addFileChildren(LB);function DB(){return eN({routeTree:NB,scrollRestoration:!0,defaultPreload:"intent",defaultPreloadStaleTime:0})}async function jB(){const t=await DB();let e;if(U0){const n=await U0.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,e=n.serializationAdapters,t.options.defaultSsr=n.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(nL),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.matchesId.get().length||await aL(t),t}async function IB(){const t=await jB();return window.$_TSR?.h(),t}var Vg;function $B(){return Vg||(Vg=IB()),q.jsx(uL,{promise:Vg,children:t=>q.jsx(rN,{router:t})})}ne.startTransition(()=>{YA.hydrateRoot(document,q.jsx(ne.StrictMode,{children:q.jsx($B,{})}))});export{h4 as $,s4 as A,c4 as B,oz as C,q as D,fr as E,un as F,mz as G,AL as H,ne as I,hz as J,Bs as K,Qs as L,cz as M,e4 as N,WL as O,lv as P,a4 as Q,nU as R,sR as S,o4 as T,n4 as U,Hi as V,lz as W,ov as X,d4 as Y,f4 as Z,fe as _,lx as a,u4 as a0,g4 as a1,S4 as a2,p4 as a3,_4 as a4,y4 as a5,w4 as a6,b4 as a7,E4 as a8,v4 as a9,m4 as aa,Z$ as ab,Sv as ac,l4 as ad,en as ae,ax as af,Nt as ag,iR as ah,uU as b,vU as c,_U as d,WU as e,r3 as f,s3 as g,o3 as h,c3 as i,R3 as j,C3 as k,P3 as l,L3 as m,D3 as n,I3 as o,z3 as p,r4 as q,i4 as r,jh as s,Mo as t,ns as u,nR as v,dR as w,kz as x,lR as y,YE as z};

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